@vertexvis/ui 0.1.0-testing.3 → 0.1.0-testing.5
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/cjs/badge-d39ac1fc.js +23 -0
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{icon-53d62a46.js → icon-460fd0f5.js} +1 -1
- package/dist/cjs/icon-button-786427d6.js +43 -0
- package/dist/cjs/{icon-helper-caf2699e.js → icon-helper-ba408f49.js} +7 -0
- package/dist/cjs/index.cjs.js +11 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{popover-d9ec8e10.js → popover-942209b8.js} +23 -1
- package/dist/cjs/{result-list-1e592c3c.js → result-list-241ffe8d.js} +46 -2
- package/dist/cjs/search-bar-a321b3e1.js +353 -0
- package/dist/cjs/{select-0eb7203f.js → select-5f8aecfe.js} +27 -4
- package/dist/cjs/{text-field-0397fb34.js → text-field-bccbde1f.js} +1 -0
- package/dist/cjs/{tooltip-31b596f5.js → tooltip-e9f63631.js} +58 -19
- package/dist/cjs/vertex-badge.cjs.entry.js +11 -0
- package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
- package/dist/cjs/vertex-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-result-list.cjs.entry.js +1 -1
- package/dist/cjs/vertex-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/vertex-select.cjs.entry.js +1 -1
- package/dist/cjs/vertex-textfield.cjs.entry.js +1 -1
- package/dist/cjs/vertex-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/badge/badge.css +18 -0
- package/dist/collection/components/badge/badge.js +69 -0
- package/dist/collection/components/icon/icon-helper.js +3 -0
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icons/comment-filled.js +2 -0
- package/dist/collection/components/icon-button/icon-button.css +16 -1
- package/dist/collection/components/icon-button/icon-button.js +2 -2
- package/dist/collection/components/index.js +1 -0
- package/dist/collection/components/menu/menu.js +1 -1
- package/dist/collection/components/popover/popover.js +51 -0
- package/dist/collection/components/result-list/result-list.js +47 -3
- package/dist/collection/components/search-bar/dom.js +12 -0
- package/dist/collection/components/search-bar/lib.js +23 -15
- package/dist/collection/components/search-bar/search-bar.css +2 -29
- package/dist/collection/components/search-bar/search-bar.js +352 -326
- package/dist/collection/components/select/select.css +16 -0
- package/dist/collection/components/select/select.js +49 -2
- package/dist/collection/components/text-field/text-field.js +1 -0
- package/dist/collection/components/tooltip/tooltip.css +2 -0
- package/dist/collection/components/tooltip/tooltip.js +62 -18
- package/dist/collection/types/icon.js +1 -0
- package/dist/collection/util/templates/element-pool.js +19 -1
- package/dist/components/components.css +1 -1
- package/dist/components/components.esm.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/p-03dbb28c.js +1 -0
- package/dist/components/p-0b1cdc8a.entry.js +1 -0
- package/dist/components/p-0b4406fa.entry.js +1 -0
- package/dist/components/p-103249b4.js +1 -0
- package/dist/components/p-29d7697f.js +1 -0
- package/dist/components/p-406e73da.entry.js +1 -0
- package/dist/components/p-43b1b3f9.js +1 -0
- package/dist/components/p-606596de.entry.js +1 -0
- package/dist/components/p-6b862967.js +1 -0
- package/dist/components/p-7cfb3736.entry.js +1 -0
- package/dist/components/p-7dba2574.entry.js +1 -0
- package/dist/components/p-912f6e24.js +1 -0
- package/dist/components/p-92930f2a.js +1 -0
- package/dist/components/p-c2706288.js +1 -0
- package/dist/components/p-c4518377.entry.js +1 -0
- package/dist/components/{p-17b97932.js → p-ca52a423.js} +1 -1
- package/dist/components/p-ee496965.entry.js +1 -0
- package/dist/components/p-f064f911.js +1 -0
- package/dist/components/p-f71fc166.entry.js +1 -0
- package/dist/esm/badge-6d27ca92.js +21 -0
- package/dist/esm/components.js +1 -1
- package/dist/esm/icon-button-aad3c0e7.js +41 -0
- package/dist/esm/{icon-2630793d.js → icon-d37150b4.js} +1 -1
- package/dist/esm/{icon-helper-10a99d95.js → icon-helper-83f10f73.js} +7 -0
- package/dist/esm/index.js +10 -9
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{popover-67c88e4b.js → popover-6e806354.js} +23 -1
- package/dist/esm/{result-list-36cfb08a.js → result-list-16c6afbd.js} +46 -2
- package/dist/esm/search-bar-6fad2f2e.js +351 -0
- package/dist/esm/{select-75ed5653.js → select-d4e135b7.js} +27 -4
- package/dist/esm/{text-field-e542da25.js → text-field-32ac877e.js} +1 -0
- package/dist/esm/{tooltip-14b65fb5.js → tooltip-933da261.js} +58 -19
- package/dist/esm/vertex-badge.entry.js +3 -0
- package/dist/esm/vertex-icon-button.entry.js +2 -2
- package/dist/esm/vertex-icon.entry.js +2 -2
- package/dist/esm/vertex-popover.entry.js +1 -1
- package/dist/esm/vertex-result-list.entry.js +1 -1
- package/dist/esm/vertex-search-bar.entry.js +1 -1
- package/dist/esm/vertex-select.entry.js +1 -1
- package/dist/esm/vertex-textfield.entry.js +1 -1
- package/dist/esm/vertex-tooltip.entry.js +1 -1
- package/dist/types/components/badge/badge.d.ts +14 -0
- package/dist/types/components/icon/icons/comment-filled.d.ts +3 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts +7 -0
- package/dist/types/components/result-list/result-list.d.ts +9 -1
- package/dist/types/components/search-bar/dom.d.ts +3 -0
- package/dist/types/components/search-bar/lib.d.ts +12 -6
- package/dist/types/components/search-bar/search-bar.d.ts +98 -41
- package/dist/types/components/select/select.d.ts +8 -0
- package/dist/types/components/tooltip/tooltip.d.ts +7 -0
- package/dist/types/components.d.ts +111 -16
- package/dist/types/types/icon.d.ts +1 -0
- package/dist/types/util/templates/element-pool.d.ts +10 -1
- package/package.json +2 -2
- package/dist/cjs/icon-button-f868bf06.js +0 -43
- package/dist/cjs/search-bar-bb40cfa7.js +0 -290
- package/dist/components/p-19318fee.entry.js +0 -1
- package/dist/components/p-209db2ba.entry.js +0 -1
- package/dist/components/p-4224c2ad.js +0 -1
- package/dist/components/p-45cfd66e.entry.js +0 -1
- package/dist/components/p-52739247.js +0 -1
- package/dist/components/p-552c128f.js +0 -1
- package/dist/components/p-6505cdb3.js +0 -1
- package/dist/components/p-79fd6fb6.entry.js +0 -1
- package/dist/components/p-94168b92.js +0 -1
- package/dist/components/p-ae6a3c46.entry.js +0 -1
- package/dist/components/p-bd11e7d1.js +0 -1
- package/dist/components/p-da0a7b57.js +0 -1
- package/dist/components/p-e576818b.entry.js +0 -1
- package/dist/components/p-ebabee40.entry.js +0 -1
- package/dist/components/p-ee8b96b2.js +0 -1
- package/dist/components/p-f900d0f4.entry.js +0 -1
- package/dist/esm/icon-button-25edf617.js +0 -41
- package/dist/esm/search-bar-59cc151d.js +0 -288
|
@@ -2054,12 +2054,13 @@ function getBoundingClientRect(el) {
|
|
|
2054
2054
|
return el.getBoundingClientRect();
|
|
2055
2055
|
}
|
|
2056
2056
|
|
|
2057
|
-
const tooltipCss = ":host{--tooltip-width:auto;--tooltip-white-space:normal;display:flex}.popover{width:100%;height:100%}.target{display:flex}.content-hidden{display:none}.tooltip{display:flex;justify-content:center;text-align:center;width:var(--tooltip-width);font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-xxs);background-color:var(--vertex-ui-neutral-700);color:var(--vertex-ui-white);padding:0.25rem 0.5rem;border-radius:4px;pointer-events:none;white-space:var(--tooltip-white-space);user-select:none}.tooltip.hidden{display:none}";
|
|
2057
|
+
const tooltipCss = ":host{--tooltip-width:auto;--tooltip-white-space:normal;display:flex}.popover{width:100%;height:100%}.target{display:flex;width:100%;height:100%}.content-hidden{display:none}.tooltip{display:flex;justify-content:center;text-align:center;width:var(--tooltip-width);font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-xxs);background-color:var(--vertex-ui-neutral-700);color:var(--vertex-ui-white);padding:0.25rem 0.5rem;border-radius:4px;pointer-events:none;white-space:var(--tooltip-white-space);user-select:none}.tooltip.hidden{display:none}";
|
|
2058
2058
|
|
|
2059
2059
|
const TOOLTIP_OPEN_DELAY = 500;
|
|
2060
2060
|
const Tooltip = class {
|
|
2061
2061
|
constructor(hostRef) {
|
|
2062
2062
|
registerInstance(this, hostRef);
|
|
2063
|
+
this.pointerEntered = false;
|
|
2063
2064
|
this.content = undefined;
|
|
2064
2065
|
this.disabled = undefined;
|
|
2065
2066
|
this.placement = 'bottom';
|
|
@@ -2068,32 +2069,40 @@ const Tooltip = class {
|
|
|
2068
2069
|
this.open = false;
|
|
2069
2070
|
this.handlePointerEnter = this.handlePointerEnter.bind(this);
|
|
2070
2071
|
this.handlePointerLeave = this.handlePointerLeave.bind(this);
|
|
2072
|
+
this.handleContentChange = this.handleContentChange.bind(this);
|
|
2073
|
+
this.handleDisabledChange = this.handleDisabledChange.bind(this);
|
|
2071
2074
|
this.tooltipId = `vertex-tooltip-${uuid.create()}`;
|
|
2072
2075
|
}
|
|
2073
2076
|
disconnectedCallback() {
|
|
2074
2077
|
this.removeElement();
|
|
2075
2078
|
this.clearOpenTimeout();
|
|
2079
|
+
this.pointerEntered = false;
|
|
2080
|
+
}
|
|
2081
|
+
handleContentChange() {
|
|
2082
|
+
if (this.internalContentElement != null) {
|
|
2083
|
+
this.updateContentElementChildren(this.internalContentElement);
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
handleDisabledChange() {
|
|
2087
|
+
if (this.internalContentElement != null) {
|
|
2088
|
+
this.updateContentElementClass(this.internalContentElement);
|
|
2089
|
+
}
|
|
2090
|
+
if (!this.disabled && this.pointerEntered) {
|
|
2091
|
+
this.handlePointerEnter();
|
|
2092
|
+
}
|
|
2076
2093
|
}
|
|
2077
2094
|
render() {
|
|
2078
2095
|
return (h(Host, null, h("div", { class: "target", ref: (el) => {
|
|
2079
2096
|
this.targetElement = el;
|
|
2080
2097
|
}, onPointerEnter: this.handlePointerEnter, onPointerLeave: this.handlePointerLeave }, h("slot", null)), h("div", { class: "content-hidden", ref: (el) => {
|
|
2081
2098
|
this.contentElement = el;
|
|
2082
|
-
} }, h("slot", { name: "content" }))));
|
|
2099
|
+
} }, h("slot", { name: "content", onSlotchange: this.handleContentChange }))));
|
|
2083
2100
|
}
|
|
2084
2101
|
addElement() {
|
|
2085
|
-
var _a;
|
|
2086
2102
|
if (this.targetElement != null) {
|
|
2087
2103
|
const popover = this.createPopoverElement(this.targetElement);
|
|
2088
2104
|
const content = this.createContentElement();
|
|
2089
|
-
this.
|
|
2090
|
-
(_a = getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
|
|
2091
|
-
if (this.content != null) {
|
|
2092
|
-
content.innerText = this.content;
|
|
2093
|
-
}
|
|
2094
|
-
else if (this.displayedSlottedContent != null) {
|
|
2095
|
-
content.appendChild(this.displayedSlottedContent);
|
|
2096
|
-
}
|
|
2105
|
+
this.updateContentElementChildren(content);
|
|
2097
2106
|
popover.appendChild(content);
|
|
2098
2107
|
this.hostElement.ownerDocument.body.appendChild(popover);
|
|
2099
2108
|
}
|
|
@@ -2103,6 +2112,7 @@ const Tooltip = class {
|
|
|
2103
2112
|
if (popover != null) {
|
|
2104
2113
|
popover.remove();
|
|
2105
2114
|
}
|
|
2115
|
+
this.internalContentElement = undefined;
|
|
2106
2116
|
}
|
|
2107
2117
|
createPopoverElement(anchorElement) {
|
|
2108
2118
|
const popover = this.hostElement.ownerDocument.createElement('vertex-popover');
|
|
@@ -2117,25 +2127,50 @@ const Tooltip = class {
|
|
|
2117
2127
|
return popover;
|
|
2118
2128
|
}
|
|
2119
2129
|
createContentElement() {
|
|
2120
|
-
|
|
2121
|
-
|
|
2130
|
+
this.internalContentElement =
|
|
2131
|
+
this.hostElement.ownerDocument.createElement('div');
|
|
2132
|
+
this.internalContentElement.setAttribute('class', classnames('vertex-tooltip-content', {
|
|
2133
|
+
hidden: !this.open || this.disabled,
|
|
2134
|
+
}));
|
|
2135
|
+
return this.internalContentElement;
|
|
2136
|
+
}
|
|
2137
|
+
updateContentElementClass(element) {
|
|
2138
|
+
element.setAttribute('class', classnames('vertex-tooltip-content', {
|
|
2122
2139
|
hidden: !this.open || this.disabled,
|
|
2123
2140
|
}));
|
|
2124
|
-
|
|
2141
|
+
}
|
|
2142
|
+
updateContentElementChildren(element) {
|
|
2143
|
+
var _a;
|
|
2144
|
+
this.displayedSlottedContent =
|
|
2145
|
+
(_a = getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
|
|
2146
|
+
if (this.content != null) {
|
|
2147
|
+
element.innerText = this.content;
|
|
2148
|
+
}
|
|
2149
|
+
else if (this.displayedSlottedContent != null) {
|
|
2150
|
+
element.appendChild(this.displayedSlottedContent);
|
|
2151
|
+
}
|
|
2125
2152
|
}
|
|
2126
2153
|
handlePointerEnter() {
|
|
2127
2154
|
if (this.openTimeout == null && !this.disabled) {
|
|
2128
|
-
this.
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
}, this.delay);
|
|
2155
|
+
this.createOpenTimeout();
|
|
2156
|
+
}
|
|
2157
|
+
else if (this.openTimeout == null) {
|
|
2158
|
+
this.pointerEntered = true;
|
|
2133
2159
|
}
|
|
2134
2160
|
}
|
|
2135
2161
|
handlePointerLeave() {
|
|
2136
2162
|
this.clearOpenTimeout();
|
|
2137
2163
|
this.removeElement();
|
|
2138
2164
|
this.open = false;
|
|
2165
|
+
this.pointerEntered = false;
|
|
2166
|
+
}
|
|
2167
|
+
createOpenTimeout() {
|
|
2168
|
+
this.openTimeout = setTimeout(() => {
|
|
2169
|
+
this.open = true;
|
|
2170
|
+
this.openTimeout = undefined;
|
|
2171
|
+
this.addElement();
|
|
2172
|
+
}, this.delay);
|
|
2173
|
+
this.pointerEntered = false;
|
|
2139
2174
|
}
|
|
2140
2175
|
clearOpenTimeout() {
|
|
2141
2176
|
if (this.openTimeout != null) {
|
|
@@ -2144,6 +2179,10 @@ const Tooltip = class {
|
|
|
2144
2179
|
}
|
|
2145
2180
|
}
|
|
2146
2181
|
get hostElement() { return getElement(this); }
|
|
2182
|
+
static get watchers() { return {
|
|
2183
|
+
"content": ["handleContentChange"],
|
|
2184
|
+
"disabled": ["handleDisabledChange"]
|
|
2185
|
+
}; }
|
|
2147
2186
|
};
|
|
2148
2187
|
Tooltip.style = tooltipCss;
|
|
2149
2188
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as vertex_icon_button } from './icon-button-
|
|
1
|
+
export { I as vertex_icon_button } from './icon-button-aad3c0e7.js';
|
|
2
2
|
import './index-72f28b71.js';
|
|
3
3
|
import './index-9c609209.js';
|
|
4
|
-
import './icon-helper-
|
|
4
|
+
import './icon-helper-83f10f73.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { h } from '../../stencil-public-runtime';
|
|
2
|
+
export type BadgeIconColor = 'primary' | 'secondary';
|
|
3
|
+
export declare class Badge {
|
|
4
|
+
/**
|
|
5
|
+
* The string to show in the badge.
|
|
6
|
+
*/
|
|
7
|
+
badgeText?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The color of the badge displayed in this <vertex-badge>.
|
|
10
|
+
* Can be "primary" or "secondary", and defaults to "primary."
|
|
11
|
+
*/
|
|
12
|
+
badgeColor: BadgeIconColor;
|
|
13
|
+
render(): h.JSX.IntrinsicElements;
|
|
14
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './auto-resize-textarea/auto-resize-textarea';
|
|
2
2
|
export * from './avatar/avatar';
|
|
3
3
|
export * from './avatar-group/avatar-group';
|
|
4
|
+
export * from './badge/badge';
|
|
4
5
|
export * from './button/button';
|
|
5
6
|
export * from './card/card';
|
|
6
7
|
export * from './card-group/card-group';
|
|
@@ -126,11 +126,16 @@ export declare class Popover {
|
|
|
126
126
|
private viewportWidth?;
|
|
127
127
|
private viewportHeight?;
|
|
128
128
|
private resizeTimeout?;
|
|
129
|
+
private boundaryResizeObserver?;
|
|
129
130
|
private shouldUpdatePosition;
|
|
130
131
|
private updateDispose?;
|
|
131
132
|
private middleware;
|
|
132
133
|
private partialWindow;
|
|
133
134
|
constructor();
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
resizeObserverFactory: (cb: (entries: ResizeObserverEntry[]) => void) => ResizeObserver;
|
|
134
139
|
connectedCallback(): void;
|
|
135
140
|
componentDidUpdate(): void;
|
|
136
141
|
componentDidLoad(): void;
|
|
@@ -140,6 +145,7 @@ export declare class Popover {
|
|
|
140
145
|
updateOpened(open?: boolean): void;
|
|
141
146
|
updateAnimated(): void;
|
|
142
147
|
updateMiddleware(): void;
|
|
148
|
+
updateResizeObserver(): void;
|
|
143
149
|
/**
|
|
144
150
|
* @private Used for internals or testing.
|
|
145
151
|
*/
|
|
@@ -152,5 +158,6 @@ export declare class Popover {
|
|
|
152
158
|
private getAnchorBoundsVirtualElement;
|
|
153
159
|
private handleResize;
|
|
154
160
|
private updateViewport;
|
|
161
|
+
private getOrCreateResizeObserver;
|
|
155
162
|
private getTransformClass;
|
|
156
163
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { EventEmitter, h } from '../../stencil-public-runtime';
|
|
2
2
|
import { Point } from '../../types/point';
|
|
3
3
|
import { PopoverPlacement } from '../popover/popover';
|
|
4
|
-
export type Result =
|
|
4
|
+
export type Result = {
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
} & Record<string, unknown>;
|
|
5
8
|
export declare class ResultList {
|
|
6
9
|
items: Result[];
|
|
7
10
|
itemsJson?: string;
|
|
@@ -20,9 +23,11 @@ export declare class ResultList {
|
|
|
20
23
|
private lastFocusedIndex;
|
|
21
24
|
private stateMap;
|
|
22
25
|
private hostEl;
|
|
26
|
+
private resultClick;
|
|
23
27
|
private resizeObserver;
|
|
24
28
|
private computedResultHeight?;
|
|
25
29
|
private resultsScrollEl?;
|
|
30
|
+
constructor();
|
|
26
31
|
handleResultsChanged(results: Array<Result> | string | undefined): void;
|
|
27
32
|
handleOpenChanged(): void;
|
|
28
33
|
protected componentWillLoad(): void;
|
|
@@ -35,7 +40,10 @@ export declare class ResultList {
|
|
|
35
40
|
private ensureTemplateDefined;
|
|
36
41
|
private createResultPool;
|
|
37
42
|
private createResultInstance;
|
|
43
|
+
private createResultHandlers;
|
|
38
44
|
private layoutResults;
|
|
45
|
+
private handlePointerDown;
|
|
46
|
+
private handleResultClick;
|
|
39
47
|
private computeViewportResults;
|
|
40
48
|
private getListHeight;
|
|
41
49
|
private handleScroll;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Result } from '../result-list/result-list';
|
|
2
|
+
export interface SearchResultReplacement {
|
|
3
|
+
before: Text;
|
|
4
|
+
beforeSpace: Text;
|
|
5
|
+
result: Text;
|
|
6
|
+
afterSpace?: Text;
|
|
7
|
+
after?: Text;
|
|
8
|
+
}
|
|
9
|
+
export declare const createResultUrn: (result: Result) => string;
|
|
10
|
+
export declare const createSearchResultReplacement: (result: Result, before: string, after?: string) => SearchResultReplacement;
|
|
11
|
+
export declare const getNodesForSearchResultReplacement: (replacement: SearchResultReplacement) => Text[];
|
|
12
|
+
export declare const trimNonstandardSpaces: (text: string) => string;
|
|
@@ -3,65 +3,122 @@ import { PopoverPlacement } from '../popover/popover';
|
|
|
3
3
|
import { Result } from '../result-list/result-list';
|
|
4
4
|
export type SearchBarVariant = 'standard' | 'filled' | 'underlined' | 'blank';
|
|
5
5
|
export declare class SearchBar {
|
|
6
|
+
/**
|
|
7
|
+
* The search bar variant to display.
|
|
8
|
+
*
|
|
9
|
+
* Possible options are:
|
|
10
|
+
* - 'standard' (default)
|
|
11
|
+
* - 'filled'
|
|
12
|
+
* - 'underlined'
|
|
13
|
+
* - 'blank
|
|
14
|
+
*/
|
|
6
15
|
variant: SearchBarVariant;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Whether this search bar is disabled.
|
|
18
|
+
*/
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The character indicating that we should trigger a search.
|
|
22
|
+
*
|
|
23
|
+
* When this character is encountered, the text following it
|
|
24
|
+
* (omitting `breakCharacters`) will be emitted as a `searchChanged`
|
|
25
|
+
* event.
|
|
26
|
+
*/
|
|
27
|
+
triggerCharacter: string;
|
|
28
|
+
/**
|
|
29
|
+
* Characters that should trigger a "break" of the search. If
|
|
30
|
+
* a value in this list is encountered when trying to parse back
|
|
31
|
+
* to the `triggerCharacter`, this will hide the result list.
|
|
32
|
+
*/
|
|
10
33
|
breakCharacters: string[];
|
|
11
|
-
debounce: number;
|
|
12
34
|
/**
|
|
13
|
-
*
|
|
35
|
+
* The items to display in this search bar's `<vertex-result-list>`.
|
|
36
|
+
*
|
|
37
|
+
* This can be used alongside the `searchChanged` event to query for
|
|
38
|
+
* results to display.
|
|
39
|
+
*/
|
|
40
|
+
resultItems?: Result[];
|
|
41
|
+
/**
|
|
42
|
+
* The placement of the result list for this search bar.
|
|
43
|
+
*
|
|
44
|
+
* Corresponds to the value for the underlying <vertex-popover>
|
|
45
|
+
* placement value.
|
|
46
|
+
* @see(PopoverPlacement)
|
|
14
47
|
*/
|
|
15
|
-
placeholder?: string;
|
|
16
48
|
placement: PopoverPlacement;
|
|
17
|
-
triggerCharacterPressed: EventEmitter<string>;
|
|
18
|
-
private cursorPosition?;
|
|
19
|
-
private open;
|
|
20
|
-
private triggerKey?;
|
|
21
|
-
private triggerRange?;
|
|
22
|
-
private hostEl;
|
|
23
49
|
/**
|
|
24
|
-
*
|
|
50
|
+
* The initial value of this search bar. This will be used in
|
|
51
|
+
* combination with the value of `replacements` to display existing
|
|
52
|
+
* replaced values.
|
|
25
53
|
*/
|
|
26
|
-
|
|
54
|
+
value?: string;
|
|
27
55
|
/**
|
|
28
|
-
*
|
|
56
|
+
* A placeholder to display when no text has been entered.
|
|
29
57
|
*/
|
|
30
|
-
|
|
58
|
+
placeholder?: string;
|
|
31
59
|
/**
|
|
32
|
-
*
|
|
60
|
+
* Replaced result values. This will be used in combination with the
|
|
61
|
+
* value of `value` to display existing replaced values.
|
|
62
|
+
*
|
|
63
|
+
* This value will be automatically updated as `Result`s are clicked
|
|
64
|
+
* within this search bar's `<vertex-result-list>`.
|
|
33
65
|
*/
|
|
34
|
-
|
|
66
|
+
replacements: Result[];
|
|
67
|
+
/**
|
|
68
|
+
* Emitted when the value of the current search triggered by
|
|
69
|
+
* the specified `triggerCharacter` has changed.
|
|
70
|
+
*/
|
|
71
|
+
searchChanged: EventEmitter<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Emitted when the value of the input has changed.
|
|
74
|
+
*/
|
|
75
|
+
inputChanged: EventEmitter<string>;
|
|
76
|
+
/**
|
|
77
|
+
* Emitted when a result has been selected to replace the trigger text.
|
|
78
|
+
*
|
|
79
|
+
* Includes the ID of the `Result` selected.
|
|
80
|
+
*/
|
|
81
|
+
resultReplaced: EventEmitter<Result>;
|
|
82
|
+
/**
|
|
83
|
+
* Emitted when the input is focused.
|
|
84
|
+
*/
|
|
85
|
+
inputFocus: EventEmitter<FocusEvent>;
|
|
35
86
|
/**
|
|
36
|
-
* Emitted when
|
|
87
|
+
* Emitted when the input is blurred.
|
|
37
88
|
*/
|
|
38
|
-
|
|
89
|
+
inputBlur: EventEmitter<FocusEvent>;
|
|
90
|
+
private hostEl;
|
|
91
|
+
private cursorPosition;
|
|
92
|
+
private displayedElements;
|
|
93
|
+
private hasTriggered;
|
|
39
94
|
private contentEl?;
|
|
40
|
-
private
|
|
41
|
-
|
|
95
|
+
private triggeredElement?;
|
|
96
|
+
private triggeredRange?;
|
|
97
|
+
private rawElements;
|
|
98
|
+
private lastReplacedSpace?;
|
|
99
|
+
constructor();
|
|
100
|
+
protected componentDidLoad(): void;
|
|
101
|
+
protected connectedCallback(): void;
|
|
42
102
|
protected disconnectedCallback(): void;
|
|
43
|
-
|
|
44
|
-
|
|
103
|
+
protected replaceContent(newValue?: string, oldValue?: string): void;
|
|
104
|
+
protected updateContent(): void;
|
|
45
105
|
render(): h.JSX.IntrinsicElements;
|
|
46
106
|
private handleKeyDown;
|
|
47
107
|
private handleKeyUp;
|
|
48
|
-
private
|
|
49
|
-
private
|
|
50
|
-
private
|
|
51
|
-
private clearTriggerTimeout;
|
|
52
|
-
private updateCursorPosition;
|
|
53
|
-
private moveCursorToNodeEnd;
|
|
54
|
-
private updateInputCursorPosition;
|
|
55
|
-
private createReplacedElement;
|
|
56
|
-
private handleSelectionChange;
|
|
57
|
-
private getSelectionSubstring;
|
|
58
|
-
private insertAdjacentTextNode;
|
|
59
|
-
private updateTriggerState;
|
|
60
|
-
private updateTriggerRange;
|
|
61
|
-
private clearTriggerState;
|
|
62
|
-
private lastIndexOfBreakCharacter;
|
|
108
|
+
private handleInput;
|
|
109
|
+
private handleClick;
|
|
110
|
+
private handleWindowClick;
|
|
63
111
|
private handleFocus;
|
|
64
112
|
private handleBlur;
|
|
65
|
-
private
|
|
66
|
-
private
|
|
113
|
+
private handleResultClick;
|
|
114
|
+
private isIdenticalElement;
|
|
115
|
+
private getTextContent;
|
|
116
|
+
private getCursorPosition;
|
|
117
|
+
private handleCursorPositionUpdate;
|
|
118
|
+
private readTriggerValue;
|
|
119
|
+
private includesBreakCharacter;
|
|
120
|
+
private firstIndexOfBreakCharacter;
|
|
121
|
+
private moveCursorToNodeEnd;
|
|
122
|
+
private getContentAsString;
|
|
123
|
+
private createReplacedElement;
|
|
67
124
|
}
|
|
@@ -24,6 +24,11 @@ export declare class Select {
|
|
|
24
24
|
* or closing.
|
|
25
25
|
*/
|
|
26
26
|
animated: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether this select will omit the currently selected
|
|
29
|
+
* value in the dropdown list.
|
|
30
|
+
*/
|
|
31
|
+
hideSelected: boolean;
|
|
27
32
|
/**
|
|
28
33
|
* Emitted when the selected option of this element
|
|
29
34
|
* changes, and contains the value that it has been
|
|
@@ -51,10 +56,13 @@ export declare class Select {
|
|
|
51
56
|
connectedCallback(): void;
|
|
52
57
|
disconnectedCallback(): void;
|
|
53
58
|
handleUpdateValue(value?: string): void;
|
|
59
|
+
protected handleUpdateDisplayValue(): void;
|
|
54
60
|
render(): h.JSX.IntrinsicElements;
|
|
55
61
|
private handleOpen;
|
|
56
62
|
private handleDismiss;
|
|
57
63
|
private updateDisplayValue;
|
|
58
64
|
private removeOptionListeners;
|
|
65
|
+
private clearSelectedOptionFlag;
|
|
66
|
+
private getSelectedOption;
|
|
59
67
|
private getBounds;
|
|
60
68
|
}
|
|
@@ -40,18 +40,25 @@ export declare class Tooltip {
|
|
|
40
40
|
hostElement: HTMLElement;
|
|
41
41
|
private open;
|
|
42
42
|
private tooltipId;
|
|
43
|
+
private pointerEntered;
|
|
43
44
|
private openTimeout?;
|
|
44
45
|
private targetElement?;
|
|
45
46
|
private contentElement?;
|
|
46
47
|
private displayedSlottedContent?;
|
|
48
|
+
private internalContentElement?;
|
|
47
49
|
constructor();
|
|
48
50
|
disconnectedCallback(): void;
|
|
51
|
+
protected handleContentChange(): void;
|
|
52
|
+
protected handleDisabledChange(): void;
|
|
49
53
|
render(): h.JSX.IntrinsicElements;
|
|
50
54
|
private addElement;
|
|
51
55
|
private removeElement;
|
|
52
56
|
private createPopoverElement;
|
|
53
57
|
private createContentElement;
|
|
58
|
+
private updateContentElementClass;
|
|
59
|
+
private updateContentElementChildren;
|
|
54
60
|
private handlePointerEnter;
|
|
55
61
|
private handlePointerLeave;
|
|
62
|
+
private createOpenTimeout;
|
|
56
63
|
private clearOpenTimeout;
|
|
57
64
|
}
|