@pepperi-addons/ngx-lib 0.4.2-beta.99 → 0.4.2-scroll.2

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 (185) hide show
  1. package/chips/chips.component.d.ts +1 -3
  2. package/core/common/pipes/common-pipes.d.ts +3 -0
  3. package/core/customization/customization.model.d.ts +1 -1
  4. package/esm2020/checkbox/checkbox.component.mjs +3 -3
  5. package/esm2020/chips/chips.component.mjs +8 -11
  6. package/esm2020/color/color.component.mjs +3 -3
  7. package/esm2020/core/common/pipes/common-pipes.mjs +14 -4
  8. package/esm2020/core/customization/customization.model.mjs +7 -1
  9. package/esm2020/core/customization/customization.service.mjs +2 -1
  10. package/esm2020/core/http/services/loader.service.mjs +3 -3
  11. package/esm2020/draggable-items/draggable-items.component.mjs +3 -3
  12. package/esm2020/form/field-generator.component.mjs +3 -3
  13. package/esm2020/form/form.component.mjs +3 -3
  14. package/esm2020/form/internal-carusel.component.mjs +10 -6
  15. package/esm2020/form/internal-field-generator.component.mjs +3 -3
  16. package/esm2020/form/internal-form.component.mjs +3 -3
  17. package/esm2020/form/internal-menu.component.mjs +4 -6
  18. package/esm2020/form/internal-page.component.mjs +3 -4
  19. package/esm2020/image/image.component.mjs +3 -3
  20. package/esm2020/images-filmstrip/images-filmstrip.component.mjs +3 -3
  21. package/esm2020/link/link.component.mjs +9 -3
  22. package/esm2020/list/list-actions.component.mjs +1 -1
  23. package/esm2020/list/list-chooser.component.mjs +1 -1
  24. package/esm2020/list/list-sorting.component.mjs +1 -1
  25. package/esm2020/list/list-views.component.mjs +1 -1
  26. package/esm2020/list/list.component.mjs +22 -10
  27. package/esm2020/list/list.model.mjs +1 -1
  28. package/esm2020/menu/menu-item.component.mjs +3 -3
  29. package/esm2020/menu/menu.component.mjs +6 -3
  30. package/esm2020/menu/menu.model.mjs +2 -1
  31. package/esm2020/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +1 -1
  32. package/esm2020/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +25 -9
  33. package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +58 -26
  34. package/esm2020/profile-data-views-list/profile-data-views-list.model.mjs +1 -1
  35. package/esm2020/quantity-selector/quantity-selector.component.mjs +7 -3
  36. package/esm2020/query-builder/common/model/legacy.mjs +1 -1
  37. package/esm2020/query-builder/common/model/operator.mjs +72 -62
  38. package/esm2020/query-builder/common/services/output-query.service.mjs +5 -3
  39. package/esm2020/query-builder/common/services/query-structure.service.mjs +24 -1
  40. package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +3 -3
  41. package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +3 -3
  42. package/esm2020/query-builder/query-builder.module.mjs +14 -3
  43. package/esm2020/query-builder/query-builder.service.mjs +2 -2
  44. package/esm2020/remote-loader/remote-loader.service.mjs +16 -16
  45. package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +10 -3
  46. package/esm2020/select/select.component.mjs +3 -3
  47. package/esm2020/select-panel/select-panel.component.mjs +3 -5
  48. package/esm2020/signature/signature-dialog.component.mjs +2 -1
  49. package/esm2020/signature/signature.component.mjs +4 -4
  50. package/esm2020/skeleton-loader/public-api.mjs +2 -2
  51. package/esm2020/skeleton-loader/skeleton-loader.component.mjs +3 -3
  52. package/esm2020/smart-filters/common/model/operator.mjs +11 -4
  53. package/esm2020/smart-filters/common/model/type.mjs +1 -1
  54. package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +3 -3
  55. package/esm2020/smart-filters/text-filter/text-filter.component.mjs +3 -3
  56. package/esm2020/textbox/textbox.component.mjs +26 -6
  57. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +2 -2
  58. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -1
  59. package/fesm2015/pepperi-addons-ngx-lib-chips.mjs +7 -10
  60. package/fesm2015/pepperi-addons-ngx-lib-chips.mjs.map +1 -1
  61. package/fesm2015/pepperi-addons-ngx-lib-color.mjs +2 -2
  62. package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +1 -1
  63. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs +2 -2
  64. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -1
  65. package/fesm2015/pepperi-addons-ngx-lib-form.mjs +22 -21
  66. package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
  67. package/fesm2015/pepperi-addons-ngx-lib-image.mjs +2 -2
  68. package/fesm2015/pepperi-addons-ngx-lib-image.mjs.map +1 -1
  69. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +2 -2
  70. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -1
  71. package/fesm2015/pepperi-addons-ngx-lib-link.mjs +8 -2
  72. package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +1 -1
  73. package/fesm2015/pepperi-addons-ngx-lib-list.mjs +25 -13
  74. package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +1 -1
  75. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +8 -4
  76. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs.map +1 -1
  77. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +81 -33
  78. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
  79. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +7 -2
  80. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
  81. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +119 -70
  82. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
  83. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +16 -16
  84. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
  85. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +9 -2
  86. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
  87. package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs +2 -4
  88. package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -1
  89. package/fesm2015/pepperi-addons-ngx-lib-select.mjs +2 -2
  90. package/fesm2015/pepperi-addons-ngx-lib-select.mjs.map +1 -1
  91. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +5 -3
  92. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs.map +1 -1
  93. package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs +3 -3
  94. package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -1
  95. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +14 -7
  96. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
  97. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +26 -5
  98. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
  99. package/fesm2015/pepperi-addons-ngx-lib.mjs +547 -532
  100. package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
  101. package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs +2 -2
  102. package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -1
  103. package/fesm2020/pepperi-addons-ngx-lib-chips.mjs +7 -10
  104. package/fesm2020/pepperi-addons-ngx-lib-chips.mjs.map +1 -1
  105. package/fesm2020/pepperi-addons-ngx-lib-color.mjs +2 -2
  106. package/fesm2020/pepperi-addons-ngx-lib-color.mjs.map +1 -1
  107. package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs +2 -2
  108. package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -1
  109. package/fesm2020/pepperi-addons-ngx-lib-form.mjs +22 -21
  110. package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
  111. package/fesm2020/pepperi-addons-ngx-lib-image.mjs +2 -2
  112. package/fesm2020/pepperi-addons-ngx-lib-image.mjs.map +1 -1
  113. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs +2 -2
  114. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -1
  115. package/fesm2020/pepperi-addons-ngx-lib-link.mjs +8 -2
  116. package/fesm2020/pepperi-addons-ngx-lib-link.mjs.map +1 -1
  117. package/fesm2020/pepperi-addons-ngx-lib-list.mjs +25 -13
  118. package/fesm2020/pepperi-addons-ngx-lib-list.mjs.map +1 -1
  119. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs +8 -4
  120. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs.map +1 -1
  121. package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +81 -33
  122. package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
  123. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +6 -2
  124. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
  125. package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +115 -69
  126. package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
  127. package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +15 -15
  128. package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
  129. package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +9 -2
  130. package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
  131. package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs +2 -4
  132. package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -1
  133. package/fesm2020/pepperi-addons-ngx-lib-select.mjs +2 -2
  134. package/fesm2020/pepperi-addons-ngx-lib-select.mjs.map +1 -1
  135. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs +4 -3
  136. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs.map +1 -1
  137. package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs +3 -3
  138. package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -1
  139. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +14 -7
  140. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
  141. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +25 -5
  142. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
  143. package/fesm2020/pepperi-addons-ngx-lib.mjs +544 -529
  144. package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
  145. package/form/internal-carusel.component.d.ts +1 -0
  146. package/form/internal-menu.component.d.ts +1 -2
  147. package/link/link.component.d.ts +3 -1
  148. package/list/list.component.d.ts +1 -1
  149. package/list/list.model.d.ts +1 -2
  150. package/menu/menu.component.d.ts +2 -1
  151. package/menu/menu.model.d.ts +1 -0
  152. package/package.json +1 -1
  153. package/profile-data-views-list/profile-data-view/profile-data-view.component.d.ts +3 -3
  154. package/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.d.ts +5 -4
  155. package/profile-data-views-list/profile-data-views-list.component.d.ts +13 -10
  156. package/profile-data-views-list/profile-data-views-list.model.d.ts +8 -0
  157. package/query-builder/common/model/legacy.d.ts +2 -0
  158. package/query-builder/common/model/operator.d.ts +11 -1
  159. package/query-builder/common/services/query-structure.service.d.ts +1 -0
  160. package/query-builder/query-builder.module.d.ts +7 -3
  161. package/remote-loader/remote-loader.service.d.ts +1 -1
  162. package/rich-html-textarea/rich-html-textarea.component.d.ts +3 -1
  163. package/rich-html-textarea/rich-html-textarea.component.theme.scss +4 -2
  164. package/select-panel/select-panel.component.d.ts +1 -2
  165. package/signature/signature-dialog.component.d.ts +1 -1
  166. package/skeleton-loader/skeleton-loader.component.d.ts +3 -3
  167. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +1 -0
  168. package/smart-filters/common/model/operator.d.ts +1 -0
  169. package/smart-filters/common/model/type.d.ts +1 -1
  170. package/smart-filters/date-filter/date-filter.component.d.ts +1 -0
  171. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +1 -0
  172. package/smart-filters/number-filter/number-filter.component.d.ts +1 -0
  173. package/smart-filters/text-filter/text-filter.component.d.ts +1 -0
  174. package/src/assets/i18n/de.ngx-lib.json +4 -1
  175. package/src/assets/i18n/en.ngx-lib.json +7 -1
  176. package/src/core/style/abstracts/mixins.scss +73 -11
  177. package/src/core/style/abstracts/variables.scss +1 -1
  178. package/src/core/style/base/base.scss +5 -3
  179. package/src/core/style/base/typography.scss +2 -1
  180. package/src/core/style/components/button.scss +11 -0
  181. package/src/core/style/components/general.scss +2 -4
  182. package/textbox/textbox.component.d.ts +2 -0
  183. package/theming.scss +5 -1
  184. package/src/assets/images/sail-away.jpg +0 -0
  185. package/src/core/style/abstracts/AbstractsIntro.stories.mdx +0 -7
