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

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 (177) hide show
  1. package/attachment/attachment.component.d.ts +1 -0
  2. package/attachment/pepperi-addons-ngx-lib-attachment.metadata.json +1 -1
  3. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js +6 -1
  4. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js.map +1 -1
  5. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js +3 -0
  6. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js.map +1 -1
  7. package/bundles/pepperi-addons-ngx-lib-color.umd.js +6 -1
  8. package/bundles/pepperi-addons-ngx-lib-color.umd.js.map +1 -1
  9. package/bundles/pepperi-addons-ngx-lib-date.umd.js +4 -1
  10. package/bundles/pepperi-addons-ngx-lib-date.umd.js.map +1 -1
  11. package/bundles/pepperi-addons-ngx-lib-form.umd.js +20 -15
  12. package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
  13. package/bundles/pepperi-addons-ngx-lib-image.umd.js +6 -1
  14. package/bundles/pepperi-addons-ngx-lib-image.umd.js.map +1 -1
  15. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js +6 -1
  16. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js.map +1 -1
  17. package/bundles/pepperi-addons-ngx-lib-list.umd.js +4 -2
  18. package/bundles/pepperi-addons-ngx-lib-list.umd.js.map +1 -1
  19. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js +6 -1
  20. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js.map +1 -1
  21. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js +6 -1
  22. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js.map +1 -1
  23. package/bundles/pepperi-addons-ngx-lib-select.umd.js +6 -1
  24. package/bundles/pepperi-addons-ngx-lib-select.umd.js.map +1 -1
  25. package/bundles/pepperi-addons-ngx-lib-separator.umd.js +8 -0
  26. package/bundles/pepperi-addons-ngx-lib-separator.umd.js.map +1 -1
  27. package/bundles/pepperi-addons-ngx-lib-signature.umd.js +6 -1
  28. package/bundles/pepperi-addons-ngx-lib-signature.umd.js.map +1 -1
  29. package/bundles/pepperi-addons-ngx-lib-slider.umd.js.map +1 -1
  30. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js +1432 -173
  31. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js.map +1 -1
  32. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js +6 -1
  33. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js.map +1 -1
  34. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js +4 -2
  35. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js.map +1 -1
  36. package/bundles/pepperi-addons-ngx-lib-top-bar.umd.js +1 -1
  37. package/bundles/pepperi-addons-ngx-lib.umd.js +4 -2
  38. package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
  39. package/color/color.component.d.ts +1 -0
  40. package/color/pepperi-addons-ngx-lib-color.metadata.json +1 -1
  41. package/core/customization/customization.service.d.ts +1 -0
  42. package/esm2015/attachment/attachment.component.js +7 -2
  43. package/esm2015/checkbox/checkbox.component.js +4 -1
  44. package/esm2015/color/color.component.js +7 -2
  45. package/esm2015/core/common/services/translate.service.js +1 -1
  46. package/esm2015/core/customization/customization.service.js +4 -2
  47. package/esm2015/date/date.component.js +4 -1
  48. package/esm2015/form/form.component.js +2 -1
  49. package/esm2015/form/internal-button.component.js +20 -17
  50. package/esm2015/form/internal-carusel.component.js +2 -1
  51. package/esm2015/image/image.component.js +7 -2
  52. package/esm2015/image/image.service.js +1 -1
  53. package/esm2015/images-filmstrip/images-filmstrip.component.js +7 -2
  54. package/esm2015/list/list-total.component.js +5 -3
  55. package/esm2015/quantity-selector/quantity-selector.component.js +7 -2
  56. package/esm2015/rich-html-textarea/rich-html-textarea.component.js +7 -2
  57. package/esm2015/select/select.component.js +7 -2
  58. package/esm2015/separator/separator.component.js +9 -1
  59. package/esm2015/signature/signature.component.js +7 -2
  60. package/esm2015/slider/slider.component.js +1 -1
  61. package/esm2015/smart-filters/boolean-filter/boolean-filter.component.js +12 -2
  62. package/esm2015/smart-filters/common/model/base-filter-component.js +40 -10
  63. package/esm2015/smart-filters/common/model/creator.js +8 -2
  64. package/esm2015/smart-filters/common/model/field.js +12 -1
  65. package/esm2015/smart-filters/common/model/operator.js +8 -8
  66. package/esm2015/smart-filters/common/model/type.js +1 -1
  67. package/esm2015/smart-filters/date-filter/date-filter.component.js +45 -2
  68. package/esm2015/smart-filters/filter-builder/common/model/filter.js +2 -0
  69. package/esm2015/smart-filters/filter-builder/common/model/legacy.js +2 -0
  70. package/esm2015/smart-filters/filter-builder/common/model/operator-unit.js +42 -0
  71. package/esm2015/smart-filters/filter-builder/common/model/operator.js +207 -0
  72. package/esm2015/smart-filters/filter-builder/common/model/type-map.js +27 -0
  73. package/esm2015/smart-filters/filter-builder/common/model/type.js +6 -0
  74. package/esm2015/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.js +18 -0
  75. package/esm2015/smart-filters/filter-builder/common/services/output-filter.service.js +132 -0
  76. package/esm2015/smart-filters/filter-builder/common/services/type-convertor.service.js +44 -0
  77. package/esm2015/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.js +106 -0
  78. package/esm2015/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.js +50 -0
  79. package/esm2015/smart-filters/filter-builder/filter-builder.component.js +65 -0
  80. package/esm2015/smart-filters/filter-builder/filter-builder.service.js +261 -0
  81. package/esm2015/smart-filters/index.js +5 -0
  82. package/esm2015/smart-filters/multi-select-filter/multi-select-filter.component.js +53 -14
  83. package/esm2015/smart-filters/number-filter/number-filter.component.js +25 -2
  84. package/esm2015/smart-filters/pepperi-addons-ngx-lib-smart-filters.js +8 -1
  85. package/esm2015/smart-filters/public-api.js +2 -1
  86. package/esm2015/smart-filters/smart-filters.module.js +14 -2
  87. package/esm2015/smart-filters/text-filter/text-filter.component.js +79 -0
  88. package/esm2015/textarea/textarea.component.js +7 -2
  89. package/esm2015/textbox/textbox.component.js +5 -3
  90. package/esm2015/top-bar/top-bar.component.js +1 -1
  91. package/fesm2015/pepperi-addons-ngx-lib-attachment.js +6 -1
  92. package/fesm2015/pepperi-addons-ngx-lib-attachment.js.map +1 -1
  93. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js +3 -0
  94. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js.map +1 -1
  95. package/fesm2015/pepperi-addons-ngx-lib-color.js +6 -1
  96. package/fesm2015/pepperi-addons-ngx-lib-color.js.map +1 -1
  97. package/fesm2015/pepperi-addons-ngx-lib-date.js +3 -0
  98. package/fesm2015/pepperi-addons-ngx-lib-date.js.map +1 -1
  99. package/fesm2015/pepperi-addons-ngx-lib-form.js +20 -15
  100. package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
  101. package/fesm2015/pepperi-addons-ngx-lib-image.js +6 -1
  102. package/fesm2015/pepperi-addons-ngx-lib-image.js.map +1 -1
  103. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js +6 -1
  104. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js.map +1 -1
  105. package/fesm2015/pepperi-addons-ngx-lib-list.js +4 -2
  106. package/fesm2015/pepperi-addons-ngx-lib-list.js.map +1 -1
  107. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js +6 -1
  108. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js.map +1 -1
  109. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js +6 -1
  110. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js.map +1 -1
  111. package/fesm2015/pepperi-addons-ngx-lib-select.js +6 -1
  112. package/fesm2015/pepperi-addons-ngx-lib-select.js.map +1 -1
  113. package/fesm2015/pepperi-addons-ngx-lib-separator.js +8 -0
  114. package/fesm2015/pepperi-addons-ngx-lib-separator.js.map +1 -1
  115. package/fesm2015/pepperi-addons-ngx-lib-signature.js +6 -1
  116. package/fesm2015/pepperi-addons-ngx-lib-signature.js.map +1 -1
  117. package/fesm2015/pepperi-addons-ngx-lib-slider.js.map +1 -1
  118. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js +1293 -128
  119. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js.map +1 -1
  120. package/fesm2015/pepperi-addons-ngx-lib-textarea.js +6 -1
  121. package/fesm2015/pepperi-addons-ngx-lib-textarea.js.map +1 -1
  122. package/fesm2015/pepperi-addons-ngx-lib-textbox.js +4 -2
  123. package/fesm2015/pepperi-addons-ngx-lib-textbox.js.map +1 -1
  124. package/fesm2015/pepperi-addons-ngx-lib-top-bar.js +1 -1
  125. package/fesm2015/pepperi-addons-ngx-lib.js +3 -1
  126. package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
  127. package/form/internal-button.component.d.ts +0 -1
  128. package/image/image.component.d.ts +1 -0
  129. package/image/pepperi-addons-ngx-lib-image.metadata.json +1 -1
  130. package/images-filmstrip/images-filmstrip.component.d.ts +1 -0
  131. package/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.metadata.json +1 -1
  132. package/list/list-total.component.d.ts +2 -0
  133. package/list/pepperi-addons-ngx-lib-list.metadata.json +1 -1
  134. package/package.json +4 -4
  135. package/pepperi-addons-ngx-lib.metadata.json +1 -1
  136. package/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.metadata.json +1 -1
  137. package/quantity-selector/quantity-selector.component.d.ts +1 -0
  138. package/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.metadata.json +1 -1
  139. package/rich-html-textarea/rich-html-textarea.component.d.ts +1 -0
  140. package/select/pepperi-addons-ngx-lib-select.metadata.json +1 -1
  141. package/select/select.component.d.ts +1 -0
  142. package/separator/pepperi-addons-ngx-lib-separator.metadata.json +1 -1
  143. package/signature/pepperi-addons-ngx-lib-signature.metadata.json +1 -1
  144. package/signature/signature.component.d.ts +1 -0
  145. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +5 -1
  146. package/smart-filters/common/model/base-filter-component.d.ts +10 -1
  147. package/smart-filters/common/model/field.d.ts +4 -0
  148. package/smart-filters/common/model/operator.d.ts +1 -0
  149. package/smart-filters/common/model/type.d.ts +2 -2
  150. package/smart-filters/date-filter/date-filter.component.d.ts +8 -1
  151. package/smart-filters/filter-builder/common/model/filter.d.ts +6 -0
  152. package/smart-filters/filter-builder/common/model/legacy.d.ts +23 -0
  153. package/smart-filters/filter-builder/common/model/operator-unit.d.ts +13 -0
  154. package/smart-filters/filter-builder/common/model/operator.d.ts +21 -0
  155. package/smart-filters/filter-builder/common/model/type-map.d.ts +12 -0
  156. package/smart-filters/filter-builder/common/model/type.d.ts +4 -0
  157. package/smart-filters/filter-builder/common/pipes/filter-item-counter.pipe.d.ts +5 -0
  158. package/smart-filters/filter-builder/common/services/output-filter.service.d.ts +52 -0
  159. package/smart-filters/filter-builder/common/services/type-convertor.service.d.ts +10 -0
  160. package/smart-filters/filter-builder/filter-builder-item/filter-builder-item.component.d.ts +32 -0
  161. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.d.ts +22 -0
  162. package/smart-filters/filter-builder/filter-builder-section/filter-builder-section.component.theme.scss +6 -0
  163. package/smart-filters/filter-builder/filter-builder.component.d.ts +22 -0
  164. package/smart-filters/filter-builder/filter-builder.service.d.ts +90 -0
  165. package/smart-filters/index.d.ts +1 -0
  166. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +6 -0
  167. package/smart-filters/number-filter/number-filter.component.d.ts +5 -0
  168. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.d.ts +7 -0
  169. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.metadata.json +1 -1
  170. package/smart-filters/public-api.d.ts +1 -0
  171. package/smart-filters/text-filter/text-filter.component.d.ts +17 -0
  172. package/src/assets/i18n/en.ngx-lib.json +2 -1
  173. package/src/core/style/components/general.scss +4 -2
  174. package/textarea/pepperi-addons-ngx-lib-textarea.metadata.json +1 -1
  175. package/textarea/textarea.component.d.ts +1 -0
  176. package/theming.scss +4 -0
  177. package/top-bar/pepperi-addons-ngx-lib-top-bar.metadata.json +1 -1
