@siemens/ix 0.0.0-pr-2212-20251017115125 → 0.0.0-pr-2198-20251023082407
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/components/ix-textarea.js +56 -3
- package/components/ix-textarea.js.map +1 -1
- package/components/p-BkCOZyt9.js.map +1 -1
- package/dist/cjs/input.util-B2BCXE7G.js.map +1 -1
- package/dist/cjs/ix-textarea.cjs.entry.js +52 -3
- package/dist/cjs/ix-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/collection/components/input/input.fc.js.map +1 -1
- package/dist/collection/components/input/textarea.js +59 -3
- package/dist/collection/components/input/textarea.js.map +1 -1
- package/dist/esm/input.util-6IjJg2ik.js.map +1 -1
- package/dist/esm/ix-textarea.entry.js +52 -3
- package/dist/esm/ix-textarea.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/siemens-ix/ix-textarea.entry.esm.js.map +1 -1
- package/dist/siemens-ix/{p-cd11dfa8.entry.js → p-20b5fc48.entry.js} +2 -2
- package/dist/siemens-ix/p-20b5fc48.entry.js.map +1 -0
- package/dist/siemens-ix/p-q1WCgUmY.js.map +1 -1
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/types/components/input/input.fc.d.ts +1 -1
- package/dist/types/components/input/textarea.d.ts +9 -0
- package/hydrate/index.js +52 -3
- package/hydrate/index.mjs +52 -3
- package/package.json +1 -1
- package/dist/siemens-ix/p-cd11dfa8.entry.js.map +0 -1
package/hydrate/index.js
CHANGED
|
@@ -30668,15 +30668,59 @@ class Textarea {
|
|
|
30668
30668
|
this.isInfo = false;
|
|
30669
30669
|
this.isWarning = false;
|
|
30670
30670
|
this.isInvalidByRequired = false;
|
|
30671
|
-
this.textAreaRef = makeRef()
|
|
30671
|
+
this.textAreaRef = makeRef(() => {
|
|
30672
|
+
this.initResizeObserver();
|
|
30673
|
+
});
|
|
30672
30674
|
this.touched = false;
|
|
30675
|
+
this.isManuallyResized = false;
|
|
30676
|
+
this.isProgrammaticResize = false;
|
|
30673
30677
|
}
|
|
30674
30678
|
updateClassMappings(result) {
|
|
30675
30679
|
mapValidationResult(this, result);
|
|
30676
30680
|
}
|
|
30681
|
+
onDimensionPropsChange() {
|
|
30682
|
+
this.isManuallyResized = false;
|
|
30683
|
+
this.manualHeight = undefined;
|
|
30684
|
+
this.manualWidth = undefined;
|
|
30685
|
+
this.isProgrammaticResize = true;
|
|
30686
|
+
}
|
|
30687
|
+
onResizeBehaviorChange() {
|
|
30688
|
+
this.initResizeObserver();
|
|
30689
|
+
}
|
|
30677
30690
|
componentWillLoad() {
|
|
30678
30691
|
this.updateFormInternalValue(this.value);
|
|
30679
30692
|
}
|
|
30693
|
+
disconnectedCallback() {
|
|
30694
|
+
var _a;
|
|
30695
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
30696
|
+
}
|
|
30697
|
+
initResizeObserver() {
|
|
30698
|
+
var _a;
|
|
30699
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
30700
|
+
const textarea = this.textAreaRef.current;
|
|
30701
|
+
if (!textarea)
|
|
30702
|
+
return;
|
|
30703
|
+
if (this.resizeBehavior === 'none')
|
|
30704
|
+
return;
|
|
30705
|
+
let isInitialResize = true;
|
|
30706
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
30707
|
+
const textarea = this.textAreaRef.current;
|
|
30708
|
+
if (!textarea)
|
|
30709
|
+
return;
|
|
30710
|
+
if (isInitialResize) {
|
|
30711
|
+
isInitialResize = false;
|
|
30712
|
+
return;
|
|
30713
|
+
}
|
|
30714
|
+
if (this.isProgrammaticResize) {
|
|
30715
|
+
this.isProgrammaticResize = false;
|
|
30716
|
+
return;
|
|
30717
|
+
}
|
|
30718
|
+
this.isManuallyResized = true;
|
|
30719
|
+
this.manualHeight = textarea.style.height;
|
|
30720
|
+
this.manualWidth = textarea.style.width;
|
|
30721
|
+
});
|
|
30722
|
+
this.resizeObserver.observe(textarea);
|
|
30723
|
+
}
|
|
30680
30724
|
updateFormInternalValue(value) {
|
|
30681
30725
|
this.formInternals.setFormValue(value);
|
|
30682
30726
|
this.value = value;
|
|
@@ -30710,16 +30754,21 @@ class Textarea {
|
|
|
30710
30754
|
}
|
|
30711
30755
|
render() {
|
|
30712
30756
|
var _a;
|
|
30713
|
-
return (hAsync(Host, { key: '
|
|
30757
|
+
return (hAsync(Host, { key: '03eb959f2c582fb1dddef9c4af3775ff27d4c391', class: {
|
|
30714
30758
|
disabled: this.disabled,
|
|
30715
30759
|
readonly: this.readonly,
|
|
30716
|
-
} }, hAsync("ix-field-wrapper", { key: '
|
|
30760
|
+
} }, hAsync("ix-field-wrapper", { key: '66ec862af71b352b89418708782d0a73bd54e49f', required: this.required, label: this.label, helperText: this.helperText, invalidText: this.invalidText, infoText: this.infoText, warningText: this.warningText, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, isInvalid: this.isInvalid, isValid: this.isValid, isInfo: this.isInfo, isWarning: this.isWarning, controlRef: this.textAreaRef }, !!this.maxLength && this.maxLength > 0 && (hAsync("ix-typography", { key: 'c75441f683c072a52d5d51481bc87e7ea00c42ff', class: "bottom-text", slot: "bottom-right", textColor: "soft" }, ((_a = this.value) !== null && _a !== void 0 ? _a : '').length, "/", this.maxLength)), hAsync("div", { key: 'c49e36dd468cc9e4b83887891316436359b750b6', class: "input-wrapper" }, hAsync(TextareaElement, { key: '9c051f207d06a4943540ed2c4f6d8b8be8ab1358', minLength: this.minLength, maxLength: this.maxLength, textareaCols: this.textareaCols, textareaRows: this.textareaRows, textareaHeight: this.isManuallyResized ? this.manualHeight : this.textareaHeight, textareaWidth: this.isManuallyResized ? this.manualWidth : this.textareaWidth, resizeBehavior: this.resizeBehavior, readonly: this.readonly, disabled: this.disabled, isInvalid: this.isInvalid, required: this.required, value: this.value, placeholder: this.placeholder, textAreaRef: this.textAreaRef, valueChange: (value) => this.valueChange.emit(value), updateFormInternalValue: (value) => this.updateFormInternalValue(value), onBlur: () => {
|
|
30717
30761
|
onInputBlur(this, this.textAreaRef.current);
|
|
30718
30762
|
this.touched = true;
|
|
30719
30763
|
} })))));
|
|
30720
30764
|
}
|
|
30721
30765
|
static get formAssociated() { return true; }
|
|
30722
30766
|
get hostElement() { return getElement(this); }
|
|
30767
|
+
static get watchers() { return {
|
|
30768
|
+
"textareaHeight": ["onDimensionPropsChange"],
|
|
30769
|
+
"textareaWidth": ["onDimensionPropsChange"],
|
|
30770
|
+
"resizeBehavior": ["onResizeBehaviorChange"]
|
|
30771
|
+
}; }
|
|
30723
30772
|
static get style() { return textareaCss; }
|
|
30724
30773
|
static get cmpMeta() { return {
|
|
30725
30774
|
"$flags$": 329,
|
package/hydrate/index.mjs
CHANGED
|
@@ -30666,15 +30666,59 @@ class Textarea {
|
|
|
30666
30666
|
this.isInfo = false;
|
|
30667
30667
|
this.isWarning = false;
|
|
30668
30668
|
this.isInvalidByRequired = false;
|
|
30669
|
-
this.textAreaRef = makeRef()
|
|
30669
|
+
this.textAreaRef = makeRef(() => {
|
|
30670
|
+
this.initResizeObserver();
|
|
30671
|
+
});
|
|
30670
30672
|
this.touched = false;
|
|
30673
|
+
this.isManuallyResized = false;
|
|
30674
|
+
this.isProgrammaticResize = false;
|
|
30671
30675
|
}
|
|
30672
30676
|
updateClassMappings(result) {
|
|
30673
30677
|
mapValidationResult(this, result);
|
|
30674
30678
|
}
|
|
30679
|
+
onDimensionPropsChange() {
|
|
30680
|
+
this.isManuallyResized = false;
|
|
30681
|
+
this.manualHeight = undefined;
|
|
30682
|
+
this.manualWidth = undefined;
|
|
30683
|
+
this.isProgrammaticResize = true;
|
|
30684
|
+
}
|
|
30685
|
+
onResizeBehaviorChange() {
|
|
30686
|
+
this.initResizeObserver();
|
|
30687
|
+
}
|
|
30675
30688
|
componentWillLoad() {
|
|
30676
30689
|
this.updateFormInternalValue(this.value);
|
|
30677
30690
|
}
|
|
30691
|
+
disconnectedCallback() {
|
|
30692
|
+
var _a;
|
|
30693
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
30694
|
+
}
|
|
30695
|
+
initResizeObserver() {
|
|
30696
|
+
var _a;
|
|
30697
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
30698
|
+
const textarea = this.textAreaRef.current;
|
|
30699
|
+
if (!textarea)
|
|
30700
|
+
return;
|
|
30701
|
+
if (this.resizeBehavior === 'none')
|
|
30702
|
+
return;
|
|
30703
|
+
let isInitialResize = true;
|
|
30704
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
30705
|
+
const textarea = this.textAreaRef.current;
|
|
30706
|
+
if (!textarea)
|
|
30707
|
+
return;
|
|
30708
|
+
if (isInitialResize) {
|
|
30709
|
+
isInitialResize = false;
|
|
30710
|
+
return;
|
|
30711
|
+
}
|
|
30712
|
+
if (this.isProgrammaticResize) {
|
|
30713
|
+
this.isProgrammaticResize = false;
|
|
30714
|
+
return;
|
|
30715
|
+
}
|
|
30716
|
+
this.isManuallyResized = true;
|
|
30717
|
+
this.manualHeight = textarea.style.height;
|
|
30718
|
+
this.manualWidth = textarea.style.width;
|
|
30719
|
+
});
|
|
30720
|
+
this.resizeObserver.observe(textarea);
|
|
30721
|
+
}
|
|
30678
30722
|
updateFormInternalValue(value) {
|
|
30679
30723
|
this.formInternals.setFormValue(value);
|
|
30680
30724
|
this.value = value;
|
|
@@ -30708,16 +30752,21 @@ class Textarea {
|
|
|
30708
30752
|
}
|
|
30709
30753
|
render() {
|
|
30710
30754
|
var _a;
|
|
30711
|
-
return (hAsync(Host, { key: '
|
|
30755
|
+
return (hAsync(Host, { key: '03eb959f2c582fb1dddef9c4af3775ff27d4c391', class: {
|
|
30712
30756
|
disabled: this.disabled,
|
|
30713
30757
|
readonly: this.readonly,
|
|
30714
|
-
} }, hAsync("ix-field-wrapper", { key: '
|
|
30758
|
+
} }, hAsync("ix-field-wrapper", { key: '66ec862af71b352b89418708782d0a73bd54e49f', required: this.required, label: this.label, helperText: this.helperText, invalidText: this.invalidText, infoText: this.infoText, warningText: this.warningText, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, isInvalid: this.isInvalid, isValid: this.isValid, isInfo: this.isInfo, isWarning: this.isWarning, controlRef: this.textAreaRef }, !!this.maxLength && this.maxLength > 0 && (hAsync("ix-typography", { key: 'c75441f683c072a52d5d51481bc87e7ea00c42ff', class: "bottom-text", slot: "bottom-right", textColor: "soft" }, ((_a = this.value) !== null && _a !== void 0 ? _a : '').length, "/", this.maxLength)), hAsync("div", { key: 'c49e36dd468cc9e4b83887891316436359b750b6', class: "input-wrapper" }, hAsync(TextareaElement, { key: '9c051f207d06a4943540ed2c4f6d8b8be8ab1358', minLength: this.minLength, maxLength: this.maxLength, textareaCols: this.textareaCols, textareaRows: this.textareaRows, textareaHeight: this.isManuallyResized ? this.manualHeight : this.textareaHeight, textareaWidth: this.isManuallyResized ? this.manualWidth : this.textareaWidth, resizeBehavior: this.resizeBehavior, readonly: this.readonly, disabled: this.disabled, isInvalid: this.isInvalid, required: this.required, value: this.value, placeholder: this.placeholder, textAreaRef: this.textAreaRef, valueChange: (value) => this.valueChange.emit(value), updateFormInternalValue: (value) => this.updateFormInternalValue(value), onBlur: () => {
|
|
30715
30759
|
onInputBlur(this, this.textAreaRef.current);
|
|
30716
30760
|
this.touched = true;
|
|
30717
30761
|
} })))));
|
|
30718
30762
|
}
|
|
30719
30763
|
static get formAssociated() { return true; }
|
|
30720
30764
|
get hostElement() { return getElement(this); }
|
|
30765
|
+
static get watchers() { return {
|
|
30766
|
+
"textareaHeight": ["onDimensionPropsChange"],
|
|
30767
|
+
"textareaWidth": ["onDimensionPropsChange"],
|
|
30768
|
+
"resizeBehavior": ["onResizeBehaviorChange"]
|
|
30769
|
+
}; }
|
|
30721
30770
|
static get style() { return textareaCss; }
|
|
30722
30771
|
static get cmpMeta() { return {
|
|
30723
30772
|
"$flags$": 329,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["registerInstance","createEvent","h","Host","getElement","HookValidationLifecycle","makeRef","mapValidationResult","TextareaElement","onInputBlur","textareaCss","__decorate","undefined","decorators","target","key","desc","c","arguments","length","r","Object","getOwnPropertyDescriptor","d","Reflect","decorate","i","defineProperty","Textarea","constructor","hostRef","this","valueChange","validityStateChange","ixBlur","$hostElement$","formInternals","attachInternals","value","required","disabled","readonly","resizeBehavior","isInvalid","isValid","isInfo","isWarning","isInvalidByRequired","textAreaRef","touched","updateClassMappings","result","componentWillLoad","updateFormInternalValue","setFormValue","getAssociatedFormElement","form","hasValidValue","Promise","resolve","getNativeInputElement","waitForCurrent","focusInput","focus","isTouched","render","_a","class","label","helperText","invalidText","infoText","warningText","validText","showTextAsTooltip","controlRef","maxLength","slot","textColor","minLength","textareaCols","textareaRows","textareaHeight","textareaWidth","placeholder","emit","onBlur","current","formAssociated","hostElement","prototype","style"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,OAAQC,OAAWC,MAAkB,8BACzEC,MAA+B,8BAC/BC,MAAe,8BACfC,OAA0BC,OAAsBC,MAAmB,wBAC1E,wBACA,wBACA,wBACA,wBACA,kBAEP,MAAMC,EAAc,g7fAUpB,IAAIC,EAAcC,WAAaA,UAAUD,YAAe,SAAUE,EAAYC,EAAQC,EAAKC,GACvF,IAAIC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIH,EAASE,IAAS,KAAOA,EAAOK,OAAOC,yBAAyBR,EAAQC,GAAOC,EAAMO,EAC3H,UAAWC,UAAY,iBAAmBA,QAAQC,WAAa,WAC3DL,EAAII,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QAE9C,IAAK,IAAIU,EAAIb,EAAWM,OAAS,EAAGO,GAAK,EAAGA,IACxC,GAAIH,EAAIV,EAAWa,GACfN,GAA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