UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

102 lines (101 loc) 3.33 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { Base, markType } from "./type"; import { stringIsNullOrEmpty, stringEndsWith, stringStartsWith } from "./string"; /** * @hidden */ var ImageLoadParam = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ImageLoadParam, _super); function ImageLoadParam() { var _this = _super.call(this) || this; _this._prefix = null; _this._suffix = null; _this._value = null; _this.value = ""; _this.suffix = ""; _this.prefix = ""; return _this; } Object.defineProperty(ImageLoadParam.prototype, "prefix", { get: function () { return this._prefix; }, set: function (a) { this._prefix = a; }, enumerable: false, configurable: true }); Object.defineProperty(ImageLoadParam.prototype, "suffix", { get: function () { return this._suffix; }, set: function (a) { this._suffix = a; }, enumerable: false, configurable: true }); Object.defineProperty(ImageLoadParam.prototype, "value", { get: function () { return this._value; }, set: function (a) { this._value = a; }, enumerable: false, configurable: true }); ImageLoadParam.a = function (a, b, c) { var d = new ImageLoadParam(); if (stringIsNullOrEmpty(a)) { return d; } if (stringIsNullOrEmpty(b) || stringIsNullOrEmpty(c)) { d.value = a; return d; } var e = a.indexOf(b); if (e != -1) { var f = a.indexOf(c, e + 1); if (f != -1) { var g = f - e - 1; d.value = a.substr(e + 1, g); d.suffix = a.substr(f + 1); d.prefix = a.substr(0, e); } } else { d.value = a; } return d; }; ImageLoadParam.prototype.b = function (a) { var b = ""; if (!stringIsNullOrEmpty(this.prefix)) { b = this.prefix; } if (!stringIsNullOrEmpty(a)) { if (!stringIsNullOrEmpty(this.prefix) && !stringEndsWith(this.prefix, "/")) { b += "/"; } b += a; } if (!stringIsNullOrEmpty(this.suffix)) { if (!stringEndsWith(b, ".") && !stringStartsWith(this.suffix, ".")) { b += "."; } b += this.suffix; } return b; }; ImageLoadParam.$t = markType(ImageLoadParam, 'ImageLoadParam'); return ImageLoadParam; }(Base)); export { ImageLoadParam };