@@ -1,7 +1,11 @@
1
+ import { OnInit } from '@angular/core';
1
2
  import { BaseFilterComponent } from '../common/model/base-filter-component';
2
3
  import { IPepSmartFilterOperator } from '../common/model/operator';
3
4
  import { IPepSmartFilterDataValue } from '../common/model/filter';
4
- export declare class PepBooleanFilterComponent extends BaseFilterComponent {
5
+ export declare class PepBooleanFilterComponent extends BaseFilterComponent implements OnInit {
6
+ ngOnInit(): void;
5
7
  getDefaultOperator(): IPepSmartFilterOperator;
6
8
  getFilterValue(): IPepSmartFilterDataValue;
9
+ onRadioChanged(): void;
10
+ onValueChanged(value: any): void;
7
11
  }
@@ -5,6 +5,7 @@ import { IPepSmartFilterOperator, IPepSmartFilterOperatorUnit } from './operator
5
5
  import { IPepSmartFilterData, IPepSmartFilterDataValue } from './filter';
6
6
  import { PepSmartFilterBaseField } from './field';
7
7
  import { TranslateService } from '@ngx-translate/core';
8
+ import { PepTypeConvertorService } from '../../filter-builder/common/services/type-convertor.service';
8
9
  export declare abstract class BaseFilterComponent implements OnInit, OnChanges, OnDestroy {
9
10
  private viewContainerRef;
10
11
  private injector;
@@ -13,6 +14,7 @@ export declare abstract class BaseFilterComponent implements OnInit, OnChanges,
13
14
  protected translate: TranslateService;
14
15
  protected validator: PepValidatorService;
15
16
  protected renderer: Renderer2;
17
+ typeConvertorService: PepTypeConvertorService;
16
18
  private readonly _destroyed;
17
19
  private actionsContainerRef;
18
20
  private _fieldIdWithNoDots;
@@ -22,6 +24,12 @@ export declare abstract class BaseFilterComponent implements OnInit, OnChanges,
22
24
  private _filter;
23
25
  set filter(value: IPepSmartFilterData);
24
26
  get filter(): IPepSmartFilterData;
27
+ protected _parentForm: FormGroup;
28
+ set parentForm(form: FormGroup);
29
+ emitOnChange: boolean;
30
+ inline: boolean;
31
+ showActionButtons: boolean;
32
+ renderTitle: boolean;
25
33
  filterClear: EventEmitter<void>;
26
34
  filterChange: EventEmitter<IPepSmartFilterData>;
27
35
  private _operator;
@@ -39,11 +47,12 @@ export declare abstract class BaseFilterComponent implements OnInit, OnChanges,
39
47
  protected readonly OPERATORS_TRANSLATION_PREFIX = "SMART_FILTERS.OPERATORS";
40
48
  protected readonly OPERATOR_UNITS_TRANSLATION_PREFIX = "SMART_FILTERS.OPERATOR_UNITS";
41
49
  form: FormGroup;
42
- constructor(viewContainerRef: ViewContainerRef, injector: Injector, resolver: ComponentFactoryResolver, builder: FormBuilder, translate: TranslateService, validator: PepValidatorService, renderer: Renderer2);
50
+ constructor(viewContainerRef: ViewContainerRef, injector: Injector, resolver: ComponentFactoryResolver, builder: FormBuilder, translate: TranslateService, validator: PepValidatorService, renderer: Renderer2, typeConvertorService: PepTypeConvertorService);
43
51
  private createActionsComponent;
44
52
  private setupForm;
45
53
  private setupOperators;
46
54
  private setupFilter;
55
+ protected updateParentForm(): void;
47
56
  protected getDestroyer(): import("rxjs").MonoTypeOperatorFunction<unknown>;
48
57
  private updateValidity;
49
58
  protected loadOperatorsOptions(): void;
@@ -25,6 +25,10 @@ export declare abstract class PepSmartFilterBaseField implements IPepSmartFilter
25
25
  constructor(field: IPepSmartFilterField);
26
26
  protected abstract getType(): PepSmartFilterType;
27
27
  }
28
+ export declare class PepSmartFilterTextField extends PepSmartFilterBaseField {
29
+ constructor(field: IPepSmartFilterField);
30
+ getType(): PepSmartFilterType;
31
+ }
28
32
  export declare class PepSmartFilterBooleanField extends PepSmartFilterBaseField {
29
33
  constructor(field: IPepSmartFilterField);
30
34
  getType(): PepSmartFilterType;
@@ -11,6 +11,7 @@ export declare const PepSmartFilterOperators: {
11
11
  LessThan: IPepSmartFilterOperator;
12
12
  GreaterThan: IPepSmartFilterOperator;
13
13
  NumberRange: IPepSmartFilterOperator;
14
+ Contains: IPepSmartFilterOperator;
14
15
  InTheLast: IPepSmartFilterOperator;
15
16
  Today: IPepSmartFilterOperator;
16
17
  ThisWeek: IPepSmartFilterOperator;
@@ -1,4 +1,4 @@
1
- export declare type PepSmartFilterComponentType = 'number' | 'date' | 'multi-select' | 'boolean';
2
- export declare type PepSmartFilterType = 'boolean' | 'currency' | 'date' | 'date-time' | 'int' | 'multi-select' | 'percentage' | 'real';
1
+ export declare type PepSmartFilterComponentType = 'text' | 'number' | 'date' | 'multi-select' | 'boolean';
2
+ export declare type PepSmartFilterType = 'text' | 'boolean' | 'currency' | 'date' | 'date-time' | 'int' | 'multi-select' | 'percentage' | 'real';
3
3
  export declare type PepSmartFilterOperatorType = 'eq' | 'neq' | 'lt' | 'gt' | 'ltoe' | 'gtoe' | 'numberRange' | 'contains' | 'beginsWith' | 'endsWith' | 'after' | 'before' | 'inTheLast' | 'today' | 'thisWeek' | 'thisMonth' | 'dateRange' | 'dueIn' | 'on' | 'notInTheLast' | 'notDueIn' | 'isEmpty' | 'isNotEmpty' | 'in';
4
4
  export declare type PepSmartFilterOperatorUnitType = 'days' | 'weeks' | 'months' | 'years';
@@ -1,14 +1,16 @@
1
+ import { OnInit } from '@angular/core';
1
2
  import { BaseFilterComponent } from '../common/model/base-filter-component';
2
3
  import { IPepSmartFilterOperator, IPepSmartFilterOperatorUnit } from '../common/model/operator';
3
4
  import { IPepSmartFilterDataValue } from '../common/model/filter';
4
5
  import { IPepOption } from '@pepperi-addons/ngx-lib';
5
- export declare class PepDateFilterComponent extends BaseFilterComponent {
6
+ export declare class PepDateFilterComponent extends BaseFilterComponent implements OnInit {
6
7
  PepSmartFilterOperators: {
7
8
  Equals: IPepSmartFilterOperator;
8
9
  NotEqual: IPepSmartFilterOperator;
9
10
  LessThan: IPepSmartFilterOperator;
10
11
  GreaterThan: IPepSmartFilterOperator;
11
12
  NumberRange: IPepSmartFilterOperator;
13
+ Contains: IPepSmartFilterOperator;
12
14
  InTheLast: IPepSmartFilterOperator;
13
15
  Today: IPepSmartFilterOperator;
14
16
  ThisWeek: IPepSmartFilterOperator;
@@ -24,11 +26,16 @@ export declare class PepDateFilterComponent extends BaseFilterComponent {
24
26
  };
25
27
  chooseTimeOptions: Array<IPepOption>;
26
28
  chooseTimeUnitOptions: Array<IPepOption>;
29
+ operatorWidth: string;
30
+ fieldsWidth: string;
31
+ ngOnInit(): void;
27
32
  getDefaultOperator(): IPepSmartFilterOperator;
28
33
  getDefaultOperatorUnit(): IPepSmartFilterOperatorUnit;
29
34
  getFilterValue(): IPepSmartFilterDataValue;
30
35
  loadOperatorsOptions(): void;
31
36
  setFieldsStateAndValidators(): void;
37
+ setControlsWidth(): void;
32
38
  onOperatorChanged(value: string): void;
33
39
  onTimeUnitChanged(value: string): void;
40
+ onDateValueChanged(): void;
34
41
  }
@@ -0,0 +1,6 @@
1
+ import { IPepSmartFilterOperatorUnit } from '../../../common/model/operator';
2
+ export interface IPepFilterBuilderValues {
3
+ first: any;
4
+ second: any;
5
+ operationUnit: IPepSmartFilterOperatorUnit;
6
+ }
@@ -0,0 +1,23 @@
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
+ }
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,21 @@
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;
@@ -0,0 +1,12 @@
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
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum PepOperatorTypes {
2
+ And = "AND",
3
+ Or = "OR"
4
+ }
@@ -0,0 +1,5 @@
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
+ }
@@ -0,0 +1,52 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,32 @@
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
+ }
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,90 @@
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
+ }
@@ -0,0 +1 @@
1
+ export * from './public-api';
@@ -2,6 +2,7 @@ import { AfterViewInit, ElementRef } from '@angular/core';
2
2
  import { OnInit } from '@angular/core';
3
3
  import { BaseFilterComponent } from '../common/model/base-filter-component';
4
4
  import { IPepSmartFilterOperator } from '../common/model/operator';
5
+ import { IPepOption } from '@pepperi-addons/ngx-lib';
5
6
  import { IPepSmartFilterDataValue } from '../common/model/filter';
6
7
  import { IPepSmartFilterFieldOption } from '../common/model/field';
7
8
  import { Observable } from 'rxjs';
@@ -16,12 +17,16 @@ export declare class PepMultiSelectFilterComponent extends BaseFilterComponent i
16
17
  options: PepMultiSelectFilterOption[];
17
18
  filteredOptions$: Observable<any>;
18
19
  searchControl: FormControl;
20
+ selected: string;
21
+ inlineOptions: IPepOption[];
19
22
  optionsContainer: ElementRef;
20
23
  private readonly MAX_OPTIONS_TO_SHOW;
21
24
  private virtualScroller;
22
25
  numberOptionsToShowSearch: number;
23
26
  ngOnInit(): void;
24
27
  ngAfterViewInit(): void;
28
+ private inlineControlInit;
29
+ private noneInlineControlInit;
25
30
  initOptionsSelectedValues(selectedValues: string[]): void;
26
31
  private calcOptionsHeight;
27
32
  private filterOptions;
@@ -29,5 +34,6 @@ export declare class PepMultiSelectFilterComponent extends BaseFilterComponent i
29
34
  getFilterValue(): IPepSmartFilterDataValue;
30
35
  initFilter(): void;
31
36
  onOptionChange(option: PepMultiSelectFilterOption, event: MatCheckboxChange): void;
37
+ onMultiSelectChanged(value: string): void;
32
38
  }
