@pepperi-addons/ngx-composite-lib 0.0.16-beta.4 → 0.0.16-beta.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/bundles/pepperi-addons-ngx-composite-lib-color-settings.umd.js +10 -1
  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 +393 -0
  4. package/bundles/pepperi-addons-ngx-composite-lib-data-view-builder.umd.js.map +1 -0
  5. package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js +15 -10
  6. package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js.map +1 -1
  7. package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js +91 -58
  8. package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js.map +1 -1
  9. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +119 -74
  10. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js.map +1 -1
  11. package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js +5 -2
  12. package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js.map +1 -1
  13. package/bundles/pepperi-addons-ngx-composite-lib.umd.js +114 -50
  14. package/bundles/pepperi-addons-ngx-composite-lib.umd.js.map +1 -1
  15. package/color-settings/color-settings.component.d.ts +4 -1
  16. package/core/common/directives/reset-configuration-field.directive.d.ts +1 -0
  17. package/core/common/services/dimx.service.d.ts +32 -0
  18. package/core/common/services/public-api.d.ts +1 -0
  19. package/data-view-builder/data-view-builder.component.d.ts +35 -0
  20. package/data-view-builder/data-view-builder.model.d.ts +1 -0
  21. package/data-view-builder/data-view-builder.module.d.ts +23 -0
  22. package/data-view-builder/data-view-builder.service.d.ts +14 -0
  23. package/data-view-builder/menu-data-view/menu-data-view.component.d.ts +36 -0
  24. package/data-view-builder/package.json +10 -0
  25. package/{dimx-export/pepperi-addons-ngx-composite-lib-dimx-export.d.ts → data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.d.ts} +1 -1
  26. package/data-view-builder/public-api.d.ts +3 -0
  27. package/esm2015/color-settings/color-settings.component.js +11 -2
  28. package/esm2015/core/common/directives/reset-configuration-field.directive.js +26 -22
  29. package/esm2015/core/common/services/dimx.service.js +50 -0
  30. package/esm2015/core/common/services/public-api.js +2 -1
  31. package/esm2015/data-view-builder/data-view-builder.component.js +122 -0
  32. package/esm2015/data-view-builder/data-view-builder.model.js +2 -0
  33. package/esm2015/data-view-builder/data-view-builder.module.js +82 -0
  34. package/esm2015/data-view-builder/data-view-builder.service.js +39 -0
  35. package/esm2015/data-view-builder/menu-data-view/menu-data-view.component.js +122 -0
  36. package/esm2015/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.js +5 -0
  37. package/esm2015/data-view-builder/public-api.js +7 -0
  38. package/esm2015/file-status-panel/file-status-panel.module.js +12 -4
  39. package/esm2015/generic-form/generic-form.component.js +86 -55
  40. package/esm2015/generic-form/generic-form.model.js +1 -1
  41. package/esm2015/generic-form/index.js +5 -0
  42. package/esm2015/generic-list/generic-list.component.js +65 -36
  43. package/esm2015/generic-list/generic-list.model.js +1 -1
  44. package/esm2015/generic-list/generic-list.module.js +7 -4
  45. package/esm2015/generic-list/generic-list.service.js +23 -10
  46. package/esm2015/group-buttons-settings/group-buttons-settings.component.js +2 -2
  47. package/esm2015/group-buttons-settings/group-buttons-settings.module.js +6 -3
  48. package/esm2015/ngx-composite-lib.module.js +19 -8
  49. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js +10 -1
  50. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js.map +1 -1
  51. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js +360 -0
  52. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js.map +1 -0
  53. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js +12 -5
  54. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js.map +1 -1
  55. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js +85 -55
  56. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js.map +1 -1
  57. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +88 -44
  58. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js.map +1 -1
  59. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +6 -3
  60. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js.map +1 -1
  61. package/fesm2015/pepperi-addons-ngx-composite-lib.js +117 -54
  62. package/fesm2015/pepperi-addons-ngx-composite-lib.js.map +1 -1
  63. package/file-status-panel/file-status-panel.module.d.ts +3 -0
  64. package/generic-form/generic-form.component.d.ts +12 -12
  65. package/generic-form/generic-form.model.d.ts +12 -13
  66. package/{dimx-export → generic-form}/index.d.ts +0 -0
  67. package/generic-list/generic-list.component.d.ts +11 -9
  68. package/generic-list/generic-list.model.d.ts +10 -6
  69. package/generic-list/generic-list.service.d.ts +2 -1
  70. package/group-buttons-settings/group-buttons-settings.module.d.ts +2 -1
  71. package/ngx-composite-lib.module.d.ts +4 -2
  72. package/package.json +2 -2
  73. package/src/assets/i18n/en.ngx-composite-lib.json +24 -1
  74. package/src/core/style/components/data-view-builder.scss +65 -0
  75. package/styling.scss +5 -1
  76. package/bundles/pepperi-addons-ngx-composite-lib-dimx-export.umd.js +0 -890
  77. package/bundles/pepperi-addons-ngx-composite-lib-dimx-export.umd.js.map +0 -1
  78. package/dimx-export/dimx.component.d.ts +0 -86
  79. package/dimx-export/dimx.model.d.ts +0 -5
  80. package/dimx-export/dimx.module.d.ts +0 -16
  81. package/dimx-export/dimx.service.d.ts +0 -21
  82. package/dimx-export/package.json +0 -16
  83. package/dimx-export/public-api.d.ts +0 -3
  84. package/esm2015/dimx-export/dimx.component.js +0 -335
  85. package/esm2015/dimx-export/dimx.model.js +0 -8
  86. package/esm2015/dimx-export/dimx.module.js +0 -53
  87. package/esm2015/dimx-export/dimx.service.js +0 -50
  88. package/esm2015/dimx-export/index.js +0 -5
  89. package/esm2015/dimx-export/pepperi-addons-ngx-composite-lib-dimx-export.js +0 -5
  90. package/esm2015/dimx-export/public-api.js +0 -7
  91. package/fesm2015/pepperi-addons-ngx-composite-lib-dimx-export.js +0 -446
  92. package/fesm2015/pepperi-addons-ngx-composite-lib-dimx-export.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-composite-lib-group-buttons-settings.js","sources":["../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.component.ts","../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.component.html","../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.module.ts","../../../projects/ngx-composite-lib/group-buttons-settings/public-api.ts","../../../projects/ngx-composite-lib/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { PepSizeType } from '@pepperi-addons/ngx-lib';\nimport { IPepButtonClickEvent, PepButton } from '@pepperi-addons/ngx-lib/button';\nimport { PepGroupbuttonsTypes } from './group-buttons-settings.model';\n\n@Component({\n selector: 'pep-group-buttons-settings',\n templateUrl: './group-buttons-settings.component.html',\n styleUrls: ['./group-buttons-settings.component.scss']\n})\nexport class GroupButtonsSettingsComponent implements OnInit {\n\n @Input() header = '';\n @Input() subHeader = '';\n\n @Input() groupType: PepGroupbuttonsTypes = 'sizes'; \n @Input() btnsArray: Array<PepButton> = [];\n @Input() excludeKeys: Array<string> = []; // for example ['xs','xl']\n\n @Input() useNone = false;\n @Input() disabled = false;\n @Input() dir: 'rtl' | 'ltr' = 'ltr';\n \n private _btnKey: any;\n @Input()\n set btnKey(value: any) {\n if (!value) {\n this._btnKey = '';\n } else {\n this._btnKey = value;\n }\n }\n get btnKey(): any {\n return this._btnKey;\n }\n\n @Output()\n btnkeyChange: EventEmitter<IPepButtonClickEvent> = new EventEmitter<IPepButtonClickEvent>();\n \n \n none: PepButton = {key: 'none'};\n \n sizes: Array<PepButton> = [];\n \n // pepB: PepSizeType | 'none' = \"xs\";\n\n constructor(\n private translate: TranslateService,\n ) {\n }\n\n ngOnInit(): void { \n // Get the first translation for load all translations.\n this.translate.get('SHADOW_SETTINGS.INTENSITY_SOFT').toPromise().then((typeSoft) => {\n \n this.none = { key: 'none', value: this.translate.instant('GENERAL.NONE'), callback: () => this.onKeyChange(null) };\n \n this.arrayMerge();\n });\n }\n\n arrayMerge(){\n\n this.btnsArray = this.getButtonsArray();\n \n // check if need to remove items from the buttons array\n if(this.excludeKeys){\n this.btnsArray = this.btnsArray.filter(i => !this.excludeKeys.find(f => f === i.key));\n }\n // check if need to add the None button\n if(this.useNone){\n this.btnsArray = [this.none].concat(this.btnsArray);\n }\n }\n\n onKeyChange(event: IPepButtonClickEvent | null) {\n this.btnKey = event?.source?.key || 'none';\n this.btnkeyChange.emit(this.btnKey);\n }\n\n getButtonsArray() {\n switch(this.groupType){\n case 'custom':{\n return this.btnsArray;\n }\n case 'sizes':{\n return [\n { key: 'xs', value: this.translate.instant('GENERAL.XS'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'sm', value: this.translate.instant('GENERAL.SM'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'md', value: this.translate.instant('GENERAL.MD'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'lg', value: this.translate.instant('GENERAL.LG'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'xl', value: this.translate.instant('GENERAL.XL'), callback: (event: any) => this.onKeyChange(event) }\n ];\n }\n case 'vertical-align':{\n return [\n { key: 'start', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.TOP'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) },\n { key: 'center', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.MIDDLE'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) },\n { key: 'end', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.BOTTOM'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) }\n ];\n }\n case 'horizontal-align': {\n return [\n { key: 'left', iconName: 'text_align_right', callback: (event: any) => this.onKeyChange(event) },\n { key: 'center', iconName: 'text_align_center', callback: (event: any) => this.onKeyChange(event) },\n { key: 'right', iconName: 'text_align_left', callback: (event: any) => this.onKeyChange(event) },\n ];\n }\n case 'font-weight':{\n return [\n { key: 'normal', value: this.translate.instant('GENERAL.FONT_WEIGHT.NORMAL'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'bold', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLD'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'bolder', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLDER'), callback: (event: any) => this.onKeyChange(event) }\n ]\n }\n case 'width-sizes':{\n return [\n { key: 'narrow', value: this.translate.instant('GENERAL.WIDTH_SIZE.NARROW'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'regular', value: this.translate.instant('GENERAL.WIDTH_SIZE.REGULAR'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'wide', value: this.translate.instant('GENERAL.WIDTH_SIZE.WIDE'), callback: (event: any) => this.onKeyChange(event) }\n ];\n }\n\n default: {\n return [];\n }\n }\n }\n}\n","<label *ngIf=\"header != ''\" class=\"body-xl bold ellipsis\">{{header}}</label>\n<pep-field-title *ngIf=\"subHeader !=''\" [label]=\"subHeader\" [disabled]=\"disabled\" [xAlignment]=\"dir === 'rtl' ? 'right' : 'left'\"></pep-field-title>\n<pep-group-buttons [buttons]=\"btnsArray\" \n [selectedButtonKey]=\"btnKey\" \n [stretch]=\"true\" \n buttonsClass=\"md regular\" \n [buttonsDisabled]=\"disabled\" \n viewType=\"toggle\">\n</pep-group-buttons>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GroupButtonsSettingsComponent } from './group-buttons-settings.component';\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';\nimport { PepIconRegistry, pepIconTextAlignCenter, pepIconTextAlignLeft, pepIconTextAlignRight } from '@pepperi-addons/ngx-lib/icon';\n\nconst pepIcons = [\n pepIconTextAlignCenter, \n pepIconTextAlignLeft, \n pepIconTextAlignRight\n]\n\n@NgModule({\n declarations: [\n GroupButtonsSettingsComponent\n ],\n imports: [\n CommonModule,\n PepNgxLibModule,\n PepFieldTitleModule,\n PepGroupButtonsModule,\n ],\n exports: [GroupButtonsSettingsComponent]\n})\nexport class PepGroupButtonsSettingsModule { \n constructor(\n private pepIconRegistry: PepIconRegistry,\n ) {\n this.pepIconRegistry.registerIcons(pepIcons);\n }\n}\n","/*\n * Public API Surface of ngx-composite-lib/shadow-settings\n */\nexport * from './group-buttons-settings.module';\nexport * from './group-buttons-settings.component';\nexport * from './group-buttons-settings.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,6BAA6B;;IAoCtC,YACY,SAA2B;QAA3B,cAAS,GAAT,SAAS,CAAkB;QAnC9B,WAAM,GAAG,EAAE,CAAC;QACZ,cAAS,GAAG,EAAE,CAAC;QAEf,cAAS,GAAyB,OAAO,CAAC;QAC1C,cAAS,GAAqB,EAAE,CAAC;QACjC,gBAAW,GAAkB,EAAE,CAAC;QAEhC,YAAO,GAAG,KAAK,CAAC;QAChB,aAAQ,GAAG,KAAK,CAAC;QACjB,QAAG,GAAkB,KAAK,CAAC;QAgBpC,iBAAY,GAAuC,IAAI,YAAY,EAAwB,CAAC;QAG5F,SAAI,GAAc,EAAC,GAAG,EAAE,MAAM,EAAC,CAAC;QAEhC,UAAK,GAAqB,EAAE,CAAC;KAO5B;IAzBD,IACI,M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;sBAAnB,KAAK;gBAEG,OAAO;sBAAf,KAAK;gBACG,QAAQ;sBAAhB,KAAK;gBACG,GAAG;sBAAX,KAAK;gBAIF,MAAM;sBADT,KAAK;gBAaN,YAAY;sBADX,MAAM;;;AE7BX,MAAM,QAAQ,GAAG;IACb,sBAAsB;IACtB,oBAAoB;IACpB,qBAAqB;CACxB,CAAA;MAcY,6BAA6B;IACtC,YACY,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;QAExC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;KAChD;;0HALQ,6BAA6B;2HAA7B,6BAA6B,iBAVlC,6BAA6B,aAG7B,YAAY;QACZ,eAAe;QACf,mBAAmB;QACnB,qBAAqB,aAEf,6BAA6B;2HAE9B,6BAA6B,YAR7B;YACL,YAAY;YACZ,eAAe;YACf,mBAAmB;YACnB,qBAAqB;SACxB;2FAGQ,6BAA6B;kBAZzC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,6BAA6B;qBAChC;oBACD,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,mBAAmB;wBACnB,qBAAqB;qBACxB;oBACD,OAAO,EAAE,CAAC,6BAA6B,CAAC;iBAC3C;;;ACzBD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-composite-lib-group-buttons-settings.js","sources":["../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.component.ts","../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.component.html","../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.module.ts","../../../projects/ngx-composite-lib/group-buttons-settings/public-api.ts","../../../projects/ngx-composite-lib/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { PepSizeType } from '@pepperi-addons/ngx-lib';\nimport { IPepButtonClickEvent, PepButton } from '@pepperi-addons/ngx-lib/button';\nimport { PepGroupbuttonsTypes } from './group-buttons-settings.model';\n\n@Component({\n selector: 'pep-group-buttons-settings',\n templateUrl: './group-buttons-settings.component.html',\n styleUrls: ['./group-buttons-settings.component.scss']\n})\nexport class GroupButtonsSettingsComponent implements OnInit {\n\n @Input() header = '';\n @Input() subHeader = '';\n\n @Input() groupType: PepGroupbuttonsTypes = 'sizes'; \n @Input() btnsArray: Array<PepButton> = [];\n @Input() excludeKeys: Array<string> = []; // for example ['xs','xl']\n\n @Input() useNone = false;\n @Input() disabled = false;\n @Input() dir: 'rtl' | 'ltr' = 'ltr';\n \n private _btnKey: any;\n @Input()\n set btnKey(value: any) {\n if (!value) {\n this._btnKey = '';\n } else {\n this._btnKey = value;\n }\n }\n get btnKey(): any {\n return this._btnKey;\n }\n\n @Output()\n btnkeyChange: EventEmitter<IPepButtonClickEvent> = new EventEmitter<IPepButtonClickEvent>();\n \n \n none: PepButton = {key: 'none'};\n \n sizes: Array<PepButton> = [];\n \n // pepB: PepSizeType | 'none' = \"xs\";\n\n constructor(\n private translate: TranslateService,\n ) {\n }\n\n ngOnInit(): void { \n // Get the first translation for load all translations.\n this.translate.get('SHADOW_SETTINGS.INTENSITY_SOFT').toPromise().then((typeSoft) => {\n \n this.none = { key: 'none', value: this.translate.instant('GENERAL.NONE'), callback: () => this.onKeyChange(null) };\n \n this.arrayMerge();\n });\n }\n\n arrayMerge(){\n\n this.btnsArray = this.getButtonsArray();\n \n // check if need to remove items from the buttons array\n if(this.excludeKeys){\n this.btnsArray = this.btnsArray.filter(i => !this.excludeKeys.find(f => f === i.key));\n }\n // check if need to add the None button\n if(this.useNone){\n this.btnsArray = [this.none].concat(this.btnsArray);\n }\n }\n\n onKeyChange(event: IPepButtonClickEvent | null) {\n this.btnKey = event?.source?.key || 'none';\n this.btnkeyChange.emit(this.btnKey);\n }\n\n getButtonsArray() {\n switch(this.groupType){\n case 'custom':{\n return this.btnsArray;\n }\n case 'sizes':{\n return [\n { key: 'xs', value: this.translate.instant('GENERAL.XS'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'sm', value: this.translate.instant('GENERAL.SM'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'md', value: this.translate.instant('GENERAL.MD'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'lg', value: this.translate.instant('GENERAL.LG'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'xl', value: this.translate.instant('GENERAL.XL'), callback: (event: any) => this.onKeyChange(event) }\n ];\n }\n case 'vertical-align':{\n return [\n { key: 'start', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.TOP'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) },\n { key: 'middle', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.MIDDLE'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) },\n { key: 'end', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.BOTTOM'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) }\n ];\n }\n case 'horizontal-align': {\n return [\n { key: 'left', iconName: 'text_align_right', callback: (event: any) => this.onKeyChange(event) },\n { key: 'center', iconName: 'text_align_center', callback: (event: any) => this.onKeyChange(event) },\n { key: 'right', iconName: 'text_align_left', callback: (event: any) => this.onKeyChange(event) },\n ];\n }\n case 'font-weight':{\n return [\n { key: 'normal', value: this.translate.instant('GENERAL.FONT_WEIGHT.NORMAL'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'bold', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLD'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'bolder', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLDER'), callback: (event: any) => this.onKeyChange(event) }\n ]\n }\n case 'width-sizes':{\n return [\n { key: 'narrow', value: this.translate.instant('GENERAL.WIDTH_SIZE.NARROW'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'regular', value: this.translate.instant('GENERAL.WIDTH_SIZE.REGULAR'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'wide', value: this.translate.instant('GENERAL.WIDTH_SIZE.WIDE'), callback: (event: any) => this.onKeyChange(event) }\n ];\n }\n\n default: {\n return [];\n }\n }\n }\n}\n","<label *ngIf=\"header != ''\" class=\"body-xl bold ellipsis\">{{header}}</label>\n<pep-field-title *ngIf=\"subHeader !=''\" [label]=\"subHeader\" [disabled]=\"disabled\" [xAlignment]=\"dir === 'rtl' ? 'right' : 'left'\"></pep-field-title>\n<pep-group-buttons [buttons]=\"btnsArray\" \n [selectedButtonKey]=\"btnKey\" \n [stretch]=\"true\" \n buttonsClass=\"md regular\" \n [buttonsDisabled]=\"disabled\" \n viewType=\"toggle\">\n</pep-group-buttons>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GroupButtonsSettingsComponent } from './group-buttons-settings.component';\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';\nimport { PepIconModule, PepIconRegistry, pepIconTextAlignCenter, pepIconTextAlignLeft, pepIconTextAlignRight } from '@pepperi-addons/ngx-lib/icon';\n\nconst pepIcons = [\n pepIconTextAlignCenter, \n pepIconTextAlignLeft, \n pepIconTextAlignRight\n]\n\n@NgModule({\n declarations: [\n GroupButtonsSettingsComponent\n ],\n imports: [\n CommonModule,\n PepNgxLibModule,\n PepFieldTitleModule,\n PepGroupButtonsModule,\n PepIconModule\n ],\n exports: [GroupButtonsSettingsComponent]\n})\nexport class PepGroupButtonsSettingsModule { \n constructor(\n private pepIconRegistry: PepIconRegistry,\n ) {\n this.pepIconRegistry.registerIcons(pepIcons);\n }\n}\n","/*\n * Public API Surface of ngx-composite-lib/shadow-settings\n */\nexport * from './group-buttons-settings.module';\nexport * from './group-buttons-settings.component';\nexport * from './group-buttons-settings.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"m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B;wBACrB,aAAa;qBAChB;oBACD,OAAO,EAAE,CAAC,6BAA6B,CAAC;iBAC3C;;;AC1BD;;;;ACAA;;;;;;"}
@@ -1,9 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Directive, Input, NgModule, Injectable } from '@angular/core';
2
+ import { EventEmitter, Directive, Input, Injectable, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
3
4
  import { __awaiter } from 'tslib';
4
5
  import * as i1 from '@pepperi-addons/ngx-lib/icon';
5
6
  import { pepIconDeviceResponsive, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
6
7
  import * as i2 from '@ngx-translate/core';
8
+ import * as i1$1 from '@pepperi-addons/ngx-lib/remote-loader';
9
+ import { PepRemoteLoaderModule } from '@pepperi-addons/ngx-lib/remote-loader';
7
10
 
8
11
  class PepResetConfigurationFieldDirective {
9
12
  constructor(renderer, element, pepIconService, translate) {
@@ -28,14 +31,16 @@ class PepResetConfigurationFieldDirective {
28
31
  }
29
32
  set disabled(value) {
30
33
  this._disabled = value;
31
- this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());
34
+ // this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());
35
+ this.setButtonStyle(this.resetButton);
32
36
  }
33
37
  get disabled() {
34
38
  return this._disabled;
35
39
  }
36
40
  set hideReset(value) {
37
41
  this._hideReset = value;
38
- this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());
42
+ // this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());
43
+ this.setButtonStyle(this.resetButton);
39
44
  }
40
45
  get hideReset() {
41
46
  return this._hideReset;
@@ -63,17 +68,19 @@ class PepResetConfigurationFieldDirective {
63
68
  this.buttonContainer.setAttribute("style", css);
64
69
  }
65
70
  setButtonStyle(button) {
66
- const css = `
67
- display: flex !important;
68
- align-items: center !important;
69
- height: 1rem !important;
70
- line-height: unset !important;
71
- padding: unset !important;
72
- background: unset !important;
73
- font-size: var(--pep-button-2xs-font-size) !important;
74
- visibility: ${this.getVisibility()};
75
- `;
76
- button.setAttribute("style", css);
71
+ if (button) {
72
+ const css = `
73
+ display: flex !important;
74
+ align-items: center !important;
75
+ height: 1rem !important;
76
+ line-height: unset !important;
77
+ padding: unset !important;
78
+ background: unset !important;
79
+ font-size: var(--pep-button-2xs-font-size) !important;
80
+ visibility: ${this.getVisibility()};
81
+ `;
82
+ button.setAttribute("style", css);
83
+ }
77
84
  }
78
85
  setSvgStyle(svg) {
79
86
  const css = `
@@ -87,20 +94,20 @@ class PepResetConfigurationFieldDirective {
87
94
  this.setButtonContainerStyle();
88
95
  this.renderer.addClass(this.buttonContainer, 'pep-reset-configuration-field-container');
89
96
  // Append button
90
- const button = this.renderer.createElement('button');
97
+ this.resetButton = this.renderer.createElement('button');
91
98
  yield this.translate.get('ACTIONS.RESET').toPromise().then(resetText => {
92
99
  const buttonText = this.renderer.createText(resetText);
93
- this.renderer.appendChild(button, buttonText);
100
+ this.renderer.appendChild(this.resetButton, buttonText);
94
101
  });
95
- this.renderer.addClass(button, 'pep-button');
102
+ this.renderer.addClass(this.resetButton, 'pep-button');
96
103
  // this.renderer.addClass(button, this.styleType);
97
104
  // this.renderer.addClass(button, this.styleStateType);
98
- this.renderer.addClass(button, 'color-link');
99
- this.renderer.addClass(button, this.sizeType);
100
- this.setButtonStyle(button);
105
+ this.renderer.addClass(this.resetButton, 'color-link');
106
+ this.renderer.addClass(this.resetButton, this.sizeType);
107
+ this.setButtonStyle(this.resetButton);
101
108
  // this.renderer.addClass(button, 'reset-configuration-field-button');
102
- this.unlistener = this.renderer.listen(button, 'click', () => this.onResetClicked());
103
- this.renderer.appendChild(this.buttonContainer, button);
109
+ this.unlistener = this.renderer.listen(this.resetButton, 'click', () => this.onResetClicked());
110
+ this.renderer.appendChild(this.buttonContainer, this.resetButton);
104
111
  // Append svg
105
112
  const svgIcon = this.pepIconService.getSvgIcon(pepIconDeviceResponsive.name);
106
113
  this.setSvgStyle(svgIcon);
@@ -152,6 +159,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
152
159
  type: Input
153
160
  }] } });
154
161
 
162
+ /*
163
+ This service is for utillity usege.
164
+ */
165
+ class PepCompositeLibUtilitiesService {
166
+ constructor() {
167
+ //
168
+ }
169
+ }
170
+ PepCompositeLibUtilitiesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
171
+ PepCompositeLibUtilitiesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, providedIn: 'root' });
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, decorators: [{
173
+ type: Injectable,
174
+ args: [{
175
+ providedIn: 'root',
176
+ }]
177
+ }], ctorParameters: function () { return []; } });
178
+
179
+ class PepDIMXHelperService {
180
+ constructor(addonBlockLoaderService) {
181
+ this.addonBlockLoaderService = addonBlockLoaderService;
182
+ }
183
+ register(viewContainerRef, dimxHostObject, onDIMXProcessDoneCallback) {
184
+ this.addonBlockLoaderService.loadAddonBlockInContainer({
185
+ container: viewContainerRef,
186
+ name: 'DIMX',
187
+ hostObject: dimxHostObject,
188
+ hostEventsCallback: (event) => {
189
+ if (event.action === 'DIMXFunctionsRegister') {
190
+ this.dimxFunctions = event.value;
191
+ }
192
+ else if (event.action === 'DIMXProcessDone') {
193
+ onDIMXProcessDoneCallback(event.value);
194
+ }
195
+ else {
196
+ console.error('Unknown event action: ' + event.action);
197
+ }
198
+ }
199
+ });
200
+ }
201
+ import(options) {
202
+ var _a;
203
+ if (typeof ((_a = this.dimxFunctions) === null || _a === void 0 ? void 0 : _a.DIMXImport) === 'function') {
204
+ this.dimxFunctions.DIMXImport(options);
205
+ }
206
+ else {
207
+ console.error('DIMXImport function not found, are you registered?');
208
+ }
209
+ }
210
+ export(options) {
211
+ var _a;
212
+ if (typeof ((_a = this.dimxFunctions) === null || _a === void 0 ? void 0 : _a.DIMXExport) === 'function') {
213
+ this.dimxFunctions.DIMXExport(options);
214
+ }
215
+ else {
216
+ console.error('DIMXExport function not found, are you registered?');
217
+ }
218
+ }
219
+ }
220
+ PepDIMXHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepDIMXHelperService, deps: [{ token: i1$1.PepAddonBlockLoaderService }], target: i0.ɵɵFactoryTarget.Injectable });
221
+ PepDIMXHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepDIMXHelperService });
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepDIMXHelperService, decorators: [{
223
+ type: Injectable
224
+ }], ctorParameters: function () { return [{ type: i1$1.PepAddonBlockLoaderService }]; } });
225
+
226
+ /*
227
+ * Public API Surface of ngx-composite-lib/core/common/services
228
+ */
229
+
230
+ /*
231
+ * export from ngx-composite-lib/core/common/services
232
+ */
233
+
155
234
  const utilitiesList = [
156
235
  PepResetConfigurationFieldDirective
157
236
  ];
@@ -164,12 +243,16 @@ class PepNgxCompositeLibModule {
164
243
  }
165
244
  }
166
245
  PepNgxCompositeLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepNgxCompositeLibModule, deps: [{ token: i1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
167
- PepNgxCompositeLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepNgxCompositeLibModule, declarations: [PepResetConfigurationFieldDirective], imports: [
168
- // CommonModule, HttpClientModule, ReactiveFormsModule
169
- PepIconModule], exports: [PepResetConfigurationFieldDirective] });
170
- PepNgxCompositeLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepNgxCompositeLibModule, imports: [[
171
- // CommonModule, HttpClientModule, ReactiveFormsModule
246
+ PepNgxCompositeLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepNgxCompositeLibModule, declarations: [PepResetConfigurationFieldDirective], imports: [CommonModule,
247
+ PepIconModule,
248
+ PepRemoteLoaderModule], exports: [PepResetConfigurationFieldDirective] });
249
+ PepNgxCompositeLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepNgxCompositeLibModule, providers: [
250
+ PepDIMXHelperService,
251
+ PepCompositeLibUtilitiesService
252
+ ], imports: [[
253
+ CommonModule,
172
254
  PepIconModule,
255
+ PepRemoteLoaderModule,
173
256
  ]] });
174
257
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepNgxCompositeLibModule, decorators: [{
175
258
  type: NgModule,
@@ -178,41 +261,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
178
261
  utilitiesList
179
262
  ],
180
263
  imports: [
181
- // CommonModule, HttpClientModule, ReactiveFormsModule
264
+ CommonModule,
182
265
  PepIconModule,
266
+ PepRemoteLoaderModule,
183
267
  ],
184
268
  exports: [
185
269
  utilitiesList
186
270
  // TranslateModule
271
+ ],
272
+ providers: [
273
+ PepDIMXHelperService,
274
+ PepCompositeLibUtilitiesService
187
275
  ]
188
276
  }]
189
277
  }], ctorParameters: function () { return [{ type: i1.PepIconRegistry }]; } });
190
278
 
191
- /*
192
- This service is for utillity usege.
193
- */
194
- class PepCompositeLibUtilitiesService {
195
- constructor() {
196
- //
197
- }
198
- }
199
- PepCompositeLibUtilitiesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
200
- PepCompositeLibUtilitiesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, providedIn: 'root' });
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, decorators: [{
202
- type: Injectable,
203
- args: [{
204
- providedIn: 'root',
205
- }]
206
- }], ctorParameters: function () { return []; } });
207
-
208
- /*
209
- * Public API Surface of ngx-composite-lib/core/common/services
210
- */
211
-
212
- /*
213
- * export from ngx-composite-lib/core/common/services
214
- */
215
-
216
279
  /*
217
280
  * Public API Surface of ngx-composite-lib/core/common/directives
218
281
  */
@@ -245,5 +308,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
245
308
  * Generated bundle index. Do not edit.
246
309
  */
247
310
 
248
- export { PepCompositeLibUtilitiesService, PepNgxCompositeLibModule, PepResetConfigurationFieldDirective };
311
+ export { PepCompositeLibUtilitiesService, PepDIMXHelperService, PepNgxCompositeLibModule, PepResetConfigurationFieldDirective };
249
312
  //# sourceMappingURL=pepperi-addons-ngx-composite-lib.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-composite-lib.js","sources":["../../../projects/ngx-composite-lib/src/core/common/directives/reset-configuration-field.directive.ts","../../../projects/ngx-composite-lib/src/ngx-composite-lib.module.ts","../../../projects/ngx-composite-lib/src/core/common/services/utilities.service.ts","../../../projects/ngx-composite-lib/src/core/common/services/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/services/index.ts","../../../projects/ngx-composite-lib/src/core/common/directives/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/directives/index.ts","../../../projects/ngx-composite-lib/src/core/common/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/index.ts","../../../projects/ngx-composite-lib/src/core/public-api.ts","../../../projects/ngx-composite-lib/src/core/index.ts","../../../projects/ngx-composite-lib/src/public-api.ts","../../../projects/ngx-composite-lib/src/pepperi-addons-ngx-composite-lib.ts"],"sourcesContent":["import { Directive, HostListener, ElementRef, AfterViewInit, TemplateRef, ViewContainerRef, Renderer2, Output, EventEmitter, Input, OnDestroy } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { PepSizeType, PepStyleStateType, PepStyleType } from '@pepperi-addons/ngx-lib';\r\nimport { PepIconService, pepIconDeviceResponsive } from '@pepperi-addons/ngx-lib/icon';\r\n\r\n\r\n@Directive({\r\n selector: '[pepResetConfigurationField]',\r\n})\r\nexport class PepResetConfigurationFieldDirective implements AfterViewInit, OnDestroy {\r\n @Input('pepResetConfigurationField') resetFieldKey = '';\r\n @Input() resetHostEvents: EventEmitter<any> = new EventEmitter();\r\n \r\n private _disabled = false;\r\n @Input() \r\n set disabled(value: boolean) {\r\n this._disabled = value;\r\n this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());\r\n }\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n private _hideReset = false;\r\n @Input() \r\n set hideReset(value: boolean) {\r\n this._hideReset = value;\r\n this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());\r\n }\r\n get hideReset(): boolean {\r\n return this._hideReset;\r\n }\r\n\r\n private _dir: 'rtl' | 'ltr' = 'ltr';\r\n @Input() \r\n set dir(value: 'rtl' | 'ltr') {\r\n this._dir = value;\r\n this.renderer.setStyle(this.buttonContainer, 'float', this.getFloat());\r\n }\r\n get dir(): 'rtl' | 'ltr' {\r\n return this._dir;\r\n }\r\n\r\n // styleType: PepStyleType = 'weak';\r\n // styleStateType: PepStyleStateType = 'system';\r\n sizeType: PepSizeType = 'sm';\r\n resetPosition = 'bottom-end';\r\n \r\n private unlistener: (() => void) | undefined;\r\n private buttonContainer!: HTMLDivElement;\r\n\r\n constructor(\r\n private renderer:Renderer2,\r\n private element: ElementRef,\r\n private pepIconService: PepIconService,\r\n private translate: TranslateService) {\r\n // Create the buton container.\r\n this.buttonContainer = this.renderer.createElement('div');\r\n\r\n this.translate.get('GENERAL.RESET_HINT').toPromise().then(hint => {\r\n this.renderer.setAttribute(this.buttonContainer, 'title', hint);\r\n });\r\n }\r\n\r\n private getVisibility() {\r\n return this.disabled || this.hideReset ? 'hidden' : 'visible';\r\n }\r\n\r\n private getFloat() {\r\n return this.dir === 'rtl' ? 'left' : 'right';\r\n }\r\n\r\n private setButtonContainerStyle() {\r\n const css = `\r\n display: flex;\r\n justify-content: flex-end;\r\n float: ${this.getFloat()};\r\n margin-bottom: 1rem;\r\n `;\r\n\r\n this.buttonContainer.setAttribute(\"style\", css);\r\n }\r\n\r\n private setButtonStyle(button: HTMLButtonElement) {\r\n const css = `\r\n display: flex !important;\r\n align-items: center !important;\r\n height: 1rem !important;\r\n line-height: unset !important;\r\n padding: unset !important;\r\n background: unset !important;\r\n font-size: var(--pep-button-2xs-font-size) !important;\r\n visibility: ${this.getVisibility()};\r\n `;\r\n\r\n button.setAttribute(\"style\", css);\r\n }\r\n\r\n private setSvgStyle(svg: SVGElement) {\r\n const css = `\r\n transform: rotate(270deg);\r\n width: 0.75rem;\r\n `;\r\n svg.setAttribute('style', css);\r\n }\r\n\r\n private async getResetElement(): Promise<HTMLElement> {\r\n this.setButtonContainerStyle();\r\n this.renderer.addClass(this.buttonContainer, 'pep-reset-configuration-field-container');\r\n\r\n // Append button\r\n const button: HTMLButtonElement = this.renderer.createElement('button');\r\n await this.translate.get('ACTIONS.RESET').toPromise().then(resetText => {\r\n const buttonText = this.renderer.createText(resetText);\r\n this.renderer.appendChild(button, buttonText);\r\n });\r\n \r\n this.renderer.addClass(button, 'pep-button');\r\n // this.renderer.addClass(button, this.styleType);\r\n // this.renderer.addClass(button, this.styleStateType);\r\n this.renderer.addClass(button, 'color-link');\r\n this.renderer.addClass(button, this.sizeType);\r\n this.setButtonStyle(button);\r\n // this.renderer.addClass(button, 'reset-configuration-field-button');\r\n \r\n this.unlistener = this.renderer.listen(button, 'click', () => this.onResetClicked());\r\n \r\n this.renderer.appendChild(this.buttonContainer, button);\r\n\r\n // Append svg\r\n const svgIcon = this.pepIconService.getSvgIcon(pepIconDeviceResponsive.name);\r\n this.setSvgStyle(svgIcon);\r\n this.renderer.appendChild(this.buttonContainer, svgIcon);\r\n\r\n\r\n return this.buttonContainer;\r\n }\r\n\r\n \r\n ngAfterViewInit(): void {\r\n this.getResetElement().then(element => {\r\n if (this.resetPosition === 'top-end' && this.element.nativeElement.children?.length > 0) {\r\n this.renderer.insertBefore(this.element.nativeElement, element, this.element.nativeElement.children[0]);\r\n } else {\r\n this.renderer.appendChild(this.element.nativeElement, element);\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.unlistener) {\r\n this.unlistener();\r\n }\r\n }\r\n\r\n onResetClicked() {\r\n this.resetHostEvents.emit({\r\n action: 'set-configuration-field',\r\n key: this.resetFieldKey,\r\n value: undefined\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\n// import { TranslateModule } from '@ngx-translate/core';\n// import { CommonModule } from '@angular/common';\n// import { HttpClientModule } from '@angular/common/http';\n// import { ReactiveFormsModule } from '@angular/forms';\nimport { PepResetConfigurationFieldDirective } from './core/common/directives/reset-configuration-field.directive';\n\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconDeviceResponsive,\n} from '@pepperi-addons/ngx-lib/icon';\n \n\nconst utilitiesList = [\n PepResetConfigurationFieldDirective\n];\n\n@NgModule({\n declarations: [\n utilitiesList\n ],\n imports: [\n // CommonModule, HttpClientModule, ReactiveFormsModule\n PepIconModule,\n ],\n exports: [\n utilitiesList\n // TranslateModule\n ]\n})\nexport class PepNgxCompositeLibModule {\n constructor(\n private pepIconRegistry: PepIconRegistry\n ) {\n this.pepIconRegistry.registerIcons([\n pepIconDeviceResponsive\n ]);\n }\n}\n","import { Injectable } from '@angular/core';\r\n\r\n/*\r\n This service is for utillity usege.\r\n*/\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class PepCompositeLibUtilitiesService {\r\n constructor(\r\n // private sessionService: PepSessionService,\r\n // private httpService: PepHttpService,\r\n // private loaderService: PepLoaderService\r\n ) {\r\n //\r\n }\r\n}\r\n","/*\n * Public API Surface of ngx-composite-lib/core/common/services\n */\nexport * from './utilities.service';\n","/*\n * export from ngx-composite-lib/core/common/services\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib/core/common/directives\n */\nexport * from '../directives/reset-configuration-field.directive';\n","/*\n * export from ngx-composite-lib/core/common/directives\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib/core/common\n */\nexport * from './services/index';\nexport * from './directives/index';\n","/*\n * export from ngx-composite-lib/core/common\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib/core\n */\nexport * from './common/index';","/*\n * export from ngx-composite-lib/core\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib\n */\nexport * from './ngx-composite-lib.module';\nexport * from './core/index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MASa,mCAAmC;IA0C5C,YACY,QAAkB,EAClB,OAAmB,EACnB,cAA8B,EAC9B,SAA2B;QAH3B,aAAQ,GAAR,QAAQ,CAAU;QAClB,YAAO,GAAP,OAAO,CAAY;QACnB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,cAAS,GAAT,SAAS,CAAkB;QA7CF,kBAAa,GAAG,EAAE,CAAC;QAC/C,oBAAe,GAAsB,IAAI,YAAY,EAAE,CAAC;QAEzD,cAAS,GAAG,KAAK,CAAC;QAUlB,eAAU,GAAG,KAAK,CAAC;QAUnB,SAAI,GAAkB,KAAK,CAAC;;;QAYpC,aAAQ,GAAgB,IAAI,CAAC;QAC7B,kBAAa,GAAG,YAAY,CAAC;;QAWzB,IAAI,CAAC,eAAe,GAAG,IAAI,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CAAC,aAAa;YACvB,KAAK,EAAE,SAAS;SACnB,CAAC,CAAC;KACN;;gIAxJQ,mCAAmC;oHAAnC,mCAAmC;2FAAnC,mCAAmC;kBAH/C,SAAS;mBAAC;oBACP,QAAQ,EAAE,8BAA8B;iBAC3C;qLAEwC,aAAa;sBAAjD,KAAK;uBAAC,4BAA4B;gBAC1B,eAAe;sBAAvB,KAAK;gBAIF,QAAQ;sBADX,KAAK;gBAWF,SAAS;sBADZ,KAAK;gBAWF,GAAG;sBADN,KAAK;;;ACpBV,MAAM,aAAa,GAAG;IAClB,mCAAmC;CACtC,CAAC;MAeW,wBAAwB;IACjC,YACY,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;QAExC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;YAC/B,uBAAuB;SAC1B,CAAC,CAAC;KACN;;qHAPQ,wBAAwB;sHAAxB,wBAAwB,iBAhBjC,mCAAmC;;QAS/B,aAAa,aATjB,mCAAmC;sHAgB1B,wBAAwB,YATxB;;YAEL,aAAa;SAChB;2FAMQ,wBAAwB;kBAbpC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,aAAa;qBAChB;oBACD,OAAO,EAAE;;wBAEL,aAAa;qBAChB;oBACD,OAAO,EAAE;wBACL,aAAa;;qBAEhB;iBACJ;;;AC5BD;;;MAMa,+BAA+B;IACxC;;KAMC;;4HAPQ,+BAA+B;gIAA/B,+BAA+B,cAF5B,MAAM;2FAET,+BAA+B;kBAH3C,UAAU;mBAAC;oBACR,UAAU,EAAE,MAAM;iBACrB;;;ACPD;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-composite-lib.js","sources":["../../../projects/ngx-composite-lib/src/core/common/directives/reset-configuration-field.directive.ts","../../../projects/ngx-composite-lib/src/core/common/services/utilities.service.ts","../../../projects/ngx-composite-lib/src/core/common/services/dimx.service.ts","../../../projects/ngx-composite-lib/src/core/common/services/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/services/index.ts","../../../projects/ngx-composite-lib/src/ngx-composite-lib.module.ts","../../../projects/ngx-composite-lib/src/core/common/directives/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/directives/index.ts","../../../projects/ngx-composite-lib/src/core/common/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/index.ts","../../../projects/ngx-composite-lib/src/core/public-api.ts","../../../projects/ngx-composite-lib/src/core/index.ts","../../../projects/ngx-composite-lib/src/public-api.ts","../../../projects/ngx-composite-lib/src/pepperi-addons-ngx-composite-lib.ts"],"sourcesContent":["import { Directive, HostListener, ElementRef, AfterViewInit, TemplateRef, ViewContainerRef, Renderer2, Output, EventEmitter, Input, OnDestroy } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { PepSizeType, PepStyleStateType, PepStyleType } from '@pepperi-addons/ngx-lib';\r\nimport { PepIconService, pepIconDeviceResponsive } from '@pepperi-addons/ngx-lib/icon';\r\n\r\n\r\n@Directive({\r\n selector: '[pepResetConfigurationField]',\r\n})\r\nexport class PepResetConfigurationFieldDirective implements AfterViewInit, OnDestroy {\r\n @Input('pepResetConfigurationField') resetFieldKey = '';\r\n @Input() resetHostEvents: EventEmitter<any> = new EventEmitter();\r\n \r\n private _disabled = false;\r\n @Input() \r\n set disabled(value: boolean) {\r\n this._disabled = value;\r\n // this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());\r\n this.setButtonStyle(this.resetButton);\r\n }\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n private _hideReset = false;\r\n @Input() \r\n set hideReset(value: boolean) {\r\n this._hideReset = value;\r\n // this.renderer.setStyle(this.buttonContainer, 'visibility', this.getVisibility());\r\n this.setButtonStyle(this.resetButton);\r\n }\r\n get hideReset(): boolean {\r\n return this._hideReset;\r\n }\r\n\r\n private _dir: 'rtl' | 'ltr' = 'ltr';\r\n @Input() \r\n set dir(value: 'rtl' | 'ltr') {\r\n this._dir = value;\r\n this.renderer.setStyle(this.buttonContainer, 'float', this.getFloat());\r\n }\r\n get dir(): 'rtl' | 'ltr' {\r\n return this._dir;\r\n }\r\n\r\n // styleType: PepStyleType = 'weak';\r\n // styleStateType: PepStyleStateType = 'system';\r\n sizeType: PepSizeType = 'sm';\r\n resetPosition = 'bottom-end';\r\n \r\n private unlistener: (() => void) | undefined;\r\n private buttonContainer!: HTMLDivElement;\r\n private resetButton!: HTMLButtonElement;\r\n\r\n constructor(\r\n private renderer:Renderer2,\r\n private element: ElementRef,\r\n private pepIconService: PepIconService,\r\n private translate: TranslateService) {\r\n // Create the buton container.\r\n this.buttonContainer = this.renderer.createElement('div');\r\n\r\n this.translate.get('GENERAL.RESET_HINT').toPromise().then(hint => {\r\n this.renderer.setAttribute(this.buttonContainer, 'title', hint);\r\n });\r\n }\r\n\r\n private getVisibility() {\r\n return this.disabled || this.hideReset ? 'hidden' : 'visible';\r\n }\r\n\r\n private getFloat() {\r\n return this.dir === 'rtl' ? 'left' : 'right';\r\n }\r\n\r\n private setButtonContainerStyle() {\r\n const css = `\r\n display: flex;\r\n justify-content: flex-end;\r\n float: ${this.getFloat()};\r\n margin-bottom: 1rem;\r\n `;\r\n\r\n this.buttonContainer.setAttribute(\"style\", css);\r\n }\r\n\r\n private setButtonStyle(button: HTMLButtonElement) {\r\n if (button) {\r\n const css = `\r\n display: flex !important;\r\n align-items: center !important;\r\n height: 1rem !important;\r\n line-height: unset !important;\r\n padding: unset !important;\r\n background: unset !important;\r\n font-size: var(--pep-button-2xs-font-size) !important;\r\n visibility: ${this.getVisibility()};\r\n `;\r\n \r\n button.setAttribute(\"style\", css);\r\n }\r\n }\r\n\r\n private setSvgStyle(svg: SVGElement) {\r\n const css = `\r\n transform: rotate(270deg);\r\n width: 0.75rem;\r\n `;\r\n svg.setAttribute('style', css);\r\n }\r\n\r\n private async getResetElement(): Promise<HTMLElement> {\r\n this.setButtonContainerStyle();\r\n this.renderer.addClass(this.buttonContainer, 'pep-reset-configuration-field-container');\r\n\r\n // Append button\r\n this.resetButton = this.renderer.createElement('button');\r\n await this.translate.get('ACTIONS.RESET').toPromise().then(resetText => {\r\n const buttonText = this.renderer.createText(resetText);\r\n this.renderer.appendChild(this.resetButton, buttonText);\r\n });\r\n \r\n this.renderer.addClass(this.resetButton, 'pep-button');\r\n // this.renderer.addClass(button, this.styleType);\r\n // this.renderer.addClass(button, this.styleStateType);\r\n this.renderer.addClass(this.resetButton, 'color-link');\r\n this.renderer.addClass(this.resetButton, this.sizeType);\r\n this.setButtonStyle(this.resetButton);\r\n // this.renderer.addClass(button, 'reset-configuration-field-button');\r\n \r\n this.unlistener = this.renderer.listen(this.resetButton, 'click', () => this.onResetClicked());\r\n \r\n this.renderer.appendChild(this.buttonContainer, this.resetButton);\r\n\r\n // Append svg\r\n const svgIcon = this.pepIconService.getSvgIcon(pepIconDeviceResponsive.name);\r\n this.setSvgStyle(svgIcon);\r\n this.renderer.appendChild(this.buttonContainer, svgIcon);\r\n\r\n return this.buttonContainer;\r\n }\r\n \r\n ngAfterViewInit(): void {\r\n this.getResetElement().then(element => {\r\n if (this.resetPosition === 'top-end' && this.element.nativeElement.children?.length > 0) {\r\n this.renderer.insertBefore(this.element.nativeElement, element, this.element.nativeElement.children[0]);\r\n } else {\r\n this.renderer.appendChild(this.element.nativeElement, element);\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.unlistener) {\r\n this.unlistener();\r\n }\r\n }\r\n\r\n onResetClicked() {\r\n this.resetHostEvents.emit({\r\n action: 'set-configuration-field',\r\n key: this.resetFieldKey,\r\n value: undefined\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n/*\r\n This service is for utillity usege.\r\n*/\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class PepCompositeLibUtilitiesService {\r\n constructor(\r\n // private sessionService: PepSessionService,\r\n // private httpService: PepHttpService,\r\n // private loaderService: PepLoaderService\r\n ) {\r\n //\r\n }\r\n}\r\n","import { Injectable, ViewContainerRef } from \"@angular/core\";\r\nimport { PepAddonBlockLoaderService } from \"@pepperi-addons/ngx-lib/remote-loader\";\r\n\r\nexport interface DIMXHostObject {\r\n DIMXAddonUUID: string;\r\n DIMXResource: string;\r\n}\r\n\r\nexport interface DIMXImportOptions {\r\n OverwriteObject?: boolean;\r\n Delimiter?: string;\r\n OwnerID?: string;\r\n ActionID?: string;\r\n}\r\n\r\nexport interface DIMXExportOptions {\r\n DIMXExportFormat?: string;\r\n DIMXExportIncludeDeleted?: boolean;\r\n DIMXExportFileName?: string;\r\n DIMXExportWhere?: string;\r\n DIMXExportFields?: string;\r\n DIMXExportDelimiter?: string;\r\n ActionID?: string;\r\n}\r\n\r\n@Injectable()\r\nexport class PepDIMXHelperService {\r\n private dimxFunctions!: { \r\n DIMXImport: (options?: DIMXImportOptions) => void, \r\n DIMXExport: (options?: DIMXExportOptions) => void \r\n };\r\n\r\n constructor(\r\n private addonBlockLoaderService: PepAddonBlockLoaderService\r\n ) {\r\n }\r\n\r\n register(viewContainerRef: ViewContainerRef, dimxHostObject: DIMXHostObject, onDIMXProcessDoneCallback: (dimxEvent: any) => void) {\r\n this.addonBlockLoaderService.loadAddonBlockInContainer({\r\n container: viewContainerRef,\r\n name: 'DIMX',\r\n hostObject: dimxHostObject,\r\n hostEventsCallback: (event: any) => {\r\n if (event.action === 'DIMXFunctionsRegister') {\r\n this.dimxFunctions = event.value;\r\n } else if (event.action === 'DIMXProcessDone') {\r\n onDIMXProcessDoneCallback(event.value);\r\n } else {\r\n console.error('Unknown event action: ' + event.action);\r\n }\r\n }\r\n });\r\n }\r\n\r\n import(options?: DIMXImportOptions) {\r\n if (typeof(this.dimxFunctions?.DIMXImport) === 'function') {\r\n this.dimxFunctions.DIMXImport(options);\r\n } else {\r\n console.error('DIMXImport function not found, are you registered?');\r\n }\r\n }\r\n\r\n export(options?: DIMXExportOptions) {\r\n if (typeof(this.dimxFunctions?.DIMXExport) === 'function') {\r\n this.dimxFunctions.DIMXExport(options);\r\n } else {\r\n console.error('DIMXExport function not found, are you registered?');\r\n }\r\n }\r\n}","/*\n * Public API Surface of ngx-composite-lib/core/common/services\n */\nexport * from './utilities.service';\nexport * from './dimx.service';\n","/*\n * export from ngx-composite-lib/core/common/services\n */\nexport * from './public-api';\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n// import { TranslateModule } from '@ngx-translate/core';\n// import { HttpClientModule } from '@angular/common/http';\n// import { ReactiveFormsModule } from '@angular/forms';\nimport { PepResetConfigurationFieldDirective } from './core/common/directives/reset-configuration-field.directive';\nimport { PepDIMXHelperService, PepCompositeLibUtilitiesService } from './core/common/services/index';\n\nimport { PepRemoteLoaderModule } from '@pepperi-addons/ngx-lib/remote-loader';\n\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconDeviceResponsive,\n} from '@pepperi-addons/ngx-lib/icon';\n\nconst utilitiesList = [\n PepResetConfigurationFieldDirective\n];\n\n@NgModule({\n declarations: [\n utilitiesList\n ],\n imports: [\n CommonModule,\n PepIconModule,\n PepRemoteLoaderModule,\n ],\n exports: [\n utilitiesList\n // TranslateModule\n ],\n providers: [\n PepDIMXHelperService,\n PepCompositeLibUtilitiesService\n ]\n})\nexport class PepNgxCompositeLibModule {\n constructor(\n private pepIconRegistry: PepIconRegistry\n ) {\n this.pepIconRegistry.registerIcons([\n pepIconDeviceResponsive\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-composite-lib/core/common/directives\n */\nexport * from '../directives/reset-configuration-field.directive';\n","/*\n * export from ngx-composite-lib/core/common/directives\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib/core/common\n */\nexport * from './services/index';\nexport * from './directives/index';\n","/*\n * export from ngx-composite-lib/core/common\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib/core\n */\nexport * from './common/index';","/*\n * export from ngx-composite-lib/core\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib\n */\nexport * from './ngx-composite-lib.module';\nexport * from './core/index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MASa,mCAAmC;IA6C5C,YACY,QAAkB,EAClB,OAAmB,EACnB,cAA8B,EAC9B,SAA2B;QAH3B,aAAQ,GAAR,QAAQ,CAAU;QAClB,YAAO,GAAP,OAAO,CAAY;QACnB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,cAAS,GAAT,SAAS,CAAkB;QAhDF,kBAAa,GAAG,EAAE,CAAC;QAC/C,oBAAe,GAAsB,IAAI,YAAY,EAAE,CAAC;QAEzD,cAAS,GAAG,KAAK,CAAC;QAWlB,eAAU,GAAG,KAAK,CAAC;QAWnB,SAAI,GAAkB,KAAK,CAAC;;;QAYpC,aAAQ,GAAgB,IAAI,CAAC;QAC7B,kBAAa,GAAG,YAAY,CAAC;;QAYzB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE1D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI;YAC1D,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;SACnE,CAAC,CAAC;KACN;IAnDD,IACI,QAAQ,CAAC,KAAc;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;;QAEvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACzC;IACD,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;KACzB;IAGD,IACI,SAAS,CAAC,KAAc;QACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;;QAExB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACz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AAC,aAAa,CAAC;YAC/B,uBAAuB;SAC1B,CAAC,CAAC;KACN;;qHAPQ,wBAAwB;sHAAxB,wBAAwB,iBArBjC,mCAAmC,aAQ/B,YAAY;QACZ,aAAa;QACb,qBAAqB,aAVzB,mCAAmC;sHAqB1B,wBAAwB,aALtB;QACP,oBAAoB;QACpB,+BAA+B;KAClC,YAZQ;YACL,YAAY;YACZ,aAAa;YACb,qBAAqB;SACxB;2FAUQ,wBAAwB;kBAlBpC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,aAAa;qBAChB;oBACD,OAAO,EAAE;wBACL,YAAY;wBACZ,aAAa;wBACb,qBAAqB;qBACxB;oBACD,OAAO,EAAE;wBACL,aAAa;;qBAEhB;oBACD,SAAS,EAAE;wBACP,oBAAoB;wBACpB,+BAA+B;qBAClC;iBACJ;;;ACrCD;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;;;"}
@@ -1,3 +1,4 @@
1
+ import { PepIconRegistry } from '@pepperi-addons/ngx-lib/icon';
1
2
  import * as i0 from "@angular/core";
2
3
  import * as i1 from "./file-status-panel.component";
3
4
  import * as i2 from "@angular/common";
@@ -8,6 +9,8 @@ import * as i6 from "@pepperi-addons/ngx-lib/icon";
8
9
  import * as i7 from "@pepperi-addons/ngx-lib/dialog";
9
10
  import * as i8 from "@pepperi-addons/ngx-lib/snack-bar";
10
11
  export declare class PepFileStatusPanelModule {
12
+ private pepIconRegistry;
13
+ constructor(pepIconRegistry: PepIconRegistry);
11
14
  static ɵfac: i0.ɵɵFactoryDeclaration<PepFileStatusPanelModule, never>;
12
15
  static ɵmod: i0.ɵɵNgModuleDeclaration<PepFileStatusPanelModule, [typeof i1.FileStatusPanelComponent], [typeof i2.CommonModule, typeof i3.PepTopBarModule, typeof i4.PepTextboxModule, typeof i5.PepButtonModule, typeof i6.PepIconModule, typeof i7.PepDialogModule, typeof i8.PepSnackBarModule], [typeof i1.FileStatusPanelComponent]>;
13
16
  static ɵinj: i0.ɵɵInjectorDeclaration<PepFileStatusPanelModule>;
@@ -1,17 +1,19 @@
1
- import { OnInit, EventEmitter } from '@angular/core';
1
+ import { OnInit, ViewContainerRef, EventEmitter, ComponentFactoryResolver } from '@angular/core';
2
+ import { IPepGenericFormDataView, IPepGenericFormValueChange, IPepGenericFormFieldUpdate, IPepGenericFormData } from './generic-form.model';
2
3
  import { PepLayoutService } from '@pepperi-addons/ngx-lib';
3
- import { IPepGenericFormDataView, IPepGenericFormValueChange, IPepGenericFormFieldUpdate } from './generic-form.model';
4
- import { UIControl, ObjectsDataRow } from '@pepperi-addons/ngx-lib';
5
4
  import { PepGenericFormService } from './generic-form.service';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class GenericFormComponent implements OnInit {
7
+ private _resolver;
8
8
  private layoutService;
9
9
  _genericFormService: PepGenericFormService;
10
+ private _pepFormContainer;
11
+ set pepListContainer(val: ViewContainerRef);
10
12
  private _data;
11
13
  set dataSource(val: any);
12
14
  private _optionalValues;
13
- formData: ObjectsDataRow;
14
- uiControl: UIControl;
15
+ private _formData;
16
+ private _uiControl;
15
17
  set dataView(val: IPepGenericFormDataView);
16
18
  isLocked: boolean;
17
19
  inline: boolean;
@@ -20,24 +22,22 @@ export declare class GenericFormComponent implements OnInit {
20
22
  valueChange: EventEmitter<IPepGenericFormValueChange>;
21
23
  fieldClick: EventEmitter<IPepGenericFormValueChange>;
22
24
  formValidationChange: EventEmitter<boolean>;
23
- constructor(layoutService: PepLayoutService, _genericFormService: PepGenericFormService);
25
+ private _pepForm;
26
+ constructor(_resolver: ComponentFactoryResolver, layoutService: PepLayoutService, _genericFormService: PepGenericFormService);
24
27
  ngOnInit(): void;
25
- private createFormFields;
28
+ private initForm;
26
29
  /**
27
30
  * updates form field's value
28
31
  * @param field object containing the data of the required update
29
32
  */
30
33
  private updateFieldValue;
31
34
  private getOptionalValues;
32
- getData(): {
33
- UID: any;
34
- Values: any;
35
- };
35
+ getData(): IPepGenericFormData;
36
36
  /**
37
37
  * updates form field(s) params
38
38
  * @param fields
39
39
  */
40
- updateFields(fields: Array<IPepGenericFormFieldUpdate>): void;
40
+ updateFields(fields: IPepGenericFormFieldUpdate[]): void;
41
41
  onValueChanged(event: any): void;
42
42
  onfieldClicked(event: any): void;
43
43
  onFormValidationChanged(event: any): void;
@@ -1,11 +1,4 @@
1
- import { KeyValuePair } from '@pepperi-addons/ngx-lib';
2
1
  import { FormDataView } from '@pepperi-addons/papi-sdk/dist/entities/data-view';
3
- /**
4
- * Interface representing the form data
5
- */
6
- export interface IPepGenericFormDataSource {
7
- Values: Array<KeyValuePair<any>>;
8
- }
9
2
  /**
10
3
  * Interface represending the form data view
11
4
  */
@@ -13,23 +6,29 @@ export interface IPepGenericFormDataView extends FormDataView {
13
6
  UID?: string;
14
7
  }
15
8
  /**
16
- * Interface containing form data and data view
9
+ * Interface representing form data
17
10
  */
18
11
  export interface IPepGenericFormData {
19
- data: IPepGenericFormDataSource;
20
- dataView: IPepGenericFormDataView;
12
+ UID: string;
13
+ Values: {
14
+ [key: string]: any;
15
+ };
21
16
  }
22
17
  export interface IPepGenericFormValueChange {
23
- uid: string;
24
- apiName: string;
25
- value: any;
18
+ UID: string;
19
+ ApiName: string;
20
+ Value: any;
26
21
  }
27
22
  export interface IPepGenericFormFieldUpdate {
28
23
  FieldId: string;
29
24
  Params: IPepGenericFormDataParams;
30
25
  }
31
26
  export interface IPepGenericFormDataParams {
27
+ Value?: any;
32
28
  Visible?: boolean;
33
29
  Enabled?: boolean;
30
+ BackgroundColor?: string;
31
+ TextColor?: string;
32
+ Highlighted?: boolean;
34
33
  OptionalValues?: [];
35
34
  }
File without changes
@@ -1,8 +1,7 @@
1
1
  import { OnInit, EventEmitter, ViewContainerRef, ComponentFactoryResolver } from '@angular/core';
2
- import { TranslateService } from '@ngx-translate/core';
3
- import { PepDataConvertorService, PepLayoutService } from '@pepperi-addons/ngx-lib';
2
+ import { PepDataConvertorService, PepLayoutService, ObjectsDataRow, PepLoaderService } from '@pepperi-addons/ngx-lib';
4
3
  import { IPepFormFieldClickEvent } from '@pepperi-addons/ngx-lib/form';
5
- import { PepListComponent, PepListSelectionType, IPepListSortingChangeEvent, PepListTableViewType } from '@pepperi-addons/ngx-lib/list';
4
+ import { PepListComponent, PepSelectionData, PepListSelectionType, IPepListSortingChangeEvent, PepListTableViewType } from '@pepperi-addons/ngx-lib/list';
6
5
  import { PepMenuItem, IPepMenuItemClickEvent } from '@pepperi-addons/ngx-lib/menu';
7
6
  import { IPepFormFieldValueChangeEvent } from '@pepperi-addons/ngx-lib/form';
8
7
  import { PepBreadCrumbItem, IPepBreadCrumbItemClickEvent } from '@pepperi-addons/ngx-lib/bread-crumbs';
@@ -15,7 +14,7 @@ export declare class GenericListComponent implements OnInit {
15
14
  private _resolver;
16
15
  private _dataConvertorService;
17
16
  private _layoutService;
18
- private _translate;
17
+ private _loaderService;
19
18
  private _genericListService;
20
19
  search: PepSearchComponent | undefined;
21
20
  private _pepListContainer;
@@ -27,6 +26,7 @@ export declare class GenericListComponent implements OnInit {
27
26
  disabled: boolean;
28
27
  addPadding: boolean;
29
28
  title: string;
29
+ description: string;
30
30
  inline: boolean;
31
31
  showSearch: boolean;
32
32
  noDataFoundMsg: string;
@@ -44,8 +44,9 @@ export declare class GenericListComponent implements OnInit {
44
44
  set pepList(val: PepListComponent);
45
45
  get pepList(): PepListComponent;
46
46
  private _resize$;
47
+ private _loader$;
47
48
  private _dataView;
48
- private _tableInputs;
49
+ private _listInputs;
49
50
  private _pepList;
50
51
  totalRowCount: number;
51
52
  searchString: string;
@@ -60,7 +61,7 @@ export declare class GenericListComponent implements OnInit {
60
61
  [key: string]: (obj: any) => Promise<void>;
61
62
  };
62
63
  menuActions: Array<PepMenuItem>;
63
- constructor(_resolver: ComponentFactoryResolver, _dataConvertorService: PepDataConvertorService, _layoutService: PepLayoutService, _translate: TranslateService, _genericListService: PepGenericListService);
64
+ constructor(_resolver: ComponentFactoryResolver, _dataConvertorService: PepDataConvertorService, _layoutService: PepLayoutService, _loaderService: PepLoaderService, _genericListService: PepGenericListService);
64
65
  ngOnInit(): void;
65
66
  private initTable;
66
67
  /**
@@ -83,8 +84,9 @@ export declare class GenericListComponent implements OnInit {
83
84
  * loads paging bulk from api
84
85
  */
85
86
  private onLoadPage;
86
- getItemById(id: string): any;
87
- getSelectedItems(): any;
87
+ getItemById(id: string): ObjectsDataRow | null;
88
+ getSelectedItems(): PepSelectionData | null;
89
+ getPageIndex(): number;
88
90
  onActionItemClicked(action: IPepMenuItemClickEvent): void;
89
91
  onSearchChanged(event: IPepSearchClickEvent): void;
90
92
  onSelectedItemsChanged(selectedRowsCount: number): void;
@@ -95,5 +97,5 @@ export declare class GenericListComponent implements OnInit {
95
97
  onFiltersChange(filters: IPepSmartFilterData[]): void;
96
98
  ngOnDestroy(): void;
97
99
  static ɵfac: i0.ɵɵFactoryDeclaration<GenericListComponent, never>;
98
- static ɵcmp: i0.ɵɵComponentDeclaration<GenericListComponent, "pep-generic-list", never, { "dataSource": "dataSource"; "actions": "actions"; "uuidMapping": "uuidMapping"; "disabled": "disabled"; "addPadding": "addPadding"; "title": "title"; "inline": "inline"; "showSearch": "showSearch"; "noDataFoundMsg": "noDataFoundMsg"; "selectionType": "selectionType"; "supportSorting": "supportSorting"; "pager": "pager"; "tableViewType": "tableViewType"; "zebraStripes": "zebraStripes"; "smartFilter": "smartFilter"; "showTopBar": "showTopBar"; "breadCrumbsItems": "breadCrumbsItems"; }, { "fieldClick": "fieldClick"; "valueChange": "valueChange"; "breadCrumbItemClick": "breadCrumbItemClick"; }, never, ["[left-top-area]", "[right-top-area]"]>;
100
+ static ɵcmp: i0.ɵɵComponentDeclaration<GenericListComponent, "pep-generic-list", never, { "dataSource": "dataSource"; "actions": "actions"; "uuidMapping": "uuidMapping"; "disabled": "disabled"; "addPadding": "addPadding"; "title": "title"; "description": "description"; "inline": "inline"; "showSearch": "showSearch"; "noDataFoundMsg": "noDataFoundMsg"; "selectionType": "selectionType"; "supportSorting": "supportSorting"; "pager": "pager"; "tableViewType": "tableViewType"; "zebraStripes": "zebraStripes"; "smartFilter": "smartFilter"; "showTopBar": "showTopBar"; "breadCrumbsItems": "breadCrumbsItems"; }, { "fieldClick": "fieldClick"; "valueChange": "valueChange"; "breadCrumbItemClick": "breadCrumbItemClick"; }, never, ["[left-buttons]", "[right-buttons]"]>;
99
101
  }