@pepperi-addons/ngx-lib 0.2.58-beta.1 → 0.2.59

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 (163) hide show
  1. package/attachment/attachment.component.d.ts +0 -1
  2. package/attachment/pepperi-addons-ngx-lib-attachment.metadata.json +1 -1
  3. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js +1 -6
  4. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js.map +1 -1
  5. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js +0 -3
  6. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js.map +1 -1
  7. package/bundles/pepperi-addons-ngx-lib-color.umd.js +1 -6
  8. package/bundles/pepperi-addons-ngx-lib-color.umd.js.map +1 -1
  9. package/bundles/pepperi-addons-ngx-lib-date.umd.js +0 -3
  10. package/bundles/pepperi-addons-ngx-lib-date.umd.js.map +1 -1
  11. package/bundles/pepperi-addons-ngx-lib-form.umd.js +15 -18
  12. package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
  13. package/bundles/pepperi-addons-ngx-lib-image.umd.js +1 -6
  14. package/bundles/pepperi-addons-ngx-lib-image.umd.js.map +1 -1
  15. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js +1 -6
  16. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js.map +1 -1
  17. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js +1 -6
  18. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js.map +1 -1
  19. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js +1 -6
  20. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js.map +1 -1
  21. package/bundles/pepperi-addons-ngx-lib-select.umd.js +1 -6
  22. package/bundles/pepperi-addons-ngx-lib-select.umd.js.map +1 -1
  23. package/bundles/pepperi-addons-ngx-lib-separator.umd.js +0 -8
  24. package/bundles/pepperi-addons-ngx-lib-separator.umd.js.map +1 -1
  25. package/bundles/pepperi-addons-ngx-lib-signature.umd.js +1 -6
  26. package/bundles/pepperi-addons-ngx-lib-signature.umd.js.map +1 -1
  27. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js +173 -1432
  28. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js.map +1 -1
  29. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js +1 -6
  30. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js.map +1 -1
  31. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js +2 -4
  32. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js.map +1 -1
  33. package/bundles/pepperi-addons-ngx-lib.umd.js +101 -85
  34. package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
  35. package/color/color.component.d.ts +0 -1
  36. package/color/pepperi-addons-ngx-lib-color.metadata.json +1 -1
  37. package/core/common/services/color.service.d.ts +3 -3
  38. package/core/customization/customization.service.d.ts +0 -1
  39. package/esm2015/attachment/attachment.component.js +2 -7
  40. package/esm2015/checkbox/checkbox.component.js +1 -4
  41. package/esm2015/color/color.component.js +2 -7
  42. package/esm2015/color/public-api.js +1 -2
  43. package/esm2015/core/common/services/color.service.js +101 -83
  44. package/esm2015/core/customization/customization.service.js +2 -4
  45. package/esm2015/date/date.component.js +1 -4
  46. package/esm2015/form/internal-button.component.js +17 -20
  47. package/esm2015/image/image.component.js +2 -7
  48. package/esm2015/images-filmstrip/images-filmstrip.component.js +2 -7
  49. package/esm2015/quantity-selector/quantity-selector.component.js +2 -7
  50. package/esm2015/rich-html-textarea/rich-html-textarea.component.js +2 -7
  51. package/esm2015/select/select.component.js +2 -7
  52. package/esm2015/separator/separator.component.js +1 -9
  53. package/esm2015/signature/signature.component.js +2 -7
  54. package/esm2015/smart-filters/boolean-filter/boolean-filter.component.js +2 -12
  55. package/esm2015/smart-filters/common/model/base-filter-component.js +10 -40
  56. package/esm2015/smart-filters/common/model/creator.js +2 -8
  57. package/esm2015/smart-filters/common/model/field.js +1 -12
  58. package/esm2015/smart-filters/common/model/operator.js +8 -8
  59. package/esm2015/smart-filters/common/model/type.js +1 -1
  60. package/esm2015/smart-filters/date-filter/date-filter.component.js +2 -45
  61. package/esm2015/smart-filters/multi-select-filter/multi-select-filter.component.js +14 -53
  62. package/esm2015/smart-filters/number-filter/number-filter.component.js +2 -25
  63. package/esm2015/smart-filters/pepperi-addons-ngx-lib-smart-filters.js +1 -8
  64. package/esm2015/smart-filters/public-api.js +1 -2
  65. package/esm2015/smart-filters/smart-filters.module.js +2 -14
  66. package/esm2015/textarea/textarea.component.js +2 -7
  67. package/esm2015/textbox/textbox.component.js +3 -5
  68. package/fesm2015/pepperi-addons-ngx-lib-attachment.js +1 -6
  69. package/fesm2015/pepperi-addons-ngx-lib-attachment.js.map +1 -1
  70. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js +0 -3
  71. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js.map +1 -1
  72. package/fesm2015/pepperi-addons-ngx-lib-color.js +1 -6
  73. package/fesm2015/pepperi-addons-ngx-lib-color.js.map +1 -1
  74. package/fesm2015/pepperi-addons-ngx-lib-date.js +0 -3
  75. package/fesm2015/pepperi-addons-ngx-lib-date.js.map +1 -1
  76. package/fesm2015/pepperi-addons-ngx-lib-form.js +15 -18
  77. package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
  78. package/fesm2015/pepperi-addons-ngx-lib-image.js +1 -6
  79. package/fesm2015/pepperi-addons-ngx-lib-image.js.map +1 -1
  80. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js +1 -6
  81. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js.map +1 -1
  82. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js +1 -6
  83. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js.map +1 -1
  84. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js +1 -6
  85. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js.map +1 -1
  86. package/fesm2015/pepperi-addons-ngx-lib-select.js +1 -6
  87. package/fesm2015/pepperi-addons-ngx-lib-select.js.map +1 -1
  88. package/fesm2015/pepperi-addons-ngx-lib-separator.js +0 -8
  89. package/fesm2015/pepperi-addons-ngx-lib-separator.js.map +1 -1
  90. package/fesm2015/pepperi-addons-ngx-lib-signature.js +1 -6
  91. package/fesm2015/pepperi-addons-ngx-lib-signature.js.map +1 -1
  92. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js +128 -1293
  93. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js.map +1 -1
  94. package/fesm2015/pepperi-addons-ngx-lib-textarea.js +1 -6
  95. package/fesm2015/pepperi-addons-ngx-lib-textarea.js.map +1 -1
  96. package/fesm2015/pepperi-addons-ngx-lib-textbox.js +2 -4
  97. package/fesm2015/pepperi-addons-ngx-lib-textbox.js.map +1 -1
  98. package/fesm2015/pepperi-addons-ngx-lib.js +101 -85
  99. package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
  100. package/form/internal-button.component.d.ts +1 -0
  101. package/image/image.component.d.ts +0 -1
  102. package/image/pepperi-addons-ngx-lib-image.metadata.json +1 -1
  103. package/images-filmstrip/images-filmstrip.component.d.ts +0 -1
  104. package/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.metadata.json +1 -1
  105. package/package.json +1 -1
  106. package/pepperi-addons-ngx-lib.metadata.json +1 -1
  107. package/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.metadata.json +1 -1
  108. package/quantity-selector/quantity-selector.component.d.ts +0 -1
  109. package/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.metadata.json +1 -1
  110. package/rich-html-textarea/rich-html-textarea.component.d.ts +0 -1
  111. package/select/pepperi-addons-ngx-lib-select.metadata.json +1 -1
  112. package/select/select.component.d.ts +0 -1
  113. package/separator/pepperi-addons-ngx-lib-separator.metadata.json +1 -1
  114. package/signature/pepperi-addons-ngx-lib-signature.metadata.json +1 -1
  115. package/signature/signature.component.d.ts +0 -1
  116. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +1 -5
  117. package/smart-filters/common/model/base-filter-component.d.ts +1 -10
  118. package/smart-filters/common/model/field.d.ts +0 -4
  119. package/smart-filters/common/model/operator.d.ts +0 -1
  120. package/smart-filters/common/model/type.d.ts +2 -2
  121. package/smart-filters/date-filter/date-filter.component.d.ts +1 -8
  122. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +0 -6
  123. package/smart-filters/number-filter/number-filter.component.d.ts +0 -5
  124. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.d.ts +0 -7
  125. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.metadata.json +1 -1
  126. package/smart-filters/public-api.d.ts +0 -1
  127. package/src/assets/i18n/en.ngx-lib.json +1 -2
  128. package/src/core/style/abstracts/mixins.scss +3 -3
  129. package/src/core/style/components/general.scss +2 -4
  130. package/textarea/pepperi-addons-ngx-lib-textarea.metadata.json +1 -1
  131. package/textarea/textarea.component.d.ts +0 -1
  132. package/theming.scss +0 -4
  133. package/esm2015/smart-filters/filter-builder/common/model/filter.js +0 -2
  134. package/esm2015/smart-filters/filter-builder/common/model/legacy.js +0 -2
  135. package/esm2015/smart-filters/filter-builder/common/model/operator-unit.js +0 -42
  136. package/esm2015/smart-filters/filter-builder/common/model/operator.js +0 -207
  137. package/esm2015/smart-filters/filter-builder/common/model/type-map.js +0 -27
  138. package/esm2015/smart-filters/filter-builder/common/model/type.js +0 -6
  139. package/esm2015/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.js +0 -18
  140. package/esm2015/smart-filters/filter-builder/common/services/output-filter.service.js +0 -132
  141. package/esm2015/smart-filters/filter-builder/common/services/type-convertor.service.js +0 -44
  142. package/esm2015/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.js +0 -106
  143. package/esm2015/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.js +0 -50
  144. package/esm2015/smart-filters/filter-builder/filter-builder.component.js +0 -65
  145. package/esm2015/smart-filters/filter-builder/filter-builder.service.js +0 -261
  146. package/esm2015/smart-filters/index.js +0 -5
  147. package/esm2015/smart-filters/text-filter/text-filter.component.js +0 -79
  148. package/smart-filters/filter-builder/common/model/filter.d.ts +0 -6
  149. package/smart-filters/filter-builder/common/model/legacy.d.ts +0 -23
  150. package/smart-filters/filter-builder/common/model/operator-unit.d.ts +0 -13
  151. package/smart-filters/filter-builder/common/model/operator.d.ts +0 -21
  152. package/smart-filters/filter-builder/common/model/type-map.d.ts +0 -12
  153. package/smart-filters/filter-builder/common/model/type.d.ts +0 -4
  154. package/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.d.ts +0 -5
  155. package/smart-filters/filter-builder/common/services/output-filter.service.d.ts +0 -52
  156. package/smart-filters/filter-builder/common/services/type-convertor.service.d.ts +0 -10
  157. package/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.d.ts +0 -32
  158. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.d.ts +0 -22
  159. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.theme.scss +0 -6
  160. package/smart-filters/filter-builder/filter-builder.component.d.ts +0 -22
  161. package/smart-filters/filter-builder/filter-builder.service.d.ts +0 -90
  162. package/smart-filters/index.d.ts +0 -1
  163. package/smart-filters/text-filter/text-filter.component.d.ts +0 -17
