igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
151 lines (150 loc) • 5.39 kB
JavaScript
import { __extends } from "tslib";
import { IgcDataGridColumnComponent } from "./igc-data-grid-column-component";
import { ComboBoxColumn } from "./ComboBoxColumn";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* A combobox column.
*/
var IgcComboBoxColumnComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcComboBoxColumnComponent, _super);
function IgcComboBoxColumnComponent() {
return _super.call(this) || this;
}
IgcComboBoxColumnComponent.prototype.createImplementation = function () {
return new ComboBoxColumn();
};
Object.defineProperty(IgcComboBoxColumnComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcComboBoxColumnComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (this.updateContentChildren) {
this.updateContentChildren();
}
else if (this._updateAdapters) {
this._updateAdapters();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
};
IgcComboBoxColumnComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcComboBoxColumnComponent, "observedAttributes", {
get: function () {
if (IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent == null) {
var names = getAllPropertyNames(IgcComboBoxColumnComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent = names;
}
return IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent;
},
enumerable: false,
configurable: true
});
IgcComboBoxColumnComponent.register = function () {
if (!IgcComboBoxColumnComponent._isElementRegistered) {
IgcComboBoxColumnComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcComboBoxColumnComponent.htmlTagName, IgcComboBoxColumnComponent);
}
};
Object.defineProperty(IgcComboBoxColumnComponent.prototype, "actualDataSource", {
/**
* Gets the actual data source that is being used by the combo. If a collection was provided for the combobox data, an implicit LocalDataSource is created, and this is available via this property.
*/
get: function () {
return this.i.n5;
},
set: function (v) {
this.i.n5 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcComboBoxColumnComponent.prototype, "dataSource", {
/**
* Gets or sets the ComboBox data source.
*/
get: function () {
return this.i.n6;
},
set: function (v) {
this.i.n6 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcComboBoxColumnComponent.prototype, "textField", {
/**
* Gets or sets the ComboBox text field.
*/
get: function () {
return this.i.oa;
},
set: function (v) {
this.i.oa = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcComboBoxColumnComponent.prototype, "valueField", {
/**
* Gets or sets the ComboBox value field.
*/
get: function () {
return this.i.ob;
},
set: function (v) {
this.i.ob = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcComboBoxColumnComponent.prototype, "valueMultiField", {
/**
* Gets or sets the ComboBox value field.
*/
get: function () {
return this.i.n3;
},
set: function (v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
var re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.n3 = v;
},
enumerable: false,
configurable: true
});
IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent = null;
IgcComboBoxColumnComponent.htmlTagName = "igc-combo-box-column";
IgcComboBoxColumnComponent._isElementRegistered = false;
return IgcComboBoxColumnComponent;
}(IgcDataGridColumnComponent));
export { IgcComboBoxColumnComponent };