@apia/execution 4.0.102 → 4.0.103

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/index.d.ts CHANGED
@@ -175,6 +175,8 @@ type TApiaFieldWithAttributeBaseProps<T extends Record<any, any>> = TApiaFieldBa
175
175
  attId: string;
176
176
  attName: string;
177
177
  attLabel: string;
178
+ attDescription?: string;
179
+ attDesc?: string;
178
180
  qry_show_value?: any;
179
181
  value: any;
180
182
  valueType: TApiaFieldValueType;
@@ -620,14 +622,15 @@ declare class Attribute {
620
622
  readonly id: string;
621
623
  readonly name: string;
622
624
  readonly title: string;
625
+ readonly description: string;
623
626
  readonly valueType: TApiaFieldValueType;
624
- constructor(id: string, name: string, title: string, valueType: TApiaFieldValueType);
627
+ constructor(id: string, name: string, title: string, description: string, valueType: TApiaFieldValueType);
625
628
  }
626
629
  declare abstract class FieldWithAttribute<FieldProps extends TApiaFieldWithAttributeProperties = TApiaFieldWithAttributeProperties, ValueType = any, FieldDefinition extends TApiaFieldWithAttributeBaseProps<FieldProps> = TApiaFieldWithAttributeBaseProps<FieldProps>> extends Field<FieldProps, FieldDefinition, FieldWithAttributeState<FieldDefinition, FieldProps, ValueType>> {
627
630
  #private;
628
631
  protected lastSynchronizationValue: ValueType | null;
629
632
  readonly attribute: Attribute;
630
- constructor({ attId, attName, attLabel, valueType, value, ...definition }: TApiaFieldWithAttributeBaseProps<FieldProps>);
633
+ constructor({ attId, attName, attLabel, attDescription, attDesc, valueType, value, ...definition }: TApiaFieldWithAttributeBaseProps<FieldProps>);
631
634
  fireEvent(eventName: string, options?: TFireEventOptions): Promise<boolean>;
632
635
  protected getInitialValue({ value, }: TApiaFieldWithAttributeBaseProps<FieldProps>): Promise<ValueType>;
633
636
  getValidationState(): FieldValidationState;
package/dist/index.js CHANGED
@@ -1643,10 +1643,11 @@ var __privateSet$k = (obj, member, value, setter) => {
1643
1643
  };
1644
1644
  var _lastOnChangeValue;
1645
1645
  class Attribute {
1646
- constructor(id, name, title, valueType) {
1646
+ constructor(id, name, title, description, valueType) {
1647
1647
  this.id = id;
1648
1648
  this.name = name;
1649
1649
  this.title = title;
1650
+ this.description = description;
1650
1651
  this.valueType = valueType;
1651
1652
  }
1652
1653
  }
@@ -1655,6 +1656,8 @@ class FieldWithAttribute extends Field {
1655
1656
  attId,
1656
1657
  attName,
1657
1658
  attLabel,
1659
+ attDescription,
1660
+ attDesc,
1658
1661
  valueType,
1659
1662
  value,
1660
1663
  ...definition
@@ -1663,7 +1666,13 @@ class FieldWithAttribute extends Field {
1663
1666
  __privateAdd$k(this, _lastOnChangeValue, null);
1664
1667
  __publicField$l(this, "lastSynchronizationValue", null);
1665
1668
  __publicField$l(this, "attribute");
1666
- this.attribute = new Attribute(attId, attName, attLabel, valueType);
1669
+ this.attribute = new Attribute(
1670
+ attId,
1671
+ attName,
1672
+ attLabel,
1673
+ attDescription ?? attDesc ?? definition.properties.tooltip ?? "",
1674
+ valueType
1675
+ );
1667
1676
  this.state.value = value;
1668
1677
  this.state.validation = {
1669
1678
  dirty: false,
@@ -1840,6 +1849,7 @@ class FieldWithAttribute extends Field {
1840
1849
  attId: this.attribute.id,
1841
1850
  attName: this.attribute.name,
1842
1851
  attLabel: this.attribute.title,
1852
+ attDescription: this.attribute.description,
1843
1853
  valueType: this.attribute.valueType,
1844
1854
  value: this.state.value
1845
1855
  });