@ascentgl/ads-ui 22.14.1 → 22.15.0
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/package.json
CHANGED
|
@@ -10,6 +10,19 @@
|
|
|
10
10
|
&.ads-dropdown-panel {
|
|
11
11
|
padding: 0;
|
|
12
12
|
|
|
13
|
+
// A panel with a pinned header or footer stops being the scrolling element
|
|
14
|
+
// and becomes a column that holds one: the bars take their own height and
|
|
15
|
+
// the options' box absorbs what is left, so the scrollbar runs between them
|
|
16
|
+
// instead of the full height of the panel.
|
|
17
|
+
//
|
|
18
|
+
// `max-height` above still caps the panel, so the whole thing — bars
|
|
19
|
+
// included — stays within it.
|
|
20
|
+
&.has-pinned-chrome {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
13
26
|
&.fit-content {
|
|
14
27
|
min-width: fit-content;
|
|
15
28
|
}
|
|
@@ -159,7 +159,7 @@ declare class AdsButtonComponent {
|
|
|
159
159
|
/** Whether the button is a smaller version */
|
|
160
160
|
size: i0.InputSignal<Size>;
|
|
161
161
|
/** Sets the "type" attribute on the button */
|
|
162
|
-
type: i0.InputSignal<"
|
|
162
|
+
type: i0.InputSignal<"button" | "submit" | "reset">;
|
|
163
163
|
/** Makes the button take 100% width of its container */
|
|
164
164
|
fullWidth: i0.InputSignal<boolean>;
|
|
165
165
|
static ɵfac: i0.ɵɵFactoryDeclaration<AdsButtonComponent, never>;
|
|
@@ -1531,6 +1531,28 @@ type SearchDropdownStaticOption = {
|
|
|
1531
1531
|
onClick?: (currentInputValue: string) => void;
|
|
1532
1532
|
cssClass?: string;
|
|
1533
1533
|
};
|
|
1534
|
+
/**
|
|
1535
|
+
* A bar pinned to the bottom of the panel, below the scrolling options: a
|
|
1536
|
+
* read-only label on the left and, on the right, a single action.
|
|
1537
|
+
*
|
|
1538
|
+
* Unlike a static option this is not an option — it never joins the option
|
|
1539
|
+
* list, arrow keys skip it, and only the action button reacts to a click. That
|
|
1540
|
+
* is what lets the label state something about the results, such as how many
|
|
1541
|
+
* of them are shown, without being a click target itself.
|
|
1542
|
+
*/
|
|
1543
|
+
type SearchDropdownFooterOption = {
|
|
1544
|
+
/** Left-hand text, or a template when it needs markup. Rendered inert. */
|
|
1545
|
+
label?: string | TemplateRef<SearchDropdownStaticOptionTemplateContext>;
|
|
1546
|
+
/**
|
|
1547
|
+
* The right-hand action's label. Omit for a footer that only reports
|
|
1548
|
+
* something. Accepts a template so a caller whose text is translated or
|
|
1549
|
+
* interpolated can supply it without resolving the string up front.
|
|
1550
|
+
*/
|
|
1551
|
+
actionLabel?: string | TemplateRef<SearchDropdownStaticOptionTemplateContext>;
|
|
1552
|
+
/** Receives the input's current value, as a static option's `onClick` does. */
|
|
1553
|
+
onActionClick?: (currentInputValue: string) => void;
|
|
1554
|
+
cssClass?: string;
|
|
1555
|
+
};
|
|
1534
1556
|
|
|
1535
1557
|
type TEMPLATE_TYPE = {
|
|
1536
1558
|
$implicit: DropdownComponentOption;
|
|
@@ -1574,6 +1596,21 @@ declare class AdsSearchDropdownComponent extends AbstractDropdownComponent imple
|
|
|
1574
1596
|
prependOption: SearchDropdownStaticOption | undefined;
|
|
1575
1597
|
/** If "true", will show prependOption. Default is false */
|
|
1576
1598
|
showPrependOption: boolean;
|
|
1599
|
+
/**
|
|
1600
|
+
* If "true", pins prependOption to the top of the panel so it stays visible
|
|
1601
|
+
* while the options scroll beneath it. Default is false, which scrolls it
|
|
1602
|
+
* away with them.
|
|
1603
|
+
*/
|
|
1604
|
+
stickyPrependOption: boolean;
|
|
1605
|
+
/**
|
|
1606
|
+
* Provide configuration for a bar pinned to the bottom of the panel, below
|
|
1607
|
+
* the scrolling options — a read-only label and a single action button.
|
|
1608
|
+
*
|
|
1609
|
+
* Not an option: arrow keys skip it, and only its button reacts to a click.
|
|
1610
|
+
* Use it where the panel needs to say something about its results, such as
|
|
1611
|
+
* how many of them are shown, beside one way out.
|
|
1612
|
+
*/
|
|
1613
|
+
footerOption: SearchDropdownFooterOption | undefined;
|
|
1577
1614
|
/** Provide event that is fired when enter key is down while input value is being set */
|
|
1578
1615
|
onEnterKeyDown: ((currentInputValue: string) => void) | undefined;
|
|
1579
1616
|
/** Provide callback that will vbe executed when user clicks on magnifying glass icon */
|
|
@@ -1630,6 +1667,12 @@ declare class AdsSearchDropdownComponent extends AbstractDropdownComponent imple
|
|
|
1630
1667
|
noDataMatOption?: MatOption;
|
|
1631
1668
|
/** @ignore */
|
|
1632
1669
|
staticDataMatOption?: MatOption;
|
|
1670
|
+
/**
|
|
1671
|
+
* @ignore
|
|
1672
|
+
* The box the options scroll in when a pinned slot is used. Lives inside the
|
|
1673
|
+
* autocomplete panel, so it only exists once the panel has been opened.
|
|
1674
|
+
*/
|
|
1675
|
+
optionsScroller?: ElementRef<HTMLElement>;
|
|
1633
1676
|
/** @ignore */
|
|
1634
1677
|
auto?: MatAutocomplete;
|
|
1635
1678
|
/** @ignore */
|
|
@@ -1683,6 +1726,24 @@ declare class AdsSearchDropdownComponent extends AbstractDropdownComponent imple
|
|
|
1683
1726
|
get canUseStaticOption(): boolean;
|
|
1684
1727
|
/** @ignore */
|
|
1685
1728
|
get canUsePrependOption(): boolean;
|
|
1729
|
+
/**
|
|
1730
|
+
* @ignore
|
|
1731
|
+
* Hidden while results are still loading, so the bar doesn't report a stale
|
|
1732
|
+
* count over a list that is about to be replaced. Deliberately not gated on
|
|
1733
|
+
* there being options: a footer reporting that nothing was found is a valid
|
|
1734
|
+
* use, and the caller decides by passing the option or not.
|
|
1735
|
+
*/
|
|
1736
|
+
get canUseFooterOption(): boolean;
|
|
1737
|
+
/**
|
|
1738
|
+
* @ignore
|
|
1739
|
+
* Whether either pinned slot is in play, and so whether the options need
|
|
1740
|
+
* their own scrolling box between them.
|
|
1741
|
+
*
|
|
1742
|
+
* Read off the inputs rather than the `canUse*` getters on purpose: those
|
|
1743
|
+
* turn false while results load, and the options must not jump out of their
|
|
1744
|
+
* scroller and back on every keystroke.
|
|
1745
|
+
*/
|
|
1746
|
+
get hasPinnedChrome(): boolean;
|
|
1686
1747
|
/** @ignore */
|
|
1687
1748
|
get showDropdownIcon(): boolean;
|
|
1688
1749
|
/** @ignore */
|
|
@@ -1701,6 +1762,14 @@ declare class AdsSearchDropdownComponent extends AbstractDropdownComponent imple
|
|
|
1701
1762
|
getDisplayedValueAsString(checkAdditionalFormatting?: boolean): string;
|
|
1702
1763
|
/** @ignore */
|
|
1703
1764
|
reset(): void;
|
|
1765
|
+
/**
|
|
1766
|
+
* @ignore
|
|
1767
|
+
* Bound to mousedown rather than click for the same reason static options
|
|
1768
|
+
* are: the action blurs the input to close the panel, and a click event
|
|
1769
|
+
* dispatched after that blur may never reach a button that has gone away
|
|
1770
|
+
* with it.
|
|
1771
|
+
*/
|
|
1772
|
+
onFooterActionMouseDown(event: MouseEvent): void;
|
|
1704
1773
|
/** @ignore */
|
|
1705
1774
|
onStaticOptionMouseDown(event: MouseEvent, option: SearchDropdownStaticOption): void;
|
|
1706
1775
|
/** @ignore */
|
|
@@ -1749,6 +1818,22 @@ declare class AdsSearchDropdownComponent extends AbstractDropdownComponent imple
|
|
|
1749
1818
|
/** @ignore */
|
|
1750
1819
|
private setControlValueFromOption;
|
|
1751
1820
|
private setControlValue;
|
|
1821
|
+
/**
|
|
1822
|
+
* @ignore
|
|
1823
|
+
* Points Material's "keep the active option in view" scrolling at the box the
|
|
1824
|
+
* options actually scroll in.
|
|
1825
|
+
*
|
|
1826
|
+
* With a pinned header or footer the panel itself no longer scrolls — the box
|
|
1827
|
+
* between them does — so `_setScrollTop`, which drives the panel's own
|
|
1828
|
+
* `scrollTop`, would quietly do nothing and arrow-keying past the visible
|
|
1829
|
+
* rows would leave the active one off screen. Overridden on the instance
|
|
1830
|
+
* rather than reimplemented, so Material goes on deciding *where* to scroll
|
|
1831
|
+
* and this only redirects *what*. Falls through to the panel whenever there
|
|
1832
|
+
* is no scroller, which is every consumer that hasn't asked for a pinned
|
|
1833
|
+
* slot.
|
|
1834
|
+
*/
|
|
1835
|
+
private redirectPanelScrollToOptions;
|
|
1836
|
+
/** @ignore */
|
|
1752
1837
|
private overrideKeydownHandler;
|
|
1753
1838
|
private modifyOptionClickEvent;
|
|
1754
1839
|
/** @ignore */
|
|
@@ -1762,7 +1847,7 @@ declare class AdsSearchDropdownComponent extends AbstractDropdownComponent imple
|
|
|
1762
1847
|
private autoResizeTextarea;
|
|
1763
1848
|
private setupIntersectionObserver;
|
|
1764
1849
|
static ɵfac: i0.ɵɵFactoryDeclaration<AdsSearchDropdownComponent, never>;
|
|
1765
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AdsSearchDropdownComponent, "ads-search-dropdown", never, { "externalButton": { "alias": "externalButton"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "options": { "alias": "options"; "required": false; }; "staticOptions": { "alias": "staticOptions"; "required": false; }; "filterOptions": { "alias": "filterOptions"; "required": false; }; "emitEmptyValues": { "alias": "emitEmptyValues"; "required": false; }; "loadSuggestionOnInit": { "alias": "loadSuggestionOnInit"; "required": false; }; "noDataOption": { "alias": "noDataOption"; "required": false; }; "showNoDataOption": { "alias": "showNoDataOption"; "required": false; }; "moreDataOption": { "alias": "moreDataOption"; "required": false; }; "staticDataOption": { "alias": "staticDataOption"; "required": false; }; "prependOption": { "alias": "prependOption"; "required": false; }; "showPrependOption": { "alias": "showPrependOption"; "required": false; }; "onEnterKeyDown": { "alias": "onEnterKeyDown"; "required": false; }; "searchIconClickCallback": { "alias": "searchIconClickCallback"; "required": false; }; "showSearchIcon": { "alias": "showSearchIcon"; "required": false; }; "autoSelectSingleOption": { "alias": "autoSelectSingleOption"; "required": false; }; "displayValueFormatter": { "alias": "displayValueFormatter"; "required": false; }; "useOptionTemplate": { "alias": "useOptionTemplate"; "required": false; }; "minValueLength": { "alias": "minValueLength"; "required": false; }; "preventClick": { "alias": "preventClick"; "required": false; }; "closePanelEnabled": { "alias": "closePanelEnabled"; "required": false; }; "trimValue": { "alias": "trimValue"; "required": false; }; "closeOnOutOfView": { "alias": "closeOnOutOfView"; "required": false; }; "outOfViewRootMargin": { "alias": "outOfViewRootMargin"; "required": false; }; "control": { "alias": "control"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "externalButtonClick": "externalButtonClick"; "focusInput": "focusInput"; "blurInput": "blurInput"; "emitSearchValueInput": "emitSearchValueInput"; }, ["optionRef"], never, true, never>;
|
|
1850
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AdsSearchDropdownComponent, "ads-search-dropdown", never, { "externalButton": { "alias": "externalButton"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "options": { "alias": "options"; "required": false; }; "staticOptions": { "alias": "staticOptions"; "required": false; }; "filterOptions": { "alias": "filterOptions"; "required": false; }; "emitEmptyValues": { "alias": "emitEmptyValues"; "required": false; }; "loadSuggestionOnInit": { "alias": "loadSuggestionOnInit"; "required": false; }; "noDataOption": { "alias": "noDataOption"; "required": false; }; "showNoDataOption": { "alias": "showNoDataOption"; "required": false; }; "moreDataOption": { "alias": "moreDataOption"; "required": false; }; "staticDataOption": { "alias": "staticDataOption"; "required": false; }; "prependOption": { "alias": "prependOption"; "required": false; }; "showPrependOption": { "alias": "showPrependOption"; "required": false; }; "stickyPrependOption": { "alias": "stickyPrependOption"; "required": false; }; "footerOption": { "alias": "footerOption"; "required": false; }; "onEnterKeyDown": { "alias": "onEnterKeyDown"; "required": false; }; "searchIconClickCallback": { "alias": "searchIconClickCallback"; "required": false; }; "showSearchIcon": { "alias": "showSearchIcon"; "required": false; }; "autoSelectSingleOption": { "alias": "autoSelectSingleOption"; "required": false; }; "displayValueFormatter": { "alias": "displayValueFormatter"; "required": false; }; "useOptionTemplate": { "alias": "useOptionTemplate"; "required": false; }; "minValueLength": { "alias": "minValueLength"; "required": false; }; "preventClick": { "alias": "preventClick"; "required": false; }; "closePanelEnabled": { "alias": "closePanelEnabled"; "required": false; }; "trimValue": { "alias": "trimValue"; "required": false; }; "closeOnOutOfView": { "alias": "closeOnOutOfView"; "required": false; }; "outOfViewRootMargin": { "alias": "outOfViewRootMargin"; "required": false; }; "control": { "alias": "control"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "externalButtonClick": "externalButtonClick"; "focusInput": "focusInput"; "blurInput": "blurInput"; "emitSearchValueInput": "emitSearchValueInput"; }, ["optionRef"], never, true, never>;
|
|
1766
1851
|
}
|
|
1767
1852
|
|
|
1768
1853
|
declare class AdsSearchInputComponent extends AdsInputComponent {
|
|
@@ -4213,4 +4298,4 @@ declare function provideAdsUi(config: AdsUiConfig): {
|
|
|
4213
4298
|
}[];
|
|
4214
4299
|
|
|
4215
4300
|
export { AdsArchitectureLogoComponent, AdsAscentLogoComponent, AdsAvatarComponent, AdsBaselineWidgetComponent, AdsBreadcrumbComponent, AdsBubbleComponent, AdsButtonComponent, AdsButtonContainerComponent, AdsCardComponent, AdsCheckboxComponent, AdsChipComponent, AdsColumnSortFilterMenuComponent, AdsCreateTagComponent, AdsCurrencyFieldComponent, AdsCustomHeaderComponent, AdsCustomerPortalLogoComponent, AdsCxaLogoComponent, AdsDatepickerComponent, AdsDatetimepickerComponent, AdsDragAndDropListComponent, AdsDropdownComponent, AdsErrorPageCodeComponent, AdsErrorPageComponent, AdsExpansionPanelComponent, AdsFilterMenuComponent, AdsFooterComponent, AdsFooterContainerComponent, AdsGenericLogoComponent, AdsHeaderComponent, AdsHeaderContainerComponent, AdsHistoryStepperComponent, AdsHorizontalNavBarComponent, AdsHorizontalStepperComponent, AdsIconButtonComponent, AdsIconHoverComponent, AdsInputComponent, AdsInputDropdownComponent, AdsInternationalPhoneFieldComponent, AdsLinkButtonComponent, AdsMainMenuComponent, AdsMenuDropDownComponent, AdsMenuDropDownTriggerDirective, AdsModalComponent, AdsMultiSelectDropdownComponent, AdsNavMenuComponent, AdsNavigationCollapseHandleComponent, AdsNavigationComponent, AdsNavigationHeaderComponent, AdsNavigationItemComponent, AdsNavigationItemsContainerComponent, AdsNumericBadgeComponent, AdsNumericStepperComponent, AdsOrgDisplayTextComponent, AdsPeakEssentialsLogoComponent, AdsPeakMarketplaceLogoComponent, AdsPeakOrderManagementLogoComponent, AdsPhoneFieldComponent, AdsPilotPayLogoComponent, AdsPrimaryLogoComponent, AdsProgressBarComponent, AdsProgressIndicatorSpinnerComponent, AdsProgressSpinnerComponent, AdsProgressStepperComponent, AdsRadioButtonComponent, AdsRateOptionCardComponent, AdsScmsLogoComponent, AdsScmsSideNavBarComponent, AdsSearchDropdownComponent, AdsSearchInputComponent, AdsShipmentHorizontalStepperComponent, AdsSideNavBarComponent, AdsSideNavBarV2Component, AdsSlideToggleComponent, AdsSliderComponent, AdsSnackbarComponent, AdsSortMenuComponent, AdsSplashPageComponent, AdsStepperComponent, AdsSubNavigationButtonComponent, AdsTableComponent, AdsTabsComponent, AdsTagComponent, AdsTagContainerComponent, AdsTextareaComponent, AdsTimeFieldComponent, AdsTimepickerComponent, AdsVerticalSideNavigationStepperComponent, AdsVerticalStepComponent, AdsVerticalStepperComponent, AdsWizardStepperComponent, AscentCardComponent, BadgeColor, Colors, CountryCode, CustomDatetimeAdapter, DividerComponent, ErrorPageDefault, HistoryAction, HorizontalStepStatus, MainMenuService, ModalActionType, ModalPanelClass, PanelClass, ShellLayoutComponent, SpinnerSize, StepStatus, TableBreakpoint, VerticalStepStatus, ViewportService, WindowService, WizardStepStatus, provideAdsUi };
|
|
4216
|
-
export type { ActiveFilter, ActiveSort, AdsMenuDropDownItem, AdsMenuDropDownPosition, AdsModalData, AdsNavItemV2, AdsNavSubItemV2, AdsUiConfig, Breadcrumb, ColumnFilterOption, ColumnSortFilterConfig, ColumnSortOption, ColumnVisibilityControl, Copyright, CustomHeaderParams, DROP_CALLBACK_INDEXES, DividerStyle, ErrorPageConfig, ErrorPageInfoColumn, FilterOptionsSortComparator, FilterValueFormatter, HistoryContextTag, HistoryEvent, HistoryGroup, HorizontalNavLink, HorizontalStep, IconButtonSize, Link, MainMenuItem, NavItem, NavMenuItem, NumericStep, ProgressStep, RateOptionCardTag, ScmsNavItem, ScmsNavSubItem, SearchDropdownComponentOptions, SearchDropdownDisplayControlValue, SearchDropdownStaticOption, SearchDropdownStaticOptionTemplateContext, ShipmentStep, Size, SnackBarData, SortComparator, SortMenuChangeEvent, SortType, Step, Tab, Tag, UNSUBSCRIBE_FUNCTIONS_COLLECTION, Variant, VerticalSideNavigationStep, WizardStep };
|
|
4301
|
+
export type { ActiveFilter, ActiveSort, AdsMenuDropDownItem, AdsMenuDropDownPosition, AdsModalData, AdsNavItemV2, AdsNavSubItemV2, AdsUiConfig, Breadcrumb, ColumnFilterOption, ColumnSortFilterConfig, ColumnSortOption, ColumnVisibilityControl, Copyright, CustomHeaderParams, DROP_CALLBACK_INDEXES, DividerStyle, ErrorPageConfig, ErrorPageInfoColumn, FilterOptionsSortComparator, FilterValueFormatter, HistoryContextTag, HistoryEvent, HistoryGroup, HorizontalNavLink, HorizontalStep, IconButtonSize, Link, MainMenuItem, NavItem, NavMenuItem, NumericStep, ProgressStep, RateOptionCardTag, ScmsNavItem, ScmsNavSubItem, SearchDropdownComponentOptions, SearchDropdownDisplayControlValue, SearchDropdownFooterOption, SearchDropdownStaticOption, SearchDropdownStaticOptionTemplateContext, ShipmentStep, Size, SnackBarData, SortComparator, SortMenuChangeEvent, SortType, Step, Tab, Tag, UNSUBSCRIBE_FUNCTIONS_COLLECTION, Variant, VerticalSideNavigationStep, WizardStep };
|