@@ -69,15 +69,18 @@ class ProfileDataViewsCardComponent {
69
69
  this.isDefault = false;
70
70
  this.dataViewEditClick = new EventEmitter();
71
71
  this.dataViewDeleteClick = new EventEmitter();
72
+ this.dataViewImportClick = new EventEmitter();
72
73
  this.menuItems = [];
73
74
  }
74
75
  loadMenuItems() {
75
76
  const removeKey = 'ACTIONS.REMOVE';
77
+ const importKey = 'ACTIONS.IMPORT';
76
78
  // Load translation before get the options in the children.
77
- this.translate.get([removeKey]).subscribe((res) => {
78
- this.menuItems = [
79
- { key: 'delete', text: this.translate.instant(res[removeKey]) }
80
- ];
79
+ this.translate.get([removeKey, importKey]).subscribe((res) => {
80
+ if (!this.isDefault) {
81
+ this.menuItems.push({ key: 'delete', text: this.translate.instant(res[removeKey]) });
82
+ }
83
+ this.menuItems.push({ key: 'import', text: this.translate.instant(res[importKey]) });
81
84
  });
82
85
  }
83
86
  ngOnInit() {
@@ -88,20 +91,31 @@ class ProfileDataViewsCardComponent {
88
91
  if (action.source.key === 'delete') {
89
92
  this.onDataViewDeleteClicked({ dataViewId: this.dataViews[0].dataViewId });
90
93
  }
94
+ else if (action.source.key === 'import') {
95
+ this.dataViewImportClick.emit({ profileId: this.profileId, dataViewId: this.dataViews[0].dataViewId });
96
+ }
91
97
  }
92
98
  }
93
99
  onDataViewEditClicked(event) {
94
- this.dataViewEditClick.emit(event);
100
+ const newEvent = {
101
+ profileId: this.profileId,
102
+ dataViewId: event.dataViewId
103
+ };
104
+ this.dataViewEditClick.emit(newEvent);
95
105
  }
96
106
  onDataViewDeleteClicked(event) {
97
- this.dataViewDeleteClick.emit(event);
107
+ const newEvent = {
108
+ profileId: this.profileId,
109
+ dataViewId: event.dataViewId
110
+ };
111
+ this.dataViewDeleteClick.emit(newEvent);
98
112
  }
99
113
  }
100
114
  ProfileDataViewsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ProfileDataViewsCardComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
101
- ProfileDataViewsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ProfileDataViewsCardComponent, selector: "pep-profile-data-views-card", inputs: { profileId: "profileId", title: "title", dataViews: "dataViews", configurationPerScreenSize: "configurationPerScreenSize", isDefault: "isDefault" }, outputs: { dataViewEditClick: "dataViewEditClick", dataViewDeleteClick: "dataViewDeleteClick" }, ngImport: i0, template: "<div class=\"profile-data-views-card-container\">\n <div class=\"card-top-bar pep-border-bottom\">\n <div *ngIf=\"title?.length > 0\" class=\"title ellipsis\"\n [title]=\"title + ' ' + (isDefault ? ('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' | translate) : '')\">\n <span class=\"title-md\">{{title}}&nbsp;</span>\n <span *ngIf=\"isDefault\" class=\"color-dimmed\">{{('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' |\n translate)}}&nbsp;\n </span>\n </div>\n <pep-menu *ngIf=\"!configurationPerScreenSize && !isDefault\" sizeType=\"sm\" [items]=\"menuItems\" (menuItemClick)=\"onMenuItemClicked($event)\">\n </pep-menu>\n </div>\n\n <pep-profile-data-view *ngFor=\"let dataView of dataViews\" [dataViewId]=\"dataView.dataViewId\"\n [title]=\"configurationPerScreenSize ? dataView.viewType : ''\" [fields]=\"dataView.fields\" [canDelete]=\"!(isDefault && dataView.viewType === 'Tablet')\"\n (editClick)=\"onDataViewEditClicked($event)\" (deleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-view>\n</div>", styles: [".profile-data-views-card-container{padding:var(--pep-spacing-lg, 1rem);border-radius:var(--pep-border-radius-md, .25rem);width:320px;max-width:320px}.profile-data-views-card-container .card-top-bar{height:var(--pep-top-bar-field-height, 2.5rem);margin-bottom:var(--pep-spacing-md, .75rem);display:flex;justify-content:space-between}.profile-data-views-card-container .card-top-bar .title{display:block;height:calc(var(--pep-top-bar-field-height, 2.5rem) - var(--pep-spacing-sm, .5rem));align-self:center}\n", ".profile-data-views-card-container{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%))}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PepMenuComponent, selector: "pep-menu", inputs: ["text", "iconName", "type", "styleType", "sizeType", "classNames", "xPosition", "hideOnEmptyItems", "items", "selectedItem", "disabled"], outputs: ["stateChange", "menuItemClick", "menuClick"] }, { kind: "component", type: ProfileDataViewComponent, selector: "pep-profile-data-view", inputs: ["dataViewId", "title", "fields", "canDelete"], outputs: ["editClick", "deleteClick"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
115
+ ProfileDataViewsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ProfileDataViewsCardComponent, selector: "pep-profile-data-views-card", inputs: { profileId: "profileId", title: "title", dataViews: "dataViews", configurationPerScreenSize: "configurationPerScreenSize", isDefault: "isDefault" }, outputs: { dataViewEditClick: "dataViewEditClick", dataViewDeleteClick: "dataViewDeleteClick", dataViewImportClick: "dataViewImportClick" }, ngImport: i0, template: "<div class=\"profile-data-views-card-container\">\n <div class=\"card-top-bar pep-border-bottom\">\n <div *ngIf=\"title?.length > 0\" class=\"title ellipsis\"\n [title]=\"title + ' ' + (isDefault ? ('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' | translate) : '')\">\n <span class=\"title-md\">{{title}}&nbsp;</span>\n <span *ngIf=\"isDefault\" class=\"color-dimmed\">{{('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' |\n translate)}}&nbsp;\n </span>\n </div>\n <pep-menu *ngIf=\"!configurationPerScreenSize\" sizeType=\"sm\" [items]=\"menuItems\" (menuItemClick)=\"onMenuItemClicked($event)\">\n </pep-menu>\n </div>\n\n <pep-profile-data-view *ngFor=\"let dataView of dataViews\" [dataViewId]=\"dataView.dataViewId\"\n [title]=\"configurationPerScreenSize ? dataView.viewType : ''\" [fields]=\"dataView.fields\" [canDelete]=\"!(isDefault && dataView.viewType === 'Tablet')\"\n (editClick)=\"onDataViewEditClicked($event)\" (deleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-view>\n</div>", styles: [".profile-data-views-card-container{padding:var(--pep-spacing-lg, 1rem);border-radius:var(--pep-border-radius-md, .25rem);width:320px;max-width:320px}.profile-data-views-card-container .card-top-bar{height:var(--pep-top-bar-field-height, 2.5rem);margin-bottom:var(--pep-spacing-md, .75rem);display:flex;justify-content:space-between}.profile-data-views-card-container .card-top-bar .title{display:block;height:calc(var(--pep-top-bar-field-height, 2.5rem) - var(--pep-spacing-sm, .5rem));align-self:center}\n", ".profile-data-views-card-container{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%))}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PepMenuComponent, selector: "pep-menu", inputs: ["text", "iconName", "iconPosition", "type", "styleType", "sizeType", "classNames", "xPosition", "hideOnEmptyItems", "items", "selectedItem", "disabled"], outputs: ["stateChange", "menuItemClick", "menuClick"] }, { kind: "component", type: ProfileDataViewComponent, selector: "pep-profile-data-view", inputs: ["dataViewId", "title", "fields", "canDelete"], outputs: ["editClick", "deleteClick"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
102
116
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ProfileDataViewsCardComponent, decorators: [{
103
117
  type: Component,
104
- args: [{ selector: 'pep-profile-data-views-card', template: "<div class=\"profile-data-views-card-container\">\n <div class=\"card-top-bar pep-border-bottom\">\n <div *ngIf=\"title?.length > 0\" class=\"title ellipsis\"\n [title]=\"title + ' ' + (isDefault ? ('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' | translate) : '')\">\n <span class=\"title-md\">{{title}}&nbsp;</span>\n <span *ngIf=\"isDefault\" class=\"color-dimmed\">{{('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' |\n translate)}}&nbsp;\n </span>\n </div>\n <pep-menu *ngIf=\"!configurationPerScreenSize && !isDefault\" sizeType=\"sm\" [items]=\"menuItems\" (menuItemClick)=\"onMenuItemClicked($event)\">\n </pep-menu>\n </div>\n\n <pep-profile-data-view *ngFor=\"let dataView of dataViews\" [dataViewId]=\"dataView.dataViewId\"\n [title]=\"configurationPerScreenSize ? dataView.viewType : ''\" [fields]=\"dataView.fields\" [canDelete]=\"!(isDefault && dataView.viewType === 'Tablet')\"\n (editClick)=\"onDataViewEditClicked($event)\" (deleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-view>\n</div>", styles: [".profile-data-views-card-container{padding:var(--pep-spacing-lg, 1rem);border-radius:var(--pep-border-radius-md, .25rem);width:320px;max-width:320px}.profile-data-views-card-container .card-top-bar{height:var(--pep-top-bar-field-height, 2.5rem);margin-bottom:var(--pep-spacing-md, .75rem);display:flex;justify-content:space-between}.profile-data-views-card-container .card-top-bar .title{display:block;height:calc(var(--pep-top-bar-field-height, 2.5rem) - var(--pep-spacing-sm, .5rem));align-self:center}\n", ".profile-data-views-card-container{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%))}\n"] }]
118
+ args: [{ selector: 'pep-profile-data-views-card', template: "<div class=\"profile-data-views-card-container\">\n <div class=\"card-top-bar pep-border-bottom\">\n <div *ngIf=\"title?.length > 0\" class=\"title ellipsis\"\n [title]=\"title + ' ' + (isDefault ? ('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' | translate) : '')\">\n <span class=\"title-md\">{{title}}&nbsp;</span>\n <span *ngIf=\"isDefault\" class=\"color-dimmed\">{{('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' |\n translate)}}&nbsp;\n </span>\n </div>\n <pep-menu *ngIf=\"!configurationPerScreenSize\" sizeType=\"sm\" [items]=\"menuItems\" (menuItemClick)=\"onMenuItemClicked($event)\">\n </pep-menu>\n </div>\n\n <pep-profile-data-view *ngFor=\"let dataView of dataViews\" [dataViewId]=\"dataView.dataViewId\"\n [title]=\"configurationPerScreenSize ? dataView.viewType : ''\" [fields]=\"dataView.fields\" [canDelete]=\"!(isDefault && dataView.viewType === 'Tablet')\"\n (editClick)=\"onDataViewEditClicked($event)\" (deleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-view>\n</div>", styles: [".profile-data-views-card-container{padding:var(--pep-spacing-lg, 1rem);border-radius:var(--pep-border-radius-md, .25rem);width:320px;max-width:320px}.profile-data-views-card-container .card-top-bar{height:var(--pep-top-bar-field-height, 2.5rem);margin-bottom:var(--pep-spacing-md, .75rem);display:flex;justify-content:space-between}.profile-data-views-card-container .card-top-bar .title{display:block;height:calc(var(--pep-top-bar-field-height, 2.5rem) - var(--pep-spacing-sm, .5rem));align-self:center}\n", ".profile-data-views-card-container{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%))}\n"] }]
105
119
  }], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { profileId: [{
106
120
  type: Input
107
121
  }], title: [{
@@ -116,6 +130,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
116
130
  type: Output
117
131
  }], dataViewDeleteClick: [{
118
132
  type: Output
133
+ }], dataViewImportClick: [{
134
+ type: Output
119
135
  }] } });
120
136
 
121
137
  class ProfileDataViewsListComponent {
@@ -125,55 +141,69 @@ class ProfileDataViewsListComponent {
125
141
  this._availableProfiles = [];
126
142
  this._profileDataViewsList = [];
127
143
  this.configurationPerScreenSize = false;
128
- this.saveNewProfileClick = new EventEmitter();
144
+ this.saveProfileClick = new EventEmitter();
129
145
  this.dataViewEditClick = new EventEmitter();
130
146
  this.dataViewDeleteClick = new EventEmitter();
131
- this.selectedNewProfileId = '';
147
+ this.selectedProfileId = '';
132
148
  this.nonExistingProfiles = [];
149
+ this.selectedCopyFromProfileId = '';
133
150
  }
134
151
  set availableProfiles(value) {
135
152
  this._availableProfiles = value;
136
- this.setNonExistingProfiles();
153
+ this.setProfilesOptions();
137
154
  }
138
155
  get availableProfiles() {
139
156
  return this._availableProfiles;
140
157
  }
141
158
  set profileDataViewsList(value) {
142
159
  this._profileDataViewsList = value;
143
- this.setNonExistingProfiles();
160
+ this.setProfilesOptions();
144
161
  }
145
162
  get profileDataViewsList() {
146
163
  return this._profileDataViewsList;
147
164
  }
148
- // Set the profiles that not exist already in profileDataViewsList.
149
- setNonExistingProfiles() {
165
+ // existingProfiles: Array<IPepProfile> = [];
166
+ setProfilesOptions() {
167
+ // Set the profiles that not exist already in profileDataViewsList.
150
168
  this.nonExistingProfiles = this.availableProfiles.filter(ap => this.profileDataViewsList.findIndex(pdv => pdv.profileId === ap.id) === -1);
169
+ // // Set the existing profiles.
170
+ // this.existingProfiles = this.availableProfiles.filter(ap => this.profileDataViewsList.findIndex(pdv => pdv.profileId === ap.id) > -1);
151
171
  }
152
172
  ngOnInit() {
153
173
  //
154
174
  }
155
- setSelectedNewProfileId(value) {
156
- this.selectedNewProfileId = value;
175
+ setSelectedProfileId(value) {
176
+ this.selectedProfileId = value;
177
+ }
178
+ setCopyFromProfileId(value) {
179
+ this.selectedCopyFromProfileId = value;
157
180
  }
158
181
  closeDialog() {
159
182
  var _a;
160
183
  (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.close();
161
184
  }
162
- saveNewProfile() {
163
- // Add the new profile
164
- this.saveNewProfileClick.emit(this.selectedNewProfileId);
185
+ saveProfile() {
186
+ // Save the profile (can be new or import to existing).
187
+ this.saveProfileClick.emit({
188
+ profileId: this.selectedProfileId,
189
+ copyFromProfileId: this.selectedCopyFromProfileId
190
+ });
165
191
  this.closeDialog();
166
192
  }
167
- onAddProfileClicked(event) {
193
+ onAddProfileClicked() {
168
194
  // Raise select profile dialog
169
- this.selectedNewProfileId = '';
170
- const options = [];
171
- options.push(...(this.nonExistingProfiles.map((opt) => {
172
- return {
173
- key: opt.id, value: opt.name
174
- };
175
- })));
176
- this.dialogRef = this.dialogService.openDialog(this.selectProfileTemplate, { options });
195
+ this.selectedProfileId = '';
196
+ this.selectedCopyFromProfileId = '';
197
+ const options = this.nonExistingProfiles.map((opt) => {
198
+ return { key: opt.id, value: opt.name };
199
+ });
200
+ const copyFromOptions = this.profileDataViewsList.map((opt) => {
201
+ return { key: opt.profileId, value: opt.title };
202
+ });
203
+ this.dialogRef = this.dialogService.openDialog(this.addNewProfileTemplate, {
204
+ options,
205
+ copyFromOptions
206
+ });
177
207
  }
178
208
  onDataViewEditClicked(event) {
179
209
  this.dataViewEditClick.emit(event);
@@ -181,12 +211,27 @@ class ProfileDataViewsListComponent {
181
211
  onDataViewDeleteClicked(event) {
182
212
  this.dataViewDeleteClick.emit(event);
183
213
  }
214
+ onDataViewImportClicked(event) {
215
+ // Raise import profile dialog
216
+ const profile = this.profileDataViewsList.find(p => p.profileId === event.profileId);
217
+ const profileTitle = profile.title;
218
+ this.selectedProfileId = event.profileId;
219
+ this.selectedCopyFromProfileId = '';
220
+ // Add to the copyFromOptions all the existing except the clicked profile.
221
+ const copyFromOptions = this.profileDataViewsList.filter(p => p.profileId !== event.profileId).map((opt) => {
222
+ return { key: opt.profileId, value: opt.title };
223
+ });
224
+ this.dialogRef = this.dialogService.openDialog(this.importProfileTemplate, {
225
+ profileTitle,
226
+ copyFromOptions,
227
+ });
228
+ }
184
229
  }
185
230
  ProfileDataViewsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ProfileDataViewsListComponent, deps: [{ token: i1$1.PepDialogService }], target: i0.ɵɵFactoryTarget.Component });
186
- ProfileDataViewsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ProfileDataViewsListComponent, selector: "pep-profile-data-views-list", inputs: { defaultProfileId: "defaultProfileId", availableProfiles: "availableProfiles", profileDataViewsList: "profileDataViewsList", configurationPerScreenSize: "configurationPerScreenSize" }, outputs: { saveNewProfileClick: "saveNewProfileClick", dataViewEditClick: "dataViewEditClick", dataViewDeleteClick: "dataViewDeleteClick" }, viewQueries: [{ propertyName: "selectProfileTemplate", first: true, predicate: ["selectProfileTemplate"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<div class=\"profile-data-views-list-container\">\n <pep-profile-data-views-card *ngFor=\"let profileDataViews of profileDataViewsList\"\n [configurationPerScreenSize]=\"configurationPerScreenSize\" [title]=\"profileDataViews.title\"\n [profileId]=\"profileDataViews.profileId\" [dataViews]=\"profileDataViews.dataViews\"\n [isDefault]=\"profileDataViews.profileId === defaultProfileId\"\n (dataViewEditClick)=\"onDataViewEditClicked($event)\" (dataViewDeleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-views-card>\n\n <pep-button *ngIf=\"nonExistingProfiles?.length > 0\" [value]=\"'PROFILE_DATA_VIEWS_LIST.ADD_PROFILE' | translate\"\n iconName=\"number_plus\" sizeType=\"lg\" (buttonClick)=\"onAddProfileClicked($event)\"></pep-button>\n</div>\n\n<ng-template #selectProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE_DIALOG_TITLE' | translate\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE' | translate\" [options]=\"data.options\"\n [emptyOption]=\"false\" (valueChange)=\"setSelectedNewProfileId($event)\">\n </pep-select>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveNewProfile()\"\n [disabled]=\"selectedNewProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>", styles: [".profile-data-views-list-container{display:flex;align-items:flex-start;gap:1rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i1$1.PepDialogComponent, selector: "pep-dialog", inputs: ["title", "showClose", "showHeader", "showFooter"], outputs: ["close"] }, { kind: "component", type: i4.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "placeholder", "placeholderWhenDisabled", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle", "typeaheadDebounceInterval", "addValueToOptionsIfNotExist"], outputs: ["valueChange"] }, { kind: "component", type: ProfileDataViewsCardComponent, selector: "pep-profile-data-views-card", inputs: ["profileId", "title", "dataViews", "configurationPerScreenSize", "isDefault"], outputs: ["dataViewEditClick", "dataViewDeleteClick"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
231
+ ProfileDataViewsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ProfileDataViewsListComponent, selector: "pep-profile-data-views-list", inputs: { defaultProfileId: "defaultProfileId", availableProfiles: "availableProfiles", profileDataViewsList: "profileDataViewsList", configurationPerScreenSize: "configurationPerScreenSize" }, outputs: { saveProfileClick: "saveProfileClick", dataViewEditClick: "dataViewEditClick", dataViewDeleteClick: "dataViewDeleteClick" }, viewQueries: [{ propertyName: "addNewProfileTemplate", first: true, predicate: ["addNewProfileTemplate"], descendants: true, read: TemplateRef }, { propertyName: "importProfileTemplate", first: true, predicate: ["importProfileTemplate"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<div class=\"profile-data-views-list-container\">\n <pep-profile-data-views-card *ngFor=\"let profileDataViews of profileDataViewsList\"\n [configurationPerScreenSize]=\"configurationPerScreenSize\" [title]=\"profileDataViews.title\"\n [profileId]=\"profileDataViews.profileId\" [dataViews]=\"profileDataViews.dataViews\"\n [isDefault]=\"profileDataViews.profileId === defaultProfileId\"\n (dataViewEditClick)=\"onDataViewEditClicked($event)\" (dataViewDeleteClick)=\"onDataViewDeleteClicked($event)\"\n (dataViewImportClick)=\"onDataViewImportClicked($event)\">\n </pep-profile-data-views-card>\n\n <pep-button *ngIf=\"nonExistingProfiles?.length > 0\" [value]=\"'PROFILE_DATA_VIEWS_LIST.ADD_PROFILE' | translate\"\n iconName=\"number_plus\" sizeType=\"lg\" (buttonClick)=\"onAddProfileClicked()\"></pep-button>\n</div>\n\n<ng-template #addNewProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE_DIALOG_TITLE' | translate\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE' | translate\" [options]=\"data.options\"\n [emptyOption]=\"false\" (valueChange)=\"setSelectedProfileId($event)\">\n </pep-select>\n\n <div *ngIf=\"data.copyFromOptions?.length\">\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_FROM_PROFILE' | translate\" [options]=\"data.copyFromOptions\"\n [emptyOption]=\"true\" (valueChange)=\"setCopyFromProfileId($event)\">\n </pep-select>\n </div>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveProfile()\"\n [disabled]=\"selectedProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>\n\n<ng-template #importProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_PROFILE_DIALOG_TITLE' | translate: { profileTitle: data.profileTitle }\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_FROM_PROFILE' | translate\" [options]=\"data.copyFromOptions\"\n [emptyOption]=\"false\" (valueChange)=\"setCopyFromProfileId($event)\">\n </pep-select>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveProfile()\"\n [disabled]=\"selectedProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>", styles: [".profile-data-views-list-container{display:flex;align-items:flex-start;gap:1rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i1$1.PepDialogComponent, selector: "pep-dialog", inputs: ["title", "showClose", "showHeader", "showFooter"], outputs: ["close"] }, { kind: "component", type: i4.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "placeholder", "placeholderWhenDisabled", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle", "typeaheadDebounceInterval", "addValueToOptionsIfNotExist"], outputs: ["valueChange"] }, { kind: "component", type: ProfileDataViewsCardComponent, selector: "pep-profile-data-views-card", inputs: ["profileId", "title", "dataViews", "configurationPerScreenSize", "isDefault"], outputs: ["dataViewEditClick", "dataViewDeleteClick", "dataViewImportClick"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
187
232
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ProfileDataViewsListComponent, decorators: [{
188
233
  type: Component,
189
- args: [{ selector: 'pep-profile-data-views-list', template: "<div class=\"profile-data-views-list-container\">\n <pep-profile-data-views-card *ngFor=\"let profileDataViews of profileDataViewsList\"\n [configurationPerScreenSize]=\"configurationPerScreenSize\" [title]=\"profileDataViews.title\"\n [profileId]=\"profileDataViews.profileId\" [dataViews]=\"profileDataViews.dataViews\"\n [isDefault]=\"profileDataViews.profileId === defaultProfileId\"\n (dataViewEditClick)=\"onDataViewEditClicked($event)\" (dataViewDeleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-views-card>\n\n <pep-button *ngIf=\"nonExistingProfiles?.length > 0\" [value]=\"'PROFILE_DATA_VIEWS_LIST.ADD_PROFILE' | translate\"\n iconName=\"number_plus\" sizeType=\"lg\" (buttonClick)=\"onAddProfileClicked($event)\"></pep-button>\n</div>\n\n<ng-template #selectProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE_DIALOG_TITLE' | translate\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE' | translate\" [options]=\"data.options\"\n [emptyOption]=\"false\" (valueChange)=\"setSelectedNewProfileId($event)\">\n </pep-select>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveNewProfile()\"\n [disabled]=\"selectedNewProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>", styles: [".profile-data-views-list-container{display:flex;align-items:flex-start;gap:1rem}\n"] }]
234
+ args: [{ selector: 'pep-profile-data-views-list', template: "<div class=\"profile-data-views-list-container\">\n <pep-profile-data-views-card *ngFor=\"let profileDataViews of profileDataViewsList\"\n [configurationPerScreenSize]=\"configurationPerScreenSize\" [title]=\"profileDataViews.title\"\n [profileId]=\"profileDataViews.profileId\" [dataViews]=\"profileDataViews.dataViews\"\n [isDefault]=\"profileDataViews.profileId === defaultProfileId\"\n (dataViewEditClick)=\"onDataViewEditClicked($event)\" (dataViewDeleteClick)=\"onDataViewDeleteClicked($event)\"\n (dataViewImportClick)=\"onDataViewImportClicked($event)\">\n </pep-profile-data-views-card>\n\n <pep-button *ngIf=\"nonExistingProfiles?.length > 0\" [value]=\"'PROFILE_DATA_VIEWS_LIST.ADD_PROFILE' | translate\"\n iconName=\"number_plus\" sizeType=\"lg\" (buttonClick)=\"onAddProfileClicked()\"></pep-button>\n</div>\n\n<ng-template #addNewProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE_DIALOG_TITLE' | translate\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE' | translate\" [options]=\"data.options\"\n [emptyOption]=\"false\" (valueChange)=\"setSelectedProfileId($event)\">\n </pep-select>\n\n <div *ngIf=\"data.copyFromOptions?.length\">\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_FROM_PROFILE' | translate\" [options]=\"data.copyFromOptions\"\n [emptyOption]=\"true\" (valueChange)=\"setCopyFromProfileId($event)\">\n </pep-select>\n </div>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveProfile()\"\n [disabled]=\"selectedProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>\n\n<ng-template #importProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_PROFILE_DIALOG_TITLE' | translate: { profileTitle: data.profileTitle }\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_FROM_PROFILE' | translate\" [options]=\"data.copyFromOptions\"\n [emptyOption]=\"false\" (valueChange)=\"setCopyFromProfileId($event)\">\n </pep-select>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveProfile()\"\n [disabled]=\"selectedProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>", styles: [".profile-data-views-list-container{display:flex;align-items:flex-start;gap:1rem}\n"] }]
190
235
  }], ctorParameters: function () { return [{ type: i1$1.PepDialogService }]; }, propDecorators: { defaultProfileId: [{
191
236
  type: Input
192
237
  }], availableProfiles: [{
@@ -195,15 +240,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
195
240
  type: Input
196
241
  }], configurationPerScreenSize: [{
197
242
  type: Input
198
- }], saveNewProfileClick: [{
243
+ }], saveProfileClick: [{
199
244
  type: Output
200
245
  }], dataViewEditClick: [{
201
246
  type: Output
202
247
  }], dataViewDeleteClick: [{
203
248
  type: Output
204
- }], selectProfileTemplate: [{
249
+ }], addNewProfileTemplate: [{
250
+ type: ViewChild,
251
+ args: ['addNewProfileTemplate', { read: TemplateRef }]
252
+ }], importProfileTemplate: [{
205
253
  type: ViewChild,
206
- args: ['selectProfileTemplate', { read: TemplateRef }]
254
+ args: ['importProfileTemplate', { read: TemplateRef }]
207
255
  }] } });
208
256
 
209
257
  class PepProfileDataViewsListModule {
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-profile-data-views-list.mjs","sources":["../../../projects/ngx-lib/profile-data-views-list/profile-data-view/profile-data-view.component.ts","../../../projects/ngx-lib/profile-data-views-list/profile-data-view/profile-data-view.component.html","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.ts","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.html","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-list.component.ts","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-list.component.html","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-list.module.ts","../../../projects/ngx-lib/profile-data-views-list/public-api.ts","../../../projects/ngx-lib/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { IPepButtonClickEvent } from '@pepperi-addons/ngx-lib/button';\nimport { IPepProfileDataViewClickEvent } from '../profile-data-views-list.model';\n\n@Component({\n selector: 'pep-profile-data-view',\n templateUrl: './profile-data-view.component.html',\n styleUrls: ['./profile-data-view.component.scss', './profile-data-view.component.theme.scss']\n})\nexport class ProfileDataViewComponent implements OnInit {\n @Input() dataViewId: string;\n @Input() title: string;\n @Input() fields: string[];\n @Input() canDelete = true;\n\n @Output() editClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n @Output() deleteClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n\n constructor() {\n //\n }\n\n ngOnInit() {\n //\n }\n\n onEditClicked(event: IPepButtonClickEvent): void {\n this.editClick.emit({\n dataViewId: this.dataViewId\n });\n }\n\n onDeleteClicked(event: IPepButtonClickEvent): void {\n this.deleteClick.emit({\n dataViewId: this.dataViewId\n });\n }\n}\n","<div *ngIf=\"title?.length > 0\" class=\"data-view-title-container\">\n <div class=\"title ellipsis\" [title]=\"title\">\n <span class=\"title-md\">{{title}}</span>\n </div>\n <pep-button *ngIf=\"canDelete\" class=\"delete-button\" sizeType=\"xs\" (buttonClick)=\"onDeleteClicked($event)\"\n [value]=\"'ACTIONS.REMOVE' | translate\">\n </pep-button>\n</div>\n<div class=\"data-view-container\">\n <div class=\"fields-container\">\n <span class=\"color-caution body-xs ellipsis data-view-field\" *ngIf=\"fields === null || fields.length === 0\">\n {{('PROFILE_DATA_VIEWS_LIST.NO_FIELDS_ASSIGNED' | translate)}}</span>\n <span class=\"color-dimmed body-xs ellipsis data-view-field\" *ngFor=\"let field of fields\" [title]=\"field\">{{field}}</span>\n </div>\n <pep-button class=\"edit-button\" iconName=\"system_edit\" sizeType=\"xs\" (buttonClick)=\"onEditClicked($event)\">\n </pep-button>\n</div>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { BaseDataView, DataViewType } from '@pepperi-addons/papi-sdk';\nimport { IPepProfileDataView, IPepProfileDataViewClickEvent } from '../profile-data-views-list.model';\nimport { IPepMenuItemClickEvent, PepMenuItem } from '@pepperi-addons/ngx-lib/menu';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Component({\n selector: 'pep-profile-data-views-card',\n templateUrl: './profile-data-views-card.component.html',\n styleUrls: ['./profile-data-views-card.component.scss', './profile-data-views-card.component.theme.scss']\n})\nexport class ProfileDataViewsCardComponent implements OnInit {\n @Input() profileId = '';\n @Input() title = '';\n @Input() dataViews: IPepProfileDataView[] = [];\n @Input() configurationPerScreenSize = false;\n @Input() isDefault = false;\n\n @Output() dataViewEditClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n @Output() dataViewDeleteClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n\n menuItems: Array<PepMenuItem> = [];\n\n constructor(private translate: TranslateService) { }\n\n private loadMenuItems(): void {\n const removeKey = 'ACTIONS.REMOVE';\n // Load translation before get the options in the children.\n this.translate.get([removeKey]).subscribe((res) => {\n this.menuItems = [\n { key: 'delete', text: this.translate.instant(res[removeKey]) }\n ];\n });\n }\n\n ngOnInit() {\n this.loadMenuItems();\n }\n\n onMenuItemClicked(action: IPepMenuItemClickEvent) {\n if (this.dataViews.length === 1) {\n if (action.source.key === 'delete') {\n this.onDataViewDeleteClicked({ dataViewId: this.dataViews[0].dataViewId });\n }\n }\n\n }\n\n onDataViewEditClicked(event: IPepProfileDataViewClickEvent): void {\n this.dataViewEditClick.emit(event);\n }\n\n onDataViewDeleteClicked(event: IPepProfileDataViewClickEvent): void {\n this.dataViewDeleteClick.emit(event);\n }\n}\n","<div class=\"profile-data-views-card-container\">\n <div class=\"card-top-bar pep-border-bottom\">\n <div *ngIf=\"title?.length > 0\" class=\"title ellipsis\"\n [title]=\"title + ' ' + (isDefault ? ('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' | translate) : '')\">\n <span class=\"title-md\">{{title}}&nbsp;</span>\n <span *ngIf=\"isDefault\" class=\"color-dimmed\">{{('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' |\n translate)}}&nbsp;\n </span>\n </div>\n <pep-menu *ngIf=\"!configurationPerScreenSize && !isDefault\" sizeType=\"sm\" [items]=\"menuItems\" (menuItemClick)=\"onMenuItemClicked($event)\">\n </pep-menu>\n </div>\n\n <pep-profile-data-view *ngFor=\"let dataView of dataViews\" [dataViewId]=\"dataView.dataViewId\"\n [title]=\"configurationPerScreenSize ? dataView.viewType : ''\" [fields]=\"dataView.fields\" [canDelete]=\"!(isDefault && dataView.viewType === 'Tablet')\"\n (editClick)=\"onDataViewEditClicked($event)\" (deleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-view>\n</div>","import { Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { BaseDataView, DataViewType } from '@pepperi-addons/papi-sdk';\nimport { IPepButtonClickEvent } from '@pepperi-addons/ngx-lib/button';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\nimport { IPepOption } from '@pepperi-addons/ngx-lib';\nimport { IPepProfile, IPepProfileDataViewClickEvent, IPepProfileDataViewsCard } from './profile-data-views-list.model';\n\n@Component({\n selector: 'pep-profile-data-views-list',\n templateUrl: './profile-data-views-list.component.html',\n styleUrls: ['./profile-data-views-list.component.scss']\n})\nexport class ProfileDataViewsListComponent implements OnInit {\n @Input() defaultProfileId = '';\n\n private _availableProfiles: Array<IPepProfile> = [];\n @Input()\n set availableProfiles(value: Array<IPepProfile>) {\n this._availableProfiles = value;\n this.setNonExistingProfiles();\n }\n get availableProfiles(): Array<IPepProfile> {\n return this._availableProfiles;\n }\n\n private _profileDataViewsList: Array<IPepProfileDataViewsCard> = [];\n @Input()\n set profileDataViewsList(value: Array<IPepProfileDataViewsCard>) {\n this._profileDataViewsList = value;\n this.setNonExistingProfiles();\n }\n get profileDataViewsList(): Array<IPepProfileDataViewsCard> {\n return this._profileDataViewsList;\n }\n\n @Input() configurationPerScreenSize = false;\n\n @Output() saveNewProfileClick: EventEmitter<string> = new EventEmitter<string>();\n @Output() dataViewEditClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n @Output() dataViewDeleteClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n\n @ViewChild('selectProfileTemplate', { read: TemplateRef }) selectProfileTemplate: TemplateRef<any>;\n\n dialogRef: MatDialogRef<any>;\n selectedNewProfileId = '';\n nonExistingProfiles: Array<IPepProfile> = [];\n\n // Set the profiles that not exist already in profileDataViewsList.\n private setNonExistingProfiles() {\n this.nonExistingProfiles = this.availableProfiles.filter(ap => this.profileDataViewsList.findIndex(pdv => pdv.profileId === ap.id) === -1);\n }\n\n constructor(\n private dialogService: PepDialogService\n ) { }\n\n ngOnInit() {\n //\n }\n\n setSelectedNewProfileId(value: string) {\n this.selectedNewProfileId = value;\n }\n\n closeDialog(): void {\n this.dialogRef?.close();\n }\n\n saveNewProfile() {\n // Add the new profile\n this.saveNewProfileClick.emit(this.selectedNewProfileId);\n this.closeDialog();\n }\n\n onAddProfileClicked(event: IPepButtonClickEvent) {\n // Raise select profile dialog\n this.selectedNewProfileId = '';\n const options: Array<IPepOption> = [];\n options.push(...(this.nonExistingProfiles.map((opt) => {\n return {\n key: opt.id, value: opt.name\n };\n })));\n this.dialogRef = this.dialogService.openDialog(this.selectProfileTemplate, { options });\n }\n\n onDataViewEditClicked(event: IPepProfileDataViewClickEvent): void {\n this.dataViewEditClick.emit(event);\n }\n\n onDataViewDeleteClicked(event: IPepProfileDataViewClickEvent): void {\n this.dataViewDeleteClick.emit(event);\n }\n}\n","<div class=\"profile-data-views-list-container\">\n <pep-profile-data-views-card *ngFor=\"let profileDataViews of profileDataViewsList\"\n [configurationPerScreenSize]=\"configurationPerScreenSize\" [title]=\"profileDataViews.title\"\n [profileId]=\"profileDataViews.profileId\" [dataViews]=\"profileDataViews.dataViews\"\n [isDefault]=\"profileDataViews.profileId === defaultProfileId\"\n (dataViewEditClick)=\"onDataViewEditClicked($event)\" (dataViewDeleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-views-card>\n\n <pep-button *ngIf=\"nonExistingProfiles?.length > 0\" [value]=\"'PROFILE_DATA_VIEWS_LIST.ADD_PROFILE' | translate\"\n iconName=\"number_plus\" sizeType=\"lg\" (buttonClick)=\"onAddProfileClicked($event)\"></pep-button>\n</div>\n\n<ng-template #selectProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE_DIALOG_TITLE' | translate\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE' | translate\" [options]=\"data.options\"\n [emptyOption]=\"false\" (valueChange)=\"setSelectedNewProfileId($event)\">\n </pep-select>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveNewProfile()\"\n [disabled]=\"selectedNewProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatMenuModule } from '@angular/material/menu';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepButtonModule } from '@pepperi-addons/ngx-lib/button';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepSelectModule } from '@pepperi-addons/ngx-lib/select';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport { PepTopBarModule } from '@pepperi-addons/ngx-lib/top-bar';\n\nimport { ProfileDataViewsListComponent } from './profile-data-views-list.component';\nimport { ProfileDataViewsCardComponent } from './profile-data-views-card/profile-data-views-card.component';\nimport { ProfileDataViewComponent } from './profile-data-view/profile-data-view.component';\n\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemMenu,\n} from '@pepperi-addons/ngx-lib/icon';\n\n@NgModule({\n declarations: [\n ProfileDataViewsListComponent,\n ProfileDataViewsCardComponent,\n ProfileDataViewComponent\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatDialogModule,\n MatMenuModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepButtonModule,\n PepDialogModule,\n PepSelectModule,\n PepMenuModule,\n PepIconModule,\n PepTopBarModule,\n ],\n exports: [\n ProfileDataViewsListComponent,\n ProfileDataViewsCardComponent,\n ProfileDataViewComponent\n ],\n})\nexport class PepProfileDataViewsListModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemMenu,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/profile-data-views-list\n */\nexport * from './profile-data-views-card/profile-data-views-card.component';\nexport * from './profile-data-view/profile-data-view.component';\n\nexport * from './profile-data-views-list.module';\nexport * from './profile-data-views-list.model';\nexport * from './profile-data-views-list.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3","i4.ProfileDataViewComponent","i5.ProfileDataViewsCardComponent","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;MASa,wBAAwB,CAAA;AASjC,IAAA,WAAA,GAAA;AALS,QAAA,IAAS,CAAA,SAAA,GAAG,IAAI,CAAC;AAEhB,QAAA,IAAA,CAAA,SAAS,GAAgD,IAAI,YAAY,EAAiC,CAAC;AAC3G,QAAA,IAAA,CAAA,WAAW,GAAgD,IAAI,YAAY,EAAiC,CAAC;;KAIrH;IAEF,QAAQ,GAAA;;KAEP;AAED,IAAA,aAAa,CAAC,KAA2B,EAAA;AACrC,QAAA,I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AA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,YApBlC,YAAY;QACZ,mBAAmB;;QAEnB,eAAe;QACf,aAAa;;QAEb,eAAe;QACf,eAAe;QACf,eAAe;QACf,eAAe;QACf,aAAa;QACb,aAAa;QACb,eAAe,CAAA,EAAA,CAAA,CAAA;2FAQV,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBA3BzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,6BAA6B;wBAC7B,6BAA6B;wBAC7B,wBAAwB;AAC3B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;;wBAEnB,eAAe;wBACf,aAAa;;wBAEb,eAAe;wBACf,eAAe;wBACf,eAAe;wBACf,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,eAAe;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,6BAA6B;wBAC7B,6BAA6B;wBAC7B,wBAAwB;AAC3B,qBAAA;iBACJ,CAAA;;;ACnDD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-profile-data-views-list.mjs","sources":["../../../projects/ngx-lib/profile-data-views-list/profile-data-view/profile-data-view.component.ts","../../../projects/ngx-lib/profile-data-views-list/profile-data-view/profile-data-view.component.html","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.ts","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.html","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-list.component.ts","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-list.component.html","../../../projects/ngx-lib/profile-data-views-list/profile-data-views-list.module.ts","../../../projects/ngx-lib/profile-data-views-list/public-api.ts","../../../projects/ngx-lib/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { IPepButtonClickEvent } from '@pepperi-addons/ngx-lib/button';\nimport { IPepDataViewClickEvent } from '../profile-data-views-list.model';\n\n@Component({\n selector: 'pep-profile-data-view',\n templateUrl: './profile-data-view.component.html',\n styleUrls: ['./profile-data-view.component.scss', './profile-data-view.component.theme.scss']\n})\nexport class ProfileDataViewComponent implements OnInit {\n @Input() dataViewId: string;\n @Input() title: string;\n @Input() fields: string[];\n @Input() canDelete = true;\n\n @Output() editClick: EventEmitter<IPepDataViewClickEvent> = new EventEmitter<IPepDataViewClickEvent>();\n @Output() deleteClick: EventEmitter<IPepDataViewClickEvent> = new EventEmitter<IPepDataViewClickEvent>();\n\n constructor() {\n //\n }\n\n ngOnInit() {\n //\n }\n\n onEditClicked(event: IPepButtonClickEvent): void {\n this.editClick.emit({\n dataViewId: this.dataViewId\n });\n }\n\n onDeleteClicked(event: IPepButtonClickEvent): void {\n this.deleteClick.emit({\n dataViewId: this.dataViewId\n });\n }\n}\n","<div *ngIf=\"title?.length > 0\" class=\"data-view-title-container\">\n <div class=\"title ellipsis\" [title]=\"title\">\n <span class=\"title-md\">{{title}}</span>\n </div>\n <pep-button *ngIf=\"canDelete\" class=\"delete-button\" sizeType=\"xs\" (buttonClick)=\"onDeleteClicked($event)\"\n [value]=\"'ACTIONS.REMOVE' | translate\">\n </pep-button>\n</div>\n<div class=\"data-view-container\">\n <div class=\"fields-container\">\n <span class=\"color-caution body-xs ellipsis data-view-field\" *ngIf=\"fields === null || fields.length === 0\">\n {{('PROFILE_DATA_VIEWS_LIST.NO_FIELDS_ASSIGNED' | translate)}}</span>\n <span class=\"color-dimmed body-xs ellipsis data-view-field\" *ngFor=\"let field of fields\" [title]=\"field\">{{field}}</span>\n </div>\n <pep-button class=\"edit-button\" iconName=\"system_edit\" sizeType=\"xs\" (buttonClick)=\"onEditClicked($event)\">\n </pep-button>\n</div>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { BaseDataView, DataViewType } from '@pepperi-addons/papi-sdk';\nimport { IPepDataViewClickEvent, IPepProfileDataView, IPepProfileDataViewClickEvent } from '../profile-data-views-list.model';\nimport { IPepMenuItemClickEvent, PepMenuItem } from '@pepperi-addons/ngx-lib/menu';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Component({\n selector: 'pep-profile-data-views-card',\n templateUrl: './profile-data-views-card.component.html',\n styleUrls: ['./profile-data-views-card.component.scss', './profile-data-views-card.component.theme.scss']\n})\nexport class ProfileDataViewsCardComponent implements OnInit {\n @Input() profileId = '';\n @Input() title = '';\n @Input() dataViews: IPepProfileDataView[] = [];\n @Input() configurationPerScreenSize = false;\n @Input() isDefault = false;\n\n @Output() dataViewEditClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n @Output() dataViewDeleteClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n @Output() dataViewImportClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n\n menuItems: Array<PepMenuItem> = [];\n\n constructor(private translate: TranslateService) { }\n\n private loadMenuItems(): void {\n const removeKey = 'ACTIONS.REMOVE';\n const importKey = 'ACTIONS.IMPORT';\n\n // Load translation before get the options in the children.\n this.translate.get([removeKey, importKey]).subscribe((res) => {\n\n if (!this.isDefault) {\n this.menuItems.push({ key: 'delete', text: this.translate.instant(res[removeKey]) });\n }\n\n this.menuItems.push({ key: 'import', text: this.translate.instant(res[importKey]) });\n });\n }\n\n ngOnInit() {\n this.loadMenuItems();\n }\n\n onMenuItemClicked(action: IPepMenuItemClickEvent) {\n if (this.dataViews.length === 1) {\n if (action.source.key === 'delete') {\n this.onDataViewDeleteClicked({ dataViewId: this.dataViews[0].dataViewId });\n } else if (action.source.key === 'import') {\n this.dataViewImportClick.emit({ profileId: this.profileId, dataViewId: this.dataViews[0].dataViewId });\n }\n }\n }\n\n onDataViewEditClicked(event: IPepDataViewClickEvent): void {\n const newEvent = {\n profileId: this.profileId,\n dataViewId: event.dataViewId\n }\n this.dataViewEditClick.emit(newEvent);\n }\n\n onDataViewDeleteClicked(event: IPepDataViewClickEvent): void {\n const newEvent = {\n profileId: this.profileId,\n dataViewId: event.dataViewId\n }\n this.dataViewDeleteClick.emit(newEvent);\n }\n\n}\n","<div class=\"profile-data-views-card-container\">\n <div class=\"card-top-bar pep-border-bottom\">\n <div *ngIf=\"title?.length > 0\" class=\"title ellipsis\"\n [title]=\"title + ' ' + (isDefault ? ('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' | translate) : '')\">\n <span class=\"title-md\">{{title}}&nbsp;</span>\n <span *ngIf=\"isDefault\" class=\"color-dimmed\">{{('PROFILE_DATA_VIEWS_LIST.DEFAULT_PROFILE' |\n translate)}}&nbsp;\n </span>\n </div>\n <pep-menu *ngIf=\"!configurationPerScreenSize\" sizeType=\"sm\" [items]=\"menuItems\" (menuItemClick)=\"onMenuItemClicked($event)\">\n </pep-menu>\n </div>\n\n <pep-profile-data-view *ngFor=\"let dataView of dataViews\" [dataViewId]=\"dataView.dataViewId\"\n [title]=\"configurationPerScreenSize ? dataView.viewType : ''\" [fields]=\"dataView.fields\" [canDelete]=\"!(isDefault && dataView.viewType === 'Tablet')\"\n (editClick)=\"onDataViewEditClicked($event)\" (deleteClick)=\"onDataViewDeleteClicked($event)\">\n </pep-profile-data-view>\n</div>","import { Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { BaseDataView, DataViewType } from '@pepperi-addons/papi-sdk';\nimport { IPepButtonClickEvent } from '@pepperi-addons/ngx-lib/button';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\nimport { IPepOption } from '@pepperi-addons/ngx-lib';\nimport { IPepProfile, IPepProfileDataViewClickEvent, IPepProfileDataViewSaveClickEvent, IPepProfileDataViewsCard } from './profile-data-views-list.model';\n\n@Component({\n selector: 'pep-profile-data-views-list',\n templateUrl: './profile-data-views-list.component.html',\n styleUrls: ['./profile-data-views-list.component.scss']\n})\nexport class ProfileDataViewsListComponent implements OnInit {\n @Input() defaultProfileId = '';\n\n private _availableProfiles: Array<IPepProfile> = [];\n @Input()\n set availableProfiles(value: Array<IPepProfile>) {\n this._availableProfiles = value;\n this.setProfilesOptions();\n }\n get availableProfiles(): Array<IPepProfile> {\n return this._availableProfiles;\n }\n\n private _profileDataViewsList: Array<IPepProfileDataViewsCard> = [];\n @Input()\n set profileDataViewsList(value: Array<IPepProfileDataViewsCard>) {\n this._profileDataViewsList = value;\n this.setProfilesOptions();\n }\n get profileDataViewsList(): Array<IPepProfileDataViewsCard> {\n return this._profileDataViewsList;\n }\n\n @Input() configurationPerScreenSize = false;\n\n @Output() saveProfileClick: EventEmitter<IPepProfileDataViewSaveClickEvent> = new EventEmitter<IPepProfileDataViewSaveClickEvent>();\n @Output() dataViewEditClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n @Output() dataViewDeleteClick: EventEmitter<IPepProfileDataViewClickEvent> = new EventEmitter<IPepProfileDataViewClickEvent>();\n\n @ViewChild('addNewProfileTemplate', { read: TemplateRef }) addNewProfileTemplate: TemplateRef<any>;\n @ViewChild('importProfileTemplate', { read: TemplateRef }) importProfileTemplate: TemplateRef<any>;\n\n dialogRef: MatDialogRef<any>;\n selectedProfileId = '';\n nonExistingProfiles: Array<IPepProfile> = [];\n \n selectedCopyFromProfileId = '';\n // existingProfiles: Array<IPepProfile> = [];\n\n private setProfilesOptions() {\n // Set the profiles that not exist already in profileDataViewsList.\n this.nonExistingProfiles = this.availableProfiles.filter(ap => this.profileDataViewsList.findIndex(pdv => pdv.profileId === ap.id) === -1);\n\n // // Set the existing profiles.\n // this.existingProfiles = this.availableProfiles.filter(ap => this.profileDataViewsList.findIndex(pdv => pdv.profileId === ap.id) > -1);\n }\n\n constructor(\n private dialogService: PepDialogService\n ) { }\n\n ngOnInit() {\n //\n }\n\n setSelectedProfileId(value: string) {\n this.selectedProfileId = value;\n }\n \n setCopyFromProfileId(value: string) {\n this.selectedCopyFromProfileId = value;\n }\n\n closeDialog(): void {\n this.dialogRef?.close();\n }\n\n saveProfile() {\n // Save the profile (can be new or import to existing).\n this.saveProfileClick.emit({\n profileId: this.selectedProfileId,\n copyFromProfileId: this.selectedCopyFromProfileId\n });\n this.closeDialog();\n }\n\n onAddProfileClicked() {\n // Raise select profile dialog\n this.selectedProfileId = '';\n this.selectedCopyFromProfileId = '';\n\n const options: Array<IPepOption> = this.nonExistingProfiles.map((opt) => {\n return { key: opt.id, value: opt.name };\n });\n\n const copyFromOptions: Array<IPepOption> = this.profileDataViewsList.map((opt) => {\n return { key: opt.profileId, value: opt.title };\n });\n\n this.dialogRef = this.dialogService.openDialog(this.addNewProfileTemplate, { \n options,\n copyFromOptions\n });\n }\n\n onDataViewEditClicked(event: IPepProfileDataViewClickEvent): void {\n this.dataViewEditClick.emit(event);\n }\n\n onDataViewDeleteClicked(event: IPepProfileDataViewClickEvent): void {\n this.dataViewDeleteClick.emit(event);\n }\n\n onDataViewImportClicked(event: IPepProfileDataViewClickEvent): void {\n // Raise import profile dialog\n const profile = this.profileDataViewsList.find(p => p.profileId === event.profileId);\n const profileTitle = profile.title;\n\n this.selectedProfileId = event.profileId;\n this.selectedCopyFromProfileId = '';\n\n // Add to the copyFromOptions all the existing except the clicked profile. \n const copyFromOptions: Array<IPepOption> = this.profileDataViewsList.filter(p => p.profileId !== event.profileId).map((opt) => {\n return { key: opt.profileId, value: opt.title };\n });\n\n this.dialogRef = this.dialogService.openDialog(this.importProfileTemplate, { \n profileTitle,\n copyFromOptions,\n });\n }\n}\n","<div class=\"profile-data-views-list-container\">\n <pep-profile-data-views-card *ngFor=\"let profileDataViews of profileDataViewsList\"\n [configurationPerScreenSize]=\"configurationPerScreenSize\" [title]=\"profileDataViews.title\"\n [profileId]=\"profileDataViews.profileId\" [dataViews]=\"profileDataViews.dataViews\"\n [isDefault]=\"profileDataViews.profileId === defaultProfileId\"\n (dataViewEditClick)=\"onDataViewEditClicked($event)\" (dataViewDeleteClick)=\"onDataViewDeleteClicked($event)\"\n (dataViewImportClick)=\"onDataViewImportClicked($event)\">\n </pep-profile-data-views-card>\n\n <pep-button *ngIf=\"nonExistingProfiles?.length > 0\" [value]=\"'PROFILE_DATA_VIEWS_LIST.ADD_PROFILE' | translate\"\n iconName=\"number_plus\" sizeType=\"lg\" (buttonClick)=\"onAddProfileClicked()\"></pep-button>\n</div>\n\n<ng-template #addNewProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE_DIALOG_TITLE' | translate\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.SELECT_PROFILE' | translate\" [options]=\"data.options\"\n [emptyOption]=\"false\" (valueChange)=\"setSelectedProfileId($event)\">\n </pep-select>\n\n <div *ngIf=\"data.copyFromOptions?.length\">\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_FROM_PROFILE' | translate\" [options]=\"data.copyFromOptions\"\n [emptyOption]=\"true\" (valueChange)=\"setCopyFromProfileId($event)\">\n </pep-select>\n </div>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveProfile()\"\n [disabled]=\"selectedProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>\n\n<ng-template #importProfileTemplate let-data>\n <pep-dialog [title]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_PROFILE_DIALOG_TITLE' | translate: { profileTitle: data.profileTitle }\" (close)=\"closeDialog()\">\n <ng-container pep-dialog-content>\n <pep-select [label]=\"'PROFILE_DATA_VIEWS_LIST.IMPORT_FROM_PROFILE' | translate\" [options]=\"data.copyFromOptions\"\n [emptyOption]=\"false\" (valueChange)=\"setCopyFromProfileId($event)\">\n </pep-select>\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\" (click)=\"closeDialog()\">\n {{ 'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\" (click)=\"saveProfile()\"\n [disabled]=\"selectedProfileId === ''\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatMenuModule } from '@angular/material/menu';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepButtonModule } from '@pepperi-addons/ngx-lib/button';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepSelectModule } from '@pepperi-addons/ngx-lib/select';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport { PepTopBarModule } from '@pepperi-addons/ngx-lib/top-bar';\n\nimport { ProfileDataViewsListComponent } from './profile-data-views-list.component';\nimport { ProfileDataViewsCardComponent } from './profile-data-views-card/profile-data-views-card.component';\nimport { ProfileDataViewComponent } from './profile-data-view/profile-data-view.component';\n\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemMenu,\n} from '@pepperi-addons/ngx-lib/icon';\n\n@NgModule({\n declarations: [\n ProfileDataViewsListComponent,\n ProfileDataViewsCardComponent,\n ProfileDataViewComponent\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatDialogModule,\n MatMenuModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepButtonModule,\n PepDialogModule,\n PepSelectModule,\n PepMenuModule,\n PepIconModule,\n PepTopBarModule,\n ],\n exports: [\n ProfileDataViewsListComponent,\n ProfileDataViewsCardComponent,\n ProfileDataViewComponent\n ],\n})\nexport class PepProfileDataViewsListModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemMenu,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/profile-data-views-list\n */\nexport * from './profile-data-views-card/profile-data-views-card.component';\nexport * from './profile-data-view/profile-data-view.component';\n\nexport * from './profile-data-views-list.module';\nexport * from './profile-data-views-list.model';\nexport * from './profile-data-views-list.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3","i4.ProfileDataViewComponent","i5.ProfileDataViewsCardComponent","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;MASa,wBAAwB,CAAA;AASjC,IAAA,WAAA,GAAA;AALS,QAAA,IAAS,CAAA,SAAA,GAAG,IAAI,CAAC;AAEhB,QAAA,IAAA,CAAA,SAAS,GAAyC,IAAI,YAAY,EAA0B,CAAC;AAC7F,QAAA,IAAA,CAAA,WAAW,GAAyC,IAAI,YAAY,EAA0B,CAAC;;KAIvG;IAEF,QAAQ,GAAA;;KAEP;AAED,IAAA,aAAa,CAAC,KAA2B,EAAA;AACrC,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAChB,UAAU,EAAE,IAAI,CAAC,UAAU;AAC9B,SAAA,CAAC,CAAC;KACN;AAED,IAAA,eAAe,CAAC,KAA2B,EAAA;AACvC,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YAClB,UAAU,EAAE,IAAI,CAAC,UAAU;AAC9B,SAAA,CAAC,CAAC;KACN;;qHA3BQ,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAA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EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,6BAA6B;wBAC7B,6BAA6B;wBAC7B,wBAAwB;AAC3B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;;wBAEnB,eAAe;wBACf,aAAa;;wBAEb,eAAe;wBACf,eAAe;wBACf,eAAe;wBACf,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,eAAe;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,6BAA6B;wBAC7B,6BAA6B;wBAC7B,wBAAwB;AAC3B,qBAAA;iBACJ,CAAA;;;ACnDD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -81,7 +81,7 @@ class PepQuantitySelectorComponent {
81
81
  this.translate = translate;
82
82
  this.utilitiesService = utilitiesService;
83
83
  this.key = '';
84
- this._value = null;
84
+ this._value = '';
85
85
  this.formattedValue = '';
86
86
  // private _formattedValue = '';
87
87
  // @Input()
@@ -135,12 +135,17 @@ class PepQuantitySelectorComponent {
135
135
  // this.qsWidthSubject = new BehaviorSubject(0);
136
136
  }
137
137
  set value(value) {
138
+ var _a;
138
139
  if (!value) {
139
140
  value = '';
140
141
  }
141
- if (this.isDifferentValue(value)) {
142
+ if (this._value === '' || this.isDifferentValue(value)) {
142
143
  this._value = value;
143
144
  }
145
+ // Cut the .000 if exist for non allowDecimal.
146
+ if (!this.allowDecimal) {
147
+ this._value = (_a = this._value) === null || _a === void 0 ? void 0 : _a.split('.')[0];
148
+ }
144
149
  this.setFormattedValue(this.value);
145
150
  this.changeDisplayValue();
146
151
  }