@agorapulse/ui-components 22.4.7 → 22.4.9
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/agorapulse-ui-components-22.4.9.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-button.mjs +3 -15
- package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +14 -2
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-icon-button.mjs +2 -14
- package/fesm2022/agorapulse-ui-components-icon-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-paginator.mjs +3 -20
- package/fesm2022/agorapulse-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-social-button.mjs +2 -14
- package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-split-button.mjs +3 -13
- package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
- package/package.json +1 -1
- package/types/agorapulse-ui-components-button.d.ts +0 -2
- package/types/agorapulse-ui-components-icon-button.d.ts +0 -2
- package/types/agorapulse-ui-components-paginator.d.ts +0 -4
- package/types/agorapulse-ui-components-social-button.d.ts +0 -2
- package/types/agorapulse-ui-components-split-button.d.ts +0 -2
- package/agorapulse-ui-components-22.4.7.tgz +0 -0
|
@@ -4,7 +4,7 @@ import { BaseButtonDirective } from '@agorapulse/ui-components/directives';
|
|
|
4
4
|
import { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';
|
|
5
5
|
import { SymbolRegistry, SymbolComponent, apChevronDown } from '@agorapulse/ui-symbol';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { inject, input, booleanAttribute, output, viewChild, contentChild, effect,
|
|
7
|
+
import { inject, input, booleanAttribute, output, viewChild, contentChild, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
8
|
import * as i2 from '@angular/material/menu';
|
|
9
9
|
import { MatMenuModule } from '@angular/material/menu';
|
|
10
10
|
|
|
@@ -72,7 +72,6 @@ class SplitButtonComponent {
|
|
|
72
72
|
this.buttonElement().nativeElement.blur();
|
|
73
73
|
this.splitButtonElement().nativeElement.blur();
|
|
74
74
|
}
|
|
75
|
-
focused = false;
|
|
76
75
|
onClickHandle($event) {
|
|
77
76
|
if (this.disabled() || this.loading()) {
|
|
78
77
|
return;
|
|
@@ -82,14 +81,8 @@ class SplitButtonComponent {
|
|
|
82
81
|
this.buttonElement().nativeElement.blur();
|
|
83
82
|
this.blur.emit($event);
|
|
84
83
|
}
|
|
85
|
-
onSpaceKeyUp(event) {
|
|
86
|
-
if (this.focused && !this.loading()) {
|
|
87
|
-
event.preventDefault();
|
|
88
|
-
this.buttonElement().nativeElement.click();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
84
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
92
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SplitButtonComponent, isStandalone: true, selector: "ap-split-button", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, actionDropdownTrigger: { classPropertyName: "actionDropdownTrigger", publicName: "actionDropdownTrigger", isSignal: true, isRequired: false, transformFunction: null }, menuTrigger: { classPropertyName: "menuTrigger", publicName: "menuTrigger", isSignal: true, isRequired: false, transformFunction: null }, splitDisabled: { classPropertyName: "splitDisabled", publicName: "splitDisabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, symbolPosition: { classPropertyName: "symbolPosition", publicName: "symbolPosition", isSignal: true, isRequired: false, transformFunction: null }, splitButtonDataTest: { classPropertyName: "splitButtonDataTest", publicName: "splitButtonDataTest", isSignal: true, isRequired: false, transformFunction: null }, symbolId: { classPropertyName: "symbolId", publicName: "symbolId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuOpened: "menuOpened", menuClosed: "menuClosed", mainButtonClick: "mainButtonClick", focus: "focus", blur: "blur" }, host: {
|
|
85
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SplitButtonComponent, isStandalone: true, selector: "ap-split-button", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, actionDropdownTrigger: { classPropertyName: "actionDropdownTrigger", publicName: "actionDropdownTrigger", isSignal: true, isRequired: false, transformFunction: null }, menuTrigger: { classPropertyName: "menuTrigger", publicName: "menuTrigger", isSignal: true, isRequired: false, transformFunction: null }, splitDisabled: { classPropertyName: "splitDisabled", publicName: "splitDisabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, symbolPosition: { classPropertyName: "symbolPosition", publicName: "symbolPosition", isSignal: true, isRequired: false, transformFunction: null }, splitButtonDataTest: { classPropertyName: "splitButtonDataTest", publicName: "splitButtonDataTest", isSignal: true, isRequired: false, transformFunction: null }, symbolId: { classPropertyName: "symbolId", publicName: "symbolId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuOpened: "menuOpened", menuClosed: "menuClosed", mainButtonClick: "mainButtonClick", focus: "focus", blur: "blur" }, host: { properties: { "attr.disabled": "loading() || (disabled() && splitDisabled()) || null", "class.loading": "loading()" } }, queries: [{ propertyName: "symbolComponent", first: true, predicate: SymbolComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, isSignal: true }, { propertyName: "splitButtonElement", first: true, predicate: ["splitButton"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BaseButtonDirective }], ngImport: i0, template: "<button\n #button\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.inverse]=\"symbolPosition() === 'left'\"\n [class.loading]=\"loading()\"\n [disabled]=\"disabled() || loading()\"\n [name]=\"name()\"\n [id]=\"id\"\n [attr.data-test]=\"baseButtonDirective.hostDataTest ?? name()\"\n (click)=\"onClickHandle($event)\"\n (focus)=\"focus.emit($event)\"\n (blur)=\"blur.emit($event)\">\n <ng-content select=\"span\" />\n @if (symbolId()) {\n <ap-symbol [symbolId]=\"symbolId()\" />\n } @else {\n <ng-content select=\"ap-symbol\" />\n }\n</button>\n<button\n #splitButton\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.loading]=\"loading()\"\n [disabled]=\"splitDisabled() || loading()\"\n [id]=\"id + '-split'\"\n [attr.aria-labelledby]=\"id + '-split ' + id\"\n [attr.data-test]=\"splitButtonDataTest() ?? name() + '-split'\"\n [apActionDropdownTrigger]=\"actionDropdownTrigger()\"\n [matMenuTriggerFor]=\"menuTrigger()\"\n (click)=\"onSplitButtonClickHandle($event)\"\n (menuClosed)=\"handleMenuClosed()\"\n (menuOpened)=\"handleMenuOpened()\">\n <ap-symbol\n symbolId=\"chevron-down\"\n size=\"sm\"\n [class.opened]=\"menuOpen\" />\n <span class=\"visually-hidden\">Toggle</span>\n</button>\n@if (loading()) {\n <div\n class=\"loading-bar\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"></div>\n}\n", styles: ["ap-split-button{--loading-bar-width: 50px;display:inline-flex;gap:1px;position:relative}ap-split-button[disabled]{pointer-events:none}ap-split-button.loading{overflow:hidden;border-radius:var(--comp-split-button-border-radius)}ap-split-button button{border:none;position:relative;padding:var(--comp-split-button-padding-horizontal) var(--comp-split-button-padding-vertical);max-height:var(--comp-button-height);min-height:var(--comp-button-height);overflow:hidden;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px}ap-split-button button ap-symbol{width:16px;min-width:16px;max-width:16px;height:16px;min-height:16px;max-height:16px}ap-split-button button.inverse{flex-direction:row-reverse}ap-split-button button:hover:not(:disabled):not(.loading){cursor:pointer}ap-split-button button:disabled{pointer-events:none}@media(hover:hover){ap-split-button button:focus:not(:disabled):not(:active):not(.loading){outline:2px solid var(--ref-color-electric-blue-100);outline-offset:1px;z-index:10}}ap-split-button button span{font-size:var(--comp-split-button-text-size);font-family:var(--comp-split-button-text-font-family);line-height:var(--comp-split-button-text-line-height);font-weight:var(--comp-split-button-text-weight);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}ap-split-button button.loading{pointer-events:none}ap-split-button button.primary span,ap-split-button button.primary ap-symbol{color:var(--ref-color-white)}ap-split-button button.primary.orange{background:var(--ref-color-orange-100)}ap-split-button button.primary.orange:hover{background-color:var(--ref-color-orange-80)}ap-split-button button.primary.orange:active:not(:disabled){background-color:var(--ref-color-orange-60)}ap-split-button button.primary.orange:disabled{background-color:var(--ref-color-orange-20)}ap-split-button button.primary.orange.loading{background-color:var(--ref-color-orange-60)}ap-split-button button.primary.blue{background:var(--ref-color-electric-blue-100)}ap-split-button button.primary.blue:hover{background-color:var(--ref-color-electric-blue-80)}ap-split-button button.primary.blue:active:not(:disabled){background-color:var(--ref-color-electric-blue-60)}ap-split-button button.primary.blue:disabled{background-color:var(--ref-color-electric-blue-20)}ap-split-button button.primary.blue.loading{background-color:var(--ref-color-electric-blue-60)}ap-split-button button:first-child{border-top-left-radius:var(--comp-split-button-border-radius);border-bottom-left-radius:var(--comp-split-button-border-radius)}ap-split-button button:last-child{border-top-right-radius:var(--comp-split-button-border-radius);border-bottom-right-radius:var(--comp-split-button-border-radius);padding:var(--comp-split-button-padding-horizontal) 10px var(--comp-split-button-padding-horizontal) 10px}ap-split-button button ap-symbol{will-change:transform;transition:.2s ease-in-out}ap-split-button button ap-symbol.opened{transform:rotate(180deg)}ap-split-button .loading-bar{position:absolute;bottom:0;left:0;width:var(--loading-bar-width);height:5px;border-radius:8px;animation:ap-split-button-slide 1.5s ease-in-out infinite}ap-split-button .loading-bar.orange{background-color:var(--ref-color-orange-100)}ap-split-button .loading-bar.blue{background-color:var(--ref-color-electric-blue-100)}@keyframes ap-split-button-slide{0%{left:calc(var(--loading-bar-width) * -1)}to{left:100%}}.visually-hidden{width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;position:absolute!important}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "directive", type: i2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: ActionDropdownTriggerDirective, selector: "[apActionDropdownTrigger]", inputs: ["apActionDropdownTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
93
86
|
}
|
|
94
87
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
95
88
|
type: Component,
|
|
@@ -97,10 +90,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
97
90
|
'[attr.disabled]': 'loading() || (disabled() && splitDisabled()) || null',
|
|
98
91
|
'[class.loading]': 'loading()',
|
|
99
92
|
}, template: "<button\n #button\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.inverse]=\"symbolPosition() === 'left'\"\n [class.loading]=\"loading()\"\n [disabled]=\"disabled() || loading()\"\n [name]=\"name()\"\n [id]=\"id\"\n [attr.data-test]=\"baseButtonDirective.hostDataTest ?? name()\"\n (click)=\"onClickHandle($event)\"\n (focus)=\"focus.emit($event)\"\n (blur)=\"blur.emit($event)\">\n <ng-content select=\"span\" />\n @if (symbolId()) {\n <ap-symbol [symbolId]=\"symbolId()\" />\n } @else {\n <ng-content select=\"ap-symbol\" />\n }\n</button>\n<button\n #splitButton\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.loading]=\"loading()\"\n [disabled]=\"splitDisabled() || loading()\"\n [id]=\"id + '-split'\"\n [attr.aria-labelledby]=\"id + '-split ' + id\"\n [attr.data-test]=\"splitButtonDataTest() ?? name() + '-split'\"\n [apActionDropdownTrigger]=\"actionDropdownTrigger()\"\n [matMenuTriggerFor]=\"menuTrigger()\"\n (click)=\"onSplitButtonClickHandle($event)\"\n (menuClosed)=\"handleMenuClosed()\"\n (menuOpened)=\"handleMenuOpened()\">\n <ap-symbol\n symbolId=\"chevron-down\"\n size=\"sm\"\n [class.opened]=\"menuOpen\" />\n <span class=\"visually-hidden\">Toggle</span>\n</button>\n@if (loading()) {\n <div\n class=\"loading-bar\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"></div>\n}\n", styles: ["ap-split-button{--loading-bar-width: 50px;display:inline-flex;gap:1px;position:relative}ap-split-button[disabled]{pointer-events:none}ap-split-button.loading{overflow:hidden;border-radius:var(--comp-split-button-border-radius)}ap-split-button button{border:none;position:relative;padding:var(--comp-split-button-padding-horizontal) var(--comp-split-button-padding-vertical);max-height:var(--comp-button-height);min-height:var(--comp-button-height);overflow:hidden;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px}ap-split-button button ap-symbol{width:16px;min-width:16px;max-width:16px;height:16px;min-height:16px;max-height:16px}ap-split-button button.inverse{flex-direction:row-reverse}ap-split-button button:hover:not(:disabled):not(.loading){cursor:pointer}ap-split-button button:disabled{pointer-events:none}@media(hover:hover){ap-split-button button:focus:not(:disabled):not(:active):not(.loading){outline:2px solid var(--ref-color-electric-blue-100);outline-offset:1px;z-index:10}}ap-split-button button span{font-size:var(--comp-split-button-text-size);font-family:var(--comp-split-button-text-font-family);line-height:var(--comp-split-button-text-line-height);font-weight:var(--comp-split-button-text-weight);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}ap-split-button button.loading{pointer-events:none}ap-split-button button.primary span,ap-split-button button.primary ap-symbol{color:var(--ref-color-white)}ap-split-button button.primary.orange{background:var(--ref-color-orange-100)}ap-split-button button.primary.orange:hover{background-color:var(--ref-color-orange-80)}ap-split-button button.primary.orange:active:not(:disabled){background-color:var(--ref-color-orange-60)}ap-split-button button.primary.orange:disabled{background-color:var(--ref-color-orange-20)}ap-split-button button.primary.orange.loading{background-color:var(--ref-color-orange-60)}ap-split-button button.primary.blue{background:var(--ref-color-electric-blue-100)}ap-split-button button.primary.blue:hover{background-color:var(--ref-color-electric-blue-80)}ap-split-button button.primary.blue:active:not(:disabled){background-color:var(--ref-color-electric-blue-60)}ap-split-button button.primary.blue:disabled{background-color:var(--ref-color-electric-blue-20)}ap-split-button button.primary.blue.loading{background-color:var(--ref-color-electric-blue-60)}ap-split-button button:first-child{border-top-left-radius:var(--comp-split-button-border-radius);border-bottom-left-radius:var(--comp-split-button-border-radius)}ap-split-button button:last-child{border-top-right-radius:var(--comp-split-button-border-radius);border-bottom-right-radius:var(--comp-split-button-border-radius);padding:var(--comp-split-button-padding-horizontal) 10px var(--comp-split-button-padding-horizontal) 10px}ap-split-button button ap-symbol{will-change:transform;transition:.2s ease-in-out}ap-split-button button ap-symbol.opened{transform:rotate(180deg)}ap-split-button .loading-bar{position:absolute;bottom:0;left:0;width:var(--loading-bar-width);height:5px;border-radius:8px;animation:ap-split-button-slide 1.5s ease-in-out infinite}ap-split-button .loading-bar.orange{background-color:var(--ref-color-orange-100)}ap-split-button .loading-bar.blue{background-color:var(--ref-color-electric-blue-100)}@keyframes ap-split-button-slide{0%{left:calc(var(--loading-bar-width) * -1)}to{left:100%}}.visually-hidden{width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;position:absolute!important}\n"] }]
|
|
100
|
-
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], actionDropdownTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionDropdownTrigger", required: false }] }], menuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuTrigger", required: false }] }], splitDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "splitDisabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], symbolPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "symbolPosition", required: false }] }], splitButtonDataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "splitButtonDataTest", required: false }] }], symbolId: [{ type: i0.Input, args: [{ isSignal: true, alias: "symbolId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], menuOpened: [{ type: i0.Output, args: ["menuOpened"] }], menuClosed: [{ type: i0.Output, args: ["menuClosed"] }], mainButtonClick: [{ type: i0.Output, args: ["mainButtonClick"] }], focus: [{ type: i0.Output, args: ["focus"] }], blur: [{ type: i0.Output, args: ["blur"] }], buttonElement: [{ type: i0.ViewChild, args: ['button', { isSignal: true }] }], splitButtonElement: [{ type: i0.ViewChild, args: ['splitButton', { isSignal: true }] }], symbolComponent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SymbolComponent), { isSignal: true }] }]
|
|
101
|
-
type: HostListener,
|
|
102
|
-
args: ['window:keyup.space', ['$event']]
|
|
103
|
-
}] } });
|
|
93
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], actionDropdownTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionDropdownTrigger", required: false }] }], menuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuTrigger", required: false }] }], splitDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "splitDisabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], symbolPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "symbolPosition", required: false }] }], splitButtonDataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "splitButtonDataTest", required: false }] }], symbolId: [{ type: i0.Input, args: [{ isSignal: true, alias: "symbolId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], menuOpened: [{ type: i0.Output, args: ["menuOpened"] }], menuClosed: [{ type: i0.Output, args: ["menuClosed"] }], mainButtonClick: [{ type: i0.Output, args: ["mainButtonClick"] }], focus: [{ type: i0.Output, args: ["focus"] }], blur: [{ type: i0.Output, args: ["blur"] }], buttonElement: [{ type: i0.ViewChild, args: ['button', { isSignal: true }] }], splitButtonElement: [{ type: i0.ViewChild, args: ['splitButton', { isSignal: true }] }], symbolComponent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SymbolComponent), { isSignal: true }] }] } });
|
|
104
94
|
|
|
105
95
|
/**
|
|
106
96
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-split-button.mjs","sources":["../../../libs/ui-components/split-button/src/split-button.component.ts","../../../libs/ui-components/split-button/src/split-button.component.html","../../../libs/ui-components/split-button/src/agorapulse-ui-components-split-button.ts"],"sourcesContent":["import { ActionDropdownComponent, ActionDropdownTriggerDirective } from '@agorapulse/ui-components';\nimport { BaseButtonDirective } from '@agorapulse/ui-components/directives';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { agorapulseSymbol, apChevronDown, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n effect,\n ElementRef,\n HostListener,\n inject,\n input,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MatMenu, MatMenuModule } from '@angular/material/menu';\n\ntype SplitButtonConfig = { style: 'primary'; color: 'orange' | 'blue' };\n\nlet id = 1;\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-split-button',\n styleUrls: ['./split-button.component.scss'],\n imports: [SymbolComponent, MatMenuModule, ActionDropdownTriggerDirective],\n templateUrl: './split-button.component.html',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [BaseButtonDirective],\n host: {\n '[attr.disabled]': 'loading() || (disabled() && splitDisabled()) || null',\n '[class.loading]': 'loading()',\n },\n})\nexport class SplitButtonComponent implements AfterViewInit {\n private symbolRegistry = inject(SymbolRegistry);\n readonly baseButtonDirective = inject(BaseButtonDirective, { self: true });\n\n disabled = input(false, { transform: booleanAttribute });\n config = input<SplitButtonConfig>({ style: 'primary', color: 'orange' });\n actionDropdownTrigger = input<ActionDropdownComponent>();\n /** @deprecated use actionDropdownTrigger instead */\n menuTrigger = input<MatMenu | null>(null);\n splitDisabled = input(false);\n loading = input(false, { transform: booleanAttribute });\n symbolPosition = input<'left' | 'right'>('right');\n splitButtonDataTest = input<string | undefined>(undefined);\n symbolId = input<agorapulseSymbol>();\n name = input<string>();\n\n menuOpened = output<void>();\n menuClosed = output<void>();\n mainButtonClick = output<MouseEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n focus = output<FocusEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n blur = output<FocusEvent>();\n\n buttonElement = viewChild.required<ElementRef<HTMLButtonElement>>('button');\n splitButtonElement = viewChild.required<ElementRef<HTMLButtonElement>>('splitButton');\n symbolComponent = contentChild(SymbolComponent);\n\n id!: string;\n menuOpen = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apChevronDown]);\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n effect(() => {\n const symbolComp = this.symbolComponent();\n if (symbolComp) {\n symbolComp.size.set('sm');\n }\n });\n }\n\n ngAfterViewInit() {\n this.id = this.baseButtonDirective.hostId ?? `ap-split-button-${id++}`;\n }\n\n onSplitButtonClickHandle($event: MouseEvent): void {\n $event.stopImmediatePropagation();\n }\n\n handleMenuOpened(): void {\n this.menuOpened.emit();\n this.menuOpen = true;\n this.buttonElement().nativeElement.blur();\n this.splitButtonElement().nativeElement.blur();\n }\n\n handleMenuClosed(): void {\n this.menuClosed.emit();\n this.menuOpen = false;\n this.buttonElement().nativeElement.blur();\n this.splitButtonElement().nativeElement.blur();\n }\n\n focused: boolean = false;\n\n onClickHandle($event: MouseEvent): void {\n if (this.disabled() || this.loading()) {\n return;\n }\n $event.stopImmediatePropagation();\n this.mainButtonClick.emit($event);\n this.buttonElement().nativeElement.blur();\n this.blur.emit($event);\n }\n\n @HostListener('window:keyup.space', ['$event'])\n onSpaceKeyUp(event: Event) {\n if (this.focused && !this.loading()) {\n event.preventDefault();\n this.buttonElement().nativeElement.click();\n }\n }\n}\n","<button\n #button\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.inverse]=\"symbolPosition() === 'left'\"\n [class.loading]=\"loading()\"\n [disabled]=\"disabled() || loading()\"\n [name]=\"name()\"\n [id]=\"id\"\n [attr.data-test]=\"baseButtonDirective.hostDataTest ?? name()\"\n (click)=\"onClickHandle($event)\"\n (focus)=\"focus.emit($event)\"\n (blur)=\"blur.emit($event)\">\n <ng-content select=\"span\" />\n @if (symbolId()) {\n <ap-symbol [symbolId]=\"symbolId()\" />\n } @else {\n <ng-content select=\"ap-symbol\" />\n }\n</button>\n<button\n #splitButton\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.loading]=\"loading()\"\n [disabled]=\"splitDisabled() || loading()\"\n [id]=\"id + '-split'\"\n [attr.aria-labelledby]=\"id + '-split ' + id\"\n [attr.data-test]=\"splitButtonDataTest() ?? name() + '-split'\"\n [apActionDropdownTrigger]=\"actionDropdownTrigger()\"\n [matMenuTriggerFor]=\"menuTrigger()\"\n (click)=\"onSplitButtonClickHandle($event)\"\n (menuClosed)=\"handleMenuClosed()\"\n (menuOpened)=\"handleMenuOpened()\">\n <ap-symbol\n symbolId=\"chevron-down\"\n size=\"sm\"\n [class.opened]=\"menuOpen\" />\n <span class=\"visually-hidden\">Toggle</span>\n</button>\n@if (loading()) {\n <div\n class=\"loading-bar\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"></div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAuBA,IAAI,EAAE,GAAG,CAAC;MAeG,oBAAoB,CAAA;AACrB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IACtC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAE1E,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,MAAM,GAAG,KAAK,CAAoB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE;+EAAC;AACxE,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BiE,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACH,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACrD,eAAe,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA;sBAmD7C,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;;AEnHlD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-split-button.mjs","sources":["../../../libs/ui-components/split-button/src/split-button.component.ts","../../../libs/ui-components/split-button/src/split-button.component.html","../../../libs/ui-components/split-button/src/agorapulse-ui-components-split-button.ts"],"sourcesContent":["import { ActionDropdownComponent, ActionDropdownTriggerDirective } from '@agorapulse/ui-components';\nimport { BaseButtonDirective } from '@agorapulse/ui-components/directives';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { agorapulseSymbol, apChevronDown, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MatMenu, MatMenuModule } from '@angular/material/menu';\n\ntype SplitButtonConfig = { style: 'primary'; color: 'orange' | 'blue' };\n\nlet id = 1;\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-split-button',\n styleUrls: ['./split-button.component.scss'],\n imports: [SymbolComponent, MatMenuModule, ActionDropdownTriggerDirective],\n templateUrl: './split-button.component.html',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [BaseButtonDirective],\n host: {\n '[attr.disabled]': 'loading() || (disabled() && splitDisabled()) || null',\n '[class.loading]': 'loading()',\n },\n})\nexport class SplitButtonComponent implements AfterViewInit {\n private symbolRegistry = inject(SymbolRegistry);\n readonly baseButtonDirective = inject(BaseButtonDirective, { self: true });\n\n disabled = input(false, { transform: booleanAttribute });\n config = input<SplitButtonConfig>({ style: 'primary', color: 'orange' });\n actionDropdownTrigger = input<ActionDropdownComponent>();\n /** @deprecated use actionDropdownTrigger instead */\n menuTrigger = input<MatMenu | null>(null);\n splitDisabled = input(false);\n loading = input(false, { transform: booleanAttribute });\n symbolPosition = input<'left' | 'right'>('right');\n splitButtonDataTest = input<string | undefined>(undefined);\n symbolId = input<agorapulseSymbol>();\n name = input<string>();\n\n menuOpened = output<void>();\n menuClosed = output<void>();\n mainButtonClick = output<MouseEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n focus = output<FocusEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n blur = output<FocusEvent>();\n\n buttonElement = viewChild.required<ElementRef<HTMLButtonElement>>('button');\n splitButtonElement = viewChild.required<ElementRef<HTMLButtonElement>>('splitButton');\n symbolComponent = contentChild(SymbolComponent);\n\n id!: string;\n menuOpen = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apChevronDown]);\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n effect(() => {\n const symbolComp = this.symbolComponent();\n if (symbolComp) {\n symbolComp.size.set('sm');\n }\n });\n }\n\n ngAfterViewInit() {\n this.id = this.baseButtonDirective.hostId ?? `ap-split-button-${id++}`;\n }\n\n onSplitButtonClickHandle($event: MouseEvent): void {\n $event.stopImmediatePropagation();\n }\n\n handleMenuOpened(): void {\n this.menuOpened.emit();\n this.menuOpen = true;\n this.buttonElement().nativeElement.blur();\n this.splitButtonElement().nativeElement.blur();\n }\n\n handleMenuClosed(): void {\n this.menuClosed.emit();\n this.menuOpen = false;\n this.buttonElement().nativeElement.blur();\n this.splitButtonElement().nativeElement.blur();\n }\n\n onClickHandle($event: MouseEvent): void {\n if (this.disabled() || this.loading()) {\n return;\n }\n $event.stopImmediatePropagation();\n this.mainButtonClick.emit($event);\n this.buttonElement().nativeElement.blur();\n this.blur.emit($event);\n }\n}\n","<button\n #button\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.inverse]=\"symbolPosition() === 'left'\"\n [class.loading]=\"loading()\"\n [disabled]=\"disabled() || loading()\"\n [name]=\"name()\"\n [id]=\"id\"\n [attr.data-test]=\"baseButtonDirective.hostDataTest ?? name()\"\n (click)=\"onClickHandle($event)\"\n (focus)=\"focus.emit($event)\"\n (blur)=\"blur.emit($event)\">\n <ng-content select=\"span\" />\n @if (symbolId()) {\n <ap-symbol [symbolId]=\"symbolId()\" />\n } @else {\n <ng-content select=\"ap-symbol\" />\n }\n</button>\n<button\n #splitButton\n type=\"button\"\n [class.primary]=\"config().style === 'primary'\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color === 'blue'\"\n [class.loading]=\"loading()\"\n [disabled]=\"splitDisabled() || loading()\"\n [id]=\"id + '-split'\"\n [attr.aria-labelledby]=\"id + '-split ' + id\"\n [attr.data-test]=\"splitButtonDataTest() ?? name() + '-split'\"\n [apActionDropdownTrigger]=\"actionDropdownTrigger()\"\n [matMenuTriggerFor]=\"menuTrigger()\"\n (click)=\"onSplitButtonClickHandle($event)\"\n (menuClosed)=\"handleMenuClosed()\"\n (menuOpened)=\"handleMenuOpened()\">\n <ap-symbol\n symbolId=\"chevron-down\"\n size=\"sm\"\n [class.opened]=\"menuOpen\" />\n <span class=\"visually-hidden\">Toggle</span>\n</button>\n@if (loading()) {\n <div\n class=\"loading-bar\"\n [class.orange]=\"config().color === 'orange'\"\n [class.blue]=\"config().color ===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EAC/B;AACF,wBAAA,iBAAiB,EAAE,sDAAsD;AACzE,wBAAA,iBAAiB,EAAE,WAAW;AACjC,qBAAA,EAAA,QAAA,EAAA,+tDAAA,EAAA,MAAA,EAAA,CAAA,ggHAAA,CAAA,EAAA;o3CA0BiE,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACH,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACrD,eAAe,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/DlD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -53,13 +53,11 @@ declare class ButtonComponent implements ApInteractiveElement {
|
|
|
53
53
|
stroked: boolean;
|
|
54
54
|
inverse: boolean;
|
|
55
55
|
}>;
|
|
56
|
-
focused: boolean;
|
|
57
56
|
private readonly symbolRegistry;
|
|
58
57
|
constructor();
|
|
59
58
|
onClickHandle($event: MouseEvent): void;
|
|
60
59
|
onBlurHandle($event: FocusEvent): void;
|
|
61
60
|
onFocusHandle($event: FocusEvent): void;
|
|
62
|
-
onSpaceKeyUp(event: Event): void;
|
|
63
61
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
64
62
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "ap-button", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "locked": { "alias": "locked"; "required": false; "isSignal": true; }; "menuTrigger": { "alias": "menuTrigger"; "required": false; "isSignal": true; }; "symbolPosition": { "alias": "symbolPosition"; "required": false; "isSignal": true; }; "symbolId": { "alias": "symbolId"; "required": false; "isSignal": true; }; }, { "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; "click": "click"; "focus": "focus"; "blur": "blur"; }, never, ["*", "ap-symbol"], true, [{ directive: typeof i1.BaseButtonDirective; inputs: {}; outputs: {}; }]>;
|
|
65
63
|
}
|
|
@@ -29,12 +29,10 @@ declare class IconButtonComponent {
|
|
|
29
29
|
private _loading;
|
|
30
30
|
private _locked;
|
|
31
31
|
hostDataTest: string | undefined;
|
|
32
|
-
focused: boolean;
|
|
33
32
|
constructor(symbolRegistry: SymbolRegistry, elementRef: ElementRef);
|
|
34
33
|
onClickHandle($event: MouseEvent): void;
|
|
35
34
|
onBlurHandle($event: FocusEvent): void;
|
|
36
35
|
onFocusHandle($event: FocusEvent): void;
|
|
37
|
-
onSpaceKeyUp(event: Event): void;
|
|
38
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconButtonComponent, never>;
|
|
39
37
|
static ɵcmp: i0.ɵɵComponentDeclaration<IconButtonComponent, "ap-icon-button", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "name": { "alias": "name"; "required": false; }; "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "menuTrigger": { "alias": "menuTrigger"; "required": false; }; "symbolId": { "alias": "symbolId"; "required": false; "isSignal": true; }; "locked": { "alias": "locked"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, ["symbolComponent"], ["*"], true, never>;
|
|
40
38
|
static ngAcceptInputType_disabled: unknown;
|
|
@@ -9,11 +9,7 @@ declare class PaginatorButtonComponent {
|
|
|
9
9
|
pageIndex: number;
|
|
10
10
|
selectedPageIndex: number;
|
|
11
11
|
selectPage: EventEmitter<number>;
|
|
12
|
-
focused: boolean;
|
|
13
12
|
onClickHandle(pageIndex: number): void;
|
|
14
|
-
onBlurHandle(): void;
|
|
15
|
-
onFocusHandle(): void;
|
|
16
|
-
onSpaceKeyUp(event: Event): void;
|
|
17
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorButtonComponent, never>;
|
|
18
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<PaginatorButtonComponent, "ap-paginator-button", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "selectedPageIndex": { "alias": "selectedPageIndex"; "required": false; }; }, { "selectPage": "selectPage"; }, never, never, true, never>;
|
|
19
15
|
}
|
|
@@ -23,11 +23,9 @@ declare class SocialButtonComponent {
|
|
|
23
23
|
blur: EventEmitter<FocusEvent>;
|
|
24
24
|
symbolIdPerNetwork: Record<Service, Record<SocialButtonType, string>>;
|
|
25
25
|
constructor(symbolRegistry: SymbolRegistry);
|
|
26
|
-
focused: boolean;
|
|
27
26
|
onClickHandle($event: MouseEvent): void;
|
|
28
27
|
onBlurHandle($event: FocusEvent): void;
|
|
29
28
|
onFocusHandle($event: FocusEvent): void;
|
|
30
|
-
onSpaceKeyUp(event: Event): void;
|
|
31
29
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SocialButtonComponent, never>;
|
|
32
30
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SocialButtonComponent, "ap-social-button", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": true; }; "loading": { "alias": "loading"; "required": false; }; "network": { "alias": "network"; "required": false; }; "buttonType": { "alias": "buttonType"; "required": false; "isSignal": true; }; }, { "click": "click"; "focus": "focus"; "blur": "blur"; }, never, ["span"], true, [{ directive: typeof i1.BaseButtonDirective; inputs: {}; outputs: {}; }]>;
|
|
33
31
|
static ngAcceptInputType_disabled: unknown;
|
|
@@ -39,9 +39,7 @@ declare class SplitButtonComponent implements AfterViewInit {
|
|
|
39
39
|
onSplitButtonClickHandle($event: MouseEvent): void;
|
|
40
40
|
handleMenuOpened(): void;
|
|
41
41
|
handleMenuClosed(): void;
|
|
42
|
-
focused: boolean;
|
|
43
42
|
onClickHandle($event: MouseEvent): void;
|
|
44
|
-
onSpaceKeyUp(event: Event): void;
|
|
45
43
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SplitButtonComponent, never>;
|
|
46
44
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SplitButtonComponent, "ap-split-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "actionDropdownTrigger": { "alias": "actionDropdownTrigger"; "required": false; "isSignal": true; }; "menuTrigger": { "alias": "menuTrigger"; "required": false; "isSignal": true; }; "splitDisabled": { "alias": "splitDisabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "symbolPosition": { "alias": "symbolPosition"; "required": false; "isSignal": true; }; "splitButtonDataTest": { "alias": "splitButtonDataTest"; "required": false; "isSignal": true; }; "symbolId": { "alias": "symbolId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; }, { "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; "mainButtonClick": "mainButtonClick"; "focus": "focus"; "blur": "blur"; }, ["symbolComponent"], ["span", "ap-symbol"], true, [{ directive: typeof i1.BaseButtonDirective; inputs: {}; outputs: {}; }]>;
|
|
47
45
|
}
|
|
Binary file
|