Merge branch 'main' into chore/umb-debug-tweaks

This commit is contained in:
Jacob Overgaard
2024-05-14 10:01:52 +02:00
committed by GitHub
2 changed files with 20 additions and 17 deletions

View File

@@ -102,7 +102,7 @@ export class UmbMultipleColorPickerItemInputElement extends UUIFormControlMixin(
this.dispatchEvent(new UmbInputEvent());
}
#onColorInput(event: InputEvent) {
#onColorChange(event: Event) {
event.stopPropagation();
this.value = this._colorPicker.value;
this.dispatchEvent(new UmbChangeEvent());
@@ -153,7 +153,7 @@ export class UmbMultipleColorPickerItemInputElement extends UUIFormControlMixin(
value=${this._valueHex}
@click=${this.#onColorClick}></uui-color-swatch>
</uui-input>
<input aria-hidden="${true}" type="color" id="color" value=${this.value} @input=${this.#onColorInput} />
<input aria-hidden="${true}" type="color" id="color" value=${this.value} @change=${this.#onColorChange} />
</div>
${when(
this.showLabels,

View File

@@ -15,28 +15,30 @@ export class UmbPropertyEditorUIDocumentPickerElement extends UmbLitElement impl
if (!config) return;
const minMax = config.getValueByAlias<NumberRangeValueType>('validationLimit');
this.min = minMax?.min ?? 0;
this.max = minMax?.max ?? Infinity;
if (minMax) {
this._min = minMax.min && minMax.min > 0 ? minMax.min : 0;
this._max = minMax.max && minMax.max > 0 ? minMax.max : Infinity;
}
this.ignoreUserStartNodes = config.getValueByAlias('ignoreUserStartNodes') ?? false;
this.startNodeId = config.getValueByAlias('startNodeId');
this.showOpenButton = config.getValueByAlias('showOpenButton') ?? false;
this._ignoreUserStartNodes = config.getValueByAlias('ignoreUserStartNodes') ?? false;
this._startNodeId = config.getValueByAlias('startNodeId');
this._showOpenButton = config.getValueByAlias('showOpenButton') ?? false;
}
@state()
min = 0;
private _min = 0;
@state()
max = Infinity;
private _max = Infinity;
@state()
startNodeId?: string;
private _startNodeId?: string;
@state()
showOpenButton?: boolean;
private _showOpenButton?: boolean;
@state()
ignoreUserStartNodes?: boolean;
private _ignoreUserStartNodes?: boolean;
#onChange(event: CustomEvent & { target: UmbInputDocumentElement }) {
this.value = event.target.selection.join(',');
@@ -44,14 +46,15 @@ export class UmbPropertyEditorUIDocumentPickerElement extends UmbLitElement impl
}
render() {
const startNode = this._startNodeId ? { unique: this._startNodeId } : undefined;
return html`
<umb-input-document
.min=${this.min}
.max=${this.max}
.startNodeId=${this.startNodeId ?? ''}
.min=${this._min}
.max=${this._max}
.startNode=${startNode}
.value=${this.value ?? ''}
?showOpenButton=${this.showOpenButton}
?ignoreUserStartNodes=${this.ignoreUserStartNodes}
?ignoreUserStartNodes=${this._ignoreUserStartNodes}
?showOpenButton=${this._showOpenButton}
@change=${this.#onChange}>
</umb-input-document>
`;