@abgov/web-components 1.0.0-alpha.196 → 1.0.0-alpha.197
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 +111 -78
- package/web-components.umd.js +73 -72
package/package.json
CHANGED
package/web-components.es.js
CHANGED
|
@@ -372,7 +372,7 @@ function wait() {
|
|
|
372
372
|
}
|
|
373
373
|
return promise;
|
|
374
374
|
}
|
|
375
|
-
function dispatch(node, direction, kind) {
|
|
375
|
+
function dispatch$1(node, direction, kind) {
|
|
376
376
|
node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));
|
|
377
377
|
}
|
|
378
378
|
const outroing = new Set();
|
|
@@ -436,12 +436,12 @@ function create_in_transition(node, fn, params) {
|
|
|
436
436
|
if (task)
|
|
437
437
|
task.abort();
|
|
438
438
|
running = true;
|
|
439
|
-
add_render_callback(() => dispatch(node, true, 'start'));
|
|
439
|
+
add_render_callback(() => dispatch$1(node, true, 'start'));
|
|
440
440
|
task = loop(now => {
|
|
441
441
|
if (running) {
|
|
442
442
|
if (now >= end_time) {
|
|
443
443
|
tick(1, 0);
|
|
444
|
-
dispatch(node, true, 'end');
|
|
444
|
+
dispatch$1(node, true, 'end');
|
|
445
445
|
cleanup();
|
|
446
446
|
return running = false;
|
|
447
447
|
}
|
|
@@ -491,12 +491,12 @@ function create_out_transition(node, fn, params) {
|
|
|
491
491
|
animation_name = create_rule(node, 1, 0, duration, delay, easing, css);
|
|
492
492
|
const start_time = now() + delay;
|
|
493
493
|
const end_time = start_time + duration;
|
|
494
|
-
add_render_callback(() => dispatch(node, false, 'start'));
|
|
494
|
+
add_render_callback(() => dispatch$1(node, false, 'start'));
|
|
495
495
|
loop(now => {
|
|
496
496
|
if (running) {
|
|
497
497
|
if (now >= end_time) {
|
|
498
498
|
tick(0, 1);
|
|
499
|
-
dispatch(node, false, 'end');
|
|
499
|
+
dispatch$1(node, false, 'end');
|
|
500
500
|
if (!--group.r) {
|
|
501
501
|
// this will result in `end()` being called,
|
|
502
502
|
// so we don't need to clean up here
|
|
@@ -582,12 +582,12 @@ function create_bidirectional_transition(node, fn, params, intro) {
|
|
|
582
582
|
if (b)
|
|
583
583
|
tick(0, 1);
|
|
584
584
|
running_program = init(program, duration);
|
|
585
|
-
add_render_callback(() => dispatch(node, b, 'start'));
|
|
585
|
+
add_render_callback(() => dispatch$1(node, b, 'start'));
|
|
586
586
|
loop(now => {
|
|
587
587
|
if (pending_program && now > pending_program.start) {
|
|
588
588
|
running_program = init(pending_program, duration);
|
|
589
589
|
pending_program = null;
|
|
590
|
-
dispatch(node, running_program.b, 'start');
|
|
590
|
+
dispatch$1(node, running_program.b, 'start');
|
|
591
591
|
if (css) {
|
|
592
592
|
clear_animation();
|
|
593
593
|
animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);
|
|
@@ -596,7 +596,7 @@ function create_bidirectional_transition(node, fn, params, intro) {
|
|
|
596
596
|
if (running_program) {
|
|
597
597
|
if (now >= running_program.end) {
|
|
598
598
|
tick(t = running_program.b, 1 - t);
|
|
599
|
-
dispatch(node, running_program.b, 'end');
|
|
599
|
+
dispatch$1(node, running_program.b, 'end');
|
|
600
600
|
if (!pending_program) {
|
|
601
601
|
// we're done
|
|
602
602
|
if (running_program.b) {
|
|
@@ -1608,7 +1608,7 @@ function create_else_block$9(ctx) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
|
|
1610
1610
|
// (51:2) {#if showIcon}
|
|
1611
|
-
function create_if_block_1$
|
|
1611
|
+
function create_if_block_1$g(ctx) {
|
|
1612
1612
|
let goa_icon;
|
|
1613
1613
|
let goa_icon_arialabel_value;
|
|
1614
1614
|
|
|
@@ -1674,7 +1674,7 @@ function create_fragment$Q(ctx) {
|
|
|
1674
1674
|
let div_class_value;
|
|
1675
1675
|
|
|
1676
1676
|
function select_block_type(ctx, dirty) {
|
|
1677
|
-
if (/*showIcon*/ ctx[8]) return create_if_block_1$
|
|
1677
|
+
if (/*showIcon*/ ctx[8]) return create_if_block_1$g;
|
|
1678
1678
|
return create_else_block$9;
|
|
1679
1679
|
}
|
|
1680
1680
|
|
|
@@ -2142,7 +2142,7 @@ function create_else_block$8(ctx) {
|
|
|
2142
2142
|
let t1;
|
|
2143
2143
|
let if_block1_anchor;
|
|
2144
2144
|
let if_block0 = /*leadingicon*/ ctx[3] && create_if_block_2$a(ctx);
|
|
2145
|
-
let if_block1 = /*trailingicon*/ ctx[4] && create_if_block_1$
|
|
2145
|
+
let if_block1 = /*trailingicon*/ ctx[4] && create_if_block_1$f(ctx);
|
|
2146
2146
|
|
|
2147
2147
|
return {
|
|
2148
2148
|
c() {
|
|
@@ -2181,7 +2181,7 @@ function create_else_block$8(ctx) {
|
|
|
2181
2181
|
if (if_block1) {
|
|
2182
2182
|
if_block1.p(ctx, dirty);
|
|
2183
2183
|
} else {
|
|
2184
|
-
if_block1 = create_if_block_1$
|
|
2184
|
+
if_block1 = create_if_block_1$f(ctx);
|
|
2185
2185
|
if_block1.c();
|
|
2186
2186
|
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
|
|
2187
2187
|
}
|
|
@@ -2262,7 +2262,7 @@ function create_if_block_2$a(ctx) {
|
|
|
2262
2262
|
}
|
|
2263
2263
|
|
|
2264
2264
|
// (58:4) {#if trailingicon}
|
|
2265
|
-
function create_if_block_1$
|
|
2265
|
+
function create_if_block_1$f(ctx) {
|
|
2266
2266
|
let goa_icon;
|
|
2267
2267
|
|
|
2268
2268
|
return {
|
|
@@ -3572,7 +3572,7 @@ customElements.define("goa-card-image", CardImage);
|
|
|
3572
3572
|
|
|
3573
3573
|
/* libs/web-components/src/components/checkbox/Checkbox.svelte generated by Svelte v3.51.0 */
|
|
3574
3574
|
|
|
3575
|
-
function create_if_block_1$
|
|
3575
|
+
function create_if_block_1$e(ctx) {
|
|
3576
3576
|
let svg;
|
|
3577
3577
|
let path;
|
|
3578
3578
|
|
|
@@ -3639,7 +3639,7 @@ function create_fragment$G(ctx) {
|
|
|
3639
3639
|
|
|
3640
3640
|
function select_block_type(ctx, dirty) {
|
|
3641
3641
|
if (/*isIndeterminate*/ ctx[10]) return create_if_block$l;
|
|
3642
|
-
if (/*isChecked*/ ctx[9]) return create_if_block_1$
|
|
3642
|
+
if (/*isChecked*/ ctx[9]) return create_if_block_1$e;
|
|
3643
3643
|
}
|
|
3644
3644
|
|
|
3645
3645
|
let current_block_type = select_block_type(ctx);
|
|
@@ -4041,7 +4041,7 @@ customElements.define("goa-checkbox", Checkbox);
|
|
|
4041
4041
|
|
|
4042
4042
|
/* libs/web-components/src/components/chip/Chip.svelte generated by Svelte v3.51.0 */
|
|
4043
4043
|
|
|
4044
|
-
function create_if_block_1$
|
|
4044
|
+
function create_if_block_1$d(ctx) {
|
|
4045
4045
|
let goa_icon;
|
|
4046
4046
|
|
|
4047
4047
|
return {
|
|
@@ -4118,7 +4118,7 @@ function create_fragment$F(ctx) {
|
|
|
4118
4118
|
let div1_style_value;
|
|
4119
4119
|
let mounted;
|
|
4120
4120
|
let dispose;
|
|
4121
|
-
let if_block0 = /*leadingicon*/ ctx[4] && create_if_block_1$
|
|
4121
|
+
let if_block0 = /*leadingicon*/ ctx[4] && create_if_block_1$d(ctx);
|
|
4122
4122
|
let if_block1 = /*_deletable*/ ctx[11] && create_if_block$k(ctx);
|
|
4123
4123
|
|
|
4124
4124
|
return {
|
|
@@ -4167,7 +4167,7 @@ function create_fragment$F(ctx) {
|
|
|
4167
4167
|
if (if_block0) {
|
|
4168
4168
|
if_block0.p(ctx, dirty);
|
|
4169
4169
|
} else {
|
|
4170
|
-
if_block0 = create_if_block_1$
|
|
4170
|
+
if_block0 = create_if_block_1$d(ctx);
|
|
4171
4171
|
if_block0.c();
|
|
4172
4172
|
if_block0.m(div1, t0);
|
|
4173
4173
|
}
|
|
@@ -4551,7 +4551,7 @@ function create_if_block$j(ctx) {
|
|
|
4551
4551
|
let if_block;
|
|
4552
4552
|
let if_block_anchor;
|
|
4553
4553
|
let current;
|
|
4554
|
-
const if_block_creators = [create_if_block_1$
|
|
4554
|
+
const if_block_creators = [create_if_block_1$c, create_if_block_3$9];
|
|
4555
4555
|
const if_blocks = [];
|
|
4556
4556
|
|
|
4557
4557
|
function select_block_type(ctx, dirty) {
|
|
@@ -4697,7 +4697,7 @@ function create_if_block_3$9(ctx) {
|
|
|
4697
4697
|
}
|
|
4698
4698
|
|
|
4699
4699
|
// (32:2) {#if fullscreen}
|
|
4700
|
-
function create_if_block_1$
|
|
4700
|
+
function create_if_block_1$c(ctx) {
|
|
4701
4701
|
let div;
|
|
4702
4702
|
let goa_spinner;
|
|
4703
4703
|
let t;
|
|
@@ -5674,7 +5674,7 @@ function create_else_block$7(ctx) {
|
|
|
5674
5674
|
let ul_style_value;
|
|
5675
5675
|
let mounted;
|
|
5676
5676
|
let dispose;
|
|
5677
|
-
let if_block = /*_isMenuVisible*/ ctx[17] && create_if_block_1$
|
|
5677
|
+
let if_block = /*_isMenuVisible*/ ctx[17] && create_if_block_1$b(ctx);
|
|
5678
5678
|
let each_value_1 = /*_options*/ ctx[12];
|
|
5679
5679
|
const get_key = ctx => /*index*/ ctx[54];
|
|
5680
5680
|
|
|
@@ -5753,7 +5753,7 @@ function create_else_block$7(ctx) {
|
|
|
5753
5753
|
if (if_block) {
|
|
5754
5754
|
if_block.p(ctx, dirty);
|
|
5755
5755
|
} else {
|
|
5756
|
-
if_block = create_if_block_1$
|
|
5756
|
+
if_block = create_if_block_1$b(ctx);
|
|
5757
5757
|
if_block.c();
|
|
5758
5758
|
if_block.m(t0.parentNode, t0);
|
|
5759
5759
|
}
|
|
@@ -5928,7 +5928,7 @@ function create_if_block$i(ctx) {
|
|
|
5928
5928
|
}
|
|
5929
5929
|
|
|
5930
5930
|
// (271:4) {#if _isMenuVisible}
|
|
5931
|
-
function create_if_block_1$
|
|
5931
|
+
function create_if_block_1$b(ctx) {
|
|
5932
5932
|
let div;
|
|
5933
5933
|
let div_data_testid_value;
|
|
5934
5934
|
let noscroll_action;
|
|
@@ -7808,7 +7808,7 @@ function create_if_block_3$8(ctx) {
|
|
|
7808
7808
|
}
|
|
7809
7809
|
|
|
7810
7810
|
// (42:2) {#if error}
|
|
7811
|
-
function create_if_block_1$
|
|
7811
|
+
function create_if_block_1$a(ctx) {
|
|
7812
7812
|
let div;
|
|
7813
7813
|
let goa_icon;
|
|
7814
7814
|
let t0;
|
|
@@ -7873,7 +7873,7 @@ function create_fragment$u(ctx) {
|
|
|
7873
7873
|
let t2;
|
|
7874
7874
|
let div1_style_value;
|
|
7875
7875
|
let if_block0 = /*label*/ ctx[5] && create_if_block_2$8(ctx);
|
|
7876
|
-
let if_block1 = /*error*/ ctx[7] && create_if_block_1$
|
|
7876
|
+
let if_block1 = /*error*/ ctx[7] && create_if_block_1$a(ctx);
|
|
7877
7877
|
let if_block2 = /*helptext*/ ctx[6] && create_if_block$f(ctx);
|
|
7878
7878
|
|
|
7879
7879
|
return {
|
|
@@ -7921,7 +7921,7 @@ function create_fragment$u(ctx) {
|
|
|
7921
7921
|
if (if_block1) {
|
|
7922
7922
|
if_block1.p(ctx, dirty);
|
|
7923
7923
|
} else {
|
|
7924
|
-
if_block1 = create_if_block_1$
|
|
7924
|
+
if_block1 = create_if_block_1$a(ctx);
|
|
7925
7925
|
if_block1.c();
|
|
7926
7926
|
if_block1.m(div1, t2);
|
|
7927
7927
|
}
|
|
@@ -8812,7 +8812,7 @@ function create_if_block$e(ctx) {
|
|
|
8812
8812
|
function select_block_type(ctx, dirty) {
|
|
8813
8813
|
if (dirty & /*type*/ 16) show_if = null;
|
|
8814
8814
|
if (show_if == null) show_if = !!Object.keys(/*_iconOverrides*/ ctx[13]).includes(/*type*/ ctx[4]);
|
|
8815
|
-
if (show_if) return create_if_block_1$
|
|
8815
|
+
if (show_if) return create_if_block_1$9;
|
|
8816
8816
|
return create_else_block$6;
|
|
8817
8817
|
}
|
|
8818
8818
|
|
|
@@ -8878,7 +8878,7 @@ function create_else_block$6(ctx) {
|
|
|
8878
8878
|
}
|
|
8879
8879
|
|
|
8880
8880
|
// (56:4) {#if Object.keys(_iconOverrides).includes(type)}
|
|
8881
|
-
function create_if_block_1$
|
|
8881
|
+
function create_if_block_1$9(ctx) {
|
|
8882
8882
|
let div;
|
|
8883
8883
|
let raw_value = /*_iconOverrides*/ ctx[13][/*type*/ ctx[4]] + "";
|
|
8884
8884
|
|
|
@@ -9318,7 +9318,7 @@ function create_if_block_2$7(ctx) {
|
|
|
9318
9318
|
}
|
|
9319
9319
|
|
|
9320
9320
|
// (167:4) {#if trailingicon && handlesTrailingIconClick}
|
|
9321
|
-
function create_if_block_1$
|
|
9321
|
+
function create_if_block_1$8(ctx) {
|
|
9322
9322
|
let goa_icon_button;
|
|
9323
9323
|
let mounted;
|
|
9324
9324
|
let dispose;
|
|
@@ -9404,7 +9404,7 @@ function create_fragment$p(ctx) {
|
|
|
9404
9404
|
let if_block0 = /*prefix*/ ctx[14] && create_if_block_4$2(ctx);
|
|
9405
9405
|
let if_block1 = /*leadingicon*/ ctx[5] && create_if_block_3$7(ctx);
|
|
9406
9406
|
let if_block2 = /*trailingicon*/ ctx[6] && !/*handlesTrailingIconClick*/ ctx[27] && create_if_block_2$7(ctx);
|
|
9407
|
-
let if_block3 = /*trailingicon*/ ctx[6] && /*handlesTrailingIconClick*/ ctx[27] && create_if_block_1$
|
|
9407
|
+
let if_block3 = /*trailingicon*/ ctx[6] && /*handlesTrailingIconClick*/ ctx[27] && create_if_block_1$8(ctx);
|
|
9408
9408
|
let if_block4 = /*suffix*/ ctx[15] && create_if_block$d(ctx);
|
|
9409
9409
|
|
|
9410
9410
|
return {
|
|
@@ -9616,7 +9616,7 @@ function create_fragment$p(ctx) {
|
|
|
9616
9616
|
if (if_block3) {
|
|
9617
9617
|
if_block3.p(ctx, dirty);
|
|
9618
9618
|
} else {
|
|
9619
|
-
if_block3 = create_if_block_1$
|
|
9619
|
+
if_block3 = create_if_block_1$8(ctx);
|
|
9620
9620
|
if_block3.c();
|
|
9621
9621
|
if_block3.m(div2, t5);
|
|
9622
9622
|
}
|
|
@@ -10258,7 +10258,7 @@ function create_if_block_3$6(ctx) {
|
|
|
10258
10258
|
}
|
|
10259
10259
|
|
|
10260
10260
|
// (31:4) {#if ["alpha", "beta"].includes(type)}
|
|
10261
|
-
function create_if_block_1$
|
|
10261
|
+
function create_if_block_1$7(ctx) {
|
|
10262
10262
|
let div0;
|
|
10263
10263
|
let t0_value = capitalize(/*type*/ ctx[0]) + "";
|
|
10264
10264
|
let t0;
|
|
@@ -10394,7 +10394,7 @@ function create_fragment$o(ctx) {
|
|
|
10394
10394
|
let t2;
|
|
10395
10395
|
let header_style_value;
|
|
10396
10396
|
let if_block0 = /*type*/ ctx[0] === "live" && create_if_block_3$6();
|
|
10397
|
-
let if_block1 = show_if && create_if_block_1$
|
|
10397
|
+
let if_block1 = show_if && create_if_block_1$7(ctx);
|
|
10398
10398
|
let if_block2 = /*version*/ ctx[1] && create_if_block$c(ctx);
|
|
10399
10399
|
|
|
10400
10400
|
return {
|
|
@@ -10443,7 +10443,7 @@ function create_fragment$o(ctx) {
|
|
|
10443
10443
|
if (if_block1) {
|
|
10444
10444
|
if_block1.p(ctx, dirty);
|
|
10445
10445
|
} else {
|
|
10446
|
-
if_block1 = create_if_block_1$
|
|
10446
|
+
if_block1 = create_if_block_1$7(ctx);
|
|
10447
10447
|
if_block1.c();
|
|
10448
10448
|
if_block1.m(div1, t1);
|
|
10449
10449
|
}
|
|
@@ -10621,7 +10621,7 @@ function create_if_block$b(ctx) {
|
|
|
10621
10621
|
|
|
10622
10622
|
let current_block_type = select_block_type(ctx);
|
|
10623
10623
|
let if_block1 = current_block_type(ctx);
|
|
10624
|
-
let if_block2 = /*_isClosable*/ ctx[9] && create_if_block_1$
|
|
10624
|
+
let if_block2 = /*_isClosable*/ ctx[9] && create_if_block_1$6(ctx);
|
|
10625
10625
|
|
|
10626
10626
|
return {
|
|
10627
10627
|
c() {
|
|
@@ -10730,7 +10730,7 @@ function create_if_block$b(ctx) {
|
|
|
10730
10730
|
if (if_block2) {
|
|
10731
10731
|
if_block2.p(ctx, dirty);
|
|
10732
10732
|
} else {
|
|
10733
|
-
if_block2 = create_if_block_1$
|
|
10733
|
+
if_block2 = create_if_block_1$6(ctx);
|
|
10734
10734
|
if_block2.c();
|
|
10735
10735
|
if_block2.m(header, null);
|
|
10736
10736
|
}
|
|
@@ -10890,7 +10890,7 @@ function create_if_block_2$5(ctx) {
|
|
|
10890
10890
|
}
|
|
10891
10891
|
|
|
10892
10892
|
// (154:12) {#if _isClosable}
|
|
10893
|
-
function create_if_block_1$
|
|
10893
|
+
function create_if_block_1$6(ctx) {
|
|
10894
10894
|
let div;
|
|
10895
10895
|
let goa_icon_button;
|
|
10896
10896
|
let mounted;
|
|
@@ -13474,7 +13474,7 @@ function create_if_block_2$4(ctx) {
|
|
|
13474
13474
|
}
|
|
13475
13475
|
|
|
13476
13476
|
// (54:31)
|
|
13477
|
-
function create_if_block_1$
|
|
13477
|
+
function create_if_block_1$5(ctx) {
|
|
13478
13478
|
let div2;
|
|
13479
13479
|
let div0;
|
|
13480
13480
|
let skeleton0;
|
|
@@ -13707,7 +13707,7 @@ function create_fragment$g(ctx) {
|
|
|
13707
13707
|
|
|
13708
13708
|
const if_block_creators = [
|
|
13709
13709
|
create_if_block$7,
|
|
13710
|
-
create_if_block_1$
|
|
13710
|
+
create_if_block_1$5,
|
|
13711
13711
|
create_if_block_2$4,
|
|
13712
13712
|
create_if_block_3$4,
|
|
13713
13713
|
create_else_block$4
|
|
@@ -14622,6 +14622,16 @@ function create_fragment$d(ctx) {
|
|
|
14622
14622
|
};
|
|
14623
14623
|
}
|
|
14624
14624
|
|
|
14625
|
+
function dispatch(el, params) {
|
|
14626
|
+
el.dispatchEvent(new CustomEvent("_sort",
|
|
14627
|
+
{
|
|
14628
|
+
composed: true,
|
|
14629
|
+
bubbles: true,
|
|
14630
|
+
cancelable: false,
|
|
14631
|
+
detail: params
|
|
14632
|
+
}));
|
|
14633
|
+
}
|
|
14634
|
+
|
|
14625
14635
|
function instance$a($$self, $$props, $$invalidate) {
|
|
14626
14636
|
let _stickyHeader;
|
|
14627
14637
|
const [Variants, validateVariant] = typeValidator("Table variant", ["normal", "relaxed"], true);
|
|
@@ -14638,7 +14648,11 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
14638
14648
|
|
|
14639
14649
|
onMount(() => {
|
|
14640
14650
|
validateVariant(variant);
|
|
14651
|
+
|
|
14652
|
+
// without setTimeout it won't properly sort in Safari
|
|
14641
14653
|
setTimeout(attachSortEventHandling, 0);
|
|
14654
|
+
|
|
14655
|
+
// exit here if when running tests (tests don't have assignedElements)
|
|
14642
14656
|
const slot = _rootEl.querySelector("slot");
|
|
14643
14657
|
|
|
14644
14658
|
if (!slot || slot.assignedElements().length === 0) {
|
|
@@ -14663,10 +14677,10 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
14663
14677
|
// relay state to all children
|
|
14664
14678
|
headings.forEach(child => {
|
|
14665
14679
|
if (child.getAttribute("name") === sortBy) {
|
|
14666
|
-
const direction = child
|
|
14680
|
+
const direction = child["direction"];
|
|
14667
14681
|
|
|
14668
|
-
// starting direction is
|
|
14669
|
-
const newDirection = direction === "
|
|
14682
|
+
// starting direction is asc
|
|
14683
|
+
const newDirection = direction === "asc" ? "desc" : "asc";
|
|
14670
14684
|
|
|
14671
14685
|
sortDir = newDirection === "asc" ? 1 : -1;
|
|
14672
14686
|
child.setAttribute("direction", newDirection);
|
|
@@ -14675,14 +14689,25 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
14675
14689
|
}
|
|
14676
14690
|
});
|
|
14677
14691
|
|
|
14678
|
-
heading
|
|
14679
|
-
{
|
|
14680
|
-
composed: true,
|
|
14681
|
-
bubbles: false,
|
|
14682
|
-
cancelable: true,
|
|
14683
|
-
detail: { sortBy, sortDir }
|
|
14684
|
-
}));
|
|
14692
|
+
dispatch(heading, { sortBy, sortDir });
|
|
14685
14693
|
});
|
|
14694
|
+
|
|
14695
|
+
// dispatch the default sort params if initially set
|
|
14696
|
+
const initialSortBy = heading.getAttribute("name");
|
|
14697
|
+
|
|
14698
|
+
const initialDirection = heading["direction"];
|
|
14699
|
+
|
|
14700
|
+
if (initialDirection && initialDirection !== "none") {
|
|
14701
|
+
setTimeout(
|
|
14702
|
+
() => {
|
|
14703
|
+
dispatch(heading, {
|
|
14704
|
+
sortBy: initialSortBy,
|
|
14705
|
+
sortDir: initialDirection === "asc" ? 1 : -1
|
|
14706
|
+
});
|
|
14707
|
+
},
|
|
14708
|
+
10
|
|
14709
|
+
);
|
|
14710
|
+
}
|
|
14686
14711
|
});
|
|
14687
14712
|
}
|
|
14688
14713
|
|
|
@@ -14835,51 +14860,60 @@ customElements.define("goa-table", Table);
|
|
|
14835
14860
|
/* libs/web-components/src/components/table/TableSortHeader.svelte generated by Svelte v3.51.0 */
|
|
14836
14861
|
|
|
14837
14862
|
function create_else_block$3(ctx) {
|
|
14838
|
-
let
|
|
14839
|
-
let img_src_value;
|
|
14863
|
+
let div;
|
|
14840
14864
|
|
|
14841
14865
|
return {
|
|
14842
14866
|
c() {
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14867
|
+
div = element("div");
|
|
14868
|
+
|
|
14869
|
+
div.innerHTML = `<goa-icon type="caret-up" size="small"></goa-icon>
|
|
14870
|
+
<goa-icon type="caret-down" size="small"></goa-icon>`;
|
|
14871
|
+
|
|
14872
|
+
attr(div, "class", "direction--none");
|
|
14847
14873
|
},
|
|
14848
14874
|
m(target, anchor) {
|
|
14849
|
-
insert(target,
|
|
14875
|
+
insert(target, div, anchor);
|
|
14850
14876
|
},
|
|
14851
|
-
|
|
14852
|
-
if (
|
|
14853
|
-
|
|
14854
|
-
|
|
14877
|
+
d(detaching) {
|
|
14878
|
+
if (detaching) detach(div);
|
|
14879
|
+
}
|
|
14880
|
+
};
|
|
14881
|
+
}
|
|
14855
14882
|
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14883
|
+
// (71:32)
|
|
14884
|
+
function create_if_block_1$4(ctx) {
|
|
14885
|
+
let goa_icon;
|
|
14886
|
+
|
|
14887
|
+
return {
|
|
14888
|
+
c() {
|
|
14889
|
+
goa_icon = element("goa-icon");
|
|
14890
|
+
set_custom_element_data(goa_icon, "type", "caret-up");
|
|
14891
|
+
set_custom_element_data(goa_icon, "size", "small");
|
|
14892
|
+
},
|
|
14893
|
+
m(target, anchor) {
|
|
14894
|
+
insert(target, goa_icon, anchor);
|
|
14859
14895
|
},
|
|
14860
14896
|
d(detaching) {
|
|
14861
|
-
if (detaching) detach(
|
|
14897
|
+
if (detaching) detach(goa_icon);
|
|
14862
14898
|
}
|
|
14863
14899
|
};
|
|
14864
14900
|
}
|
|
14865
14901
|
|
|
14866
|
-
// (
|
|
14902
|
+
// (69:2) {#if direction === "desc"}
|
|
14867
14903
|
function create_if_block$5(ctx) {
|
|
14868
|
-
let
|
|
14869
|
-
let img_src_value;
|
|
14904
|
+
let goa_icon;
|
|
14870
14905
|
|
|
14871
14906
|
return {
|
|
14872
14907
|
c() {
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14908
|
+
goa_icon = element("goa-icon");
|
|
14909
|
+
set_custom_element_data(goa_icon, "type", "caret-down");
|
|
14910
|
+
set_custom_element_data(goa_icon, "size", "small");
|
|
14876
14911
|
},
|
|
14877
14912
|
m(target, anchor) {
|
|
14878
|
-
insert(target,
|
|
14913
|
+
insert(target, goa_icon, anchor);
|
|
14879
14914
|
},
|
|
14880
|
-
p: noop,
|
|
14881
14915
|
d(detaching) {
|
|
14882
|
-
if (detaching) detach(
|
|
14916
|
+
if (detaching) detach(goa_icon);
|
|
14883
14917
|
}
|
|
14884
14918
|
};
|
|
14885
14919
|
}
|
|
@@ -14890,7 +14924,8 @@ function create_fragment$c(ctx) {
|
|
|
14890
14924
|
let t;
|
|
14891
14925
|
|
|
14892
14926
|
function select_block_type(ctx, dirty) {
|
|
14893
|
-
if (/*direction*/ ctx[0] === "
|
|
14927
|
+
if (/*direction*/ ctx[0] === "desc") return create_if_block$5;
|
|
14928
|
+
if (/*direction*/ ctx[0] === "asc") return create_if_block_1$4;
|
|
14894
14929
|
return create_else_block$3;
|
|
14895
14930
|
}
|
|
14896
14931
|
|
|
@@ -14912,9 +14947,7 @@ function create_fragment$c(ctx) {
|
|
|
14912
14947
|
if_block.m(button, null);
|
|
14913
14948
|
},
|
|
14914
14949
|
p(ctx, [dirty]) {
|
|
14915
|
-
if (current_block_type
|
|
14916
|
-
if_block.p(ctx, dirty);
|
|
14917
|
-
} else {
|
|
14950
|
+
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
|
|
14918
14951
|
if_block.d(1);
|
|
14919
14952
|
if_block = current_block_type(ctx);
|
|
14920
14953
|
|
|
@@ -14946,7 +14979,7 @@ function instance$9($$self, $$props, $$invalidate) {
|
|
|
14946
14979
|
class TableSortHeader extends SvelteElement {
|
|
14947
14980
|
constructor(options) {
|
|
14948
14981
|
super();
|
|
14949
|
-
this.shadowRoot.innerHTML = `<style>:host{display:flex;align-items:flex-end}button{border:none;background:none;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;color:inherit;
|
|
14982
|
+
this.shadowRoot.innerHTML = `<style>:host{display:flex;align-items:flex-end}button{border:none;background:none;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;color:inherit;width:100%;height:3.75rem;align-items:center;padding:0 1rem;text-align:left;gap:0.25rem;align-items:center}button:hover{background-color:var(--goa-color-greyscale-100);cursor:pointer;color:var(--goa-color-interactive-hover)}button goa-icon{color:var(--goa-color-interactive-default)}button:hover goa-icon{color:var(--goa-color-interactive-hover)}button .direction--none goa-icon{color:var(--goa-color-greyscale-400)}button:hover .direction--none goa-icon{color:var(--goa-color-greyscale-400)}goa-icon{scale:0.8}.direction--none goa-icon{height:0.625rem}.direction--none{display:inline-flex;flex-direction:column;align-items:center}</style>`;
|
|
14950
14983
|
|
|
14951
14984
|
init(
|
|
14952
14985
|
this,
|