@agorapulse/ui-components 22.8.0 → 22.8.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agorapulse-ui-components-22.8.1-beta.1.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs +18 -3
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-i18n.mjs +2 -0
- package/fesm2022/agorapulse-ui-components-i18n.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-split-button.mjs +8 -3
- package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
- package/package.json +1 -1
- package/types/agorapulse-ui-components-action-dropdown.d.ts +21 -12
- package/types/agorapulse-ui-components-i18n.d.ts +2 -0
- package/types/agorapulse-ui-components-split-button.d.ts +4 -0
- package/agorapulse-ui-components-22.8.0.tgz +0 -0
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { ActionDropdownTriggerDirective } from '@agorapulse/ui-components';
|
|
2
2
|
import * as i1 from '@agorapulse/ui-components/directives';
|
|
3
3
|
import { BaseButtonDirective } from '@agorapulse/ui-components/directives';
|
|
4
|
+
import { injectResolveTexts } from '@agorapulse/ui-components/i18n';
|
|
4
5
|
import { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';
|
|
5
6
|
import { SymbolRegistry, SymbolComponent, apChevronDown } from '@agorapulse/ui-symbol';
|
|
6
7
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { inject, input, booleanAttribute, output, viewChild, contentChild, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
|
+
import { inject, input, booleanAttribute, output, viewChild, contentChild, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
9
|
import * as i2 from '@angular/material/menu';
|
|
9
10
|
import { MatMenuModule } from '@angular/material/menu';
|
|
10
11
|
|
|
11
12
|
let id = 1;
|
|
13
|
+
const TEXT_ROLES = { toggle: 'ui-components.split-button.toggle' };
|
|
12
14
|
class SplitButtonComponent {
|
|
13
15
|
symbolRegistry = inject(SymbolRegistry);
|
|
14
16
|
baseButtonDirective = inject(BaseButtonDirective, { self: true });
|
|
17
|
+
resolveTexts = injectResolveTexts();
|
|
15
18
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
16
19
|
config = input({ style: 'primary', color: 'orange' }, /* @ts-ignore */
|
|
17
20
|
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
@@ -42,6 +45,8 @@ class SplitButtonComponent {
|
|
|
42
45
|
splitButtonElement = viewChild.required('splitButton');
|
|
43
46
|
symbolComponent = contentChild(SymbolComponent, /* @ts-ignore */
|
|
44
47
|
...(ngDevMode ? [{ debugName: "symbolComponent" }] : /* istanbul ignore next */ []));
|
|
48
|
+
texts = computed(() => this.resolveTexts(null, TEXT_ROLES), /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
45
50
|
id;
|
|
46
51
|
menuOpen = false;
|
|
47
52
|
constructor() {
|
|
@@ -82,14 +87,14 @@ class SplitButtonComponent {
|
|
|
82
87
|
this.blur.emit($event);
|
|
83
88
|
}
|
|
84
89
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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\">
|
|
90
|
+
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\">{{ texts().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 });
|
|
86
91
|
}
|
|
87
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
88
93
|
type: Component,
|
|
89
94
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-split-button', imports: [SymbolComponent, MatMenuModule, ActionDropdownTriggerDirective], encapsulation: ViewEncapsulation.None, hostDirectives: [BaseButtonDirective], host: {
|
|
90
95
|
'[attr.disabled]': 'loading() || (disabled() && splitDisabled()) || null',
|
|
91
96
|
'[class.loading]': 'loading()',
|
|
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\">
|
|
97
|
+
}, 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\">{{ texts().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"] }]
|
|
93
98
|
}], 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 }] }] } });
|
|
94
99
|
|
|
95
100
|
/**
|
|
@@ -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 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 === 'blue'\"></div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAsBA,IAAI,EAAE,GAAG,CAAC;MAeG,oBAAoB,CAAA;AACrB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IACtC,mBAAmB,GAAG,MAAM,C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A,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;;;;"}
|
|
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 { injectResolveTexts, TextRoles } from '@agorapulse/ui-components/i18n';\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 computed,\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\nconst TEXT_ROLES = { toggle: 'ui-components.split-button.toggle' } as const satisfies TextRoles;\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 private readonly resolveTexts = injectResolveTexts();\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 protected readonly texts = computed(() => this.resolveTexts(null, TEXT_ROLES));\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\">{{ texts().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":";;;;;;;;;;;AAwBA,IAAI,EAAE,GAAG,CAAC;AAEV,MAAM,UAAU,GAAG,EAAE,MAAM,EAAE,mCAAmC,EAA+B;MAelF,oBAAoB,CAAA;AACrB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IACtC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACzD,YAAY,GAAG,kBAAkB,EAAE;IAEpD,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,IAAA,qBAAqB,GAAG,KAAK;yGAA2B;;IAExD,WAAW,GAAG,KAAK,CAAiB,IAAI;oFAAC;IACzC,aAAa,GAAG,KAAK,CAAC,KAAK;sFAAC;IAC5B,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACvD,cAAc,GAAG,KAAK,CAAmB,OAAO;uFAAC;IACjD,mBAAmB,GAAG,KAAK,CAAqB,SAAS;4FAAC;AAC1D,IAAA,QAAQ,GAAG,KAAK;4FAAoB;AACpC,IAAA,IAAI,GAAG,KAAK;wFAAU;IAEtB,UAAU,GAAG,MAAM,EAAQ;IAC3B,UAAU,GAAG,MAAM,EAAQ;IAC3B,eAAe,GAAG,MAAM,EAAc;;IAEtC,KAAK,GAAG,MAAM,EAAc;;IAE5B,IAAI,GAAG,MAAM,EAAc;AAE3B,IAAA,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAgC,QAAQ,CAAC;AAC3E,IAAA,kBA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AA,CAAA,IAAA,EAAA,CAAA;;2FAS/D,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,SAAS;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,iBAAiB,WAElB,CAAC,eAAe,EAAE,aAAa,EAAE,8BAA8B,CAAC,EAAA,aAAA,EAE1D,iBAAiB,CAAC,IAAI,kBACrB,CAAC,mBAAmB,CAAC,EAAA,IAAA,EAC/B;AACF,wBAAA,iBAAiB,EAAE,sDAAsD;AACzE,wBAAA,iBAAiB,EAAE,WAAW;AACjC,qBAAA,EAAA,QAAA,EAAA,6uDAAA,EAAA,MAAA,EAAA,CAAA,ggHAAA,CAAA,EAAA;o3CA2BiE,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;;AEpElD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -3,35 +3,24 @@ import { TemplateRef } from '@angular/core';
|
|
|
3
3
|
import * as _floating_ui_utils from '@floating-ui/utils';
|
|
4
4
|
import { BadgeColor } from '@agorapulse/ui-components/badge';
|
|
5
5
|
import { DropdownOverlay } from '@agorapulse/ui-components/dropdown-base';
|
|
6
|
+
import { I18nOf } from '@agorapulse/ui-components/i18n';
|
|
6
7
|
import { agorapulseSymbol, SymbolColor } from '@agorapulse/ui-symbol';
|
|
7
8
|
|
|
8
9
|
interface ActionDropdownItem {
|
|
9
10
|
/** Unique identifier for the item */
|
|
10
11
|
name?: string;
|
|
11
|
-
/** Display text for the item */
|
|
12
|
-
label?: string;
|
|
13
|
-
/** Secondary text displayed below the label */
|
|
14
|
-
description?: string;
|
|
15
|
-
/** Text displayed in a badge next to the item */
|
|
16
|
-
badgeLabel?: string;
|
|
17
12
|
/** Color of the badge displayed next to the item */
|
|
18
13
|
badgeColor?: BadgeColor;
|
|
19
14
|
/** Whether to show a feature lock icon */
|
|
20
15
|
featureLockEnabled?: boolean;
|
|
21
16
|
/** Whether to apply red styling for destructive actions */
|
|
22
17
|
redModeEnabled?: boolean;
|
|
23
|
-
/** Tooltip text displayed when hovering over the item */
|
|
24
|
-
itemTooltipText?: string;
|
|
25
18
|
/** Icon symbol identifier displayed at the start of the item */
|
|
26
19
|
startSymbolId?: agorapulseSymbol;
|
|
27
20
|
/** Color theme for the start symbol */
|
|
28
21
|
startSymbolColor?: SymbolColor;
|
|
29
|
-
/** Tooltip text for the start symbol */
|
|
30
|
-
startSymbolTooltipText?: string;
|
|
31
22
|
/** Icon symbol identifier displayed at the end of the item */
|
|
32
23
|
endSymbolId?: agorapulseSymbol;
|
|
33
|
-
/** Tooltip text for the end symbol */
|
|
34
|
-
endSymbolTooltipText?: string;
|
|
35
24
|
/** Whether the item is disabled and non-interactive */
|
|
36
25
|
disabled?: boolean;
|
|
37
26
|
/** Whether to add a divider before this item */
|
|
@@ -40,6 +29,11 @@ interface ActionDropdownItem {
|
|
|
40
29
|
id?: string;
|
|
41
30
|
/** Optional data-track attribute for analytics tracking */
|
|
42
31
|
dataTrack?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Texts of the item: `label` is required; `description` below it, `badge` next to it, `tooltip` on the item,
|
|
34
|
+
* `startSymbolTooltip` / `endSymbolTooltip` on its symbols.
|
|
35
|
+
*/
|
|
36
|
+
i18n: I18nOf<'label', 'description' | 'badge' | 'tooltip' | 'startSymbolTooltip' | 'endSymbolTooltip'>;
|
|
43
37
|
}
|
|
44
38
|
/**
|
|
45
39
|
* A dropdown component that displays a list of actionable items with support for icons,
|
|
@@ -48,6 +42,7 @@ interface ActionDropdownItem {
|
|
|
48
42
|
*/
|
|
49
43
|
declare class ActionDropdownComponent implements DropdownOverlay {
|
|
50
44
|
private readonly symbolRegistry;
|
|
45
|
+
private readonly resolveTexts;
|
|
51
46
|
private readonly panel;
|
|
52
47
|
trigger: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
53
48
|
/** Array of items to display in the dropdown menu */
|
|
@@ -64,6 +59,20 @@ declare class ActionDropdownComponent implements DropdownOverlay {
|
|
|
64
59
|
closed: _angular_core.OutputEmitterRef<void>;
|
|
65
60
|
/** Emits when a dropdown item is clicked */
|
|
66
61
|
itemClick: _angular_core.OutputEmitterRef<ActionDropdownItem>;
|
|
62
|
+
protected readonly rows: _angular_core.Signal<{
|
|
63
|
+
item: ActionDropdownItem;
|
|
64
|
+
texts: {
|
|
65
|
+
readonly label: string | undefined;
|
|
66
|
+
readonly description: string | undefined;
|
|
67
|
+
readonly badge: string | undefined;
|
|
68
|
+
readonly tooltip: string | undefined;
|
|
69
|
+
readonly startSymbolTooltip: string | undefined;
|
|
70
|
+
readonly endSymbolTooltip: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
}[]>;
|
|
73
|
+
protected readonly texts: _angular_core.Signal<{
|
|
74
|
+
readonly ariaLabel: string;
|
|
75
|
+
}>;
|
|
67
76
|
private readonly menuItems;
|
|
68
77
|
/** Mirrors the key manager's active index, so the roving tabindex can be bound. */
|
|
69
78
|
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, PipeTransform, Signal, Provider } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
declare const DEFAULT_TEXTS: Readonly<{
|
|
5
|
+
readonly 'ui-components.action-dropdown.aria-label': "Action dropdown";
|
|
5
6
|
readonly 'ui-components.filters.trigger': "Filters";
|
|
6
7
|
readonly 'ui-components.filters.aria-label': "Filters";
|
|
7
8
|
readonly 'ui-components.filters.apply': "Apply filters";
|
|
@@ -22,6 +23,7 @@ declare const DEFAULT_TEXTS: Readonly<{
|
|
|
22
23
|
readonly 'ui-components.selection.options-section': "Options";
|
|
23
24
|
readonly 'ui-components.selection.select-all': "Select all";
|
|
24
25
|
readonly 'ui-components.selection.select-all-count': "({{selected}} of {{total}})";
|
|
26
|
+
readonly 'ui-components.split-button.toggle': "Toggle";
|
|
25
27
|
}>;
|
|
26
28
|
/**
|
|
27
29
|
* A key of the DS default texts, the only keys a component may fall back to.
|
|
@@ -13,6 +13,7 @@ type SplitButtonConfig = {
|
|
|
13
13
|
declare class SplitButtonComponent implements AfterViewInit {
|
|
14
14
|
private symbolRegistry;
|
|
15
15
|
readonly baseButtonDirective: BaseButtonDirective;
|
|
16
|
+
private readonly resolveTexts;
|
|
16
17
|
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
17
18
|
config: _angular_core.InputSignal<SplitButtonConfig>;
|
|
18
19
|
actionDropdownTrigger: _angular_core.InputSignal<ActionDropdownComponent | undefined>;
|
|
@@ -32,6 +33,9 @@ declare class SplitButtonComponent implements AfterViewInit {
|
|
|
32
33
|
buttonElement: _angular_core.Signal<ElementRef<HTMLButtonElement>>;
|
|
33
34
|
splitButtonElement: _angular_core.Signal<ElementRef<HTMLButtonElement>>;
|
|
34
35
|
symbolComponent: _angular_core.Signal<SymbolComponent | undefined>;
|
|
36
|
+
protected readonly texts: _angular_core.Signal<{
|
|
37
|
+
readonly toggle: string;
|
|
38
|
+
}>;
|
|
35
39
|
id: string;
|
|
36
40
|
menuOpen: boolean;
|
|
37
41
|
constructor();
|
|
Binary file
|