@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
|
@@ -51,6 +51,7 @@ class FlowUiPanelHeader extends FlowRdfElement {
|
|
|
51
51
|
if (this.fixed) {
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
+
const wasClosed = this.closed;
|
|
54
55
|
if (event.key === "Enter" || event.key === " ") {
|
|
55
56
|
event.preventDefault();
|
|
56
57
|
this.closed = !this.closed;
|
|
@@ -63,7 +64,9 @@ class FlowUiPanelHeader extends FlowRdfElement {
|
|
|
63
64
|
event.preventDefault();
|
|
64
65
|
this.closed = false;
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
+
if (this.closed !== wasClosed) {
|
|
68
|
+
this.emit(this.closed ? "flow-ui-collapse" : "flow-ui-expand");
|
|
69
|
+
}
|
|
67
70
|
}
|
|
68
71
|
handleExpandCollapse() {
|
|
69
72
|
this.closed = this.toggleButton.closed;
|
|
@@ -109,13 +112,13 @@ class FlowUiPanelHeader extends FlowRdfElement {
|
|
|
109
112
|
@keydown=${this.handleHeaderKeyDown}
|
|
110
113
|
></slot>
|
|
111
114
|
${this.fixed ? nothing : html`
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
<flow-ui-split-view-toggle-button
|
|
116
|
+
class="panel-header__toggle-button"
|
|
117
|
+
position="top"
|
|
118
|
+
?closed=${this.closed}
|
|
119
|
+
@click=${this.handleToggleClick}
|
|
120
|
+
></flow-ui-split-view-toggle-button>
|
|
121
|
+
`}
|
|
119
122
|
</div>
|
|
120
123
|
`;
|
|
121
124
|
}
|
|
@@ -46,14 +46,14 @@ class FlowUiPopup extends FlowRdfElement {
|
|
|
46
46
|
const anchorRect = this.anchorEl.getBoundingClientRect();
|
|
47
47
|
const popupRect = this.popup.getBoundingClientRect();
|
|
48
48
|
const isVertical = this.placement.includes("top") || this.placement.includes("bottom");
|
|
49
|
-
let topLeftX
|
|
50
|
-
let topLeftY
|
|
51
|
-
let topRightX
|
|
52
|
-
let topRightY
|
|
53
|
-
let bottomLeftX
|
|
54
|
-
let bottomLeftY
|
|
55
|
-
let bottomRightX
|
|
56
|
-
let bottomRightY
|
|
49
|
+
let topLeftX;
|
|
50
|
+
let topLeftY;
|
|
51
|
+
let topRightX;
|
|
52
|
+
let topRightY;
|
|
53
|
+
let bottomLeftX;
|
|
54
|
+
let bottomLeftY;
|
|
55
|
+
let bottomRightX;
|
|
56
|
+
let bottomRightY;
|
|
57
57
|
if (isVertical) {
|
|
58
58
|
if (anchorRect.top < popupRect.top) {
|
|
59
59
|
topLeftX = anchorRect.left;
|
|
@@ -274,7 +274,7 @@ class FlowUiPopup extends FlowRdfElement {
|
|
|
274
274
|
let top = "";
|
|
275
275
|
let right = "";
|
|
276
276
|
let bottom = "";
|
|
277
|
-
let left
|
|
277
|
+
let left;
|
|
278
278
|
if (this.arrowPlacement === "start") {
|
|
279
279
|
const value = typeof arrowX === "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
|
|
280
280
|
top = typeof arrowY === "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
|
|
@@ -327,8 +327,8 @@ class FlowUiPopup extends FlowRdfElement {
|
|
|
327
327
|
>
|
|
328
328
|
<slot></slot>
|
|
329
329
|
${this.arrow ? html`
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
<div part="arrow" class="popup__arrow" role="presentation"></div>
|
|
331
|
+
` : ""}
|
|
332
332
|
</div>
|
|
333
333
|
`;
|
|
334
334
|
}
|
|
@@ -47,8 +47,8 @@ class FlowUiProgressBar extends FlowRdfElement {
|
|
|
47
47
|
</div>
|
|
48
48
|
<div class="progress-bar__label-container">
|
|
49
49
|
${!this.indeterminate ? html`
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
<slot part="label" class="progress-bar__label"></slot>
|
|
51
|
+
` : ""}
|
|
52
52
|
</div>
|
|
53
53
|
`;
|
|
54
54
|
}
|
|
@@ -41,10 +41,6 @@ function rulesetToJavascript(rule, config, options) {
|
|
|
41
41
|
console.warn(`JavascriptFilterConverter: Skipping nil field '${rule.field}' in rule (non-nullable)`, rule);
|
|
42
42
|
return void 0;
|
|
43
43
|
}
|
|
44
|
-
let fieldName = rule.field;
|
|
45
|
-
if (options?.renameFields && fieldName in options.renameFields) {
|
|
46
|
-
fieldName = options.renameFields[fieldName];
|
|
47
|
-
}
|
|
48
44
|
return predicateFromRule(rule, config, options);
|
|
49
45
|
} else if (isRuleSet(rule)) {
|
|
50
46
|
const condition = rule.condition === "and" ? " && " : " || ";
|
|
@@ -20,10 +20,6 @@ function mapLayerFilterFromRuleSet(rule, config, options) {
|
|
|
20
20
|
console.warn(`mapLayerFilterConverter: Skipping nil field '${rule.field}' in rule (non-nullable)`, rule);
|
|
21
21
|
return void 0;
|
|
22
22
|
}
|
|
23
|
-
let fieldName = rule.field;
|
|
24
|
-
if (options?.renameFields && fieldName in options.renameFields) {
|
|
25
|
-
fieldName = options.renameFields[fieldName];
|
|
26
|
-
}
|
|
27
23
|
return predicateFromRule(rule, config, options);
|
|
28
24
|
} else if (isRuleSet(rule)) {
|
|
29
25
|
const condition = rule.condition === "and" ? " && " : " || ";
|
|
@@ -280,10 +280,10 @@ const _FlowUiQueryBuilder = class _FlowUiQueryBuilder extends FlowRdfElement {
|
|
|
280
280
|
<div class="spacer"></div>
|
|
281
281
|
|
|
282
282
|
${this.hasSlotController.test("header-accessory") ? html`
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
283
|
+
<div part="header-accessories" class="query-builder__header-accessories">
|
|
284
|
+
<slot name="header-accessory"></slot>
|
|
285
|
+
</div>
|
|
286
|
+
` : nothing}
|
|
287
287
|
|
|
288
288
|
<flow-ui-dropdown placement="bottom-end" class="query-builder__menu-dropdown">
|
|
289
289
|
<flow-ui-icon-button
|
|
@@ -294,20 +294,20 @@ const _FlowUiQueryBuilder = class _FlowUiQueryBuilder extends FlowRdfElement {
|
|
|
294
294
|
></flow-ui-icon-button>
|
|
295
295
|
<flow-ui-menu @flow-ui-select=${(ev) => this.handleToolbarMenuSelect(ev)}>
|
|
296
296
|
${this.hasSlotController.test("menu") ? html`
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
<slot name="menu"></slot>
|
|
298
|
+
<flow-ui-divider></flow-ui-divider>
|
|
299
|
+
` : nothing}
|
|
300
300
|
<flow-ui-menu-item value="add-group">Add Filter Group</flow-ui-menu-item>
|
|
301
301
|
${this.subQueryBuilder ? html`
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
302
|
+
<flow-ui-divider></flow-ui-divider>
|
|
303
|
+
<flow-ui-menu-item value="delete-group" class="menu-item--danger">
|
|
304
|
+
Delete Filter Group
|
|
305
|
+
</flow-ui-menu-item>
|
|
306
|
+
` : nothing}
|
|
307
307
|
${this.subQueryBuilder ? nothing : html`
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
<flow-ui-divider></flow-ui-divider>
|
|
309
|
+
<flow-ui-menu-item value="clear-filters" class="menu-item--danger">Clear Filters</flow-ui-menu-item>
|
|
310
|
+
`}
|
|
311
311
|
</flow-ui-menu>
|
|
312
312
|
</flow-ui-dropdown>
|
|
313
313
|
</div>
|
|
@@ -99,13 +99,13 @@ class FlowUiRadio extends FlowRdfElement {
|
|
|
99
99
|
>
|
|
100
100
|
<span part="${`control${this.checked ? " control--checked" : ""}`}" class="radio__control">
|
|
101
101
|
${this.checked ? html`
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
<flow-ui-icon
|
|
103
|
+
part="checked-icon"
|
|
104
|
+
class="radio__checked-icon"
|
|
105
|
+
library="system"
|
|
106
|
+
name="radio"
|
|
107
|
+
></flow-ui-icon>
|
|
108
|
+
` : ""}
|
|
109
109
|
</span>
|
|
110
110
|
|
|
111
111
|
<slot part="label" class="radio__label"></slot>
|
|
@@ -136,7 +136,7 @@ class FlowUiRadioGroup extends FlowRdfFormControl {
|
|
|
136
136
|
radio.reverse = this.reverse;
|
|
137
137
|
radio.size = this.size;
|
|
138
138
|
});
|
|
139
|
-
if (!radios.some((radio) => radio.checked)) {
|
|
139
|
+
if (radios.length > 0 && !radios.some((radio) => radio.checked)) {
|
|
140
140
|
radios[0].tabIndex = 0;
|
|
141
141
|
}
|
|
142
142
|
} else {
|
|
@@ -34,23 +34,36 @@ const styles = css`
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.os-scrollbar.os-theme-flow {
|
|
37
|
-
transition:
|
|
38
|
-
|
|
37
|
+
transition:
|
|
38
|
+
opacity var(--transition-speed),
|
|
39
|
+
visibility var(--transition-speed),
|
|
40
|
+
top var(--transition-speed),
|
|
41
|
+
right var(--transition-speed),
|
|
42
|
+
bottom var(--transition-speed),
|
|
43
|
+
left var(--transition-speed);
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
.os-scrollbar.os-theme-flow .os-scrollbar-track {
|
|
42
|
-
transition:
|
|
47
|
+
transition:
|
|
48
|
+
opacity var(--transition-speed),
|
|
49
|
+
background-color var(--transition-speed),
|
|
43
50
|
border-color var(--transition-speed);
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
.os-scrollbar-horizontal.os-theme-flow .os-scrollbar-handle {
|
|
47
|
-
transition:
|
|
48
|
-
|
|
54
|
+
transition:
|
|
55
|
+
opacity var(--transition-speed),
|
|
56
|
+
background-color var(--transition-speed),
|
|
57
|
+
border-color var(--transition-speed),
|
|
58
|
+
height var(--transition-speed);
|
|
49
59
|
}
|
|
50
60
|
|
|
51
61
|
.os-scrollbar-vertical.os-theme-flow .os-scrollbar-handle {
|
|
52
|
-
transition:
|
|
53
|
-
|
|
62
|
+
transition:
|
|
63
|
+
opacity var(--transition-speed),
|
|
64
|
+
background-color var(--transition-speed),
|
|
65
|
+
border-colorvar(--transition-speed),
|
|
66
|
+
width var(--transition-speed);
|
|
54
67
|
}
|
|
55
68
|
`;
|
|
56
69
|
|
|
@@ -626,8 +626,8 @@ class FlowUiSelect extends FlowRdfFormControl {
|
|
|
626
626
|
</div>
|
|
627
627
|
|
|
628
628
|
${this.multiple ? html`
|
|
629
|
-
|
|
630
|
-
|
|
629
|
+
<div part="tags" class="select__tags">${this.tags}</div>
|
|
630
|
+
` : ""}
|
|
631
631
|
|
|
632
632
|
<input
|
|
633
633
|
class="select__value-input"
|
|
@@ -642,20 +642,20 @@ class FlowUiSelect extends FlowRdfFormControl {
|
|
|
642
642
|
/>
|
|
643
643
|
|
|
644
644
|
${hasClearIcon ? html`
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
645
|
+
<button
|
|
646
|
+
part="clear-button"
|
|
647
|
+
class="select__clear"
|
|
648
|
+
type="button"
|
|
649
|
+
aria-label=${this.localize.term("clearEntry")}
|
|
650
|
+
@mousedown=${this.handleClearMouseDown}
|
|
651
|
+
@click=${this.handleClearClick}
|
|
652
|
+
tabindex="-1"
|
|
653
|
+
>
|
|
654
|
+
<slot name="clear-icon">
|
|
655
|
+
<flow-ui-icon name="x-circle-fill" library="system"></flow-ui-icon>
|
|
656
|
+
</slot>
|
|
657
|
+
</button>
|
|
658
|
+
` : ""}
|
|
659
659
|
|
|
660
660
|
<slot name="suffix" part="suffix" class="select__suffix"></slot>
|
|
661
661
|
|
|
@@ -9,17 +9,17 @@ const styles = css`
|
|
|
9
9
|
--open-rotation: 180deg;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
:host([position='right'])
|
|
12
|
+
:host([position='right']) {
|
|
13
13
|
--closed-rotation: 180deg;
|
|
14
14
|
--open-rotation: 0deg;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
:host([position='top'])
|
|
17
|
+
:host([position='top']) {
|
|
18
18
|
--closed-rotation: 0deg;
|
|
19
19
|
--open-rotation: 90deg;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
:host([position='bottom'])
|
|
22
|
+
:host([position='bottom']) {
|
|
23
23
|
--closed-rotation: 0deg;
|
|
24
24
|
--open-rotation: 90deg;
|
|
25
25
|
}
|
|
@@ -96,8 +96,8 @@ class FlowUiStepper extends FlowRdfElement {
|
|
|
96
96
|
<div class="stepper__header-item-label">
|
|
97
97
|
<div class="stepper__header-item-title">${capitalize(panel.name)}</div>
|
|
98
98
|
${panel.subTitle ? html`
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
<div class="stepper__header-item-subtitle">${panel.subTitle}</div>
|
|
100
|
+
` : nothing}
|
|
101
101
|
</div>
|
|
102
102
|
</div>
|
|
103
103
|
`;
|
|
@@ -36,7 +36,7 @@ class FlowUiStepperPanel extends FlowRdfElement {
|
|
|
36
36
|
this.id = isStringFull(this.id) ? this.id : this.componentId;
|
|
37
37
|
this.setAttribute("role", "tabpanel");
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
handleActiveChange() {
|
|
40
40
|
this.setAttribute("aria-hidden", this.active ? "false" : "true");
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
@@ -67,7 +67,7 @@ __decorateClass([
|
|
|
67
67
|
property({ reflect: true, type: Boolean })
|
|
68
68
|
], FlowUiStepperPanel.prototype, "complete", 2);
|
|
69
69
|
__decorateClass([
|
|
70
|
-
watch("
|
|
71
|
-
], FlowUiStepperPanel.prototype, "
|
|
70
|
+
watch("active")
|
|
71
|
+
], FlowUiStepperPanel.prototype, "handleActiveChange", 1);
|
|
72
72
|
|
|
73
73
|
export { FlowUiStepperPanel as default };
|
|
@@ -81,15 +81,13 @@ class FlowUiSwitch extends FlowRdfFormControl {
|
|
|
81
81
|
this.emit("flow-ui-focus");
|
|
82
82
|
}
|
|
83
83
|
handleKeyDown(event) {
|
|
84
|
-
if (event.key
|
|
85
|
-
|
|
86
|
-
this.checked = false;
|
|
87
|
-
this.emit("flow-ui-change");
|
|
88
|
-
this.emit("flow-ui-input");
|
|
84
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
|
|
85
|
+
return;
|
|
89
86
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
const checked = event.key === "ArrowRight";
|
|
89
|
+
if (this.checked !== checked) {
|
|
90
|
+
this.checked = checked;
|
|
93
91
|
this.emit("flow-ui-change");
|
|
94
92
|
this.emit("flow-ui-input");
|
|
95
93
|
}
|
|
@@ -82,26 +82,26 @@ class FlowUiTab extends FlowRdfElement {
|
|
|
82
82
|
>
|
|
83
83
|
<div class="tab__label-wrapper">
|
|
84
84
|
${hasIcon ? html`
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
<div class="tab__icon" part="icon"><slot name="icon"></slot></div>
|
|
86
|
+
` : ""}
|
|
87
87
|
${this.iconOnly ? "" : html`
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
<div class="tab__label" part="label">
|
|
89
|
+
<slot></slot>
|
|
90
|
+
</div>
|
|
91
|
+
`}
|
|
92
92
|
</div>
|
|
93
93
|
${this.closable ? html`
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
94
|
+
<flow-ui-icon-button
|
|
95
|
+
part="close-button"
|
|
96
|
+
exportparts="base:close-button__base"
|
|
97
|
+
name="x-lg"
|
|
98
|
+
library="system"
|
|
99
|
+
label=${this.localize.term("close")}
|
|
100
|
+
class="tab__close-button"
|
|
101
|
+
@click=${this.handleCloseClick}
|
|
102
|
+
tabindex="-1"
|
|
103
|
+
></flow-ui-icon-button>
|
|
104
|
+
` : ""}
|
|
105
105
|
</div>
|
|
106
106
|
`;
|
|
107
107
|
if (this.iconOnly) {
|
|
@@ -102,6 +102,7 @@ class FlowUiTabGroup extends FlowRdfElement {
|
|
|
102
102
|
updated(changed) {
|
|
103
103
|
super.updated(changed);
|
|
104
104
|
if (changed.has("placement")) {
|
|
105
|
+
this.tabs.forEach((tab) => tab.placement = this.placement);
|
|
105
106
|
this.observeContent();
|
|
106
107
|
} else if (this.contentObserver && changed.has("closed")) {
|
|
107
108
|
dispatchContentResize(this);
|
|
@@ -464,26 +465,29 @@ class FlowUiTabGroup extends FlowRdfElement {
|
|
|
464
465
|
<div class="tab-group__track"></div>
|
|
465
466
|
|
|
466
467
|
${this.hasSlotController.test("nav-accessories-start") ? html`
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
468
|
+
<div
|
|
469
|
+
class="tab-group__nav-accessories tab-group__nav-accessories--start"
|
|
470
|
+
part="nav-accessories-start"
|
|
471
|
+
>
|
|
472
|
+
<slot name="nav-accessories-start"></slot>
|
|
473
|
+
</div>
|
|
474
|
+
<flow-ui-divider
|
|
475
|
+
class="tab-group__accessory-divider"
|
|
476
|
+
part="accessory-divider"
|
|
477
|
+
?vertical=${this.isHorizontal()}
|
|
478
|
+
></flow-ui-divider>
|
|
479
|
+
` : ""}
|
|
476
480
|
${this.hasScrollControls ? html`
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
481
|
+
<flow-ui-icon-button
|
|
482
|
+
part="scroll-button scroll-button--start"
|
|
483
|
+
exportparts="base:scroll-button__base"
|
|
484
|
+
class="tab-group__scroll-button tab-group__scroll-button--start"
|
|
485
|
+
name=${this.isHorizontal() ? isRtl ? "chevron-right" : "chevron-left" : "chevron-up"}
|
|
486
|
+
library="system"
|
|
487
|
+
label=${this.localize.term("scrollToStart")}
|
|
488
|
+
@click=${this.handleScrollToStart}
|
|
489
|
+
></flow-ui-icon-button>
|
|
490
|
+
` : ""}
|
|
487
491
|
|
|
488
492
|
<div class="tab-group__nav">
|
|
489
493
|
<div part="tabs" class="tab-group__tabs" role="tablist">
|
|
@@ -493,26 +497,26 @@ class FlowUiTabGroup extends FlowRdfElement {
|
|
|
493
497
|
</div>
|
|
494
498
|
|
|
495
499
|
${this.hasScrollControls ? html`
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
500
|
+
<flow-ui-icon-button
|
|
501
|
+
part="scroll-button scroll-button--end"
|
|
502
|
+
exportparts="base:scroll-button__base"
|
|
503
|
+
class="tab-group__scroll-button tab-group__scroll-button--end"
|
|
504
|
+
name=${this.isHorizontal() ? isRtl ? "chevron-left" : "chevron-right" : "chevron-down"}
|
|
505
|
+
library="system"
|
|
506
|
+
label=${this.localize.term("scrollToEnd")}
|
|
507
|
+
@click=${this.handleScrollToEnd}
|
|
508
|
+
></flow-ui-icon-button>
|
|
509
|
+
` : ""}
|
|
506
510
|
${this.hasSlotController.test("nav-accessories-end") ? html`
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
511
|
+
<flow-ui-divider
|
|
512
|
+
class="tab-group__accessory-divider"
|
|
513
|
+
part="accessory-divider"
|
|
514
|
+
?vertical=${this.isHorizontal()}
|
|
515
|
+
></flow-ui-divider>
|
|
516
|
+
<div class="tab-group__nav-accessories tab-group__nav-accessories--end" part="nav-accessories-end">
|
|
517
|
+
<slot name="nav-accessories-end"></slot>
|
|
518
|
+
</div>
|
|
519
|
+
` : ""}
|
|
516
520
|
</div>
|
|
517
521
|
|
|
518
522
|
<div
|
|
@@ -61,17 +61,17 @@ class FlowUiTag extends FlowRdfElement {
|
|
|
61
61
|
<slot part="content" class="tag__content"></slot>
|
|
62
62
|
|
|
63
63
|
${this.removable ? html`
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
<flow-ui-icon-button
|
|
65
|
+
part="remove-button"
|
|
66
|
+
exportparts="base:remove-button__base"
|
|
67
|
+
name="x-lg"
|
|
68
|
+
library="system"
|
|
69
|
+
label=${this.localize.term("remove")}
|
|
70
|
+
class="tag__remove"
|
|
71
|
+
@click=${this.handleRemoveClick}
|
|
72
|
+
tabindex="-1"
|
|
73
|
+
></flow-ui-icon-button>
|
|
74
|
+
` : ""}
|
|
75
75
|
</span>
|
|
76
76
|
`;
|
|
77
77
|
}
|
|
@@ -7,6 +7,7 @@ import { boolean } from '../../internal/boolean.mjs';
|
|
|
7
7
|
import { defaultValue } from '../../internal/default-value.mjs';
|
|
8
8
|
import { FlowRdfFormControl } from '../../internal/flow-ui-rdf-element.mjs';
|
|
9
9
|
import { FormControlController } from '../../internal/form.mjs';
|
|
10
|
+
import onOffConverter from '../../internal/on-off-converter.mjs';
|
|
10
11
|
import { HasSlotController } from '../../internal/slot.mjs';
|
|
11
12
|
import { watch } from '../../internal/watch.mjs';
|
|
12
13
|
import styles from './textarea.styles.mjs';
|
|
@@ -138,7 +139,7 @@ class FlowUiTextarea extends FlowRdfFormControl {
|
|
|
138
139
|
}
|
|
139
140
|
return {
|
|
140
141
|
top: this.input.scrollTop,
|
|
141
|
-
left: this.input.
|
|
142
|
+
left: this.input.scrollLeft
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
145
|
/** Sets the start and end positions of the text selection (0-based). */
|
|
@@ -147,7 +148,11 @@ class FlowUiTextarea extends FlowRdfFormControl {
|
|
|
147
148
|
}
|
|
148
149
|
/** Replaces a range of text with a new string. */
|
|
149
150
|
setRangeText(replacement, start, end, selectMode) {
|
|
150
|
-
|
|
151
|
+
if (start === void 0 || end === void 0) {
|
|
152
|
+
this.input.setRangeText(replacement);
|
|
153
|
+
} else {
|
|
154
|
+
this.input.setRangeText(replacement, start, end, selectMode);
|
|
155
|
+
}
|
|
151
156
|
if (this.value !== this.input.value) {
|
|
152
157
|
this.value = this.input.value;
|
|
153
158
|
}
|
|
@@ -242,7 +247,8 @@ class FlowUiTextarea extends FlowRdfFormControl {
|
|
|
242
247
|
minlength=${ifDefined(this.minlength)}
|
|
243
248
|
maxlength=${ifDefined(this.maxlength)}
|
|
244
249
|
autocapitalize=${ifDefined(this.autocapitalize)}
|
|
245
|
-
|
|
250
|
+
autocomplete=${ifDefined(this.autocomplete)}
|
|
251
|
+
autocorrect=${ifDefined(onOffConverter.toAttribute(this.autocorrect))}
|
|
246
252
|
?autofocus=${this.autofocus}
|
|
247
253
|
spellcheck=${ifDefined(this.spellcheck)}
|
|
248
254
|
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
@@ -320,7 +326,7 @@ __decorateClass([
|
|
|
320
326
|
property()
|
|
321
327
|
], FlowUiTextarea.prototype, "autocapitalize", 2);
|
|
322
328
|
__decorateClass([
|
|
323
|
-
property()
|
|
329
|
+
property({ converter: onOffConverter })
|
|
324
330
|
], FlowUiTextarea.prototype, "autocorrect", 2);
|
|
325
331
|
__decorateClass([
|
|
326
332
|
property()
|
|
@@ -61,7 +61,8 @@ class FlowUiTree extends FlowRdfElement {
|
|
|
61
61
|
// Initializes new items by setting the `selectable` property and the expanded/collapsed icons if any
|
|
62
62
|
this.initTreeItem = (item) => {
|
|
63
63
|
item.selectable = this.selectionMode === "multiple";
|
|
64
|
-
item.selected = !!item.value && this.value.includes(item.value);
|
|
64
|
+
item.selected = !!item.value && ensureArray(this.value).includes(item.value);
|
|
65
|
+
item.size = this.size;
|
|
65
66
|
["expand", "collapse"].filter((status) => !!this.querySelector(`[slot="${status}-icon"]`)).forEach((status) => {
|
|
66
67
|
const existingIcon = item.querySelector(`[slot="${status}-icon"]`);
|
|
67
68
|
if (existingIcon === null) {
|
|
@@ -277,7 +278,8 @@ class FlowUiTree extends FlowRdfElement {
|
|
|
277
278
|
);
|
|
278
279
|
}
|
|
279
280
|
}
|
|
280
|
-
handleValueChange(
|
|
281
|
+
handleValueChange(previousValueOrNull) {
|
|
282
|
+
const previousValue = ensureArray(previousValueOrNull);
|
|
281
283
|
this.value = ensureArray(this.value);
|
|
282
284
|
if (previousValue.length !== this.value.length || this.value.some((val) => !previousValue.includes(val)) || previousValue.some((val) => !this.value.includes(val))) {
|
|
283
285
|
const selected = this.value.filter((val) => !previousValue.includes(val));
|