@internetarchive/collection-browser 3.4.1-alpha-webdev7761.2 → 3.4.1-alpha-webdev7761.3
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/src/collection-browser.js +7 -0
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/combo-box/caret-closed.js +8 -11
- package/dist/src/combo-box/caret-closed.js.map +1 -1
- package/dist/src/combo-box/caret-open.js +8 -11
- package/dist/src/combo-box/caret-open.js.map +1 -1
- package/dist/src/combo-box/clear.d.ts +2 -0
- package/dist/src/combo-box/clear.js +11 -0
- package/dist/src/combo-box/clear.js.map +1 -0
- package/dist/src/combo-box/ia-combo-box.d.ts +40 -9
- package/dist/src/combo-box/ia-combo-box.js +189 -84
- package/dist/src/combo-box/ia-combo-box.js.map +1 -1
- package/dist/src/combo-box/models.d.ts +14 -0
- package/dist/src/combo-box/models.js +31 -0
- package/dist/src/combo-box/models.js.map +1 -1
- package/package.json +1 -1
- package/src/collection-browser.ts +7 -0
- package/src/combo-box/caret-closed.ts +8 -11
- package/src/combo-box/caret-open.ts +8 -11
- package/src/combo-box/clear.ts +11 -0
- package/src/combo-box/ia-combo-box.ts +193 -79
- package/src/combo-box/models.ts +30 -0
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
export default html
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
></path>
|
|
11
|
-
</svg>
|
|
12
|
-
`;
|
|
2
|
+
export default html `<svg
|
|
3
|
+
viewBox="0 0 8 4"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
>
|
|
6
|
+
<path
|
|
7
|
+
d="m6.7226499.58397485c.22976435-.15317623.54019902-.09108929.69337525.13867505.13615665.20423498.10222882.47220947-.06836249.63681849l-.07031256.05655676-3.2773501 2.18490006-3.2773501-2.18490006c-.22976434-.15317623-.29185128-.4636109-.13867505-.69337525.13615665-.20423497.39656688-.27598409.61412572-.18182636l.07924953.04315131 2.7226499 1.81402515z"
|
|
8
|
+
></path>
|
|
9
|
+
</svg>`;
|
|
13
10
|
//# sourceMappingURL=caret-closed.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caret-closed.js","sourceRoot":"","sources":["../../../src/combo-box/caret-closed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,eAAe,IAAI,CAAA
|
|
1
|
+
{"version":3,"file":"caret-closed.js","sourceRoot":"","sources":["../../../src/combo-box/caret-closed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,eAAe,IAAI,CAAA;;;;;;;OAOZ,CAAC","sourcesContent":["import { html } from 'lit';\n\nexport default html`<svg\n viewBox=\"0 0 8 4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n d=\"m6.7226499.58397485c.22976435-.15317623.54019902-.09108929.69337525.13867505.13615665.20423498.10222882.47220947-.06836249.63681849l-.07031256.05655676-3.2773501 2.18490006-3.2773501-2.18490006c-.22976434-.15317623-.29185128-.4636109-.13867505-.69337525.13615665-.20423497.39656688-.27598409.61412572-.18182636l.07924953.04315131 2.7226499 1.81402515z\"\n ></path>\n</svg>`;\n"]}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
export default html
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
></path>
|
|
11
|
-
</svg>
|
|
12
|
-
`;
|
|
2
|
+
export default html `<svg
|
|
3
|
+
viewBox="0 0 8 4"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
>
|
|
6
|
+
<path
|
|
7
|
+
d="m6.7226499 3.51689722c.22976435.15317623.54019902.0910893.69337525-.13867505.13615665-.20423497.10222882-.47220946-.06836249-.63681849l-.07031256-.05655675-3.2773501-2.18490007-3.2773501 2.18490007c-.22976434.15317623-.29185128.4636109-.13867505.69337524.13615665.20423498.39656688.27598409.61412572.18182636l.07924953-.04315131 2.7226499-1.81402514z"
|
|
8
|
+
></path>
|
|
9
|
+
</svg>`;
|
|
13
10
|
//# sourceMappingURL=caret-open.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caret-open.js","sourceRoot":"","sources":["../../../src/combo-box/caret-open.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,eAAe,IAAI,CAAA
|
|
1
|
+
{"version":3,"file":"caret-open.js","sourceRoot":"","sources":["../../../src/combo-box/caret-open.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,eAAe,IAAI,CAAA;;;;;;;OAOZ,CAAC","sourcesContent":["import { html } from 'lit';\n\nexport default html`<svg\n viewBox=\"0 0 8 4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n d=\"m6.7226499 3.51689722c.22976435.15317623.54019902.0910893.69337525-.13867505.13615665-.20423497.10222882-.47220946-.06836249-.63681849l-.07031256-.05655675-3.2773501-2.18490007-3.2773501 2.18490007c-.22976434.15317623-.29185128.4636109-.13867505.69337524.13615665.20423498.39656688.27598409.61412572.18182636l.07924953-.04315131 2.7226499-1.81402514z\"\n ></path>\n</svg>`;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
export default html `<svg
|
|
3
|
+
viewBox="0 0 100 100"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
>
|
|
6
|
+
<path
|
|
7
|
+
d="m50 0c27.6142375 0 50 22.3857625 50 50s-22.3857625 50-50 50-50-22.3857625-50-50 22.3857625-50 50-50zm23.8159475 26.1840525c-1.4033215-1.4033215-3.5816761-1.5592461-5.1572272-.4677738l-.5598841.4677738-18.0988362 18.0989475-18.0988362-18.0989475-.5598841-.4677738c-1.5755511-1.0914723-3.7539057-.9355477-5.1572272.4677738-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113l18.0989475 18.0988362-18.0989475 18.0988362c-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113 1.4033215 1.4033215 3.5816761 1.5592461 5.1572272.4677738l.5598841-.4677738 18.0988362-18.0989475 18.0988362 18.0989475.5598841.4677738c1.5755511 1.0914723 3.7539057.9355477 5.1572272-.4677738 1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113l-18.0989475-18.0988362 18.0989475-18.0988362c1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113z"
|
|
8
|
+
fill-rule="evenodd"
|
|
9
|
+
></path>
|
|
10
|
+
</svg>`;
|
|
11
|
+
//# sourceMappingURL=clear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear.js","sourceRoot":"","sources":["../../../src/combo-box/clear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,eAAe,IAAI,CAAA;;;;;;;;OAQZ,CAAC","sourcesContent":["import { html } from 'lit';\n\nexport default html`<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n d=\"m50 0c27.6142375 0 50 22.3857625 50 50s-22.3857625 50-50 50-50-22.3857625-50-50 22.3857625-50 50-50zm23.8159475 26.1840525c-1.4033215-1.4033215-3.5816761-1.5592461-5.1572272-.4677738l-.5598841.4677738-18.0988362 18.0989475-18.0988362-18.0989475-.5598841-.4677738c-1.5755511-1.0914723-3.7539057-.9355477-5.1572272.4677738-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113l18.0989475 18.0988362-18.0989475 18.0988362c-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113 1.4033215 1.4033215 3.5816761 1.5592461 5.1572272.4677738l.5598841-.4677738 18.0988362-18.0989475 18.0988362 18.0989475.5598841.4677738c1.5755511 1.0914723 3.7539057.9355477 5.1572272-.4677738 1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113l-18.0989475-18.0988362 18.0989475-18.0988362c1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113z\"\n fill-rule=\"evenodd\"\n ></path>\n</svg>`;\n"]}
|
|
@@ -68,7 +68,8 @@ export declare class IAComboBox extends LitElement {
|
|
|
68
68
|
*/
|
|
69
69
|
caseSensitive: boolean;
|
|
70
70
|
/**
|
|
71
|
-
* Whether the filtered options should be listed in lexicographically-sorted order
|
|
71
|
+
* Whether the filtered options should be listed in lexicographically-sorted order,
|
|
72
|
+
* respecting the current `caseSensitive` setting.
|
|
72
73
|
* Default is `false`, displaying them in the same order as the provided options array.
|
|
73
74
|
*/
|
|
74
75
|
sort: boolean;
|
|
@@ -89,6 +90,11 @@ export declare class IAComboBox extends LitElement {
|
|
|
89
90
|
* Default is `false`, closing the options list when a selection is made.
|
|
90
91
|
*/
|
|
91
92
|
stayOpen: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the combo box shows a clear button when a value is selected.
|
|
95
|
+
* Default is `false`.
|
|
96
|
+
*/
|
|
97
|
+
clearable: boolean;
|
|
92
98
|
/**
|
|
93
99
|
* Whether the combo box's option menu is currently expanded. Default is `false`.
|
|
94
100
|
*/
|
|
@@ -133,7 +139,6 @@ export declare class IAComboBox extends LitElement {
|
|
|
133
139
|
private filterText;
|
|
134
140
|
private mainWidgetRow;
|
|
135
141
|
private textInput;
|
|
136
|
-
private caretButton;
|
|
137
142
|
private optionsList;
|
|
138
143
|
static formAssociated: boolean;
|
|
139
144
|
private internals;
|
|
@@ -171,7 +176,7 @@ export declare class IAComboBox extends LitElement {
|
|
|
171
176
|
/**
|
|
172
177
|
* Template for the main label for the combo box.
|
|
173
178
|
*
|
|
174
|
-
* Uses the contents of the
|
|
179
|
+
* Uses the contents of the `label` named slot as the label text.
|
|
175
180
|
*/
|
|
176
181
|
private get labelTemplate();
|
|
177
182
|
/**
|
|
@@ -179,6 +184,11 @@ export declare class IAComboBox extends LitElement {
|
|
|
179
184
|
* options or (if freeform behavior) to enter a custom value.
|
|
180
185
|
*/
|
|
181
186
|
private get textInputTemplate();
|
|
187
|
+
/**
|
|
188
|
+
* Template for the clear button that is shown when the `clearable` property
|
|
189
|
+
* is true.
|
|
190
|
+
*/
|
|
191
|
+
private get clearButtonTemplate();
|
|
182
192
|
/**
|
|
183
193
|
* Template for the caret open/closed icons to show beside the text input.
|
|
184
194
|
* The icons are wrapped in named slots to allow consumers to override them.
|
|
@@ -247,10 +257,22 @@ export declare class IAComboBox extends LitElement {
|
|
|
247
257
|
* Handler for when the Alt + Down Arrow key combo is pressed
|
|
248
258
|
*/
|
|
249
259
|
private handleAltDownArrowPressed;
|
|
260
|
+
/**
|
|
261
|
+
* Handler for when the Tab key is pressed
|
|
262
|
+
*/
|
|
263
|
+
private handleTabPressed;
|
|
264
|
+
/**
|
|
265
|
+
* Handler for when the Space key is pressed
|
|
266
|
+
*/
|
|
267
|
+
private handleSpacePressed;
|
|
250
268
|
/**
|
|
251
269
|
* Handler for clicks on the combo box input field or caret button.
|
|
252
270
|
*/
|
|
253
271
|
private handleComboBoxClick;
|
|
272
|
+
/**
|
|
273
|
+
* Handler for when the clear button is clicked.
|
|
274
|
+
*/
|
|
275
|
+
private handleClearButtonClick;
|
|
254
276
|
/**
|
|
255
277
|
* Handler for when any part of the combo box receives focus.
|
|
256
278
|
*/
|
|
@@ -314,12 +336,27 @@ export declare class IAComboBox extends LitElement {
|
|
|
314
336
|
* Changes the value of the text input box, and updates the filter accordingly.
|
|
315
337
|
*/
|
|
316
338
|
private setTextValue;
|
|
339
|
+
/**
|
|
340
|
+
* Sets the current filter text based on the provided string. The resulting filter
|
|
341
|
+
* text might not exactly match the provided value, depending on the current case
|
|
342
|
+
* sensitivity.
|
|
343
|
+
*/
|
|
344
|
+
private setFilterText;
|
|
317
345
|
openOptionsMenu(): void;
|
|
318
346
|
closeOptionsMenu(): void;
|
|
319
347
|
toggleOptionsMenu(): void;
|
|
320
348
|
private updateFormValidity;
|
|
321
349
|
private emitChangeEvent;
|
|
322
350
|
private emitToggleEvent;
|
|
351
|
+
/**
|
|
352
|
+
* True iff no selection has been made and no text has been entered.
|
|
353
|
+
*/
|
|
354
|
+
private get isEmpty();
|
|
355
|
+
/**
|
|
356
|
+
* We only show the clear button when the `clearable` property is set
|
|
357
|
+
* and the combo box is neither empty nor disabled.
|
|
358
|
+
*/
|
|
359
|
+
private get shouldShowClearButton();
|
|
323
360
|
/**
|
|
324
361
|
* Sets the size and position of the options menu to match the size and position of
|
|
325
362
|
* the combo box widget. Prefers to position below the main widget, but will flip
|
|
@@ -331,12 +368,6 @@ export declare class IAComboBox extends LitElement {
|
|
|
331
368
|
* current case sensitivity.
|
|
332
369
|
*/
|
|
333
370
|
private get caseTransform();
|
|
334
|
-
/**
|
|
335
|
-
* Sets the current filter text based on the provided string. The resulting filter
|
|
336
|
-
* text might not exactly match the provided value, depending on the current case
|
|
337
|
-
* sensitivity.
|
|
338
|
-
*/
|
|
339
|
-
private setFilterText;
|
|
340
371
|
/**
|
|
341
372
|
* Returns the combo box option having the given ID, or null if none exists.
|
|
342
373
|
*/
|