@@ -1,79 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { Validators } from '@angular/forms';
3
- import { distinctUntilChanged } from 'rxjs/operators';
4
- import { BaseFilterComponent } from '../common/model/base-filter-component';
5
- import { PepSmartFilterOperators, } from '../common/model/operator';
6
- export class PepTextFilterComponent extends BaseFilterComponent {
7
- constructor() {
8
- super(...arguments);
9
- this.chooseTypeOptions = [];
10
- this.operatorWidth = '38%';
11
- this.firstControlWidth = '62%';
12
- }
13
- ngOnInit() {
14
- this.firstControl.valueChanges
15
- .pipe(this.getDestroyer(), distinctUntilChanged())
16
- .subscribe(() => {
17
- this.setFieldsStateAndValidators();
18
- });
19
- }
20
- // Override
21
- getDefaultOperator() {
22
- return PepSmartFilterOperators.Equals;
23
- }
24
- // Override
25
- getFilterValue() {
26
- const filterValue = {
27
- first: this.firstControl.value,
28
- };
29
- if (this.operator === PepSmartFilterOperators.NumberRange) {
30
- filterValue['second'] = this.secondControl.value;
31
- }
32
- return filterValue;
33
- }
34
- // Override
35
- loadOperatorsOptions() {
36
- this.chooseTypeOptions = this.operators.map((operator) => {
37
- return {
38
- key: operator.id,
39
- value: this.translate.instant(`${this.OPERATORS_TRANSLATION_PREFIX}.${operator.name}`),
40
- };
41
- });
42
- }
43
- // Override
44
- setFieldsStateAndValidators() {
45
- if (this.operator === PepSmartFilterOperators.NumberRange) {
46
- const firstValidators = [Validators.required];
47
- if (this.secondControl.value) {
48
- firstValidators.push(this.validator.isLessThan(this.secondControl));
49
- }
50
- this.firstControl.setValidators(firstValidators);
51
- }
52
- else {
53
- super.setFieldsStateAndValidators();
54
- }
55
- }
56
- onOperatorChanged(value) {
57
- const operator = Object.values(PepSmartFilterOperators).find((operator) => operator.id === value);
58
- this.operator = operator;
59
- if (this._parentForm) {
60
- this.updateParentForm();
61
- }
62
- if (this.emitOnChange) {
63
- this.applyFilter();
64
- }
65
- }
66
- onValueChanged() {
67
- if (this.emitOnChange) {
68
- this.applyFilter();
69
- }
70
- }
71
- }
72
- PepTextFilterComponent.decorators = [
73
- { type: Component, args: [{
74
- selector: 'pep-text-filter',
75
- template: "<div [formGroup]=\"form\" [fxLayout]=\"inline ? 'row' : 'column'\" [fxLayoutGap]=\"inline ? '.5rem' : '0rem'\">\n <pep-select [fxFlex]=\"inline ? operatorWidth : null\" [key]=\"'typeOperator'\" [value]=\"operator.id\"\n [label]=\"'SMART_FILTERS.TYPE' | translate\" [renderTitle]=\"renderTitle\" [emptyOption]=\"false\"\n [options]=\"chooseTypeOptions\" (valueChange)=\"onOperatorChanged($event)\">\n </pep-select>\n <pep-textbox [fxFlex]=\"inline ? firstControlWidth : null\" [form]=\"form\" [key]=\"firstControlKey\"\n [label]=\"'SMART_FILTERS.AMOUNT' | translate\" [renderError]=\"false\" [renderTitle]=\"renderTitle\"\n [type]=\"field.type\" [formattedValue]=\"firstControl?.value || ''\" [value]=\"firstControl?.value || ''\"\n (valueChange)=\"onValueChanged()\">\n </pep-textbox>\n</div>",
76
- styles: [""]
77
- },] }
78
- ];
79
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1maWx0ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LWxpYi9zbWFydC1maWx0ZXJzL3RleHQtZmlsdGVyL3RleHQtZmlsdGVyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUMsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDdEQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7QUFDNUUsT0FBTyxFQUVILHVCQUF1QixHQUMxQixNQUFNLDBCQUEwQixDQUFDO0FBU2xDLE1BQU0sT0FBTyxzQkFBdUIsU0FBUSxtQkFBbUI7SUFML0Q7O1FBTUksc0JBQWlCLEdBQXNCLEVBQUUsQ0FBQztRQUMxQyxrQkFBYSxHQUFHLEtBQUssQ0FBQztRQUN0QixzQkFBaUIsR0FBRyxLQUFLLENBQUM7SUF3RTlCLENBQUM7SUF0RUcsUUFBUTtRQUNKLElBQUksQ0FBQyxZQUFZLENBQUMsWUFBWTthQUN6QixJQUFJLENBQUMsSUFBSSxDQUFDLFlBQVksRUFBRSxFQUFFLG9CQUF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AgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAga2V5OiBvcGVyYXRvci5pZCxcbiAgICAgICAgICAgICAgICB2YWx1ZTogdGhpcy50cmFuc2xhdGUuaW5zdGFudChcbiAgICAgICAgICAgICAgICAgICAgYCR7dGhpcy5PUEVSQVRPUlNfVFJBTlNMQVRJT05fUFJFRklYfS4ke29wZXJhdG9yLm5hbWV9YFxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICB9O1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAvLyBPdmVycmlkZVxuICAgIHNldEZpZWxkc1N0YXRlQW5kVmFsaWRhdG9ycygpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMub3BlcmF0b3IgPT09IFBlcFNtYXJ0RmlsdGVyT3BlcmF0b3JzLk51bWJlclJhbmdlKSB7XG4gICAgICAgICAgICBjb25zdCBmaXJzdFZhbGlkYXRvcnMgPSBbVmFsaWRhdG9ycy5yZXF1aXJlZF07XG4gICAgICAgICAgICBpZiAodGhpcy5zZWNvbmRDb250cm9sLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgZmlyc3RWYWxpZGF0b3JzLnB1c2godGhpcy52YWxpZGF0b3IuaXNMZXNzVGhhbih0aGlzLnNlY29uZENvbnRyb2wpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuZmlyc3RDb250cm9sLnNldFZhbGlkYXRvcnMoZmlyc3RWYWxpZGF0b3JzKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHN1cGVyLnNldEZpZWxkc1N0YXRlQW5kVmFsaWRhdG9ycygpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25PcGVyYXRvckNoYW5nZWQodmFsdWU6IHN0cmluZykge1xuICAgICAgICBjb25zdCBvcGVyYXRvciA9IE9iamVjdC52YWx1ZXMoUGVwU21hcnRGaWx0ZXJPcGVyYXRvcnMpLmZpbmQoXG4gICAgICAgICAgICAob3BlcmF0b3IpID0+IG9wZXJhdG9yLmlkID09PSB2YWx1ZVxuICAgICAgICApO1xuICAgICAgICB0aGlzLm9wZXJhdG9yID0gb3BlcmF0b3I7XG4gICAgICAgIGlmICh0aGlzLl9wYXJlbnRGb3JtKSB7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZVBhcmVudEZvcm0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5lbWl0T25DaGFuZ2UpIHtcbiAgICAgICAgICAgIHRoaXMuYXBwbHlGaWx0ZXIoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uVmFsdWVDaGFuZ2VkKCkge1xuICAgICAgICBpZiAodGhpcy5lbWl0T25DaGFuZ2UpIHtcbiAgICAgICAgICAgIHRoaXMuYXBwbHlGaWx0ZXIoKTtcbiAgICAgICAgfVxuICAgIH1cblxufSJdfQ==
@@ -1,6 +0,0 @@
1
- import { IPepSmartFilterOperatorUnit } from '../../../common/model/operator';
2
- export interface IPepFilterBuilderValues {
3
- first: any;
4
- second: any;
5
- operationUnit: IPepSmartFilterOperatorUnit;
6
- }
@@ -1,23 +0,0 @@
1
- import { PepOperatorTypes } from './type';
2
- export interface IPepField {
3
- FieldID: string;
4
- FieldType: string;
5
- Title: string;
6
- OptionalValues: IPepFieldOptionalValues[];
7
- }
8
- export interface IPepFieldOptionalValues {
9
- Key: string;
10
- Value: string;
11
- }
12
- export interface IPepJSONSection {
13
- ComplexId: string;
14
- Operation: PepOperatorTypes;
15
- LeftNode?: IPepJSONSection | IPepJSONItem;
16
- RightNode?: IPepJSONSection | IPepJSONItem;
17
- }
18
- export interface IPepJSONItem {
19
- ExpressionId: string;
20
- ApiName: string;
21
- Operation: string;
22
- Values: any[];
23
- }
@@ -1,13 +0,0 @@
1
- import { IPepSmartFilterOperatorUnit } from '../../../common/model/operator';
2
- /**
3
- * gets a smart filter operation unit item
4
- * @param operationUnit legacy operation unit
5
- * @returns smart filter operation unit item
6
- */
7
- export declare function getSmartBuilderOperationUnit(operationUnit: string): IPepSmartFilterOperatorUnit | null;
8
- /**
9
- * gets a legacy operation unit value
10
- * @param operationUnit smart filter operation unit item
11
- * @returns legacy operation unit value
12
- */
13
- export declare function getLegacyOperationUnit(operationUnit: IPepSmartFilterOperatorUnit): string | null;
@@ -1,21 +0,0 @@
1
- import { IPepSmartFilterOperator } from '../../../common/model/operator';
2
- import { PepSmartFilterType } from '../../../common/model/type';
3
- export interface IPepFilterBuilderOperator {
4
- legacy: string;
5
- smartFilter: IPepSmartFilterOperator;
6
- type: PepSmartFilterType[] | null;
7
- }
8
- /**
9
- * gets a smart filter operator item
10
- * @param operator legacy operator
11
- * @param type smart filter's type
12
- * @returns smart filter operator item
13
- */
14
- export declare function getSmartBuilderOperator(operator: string, type: PepSmartFilterType): IPepSmartFilterOperator | null;
15
- /**
16
- * gets a legacy operator value
17
- * @param operator smart filter operator item
18
- * @param type smart filter's type
19
- * @returns legacy operator value
20
- */
21
- export declare function getLegacyOperator(operator: IPepSmartFilterOperator, type: PepSmartFilterType): string | null;
@@ -1,12 +0,0 @@
1
- import { PepSmartFilterType } from '../../../common/model/type';
2
- export declare class PepFilterBuilderTypeMap {
3
- private map;
4
- constructor();
5
- private loadTypes;
6
- /**
7
- * Converts legacy field type to smart builder type
8
- * @param type legacy type
9
- * @returns smart builder field type
10
- */
11
- getSmartBuilderType(key: string): PepSmartFilterType | null;
12
- }
@@ -1,4 +0,0 @@
1
- export declare enum PepOperatorTypes {
2
- And = "AND",
3
- Or = "OR"
4
- }
@@ -1,5 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- export declare class FilterItemCounterPipe implements PipeTransform {
4
- transform(container: FormGroup): number;
5
- }
@@ -1,52 +0,0 @@
1
- import { IPepSmartFilterField } from 'projects/ngx-lib/smart-filters';
2
- export declare class PepOutputFilterService {
3
- private _json;
4
- private _fields;
5
- private _firstItem;
6
- private _complexIdCounter;
7
- private _expressionIdCounter;
8
- constructor();
9
- /**
10
- * generates a legacy JSON
11
- * @param json UI smart filters structure
12
- * @param fields smart filter field
13
- * @returns legacy JSON
14
- */
15
- generateJson(json: any, fields: Array<IPepSmartFilterField>): any;
16
- /**
17
- * reset properties
18
- */
19
- private initProperties;
20
- /**
21
- * a recursive function dynamically builds legacy JSON structure
22
- * @param current UI object represents either a section or filter component
23
- */
24
- private treeWalk;
25
- /**
26
- * adds a filter to json and wrap it with complex operator
27
- * @param item expression item
28
- * @param operator complex operator
29
- */
30
- private createItem;
31
- /**
32
- * creates a legacy complex object
33
- * @param left LeftNode object
34
- * @param right RightNode object
35
- * @param operator AND/OR operator
36
- * @returns complex object
37
- */
38
- private createSection;
39
- /**
40
- * gets legacy filter values object
41
- * @param current UI filter object's values
42
- * @returns an array represents legacy values
43
- */
44
- private getItemValues;
45
- /**
46
- * generates an array of keys of multi-select control
47
- * @param values an array of the selected values
48
- * @param id filter's selected field
49
- * @returns an array of keys
50
- */
51
- private getFieldKeys;
52
- }
@@ -1,10 +0,0 @@
1
- import { IPepOption } from '@pepperi-addons/ngx-lib';
2
- export declare class PepTypeConvertorService {
3
- private readonly _operators;
4
- private readonly _booleans;
5
- get operators(): IPepOption[];
6
- get booleans(): IPepOption[];
7
- constructor();
8
- private initOperators;
9
- private initBooleans;
10
- }
@@ -1,32 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { FormBuilder, FormGroup } from '@angular/forms';
3
- import { PepSmartFilterBaseField, IPepSmartFilterField } from '../../common/model/field';
4
- import { IPepSmartFilterData } from '../../common/model/filter';
5
- import { IPepOption } from '@pepperi-addons/ngx-lib';
6
- export declare class FilterBuilderItemComponent {
7
- private _fb;
8
- formKey: string;
9
- _fields: Array<any>;
10
- _options: IPepOption[];
11
- set fields(list: Array<IPepSmartFilterField>);
12
- _selectedField: PepSmartFilterBaseField;
13
- set selected(value: any);
14
- _filter: IPepSmartFilterData;
15
- set filter(value: IPepSmartFilterData);
16
- _parentForm: FormGroup;
17
- set parentForm(value: FormGroup);
18
- filterChange: EventEmitter<any>;
19
- remove: EventEmitter<any>;
20
- test: any;
21
- _form: FormGroup;
22
- fieldWidth: number;
23
- filterWidth: number;
24
- binWidth: number;
25
- constructor(_fb: FormBuilder);
26
- ngOnInit(): void;
27
- setupForm(): void;
28
- addToParentForm(): void;
29
- onFieldChanged(key: any): void;
30
- onFilterChanged(): void;
31
- onDeleteItemClicked(): void;
32
- }
@@ -1,22 +0,0 @@
1
- import { EventEmitter, ViewContainerRef } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- import { FilterBuilderService } from '../filter-builder.service';
4
- import { PepTypeConvertorService } from '../common/services/type-convertor.service';
5
- export declare class FilterBuilderSectionComponent {
6
- filterBuilderService: FilterBuilderService;
7
- typeConvertorService: PepTypeConvertorService;
8
- form: FormGroup;
9
- depth: number;
10
- remove: EventEmitter<any>;
11
- operatorChange: EventEmitter<any>;
12
- sectionContainer: ViewContainerRef;
13
- constructor(filterBuilderService: FilterBuilderService, typeConvertorService: PepTypeConvertorService);
14
- ngOnInit(): void;
15
- get f(): {
16
- [key: string]: import("@angular/forms").AbstractControl;
17
- };
18
- onOperatorChanged(value: any): void;
19
- onAddRuleClicked(): void;
20
- onAddRuleSetClicked(): void;
21
- onDeleteSectionClicked(): void;
22
- }
@@ -1,6 +0,0 @@
1
- @mixin pep-filter-builder-section-theme($pepperi-theme) {
2
- .filter-section-container {
3
- box-shadow: get-pep-shadow($pepperi-theme, shadow-md, soft);
4
- @include border(border, 1px, solid, get-pep-color($pepperi-theme, color-system-primary, color-tran-50));
5
- }
6
- }
@@ -1,22 +0,0 @@
1
- import { EventEmitter, OnInit, OnDestroy, ViewContainerRef } from '@angular/core';
2
- import { IPepField, IPepJSONSection } from './common/model/legacy';
3
- import { FilterBuilderService } from './filter-builder.service';
4
- import { FormGroup, FormBuilder } from '@angular/forms';
5
- import { Subscription } from 'rxjs';
6
- export declare class FilterBuilderComponent implements OnInit, OnDestroy {
7
- private _fb;
8
- private _filterBuilderService;
9
- json: IPepJSONSection;
10
- fields: Array<IPepField>;
11
- filters: EventEmitter<any>;
12
- formValidationChange: EventEmitter<boolean>;
13
- filterRoot: ViewContainerRef;
14
- _formSubscription$: Subscription;
15
- _outputJsonSubscription$: Subscription;
16
- _isFormValid: boolean;
17
- form: FormGroup;
18
- constructor(_fb: FormBuilder, _filterBuilderService: FilterBuilderService);
19
- setupForm(): void;
20
- ngOnInit(): void;
21
- ngOnDestroy(): void;
22
- }
@@ -1,90 +0,0 @@
1
- import { ViewContainerRef, ComponentFactoryResolver } from '@angular/core';
2
- import { FormBuilder, FormGroup } from '@angular/forms';
3
- import { IPepField, IPepJSONSection, IPepJSONItem } from './common/model/legacy';
4
- import { PepOutputFilterService } from './common/services/output-filter.service';
5
- import { PepOperatorTypes } from './common/model/type';
6
- export declare class FilterBuilderService {
7
- private _fb;
8
- private _resolver;
9
- private _outputJsonService;
10
- private readonly MAX_STRUCTURE_DEPTH;
11
- private _outputJsonSubject;
12
- private _smartFilterFields;
13
- private _form;
14
- triggerOutputJson: import("rxjs").Observable<any>;
15
- constructor(_fb: FormBuilder, _resolver: ComponentFactoryResolver, _outputJsonService: PepOutputFilterService);
16
- get maxDepth(): number;
17
- /**
18
- * creates a dynamic filter structure
19
- * might has a different structure than the input's due to merge of parent-child elements
20
- * @param json legacy JSON
21
- * @param fields an array of legacy fields
22
- * @param containerRef reference to root element
23
- */
24
- createFilterTree(json: IPepJSONSection | null, fields: Array<IPepField>, form: FormGroup, containerRef: ViewContainerRef): void;
25
- /**
26
- * checks if the object contains property
27
- * @param obj object
28
- * @param prop property name
29
- * @returns true if contains, false otherwise
30
- */
31
- private hasProperty;
32
- /**
33
- * a recursive function dynamically builds filters structure
34
- * @param parent legacy complex object
35
- * @param current child legacy object (either another complex or expression type)
36
- * @param containerRef parent element
37
- * @param parentForm parent form
38
- */
39
- private flatten;
40
- /**
41
- * creates a container object of two or more child filter items
42
- * @param operator AND/OR operator
43
- * @param containerRef parent element
44
- * @param parentForm parent form
45
- * @param depth
46
- * @returns an object containing the current element and current form
47
- */
48
- createSection(operator: PepOperatorTypes, containerRef: ViewContainerRef, parentForm: FormGroup, depth: number): {
49
- containerRef: ViewContainerRef;
50
- parentForm: FormGroup;
51
- };
52
- /**
53
- * creates a component represents filter item (leaf element - has no childs)
54
- * @param current filter legacy element
55
- * @param containerRef parent element
56
- * @param parentForm parent form
57
- */
58
- createItem(current: IPepJSONItem, containerRef: ViewContainerRef, parentForm: FormGroup): void;
59
- /**
60
- * creates a smart filter object
61
- * @param current filter legacy element
62
- * @param field filter's selected field
63
- * @returns smart filter object
64
- */
65
- private getFilter;
66
- /**
67
- * get smart filter field
68
- * @param current filter legacy element
69
- * @returns smart filter field, if not found returns the first fields
70
- */
71
- private getSelectedField;
72
- /**
73
- * gets smart filter's values data
74
- * @param current filter legacy element
75
- * @param operator smart filter operator
76
- * @param field filter's selected field
77
- * @returns object contains the filter values data
78
- */
79
- private getFilterValues;
80
- /**
81
- * converts legacy fields to smart filter fields
82
- * @param fields legacy fields array
83
- * @returns smart filter fields array
84
- */
85
- private convertToSmartFilterFields;
86
- /**
87
- * creates a legacy output JSON
88
- */
89
- private createOutputJson;
90
- }
@@ -1 +0,0 @@
1
- export * from './public-api';
@@ -1,17 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { BaseFilterComponent } from '../common/model/base-filter-component';
3
- import { IPepSmartFilterOperator } from '../common/model/operator';
4
- import { IPepOption } from '@pepperi-addons/ngx-lib';
5
- import { IPepSmartFilterDataValue } from '../common/model/filter';
6
- export declare class PepTextFilterComponent extends BaseFilterComponent implements OnInit {
7
- chooseTypeOptions: Array<IPepOption>;
8
- operatorWidth: string;
9
- firstControlWidth: string;
10
- ngOnInit(): void;
11
- getDefaultOperator(): IPepSmartFilterOperator;
12
- getFilterValue(): IPepSmartFilterDataValue;
13
- loadOperatorsOptions(): void;
14
- setFieldsStateAndValidators(): void;
15
- onOperatorChanged(value: string): void;
16
- onValueChanged(): void;
17
- }