@genesislcap/foundation-ui 14.447.0 → 14.447.1-canary.search-bar-4
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 +55 -19
- package/dist/dts/react.d.ts +0 -11
- package/dist/dts/search-bar/search-bar-combobox.d.ts +5 -6
- package/dist/dts/search-bar/search-bar-combobox.d.ts.map +1 -1
- package/dist/dts/search-bar/search-bar-combobox.styles.d.ts.map +1 -1
- package/dist/dts/search-bar/search-bar.d.ts +31 -0
- package/dist/dts/search-bar/search-bar.d.ts.map +1 -1
- package/dist/dts/search-bar/search-bar.styles.d.ts.map +1 -1
- package/dist/dts/search-bar/search-bar.template.d.ts.map +1 -1
- package/dist/dts/search-bar/search-bar.types.d.ts +1 -1
- package/dist/dts/search-bar/search-bar.types.d.ts.map +1 -1
- package/dist/esm/search-bar/search-bar-combobox.js +31 -1
- package/dist/esm/search-bar/search-bar-combobox.styles.js +15 -0
- package/dist/esm/search-bar/search-bar-combobox.template.js +1 -1
- package/dist/esm/search-bar/search-bar.js +81 -1
- package/dist/esm/search-bar/search-bar.styles.js +0 -17
- package/dist/esm/search-bar/search-bar.template.js +27 -26
- package/dist/react.cjs +0 -19
- package/dist/react.mjs +0 -18
- package/package.json +19 -19
|
@@ -42037,20 +42037,6 @@
|
|
|
42037
42037
|
}
|
|
42038
42038
|
}
|
|
42039
42039
|
],
|
|
42040
|
-
"events": [
|
|
42041
|
-
{
|
|
42042
|
-
"description": "Fired when the combobox value changes",
|
|
42043
|
-
"name": "change",
|
|
42044
|
-
"inheritedFrom": {
|
|
42045
|
-
"name": "Combobox",
|
|
42046
|
-
"module": "src/combobox/combobox.ts"
|
|
42047
|
-
}
|
|
42048
|
-
},
|
|
42049
|
-
{
|
|
42050
|
-
"description": "Fired when the input is cleared by the user",
|
|
42051
|
-
"name": "inputdeleted"
|
|
42052
|
-
}
|
|
42053
|
-
],
|
|
42054
42040
|
"attributes": [
|
|
42055
42041
|
{
|
|
42056
42042
|
"name": "minlength",
|
|
@@ -42128,8 +42114,16 @@
|
|
|
42128
42114
|
"name": "Combobox",
|
|
42129
42115
|
"package": "@microsoft/fast-components"
|
|
42130
42116
|
},
|
|
42131
|
-
"
|
|
42132
|
-
|
|
42117
|
+
"events": [
|
|
42118
|
+
{
|
|
42119
|
+
"description": "Fires a custom 'change' event when the value updates",
|
|
42120
|
+
"name": "change",
|
|
42121
|
+
"inheritedFrom": {
|
|
42122
|
+
"name": "Combobox",
|
|
42123
|
+
"module": "src/combobox/combobox.ts"
|
|
42124
|
+
}
|
|
42125
|
+
}
|
|
42126
|
+
]
|
|
42133
42127
|
},
|
|
42134
42128
|
{
|
|
42135
42129
|
"kind": "variable",
|
|
@@ -42196,7 +42190,7 @@
|
|
|
42196
42190
|
{
|
|
42197
42191
|
"kind": "variable",
|
|
42198
42192
|
"name": "foundationSearchBarStyles",
|
|
42199
|
-
"default": "css`\n .search-bar-combobox {\n width: 100%;\n min-width: auto;\n }\n\n .padding {\n padding-left: calc(${designUnit} * 1px);\n }\n\n .selected-options {\n display: flex;\n align-items: center;\n overflow: hidden;\n gap: calc(${designUnit} * 1px);\n padding-right: calc(${designUnit} * 1px);\n }\n\n .selected-options:hover {\n overflow-x: overlay;\n }\n\n .selected-options::-webkit-scrollbar {\n height: 7px;\n }\n\n .selected-options::-webkit-scrollbar-thumb {\n border-radius: 10px;\n box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);\n background-color: #484848;\n border: 1px solid #7e7e7e;\n }\n\n .selected-options-divider {\n border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);\n }\n\n .options-button {\n height: fit-content;\n min-width: fit-content;\n }\n\n .label {\n display: block;\n font-size: var(--type-ramp-base-font-size);\n margin: calc(${designUnit} * 2px) 2px;\n }\n\n .label-hidden {\n display: none;\n }\n\n .search-clear-button {\n min-width: 28px;\n min-height: 28px;\n height: 28px;\n margin: 0;\n }\n\n .search-clear-button svg {\n rotate: 45deg;\n }\n\n .search-clear-button::part(control) {\n padding: 0;\n }\n\n .search-clear-button .svg-container {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .
|
|
42193
|
+
"default": "css`\n .search-bar-combobox {\n width: 100%;\n min-width: auto;\n }\n\n .padding {\n padding-left: calc(${designUnit} * 1px);\n }\n\n .selected-options {\n display: flex;\n align-items: center;\n overflow: hidden;\n gap: calc(${designUnit} * 1px);\n padding-right: calc(${designUnit} * 1px);\n }\n\n .selected-options:hover {\n overflow-x: overlay;\n }\n\n .selected-options::-webkit-scrollbar {\n height: 7px;\n }\n\n .selected-options::-webkit-scrollbar-thumb {\n border-radius: 10px;\n box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);\n background-color: #484848;\n border: 1px solid #7e7e7e;\n }\n\n .selected-options-divider {\n border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);\n }\n\n .options-button {\n height: fit-content;\n min-width: fit-content;\n }\n\n .label {\n display: block;\n font-size: var(--type-ramp-base-font-size);\n margin: calc(${designUnit} * 2px) 2px;\n }\n\n .label-hidden {\n display: none;\n }\n\n .search-clear-button {\n min-width: 28px;\n min-height: 28px;\n height: 28px;\n margin: 0;\n }\n\n .search-clear-button svg {\n rotate: 45deg;\n }\n\n .search-clear-button::part(control) {\n padding: 0;\n }\n\n .search-clear-button .svg-container {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .close-icon {\n color: var(--accent-fill-rest);\n }\n`"
|
|
42200
42194
|
}
|
|
42201
42195
|
],
|
|
42202
42196
|
"exports": [
|
|
@@ -42355,6 +42349,15 @@
|
|
|
42355
42349
|
"text": "boolean"
|
|
42356
42350
|
}
|
|
42357
42351
|
},
|
|
42352
|
+
{
|
|
42353
|
+
"kind": "field",
|
|
42354
|
+
"name": "clearButton",
|
|
42355
|
+
"type": {
|
|
42356
|
+
"text": "boolean"
|
|
42357
|
+
},
|
|
42358
|
+
"default": "true",
|
|
42359
|
+
"attribute": "clear-button"
|
|
42360
|
+
},
|
|
42358
42361
|
{
|
|
42359
42362
|
"kind": "field",
|
|
42360
42363
|
"name": "loading",
|
|
@@ -42388,7 +42391,8 @@
|
|
|
42388
42391
|
{
|
|
42389
42392
|
"kind": "method",
|
|
42390
42393
|
"name": "clear",
|
|
42391
|
-
"privacy": "public"
|
|
42394
|
+
"privacy": "public",
|
|
42395
|
+
"description": "Clears all search chips and the current input, and emits `selectionChange` with an empty array."
|
|
42392
42396
|
},
|
|
42393
42397
|
{
|
|
42394
42398
|
"kind": "method",
|
|
@@ -42398,7 +42402,21 @@
|
|
|
42398
42402
|
"type": {
|
|
42399
42403
|
"text": "void"
|
|
42400
42404
|
}
|
|
42401
|
-
}
|
|
42405
|
+
},
|
|
42406
|
+
"description": "Alias for SearchBar.clear."
|
|
42407
|
+
},
|
|
42408
|
+
{
|
|
42409
|
+
"kind": "method",
|
|
42410
|
+
"name": "selectedOptionsChanged"
|
|
42411
|
+
},
|
|
42412
|
+
{
|
|
42413
|
+
"kind": "method",
|
|
42414
|
+
"name": "optionsChanged"
|
|
42415
|
+
},
|
|
42416
|
+
{
|
|
42417
|
+
"kind": "method",
|
|
42418
|
+
"name": "applySearchInputLock",
|
|
42419
|
+
"privacy": "private"
|
|
42402
42420
|
},
|
|
42403
42421
|
{
|
|
42404
42422
|
"kind": "method",
|
|
@@ -42602,6 +42620,15 @@
|
|
|
42602
42620
|
}
|
|
42603
42621
|
],
|
|
42604
42622
|
"attributes": [
|
|
42623
|
+
{
|
|
42624
|
+
"name": "clear-button",
|
|
42625
|
+
"type": {
|
|
42626
|
+
"text": "boolean"
|
|
42627
|
+
},
|
|
42628
|
+
"default": "true",
|
|
42629
|
+
"fieldName": "clearButton",
|
|
42630
|
+
"description": "when true, shows the end clear control when there are chips or typed text. When false, use {@link SearchBar.clear} or {@link SearchBar.clearSearch} to reset programmatically."
|
|
42631
|
+
},
|
|
42605
42632
|
{
|
|
42606
42633
|
"name": "appearance",
|
|
42607
42634
|
"type": {
|
|
@@ -42642,6 +42669,15 @@
|
|
|
42642
42669
|
"text": "boolean"
|
|
42643
42670
|
},
|
|
42644
42671
|
"fieldName": "disabled"
|
|
42672
|
+
},
|
|
42673
|
+
{
|
|
42674
|
+
"name": "clear-button",
|
|
42675
|
+
"type": {
|
|
42676
|
+
"text": "boolean"
|
|
42677
|
+
},
|
|
42678
|
+
"default": "true",
|
|
42679
|
+
"attribute": "clear-button",
|
|
42680
|
+
"fieldName": "clearButton"
|
|
42645
42681
|
}
|
|
42646
42682
|
],
|
|
42647
42683
|
"superclass": {
|
package/dist/dts/react.d.ts
CHANGED
|
@@ -64,7 +64,6 @@ import type { Radio as RadioWC } from './radio/radio';
|
|
|
64
64
|
import type { SchedulerCronBuilder as SchedulerCronBuilderWC } from './scheduler-cron-builder/scheduler-cron-builder';
|
|
65
65
|
import type { SchedulerTimezone as SchedulerTimezoneWC } from './scheduler-timezone/scheduler-timezone';
|
|
66
66
|
import type { Scheduler as SchedulerWC } from './scheduler/scheduler';
|
|
67
|
-
import type { SearchBarCombobox as SearchBarComboboxWC } from './search-bar/search-bar-combobox';
|
|
68
67
|
import type { SearchBar as SearchBarWC } from './search-bar/search-bar';
|
|
69
68
|
import type { SectionNavigator as SectionNavigatorWC } from './section-navigator/section-navigator';
|
|
70
69
|
import type { SegmentedControl as SegmentedControlWC } from './segmented-control/segmented-control';
|
|
@@ -685,16 +684,6 @@ export declare const SchedulerTimezone: React.ForwardRefExoticComponent<
|
|
|
685
684
|
>;
|
|
686
685
|
export type SchedulerTimezoneRef = SchedulerTimezoneWC;
|
|
687
686
|
|
|
688
|
-
export declare const SearchBarCombobox: React.ForwardRefExoticComponent<
|
|
689
|
-
React.PropsWithChildren<
|
|
690
|
-
Omit<PublicOf<SearchBarComboboxWC>, 'children' | 'style'> &
|
|
691
|
-
HTMLWCProps & {
|
|
692
|
-
onInputdeleted?: (event: CustomEvent<unknown>) => void;
|
|
693
|
-
}
|
|
694
|
-
> & React.RefAttributes<SearchBarComboboxWC>
|
|
695
|
-
>;
|
|
696
|
-
export type SearchBarComboboxRef = SearchBarComboboxWC;
|
|
697
|
-
|
|
698
687
|
export declare const SearchBar: React.ForwardRefExoticComponent<
|
|
699
688
|
React.PropsWithChildren<
|
|
700
689
|
Omit<PublicOf<SearchBarWC>, 'children' | 'style'> &
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Combobox } from '@microsoft/fast-components';
|
|
2
|
-
/**
|
|
3
|
-
* @tagname %%prefix%%-search-bar-combobox
|
|
4
|
-
*
|
|
5
|
-
* @fires change - Fired when the combobox value changes
|
|
6
|
-
* @fires inputdeleted - Fired when the input is cleared by the user
|
|
7
|
-
*/
|
|
8
2
|
export declare class SearchBarCombobox extends Combobox {
|
|
9
3
|
minlength: number;
|
|
4
|
+
/**
|
|
5
|
+
* When true, the user cannot type a new search term (e.g. all fields already have chips).
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
inputLocked: boolean;
|
|
10
9
|
private previousLength;
|
|
11
10
|
private changeListener;
|
|
12
11
|
connectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar-combobox.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar-combobox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"search-bar-combobox.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar-combobox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AA0BtD,qBAAa,iBAAkB,SAAQ,QAAQ;IACvC,SAAS,EAAE,MAAM,CAA0B;IAEjD;;;OAGG;IACS,WAAW,EAAE,OAAO,CAAC;IAEjC,OAAO,CAAC,cAAc,CAAc;IAEpC,OAAO,CAAC,cAAc,CAEpB;IAEF,iBAAiB;IAKjB,oBAAoB,IAAI,IAAI;IAK5B,YAAY,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,IAAI;IAiB7B,YAAY,CAAC,CAAC,EAAE,aAAa;IA0B7B,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,aAAa,GAAG,OAAO,GAAG,IAAI;IA6C/D,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,IAAI;IAkB3C,WAAW;CAWZ;AAED,eAAO,MAAM,wCAAwC,EAAE,cAGtD,CAAC;AAEF,eAAO,MAAM,8BAA8B,IAAK,CAAC;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,iUAMtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar-combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar-combobox.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AAGpC,eAAO,MAAM,iCAAiC,GAC5C,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,
|
|
1
|
+
{"version":3,"file":"search-bar-combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar-combobox.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AAGpC,eAAO,MAAM,iCAAiC,GAC5C,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,aAqCF,CAAC"}
|
|
@@ -17,12 +17,43 @@ export declare class SearchBar extends FoundationElement {
|
|
|
17
17
|
position: Position;
|
|
18
18
|
placeholder: string;
|
|
19
19
|
disabled: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @attr clear-button - when true, shows the end clear control when there are chips or typed text. When false, use {@link SearchBar.clear} or {@link SearchBar.clearSearch} to reset programmatically.
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
clearButton: boolean;
|
|
20
25
|
loading: boolean;
|
|
21
26
|
selectedOptions: SelectedOption[];
|
|
22
27
|
filteredOptions: AvailableOption[];
|
|
23
28
|
selectedOptionsDiv: HTMLDivElement;
|
|
29
|
+
/**
|
|
30
|
+
* Clears all search chips and the current input, and emits `selectionChange` with an empty array.
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
24
33
|
clear(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Alias for {@link SearchBar.clear}.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
25
38
|
clearSearch(): void;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
get showClearAffordance(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* True when every configured search field already has a chip (one term per field).
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
get allSearchFieldsUsed(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Evaluates whether an option is currently selectable.
|
|
50
|
+
* Falls back to default behavior when no custom `isEnabled` is provided.
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
isOptionEnabled(option: AvailableOption): boolean;
|
|
54
|
+
selectedOptionsChanged(): void;
|
|
55
|
+
optionsChanged(): void;
|
|
56
|
+
private applySearchInputLock;
|
|
26
57
|
inputdeleted(): void;
|
|
27
58
|
changeHandler(): void;
|
|
28
59
|
pasteHandler(event: ClipboardEvent): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EACL,eAAe,EACf,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,iBAAiB;IACvC,QAAQ,EAAE,iBAAiB,CAAC;IACvB,mBAAmB,MAAC;IAEpB,OAAO,EAAE,eAAe,EAAE,CAAC;IAE3B,UAAU,EAAE,MAAM,CAAM;IAE9B,UAAU,EAAE,MAAM,CAAa;IAC/B,SAAS,EAAE,MAAM,CAAoB;IACrC,QAAQ,EAAE,QAAQ,CAAkB;IAEpC,WAAW,EAAE,MAAM,CAA4B;IAC/C,QAAQ,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EACL,eAAe,EACf,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,iBAAiB;IACvC,QAAQ,EAAE,iBAAiB,CAAC;IACvB,mBAAmB,MAAC;IAEpB,OAAO,EAAE,eAAe,EAAE,CAAC;IAE3B,UAAU,EAAE,MAAM,CAAM;IAE9B,UAAU,EAAE,MAAM,CAAa;IAC/B,SAAS,EAAE,MAAM,CAAoB;IACrC,QAAQ,EAAE,QAAQ,CAAkB;IAEpC,WAAW,EAAE,MAAM,CAA4B;IAC/C,QAAQ,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACmD,WAAW,EAAE,OAAO,CAAQ;IAEtE,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,cAAc,EAAE,CAAM;IACvC,eAAe,EAAE,eAAe,EAAE,CAAC;IAExC,kBAAkB,EAAE,cAAc,CAAC;IAE1C;;;OAGG;IACI,KAAK;IAUZ;;;OAGG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAMjC;IAED;;;OAGG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAOjC;IAED;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO;IAUjD,sBAAsB;IAItB,cAAc;IAId,OAAO,CAAC,oBAAoB;IAarB,YAAY;IAMZ,aAAa;IAyCb,YAAY,CAAC,KAAK,EAAE,cAAc;IAkBlC,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAM7C,cAAc,CAAC,MAAM,EAAE,GAAG;IAKpB,YAAY;IAazB,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,kBAAkB,CAExB;IAEF,OAAO,CAAC,wBAAwB,CAQ9B;CACH;AAGD,eAAO,MAAM,gCAAgC,EAAE,cAA0B,CAAC;AAE1E,eAAO,MAAM,sBAAsB,IAAK,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;oBAM9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar.styles.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"search-bar.styles.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,iDA4ErC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar.template.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.template.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,eAAO,MAAM,SAAS,GAAI,aAAc,WAMvC,CAAC;AAEF,eAAO,MAAM,QAAQ,cAGd,CAAC;AAER,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"search-bar.template.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.template.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,eAAO,MAAM,SAAS,GAAI,aAAc,WAMvC,CAAC;AAEF,eAAO,MAAM,QAAQ,cAGd,CAAC;AAER,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,mEA8FlD,CAAC;AAEF,eAAO,MAAM,2BAA2B,gEAEvC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export type AvailableOption<T extends string = string> = {
|
|
|
15
15
|
label: (searchTerm: string) => string;
|
|
16
16
|
resourceType?: ResourceType;
|
|
17
17
|
createCriteria: CriteriaCreator;
|
|
18
|
-
isEnabled
|
|
18
|
+
isEnabled?: (searchTerm: string, selectedOptions: SelectedOption[], minLength?: number) => boolean;
|
|
19
19
|
};
|
|
20
20
|
export declare const getCriteriaBuilder: CriteriaCreator;
|
|
21
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar.types.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,KAAK,eAAe,GAAG,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAEpF,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IACtD,KAAK,EAAE,CAAC,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,EAAE,eAAe,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IACvD,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,EAAE,eAAe,CAAC;IAChC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"search-bar.types.d.ts","sourceRoot":"","sources":["../../../src/search-bar/search-bar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,KAAK,eAAe,GAAG,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAEpF,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IACtD,KAAK,EAAE,CAAC,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,EAAE,eAAe,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IACvD,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,EAAE,eAAe,CAAC;IAChC,SAAS,CAAC,EAAE,CACV,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,cAAc,EAAE,EACjC,SAAS,CAAC,EAAE,MAAM,KACf,OAAO,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eAUhC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Combobox } from '@microsoft/fast-components';
|
|
3
|
-
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { attr, observable } from '@microsoft/fast-element';
|
|
4
4
|
import { foundationSearchBarComboboxStyles } from './search-bar-combobox.styles';
|
|
5
5
|
import { foundationSearchBarComboboxTemplate } from './search-bar-combobox.template';
|
|
6
6
|
import { COMBO_INPUT_MIN_LENGTH } from './search-bar.types';
|
|
@@ -10,6 +10,18 @@ import { COMBO_INPUT_MIN_LENGTH } from './search-bar.types';
|
|
|
10
10
|
* @fires change - Fired when the combobox value changes
|
|
11
11
|
* @fires inputdeleted - Fired when the input is cleared by the user
|
|
12
12
|
*/
|
|
13
|
+
const INPUT_LOCK_ALLOWED_KEYS = new Set([
|
|
14
|
+
'Backspace',
|
|
15
|
+
'Delete',
|
|
16
|
+
'Tab',
|
|
17
|
+
'Escape',
|
|
18
|
+
'ArrowUp',
|
|
19
|
+
'ArrowDown',
|
|
20
|
+
'ArrowLeft',
|
|
21
|
+
'ArrowRight',
|
|
22
|
+
'Home',
|
|
23
|
+
'End',
|
|
24
|
+
]);
|
|
13
25
|
export class SearchBarCombobox extends Combobox {
|
|
14
26
|
constructor() {
|
|
15
27
|
super(...arguments);
|
|
@@ -70,6 +82,14 @@ export class SearchBarCombobox extends Combobox {
|
|
|
70
82
|
}
|
|
71
83
|
keydownHandler(e) {
|
|
72
84
|
const key = e.key;
|
|
85
|
+
if (this.inputLocked) {
|
|
86
|
+
const isModifier = e.ctrlKey || e.metaKey || e.altKey;
|
|
87
|
+
const isAllowed = INPUT_LOCK_ALLOWED_KEYS.has(key) || isModifier;
|
|
88
|
+
if (!isAllowed) {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
73
93
|
switch (key) {
|
|
74
94
|
case 'ArrowUp':
|
|
75
95
|
case 'ArrowDown': {
|
|
@@ -103,6 +123,13 @@ export class SearchBarCombobox extends Combobox {
|
|
|
103
123
|
}
|
|
104
124
|
}
|
|
105
125
|
inputHandler(e) {
|
|
126
|
+
if (this.inputLocked) {
|
|
127
|
+
this.control.value = '';
|
|
128
|
+
this.value = '';
|
|
129
|
+
this.open = false;
|
|
130
|
+
e.stopImmediatePropagation();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
106
133
|
if (this.control.value.length >= this.minlength) {
|
|
107
134
|
this.open = true;
|
|
108
135
|
}
|
|
@@ -128,6 +155,9 @@ export class SearchBarCombobox extends Combobox {
|
|
|
128
155
|
__decorate([
|
|
129
156
|
attr
|
|
130
157
|
], SearchBarCombobox.prototype, "minlength", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
observable
|
|
160
|
+
], SearchBarCombobox.prototype, "inputLocked", void 0);
|
|
131
161
|
export const foundationSearchBarComboboxShadowOptions = {
|
|
132
162
|
delegatesFocus: true,
|
|
133
163
|
mode: 'open',
|
|
@@ -23,4 +23,19 @@ export const foundationSearchBarComboboxStyles = (context, definition) => css `
|
|
|
23
23
|
min-width: 150px;
|
|
24
24
|
max-width: 169px;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
.input-locked .control,
|
|
28
|
+
:host(.input-locked) .control {
|
|
29
|
+
width: 0;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
flex: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.input-locked .selected-value,
|
|
38
|
+
:host(.input-locked) .selected-value {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
26
41
|
`;
|
|
@@ -4,7 +4,7 @@ export const foundationSearchBarComboboxTemplate = (context, definition) => html
|
|
|
4
4
|
<template
|
|
5
5
|
aria-disabled="${(x) => x.ariaDisabled}"
|
|
6
6
|
autocomplete="${(x) => x.autocomplete}"
|
|
7
|
-
class="${(x) => (x.open ? 'open' : '')} ${(x) => (x.disabled ? 'disabled' : '')} ${(x) => x.position} body"
|
|
7
|
+
class="${(x) => (x.open ? 'open' : '')} ${(x) => (x.disabled ? 'disabled' : '')} ${(x) => x.position} ${(x) => (x.inputLocked ? 'input-locked' : '')} body"
|
|
8
8
|
?open="${(x) => x.open}"
|
|
9
9
|
tabindex="${(x) => (!x.disabled ? '0' : null)}"
|
|
10
10
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
@@ -18,6 +18,11 @@ export class SearchBar extends FoundationElement {
|
|
|
18
18
|
this.minlength = INPUT_MIN_LENGTH;
|
|
19
19
|
this.position = Position.BELOW;
|
|
20
20
|
this.placeholder = 'Start typing to search';
|
|
21
|
+
/**
|
|
22
|
+
* @attr clear-button - when true, shows the end clear control when there are chips or typed text. When false, use {@link SearchBar.clear} or {@link SearchBar.clearSearch} to reset programmatically.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
this.clearButton = true;
|
|
21
26
|
this.selectedOptions = [];
|
|
22
27
|
this.normalizeDelimiter = (inputString) => {
|
|
23
28
|
return inputString.trim().replace(/\t|\r\n|\n|\r|,/g, ' ');
|
|
@@ -28,14 +33,78 @@ export class SearchBar extends FoundationElement {
|
|
|
28
33
|
: previousText.concat(newText);
|
|
29
34
|
};
|
|
30
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Clears all search chips and the current input, and emits `selectionChange` with an empty array.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
31
40
|
clear() {
|
|
32
41
|
this.selectedOptions = [];
|
|
33
|
-
this.
|
|
42
|
+
this.searchTerm = '';
|
|
43
|
+
if (this.combobox) {
|
|
44
|
+
this.combobox.currentValue = '';
|
|
45
|
+
this.combobox.value = '';
|
|
46
|
+
}
|
|
34
47
|
this.$emit('selectionChange', []);
|
|
35
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Alias for {@link SearchBar.clear}.
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
36
53
|
clearSearch() {
|
|
37
54
|
this.clear();
|
|
38
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
get showClearAffordance() {
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
if (!this.clearButton) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
const typed = ((_c = (_a = this.searchTerm) !== null && _a !== void 0 ? _a : (_b = this.combobox) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : '').trim();
|
|
65
|
+
return this.selectedOptions.length > 0 || typed.length > 0;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* True when every configured search field already has a chip (one term per field).
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
get allSearchFieldsUsed() {
|
|
72
|
+
var _a;
|
|
73
|
+
if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return this.options.every((option) => this.selectedOptions.some((selected) => selected.field === option.field));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Evaluates whether an option is currently selectable.
|
|
80
|
+
* Falls back to default behavior when no custom `isEnabled` is provided.
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
isOptionEnabled(option) {
|
|
84
|
+
if (option.isEnabled) {
|
|
85
|
+
return option.isEnabled(this.searchTerm, this.selectedOptions, this.minlength);
|
|
86
|
+
}
|
|
87
|
+
return (this.searchTerm.length >= this.minlength &&
|
|
88
|
+
!this.selectedOptions.some((selected) => selected.field === option.field));
|
|
89
|
+
}
|
|
90
|
+
selectedOptionsChanged() {
|
|
91
|
+
this.applySearchInputLock();
|
|
92
|
+
}
|
|
93
|
+
optionsChanged() {
|
|
94
|
+
this.applySearchInputLock();
|
|
95
|
+
}
|
|
96
|
+
applySearchInputLock() {
|
|
97
|
+
if (!this.combobox) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (this.allSearchFieldsUsed) {
|
|
101
|
+
this.searchTerm = '';
|
|
102
|
+
this.combobox.value = '';
|
|
103
|
+
this.combobox.currentValue = '';
|
|
104
|
+
this.combobox.open = false;
|
|
105
|
+
this.filteredOptions = [];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
39
108
|
inputdeleted() {
|
|
40
109
|
if (this.selectedOptions.length > 0) {
|
|
41
110
|
this.unselectOption(this.selectedOptions[this.selectedOptions.length - 1]);
|
|
@@ -70,6 +139,10 @@ export class SearchBar extends FoundationElement {
|
|
|
70
139
|
}
|
|
71
140
|
pasteHandler(event) {
|
|
72
141
|
var _a;
|
|
142
|
+
if (this.allSearchFieldsUsed) {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
73
146
|
this.loading = true;
|
|
74
147
|
const pastedText = event.clipboardData.getData('text/plain');
|
|
75
148
|
const formattedText = this.normalizeDelimiter(pastedText);
|
|
@@ -93,6 +166,10 @@ export class SearchBar extends FoundationElement {
|
|
|
93
166
|
}
|
|
94
167
|
inputHandler() {
|
|
95
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
if (this.allSearchFieldsUsed) {
|
|
170
|
+
this.applySearchInputLock();
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
96
173
|
this.loading = true;
|
|
97
174
|
this.searchTerm = this.combobox.value;
|
|
98
175
|
if (this.combobox.value.length >= this.minlength) {
|
|
@@ -129,6 +206,9 @@ __decorate([
|
|
|
129
206
|
__decorate([
|
|
130
207
|
attr
|
|
131
208
|
], SearchBar.prototype, "disabled", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
attr({ attribute: 'clear-button', mode: 'boolean' })
|
|
211
|
+
], SearchBar.prototype, "clearButton", void 0);
|
|
132
212
|
__decorate([
|
|
133
213
|
observable
|
|
134
214
|
], SearchBar.prototype, "loading", void 0);
|
|
@@ -73,23 +73,6 @@ export const foundationSearchBarStyles = css `
|
|
|
73
73
|
justify-content: center;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.tooltip {
|
|
77
|
-
position: absolute;
|
|
78
|
-
z-index: 999;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.tooltip::part(tooltip) {
|
|
82
|
-
background-color: rgb(18 18 18 / 100%);
|
|
83
|
-
border: 1px solid #2e3339;
|
|
84
|
-
display: flex;
|
|
85
|
-
justify-content: center;
|
|
86
|
-
align-items: center;
|
|
87
|
-
box-shadow: 0 4px 10px rgb(0 0 0 / 25%);
|
|
88
|
-
font-size: 10px;
|
|
89
|
-
color: #f1f1f1;
|
|
90
|
-
height: 26px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
76
|
.close-icon {
|
|
94
77
|
color: var(--accent-fill-rest);
|
|
95
78
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, ref, repeat, slotted } from '@microsoft/fast-element';
|
|
1
|
+
import { html, ref, repeat, slotted, when } from '@microsoft/fast-element';
|
|
2
2
|
import { whitespaceFilter } from '@microsoft/fast-foundation';
|
|
3
3
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
4
4
|
import { getPrefix } from '../utils';
|
|
@@ -30,6 +30,7 @@ export const getPrefixedSearchBar = (prefix) => html `
|
|
|
30
30
|
position="${(x) => x.position}"
|
|
31
31
|
placeholder=${(x) => x.placeholder}
|
|
32
32
|
disabled=${(x) => x.disabled}
|
|
33
|
+
:inputLocked="${(x) => x.allSearchFieldsUsed}"
|
|
33
34
|
autocomplete="none"
|
|
34
35
|
minlength=${(x) => x.minlength}
|
|
35
36
|
@inputdeleted=${(x) => x.inputdeleted()}
|
|
@@ -64,37 +65,37 @@ export const getPrefixedSearchBar = (prefix) => html `
|
|
|
64
65
|
${repeat((x) => x.filteredOptions, html `
|
|
65
66
|
<${prefix}-option
|
|
66
67
|
value="${(x) => x.field}"
|
|
67
|
-
:disabled=${(x, ctx) => !
|
|
68
|
+
:disabled=${(x, ctx) => !ctx.parent.isOptionEnabled(x)}
|
|
68
69
|
>
|
|
69
70
|
${(x, ctx) => x.label(ctx.parent.searchTerm)}
|
|
70
71
|
</${prefix}-option>
|
|
71
72
|
`)}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<svg
|
|
81
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
82
|
-
fill="currentColor"
|
|
83
|
-
width="26px"
|
|
84
|
-
height="26px"
|
|
85
|
-
class="bi bi-plus"
|
|
86
|
-
viewBox="0 0 16 16"
|
|
73
|
+
${when((x) => x.showClearAffordance, html `
|
|
74
|
+
<${prefix}-button
|
|
75
|
+
class="search-clear-button"
|
|
76
|
+
@click=${(x) => x.clearSearch()}
|
|
77
|
+
slot="end"
|
|
78
|
+
data-test-id="clear-search"
|
|
79
|
+
aria-label="Clear search terms"
|
|
80
|
+
title="Clear search terms"
|
|
87
81
|
>
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
<div class="svg-container">
|
|
83
|
+
<svg
|
|
84
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
85
|
+
fill="currentColor"
|
|
86
|
+
width="26px"
|
|
87
|
+
height="26px"
|
|
88
|
+
class="bi bi-plus"
|
|
89
|
+
viewBox="0 0 16 16"
|
|
90
|
+
>
|
|
91
|
+
<path
|
|
92
|
+
d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"
|
|
93
|
+
/>
|
|
94
|
+
</svg>
|
|
95
|
+
</div>
|
|
96
|
+
</${prefix}-button>
|
|
97
|
+
`)}
|
|
94
98
|
</${prefix}-search-bar-combobox>
|
|
95
|
-
<${prefix}-tooltip class="tooltip" anchor="search-clear-button">
|
|
96
|
-
Clear Search Terms
|
|
97
|
-
</${prefix}-tooltip>
|
|
98
99
|
`;
|
|
99
100
|
export const foundationSearchBarTemplate = html `
|
|
100
101
|
${(x) => getPrefixedSearchBar(getPrefix(x))}
|
package/dist/react.cjs
CHANGED
|
@@ -66,7 +66,6 @@ const { Radio: RadioWC } = require('./esm/radio/radio.js');
|
|
|
66
66
|
const { SchedulerCronBuilder: SchedulerCronBuilderWC } = require('./esm/scheduler-cron-builder/scheduler-cron-builder.js');
|
|
67
67
|
const { SchedulerTimezone: SchedulerTimezoneWC } = require('./esm/scheduler-timezone/scheduler-timezone.js');
|
|
68
68
|
const { Scheduler: SchedulerWC } = require('./esm/scheduler/scheduler.js');
|
|
69
|
-
const { SearchBarCombobox: SearchBarComboboxWC } = require('./esm/search-bar/search-bar-combobox.js');
|
|
70
69
|
const { SearchBar: SearchBarWC } = require('./esm/search-bar/search-bar.js');
|
|
71
70
|
const { SectionNavigator: SectionNavigatorWC } = require('./esm/section-navigator/section-navigator.js');
|
|
72
71
|
const { SegmentedControl: SegmentedControlWC } = require('./esm/segmented-control/segmented-control.js');
|
|
@@ -632,23 +631,6 @@ const SchedulerTimezone = React.forwardRef(function SchedulerTimezone(props, ref
|
|
|
632
631
|
return React.createElement(customElements.getName(SchedulerTimezoneWC) ?? '%%prefix%%-scheduler-timezone', { ...rest, ref }, children);
|
|
633
632
|
});
|
|
634
633
|
|
|
635
|
-
const SearchBarCombobox = React.forwardRef(function SearchBarCombobox(props, ref) {
|
|
636
|
-
const { onInputdeleted, children, ...rest } = props;
|
|
637
|
-
const _innerRef = React.useRef(null);
|
|
638
|
-
const _onInputdeletedRef = React.useRef(onInputdeleted);
|
|
639
|
-
_onInputdeletedRef.current = onInputdeleted;
|
|
640
|
-
React.useLayoutEffect(() => {
|
|
641
|
-
const el = _innerRef.current;
|
|
642
|
-
if (!el) return;
|
|
643
|
-
const _onInputdeletedFn = (e) => _onInputdeletedRef.current?.(e);
|
|
644
|
-
el.addEventListener('inputdeleted', _onInputdeletedFn);
|
|
645
|
-
return () => {
|
|
646
|
-
el.removeEventListener('inputdeleted', _onInputdeletedFn);
|
|
647
|
-
};
|
|
648
|
-
}, []);
|
|
649
|
-
return React.createElement(customElements.getName(SearchBarComboboxWC) ?? '%%prefix%%-search-bar-combobox', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
650
|
-
});
|
|
651
|
-
|
|
652
634
|
const SearchBar = React.forwardRef(function SearchBar(props, ref) {
|
|
653
635
|
const { onSelectionChange, children, ...rest } = props;
|
|
654
636
|
const _innerRef = React.useRef(null);
|
|
@@ -937,7 +919,6 @@ module.exports = {
|
|
|
937
919
|
Scheduler,
|
|
938
920
|
SchedulerCronBuilder,
|
|
939
921
|
SchedulerTimezone,
|
|
940
|
-
SearchBarCombobox,
|
|
941
922
|
SearchBar,
|
|
942
923
|
SectionNavigator,
|
|
943
924
|
SegmentedControl,
|
package/dist/react.mjs
CHANGED
|
@@ -64,7 +64,6 @@ import { Radio as RadioWC } from './esm/radio/radio.js';
|
|
|
64
64
|
import { SchedulerCronBuilder as SchedulerCronBuilderWC } from './esm/scheduler-cron-builder/scheduler-cron-builder.js';
|
|
65
65
|
import { SchedulerTimezone as SchedulerTimezoneWC } from './esm/scheduler-timezone/scheduler-timezone.js';
|
|
66
66
|
import { Scheduler as SchedulerWC } from './esm/scheduler/scheduler.js';
|
|
67
|
-
import { SearchBarCombobox as SearchBarComboboxWC } from './esm/search-bar/search-bar-combobox.js';
|
|
68
67
|
import { SearchBar as SearchBarWC } from './esm/search-bar/search-bar.js';
|
|
69
68
|
import { SectionNavigator as SectionNavigatorWC } from './esm/section-navigator/section-navigator.js';
|
|
70
69
|
import { SegmentedControl as SegmentedControlWC } from './esm/segmented-control/segmented-control.js';
|
|
@@ -630,23 +629,6 @@ export const SchedulerTimezone = React.forwardRef(function SchedulerTimezone(pro
|
|
|
630
629
|
return React.createElement(customElements.getName(SchedulerTimezoneWC) ?? '%%prefix%%-scheduler-timezone', { ...rest, ref }, children);
|
|
631
630
|
});
|
|
632
631
|
|
|
633
|
-
export const SearchBarCombobox = React.forwardRef(function SearchBarCombobox(props, ref) {
|
|
634
|
-
const { onInputdeleted, children, ...rest } = props;
|
|
635
|
-
const _innerRef = React.useRef(null);
|
|
636
|
-
const _onInputdeletedRef = React.useRef(onInputdeleted);
|
|
637
|
-
_onInputdeletedRef.current = onInputdeleted;
|
|
638
|
-
React.useLayoutEffect(() => {
|
|
639
|
-
const el = _innerRef.current;
|
|
640
|
-
if (!el) return;
|
|
641
|
-
const _onInputdeletedFn = (e) => _onInputdeletedRef.current?.(e);
|
|
642
|
-
el.addEventListener('inputdeleted', _onInputdeletedFn);
|
|
643
|
-
return () => {
|
|
644
|
-
el.removeEventListener('inputdeleted', _onInputdeletedFn);
|
|
645
|
-
};
|
|
646
|
-
}, []);
|
|
647
|
-
return React.createElement(customElements.getName(SearchBarComboboxWC) ?? '%%prefix%%-search-bar-combobox', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
648
|
-
});
|
|
649
|
-
|
|
650
632
|
export const SearchBar = React.forwardRef(function SearchBar(props, ref) {
|
|
651
633
|
const { onSelectionChange, children, ...rest } = props;
|
|
652
634
|
const _innerRef = React.useRef(null);
|
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.447.
|
|
4
|
+
"version": "14.447.1-canary.search-bar-4",
|
|
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.447.
|
|
89
|
-
"@genesislcap/genx": "14.447.
|
|
90
|
-
"@genesislcap/rollup-builder": "14.447.
|
|
91
|
-
"@genesislcap/ts-builder": "14.447.
|
|
92
|
-
"@genesislcap/uvu-playwright-builder": "14.447.
|
|
93
|
-
"@genesislcap/vite-builder": "14.447.
|
|
94
|
-
"@genesislcap/webpack-builder": "14.447.
|
|
88
|
+
"@genesislcap/foundation-testing": "14.447.1-canary.search-bar-4",
|
|
89
|
+
"@genesislcap/genx": "14.447.1-canary.search-bar-4",
|
|
90
|
+
"@genesislcap/rollup-builder": "14.447.1-canary.search-bar-4",
|
|
91
|
+
"@genesislcap/ts-builder": "14.447.1-canary.search-bar-4",
|
|
92
|
+
"@genesislcap/uvu-playwright-builder": "14.447.1-canary.search-bar-4",
|
|
93
|
+
"@genesislcap/vite-builder": "14.447.1-canary.search-bar-4",
|
|
94
|
+
"@genesislcap/webpack-builder": "14.447.1-canary.search-bar-4",
|
|
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.447.
|
|
104
|
-
"@genesislcap/foundation-ai": "14.447.
|
|
105
|
-
"@genesislcap/foundation-comms": "14.447.
|
|
106
|
-
"@genesislcap/foundation-criteria": "14.447.
|
|
107
|
-
"@genesislcap/foundation-errors": "14.447.
|
|
108
|
-
"@genesislcap/foundation-events": "14.447.
|
|
109
|
-
"@genesislcap/foundation-logger": "14.447.
|
|
110
|
-
"@genesislcap/foundation-notifications": "14.447.
|
|
111
|
-
"@genesislcap/foundation-user": "14.447.
|
|
112
|
-
"@genesislcap/foundation-utils": "14.447.
|
|
103
|
+
"@genesislcap/expression-builder": "14.447.1-canary.search-bar-4",
|
|
104
|
+
"@genesislcap/foundation-ai": "14.447.1-canary.search-bar-4",
|
|
105
|
+
"@genesislcap/foundation-comms": "14.447.1-canary.search-bar-4",
|
|
106
|
+
"@genesislcap/foundation-criteria": "14.447.1-canary.search-bar-4",
|
|
107
|
+
"@genesislcap/foundation-errors": "14.447.1-canary.search-bar-4",
|
|
108
|
+
"@genesislcap/foundation-events": "14.447.1-canary.search-bar-4",
|
|
109
|
+
"@genesislcap/foundation-logger": "14.447.1-canary.search-bar-4",
|
|
110
|
+
"@genesislcap/foundation-notifications": "14.447.1-canary.search-bar-4",
|
|
111
|
+
"@genesislcap/foundation-user": "14.447.1-canary.search-bar-4",
|
|
112
|
+
"@genesislcap/foundation-utils": "14.447.1-canary.search-bar-4",
|
|
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": "dd207beff03c73a4aaadcae5f836b5cef9df6d2a"
|
|
146
146
|
}
|