@abgov/web-components 1.0.0-alpha.71 → 1.0.0-alpha.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web-components.es.js +139 -89
- package/web-components.umd.js +22 -22
package/package.json
CHANGED
package/web-components.es.js
CHANGED
|
@@ -4338,12 +4338,12 @@ const BIND$1 = "bind";
|
|
|
4338
4338
|
|
|
4339
4339
|
function get_each_context$1(ctx, list, i) {
|
|
4340
4340
|
const child_ctx = ctx.slice();
|
|
4341
|
-
child_ctx[
|
|
4342
|
-
child_ctx[
|
|
4341
|
+
child_ctx[34] = list[i];
|
|
4342
|
+
child_ctx[36] = i;
|
|
4343
4343
|
return child_ctx;
|
|
4344
4344
|
}
|
|
4345
4345
|
|
|
4346
|
-
// (
|
|
4346
|
+
// (172:2) {#if isMenuVisible}
|
|
4347
4347
|
function create_if_block$b(ctx) {
|
|
4348
4348
|
let div;
|
|
4349
4349
|
let div_data_testid_value;
|
|
@@ -4353,7 +4353,7 @@ function create_if_block$b(ctx) {
|
|
|
4353
4353
|
return {
|
|
4354
4354
|
c() {
|
|
4355
4355
|
div = element("div");
|
|
4356
|
-
attr(div, "data-testid", div_data_testid_value = `${/*name*/ ctx[
|
|
4356
|
+
attr(div, "data-testid", div_data_testid_value = `${/*name*/ ctx[0]}-dropdown-background`);
|
|
4357
4357
|
attr(div, "class", "goa-dropdown-background");
|
|
4358
4358
|
},
|
|
4359
4359
|
m(target, anchor) {
|
|
@@ -4365,7 +4365,7 @@ function create_if_block$b(ctx) {
|
|
|
4365
4365
|
}
|
|
4366
4366
|
},
|
|
4367
4367
|
p(ctx, dirty) {
|
|
4368
|
-
if (dirty[0] & /*name*/
|
|
4368
|
+
if (dirty[0] & /*name*/ 1 && div_data_testid_value !== (div_data_testid_value = `${/*name*/ ctx[0]}-dropdown-background`)) {
|
|
4369
4369
|
attr(div, "data-testid", div_data_testid_value);
|
|
4370
4370
|
}
|
|
4371
4371
|
},
|
|
@@ -4377,10 +4377,10 @@ function create_if_block$b(ctx) {
|
|
|
4377
4377
|
};
|
|
4378
4378
|
}
|
|
4379
4379
|
|
|
4380
|
-
// (
|
|
4380
|
+
// (208:4) {#each options as option, index (option.value)}
|
|
4381
4381
|
function create_each_block$1(key_1, ctx) {
|
|
4382
4382
|
let li;
|
|
4383
|
-
let t0_value = /*option*/ ctx[
|
|
4383
|
+
let t0_value = /*option*/ ctx[34].label + "";
|
|
4384
4384
|
let t0;
|
|
4385
4385
|
let t1;
|
|
4386
4386
|
let li_data_testid_value;
|
|
@@ -4390,7 +4390,7 @@ function create_each_block$1(key_1, ctx) {
|
|
|
4390
4390
|
let dispose;
|
|
4391
4391
|
|
|
4392
4392
|
function click_handler() {
|
|
4393
|
-
return /*click_handler*/ ctx[
|
|
4393
|
+
return /*click_handler*/ ctx[22](/*option*/ ctx[34]);
|
|
4394
4394
|
}
|
|
4395
4395
|
|
|
4396
4396
|
return {
|
|
@@ -4400,13 +4400,13 @@ function create_each_block$1(key_1, ctx) {
|
|
|
4400
4400
|
li = element("li");
|
|
4401
4401
|
t0 = text(t0_value);
|
|
4402
4402
|
t1 = space();
|
|
4403
|
-
attr(li, "data-testid", li_data_testid_value = `${/*option*/ ctx[
|
|
4404
|
-
attr(li, "data-index", li_data_index_value = /*index*/ ctx[
|
|
4403
|
+
attr(li, "data-testid", li_data_testid_value = `${/*option*/ ctx[34].value}-dropdown-item`);
|
|
4404
|
+
attr(li, "data-index", li_data_index_value = /*index*/ ctx[36]);
|
|
4405
4405
|
attr(li, "class", "goa-dropdown-option");
|
|
4406
4406
|
attr(li, "style", li_style_value = `display: ${"block"}`);
|
|
4407
4407
|
toggle_class(li, "goa-dropdown-option--disabled", false);
|
|
4408
|
-
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[
|
|
4409
|
-
toggle_class(li, "goa-dropdown-option--selected", /*
|
|
4408
|
+
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[36] === /*highlightedIndex*/ ctx[11]);
|
|
4409
|
+
toggle_class(li, "goa-dropdown-option--selected", /*_values*/ ctx[7].includes(/*option*/ ctx[34].value));
|
|
4410
4410
|
this.first = li;
|
|
4411
4411
|
},
|
|
4412
4412
|
m(target, anchor) {
|
|
@@ -4421,22 +4421,22 @@ function create_each_block$1(key_1, ctx) {
|
|
|
4421
4421
|
},
|
|
4422
4422
|
p(new_ctx, dirty) {
|
|
4423
4423
|
ctx = new_ctx;
|
|
4424
|
-
if (dirty[0] & /*options*/ 256 && t0_value !== (t0_value = /*option*/ ctx[
|
|
4424
|
+
if (dirty[0] & /*options*/ 256 && t0_value !== (t0_value = /*option*/ ctx[34].label + "")) set_data(t0, t0_value);
|
|
4425
4425
|
|
|
4426
|
-
if (dirty[0] & /*options*/ 256 && li_data_testid_value !== (li_data_testid_value = `${/*option*/ ctx[
|
|
4426
|
+
if (dirty[0] & /*options*/ 256 && li_data_testid_value !== (li_data_testid_value = `${/*option*/ ctx[34].value}-dropdown-item`)) {
|
|
4427
4427
|
attr(li, "data-testid", li_data_testid_value);
|
|
4428
4428
|
}
|
|
4429
4429
|
|
|
4430
|
-
if (dirty[0] & /*options*/ 256 && li_data_index_value !== (li_data_index_value = /*index*/ ctx[
|
|
4430
|
+
if (dirty[0] & /*options*/ 256 && li_data_index_value !== (li_data_index_value = /*index*/ ctx[36])) {
|
|
4431
4431
|
attr(li, "data-index", li_data_index_value);
|
|
4432
4432
|
}
|
|
4433
4433
|
|
|
4434
4434
|
if (dirty[0] & /*options, highlightedIndex*/ 2304) {
|
|
4435
|
-
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[
|
|
4435
|
+
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[36] === /*highlightedIndex*/ ctx[11]);
|
|
4436
4436
|
}
|
|
4437
4437
|
|
|
4438
|
-
if (dirty[0] & /*
|
|
4439
|
-
toggle_class(li, "goa-dropdown-option--selected", /*
|
|
4438
|
+
if (dirty[0] & /*_values, options*/ 384) {
|
|
4439
|
+
toggle_class(li, "goa-dropdown-option--selected", /*_values*/ ctx[7].includes(/*option*/ ctx[34].value));
|
|
4440
4440
|
}
|
|
4441
4441
|
},
|
|
4442
4442
|
d(detaching) {
|
|
@@ -4466,7 +4466,7 @@ function create_fragment$k(ctx) {
|
|
|
4466
4466
|
let dispose;
|
|
4467
4467
|
let if_block = /*isMenuVisible*/ ctx[10] && create_if_block$b(ctx);
|
|
4468
4468
|
let each_value = /*options*/ ctx[8];
|
|
4469
|
-
const get_key = ctx => /*option*/ ctx[
|
|
4469
|
+
const get_key = ctx => /*option*/ ctx[34].value;
|
|
4470
4470
|
|
|
4471
4471
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
4472
4472
|
let child_ctx = get_each_context$1(ctx, each_value, i);
|
|
@@ -4492,22 +4492,23 @@ function create_fragment$k(ctx) {
|
|
|
4492
4492
|
|
|
4493
4493
|
this.c = noop;
|
|
4494
4494
|
set_custom_element_data(goa_input, "error", /*isError*/ ctx[15]);
|
|
4495
|
-
set_custom_element_data(goa_input, "disabled", /*disabled*/ ctx[
|
|
4496
|
-
set_custom_element_data(goa_input, "leadingicon", /*leadingicon*/ ctx[
|
|
4497
|
-
set_custom_element_data(goa_input, "placeholder", /*placeholder*/ ctx[
|
|
4498
|
-
set_custom_element_data(goa_input, "width", goa_input_width_value = /*width*/ ctx[
|
|
4499
|
-
set_custom_element_data(goa_input, "id", goa_input_id_value = `${/*name*/ ctx[
|
|
4495
|
+
set_custom_element_data(goa_input, "disabled", /*disabled*/ ctx[4]);
|
|
4496
|
+
set_custom_element_data(goa_input, "leadingicon", /*leadingicon*/ ctx[1]);
|
|
4497
|
+
set_custom_element_data(goa_input, "placeholder", /*placeholder*/ ctx[3]);
|
|
4498
|
+
set_custom_element_data(goa_input, "width", goa_input_width_value = /*width*/ ctx[6] || /*computedWidth*/ ctx[12]);
|
|
4499
|
+
set_custom_element_data(goa_input, "id", goa_input_id_value = `${/*name*/ ctx[0]}-dropdown-input`);
|
|
4500
4500
|
set_custom_element_data(goa_input, "name", "search");
|
|
4501
4501
|
set_custom_element_data(goa_input, "readonly", "");
|
|
4502
4502
|
set_custom_element_data(goa_input, "trailingicon", "chevron-down");
|
|
4503
4503
|
set_custom_element_data(goa_input, "type", "text");
|
|
4504
4504
|
set_custom_element_data(goa_input, "value", /*selectedLabel*/ ctx[9]);
|
|
4505
|
-
attr(div0, "data-testid", div0_data_testid_value = `${/*name*/ ctx[
|
|
4505
|
+
attr(div0, "data-testid", div0_data_testid_value = `${/*name*/ ctx[0]}-dropdown`);
|
|
4506
|
+
attr(ul, "data-testid", "dropdown-menu");
|
|
4506
4507
|
attr(ul, "tabindex", "0");
|
|
4507
4508
|
attr(ul, "class", "goa-dropdown-list");
|
|
4508
|
-
attr(ul, "style", ul_style_value = `overflow-y: auto; max-height: ${/*maxheight*/ ctx[
|
|
4509
|
+
attr(ul, "style", ul_style_value = `overflow-y: auto; max-height: ${/*maxheight*/ ctx[2]}`);
|
|
4509
4510
|
toggle_class(ul, "dropdown-active", /*isMenuVisible*/ ctx[10]);
|
|
4510
|
-
attr(div1, "data-testid", /*testid*/ ctx[
|
|
4511
|
+
attr(div1, "data-testid", /*testid*/ ctx[5]);
|
|
4511
4512
|
attr(div1, "class", "goa-dropdown-box");
|
|
4512
4513
|
},
|
|
4513
4514
|
m(target, anchor) {
|
|
@@ -4525,8 +4526,8 @@ function create_fragment$k(ctx) {
|
|
|
4525
4526
|
each_blocks[i].m(ul, null);
|
|
4526
4527
|
}
|
|
4527
4528
|
|
|
4528
|
-
/*ul_binding*/ ctx[
|
|
4529
|
-
/*div1_binding*/ ctx[
|
|
4529
|
+
/*ul_binding*/ ctx[23](ul);
|
|
4530
|
+
/*div1_binding*/ ctx[24](div1);
|
|
4530
4531
|
|
|
4531
4532
|
if (!mounted) {
|
|
4532
4533
|
dispose = listen(goa_input, "click", /*showMenu*/ ctx[16]);
|
|
@@ -4551,23 +4552,23 @@ function create_fragment$k(ctx) {
|
|
|
4551
4552
|
set_custom_element_data(goa_input, "error", /*isError*/ ctx[15]);
|
|
4552
4553
|
}
|
|
4553
4554
|
|
|
4554
|
-
if (dirty[0] & /*disabled*/
|
|
4555
|
-
set_custom_element_data(goa_input, "disabled", /*disabled*/ ctx[
|
|
4555
|
+
if (dirty[0] & /*disabled*/ 16) {
|
|
4556
|
+
set_custom_element_data(goa_input, "disabled", /*disabled*/ ctx[4]);
|
|
4556
4557
|
}
|
|
4557
4558
|
|
|
4558
|
-
if (dirty[0] & /*leadingicon*/
|
|
4559
|
-
set_custom_element_data(goa_input, "leadingicon", /*leadingicon*/ ctx[
|
|
4559
|
+
if (dirty[0] & /*leadingicon*/ 2) {
|
|
4560
|
+
set_custom_element_data(goa_input, "leadingicon", /*leadingicon*/ ctx[1]);
|
|
4560
4561
|
}
|
|
4561
4562
|
|
|
4562
|
-
if (dirty[0] & /*placeholder*/
|
|
4563
|
-
set_custom_element_data(goa_input, "placeholder", /*placeholder*/ ctx[
|
|
4563
|
+
if (dirty[0] & /*placeholder*/ 8) {
|
|
4564
|
+
set_custom_element_data(goa_input, "placeholder", /*placeholder*/ ctx[3]);
|
|
4564
4565
|
}
|
|
4565
4566
|
|
|
4566
|
-
if (dirty[0] & /*width, computedWidth*/
|
|
4567
|
+
if (dirty[0] & /*width, computedWidth*/ 4160 && goa_input_width_value !== (goa_input_width_value = /*width*/ ctx[6] || /*computedWidth*/ ctx[12])) {
|
|
4567
4568
|
set_custom_element_data(goa_input, "width", goa_input_width_value);
|
|
4568
4569
|
}
|
|
4569
4570
|
|
|
4570
|
-
if (dirty[0] & /*name*/
|
|
4571
|
+
if (dirty[0] & /*name*/ 1 && goa_input_id_value !== (goa_input_id_value = `${/*name*/ ctx[0]}-dropdown-input`)) {
|
|
4571
4572
|
set_custom_element_data(goa_input, "id", goa_input_id_value);
|
|
4572
4573
|
}
|
|
4573
4574
|
|
|
@@ -4575,16 +4576,16 @@ function create_fragment$k(ctx) {
|
|
|
4575
4576
|
set_custom_element_data(goa_input, "value", /*selectedLabel*/ ctx[9]);
|
|
4576
4577
|
}
|
|
4577
4578
|
|
|
4578
|
-
if (dirty[0] & /*name*/
|
|
4579
|
+
if (dirty[0] & /*name*/ 1 && div0_data_testid_value !== (div0_data_testid_value = `${/*name*/ ctx[0]}-dropdown`)) {
|
|
4579
4580
|
attr(div0, "data-testid", div0_data_testid_value);
|
|
4580
4581
|
}
|
|
4581
4582
|
|
|
4582
|
-
if (dirty[0] & /*options, highlightedIndex,
|
|
4583
|
+
if (dirty[0] & /*options, highlightedIndex, _values, onSelect*/ 264576) {
|
|
4583
4584
|
each_value = /*options*/ ctx[8];
|
|
4584
4585
|
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, ul, destroy_block, create_each_block$1, null, get_each_context$1);
|
|
4585
4586
|
}
|
|
4586
4587
|
|
|
4587
|
-
if (dirty[0] & /*maxheight*/
|
|
4588
|
+
if (dirty[0] & /*maxheight*/ 4 && ul_style_value !== (ul_style_value = `overflow-y: auto; max-height: ${/*maxheight*/ ctx[2]}`)) {
|
|
4588
4589
|
attr(ul, "style", ul_style_value);
|
|
4589
4590
|
}
|
|
4590
4591
|
|
|
@@ -4592,8 +4593,8 @@ function create_fragment$k(ctx) {
|
|
|
4592
4593
|
toggle_class(ul, "dropdown-active", /*isMenuVisible*/ ctx[10]);
|
|
4593
4594
|
}
|
|
4594
4595
|
|
|
4595
|
-
if (dirty[0] & /*testid*/
|
|
4596
|
-
attr(div1, "data-testid", /*testid*/ ctx[
|
|
4596
|
+
if (dirty[0] & /*testid*/ 32) {
|
|
4597
|
+
attr(div1, "data-testid", /*testid*/ ctx[5]);
|
|
4597
4598
|
}
|
|
4598
4599
|
},
|
|
4599
4600
|
i: noop,
|
|
@@ -4606,31 +4607,33 @@ function create_fragment$k(ctx) {
|
|
|
4606
4607
|
each_blocks[i].d();
|
|
4607
4608
|
}
|
|
4608
4609
|
|
|
4609
|
-
/*ul_binding*/ ctx[
|
|
4610
|
-
/*div1_binding*/ ctx[
|
|
4610
|
+
/*ul_binding*/ ctx[23](null);
|
|
4611
|
+
/*div1_binding*/ ctx[24](null);
|
|
4611
4612
|
mounted = false;
|
|
4612
4613
|
dispose();
|
|
4613
4614
|
}
|
|
4614
4615
|
};
|
|
4615
4616
|
}
|
|
4616
4617
|
|
|
4617
|
-
const MAX_HEIGHT =
|
|
4618
|
+
const MAX_HEIGHT = "300px";
|
|
4618
4619
|
|
|
4619
4620
|
function instance$j($$self, $$props, $$invalidate) {
|
|
4620
4621
|
let isError;
|
|
4621
4622
|
let { name } = $$props;
|
|
4622
|
-
let { value } = $$props;
|
|
4623
|
-
let { leadingicon } = $$props;
|
|
4623
|
+
let { value = "" } = $$props;
|
|
4624
|
+
let { leadingicon = null } = $$props;
|
|
4624
4625
|
let { maxheight = MAX_HEIGHT } = $$props;
|
|
4625
4626
|
let { placeholder = "" } = $$props;
|
|
4626
|
-
let { disabled } = $$props;
|
|
4627
|
-
let { error } = $$props;
|
|
4628
|
-
let { testid } = $$props;
|
|
4629
|
-
let { width } = $$props;
|
|
4627
|
+
let { disabled = false } = $$props;
|
|
4628
|
+
let { error = false } = $$props;
|
|
4629
|
+
let { testid = "" } = $$props;
|
|
4630
|
+
let { width = "" } = $$props;
|
|
4631
|
+
let { multiselect = false } = $$props;
|
|
4630
4632
|
|
|
4631
4633
|
// Private
|
|
4632
|
-
let
|
|
4634
|
+
let _values = [];
|
|
4633
4635
|
|
|
4636
|
+
let options = [];
|
|
4634
4637
|
let selectedLabel = "";
|
|
4635
4638
|
let isMenuVisible = false;
|
|
4636
4639
|
let highlightedIndex = 0;
|
|
@@ -4644,6 +4647,21 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4644
4647
|
onMount(async () => {
|
|
4645
4648
|
el.addEventListener("focus", onFocus, true);
|
|
4646
4649
|
el.addEventListener("blur", onBlur, true);
|
|
4650
|
+
|
|
4651
|
+
// parse and convert values to strings to avoid later type comparison issues
|
|
4652
|
+
let rawValue;
|
|
4653
|
+
|
|
4654
|
+
try {
|
|
4655
|
+
rawValue = JSON.parse(value || "[]");
|
|
4656
|
+
} catch(e) {
|
|
4657
|
+
rawValue = [value];
|
|
4658
|
+
}
|
|
4659
|
+
|
|
4660
|
+
const rawValues = typeof rawValue === "object" ? rawValue : [rawValue];
|
|
4661
|
+
|
|
4662
|
+
// convert all values to strings to avoid later type comparison issues
|
|
4663
|
+
$$invalidate(7, _values = rawValues.map(val => `${val}`));
|
|
4664
|
+
|
|
4647
4665
|
bindContext();
|
|
4648
4666
|
});
|
|
4649
4667
|
|
|
@@ -4662,7 +4680,7 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4662
4680
|
case BIND$1:
|
|
4663
4681
|
{
|
|
4664
4682
|
const _data = data;
|
|
4665
|
-
const selected =
|
|
4683
|
+
const selected = _values.includes(_data.value);
|
|
4666
4684
|
$$invalidate(8, options = [...options, Object.assign(Object.assign({}, _data), { selected })]);
|
|
4667
4685
|
|
|
4668
4686
|
if (selected) {
|
|
@@ -4709,15 +4727,33 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4709
4727
|
}
|
|
4710
4728
|
|
|
4711
4729
|
function setHighlightedIndexToSelected() {
|
|
4712
|
-
$$invalidate(11, highlightedIndex = options.findIndex(option => option.value
|
|
4730
|
+
$$invalidate(11, highlightedIndex = options.findIndex(option => _values.includes(option.value)));
|
|
4713
4731
|
}
|
|
4714
4732
|
|
|
4715
4733
|
// Event handlers
|
|
4716
|
-
function onSelect(
|
|
4734
|
+
function onSelect(val, label) {
|
|
4735
|
+
if (disabled) return;
|
|
4717
4736
|
$$invalidate(9, selectedLabel = label);
|
|
4718
|
-
|
|
4737
|
+
|
|
4738
|
+
if (multiselect) {
|
|
4739
|
+
_values.push(val);
|
|
4740
|
+
|
|
4741
|
+
el.dispatchEvent(new CustomEvent("_change",
|
|
4742
|
+
{
|
|
4743
|
+
composed: true,
|
|
4744
|
+
detail: { name, values: _values }
|
|
4745
|
+
}));
|
|
4746
|
+
} else {
|
|
4747
|
+
$$invalidate(7, _values = [val]);
|
|
4748
|
+
|
|
4749
|
+
el.dispatchEvent(new CustomEvent("_change",
|
|
4750
|
+
{
|
|
4751
|
+
composed: true,
|
|
4752
|
+
detail: { name, value: _values[0] }
|
|
4753
|
+
}));
|
|
4754
|
+
}
|
|
4755
|
+
|
|
4719
4756
|
closeMenu();
|
|
4720
|
-
el.dispatchEvent(new CustomEvent("_change", { composed: true, detail: { name, value } }));
|
|
4721
4757
|
}
|
|
4722
4758
|
|
|
4723
4759
|
const onInputKeyDown = e => {
|
|
@@ -4755,7 +4791,7 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4755
4791
|
break;
|
|
4756
4792
|
case "Tab":
|
|
4757
4793
|
case "Enter":
|
|
4758
|
-
onSelect(
|
|
4794
|
+
onSelect(options[highlightedIndex].value, options[highlightedIndex].label);
|
|
4759
4795
|
e.preventDefault();
|
|
4760
4796
|
break;
|
|
4761
4797
|
case "Escape":
|
|
@@ -4769,7 +4805,7 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4769
4805
|
$$invalidate(11, highlightedIndex = Number(e.target.dataset.index));
|
|
4770
4806
|
}
|
|
4771
4807
|
|
|
4772
|
-
const click_handler = option => onSelect(option.
|
|
4808
|
+
const click_handler = option => onSelect(option.value, option.label);
|
|
4773
4809
|
|
|
4774
4810
|
function ul_binding($$value) {
|
|
4775
4811
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
@@ -4786,26 +4822,26 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4786
4822
|
}
|
|
4787
4823
|
|
|
4788
4824
|
$$self.$$set = $$props => {
|
|
4789
|
-
if ('name' in $$props) $$invalidate(
|
|
4790
|
-
if ('value' in $$props) $$invalidate(
|
|
4791
|
-
if ('leadingicon' in $$props) $$invalidate(
|
|
4792
|
-
if ('maxheight' in $$props) $$invalidate(
|
|
4793
|
-
if ('placeholder' in $$props) $$invalidate(
|
|
4794
|
-
if ('disabled' in $$props) $$invalidate(
|
|
4795
|
-
if ('error' in $$props) $$invalidate(
|
|
4796
|
-
if ('testid' in $$props) $$invalidate(
|
|
4797
|
-
if ('width' in $$props) $$invalidate(
|
|
4825
|
+
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
|
4826
|
+
if ('value' in $$props) $$invalidate(19, value = $$props.value);
|
|
4827
|
+
if ('leadingicon' in $$props) $$invalidate(1, leadingicon = $$props.leadingicon);
|
|
4828
|
+
if ('maxheight' in $$props) $$invalidate(2, maxheight = $$props.maxheight);
|
|
4829
|
+
if ('placeholder' in $$props) $$invalidate(3, placeholder = $$props.placeholder);
|
|
4830
|
+
if ('disabled' in $$props) $$invalidate(4, disabled = $$props.disabled);
|
|
4831
|
+
if ('error' in $$props) $$invalidate(20, error = $$props.error);
|
|
4832
|
+
if ('testid' in $$props) $$invalidate(5, testid = $$props.testid);
|
|
4833
|
+
if ('width' in $$props) $$invalidate(6, width = $$props.width);
|
|
4834
|
+
if ('multiselect' in $$props) $$invalidate(21, multiselect = $$props.multiselect);
|
|
4798
4835
|
};
|
|
4799
4836
|
|
|
4800
4837
|
$$self.$$.update = () => {
|
|
4801
|
-
if ($$self.$$.dirty[0] & /*error*/
|
|
4838
|
+
if ($$self.$$.dirty[0] & /*error*/ 1048576) {
|
|
4802
4839
|
// TODO: remove this once goa-input has the toBoolean method removed
|
|
4803
4840
|
$$invalidate(15, isError = error ? "true" : "false");
|
|
4804
4841
|
}
|
|
4805
4842
|
};
|
|
4806
4843
|
|
|
4807
4844
|
return [
|
|
4808
|
-
value,
|
|
4809
4845
|
name,
|
|
4810
4846
|
leadingicon,
|
|
4811
4847
|
maxheight,
|
|
@@ -4813,6 +4849,7 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4813
4849
|
disabled,
|
|
4814
4850
|
testid,
|
|
4815
4851
|
width,
|
|
4852
|
+
_values,
|
|
4816
4853
|
options,
|
|
4817
4854
|
selectedLabel,
|
|
4818
4855
|
isMenuVisible,
|
|
@@ -4824,7 +4861,9 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
4824
4861
|
showMenu,
|
|
4825
4862
|
closeMenu,
|
|
4826
4863
|
onSelect,
|
|
4864
|
+
value,
|
|
4827
4865
|
error,
|
|
4866
|
+
multiselect,
|
|
4828
4867
|
click_handler,
|
|
4829
4868
|
ul_binding,
|
|
4830
4869
|
div1_binding
|
|
@@ -4847,15 +4886,16 @@ class Dropdown extends SvelteElement {
|
|
|
4847
4886
|
create_fragment$k,
|
|
4848
4887
|
safe_not_equal,
|
|
4849
4888
|
{
|
|
4850
|
-
name:
|
|
4851
|
-
value:
|
|
4852
|
-
leadingicon:
|
|
4853
|
-
maxheight:
|
|
4854
|
-
placeholder:
|
|
4855
|
-
disabled:
|
|
4856
|
-
error:
|
|
4857
|
-
testid:
|
|
4858
|
-
width:
|
|
4889
|
+
name: 0,
|
|
4890
|
+
value: 19,
|
|
4891
|
+
leadingicon: 1,
|
|
4892
|
+
maxheight: 2,
|
|
4893
|
+
placeholder: 3,
|
|
4894
|
+
disabled: 4,
|
|
4895
|
+
error: 20,
|
|
4896
|
+
testid: 5,
|
|
4897
|
+
width: 6,
|
|
4898
|
+
multiselect: 21
|
|
4859
4899
|
},
|
|
4860
4900
|
null,
|
|
4861
4901
|
[-1, -1]
|
|
@@ -4883,12 +4923,13 @@ class Dropdown extends SvelteElement {
|
|
|
4883
4923
|
"disabled",
|
|
4884
4924
|
"error",
|
|
4885
4925
|
"testid",
|
|
4886
|
-
"width"
|
|
4926
|
+
"width",
|
|
4927
|
+
"multiselect"
|
|
4887
4928
|
];
|
|
4888
4929
|
}
|
|
4889
4930
|
|
|
4890
4931
|
get name() {
|
|
4891
|
-
return this.$$.ctx[
|
|
4932
|
+
return this.$$.ctx[0];
|
|
4892
4933
|
}
|
|
4893
4934
|
|
|
4894
4935
|
set name(name) {
|
|
@@ -4897,7 +4938,7 @@ class Dropdown extends SvelteElement {
|
|
|
4897
4938
|
}
|
|
4898
4939
|
|
|
4899
4940
|
get value() {
|
|
4900
|
-
return this.$$.ctx[
|
|
4941
|
+
return this.$$.ctx[19];
|
|
4901
4942
|
}
|
|
4902
4943
|
|
|
4903
4944
|
set value(value) {
|
|
@@ -4906,7 +4947,7 @@ class Dropdown extends SvelteElement {
|
|
|
4906
4947
|
}
|
|
4907
4948
|
|
|
4908
4949
|
get leadingicon() {
|
|
4909
|
-
return this.$$.ctx[
|
|
4950
|
+
return this.$$.ctx[1];
|
|
4910
4951
|
}
|
|
4911
4952
|
|
|
4912
4953
|
set leadingicon(leadingicon) {
|
|
@@ -4915,7 +4956,7 @@ class Dropdown extends SvelteElement {
|
|
|
4915
4956
|
}
|
|
4916
4957
|
|
|
4917
4958
|
get maxheight() {
|
|
4918
|
-
return this.$$.ctx[
|
|
4959
|
+
return this.$$.ctx[2];
|
|
4919
4960
|
}
|
|
4920
4961
|
|
|
4921
4962
|
set maxheight(maxheight) {
|
|
@@ -4924,7 +4965,7 @@ class Dropdown extends SvelteElement {
|
|
|
4924
4965
|
}
|
|
4925
4966
|
|
|
4926
4967
|
get placeholder() {
|
|
4927
|
-
return this.$$.ctx[
|
|
4968
|
+
return this.$$.ctx[3];
|
|
4928
4969
|
}
|
|
4929
4970
|
|
|
4930
4971
|
set placeholder(placeholder) {
|
|
@@ -4933,7 +4974,7 @@ class Dropdown extends SvelteElement {
|
|
|
4933
4974
|
}
|
|
4934
4975
|
|
|
4935
4976
|
get disabled() {
|
|
4936
|
-
return this.$$.ctx[
|
|
4977
|
+
return this.$$.ctx[4];
|
|
4937
4978
|
}
|
|
4938
4979
|
|
|
4939
4980
|
set disabled(disabled) {
|
|
@@ -4942,7 +4983,7 @@ class Dropdown extends SvelteElement {
|
|
|
4942
4983
|
}
|
|
4943
4984
|
|
|
4944
4985
|
get error() {
|
|
4945
|
-
return this.$$.ctx[
|
|
4986
|
+
return this.$$.ctx[20];
|
|
4946
4987
|
}
|
|
4947
4988
|
|
|
4948
4989
|
set error(error) {
|
|
@@ -4951,7 +4992,7 @@ class Dropdown extends SvelteElement {
|
|
|
4951
4992
|
}
|
|
4952
4993
|
|
|
4953
4994
|
get testid() {
|
|
4954
|
-
return this.$$.ctx[
|
|
4995
|
+
return this.$$.ctx[5];
|
|
4955
4996
|
}
|
|
4956
4997
|
|
|
4957
4998
|
set testid(testid) {
|
|
@@ -4960,13 +5001,22 @@ class Dropdown extends SvelteElement {
|
|
|
4960
5001
|
}
|
|
4961
5002
|
|
|
4962
5003
|
get width() {
|
|
4963
|
-
return this.$$.ctx[
|
|
5004
|
+
return this.$$.ctx[6];
|
|
4964
5005
|
}
|
|
4965
5006
|
|
|
4966
5007
|
set width(width) {
|
|
4967
5008
|
this.$$set({ width });
|
|
4968
5009
|
flush();
|
|
4969
5010
|
}
|
|
5011
|
+
|
|
5012
|
+
get multiselect() {
|
|
5013
|
+
return this.$$.ctx[21];
|
|
5014
|
+
}
|
|
5015
|
+
|
|
5016
|
+
set multiselect(multiselect) {
|
|
5017
|
+
this.$$set({ multiselect });
|
|
5018
|
+
flush();
|
|
5019
|
+
}
|
|
4970
5020
|
}
|
|
4971
5021
|
|
|
4972
5022
|
customElements.define("goa-dropdown", Dropdown);
|