@emuanalytics/flow-rdf-ui 4.3.0 → 4.3.1
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/components/alert/alert.component.mjs +10 -10
- package/dist/components/animation/animation.component.mjs +2 -2
- package/dist/components/autocomplete/autocomplete.component.mjs +18 -16
- package/dist/components/avatar/avatar.component.mjs +7 -12
- package/dist/components/breadcrumb-item/breadcrumb-item.component.mjs +14 -14
- package/dist/components/button/button.component.mjs +3 -3
- package/dist/components/button/button.styles.mjs +5 -5
- package/dist/components/calendar/calendar.component.mjs +23 -6
- package/dist/components/card/card.component.mjs +4 -4
- package/dist/components/carousel/carousel.component.mjs +42 -42
- package/dist/components/carousel-item/carousel-item.component.mjs +1 -0
- package/dist/components/chart/chart.component.mjs +4 -4
- package/dist/components/chart/chartjs-plugins/plugin.flow-ui-colors.mjs +1 -1
- package/dist/components/checkbox/checkbox.component.mjs +18 -18
- package/dist/components/color-mapper/color-mapper.component.mjs +6 -6
- package/dist/components/color-picker/color-picker.component.mjs +71 -71
- package/dist/components/color-picker/color-picker.styles.mjs +4 -2
- package/dist/components/color-stop/color-stop.component.mjs +2 -2
- package/dist/components/date-time-picker/date-time-picker.component.mjs +29 -29
- package/dist/components/diagram-base-node/diagram-base-node.component.mjs +5 -5
- package/dist/components/diagram-minimap/diagram-minimap.component.mjs +6 -6
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.component.mjs +10 -10
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.styles.mjs +3 -1
- package/dist/components/dialog/dialog.component.mjs +1 -1
- package/dist/components/drawer/drawer.component.mjs +19 -19
- package/dist/components/gauge/gauge.component.mjs +4 -2
- package/dist/components/icon/library.mjs +7 -4
- package/dist/components/input/input.component.mjs +16 -11
- package/dist/components/list-item/list-item.component.mjs +17 -17
- package/dist/components/mutation-observer/mutation-observer.component.mjs +4 -6
- package/dist/components/panel-header/panel-header.component.mjs +11 -8
- package/dist/components/popup/popup.component.mjs +11 -11
- package/dist/components/progress-bar/progress-bar.component.mjs +2 -2
- package/dist/components/query-builder/converters/javascript-filter-converter.mjs +0 -4
- package/dist/components/query-builder/converters/map-layer-filter-converter.mjs +0 -4
- package/dist/components/query-builder/query-builder.component.mjs +15 -15
- package/dist/components/radio/radio.component.mjs +7 -7
- package/dist/components/radio-group/radio-group.component.mjs +1 -1
- package/dist/components/resize-observer/resize-observer.component.mjs +1 -1
- package/dist/components/scroll-view/scroll-view.styles.mjs +20 -7
- package/dist/components/select/select.component.mjs +16 -16
- package/dist/components/split-view-toggle-button/split-view-toggle-button.styles.mjs +3 -3
- package/dist/components/stepper/stepper.component.mjs +2 -2
- package/dist/components/stepper-panel/stepper-panel.component.mjs +3 -3
- package/dist/components/switch/switch.component.mjs +6 -8
- package/dist/components/tab/tab.component.mjs +17 -17
- package/dist/components/tab-group/tab-group.component.mjs +42 -38
- package/dist/components/tag/tag.component.mjs +11 -11
- package/dist/components/textarea/textarea.component.mjs +10 -4
- package/dist/components/tree/tree.component.mjs +4 -2
- package/dist/custom-elements.json +1291 -1277
- package/dist/diagram/runtime/default-edge-templates.mjs +9 -9
- package/dist/index.d.mts +25 -6
- package/dist/index.d.ts +25 -6
- package/dist/internal/form.mjs +1 -1
- package/dist/internal/on-off-converter.mjs +21 -0
- package/dist/package.json.mjs +1 -1
- package/dist/vscode.html-custom-data.json +129 -132
- package/package.json +26 -39
- package/themes/dark.css +5 -5
- package/themes/dark.styles.js +5 -5
- package/themes/light.css +5 -5
- package/themes/light.styles.js +5 -5
|
@@ -580,10 +580,10 @@ class FlowUiColorPicker extends FlowRdfFormControl {
|
|
|
580
580
|
tabindex=${this.inline ? "0" : "-1"}
|
|
581
581
|
>
|
|
582
582
|
${this.inline ? html`
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
583
|
+
<flow-ui-visually-hidden id="label">
|
|
584
|
+
<slot name="label">${this.label}</slot>
|
|
585
|
+
</flow-ui-visually-hidden>
|
|
586
|
+
` : null}
|
|
587
587
|
|
|
588
588
|
<div
|
|
589
589
|
part="grid"
|
|
@@ -636,39 +636,39 @@ class FlowUiColorPicker extends FlowRdfFormControl {
|
|
|
636
636
|
</div>
|
|
637
637
|
|
|
638
638
|
${this.opacity ? html`
|
|
639
|
-
<div
|
|
640
|
-
part="slider opacity-slider"
|
|
641
|
-
class="color-picker__alpha color-picker__slider color-picker__transparent-bg"
|
|
642
|
-
@pointerdown="${this.handleAlphaDrag}"
|
|
643
|
-
@touchmove=${this.handleTouchMove}
|
|
644
|
-
>
|
|
645
639
|
<div
|
|
646
|
-
|
|
647
|
-
|
|
640
|
+
part="slider opacity-slider"
|
|
641
|
+
class="color-picker__alpha color-picker__slider color-picker__transparent-bg"
|
|
642
|
+
@pointerdown="${this.handleAlphaDrag}"
|
|
643
|
+
@touchmove=${this.handleTouchMove}
|
|
644
|
+
>
|
|
645
|
+
<div
|
|
646
|
+
class="color-picker__alpha-gradient"
|
|
647
|
+
style=${styleMap({
|
|
648
648
|
backgroundImage: `linear-gradient(
|
|
649
649
|
to right,
|
|
650
650
|
${this.getHexString(this.hue, this.saturation, this.brightness, 0)} 0%
|
|
651
651
|
${this.getHexString(this.hue, this.saturation, this.brightness, 100)} 100%
|
|
652
652
|
)`
|
|
653
653
|
})}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
654
|
+
></div>
|
|
655
|
+
<span
|
|
656
|
+
part="slider-handle opacity-slider-handle"
|
|
657
|
+
class="color-picker__slider-handle"
|
|
658
|
+
style=${styleMap({
|
|
659
659
|
left: `${this.alpha}%`
|
|
660
660
|
})}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
661
|
+
role="slider"
|
|
662
|
+
aria-label="alpha"
|
|
663
|
+
aria-orientation="horizontal"
|
|
664
|
+
aria-valuemin="0"
|
|
665
|
+
aria-valuemax="100"
|
|
666
|
+
aria-valuenow=${Math.round(this.alpha)}
|
|
667
|
+
tabindex=${ifDefined(this.disabled ? void 0 : "0")}
|
|
668
|
+
@keydown=${this.handleAlphaKeyDown}
|
|
669
|
+
></span>
|
|
670
|
+
</div>
|
|
671
|
+
` : ""}
|
|
672
672
|
</div>
|
|
673
673
|
|
|
674
674
|
<button
|
|
@@ -706,74 +706,74 @@ class FlowUiColorPicker extends FlowRdfFormControl {
|
|
|
706
706
|
|
|
707
707
|
<flow-ui-button-group>
|
|
708
708
|
${!this.noFormatToggle ? html`
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
709
|
+
<flow-ui-button
|
|
710
|
+
part="format-button"
|
|
711
|
+
aria-label=${this.localize.term("toggleColorFormat")}
|
|
712
|
+
exportparts="
|
|
713
713
|
base:format-button__base,
|
|
714
714
|
prefix:format-button__prefix,
|
|
715
715
|
label:format-button__label,
|
|
716
716
|
suffix:format-button__suffix,
|
|
717
717
|
caret:format-button__caret
|
|
718
718
|
"
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
719
|
+
@click=${this.handleFormatToggle}
|
|
720
|
+
@flow-ui-blur=${this.stopNestedEventPropagation}
|
|
721
|
+
@flow-ui-focus=${this.stopNestedEventPropagation}
|
|
722
|
+
>
|
|
723
|
+
${this.setLetterCase(this.format)}
|
|
724
|
+
</flow-ui-button>
|
|
725
|
+
` : ""}
|
|
726
726
|
${hasEyeDropper ? html`
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
727
|
+
<flow-ui-button
|
|
728
|
+
part="eye-dropper-button"
|
|
729
|
+
exportparts="
|
|
730
730
|
base:eye-dropper-button__base,
|
|
731
731
|
prefix:eye-dropper-button__prefix,
|
|
732
732
|
label:eye-dropper-button__label,
|
|
733
733
|
suffix:eye-dropper-button__suffix,
|
|
734
734
|
caret:eye-dropper-button__caret
|
|
735
735
|
"
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
736
|
+
@click=${this.handleEyeDropper}
|
|
737
|
+
@flow-ui-blur=${this.stopNestedEventPropagation}
|
|
738
|
+
@flow-ui-focus=${this.stopNestedEventPropagation}
|
|
739
|
+
>
|
|
740
|
+
<flow-ui-icon
|
|
741
|
+
library="system"
|
|
742
|
+
name="eyedropper"
|
|
743
|
+
label=${this.localize.term("selectAColorFromTheScreen")}
|
|
744
|
+
></flow-ui-icon>
|
|
745
|
+
</flow-ui-button>
|
|
746
|
+
` : ""}
|
|
747
747
|
</flow-ui-button-group>
|
|
748
748
|
</div>
|
|
749
749
|
|
|
750
750
|
${swatches.length > 0 ? html`
|
|
751
|
-
|
|
752
|
-
|
|
751
|
+
<div part="swatches" class="color-picker__swatches">
|
|
752
|
+
${swatches.map((swatch) => {
|
|
753
753
|
const parsedColor = this.parseColor(swatch);
|
|
754
754
|
if (!parsedColor) {
|
|
755
755
|
console.error(`Unable to parse swatch color: "${swatch}"`, this);
|
|
756
756
|
return "";
|
|
757
757
|
}
|
|
758
758
|
return html`
|
|
759
|
-
<div
|
|
760
|
-
part="swatch"
|
|
761
|
-
class="color-picker__swatch color-picker__transparent-bg"
|
|
762
|
-
tabindex=${ifDefined(this.disabled ? void 0 : "0")}
|
|
763
|
-
role="button"
|
|
764
|
-
aria-label=${swatch}
|
|
765
|
-
@click=${() => this.selectSwatch(swatch)}
|
|
766
|
-
@keydown=${(event) => !this.disabled && event.key === "Enter" && this.setColor(parsedColor.hexa)}
|
|
767
|
-
>
|
|
768
759
|
<div
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
760
|
+
part="swatch"
|
|
761
|
+
class="color-picker__swatch color-picker__transparent-bg"
|
|
762
|
+
tabindex=${ifDefined(this.disabled ? void 0 : "0")}
|
|
763
|
+
role="button"
|
|
764
|
+
aria-label=${swatch}
|
|
765
|
+
@click=${() => this.selectSwatch(swatch)}
|
|
766
|
+
@keydown=${(event) => event.key === "Enter" && this.selectSwatch(swatch)}
|
|
767
|
+
>
|
|
768
|
+
<div
|
|
769
|
+
class="color-picker__swatch-color"
|
|
770
|
+
style=${styleMap({ backgroundColor: parsedColor.hexa })}
|
|
771
|
+
></div>
|
|
772
|
+
</div>
|
|
773
|
+
`;
|
|
774
774
|
})}
|
|
775
|
-
|
|
776
|
-
|
|
775
|
+
</div>
|
|
776
|
+
` : ""}
|
|
777
777
|
</div>
|
|
778
778
|
`;
|
|
779
779
|
if (this.inline) {
|
|
@@ -38,7 +38,8 @@ const styles = css`
|
|
|
38
38
|
.color-picker__grid {
|
|
39
39
|
position: relative;
|
|
40
40
|
height: var(--grid-height);
|
|
41
|
-
background-image:
|
|
41
|
+
background-image:
|
|
42
|
+
linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),
|
|
42
43
|
linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 100%);
|
|
43
44
|
border-top-left-radius: var(--flow-ui-border-radius-medium);
|
|
44
45
|
border-top-right-radius: var(--flow-ui-border-radius-medium);
|
|
@@ -240,7 +241,8 @@ const styles = css`
|
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
.color-picker__transparent-bg {
|
|
243
|
-
background-image:
|
|
244
|
+
background-image:
|
|
245
|
+
linear-gradient(45deg, var(--flow-ui-color-neutral-300) 25%, transparent 25%),
|
|
244
246
|
linear-gradient(45deg, transparent 75%, var(--flow-ui-color-neutral-300) 75%),
|
|
245
247
|
linear-gradient(45deg, transparent 75%, var(--flow-ui-color-neutral-300) 75%),
|
|
246
248
|
linear-gradient(45deg, var(--flow-ui-color-neutral-300) 25%, transparent 25%);
|
|
@@ -163,8 +163,8 @@ class FlowUiColorStop extends FlowRdfFormControl {
|
|
|
163
163
|
size=${this.size}
|
|
164
164
|
>
|
|
165
165
|
${options.units && html`
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
<span slot="suffix">${options.units}</span>
|
|
167
|
+
`}
|
|
168
168
|
</flow-ui-input>
|
|
169
169
|
`;
|
|
170
170
|
}
|
|
@@ -490,20 +490,20 @@ class FlowUiDateTimePicker extends FlowRdfFormControl {
|
|
|
490
490
|
/>
|
|
491
491
|
|
|
492
492
|
${hasClearIcon ? html`
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
493
|
+
<button
|
|
494
|
+
part="clear-button"
|
|
495
|
+
class="datepicker__clear"
|
|
496
|
+
type="button"
|
|
497
|
+
aria-label=${this.localize.term("clearEntry")}
|
|
498
|
+
@mousedown=${this.handleClearMouseDown}
|
|
499
|
+
@click=${this.handleClearClick}
|
|
500
|
+
tabindex="-1"
|
|
501
|
+
>
|
|
502
|
+
<slot name="clear-icon">
|
|
503
|
+
<flow-ui-icon name="x-circle-fill" library="system"></flow-ui-icon>
|
|
504
|
+
</slot>
|
|
505
|
+
</button>
|
|
506
|
+
` : ""}
|
|
507
507
|
|
|
508
508
|
<slot name="mode-icon" part="mode-icon" class="datepicker__mode-icon">
|
|
509
509
|
<flow-ui-icon
|
|
@@ -515,21 +515,21 @@ class FlowUiDateTimePicker extends FlowRdfFormControl {
|
|
|
515
515
|
|
|
516
516
|
<div part="calendar-container" class="datepicker__calendar-container" tabindex="-1">
|
|
517
517
|
${this.open ? html`
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
518
|
+
<flow-ui-calendar
|
|
519
|
+
value=${this.value}
|
|
520
|
+
display-mode=${this.displayMode}
|
|
521
|
+
?range=${this.range}
|
|
522
|
+
min=${ifDefined(this.min)}
|
|
523
|
+
max=${ifDefined(this.max)}
|
|
524
|
+
max-range=${ifDefined(this.maxRange)}
|
|
525
|
+
size=${this.size}
|
|
526
|
+
months=${this.months}
|
|
527
|
+
timezone=${ifDefined(this.timezone)}
|
|
528
|
+
locale=${ifDefined(this.locale)}
|
|
529
|
+
@flow-ui-input=${this.handleCalendarInput}
|
|
530
|
+
@flow-ui-change=${this.handleCalendarChange}
|
|
531
|
+
></flow-ui-calendar>
|
|
532
|
+
` : nothing}
|
|
533
533
|
</div>
|
|
534
534
|
</flow-ui-popup>
|
|
535
535
|
</div>
|
|
@@ -60,16 +60,16 @@ class FlowUiDiagramBaseNode extends FlowRdfElement {
|
|
|
60
60
|
const selected = !!this.nodeObserver.value?.selected;
|
|
61
61
|
return html`
|
|
62
62
|
${selected ? html`
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
<flow-ui-diagram-rotate-adornment></flow-ui-diagram-rotate-adornment>
|
|
64
|
+
` : nothing}
|
|
65
65
|
<flow-ui-diagram-resize-adornment>
|
|
66
66
|
<div part="base" class=${classMap({ node: true, "node--selected": selected })}>
|
|
67
67
|
<slot></slot>
|
|
68
68
|
</div>
|
|
69
69
|
${this.defaultPortsRemoved ? nothing : html`
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
<flow-ui-diagram-port id="port-left" type="both" side="left"></flow-ui-diagram-port>
|
|
71
|
+
<flow-ui-diagram-port id="port-right" type="both" side="right"></flow-ui-diagram-port>
|
|
72
|
+
`}
|
|
73
73
|
</flow-ui-diagram-resize-adornment>
|
|
74
74
|
`;
|
|
75
75
|
}
|
|
@@ -155,12 +155,12 @@ class FlowUiDiagramMinimap extends FlowRdfElement {
|
|
|
155
155
|
</svg>
|
|
156
156
|
</div>
|
|
157
157
|
${this.showZoomControls && initialized ? html`
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
<flow-ui-diagram-zoom-controls
|
|
159
|
+
part="zoom-controls"
|
|
160
|
+
class="minimap__zoom-controls"
|
|
161
|
+
.diagram=${this.reference.target}
|
|
162
|
+
></flow-ui-diagram-zoom-controls>
|
|
163
|
+
` : nothing}
|
|
164
164
|
</div>
|
|
165
165
|
`;
|
|
166
166
|
}
|
|
@@ -125,16 +125,16 @@ class FlowUiDiagramZoomControls extends FlowRdfElement {
|
|
|
125
125
|
@click=${this.zoomIn}
|
|
126
126
|
></flow-ui-icon-button>
|
|
127
127
|
${this.showFit ? html`
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
<flow-ui-icon-button
|
|
129
|
+
part="fit"
|
|
130
|
+
class="nav-button"
|
|
131
|
+
library="system"
|
|
132
|
+
name="expand"
|
|
133
|
+
label="Fit to view"
|
|
134
|
+
?disabled=${!canFit}
|
|
135
|
+
@click=${this.fit}
|
|
136
|
+
></flow-ui-icon-button>
|
|
137
|
+
` : nothing}
|
|
138
138
|
</div>
|
|
139
139
|
`;
|
|
140
140
|
}
|
|
@@ -46,7 +46,9 @@ const styles = css`
|
|
|
46
46
|
.nav-button::part(base) {
|
|
47
47
|
padding: var(--flow-ui-diagram-nav-button-padding);
|
|
48
48
|
border-radius: var(--flow-ui-diagram-nav-button-border-radius);
|
|
49
|
-
transition:
|
|
49
|
+
transition:
|
|
50
|
+
var(--flow-ui-transition-x-fast) color,
|
|
51
|
+
var(--flow-ui-transition-x-fast) background-color;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
.nav-button:not([disabled])::part(base):hover {
|
|
@@ -237,7 +237,7 @@ class FlowUiDialog extends FlowRdfElement {
|
|
|
237
237
|
aria-modal="true"
|
|
238
238
|
aria-hidden=${this.open ? "false" : "true"}
|
|
239
239
|
aria-label=${ifDefined(this.noHeader ? this.title : void 0)}
|
|
240
|
-
aria-labelledby=${ifDefined(!this.noHeader ? "
|
|
240
|
+
aria-labelledby=${ifDefined(!this.noHeader ? "heading" : void 0)}
|
|
241
241
|
tabindex="0"
|
|
242
242
|
>
|
|
243
243
|
${this.tabbed ? this.renderTabContainer() : this.renderDefaultContainer()}
|
|
@@ -206,25 +206,25 @@ class FlowUiDrawer extends FlowRdfElement {
|
|
|
206
206
|
tabindex="0"
|
|
207
207
|
>
|
|
208
208
|
${!this.noHeader ? html`
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
209
|
+
<header part="header" class="drawer__header">
|
|
210
|
+
<h2 part="title" class="drawer__title" id="title">
|
|
211
|
+
<!-- If there's no label, use an invisible character to prevent the header from collapsing -->
|
|
212
|
+
<slot name="label">${this.label.length > 0 ? this.label : String.fromCharCode(65279)}</slot>
|
|
213
|
+
</h2>
|
|
214
|
+
<div part="header-actions" class="drawer__header-actions">
|
|
215
|
+
<slot name="header-actions"></slot>
|
|
216
|
+
<flow-ui-icon-button
|
|
217
|
+
part="close-button"
|
|
218
|
+
exportparts="base:close-button__base"
|
|
219
|
+
class="drawer__close"
|
|
220
|
+
name="x-lg"
|
|
221
|
+
label=${this.localize.term("close")}
|
|
222
|
+
library="system"
|
|
223
|
+
@click=${() => this.requestClose("close-button")}
|
|
224
|
+
></flow-ui-icon-button>
|
|
225
|
+
</div>
|
|
226
|
+
</header>
|
|
227
|
+
` : ""}
|
|
228
228
|
|
|
229
229
|
<slot part="body" class="drawer__body"></slot>
|
|
230
230
|
|
|
@@ -54,10 +54,12 @@ class FlowUiGauge extends FlowRdfElement {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
showInfoDialog() {
|
|
57
|
-
|
|
57
|
+
if (this._infoDialog)
|
|
58
|
+
this._infoDialog.show();
|
|
58
59
|
}
|
|
59
60
|
hideInfoDialog() {
|
|
60
|
-
|
|
61
|
+
if (this._infoDialog)
|
|
62
|
+
this._infoDialog.hide();
|
|
61
63
|
}
|
|
62
64
|
headerIconTemplate() {
|
|
63
65
|
return this.icon ? html`
|
|
@@ -2,8 +2,11 @@ import { library } from './library.default.mjs';
|
|
|
2
2
|
export { addIcons } from './library.default.mjs';
|
|
3
3
|
import systemLibrary from './library.system.mjs';
|
|
4
4
|
|
|
5
|
-
let registry
|
|
5
|
+
let registry;
|
|
6
6
|
let watchedIcons = [];
|
|
7
|
+
function getRegistry() {
|
|
8
|
+
return registry ?? (registry = [library, systemLibrary]);
|
|
9
|
+
}
|
|
7
10
|
function watchIcon(icon) {
|
|
8
11
|
watchedIcons.push(icon);
|
|
9
12
|
}
|
|
@@ -11,11 +14,11 @@ function unwatchIcon(icon) {
|
|
|
11
14
|
watchedIcons = watchedIcons.filter((el) => el !== icon);
|
|
12
15
|
}
|
|
13
16
|
function getIconLibrary(name) {
|
|
14
|
-
return
|
|
17
|
+
return getRegistry().find((lib) => lib.name === name);
|
|
15
18
|
}
|
|
16
19
|
function registerIconLibrary(name, options) {
|
|
17
20
|
unregisterIconLibrary(name);
|
|
18
|
-
|
|
21
|
+
getRegistry().push({
|
|
19
22
|
name,
|
|
20
23
|
resolver: options.resolver,
|
|
21
24
|
mutator: options.mutator
|
|
@@ -32,7 +35,7 @@ function redrawWatchedIcons() {
|
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
function unregisterIconLibrary(name) {
|
|
35
|
-
registry =
|
|
38
|
+
registry = getRegistry().filter((lib) => lib.name !== name);
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
export { getIconLibrary, redrawWatchedIcons, registerIconLibrary, unregisterIconLibrary, unwatchIcon, watchIcon };
|
|
@@ -8,6 +8,7 @@ import { boolean } from '../../internal/boolean.mjs';
|
|
|
8
8
|
import { defaultValue } from '../../internal/default-value.mjs';
|
|
9
9
|
import { FlowRdfFormControl } from '../../internal/flow-ui-rdf-element.mjs';
|
|
10
10
|
import { FormControlController } from '../../internal/form.mjs';
|
|
11
|
+
import onOffConverter from '../../internal/on-off-converter.mjs';
|
|
11
12
|
import { HasSlotController } from '../../internal/slot.mjs';
|
|
12
13
|
import { isStringFull, isNil, isNumber, isNumeric, isNumberLike } from '../../internal/type-checks.mjs';
|
|
13
14
|
import { watch } from '../../internal/watch.mjs';
|
|
@@ -221,7 +222,11 @@ class FlowUiInput extends FlowRdfFormControl {
|
|
|
221
222
|
}
|
|
222
223
|
/** Replaces a range of text with a new string. */
|
|
223
224
|
setRangeText(replacement, start, end, selectMode) {
|
|
224
|
-
|
|
225
|
+
if (start === void 0 || end === void 0) {
|
|
226
|
+
this.input.setRangeText(replacement);
|
|
227
|
+
} else {
|
|
228
|
+
this.input.setRangeText(replacement, start, end, selectMode);
|
|
229
|
+
}
|
|
225
230
|
if (this.value !== this.input.value) {
|
|
226
231
|
this.value = this.fromDisplayValue(this.input.value);
|
|
227
232
|
}
|
|
@@ -367,7 +372,7 @@ class FlowUiInput extends FlowRdfFormControl {
|
|
|
367
372
|
.value=${live(this.toDisplayValue(this.value))}
|
|
368
373
|
autocapitalize=${ifDefined(this.autocapitalize)}
|
|
369
374
|
autocomplete=${ifDefined(this.autocomplete)}
|
|
370
|
-
autocorrect=${ifDefined(this.autocorrect)}
|
|
375
|
+
autocorrect=${ifDefined(onOffConverter.toAttribute(this.autocorrect))}
|
|
371
376
|
?autofocus=${this.autofocus}
|
|
372
377
|
spellcheck=${this.spellcheck}
|
|
373
378
|
pattern=${ifDefined(this.pattern)}
|
|
@@ -411,14 +416,14 @@ class FlowUiInput extends FlowRdfFormControl {
|
|
|
411
416
|
tabindex="-1"
|
|
412
417
|
>
|
|
413
418
|
${this.passwordVisible ? html`
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
419
|
+
<slot name="show-password-icon">
|
|
420
|
+
<flow-ui-icon name="eye-slash" library="system"></flow-ui-icon>
|
|
421
|
+
</slot>
|
|
422
|
+
` : html`
|
|
423
|
+
<slot name="hide-password-icon">
|
|
424
|
+
<flow-ui-icon name="eye" library="system"></flow-ui-icon>
|
|
425
|
+
</slot>
|
|
426
|
+
`}
|
|
422
427
|
</button>
|
|
423
428
|
` : ""}
|
|
424
429
|
|
|
@@ -552,7 +557,7 @@ __decorateClass([
|
|
|
552
557
|
property()
|
|
553
558
|
], FlowUiInput.prototype, "autocapitalize", 2);
|
|
554
559
|
__decorateClass([
|
|
555
|
-
property()
|
|
560
|
+
property({ converter: onOffConverter })
|
|
556
561
|
], FlowUiInput.prototype, "autocorrect", 2);
|
|
557
562
|
__decorateClass([
|
|
558
563
|
property()
|
|
@@ -158,17 +158,17 @@ class FlowUiListItem extends FlowRdfElement {
|
|
|
158
158
|
></flow-ui-icon-button>
|
|
159
159
|
<flow-ui-menu @flow-ui-select=${this.handleMenuSelect}>
|
|
160
160
|
${this.editable ? html`
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
<flow-ui-menu-item value="edit">${this.editMenuName}</flow-ui-menu-item>
|
|
162
|
+
` : nothing}
|
|
163
163
|
${this.removable ? html`
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
<flow-ui-menu-item value="remove">Delete</flow-ui-menu-item>
|
|
165
|
+
` : nothing}
|
|
166
166
|
${hasCustomMenuDivider ? html`
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
<flow-ui-divider></flow-ui-divider>
|
|
168
|
+
` : nothing}
|
|
169
169
|
${this.hasSlotController.test("menu") ? html`
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
<slot name="menu"></slot>
|
|
171
|
+
` : nothing}
|
|
172
172
|
</flow-ui-menu>
|
|
173
173
|
<slot name="menu"></slot>
|
|
174
174
|
</flow-ui-dropdown>
|
|
@@ -192,15 +192,15 @@ class FlowUiListItem extends FlowRdfElement {
|
|
|
192
192
|
})}
|
|
193
193
|
>
|
|
194
194
|
${this.reorder ? html`
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
195
|
+
<flow-ui-icon
|
|
196
|
+
part="reorder-icon"
|
|
197
|
+
name="bars"
|
|
198
|
+
library="system"
|
|
199
|
+
class="list-item__reorder-icon"
|
|
200
|
+
@pointerdown=${this.handleReorderPointerDown}
|
|
201
|
+
@pointerup=${this.handleReorderPointerUp}
|
|
202
|
+
></flow-ui-icon>
|
|
203
|
+
` : nothing}
|
|
204
204
|
<slot name="prefix" part="prefix" class="list-item__prefix"></slot>
|
|
205
205
|
|
|
206
206
|
<flow-ui-input
|
|
@@ -74,7 +74,9 @@ class FlowUiMutationObserver extends FlowRdfElement {
|
|
|
74
74
|
}
|
|
75
75
|
handleChange() {
|
|
76
76
|
this.stopObserver();
|
|
77
|
-
this.
|
|
77
|
+
if (!this.disabled) {
|
|
78
|
+
this.startObserver();
|
|
79
|
+
}
|
|
78
80
|
}
|
|
79
81
|
render() {
|
|
80
82
|
return html`
|
|
@@ -106,11 +108,7 @@ __decorateClass([
|
|
|
106
108
|
watch("disabled")
|
|
107
109
|
], FlowUiMutationObserver.prototype, "handleDisabledChange", 1);
|
|
108
110
|
__decorateClass([
|
|
109
|
-
watch("attr", { waitUntilFirstUpdate: true })
|
|
110
|
-
watch("attr-old-value", { waitUntilFirstUpdate: true }),
|
|
111
|
-
watch("char-data", { waitUntilFirstUpdate: true }),
|
|
112
|
-
watch("char-data-old-value", { waitUntilFirstUpdate: true }),
|
|
113
|
-
watch("childList", { waitUntilFirstUpdate: true })
|
|
111
|
+
watch(["attr", "attrOldValue", "charData", "charDataOldValue", "childList"], { waitUntilFirstUpdate: true })
|
|
114
112
|
], FlowUiMutationObserver.prototype, "handleChange", 1);
|
|
115
113
|
|
|
116
114
|
export { FlowUiMutationObserver as default };
|