@fuentis/phoenix-ui 0.0.9-alpha.170 → 0.0.9-alpha.172
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.
|
@@ -322,16 +322,21 @@ class SearchBarComponent {
|
|
|
322
322
|
this.translate = translate;
|
|
323
323
|
this.valueSub$ = this.valueChanges
|
|
324
324
|
.pipe(debounceTime(400), switchMap((value) => {
|
|
325
|
+
console.log(" LIB TEXT SERACH CHANGED " + value);
|
|
325
326
|
this.inputEvent = value;
|
|
326
327
|
const target = value?.target;
|
|
327
328
|
this.size = 10;
|
|
328
329
|
this.inputText = target?.value;
|
|
329
330
|
if (target?.value) {
|
|
331
|
+
console.log(" LIB TEXT SERACH CHANGED TARGET VALUE" + target?.value);
|
|
330
332
|
this.textValue = target.value;
|
|
331
|
-
|
|
333
|
+
const url = this.tabs()?.[this.tabIndex]?.apiUrl;
|
|
334
|
+
if (url) {
|
|
335
|
+
console.log(" LIB TEXT SERACH CHANGED URL" + url);
|
|
332
336
|
return this.crudService
|
|
333
|
-
.getSearchData(
|
|
334
|
-
.pipe(catchError(() => {
|
|
337
|
+
.getSearchData(url, target.value, this.size)
|
|
338
|
+
.pipe(catchError((err) => {
|
|
339
|
+
console.error('Error fetching data', err);
|
|
335
340
|
return of(null);
|
|
336
341
|
}));
|
|
337
342
|
}
|
|
@@ -426,9 +431,7 @@ class SearchBarComponent {
|
|
|
426
431
|
this.setCheckBoxes();
|
|
427
432
|
}
|
|
428
433
|
expand() {
|
|
429
|
-
|
|
430
|
-
this.isOpen = true;
|
|
431
|
-
}, 500);
|
|
434
|
+
this.isOpen = true;
|
|
432
435
|
}
|
|
433
436
|
onParentClick(event) {
|
|
434
437
|
setTimeout(() => {
|
|
@@ -436,12 +439,22 @@ class SearchBarComponent {
|
|
|
436
439
|
}, 120);
|
|
437
440
|
}
|
|
438
441
|
tabChange(index) {
|
|
442
|
+
console.log('tabChange', index);
|
|
439
443
|
this.searchData = [];
|
|
440
444
|
this.clonedData = [];
|
|
441
445
|
this.filterData();
|
|
442
446
|
this.tabIndex = index;
|
|
443
447
|
this.valueChanges.next(this.inputEvent);
|
|
444
448
|
}
|
|
449
|
+
onTabClick(id) {
|
|
450
|
+
this.searchData = [];
|
|
451
|
+
this.clonedData = [];
|
|
452
|
+
this.filterData();
|
|
453
|
+
this.tabIndex = id;
|
|
454
|
+
if (this.inputEvent?.target) {
|
|
455
|
+
this.valueChanges.next(this.inputEvent);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
445
458
|
setCheckBoxes() {
|
|
446
459
|
if (this.trigg) {
|
|
447
460
|
this.mocekedFilters[0].checkboxes = [];
|
|
@@ -466,7 +479,7 @@ class SearchBarComponent {
|
|
|
466
479
|
this.reloadSubscription$.unsubscribe();
|
|
467
480
|
}
|
|
468
481
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SearchBarComponent, deps: [{ token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
469
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SearchBarComponent, isStandalone: true, selector: "pho-search-bar", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "nes", first: true, predicate: ["op"], descendants: true }, { propertyName: "elm", first: true, predicate: ["elm"], descendants: true, static: true }], ngImport: i0, template: "<div (click)=\"onParentClick($event)\" class=\"p-input-icon-left ml-1\" #elm>\n <p-iconfield>\n <p-inputicon styleClass=\"pi pi-search\" />\n <input\n [@openClose]=\"isOpen ? 'open' : 'closed'\"\n type=\"text\"\n pInputText\n placeholder=\"{{ 'SEARCH_PLACEHOLDERS.GLOBAL_SEARCH' | translate }}\"\n (input)=\"valueChanges.next($event)\"\n (focus)=\"onParentClick($event); expand()\"\n />\n </p-iconfield>\n</div>\n<p-popover\n [dismissable]=\"true\"\n [showTransitionOptions]=\"'.2s ease-out'\"\n [autoZIndex]=\"true\"\n #op\n [style]=\"{ width: '50vw' }\"\n (onHide)=\"isOpen = false\"\n>\n <div\n *ngIf=\"!inputText\"\n class=\"flex align-items-start gap-2 p-3 border-1 border-blue-300 surface-50 text-blue-700 border-round w-full\"\n >\n <i class=\"pi pi-info-circle mt-1 text-blue-500\"></i>\n <span class=\"text-sm\">{{ \"MESSAGES.START_TYPING\" | translate }}</span>\n </div>\n\n <ng-template pTemplate=\"content\">\n @if(inputText) {\n <p-tabs [value]=\"tabIndex\">\n <p-tablist>\n @for (tab of tabs(); track tab.id) {\n <p-tab [value]=\"tab.id\"
|
|
482
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SearchBarComponent, isStandalone: true, selector: "pho-search-bar", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "nes", first: true, predicate: ["op"], descendants: true }, { propertyName: "elm", first: true, predicate: ["elm"], descendants: true, static: true }], ngImport: i0, template: "<div (click)=\"onParentClick($event)\" class=\"p-input-icon-left ml-1\" #elm>\n <p-iconfield>\n <p-inputicon styleClass=\"pi pi-search\" />\n <input\n [@openClose]=\"isOpen ? 'open' : 'closed'\"\n type=\"text\"\n pInputText\n placeholder=\"{{ 'SEARCH_PLACEHOLDERS.GLOBAL_SEARCH' | translate }}\"\n (input)=\"valueChanges.next($event)\"\n (focus)=\"onParentClick($event); expand()\"\n />\n </p-iconfield>\n</div>\n<p-popover\n [dismissable]=\"true\"\n [showTransitionOptions]=\"'.2s ease-out'\"\n [autoZIndex]=\"true\"\n #op\n [style]=\"{ width: '50vw' }\"\n (onHide)=\"isOpen = false\"\n>\n <div\n *ngIf=\"!inputText\"\n class=\"flex align-items-start gap-2 p-3 border-1 border-blue-300 surface-50 text-blue-700 border-round w-full\"\n >\n <i class=\"pi pi-info-circle mt-1 text-blue-500\"></i>\n <span class=\"text-sm\">{{ \"MESSAGES.START_TYPING\" | translate }}</span>\n </div>\n\n <ng-template pTemplate=\"content\">\n @if(inputText) {\n <p-tabs [value]=\"tabIndex\">\n <p-tablist>\n @for (tab of tabs(); track tab.id) {\n <p-tab [value]=\"tab.id\" (click)=\"onTabClick(tab.id)\">\n <span>{{ tab.header }}</span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of tabs(); track tab.id) {\n <p-tabpanel [value]=\"tab.id\">\n <pho-serach-card\n [tab]=\"tab.id\"\n [mocekedFilters]=\"mocekedFilters\"\n [searchData]=\"searchData\"\n [checkboxes]=\"checkboxes\"\n (onScrollEvent)=\"onScroll($event)\"\n (onSelectLinkEvent)=\"setLinkUrl($event?.url)\"\n (onSelectFilterEvent)=\"onClick($event)\"\n >\n </pho-serach-card>\n </p-tabpanel>\n }\n </p-tabpanels> </p-tabs\n >}\n </ng-template>\n</p-popover>\n", styles: [".p-popover:after,.p-popover:before{content:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i3$2.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i4$2.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i6.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i6.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i6.TabPanel, selector: "p-tabpanel", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: i6.TabList, selector: "p-tablist" }, { kind: "component", type: i6.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: MessageModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "component", type: SearchCardComponent, selector: "pho-serach-card", inputs: ["searchData", "tab", "mocekedFilters", "checkboxes"], outputs: ["onScrollEvent", "onSelectLinkEvent", "onSelectFilterEvent"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i7$1.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "component", type: i8.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }], animations: [
|
|
470
483
|
trigger('openClose', [
|
|
471
484
|
state('open', style({
|
|
472
485
|
width: '50vw',
|
|
@@ -504,7 +517,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
504
517
|
})),
|
|
505
518
|
transition('* <=> *', [animate('0.1s ease-in-out')]),
|
|
506
519
|
]),
|
|
507
|
-
], template: "<div (click)=\"onParentClick($event)\" class=\"p-input-icon-left ml-1\" #elm>\n <p-iconfield>\n <p-inputicon styleClass=\"pi pi-search\" />\n <input\n [@openClose]=\"isOpen ? 'open' : 'closed'\"\n type=\"text\"\n pInputText\n placeholder=\"{{ 'SEARCH_PLACEHOLDERS.GLOBAL_SEARCH' | translate }}\"\n (input)=\"valueChanges.next($event)\"\n (focus)=\"onParentClick($event); expand()\"\n />\n </p-iconfield>\n</div>\n<p-popover\n [dismissable]=\"true\"\n [showTransitionOptions]=\"'.2s ease-out'\"\n [autoZIndex]=\"true\"\n #op\n [style]=\"{ width: '50vw' }\"\n (onHide)=\"isOpen = false\"\n>\n <div\n *ngIf=\"!inputText\"\n class=\"flex align-items-start gap-2 p-3 border-1 border-blue-300 surface-50 text-blue-700 border-round w-full\"\n >\n <i class=\"pi pi-info-circle mt-1 text-blue-500\"></i>\n <span class=\"text-sm\">{{ \"MESSAGES.START_TYPING\" | translate }}</span>\n </div>\n\n <ng-template pTemplate=\"content\">\n @if(inputText) {\n <p-tabs [value]=\"tabIndex\">\n <p-tablist>\n @for (tab of tabs(); track tab.id) {\n <p-tab [value]=\"tab.id\"
|
|
520
|
+
], template: "<div (click)=\"onParentClick($event)\" class=\"p-input-icon-left ml-1\" #elm>\n <p-iconfield>\n <p-inputicon styleClass=\"pi pi-search\" />\n <input\n [@openClose]=\"isOpen ? 'open' : 'closed'\"\n type=\"text\"\n pInputText\n placeholder=\"{{ 'SEARCH_PLACEHOLDERS.GLOBAL_SEARCH' | translate }}\"\n (input)=\"valueChanges.next($event)\"\n (focus)=\"onParentClick($event); expand()\"\n />\n </p-iconfield>\n</div>\n<p-popover\n [dismissable]=\"true\"\n [showTransitionOptions]=\"'.2s ease-out'\"\n [autoZIndex]=\"true\"\n #op\n [style]=\"{ width: '50vw' }\"\n (onHide)=\"isOpen = false\"\n>\n <div\n *ngIf=\"!inputText\"\n class=\"flex align-items-start gap-2 p-3 border-1 border-blue-300 surface-50 text-blue-700 border-round w-full\"\n >\n <i class=\"pi pi-info-circle mt-1 text-blue-500\"></i>\n <span class=\"text-sm\">{{ \"MESSAGES.START_TYPING\" | translate }}</span>\n </div>\n\n <ng-template pTemplate=\"content\">\n @if(inputText) {\n <p-tabs [value]=\"tabIndex\">\n <p-tablist>\n @for (tab of tabs(); track tab.id) {\n <p-tab [value]=\"tab.id\" (click)=\"onTabClick(tab.id)\">\n <span>{{ tab.header }}</span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of tabs(); track tab.id) {\n <p-tabpanel [value]=\"tab.id\">\n <pho-serach-card\n [tab]=\"tab.id\"\n [mocekedFilters]=\"mocekedFilters\"\n [searchData]=\"searchData\"\n [checkboxes]=\"checkboxes\"\n (onScrollEvent)=\"onScroll($event)\"\n (onSelectLinkEvent)=\"setLinkUrl($event?.url)\"\n (onSelectFilterEvent)=\"onClick($event)\"\n >\n </pho-serach-card>\n </p-tabpanel>\n }\n </p-tabpanels> </p-tabs\n >}\n </ng-template>\n</p-popover>\n", styles: [".p-popover:after,.p-popover:before{content:none!important}\n"] }]
|
|
508
521
|
}], ctorParameters: () => [{ type: i3$1.TranslateService }], propDecorators: { nes: [{
|
|
509
522
|
type: ViewChild,
|
|
510
523
|
args: ['op']
|