@pepperi-addons/ngx-lib 0.4.2-beta.98 → 0.4.2-scroll.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.
- package/chips/chips.component.d.ts +1 -3
- package/core/common/pipes/common-pipes.d.ts +3 -0
- package/core/customization/customization.model.d.ts +1 -1
- package/esm2020/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/chips/chips.component.mjs +8 -11
- package/esm2020/color/color.component.mjs +3 -3
- package/esm2020/core/common/pipes/common-pipes.mjs +14 -4
- package/esm2020/core/customization/customization.model.mjs +7 -1
- package/esm2020/core/customization/customization.service.mjs +2 -1
- package/esm2020/core/http/services/loader.service.mjs +3 -3
- package/esm2020/draggable-items/draggable-items.component.mjs +3 -3
- package/esm2020/form/field-generator.component.mjs +3 -3
- package/esm2020/form/form.component.mjs +3 -3
- package/esm2020/form/internal-carusel.component.mjs +10 -6
- package/esm2020/form/internal-field-generator.component.mjs +3 -3
- package/esm2020/form/internal-form.component.mjs +3 -3
- package/esm2020/form/internal-menu.component.mjs +4 -6
- package/esm2020/form/internal-page.component.mjs +3 -4
- package/esm2020/image/image.component.mjs +3 -3
- package/esm2020/images-filmstrip/images-filmstrip.component.mjs +3 -3
- package/esm2020/link/link.component.mjs +9 -3
- package/esm2020/list/list-actions.component.mjs +1 -1
- package/esm2020/list/list-chooser.component.mjs +1 -1
- package/esm2020/list/list-sorting.component.mjs +1 -1
- package/esm2020/list/list-views.component.mjs +1 -1
- package/esm2020/list/list.component.mjs +22 -10
- package/esm2020/list/list.model.mjs +1 -1
- package/esm2020/menu/menu-item.component.mjs +3 -3
- package/esm2020/menu/menu.component.mjs +6 -3
- package/esm2020/menu/menu.model.mjs +2 -1
- package/esm2020/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +1 -1
- package/esm2020/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +25 -9
- package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +58 -26
- package/esm2020/profile-data-views-list/profile-data-views-list.model.mjs +1 -1
- package/esm2020/quantity-selector/quantity-selector.component.mjs +7 -3
- package/esm2020/query-builder/common/model/legacy.mjs +1 -1
- package/esm2020/query-builder/common/model/operator.mjs +72 -62
- package/esm2020/query-builder/common/services/output-query.service.mjs +5 -3
- package/esm2020/query-builder/common/services/query-structure.service.mjs +24 -1
- package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +3 -3
- package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +3 -3
- package/esm2020/query-builder/query-builder.module.mjs +14 -3
- package/esm2020/query-builder/query-builder.service.mjs +2 -2
- package/esm2020/remote-loader/remote-loader.service.mjs +16 -16
- package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +10 -3
- package/esm2020/select/select.component.mjs +3 -3
- package/esm2020/select-panel/select-panel.component.mjs +3 -5
- package/esm2020/signature/signature-dialog.component.mjs +2 -1
- package/esm2020/signature/signature.component.mjs +4 -4
- package/esm2020/skeleton-loader/public-api.mjs +2 -2
- package/esm2020/skeleton-loader/skeleton-loader.component.mjs +3 -3
- package/esm2020/smart-filters/common/model/operator.mjs +11 -4
- package/esm2020/smart-filters/common/model/type.mjs +1 -1
- package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +3 -3
- package/esm2020/smart-filters/text-filter/text-filter.component.mjs +3 -3
- package/esm2020/textbox/textbox.component.mjs +26 -6
- package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-chips.mjs +7 -10
- package/fesm2015/pepperi-addons-ngx-lib-chips.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-color.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs +22 -21
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-image.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-image.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs +8 -2
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-list.mjs +25 -13
- package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +8 -4
- package/fesm2015/pepperi-addons-ngx-lib-menu.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +81 -33
- package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +7 -2
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +119 -70
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +16 -16
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +9 -2
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs +2 -4
- package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-select.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-select.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +5 -3
- package/fesm2015/pepperi-addons-ngx-lib-signature.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs +3 -3
- package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +14 -7
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +26 -5
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.mjs +547 -532
- package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-chips.mjs +7 -10
- package/fesm2020/pepperi-addons-ngx-lib-chips.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-color.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-color.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs +22 -21
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-image.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-image.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs +8 -2
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-list.mjs +25 -13
- package/fesm2020/pepperi-addons-ngx-lib-list.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-menu.mjs +8 -4
- package/fesm2020/pepperi-addons-ngx-lib-menu.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +81 -33
- package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +6 -2
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +115 -69
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +15 -15
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +9 -2
- package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs +2 -4
- package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-select.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-select.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-signature.mjs +4 -3
- package/fesm2020/pepperi-addons-ngx-lib-signature.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs +3 -3
- package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +14 -7
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +25 -5
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib.mjs +544 -529
- package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/form/internal-carusel.component.d.ts +1 -0
- package/form/internal-menu.component.d.ts +1 -2
- package/link/link.component.d.ts +3 -1
- package/list/list.component.d.ts +1 -1
- package/list/list.model.d.ts +1 -2
- package/menu/menu.component.d.ts +2 -1
- package/menu/menu.model.d.ts +1 -0
- package/package.json +1 -1
- package/profile-data-views-list/profile-data-view/profile-data-view.component.d.ts +3 -3
- package/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.d.ts +5 -4
- package/profile-data-views-list/profile-data-views-list.component.d.ts +13 -10
- package/profile-data-views-list/profile-data-views-list.model.d.ts +8 -0
- package/query-builder/common/model/legacy.d.ts +2 -0
- package/query-builder/common/model/operator.d.ts +11 -1
- package/query-builder/common/services/query-structure.service.d.ts +1 -0
- package/query-builder/query-builder.module.d.ts +7 -3
- package/remote-loader/remote-loader.service.d.ts +1 -1
- package/rich-html-textarea/rich-html-textarea.component.d.ts +3 -1
- package/rich-html-textarea/rich-html-textarea.component.theme.scss +4 -2
- package/select-panel/select-panel.component.d.ts +1 -2
- package/signature/signature-dialog.component.d.ts +1 -1
- package/skeleton-loader/skeleton-loader.component.d.ts +3 -3
- package/smart-filters/boolean-filter/boolean-filter.component.d.ts +1 -0
- package/smart-filters/common/model/operator.d.ts +1 -0
- package/smart-filters/common/model/type.d.ts +1 -1
- package/smart-filters/date-filter/date-filter.component.d.ts +1 -0
- package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +1 -0
- package/smart-filters/number-filter/number-filter.component.d.ts +1 -0
- package/smart-filters/text-filter/text-filter.component.d.ts +1 -0
- package/src/assets/i18n/de.ngx-lib.json +4 -1
- package/src/assets/i18n/en.ngx-lib.json +7 -1
- package/src/core/style/abstracts/mixins.scss +73 -11
- package/src/core/style/abstracts/variables.scss +1 -1
- package/src/core/style/base/base.scss +5 -3
- package/src/core/style/base/typography.scss +2 -1
- package/src/core/style/components/button.scss +11 -0
- package/src/core/style/components/general.scss +2 -4
- package/textbox/textbox.component.d.ts +2 -0
- package/theming.scss +5 -1
- package/src/assets/images/sail-away.jpg +0 -0
- package/src/core/style/abstracts/AbstractsIntro.stories.mdx +0 -7
|
@@ -15,6 +15,8 @@ import * as i5 from '@pepperi-addons/ngx-lib/group-buttons';
|
|
|
15
15
|
import { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';
|
|
16
16
|
import { BehaviorSubject } from 'rxjs';
|
|
17
17
|
import * as i3$1 from '@angular/flex-layout/flex';
|
|
18
|
+
import * as i1$1 from '@pepperi-addons/ngx-lib/icon';
|
|
19
|
+
import { pepIconSystemBin, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
|
|
18
20
|
|
|
19
21
|
class PepTypeConvertorService {
|
|
20
22
|
constructor() {
|
|
@@ -97,10 +99,10 @@ class PepQueryBuilderSectionComponent {
|
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
PepQueryBuilderSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderSectionComponent, deps: [{ token: PepTypeConvertorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
100
|
-
PepQueryBuilderSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderSectionComponent, selector: "pep-query-builder-section", inputs: { form: "form", depth: "depth", hasFields: "hasFields" }, outputs: { createSection: "createSection", createItem: "createItem", remove: "remove", operatorChange: "operatorChange" }, viewQueries: [{ propertyName: "sectionContainer", first: true, predicate: ["sectionContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"
|
|
102
|
+
PepQueryBuilderSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderSectionComponent, selector: "pep-query-builder-section", inputs: { form: "form", depth: "depth", hasFields: "hasFields" }, outputs: { createSection: "createSection", createItem: "createItem", remove: "remove", operatorChange: "operatorChange" }, viewQueries: [{ propertyName: "sectionContainer", first: true, predicate: ["sectionContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"md\" classNames=\"\"\n [disabled]=\"false\" iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onDeleteSectionClicked()\">\n </pep-button>\n</div>", styles: [".query-section-container{border-radius:var(--pep-border-radius-md, .25rem);padding:.5rem;width:100%}\n", ".query-section-container{box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i4.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i5.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "supportUnselect", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }] });
|
|
101
103
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderSectionComponent, decorators: [{
|
|
102
104
|
type: Component,
|
|
103
|
-
args: [{ selector: 'pep-query-builder-section', template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"
|
|
105
|
+
args: [{ selector: 'pep-query-builder-section', template: "<div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <div class=\"query-section-container\" fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between\">\n <pep-group-buttons [buttons]=\"toggleButtons\" [selectedButtonKey]=\"f.operator?.value || ''\" styleType=\"weak\"\n sizeType=\"sm\" [viewType]=\"'toggle'\" [buttonsDisabled]=\"!hasFields\">\n </pep-group-buttons>\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-button value=\"Add Filter\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\" classNames=\"\"\n [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleClicked()\"></pep-button>\n <ng-container *ngIf=\"depth.current < depth.max-1\">\n <pep-button value=\"Add Filter Group\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"sm\"\n classNames=\"\" [disabled]=\"!hasFields\" iconName=\"number_plus\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onAddRuleSetClicked()\"></pep-button>\n </ng-container>\n </div>\n </div>\n <ng-container #sectionContainer></ng-container>\n </div>\n <pep-button *ngIf=\"depth.current > 0\" styleType=\"weak\" styleStateType=\"system\" sizeType=\"md\" classNames=\"\"\n [disabled]=\"false\" iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\"\n (buttonClick)=\"onDeleteSectionClicked()\">\n </pep-button>\n</div>", styles: [".query-section-container{border-radius:var(--pep-border-radius-md, .25rem);padding:.5rem;width:100%}\n", ".query-section-container{box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}\n"] }]
|
|
104
106
|
}], ctorParameters: function () { return [{ type: PepTypeConvertorService }]; }, propDecorators: { form: [{
|
|
105
107
|
type: Input
|
|
106
108
|
}], depth: [{
|
|
@@ -214,10 +216,10 @@ class PepQueryBuilderItemComponent {
|
|
|
214
216
|
}
|
|
215
217
|
}
|
|
216
218
|
PepQueryBuilderItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderItemComponent, deps: [{ token: i1.FormBuilder }, { token: PepTypeConvertorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
217
|
-
PepQueryBuilderItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderItemComponent, selector: "pep-query-builder-item", inputs: { formKey: "formKey", fields: "fields", selected: "selected", filter: "filter", parentForm: "parentForm", variableFields: "variableFields" }, outputs: { filterChange: "filterChange", remove: "remove" }, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'
|
|
219
|
+
PepQueryBuilderItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepQueryBuilderItemComponent, selector: "pep-query-builder-item", inputs: { formKey: "formKey", fields: "fields", selected: "selected", filter: "filter", parentForm: "parentForm", variableFields: "variableFields" }, outputs: { filterChange: "filterChange", remove: "remove" }, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <!-- <ng-container *ngSwitchCase=\"'text'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.text\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container> -->\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.text\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <pep-number-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.number\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-number-filter>\n </ng-container>\n </ng-container>\n </ng-container>\n <pep-button styleType=\"weak\" styleStateType=\"system\" sizeType=\"md\" classNames=\"\" [disabled]=\"false\"\n iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\" (buttonClick)=\"onDeleteItemClicked()\">\n </pep-button>\n </div>\n</div>", styles: ["::ng-deep .pep-field-no-spacing{min-height:0!important;margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i5$1.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "placeholder", "placeholderWhenDisabled", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle", "typeaheadDebounceInterval", "addValueToOptionsIfNotExist"], outputs: ["valueChange"] }, { kind: "component", type: i4.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i7.PepTextFilterComponent, selector: "pep-text-filter" }, { kind: "component", type: i7.PepBooleanFilterComponent, selector: "pep-boolean-filter", inputs: ["options"] }, { kind: "component", type: i7.PepDateFilterComponent, selector: "pep-date-filter" }, { kind: "component", type: i7.PepMultiSelectFilterComponent, selector: "pep-multi-select-filter" }, { kind: "component", type: i7.PepNumberFilterComponent, selector: "pep-number-filter" }] });
|
|
218
220
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderItemComponent, decorators: [{
|
|
219
221
|
type: Component,
|
|
220
|
-
args: [{ selector: 'pep-query-builder-item', template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'
|
|
222
|
+
args: [{ selector: 'pep-query-builder-item', template: "<div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div fxLayout=\"row\" fxLayoutGap=\".5rem\">\n <pep-select fxFlex=\"25%\" [value]=\"_selectedField?.id\" xAlignment=\"left\" [options]=\"_options\"\n [renderTitle]=\"false\" (valueChange)=\"onFieldChanged($event)\"></pep-select>\n <ng-container *ngIf=\"_selectedField?.componentType\">\n <ng-container [ngSwitch]=\"_selectedField.componentType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <pep-text-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [variableField]=\"variableFields?.text\"\n [field]=\"_selectedField\" [filter]=\"_filter\" [parentForm]=\"f.smart\" [emitOnChange]=\"true\"\n [inline]=\"true\" [renderTitle]=\"false\" (filterChange)=\"onFilterChanged()\">\n </pep-text-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <pep-boolean-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.boolean\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\"\n [options]=\"typeConvertorService.booleans\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-boolean-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <pep-date-filter fxFlex=\"auto\" [showActionButtons]=\"false\" [showAdditionalOperators]=\"true\"\n [variableField]=\"variableFields?.date\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-date-filter>\n </ng-container>\n <!-- <ng-container *ngSwitchCase=\"'text'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.text\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container> -->\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <pep-multi-select-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.text\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-multi-select-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <pep-number-filter fxFlex=\"auto\" [showActionButtons]=\"false\"\n [variableField]=\"variableFields?.number\" [field]=\"_selectedField\" [filter]=\"_filter\"\n [parentForm]=\"f.smart\" [emitOnChange]=\"true\" [inline]=\"true\" [renderTitle]=\"false\"\n (filterChange)=\"onFilterChanged()\">\n </pep-number-filter>\n </ng-container>\n </ng-container>\n </ng-container>\n <pep-button styleType=\"weak\" styleStateType=\"system\" sizeType=\"md\" classNames=\"\" [disabled]=\"false\"\n iconName=\"system_bin\" iconPosition=\"end\" [visible]=\"true\" (buttonClick)=\"onDeleteItemClicked()\">\n </pep-button>\n </div>\n</div>", styles: ["::ng-deep .pep-field-no-spacing{min-height:0!important;margin-bottom:0!important}\n"] }]
|
|
221
223
|
}], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: PepTypeConvertorService }]; }, propDecorators: { formKey: [{
|
|
222
224
|
type: Input
|
|
223
225
|
}], fields: [{
|
|
@@ -271,41 +273,50 @@ var PepOperatorTypes;
|
|
|
271
273
|
|
|
272
274
|
const Equals = {
|
|
273
275
|
legacy: 'IsEqual',
|
|
276
|
+
valueType: 'Static',
|
|
274
277
|
smartFilter: PepSmartFilterOperators.Equals,
|
|
275
278
|
type: ['boolean', 'int', 'text', 'real']
|
|
276
279
|
};
|
|
277
280
|
const EqualsVariable = {
|
|
278
|
-
legacy: '
|
|
281
|
+
legacy: 'IsEqual',
|
|
282
|
+
valueType: 'Dynamic',
|
|
279
283
|
smartFilter: PepSmartFilterVariableOperators.EqualsToVariable,
|
|
280
|
-
type: ['boolean', 'int', 'text',
|
|
284
|
+
type: ['boolean', 'int', 'text'],
|
|
285
|
+
fieldType: ['String', 'Bool', 'Integer']
|
|
281
286
|
};
|
|
282
287
|
const NotEqual = {
|
|
283
288
|
legacy: 'IsNotEqual',
|
|
289
|
+
valueType: 'Static',
|
|
284
290
|
smartFilter: PepSmartFilterOperators.NotEqual,
|
|
285
291
|
type: null
|
|
286
292
|
};
|
|
287
293
|
const NotEqualsVariable = {
|
|
288
|
-
legacy: '
|
|
294
|
+
legacy: 'IsNotEqual',
|
|
295
|
+
valueType: 'Dynamic',
|
|
289
296
|
smartFilter: PepSmartFilterVariableOperators.NotEqualsToVariable,
|
|
290
|
-
type: ['boolean'
|
|
297
|
+
type: ['boolean']
|
|
291
298
|
};
|
|
292
299
|
const LessThan = {
|
|
293
300
|
legacy: '<',
|
|
301
|
+
valueType: 'Static',
|
|
294
302
|
smartFilter: PepSmartFilterOperators.LessThan,
|
|
295
303
|
type: null
|
|
296
304
|
};
|
|
297
|
-
const
|
|
298
|
-
legacy: '
|
|
305
|
+
const LessThanVariable = {
|
|
306
|
+
legacy: '<',
|
|
307
|
+
valueType: 'Dynamic',
|
|
299
308
|
smartFilter: PepSmartFilterVariableOperators.LessThanVariable,
|
|
300
309
|
type: null
|
|
301
310
|
};
|
|
302
311
|
const GreaterThan = {
|
|
303
312
|
legacy: '>',
|
|
313
|
+
valueType: 'Static',
|
|
304
314
|
smartFilter: PepSmartFilterOperators.GreaterThan,
|
|
305
315
|
type: null
|
|
306
316
|
};
|
|
307
|
-
const
|
|
308
|
-
legacy: '
|
|
317
|
+
const GreaterThanVariable = {
|
|
318
|
+
legacy: '>',
|
|
319
|
+
valueType: 'Dynamic',
|
|
309
320
|
smartFilter: PepSmartFilterVariableOperators.GreaterThanVariable,
|
|
310
321
|
type: null
|
|
311
322
|
};
|
|
@@ -334,159 +345,142 @@ const LessThanOrEquals: IPepQueryBuilderOperator = {
|
|
|
334
345
|
}; */
|
|
335
346
|
const NumberRange = {
|
|
336
347
|
legacy: 'Between',
|
|
348
|
+
valueType: 'Static',
|
|
337
349
|
smartFilter: PepSmartFilterOperators.NumberRange,
|
|
338
350
|
type: ['int']
|
|
339
351
|
};
|
|
340
352
|
const Contains = {
|
|
341
353
|
legacy: 'Contains',
|
|
354
|
+
valueType: 'Static',
|
|
342
355
|
smartFilter: PepSmartFilterOperators.Contains,
|
|
343
356
|
type: null
|
|
344
357
|
};
|
|
345
358
|
const BeginsWith = {
|
|
346
|
-
legacy: '
|
|
359
|
+
legacy: 'StartWith',
|
|
360
|
+
valueType: 'Static',
|
|
347
361
|
smartFilter: PepSmartFilterOperators.BeginsWith,
|
|
348
362
|
type: null
|
|
349
363
|
};
|
|
350
364
|
const EndsWith = {
|
|
351
|
-
legacy: '
|
|
365
|
+
legacy: 'EndWith',
|
|
366
|
+
valueType: 'Static',
|
|
352
367
|
smartFilter: PepSmartFilterOperators.EndsWith,
|
|
353
368
|
type: null
|
|
354
369
|
};
|
|
355
|
-
/*
|
|
356
|
-
const BeginsWith: IPepQueryBuilderOperator = {
|
|
357
|
-
legacy: {
|
|
358
|
-
operator: 'BeginsWith',
|
|
359
|
-
type: 'String'
|
|
360
|
-
},
|
|
361
|
-
smartFilter: {
|
|
362
|
-
item: PepSmartFilterOperators.BeginsWith,
|
|
363
|
-
type: 'text'
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
const EndsWith: IPepQueryBuilderOperator = {
|
|
368
|
-
legacy: {
|
|
369
|
-
operator: 'EndsWith',
|
|
370
|
-
type: 'String'
|
|
371
|
-
},
|
|
372
|
-
smartFilter: {
|
|
373
|
-
item: PepSmartFilterOperators.EndsWith,
|
|
374
|
-
type: 'text'
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
const Before: IPepQueryBuilderOperator = {
|
|
379
|
-
legacy: {
|
|
380
|
-
operator: 'Before',
|
|
381
|
-
type: 'Date'
|
|
382
|
-
},
|
|
383
|
-
smartFilter: {
|
|
384
|
-
item: PepSmartFilterOperators.Before,
|
|
385
|
-
type: 'date'
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
const After: IPepQueryBuilderOperator = {
|
|
390
|
-
legacy: {
|
|
391
|
-
operator: 'After',
|
|
392
|
-
type: 'Date'
|
|
393
|
-
},
|
|
394
|
-
smartFilter: {
|
|
395
|
-
item: PepSmartFilterOperators.After,
|
|
396
|
-
type: 'date'
|
|
397
|
-
}
|
|
398
|
-
}; */
|
|
399
370
|
const InTheLast = {
|
|
400
371
|
legacy: 'InTheLast',
|
|
372
|
+
valueType: 'Static',
|
|
401
373
|
smartFilter: PepSmartFilterOperators.InTheLast,
|
|
402
374
|
type: null
|
|
403
375
|
};
|
|
404
376
|
const InTheLastCalendar = {
|
|
405
377
|
legacy: 'InTheLastCalendar',
|
|
378
|
+
valueType: 'Static',
|
|
406
379
|
smartFilter: PepSmartFilterAdditionalOperators.InTheLastCalendar,
|
|
407
380
|
type: null
|
|
408
381
|
};
|
|
409
382
|
/*
|
|
410
383
|
const InTheLastVariable: IPepQueryBuilderOperator = {
|
|
411
|
-
legacy: '
|
|
384
|
+
legacy: 'InTheLast',
|
|
385
|
+
valueType: 'Dynamic',
|
|
412
386
|
smartFilter: PepSmartFilterVariableOperators.InTheLastVariable,
|
|
413
387
|
type: null
|
|
414
388
|
} */
|
|
415
389
|
const NotInTheLast = {
|
|
416
390
|
legacy: 'NotInTheLast',
|
|
391
|
+
valueType: 'Static',
|
|
417
392
|
smartFilter: PepSmartFilterOperators.NotInTheLast,
|
|
418
393
|
type: null
|
|
419
394
|
};
|
|
420
395
|
const NotInTheLastCalendar = {
|
|
421
396
|
legacy: 'NotInTheLastCalendar',
|
|
397
|
+
valueType: 'Static',
|
|
422
398
|
smartFilter: PepSmartFilterAdditionalOperators.NotInTheLastCalendar,
|
|
423
399
|
type: null
|
|
424
400
|
};
|
|
425
401
|
const Today = {
|
|
426
402
|
legacy: 'Today',
|
|
403
|
+
valueType: 'Static',
|
|
427
404
|
smartFilter: PepSmartFilterOperators.Today,
|
|
428
405
|
type: null
|
|
429
406
|
};
|
|
430
407
|
const ThisWeek = {
|
|
431
408
|
legacy: 'ThisWeek',
|
|
409
|
+
valueType: 'Static',
|
|
432
410
|
smartFilter: PepSmartFilterOperators.ThisWeek,
|
|
433
411
|
type: null
|
|
434
412
|
};
|
|
435
413
|
const ThisMonth = {
|
|
436
414
|
legacy: 'ThisMonth',
|
|
415
|
+
valueType: 'Static',
|
|
437
416
|
smartFilter: PepSmartFilterOperators.ThisMonth,
|
|
438
417
|
type: null
|
|
439
418
|
};
|
|
440
419
|
const DateRange = {
|
|
441
420
|
legacy: 'Between',
|
|
421
|
+
valueType: 'Static',
|
|
442
422
|
smartFilter: PepSmartFilterOperators.DateRange,
|
|
443
423
|
type: ['date-time']
|
|
444
424
|
};
|
|
445
425
|
const dateRangeVariable = {
|
|
446
|
-
legacy: '
|
|
426
|
+
legacy: 'Between',
|
|
427
|
+
valueType: 'Dynamic',
|
|
447
428
|
smartFilter: PepSmartFilterVariableOperators.DateRangeVariable,
|
|
448
429
|
type: ['date-time']
|
|
449
430
|
};
|
|
450
431
|
const DueIn = {
|
|
451
432
|
legacy: 'DueIn',
|
|
433
|
+
valueType: 'Static',
|
|
452
434
|
smartFilter: PepSmartFilterOperators.DueIn,
|
|
453
435
|
type: null
|
|
454
436
|
};
|
|
455
437
|
const NotDueIn = {
|
|
456
438
|
legacy: 'NotDueIn',
|
|
439
|
+
valueType: 'Static',
|
|
457
440
|
smartFilter: PepSmartFilterOperators.NotDueIn,
|
|
458
441
|
type: null
|
|
459
442
|
};
|
|
460
443
|
const On = {
|
|
461
444
|
legacy: 'On',
|
|
445
|
+
valueType: 'Static',
|
|
462
446
|
smartFilter: PepSmartFilterOperators.On,
|
|
463
447
|
type: null
|
|
464
448
|
};
|
|
465
449
|
const IsEmpty = {
|
|
466
450
|
legacy: 'IsEmpty',
|
|
451
|
+
valueType: 'Static',
|
|
467
452
|
smartFilter: PepSmartFilterOperators.IsEmpty,
|
|
468
453
|
type: null
|
|
469
454
|
};
|
|
470
455
|
const IsNotEmpty = {
|
|
471
456
|
legacy: 'IsNotEmpty',
|
|
457
|
+
valueType: 'Static',
|
|
472
458
|
smartFilter: PepSmartFilterOperators.IsNotEmpty,
|
|
473
459
|
type: null
|
|
474
460
|
};
|
|
475
461
|
const In = {
|
|
476
462
|
legacy: 'IsEqual',
|
|
463
|
+
valueType: 'Static',
|
|
477
464
|
smartFilter: PepSmartFilterOperators.In,
|
|
478
465
|
type: ['multi-select']
|
|
479
466
|
};
|
|
467
|
+
const InVariable = {
|
|
468
|
+
legacy: 'IsEqual',
|
|
469
|
+
valueType: 'Dynamic',
|
|
470
|
+
smartFilter: PepSmartFilterVariableOperators.InVariable,
|
|
471
|
+
type: ['multi-select', 'text'],
|
|
472
|
+
fieldType: ['MultipleStringValues']
|
|
473
|
+
};
|
|
480
474
|
const PepQueryBuilderOperators = [
|
|
481
475
|
Equals,
|
|
482
476
|
EqualsVariable,
|
|
483
477
|
NotEqual,
|
|
484
478
|
NotEqualsVariable,
|
|
485
479
|
LessThan,
|
|
486
|
-
|
|
480
|
+
LessThanVariable,
|
|
487
481
|
// LessThanOrEquals,
|
|
488
482
|
GreaterThan,
|
|
489
|
-
|
|
483
|
+
GreaterThanVariable,
|
|
490
484
|
// GreaterThanOrEquals,
|
|
491
485
|
NumberRange,
|
|
492
486
|
Contains,
|
|
@@ -509,7 +503,8 @@ const PepQueryBuilderOperators = [
|
|
|
509
503
|
On,
|
|
510
504
|
IsEmpty,
|
|
511
505
|
IsNotEmpty,
|
|
512
|
-
In
|
|
506
|
+
In,
|
|
507
|
+
InVariable
|
|
513
508
|
];
|
|
514
509
|
/**
|
|
515
510
|
* gets a smart filter operator item
|
|
@@ -517,9 +512,15 @@ const PepQueryBuilderOperators = [
|
|
|
517
512
|
* @param type smart filter's type
|
|
518
513
|
* @returns smart filter operator item
|
|
519
514
|
*/
|
|
520
|
-
function getSmartFilterOperator(operator, type) {
|
|
515
|
+
function getSmartFilterOperator(operator, type, valueType, fieldType = null) {
|
|
521
516
|
const smartFilterOperator = PepQueryBuilderOperators.find(item => item.legacy === operator &&
|
|
522
|
-
|
|
517
|
+
item.valueType === valueType &&
|
|
518
|
+
(item.type === null || item.type.includes(type)) &&
|
|
519
|
+
(fieldType == null || item.fieldType === undefined || item.fieldType?.includes(fieldType)));
|
|
520
|
+
/*
|
|
521
|
+
FieldType: (current[key].smart.operator.id === 'inv' &&
|
|
522
|
+
current[key].smart.fieldType === 'text') ? 'MultipleStringValues' : current[key].query.fieldType,
|
|
523
|
+
*/
|
|
523
524
|
return smartFilterOperator ? smartFilterOperator.smartFilter : null;
|
|
524
525
|
}
|
|
525
526
|
/**
|
|
@@ -533,6 +534,17 @@ function getLegacyOperator(operator, type) {
|
|
|
533
534
|
(item.type === null || item.type.includes(type)));
|
|
534
535
|
return legacyOperator ? legacyOperator.legacy : null;
|
|
535
536
|
}
|
|
537
|
+
/**
|
|
538
|
+
* gets a value type of the operator value
|
|
539
|
+
* @param operator smart filter operator item
|
|
540
|
+
* @param type smart filter's type
|
|
541
|
+
* @returns value type operator value
|
|
542
|
+
*/
|
|
543
|
+
function getValueTypeOperator(operator, type) {
|
|
544
|
+
const valueType = PepQueryBuilderOperators.find(item => item.smartFilter === operator &&
|
|
545
|
+
(item.type === null || item.type.includes(type)));
|
|
546
|
+
return valueType ? valueType.valueType : 'Static';
|
|
547
|
+
}
|
|
536
548
|
|
|
537
549
|
const Days = {
|
|
538
550
|
legacy: 'Days',
|
|
@@ -607,8 +619,10 @@ class PepOutputQueryService {
|
|
|
607
619
|
section = this.addToSection(section, {
|
|
608
620
|
ExpressionId: (this._expressionIdCounter++).toString(),
|
|
609
621
|
ApiName: current[key].smart.fieldId,
|
|
610
|
-
FieldType: current[key].
|
|
622
|
+
FieldType: (current[key].smart.operator.id === 'inv' &&
|
|
623
|
+
current[key].smart.fieldType === 'text') ? 'MultipleStringValues' : current[key].query.fieldType,
|
|
611
624
|
Operation: getLegacyOperator(current[key].smart.operator, current[key].smart.fieldType),
|
|
625
|
+
ValueType: getValueTypeOperator(current[key].smart.operator, current[key].smart.fieldType),
|
|
612
626
|
Values: this.getItemValues(current[key].smart)
|
|
613
627
|
}, current.operator);
|
|
614
628
|
}
|
|
@@ -695,7 +709,7 @@ class PepQueryBuilderService {
|
|
|
695
709
|
* @returns smart filter object
|
|
696
710
|
*/
|
|
697
711
|
getFilter(current, field) {
|
|
698
|
-
const operator = getSmartFilterOperator(current.Operation, field.type);
|
|
712
|
+
const operator = getSmartFilterOperator(current.Operation, field.type, current.ValueType || 'Static', current.FieldType || null);
|
|
699
713
|
if (operator) {
|
|
700
714
|
const filterValues = this.getFilterValues(current, operator, field);
|
|
701
715
|
return createSmartFilter(current.ApiName, operator, filterValues.first, filterValues.second, filterValues.operationUnit);
|
|
@@ -789,6 +803,7 @@ class PepQueryStructureService {
|
|
|
789
803
|
this._outputQuery$ = new BehaviorSubject(null);
|
|
790
804
|
this._variableFields = {};
|
|
791
805
|
this._maxStructureDepth = MAX_STRUCTURE_DEPTH;
|
|
806
|
+
this._cmpRefMap = new Map();
|
|
792
807
|
this.outputQuery$ = this._outputQuery$.asObservable();
|
|
793
808
|
}
|
|
794
809
|
set maxDepth(value) {
|
|
@@ -830,6 +845,18 @@ class PepQueryStructureService {
|
|
|
830
845
|
* @param containerRef reference to root element
|
|
831
846
|
*/
|
|
832
847
|
buildQueryStructure(query, containerRef) {
|
|
848
|
+
// Remove all the components from the query builder.
|
|
849
|
+
this._cmpRefMap.forEach((value, key) => {
|
|
850
|
+
// console.log(key, value);
|
|
851
|
+
// value.instance.remove();
|
|
852
|
+
if (value.instance.parentForm) {
|
|
853
|
+
value.instance.parentForm.removeControl(key);
|
|
854
|
+
}
|
|
855
|
+
value.destroy();
|
|
856
|
+
this._cmpRefMap.delete(key);
|
|
857
|
+
});
|
|
858
|
+
// Clear containerRef
|
|
859
|
+
containerRef.clear();
|
|
833
860
|
//update root operator
|
|
834
861
|
if (this.hasProperty(query, 'ComplexId') &&
|
|
835
862
|
query?.Operation &&
|
|
@@ -910,10 +937,15 @@ class PepQueryStructureService {
|
|
|
910
937
|
parentForm.removeControl(formKey);
|
|
911
938
|
componentRef.destroy();
|
|
912
939
|
this.createOutputQuery();
|
|
940
|
+
if (this._cmpRefMap.has(formKey)) {
|
|
941
|
+
this._cmpRefMap.delete(formKey);
|
|
942
|
+
}
|
|
913
943
|
});
|
|
914
944
|
componentRef.instance.operatorChange.subscribe(() => {
|
|
915
945
|
this.createOutputQuery();
|
|
916
946
|
});
|
|
947
|
+
// Add this to remove all the components when fields changes.
|
|
948
|
+
this._cmpRefMap.set(formKey, componentRef);
|
|
917
949
|
return {
|
|
918
950
|
containerRef: componentRef.instance.sectionContainer,
|
|
919
951
|
parentForm: sectionGroup
|
|
@@ -951,7 +983,12 @@ class PepQueryStructureService {
|
|
|
951
983
|
parentForm.removeControl(formKey);
|
|
952
984
|
componentRef.destroy();
|
|
953
985
|
this.createOutputQuery();
|
|
986
|
+
if (this._cmpRefMap.has(formKey)) {
|
|
987
|
+
this._cmpRefMap.delete(formKey);
|
|
988
|
+
}
|
|
954
989
|
});
|
|
990
|
+
// Add this to remove all the components when fields changes.
|
|
991
|
+
this._cmpRefMap.set(formKey, componentRef);
|
|
955
992
|
}
|
|
956
993
|
/**
|
|
957
994
|
* get smart filter field
|
|
@@ -1098,8 +1135,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1098
1135
|
}] } });
|
|
1099
1136
|
|
|
1100
1137
|
class PepQueryBuilderModule {
|
|
1138
|
+
constructor(pepIconRegistry) {
|
|
1139
|
+
this.pepIconRegistry = pepIconRegistry;
|
|
1140
|
+
this.pepIconRegistry.registerIcons([
|
|
1141
|
+
pepIconSystemBin,
|
|
1142
|
+
]);
|
|
1143
|
+
}
|
|
1101
1144
|
}
|
|
1102
|
-
PepQueryBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1145
|
+
PepQueryBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, deps: [{ token: i1$1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1103
1146
|
PepQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, declarations: [PepQueryBuilderComponent,
|
|
1104
1147
|
PepQueryBuilderSectionComponent,
|
|
1105
1148
|
PepQueryBuilderItemComponent], imports: [CommonModule,
|
|
@@ -1107,6 +1150,7 @@ PepQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
|
|
|
1107
1150
|
FlexLayoutModule,
|
|
1108
1151
|
PepSelectModule,
|
|
1109
1152
|
PepButtonModule,
|
|
1153
|
+
PepIconModule,
|
|
1110
1154
|
PepGroupButtonsModule,
|
|
1111
1155
|
PepSmartFiltersModule], exports: [PepQueryBuilderComponent] });
|
|
1112
1156
|
PepQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, providers: [
|
|
@@ -1116,6 +1160,7 @@ PepQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
1116
1160
|
FlexLayoutModule,
|
|
1117
1161
|
PepSelectModule,
|
|
1118
1162
|
PepButtonModule,
|
|
1163
|
+
PepIconModule,
|
|
1119
1164
|
PepGroupButtonsModule,
|
|
1120
1165
|
PepSmartFiltersModule] });
|
|
1121
1166
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepQueryBuilderModule, decorators: [{
|
|
@@ -1127,6 +1172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1127
1172
|
FlexLayoutModule,
|
|
1128
1173
|
PepSelectModule,
|
|
1129
1174
|
PepButtonModule,
|
|
1175
|
+
PepIconModule,
|
|
1130
1176
|
PepGroupButtonsModule,
|
|
1131
1177
|
PepSmartFiltersModule
|
|
1132
1178
|
],
|
|
@@ -1142,7 +1188,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1142
1188
|
FormBuilder
|
|
1143
1189
|
]
|
|
1144
1190
|
}]
|
|
1145
|
-
}] });
|
|
1191
|
+
}], ctorParameters: function () { return [{ type: i1$1.PepIconRegistry }]; } });
|
|
1146
1192
|
|
|
1147
1193
|
/*
|
|
1148
1194
|
* Public API Surface of ngx-lib/query-builder
|