33
39
  export {};
@@ -10,6 +10,7 @@ export declare class PepNumberFilterComponent extends BaseFilterComponent implem
10
10
  LessThan: IPepSmartFilterOperator;
11
11
  GreaterThan: IPepSmartFilterOperator;
12
12
  NumberRange: IPepSmartFilterOperator;
13
+ Contains: IPepSmartFilterOperator;
13
14
  InTheLast: IPepSmartFilterOperator;
14
15
  Today: IPepSmartFilterOperator;
15
16
  ThisWeek: IPepSmartFilterOperator;
@@ -24,10 +25,14 @@ export declare class PepNumberFilterComponent extends BaseFilterComponent implem
24
25
  In: IPepSmartFilterOperator;
25
26
  };
26
27
  chooseTypeOptions: Array<IPepOption>;
28
+ operatorWidth: string;
29
+ firstControlWidth: string;
27
30
  ngOnInit(): void;
28
31
  getDefaultOperator(): IPepSmartFilterOperator;
29
32
  getFilterValue(): IPepSmartFilterDataValue;
30
33
  loadOperatorsOptions(): void;
31
34
  setFieldsStateAndValidators(): void;
35
+ setControlsWidth(): void;
32
36
  onOperatorChanged(value: string): void;
37
+ onValueChanged(): void;
33
38
  }
@@ -2,3 +2,10 @@
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
4
  export * from './public-api';
5
+ export { FilterItemCounterPipe as ɵg } from './filter-builder/common/pipes/filter-item-counter.pipe';
6
+ export { PepOutputFilterService as ɵb } from './filter-builder/common/services/output-filter.service';
7
+ export { PepTypeConvertorService as ɵd } from './filter-builder/common/services/type-convertor.service';
8
+ export { FilterBuilderItemComponent as ɵf } from './filter-builder/filter-builder-item/filter-builder-item.component';
9
+ export { FilterBuilderSectionComponent as ɵe } from './filter-builder/filter-builder-section/filter-builder-section.component';
10
+ export { FilterBuilderService as ɵa } from './filter-builder/filter-builder.service';
11
+ export { PepTextFilterComponent as ɵc } from './text-filter/text-filter.component';