@genesislcap/foundation-ui 14.488.2 → 14.489.0-GENC-1351.10
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/dist/custom-elements.json +1412 -680
- package/dist/dts/combobox/combobox.d.ts +25 -0
- package/dist/dts/combobox/combobox.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/options-datasource/options-datasource.d.ts +69 -0
- package/dist/dts/options-datasource/options-datasource.d.ts.map +1 -1
- package/dist/dts/react.d.ts +15 -13
- package/dist/dts/select/select.d.ts +8 -0
- package/dist/dts/select/select.d.ts.map +1 -1
- package/dist/dts/utils/base-datasource.d.ts +37 -1
- package/dist/dts/utils/base-datasource.d.ts.map +1 -1
- package/dist/dts/utils/event-types.d.ts +9 -0
- package/dist/dts/utils/event-types.d.ts.map +1 -0
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/esm/combobox/combobox.js +38 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/options-datasource/options-datasource.js +236 -29
- package/dist/esm/select/select.js +12 -0
- package/dist/esm/utils/base-datasource.js +132 -3
- package/dist/esm/utils/event-types.js +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/foundation-ui.api.json +370 -7
- package/dist/foundation-ui.d.ts +148 -1
- package/dist/react.cjs +37 -13
- package/dist/react.mjs +34 -10
- package/package.json +19 -19
package/dist/foundation-ui.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ import { FoundationElement } from '@microsoft/fast-foundation';
|
|
|
102
102
|
import { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
103
103
|
import { FoundationElementRegistry } from '@microsoft/fast-foundation';
|
|
104
104
|
import { FoundationElementTemplate } from '@microsoft/fast-foundation';
|
|
105
|
+
import { GenesisResources } from '@genesislcap/foundation-comms';
|
|
105
106
|
import { HorizontalScroll as HorizontalScroll_2 } from '@microsoft/fast-components';
|
|
106
107
|
import { HorizontalScrollOptions } from '@microsoft/fast-foundation';
|
|
107
108
|
import { Http } from '@genesislcap/foundation-comms';
|
|
@@ -893,6 +894,12 @@ export declare abstract class BaseDatasource extends BaseDatasource_base {
|
|
|
893
894
|
isSnapshot: boolean;
|
|
894
895
|
maxRows: number;
|
|
895
896
|
maxView: number;
|
|
897
|
+
/**
|
|
898
|
+
* Sort field(s) for the resource. When using OFFSET-based paging (e.g.
|
|
899
|
+
* `options-datasource`'s `infinite-scroll`), the server has no other guaranteed row
|
|
900
|
+
* ordering between requests, so a stable `orderBy` is required to avoid rows shifting
|
|
901
|
+
* across pages (duplicates/gaps) as the underlying data changes between fetches.
|
|
902
|
+
*/
|
|
896
903
|
orderBy: string;
|
|
897
904
|
request: any;
|
|
898
905
|
requestChanged(oldValue: any, newValue: any): void;
|
|
@@ -908,7 +915,15 @@ export declare abstract class BaseDatasource extends BaseDatasource_base {
|
|
|
908
915
|
set datasourceConfig(config: DatasourceOptions);
|
|
909
916
|
requiresFullDataRefresh: boolean;
|
|
910
917
|
dataSub: Subscription;
|
|
911
|
-
|
|
918
|
+
protected sourceRef: string;
|
|
919
|
+
/**
|
|
920
|
+
* Whether the server reported more rows are available beyond the ones already fetched.
|
|
921
|
+
*/
|
|
922
|
+
protected moreRowsAvailable: boolean;
|
|
923
|
+
/**
|
|
924
|
+
* The OFFSET to request the next page from, for REQUEST_SERVER paging.
|
|
925
|
+
*/
|
|
926
|
+
protected nextRequestOffset: number;
|
|
912
927
|
rowsSyncedWithStream: Map<string, any>;
|
|
913
928
|
dataSubWasLoggedOff: boolean;
|
|
914
929
|
private criteriaFromFilters;
|
|
@@ -923,6 +938,28 @@ export declare abstract class BaseDatasource extends BaseDatasource_base {
|
|
|
923
938
|
abstract handleStreamUpdates(updatedRows: any[]): void;
|
|
924
939
|
fetchGenesisData(withFullInit?: boolean): Promise<void>;
|
|
925
940
|
initDatasource(): Promise<void>;
|
|
941
|
+
/**
|
|
942
|
+
* Whether a further page of rows can be requested from the server.
|
|
943
|
+
* @public
|
|
944
|
+
*/
|
|
945
|
+
canRequestMoreRows(): boolean;
|
|
946
|
+
/**
|
|
947
|
+
* Requests the next page of rows (up to `maxRows`) from the server.
|
|
948
|
+
*
|
|
949
|
+
* @remarks
|
|
950
|
+
* For DATASERVER resources a MORE_ROWS message is sent against the active stream's view and
|
|
951
|
+
* the rows are delivered as inserts on the existing stream subscription. For REQUEST_SERVER
|
|
952
|
+
* resources the next page is requested by OFFSET and delivered via `handleStreamInserts`.
|
|
953
|
+
* @public
|
|
954
|
+
*/
|
|
955
|
+
requestMoreRows(): Promise<void>;
|
|
956
|
+
/**
|
|
957
|
+
* Row extraction identical to `Datasource.snapshotFiltered`, kept local so the raw
|
|
958
|
+
* response (with MORE_ROWS/NEXT_OFFSET paging metadata) remains available.
|
|
959
|
+
*/
|
|
960
|
+
private filterSnapshotResult;
|
|
961
|
+
private updateRequestPagingState;
|
|
962
|
+
private initialRequestOffset;
|
|
926
963
|
private datasourceOptions;
|
|
927
964
|
private handleStreamUpdate;
|
|
928
965
|
applyRequestServerData(requestServerResult: RequestServerResult): void;
|
|
@@ -1550,6 +1587,7 @@ export declare const COMBO_INPUT_MIN_LENGTH = 1;
|
|
|
1550
1587
|
* @tagname %%prefix%%-combobox
|
|
1551
1588
|
*
|
|
1552
1589
|
* @fires change - Fired when a selection is confirmed in autocomplete-both mode
|
|
1590
|
+
* @fires open-change - Fired when the dropdown opens or closes. detail: `OpenChangeEventDetail`
|
|
1553
1591
|
*/
|
|
1554
1592
|
export declare class Combobox extends Combobox_2 {
|
|
1555
1593
|
#private;
|
|
@@ -1557,6 +1595,16 @@ export declare class Combobox extends Combobox_2 {
|
|
|
1557
1595
|
private needManualChangeEventDispatch;
|
|
1558
1596
|
get activeDescendant(): string;
|
|
1559
1597
|
slottedDatasource: HTMLSlotElement;
|
|
1598
|
+
/**
|
|
1599
|
+
* Enables server-side filtering: typed input refetches from the server with a criteria
|
|
1600
|
+
* instead of filtering the already-loaded options client-side.
|
|
1601
|
+
*
|
|
1602
|
+
* @remarks
|
|
1603
|
+
* Automatically forced to `true` (overriding an explicit `async="false"`) when the
|
|
1604
|
+
* slotted datasource has `infinite-scroll` enabled — see
|
|
1605
|
+
* {@link Combobox.enableAsyncForInfiniteScrollDatasource}. With only a page of the
|
|
1606
|
+
* resource loaded, client-side filtering would silently only search that page.
|
|
1607
|
+
*/
|
|
1560
1608
|
async: boolean;
|
|
1561
1609
|
debounce: number;
|
|
1562
1610
|
debounceChanged(oldValue: any, newValue: number): void;
|
|
@@ -1587,10 +1635,24 @@ export declare class Combobox extends Combobox_2 {
|
|
|
1587
1635
|
* @experimental
|
|
1588
1636
|
*/
|
|
1589
1637
|
scrollWhenSelectionChangesOptions: boolean | ScrollIntoViewOptions;
|
|
1638
|
+
/**
|
|
1639
|
+
* The scrollable element hosting the dropdown options. Part of the public contract for
|
|
1640
|
+
* slotted datasources (e.g. options-datasource infinite scroll) to observe scrolling.
|
|
1641
|
+
* @public
|
|
1642
|
+
*/
|
|
1643
|
+
get scrollableListbox(): HTMLElement | null;
|
|
1590
1644
|
openChanged(): void;
|
|
1591
1645
|
get value(): string;
|
|
1592
1646
|
set value(next: string);
|
|
1593
1647
|
slottedOptionsChanged(prev: Element[] | undefined, next: Element[]): void;
|
|
1648
|
+
/**
|
|
1649
|
+
* When the slotted datasource pages its options (infinite scroll), only a page of the
|
|
1650
|
+
* resource is loaded client-side, so filtering typed input locally is meaningless.
|
|
1651
|
+
* Switch to async mode so input refetches from the server with a criteria instead;
|
|
1652
|
+
* further pages honour that criteria. This overrides an explicit `async="false"` on
|
|
1653
|
+
* the combobox — infinite-scroll datasources cannot support client-side filtering.
|
|
1654
|
+
*/
|
|
1655
|
+
private enableAsyncForInfiniteScrollDatasource;
|
|
1594
1656
|
filterOptions(): void;
|
|
1595
1657
|
clickHandler(e: MouseEvent): boolean | void;
|
|
1596
1658
|
keydownHandler(e: KeyboardEvent): boolean | void;
|
|
@@ -5665,6 +5727,15 @@ declare const NumberField_base: {
|
|
|
5665
5727
|
|
|
5666
5728
|
export declare const NUMERIC_OPERATORS: CriteriaOperator[];
|
|
5667
5729
|
|
|
5730
|
+
/**
|
|
5731
|
+
* Detail payload for the `open-change` event fired by `Select` and `Combobox` when their
|
|
5732
|
+
* dropdown opens or closes.
|
|
5733
|
+
* @public
|
|
5734
|
+
*/
|
|
5735
|
+
export declare interface OpenChangeEventDetail {
|
|
5736
|
+
open: boolean;
|
|
5737
|
+
}
|
|
5738
|
+
|
|
5668
5739
|
export declare const OPERATOR_DISPLAY_LABEL: Record<CriteriaOperator, string>;
|
|
5669
5740
|
|
|
5670
5741
|
declare type Operators = keyof typeof clientOperators;
|
|
@@ -5705,11 +5776,30 @@ export declare class Optgroup extends ListboxOption_3 {
|
|
|
5705
5776
|
* @fires value-change - Fired when the selected value changes. detail: `ValueChangeEventDetail`
|
|
5706
5777
|
*/
|
|
5707
5778
|
export declare class OptionsDatasource extends BaseDatasource {
|
|
5779
|
+
resources: GenesisResources;
|
|
5708
5780
|
labelField: string;
|
|
5709
5781
|
optionElement: string;
|
|
5710
5782
|
valueField: string;
|
|
5711
5783
|
emptyDataLabel: string;
|
|
5712
5784
|
allowCustomOptions: boolean;
|
|
5785
|
+
/**
|
|
5786
|
+
* Enables infinite scrolling. Instead of loading everything upfront, only `page-size`
|
|
5787
|
+
* options are loaded initially and the next page is requested when the user scrolls near
|
|
5788
|
+
* the bottom of the dropdown. REQUEST_SERVER resources page by OFFSET; DATASERVER
|
|
5789
|
+
* resources page via MORE_ROWS on a live stream (total still capped by `maxView`).
|
|
5790
|
+
*
|
|
5791
|
+
* @remarks
|
|
5792
|
+
* When paging REQUEST_SERVER resources by OFFSET, set a stable `order-by` — without one
|
|
5793
|
+
* the server has no other guaranteed ordering between requests, so rows can shift across
|
|
5794
|
+
* pages (duplicates/gaps) as the underlying data changes between fetches. Also, when the
|
|
5795
|
+
* parent is a combobox, this forces `async` mode on it (see `Combobox.async`), since only
|
|
5796
|
+
* a page of options is loaded client-side.
|
|
5797
|
+
*/
|
|
5798
|
+
infiniteScroll: boolean;
|
|
5799
|
+
/**
|
|
5800
|
+
* Number of options fetched per page when `infinite-scroll` is enabled. Defaults to 20.
|
|
5801
|
+
*/
|
|
5802
|
+
pageSize: number;
|
|
5713
5803
|
labelFormatter: any;
|
|
5714
5804
|
labelRowFormatter: (any: any) => string;
|
|
5715
5805
|
initialSelectedValue: string | number;
|
|
@@ -5723,20 +5813,69 @@ export declare class OptionsDatasource extends BaseDatasource {
|
|
|
5723
5813
|
}[];
|
|
5724
5814
|
baseCriteria: string;
|
|
5725
5815
|
private resizeObserver;
|
|
5816
|
+
private static readonly defaultPageSize;
|
|
5817
|
+
/**
|
|
5818
|
+
* Distance from the bottom of the listbox (in px) at which the next page is requested.
|
|
5819
|
+
*/
|
|
5820
|
+
private static readonly scrollLoadThresholdPx;
|
|
5821
|
+
private listboxElement;
|
|
5822
|
+
private loadingMoreRows;
|
|
5823
|
+
private renderedOptionsCount;
|
|
5824
|
+
private lastTopUpScrollHeight;
|
|
5825
|
+
private emptyDataOption;
|
|
5726
5826
|
connectedCallback(): Promise<void>;
|
|
5727
5827
|
disconnectedCallback(): void;
|
|
5828
|
+
/**
|
|
5829
|
+
* While the dropdown is closed, the listbox has no dimensions and cannot be scrolled,
|
|
5830
|
+
* so re-check whether the visible listbox needs topping up every time it opens. Also
|
|
5831
|
+
* retries attaching the scroll listener if the initial attempt (queued on connect)
|
|
5832
|
+
* missed the listbox because the host hadn't rendered it yet.
|
|
5833
|
+
*/
|
|
5834
|
+
private selectOpenChangeHandler;
|
|
5835
|
+
/**
|
|
5836
|
+
* REQUEST_SERVER resources page by OFFSET against one-shot requests, so they keep the
|
|
5837
|
+
* default snapshot mode. DATASERVER resources page via MORE_ROWS, which needs the live
|
|
5838
|
+
* stream's SOURCE_REF, so they switch to stream mode.
|
|
5839
|
+
*/
|
|
5840
|
+
private applyInfiniteScrollFetchMode;
|
|
5841
|
+
private attachListboxScrollListener;
|
|
5842
|
+
private listboxScrollHandler;
|
|
5843
|
+
private loadNextPage;
|
|
5844
|
+
/**
|
|
5845
|
+
* If the loaded options don't fill the visible listbox (so it can't be scrolled),
|
|
5846
|
+
* keep requesting pages until it overflows or the server runs out of rows.
|
|
5847
|
+
*/
|
|
5848
|
+
private topUpVisibleListbox;
|
|
5728
5849
|
private resizeObserverCallback;
|
|
5729
5850
|
selectChangeHandler: (e: any) => void;
|
|
5730
5851
|
fetchData(): void;
|
|
5731
5852
|
asyncModeIntialization(): Promise<void>;
|
|
5732
5853
|
clearData(): void;
|
|
5733
5854
|
private checkOverflow;
|
|
5855
|
+
private rowToOption;
|
|
5856
|
+
private renderListboxOptions;
|
|
5857
|
+
private removeEmptyDataOption;
|
|
5734
5858
|
syncComponentData(snapshotData?: any[]): void;
|
|
5735
5859
|
getInitialLabel(): string;
|
|
5736
5860
|
private getDisplayForValue;
|
|
5737
5861
|
resetCombobox(): void;
|
|
5862
|
+
/**
|
|
5863
|
+
* Appends rows to the already rendered options. Used by REQUEST_SERVER
|
|
5864
|
+
* infinite scroll paging, where each page contains only the new rows.
|
|
5865
|
+
*/
|
|
5738
5866
|
handleStreamInserts(insertedRows: any[]): void;
|
|
5867
|
+
/**
|
|
5868
|
+
* @remarks
|
|
5869
|
+
* Not implemented: rendered options are only ever appended (see `syncComponentData` /
|
|
5870
|
+
* `handleStreamInserts`). For DATASERVER `infinite-scroll`, a live delete/update on a
|
|
5871
|
+
* row already rendered in an open dropdown will not be reflected until the datasource
|
|
5872
|
+
* is refetched (e.g. criteria change) — tracked as a known limitation, not a v1 goal.
|
|
5873
|
+
*/
|
|
5739
5874
|
handleStreamDeletes(deletedRows: any[]): void;
|
|
5875
|
+
/**
|
|
5876
|
+
* @remarks
|
|
5877
|
+
* Not implemented — see {@link OptionsDatasource.handleStreamDeletes}.
|
|
5878
|
+
*/
|
|
5740
5879
|
handleStreamUpdates(updatedRows: any[]): void;
|
|
5741
5880
|
}
|
|
5742
5881
|
|
|
@@ -6428,8 +6567,16 @@ export declare class SegmentedItem extends Radio_2 {
|
|
|
6428
6567
|
|
|
6429
6568
|
/**
|
|
6430
6569
|
* @tagname %%prefix%%-select
|
|
6570
|
+
*
|
|
6571
|
+
* @fires open-change - Fired when the dropdown opens or closes. detail: `OpenChangeEventDetail`
|
|
6431
6572
|
*/
|
|
6432
6573
|
export declare class Select extends Select_2 {
|
|
6574
|
+
/**
|
|
6575
|
+
* The scrollable element hosting the dropdown options. Part of the public contract for
|
|
6576
|
+
* slotted datasources (e.g. options-datasource infinite scroll) to observe scrolling.
|
|
6577
|
+
* @public
|
|
6578
|
+
*/
|
|
6579
|
+
get scrollableListbox(): HTMLElement | null;
|
|
6433
6580
|
/**
|
|
6434
6581
|
* @internal
|
|
6435
6582
|
*/
|
package/dist/react.cjs
CHANGED
|
@@ -111,9 +111,9 @@ function _mergeRefs(...refs) {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
const
|
|
114
|
+
const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
|
|
115
115
|
const { children, ...rest } = props;
|
|
116
|
-
return React.createElement(customElements.getName(
|
|
116
|
+
return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
@@ -121,9 +121,9 @@ const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
|
121
121
|
return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
const
|
|
124
|
+
const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
|
|
125
125
|
const { children, ...rest } = props;
|
|
126
|
-
return React.createElement(customElements.getName(
|
|
126
|
+
return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
|
|
@@ -148,9 +148,9 @@ const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref)
|
|
|
148
148
|
return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
149
149
|
});
|
|
150
150
|
|
|
151
|
-
const
|
|
151
|
+
const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
152
152
|
const { children, ...rest } = props;
|
|
153
|
-
return React.createElement(customElements.getName(
|
|
153
|
+
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
154
154
|
});
|
|
155
155
|
|
|
156
156
|
const Anchor = React.forwardRef(function Anchor(props, ref) {
|
|
@@ -255,8 +255,20 @@ const Checkbox = React.forwardRef(function Checkbox(props, ref) {
|
|
|
255
255
|
});
|
|
256
256
|
|
|
257
257
|
const Combobox = React.forwardRef(function Combobox(props, ref) {
|
|
258
|
-
const { children, ...rest } = props;
|
|
259
|
-
|
|
258
|
+
const { onOpenChange, children, ...rest } = props;
|
|
259
|
+
const _innerRef = React.useRef(null);
|
|
260
|
+
const _onOpenChangeRef = React.useRef(onOpenChange);
|
|
261
|
+
_onOpenChangeRef.current = onOpenChange;
|
|
262
|
+
React.useLayoutEffect(() => {
|
|
263
|
+
const el = _innerRef.current;
|
|
264
|
+
if (!el) return;
|
|
265
|
+
const _onOpenChangeFn = (e) => _onOpenChangeRef.current?.(e);
|
|
266
|
+
el.addEventListener('open-change', _onOpenChangeFn);
|
|
267
|
+
return () => {
|
|
268
|
+
el.removeEventListener('open-change', _onOpenChangeFn);
|
|
269
|
+
};
|
|
270
|
+
}, []);
|
|
271
|
+
return React.createElement(customElements.getName(ComboboxWC) ?? '%%prefix%%-combobox', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
260
272
|
});
|
|
261
273
|
|
|
262
274
|
const ConnectionIndicator = React.forwardRef(function ConnectionIndicator(props, ref) {
|
|
@@ -859,8 +871,20 @@ const SegmentedItem = React.forwardRef(function SegmentedItem(props, ref) {
|
|
|
859
871
|
});
|
|
860
872
|
|
|
861
873
|
const Select = React.forwardRef(function Select(props, ref) {
|
|
862
|
-
const { children, ...rest } = props;
|
|
863
|
-
|
|
874
|
+
const { onOpenChange, children, ...rest } = props;
|
|
875
|
+
const _innerRef = React.useRef(null);
|
|
876
|
+
const _onOpenChangeRef = React.useRef(onOpenChange);
|
|
877
|
+
_onOpenChangeRef.current = onOpenChange;
|
|
878
|
+
React.useLayoutEffect(() => {
|
|
879
|
+
const el = _innerRef.current;
|
|
880
|
+
if (!el) return;
|
|
881
|
+
const _onOpenChangeFn = (e) => _onOpenChangeRef.current?.(e);
|
|
882
|
+
el.addEventListener('open-change', _onOpenChangeFn);
|
|
883
|
+
return () => {
|
|
884
|
+
el.removeEventListener('open-change', _onOpenChangeFn);
|
|
885
|
+
};
|
|
886
|
+
}, []);
|
|
887
|
+
return React.createElement(customElements.getName(SelectWC) ?? '%%prefix%%-select', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
864
888
|
});
|
|
865
889
|
|
|
866
890
|
const Skeleton = React.forwardRef(function Skeleton(props, ref) {
|
|
@@ -1078,11 +1102,11 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
|
|
|
1078
1102
|
});
|
|
1079
1103
|
|
|
1080
1104
|
module.exports = {
|
|
1081
|
-
Accordion,
|
|
1082
|
-
AccordionItem,
|
|
1083
1105
|
ActionsMenu,
|
|
1084
|
-
|
|
1106
|
+
AccordionItem,
|
|
1085
1107
|
AiIndicator,
|
|
1108
|
+
AiCriteriaSearch,
|
|
1109
|
+
Accordion,
|
|
1086
1110
|
Anchor,
|
|
1087
1111
|
AnchoredRegion,
|
|
1088
1112
|
Avatar,
|
package/dist/react.mjs
CHANGED
|
@@ -109,9 +109,9 @@ function _mergeRefs(...refs) {
|
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
export const
|
|
112
|
+
export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
|
|
113
113
|
const { children, ...rest } = props;
|
|
114
|
-
return React.createElement(customElements.getName(
|
|
114
|
+
return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
@@ -119,9 +119,9 @@ export const AccordionItem = React.forwardRef(function AccordionItem(props, ref)
|
|
|
119
119
|
return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
export const
|
|
122
|
+
export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
|
|
123
123
|
const { children, ...rest } = props;
|
|
124
|
-
return React.createElement(customElements.getName(
|
|
124
|
+
return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
|
|
@@ -146,9 +146,9 @@ export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props
|
|
|
146
146
|
return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
export const
|
|
149
|
+
export const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
150
150
|
const { children, ...rest } = props;
|
|
151
|
-
return React.createElement(customElements.getName(
|
|
151
|
+
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
152
152
|
});
|
|
153
153
|
|
|
154
154
|
export const Anchor = React.forwardRef(function Anchor(props, ref) {
|
|
@@ -253,8 +253,20 @@ export const Checkbox = React.forwardRef(function Checkbox(props, ref) {
|
|
|
253
253
|
});
|
|
254
254
|
|
|
255
255
|
export const Combobox = React.forwardRef(function Combobox(props, ref) {
|
|
256
|
-
const { children, ...rest } = props;
|
|
257
|
-
|
|
256
|
+
const { onOpenChange, children, ...rest } = props;
|
|
257
|
+
const _innerRef = React.useRef(null);
|
|
258
|
+
const _onOpenChangeRef = React.useRef(onOpenChange);
|
|
259
|
+
_onOpenChangeRef.current = onOpenChange;
|
|
260
|
+
React.useLayoutEffect(() => {
|
|
261
|
+
const el = _innerRef.current;
|
|
262
|
+
if (!el) return;
|
|
263
|
+
const _onOpenChangeFn = (e) => _onOpenChangeRef.current?.(e);
|
|
264
|
+
el.addEventListener('open-change', _onOpenChangeFn);
|
|
265
|
+
return () => {
|
|
266
|
+
el.removeEventListener('open-change', _onOpenChangeFn);
|
|
267
|
+
};
|
|
268
|
+
}, []);
|
|
269
|
+
return React.createElement(customElements.getName(ComboboxWC) ?? '%%prefix%%-combobox', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
258
270
|
});
|
|
259
271
|
|
|
260
272
|
export const ConnectionIndicator = React.forwardRef(function ConnectionIndicator(props, ref) {
|
|
@@ -857,8 +869,20 @@ export const SegmentedItem = React.forwardRef(function SegmentedItem(props, ref)
|
|
|
857
869
|
});
|
|
858
870
|
|
|
859
871
|
export const Select = React.forwardRef(function Select(props, ref) {
|
|
860
|
-
const { children, ...rest } = props;
|
|
861
|
-
|
|
872
|
+
const { onOpenChange, children, ...rest } = props;
|
|
873
|
+
const _innerRef = React.useRef(null);
|
|
874
|
+
const _onOpenChangeRef = React.useRef(onOpenChange);
|
|
875
|
+
_onOpenChangeRef.current = onOpenChange;
|
|
876
|
+
React.useLayoutEffect(() => {
|
|
877
|
+
const el = _innerRef.current;
|
|
878
|
+
if (!el) return;
|
|
879
|
+
const _onOpenChangeFn = (e) => _onOpenChangeRef.current?.(e);
|
|
880
|
+
el.addEventListener('open-change', _onOpenChangeFn);
|
|
881
|
+
return () => {
|
|
882
|
+
el.removeEventListener('open-change', _onOpenChangeFn);
|
|
883
|
+
};
|
|
884
|
+
}, []);
|
|
885
|
+
return React.createElement(customElements.getName(SelectWC) ?? '%%prefix%%-select', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
862
886
|
});
|
|
863
887
|
|
|
864
888
|
export const Skeleton = React.forwardRef(function Skeleton(props, ref) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ui",
|
|
3
3
|
"description": "Genesis Foundation UI",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.489.0-GENC-1351.10",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@genesislcap/foundation-testing": "14.
|
|
89
|
-
"@genesislcap/genx": "14.
|
|
90
|
-
"@genesislcap/rollup-builder": "14.
|
|
91
|
-
"@genesislcap/ts-builder": "14.
|
|
92
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
93
|
-
"@genesislcap/vite-builder": "14.
|
|
94
|
-
"@genesislcap/webpack-builder": "14.
|
|
88
|
+
"@genesislcap/foundation-testing": "14.489.0-GENC-1351.10",
|
|
89
|
+
"@genesislcap/genx": "14.489.0-GENC-1351.10",
|
|
90
|
+
"@genesislcap/rollup-builder": "14.489.0-GENC-1351.10",
|
|
91
|
+
"@genesislcap/ts-builder": "14.489.0-GENC-1351.10",
|
|
92
|
+
"@genesislcap/uvu-playwright-builder": "14.489.0-GENC-1351.10",
|
|
93
|
+
"@genesislcap/vite-builder": "14.489.0-GENC-1351.10",
|
|
94
|
+
"@genesislcap/webpack-builder": "14.489.0-GENC-1351.10",
|
|
95
95
|
"copyfiles": "^2.4.1"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
@@ -100,16 +100,16 @@
|
|
|
100
100
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
101
101
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
102
102
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
|
|
103
|
-
"@genesislcap/expression-builder": "14.
|
|
104
|
-
"@genesislcap/foundation-ai": "14.
|
|
105
|
-
"@genesislcap/foundation-comms": "14.
|
|
106
|
-
"@genesislcap/foundation-criteria": "14.
|
|
107
|
-
"@genesislcap/foundation-errors": "14.
|
|
108
|
-
"@genesislcap/foundation-events": "14.
|
|
109
|
-
"@genesislcap/foundation-logger": "14.
|
|
110
|
-
"@genesislcap/foundation-notifications": "14.
|
|
111
|
-
"@genesislcap/foundation-user": "14.
|
|
112
|
-
"@genesislcap/foundation-utils": "14.
|
|
103
|
+
"@genesislcap/expression-builder": "14.489.0-GENC-1351.10",
|
|
104
|
+
"@genesislcap/foundation-ai": "14.489.0-GENC-1351.10",
|
|
105
|
+
"@genesislcap/foundation-comms": "14.489.0-GENC-1351.10",
|
|
106
|
+
"@genesislcap/foundation-criteria": "14.489.0-GENC-1351.10",
|
|
107
|
+
"@genesislcap/foundation-errors": "14.489.0-GENC-1351.10",
|
|
108
|
+
"@genesislcap/foundation-events": "14.489.0-GENC-1351.10",
|
|
109
|
+
"@genesislcap/foundation-logger": "14.489.0-GENC-1351.10",
|
|
110
|
+
"@genesislcap/foundation-notifications": "14.489.0-GENC-1351.10",
|
|
111
|
+
"@genesislcap/foundation-user": "14.489.0-GENC-1351.10",
|
|
112
|
+
"@genesislcap/foundation-utils": "14.489.0-GENC-1351.10",
|
|
113
113
|
"@microsoft/fast-colors": "5.3.1",
|
|
114
114
|
"@microsoft/fast-components": "2.30.6",
|
|
115
115
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"require": "./dist/react.cjs"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "3a274a433b5f216481f035a4fa38fa726103d694"
|
|
146
146
|
}
|