lct-components
Version:
LCT basic components
2,341 lines • 190 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('@angular/forms'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('lct-components', ['exports', '@angular/core', '@angular/common/http', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@angular/forms', '@angular/common'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["lct-components"] = {}, global.ng.core, global.ng.common.http, global.ng.platformBrowser, global.rxjs, global.rxjs.operators, global.ng.forms, global.ng.common));
})(this, (function (exports, i0, http, i1, rxjs, operators, i4, i3) { 'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
var LctComponentsService = /** @class */ (function () {
function LctComponentsService() {
}
LctComponentsService.prototype.storeSelected = function () {
var sessionStore = sessionStorage.getItem('storeSelected');
return JSON.parse(sessionStore);
};
LctComponentsService.prototype.getCorporativeCommerce = function (_commerce) {
var c = _commerce === null || _commerce === void 0 ? void 0 : _commerce.toLowerCase();
switch (c) {
case 'falabella':
case 'fal':
return 'FAL';
case 'sodimac':
case 'sod':
return 'SOD';
case 'tottus':
case 'tot':
return 'TOT';
case 'corp':
return 'CORP';
case 'mall plaza':
case 'mpl':
return 'MPL';
case 'ikea':
case 'iks':
return 'IKS';
case 'metro':
return 'Metro';
default:
return 'CORP';
}
};
LctComponentsService.prototype.createHeader = function () {
var _a = this.storeSelected(), commerce = _a.commerce, country = _a.country;
var headers = {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-commerce': this.getCorporativeCommerce(commerce),
'x-country': country || 'CL',
};
var httpOptions = { headers: new http.HttpHeaders(Object.assign({}, headers)) };
return httpOptions;
};
LctComponentsService.prototype.getHeaderJson = function () {
var _a = this.storeSelected(), commerce = _a.commerce, country = _a.country;
var headers = {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-commerce': commerce || 'Falabella',
'x-country': country || 'CL',
'X-chRef': 'WEB',
};
return headers;
};
LctComponentsService.prototype.getSimpleHeader = function () {
var _a = this.storeSelected(), commerce = _a.commerce, country = _a.country;
var headers = {
'x-commerce': this.getCorporativeCommerce(commerce),
'x-country': country || 'CL',
'X-chRef': 'WEB',
};
var httpOptions = { headers: new http.HttpHeaders(Object.assign({}, headers)) };
return httpOptions;
};
return LctComponentsService;
}());
LctComponentsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
LctComponentsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsService, decorators: [{
type: i0.Injectable,
args: [{
providedIn: 'root',
}]
}], ctorParameters: function () { return []; } });
var LctComponentsComponent = /** @class */ (function () {
function LctComponentsComponent() {
}
LctComponentsComponent.prototype.ngOnInit = function () {
};
return LctComponentsComponent;
}());
LctComponentsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
LctComponentsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: LctComponentsComponent, selector: "lct-lctComponents", ngImport: i0__namespace, template: "\n <p>\n lct-components works!\n </p>\n ", isInline: true });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-lctComponents',
template: "\n <p>\n lct-components works!\n </p>\n ",
styles: []
}]
}], ctorParameters: function () { return []; } });
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise, SuppressedError, Symbol */
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b)
if (Object.prototype.hasOwnProperty.call(b, p))
d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function () {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if (d = decorators[i])
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); };
}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function")
throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn)
context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access)
context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done)
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0)
continue;
if (result === null || typeof result !== "object")
throw new TypeError("Object expected");
if (_ = accept(result.get))
descriptor.get = _;
if (_ = accept(result.set))
descriptor.set = _;
if (_ = accept(result.init))
initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field")
initializers.unshift(_);
else
descriptor[key] = _;
}
}
if (target)
Object.defineProperty(target, contextIn.name, descriptor);
done = true;
}
;
function __runInitializers(thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
}
;
function __propKey(x) {
return typeof x === "symbol" ? x : "".concat(x);
}
;
function __setFunctionName(f, name, prefix) {
if (typeof name === "symbol")
name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
;
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try {
step(generator.next(value));
}
catch (e) {
reject(e);
} }
function rejected(value) { try {
step(generator["throw"](value));
}
catch (e) {
reject(e);
} }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function () { if (t[0] & 1)
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f)
throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _)
try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
return t;
if (y = 0, t)
op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
}
catch (e) {
op = [6, e];
y = 0;
}
finally {
f = t = 0;
}
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
}
var __createBinding = Object.create ? (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function () { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
o[k2] = m[k];
});
function __exportStar(m, o) {
for (var p in m)
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
__createBinding(o, m, p);
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m)
return m.call(o);
if (o && typeof o.length === "number")
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
}
catch (error) {
e = { error: error };
}
finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
}
finally {
if (e)
throw e.error;
}
}
return ar;
}
/** @deprecated */
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2)
for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar)
ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
function verb(n, f) { if (g[n]) {
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); };
if (f)
i[n] = f(i[n]);
} }
function resume(n, v) { try {
step(g[n](v));
}
catch (e) {
settle(q[0][3], e);
} }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length)
resume(q[0][0], q[0][1]); }
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
}
function __asyncValues(o) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", { value: raw });
}
else {
cooked.raw = raw;
}
return cooked;
}
;
var __setModuleDefault = Object.create ? (function (o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function (o, v) {
o["default"] = v;
};
function __importStar(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null)
for (var k in mod)
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m")
throw new TypeError("Private method is not writable");
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
function __classPrivateFieldIn(state, receiver) {
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
}
function __addDisposableResource(env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function")
throw new TypeError("Object expected.");
var dispose, inner;
if (async) {
if (!Symbol.asyncDispose)
throw new TypeError("Symbol.asyncDispose is not defined.");
dispose = value[Symbol.asyncDispose];
}
if (dispose === void 0) {
if (!Symbol.dispose)
throw new TypeError("Symbol.dispose is not defined.");
dispose = value[Symbol.dispose];
if (async)
inner = dispose;
}
if (typeof dispose !== "function")
throw new TypeError("Object not disposable.");
if (inner)
dispose = function () { try {
inner.call(this);
}
catch (e) {
return Promise.reject(e);
} };
env.stack.push({ value: value, dispose: dispose, async: async });
}
else if (async) {
env.stack.push({ async: true });
}
return value;
}
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
function __disposeResources(env) {
function fail(e) {
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
env.hasError = true;
}
function next() {
while (env.stack.length) {
var rec = env.stack.pop();
try {
var result = rec.dispose && rec.dispose.call(rec.value);
if (rec.async)
return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
}
catch (e) {
fail(e);
}
}
if (env.hasError)
throw env.error;
}
return next();
}
var tslib_es6 = {
__extends: __extends,
__assign: __assign,
__rest: __rest,
__decorate: __decorate,
__param: __param,
__metadata: __metadata,
__awaiter: __awaiter,
__generator: __generator,
__createBinding: __createBinding,
__exportStar: __exportStar,
__values: __values,
__read: __read,
__spread: __spread,
__spreadArrays: __spreadArrays,
__spreadArray: __spreadArray,
__await: __await,
__asyncGenerator: __asyncGenerator,
__asyncDelegator: __asyncDelegator,
__asyncValues: __asyncValues,
__makeTemplateObject: __makeTemplateObject,
__importStar: __importStar,
__importDefault: __importDefault,
__classPrivateFieldGet: __classPrivateFieldGet,
__classPrivateFieldSet: __classPrivateFieldSet,
__classPrivateFieldIn: __classPrivateFieldIn,
__addDisposableResource: __addDisposableResource,
__disposeResources: __disposeResources,
};
var InputTextComponent = /** @class */ (function () {
function InputTextComponent(render) {
var _this = this;
this.render = render;
this.disabled = false;
this.icon = '';
this.iconPosition = 'right';
this.pdaAutoEnter = false;
this.placeholder = '';
this.showIcon = false;
this.title = 'Insert Title';
this.type = 'text';
this.error = false;
this.id = ''; // ID en Button Opcional
this.transparent = false; // transparent style
this.enterEmitted = new i0.EventEmitter();
this.iconClick = new i0.EventEmitter();
this.inputClick = new i0.EventEmitter();
this.inputValue = '';
this.selectionStart = 0;
this.selectionEnd = 0;
this.lpnUpdate = new rxjs.Subject();
this.propagateChange = function (_) { };
this.lpnUpdate
.pipe(operators.debounceTime(200)
/* distinctUntilChanged() */ // esto previene que el valor ser repita
)
.subscribe(function (value) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_j) {
if (value && this.pdaAutoEnter) {
this.enterEmit();
}
else {
if (!value) {
this.selectionStart = 0;
this.selectionEnd = 0;
}
return [2 /*return*/];
}
return [2 /*return*/];
});
}); });
}
Object.defineProperty(InputTextComponent.prototype, "inputId", {
// Propiedad calculada para generar el id dinámico
get: function () {
return this.id ? "input-" + this.id : null;
},
enumerable: false,
configurable: true
});
InputTextComponent.prototype.ngAfterViewInit = function () {
var _a, _b, _c, _d, _e, _f;
if (this.iconPosition === "left" && this.showIcon) {
this.render.addClass((_a = this.inputScan) === null || _a === void 0 ? void 0 : _a.nativeElement, 'iconLeft');
this.render.addClass((_b = this.iconDiv) === null || _b === void 0 ? void 0 : _b.nativeElement, 'iconLeft');
}
if (this.error) {
this.render.addClass((_c = this.inputScan) === null || _c === void 0 ? void 0 : _c.nativeElement, 'error');
this.render.addClass((_d = this.titleRef) === null || _d === void 0 ? void 0 : _d.nativeElement, 'error');
}
if (this.transparent) {
this.render.addClass((_e = this.inputScan) === null || _e === void 0 ? void 0 : _e.nativeElement, 'transparent');
this.render.addClass((_f = this.titleRef) === null || _f === void 0 ? void 0 : _f.nativeElement, 'transparent');
}
};
InputTextComponent.prototype.ngOnInit = function () {
};
InputTextComponent.prototype.ngOnChanges = function (changes) {
var _a, _b, _c, _d, _e, _f, _g, _h;
if (changes['pdaAutoEnter'] && !changes['pdaAutoEnter'].firstChange) {
this.pdaAutoEnter = changes['pdaAutoEnter'].currentValue;
}
if (changes['error'] && !changes['error'].firstChange) {
if (changes.error.currentValue) {
this.render.addClass((_a = this.inputScan) === null || _a === void 0 ? void 0 : _a.nativeElement, 'error');
this.render.addClass((_b = this.titleRef) === null || _b === void 0 ? void 0 : _b.nativeElement, 'error');
}
else {
this.render.removeClass((_c = this.inputScan) === null || _c === void 0 ? void 0 : _c.nativeElement, 'error');
this.render.removeClass((_d = this.titleRef) === null || _d === void 0 ? void 0 : _d.nativeElement, 'error');
}
}
if (changes['transparent'] && !changes['transparent'].firstChange) {
if (changes.error.currentValue) {
this.render.addClass((_e = this.inputScan) === null || _e === void 0 ? void 0 : _e.nativeElement, 'transparent');
this.render.addClass((_f = this.titleRef) === null || _f === void 0 ? void 0 : _f.nativeElement, 'transparent');
}
else {
this.render.addClass((_g = this.inputScan) === null || _g === void 0 ? void 0 : _g.nativeElement, 'transparent');
this.render.addClass((_h = this.titleRef) === null || _h === void 0 ? void 0 : _h.nativeElement, 'transparent');
}
}
};
InputTextComponent.prototype.writeValue = function (value) {
if (typeof value !== 'undefined') {
this.onKeyUpHandler(value);
}
};
InputTextComponent.prototype.registerOnChange = function (fn) {
this.propagateChange = fn;
};
InputTextComponent.prototype.registerOnTouched = function (fn) {
// console.log('reg touch', fn)
};
InputTextComponent.prototype.onKeyUpHandler = function (event) {
if (!this.inputValue && typeof event === 'string') {
this.inputValue = event;
}
if (this.inputValue && event === null) {
this.inputValue = '';
}
if (this.inputValue && typeof event === 'string' && event === '') {
this.inputValue = '';
}
this.propagateChange(this.inputValue);
};
InputTextComponent.prototype.click = function () {
if (!this.disabled) {
this.iconClick.emit('iconClick');
}
};
InputTextComponent.prototype.clickInput = function () {
if (!this.disabled) {
this.inputClick.emit('inputClick');
}
};
InputTextComponent.prototype.enterEmit = function () {
if (this.inputValue) {
this.enterEmitted.emit(this.inputValue);
}
};
InputTextComponent.prototype.onPaste = function (ev) {
var _this = this;
var _a, _b, _c, _d;
ev.preventDefault();
var clipboard = (_a = ev.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('Text');
if (clipboard) {
if (this.selectionEnd && this.selectionStart === ((_b = this.inputScan) === null || _b === void 0 ? void 0 : _b.nativeElement.selectionStart)) {
var slice1_1 = this.inputValue.slice(0, this.selectionStart);
var slice2 = this.inputValue.slice(this.selectionEnd);
this.inputValue = slice1_1 + clipboard + slice2;
setTimeout(function () {
var _a;
(_a = _this.inputScan) === null || _a === void 0 ? void 0 : _a.nativeElement.setSelectionRange(slice1_1.length + clipboard.length, slice1_1.length + clipboard.length);
}, 20);
this.selectionStart = 0;
this.selectionEnd = 0;
}
else {
var slice1_2 = this.inputValue.slice(0, (_c = this.inputScan) === null || _c === void 0 ? void 0 : _c.nativeElement.selectionStart);
var slice2 = this.inputValue.slice((_d = this.inputScan) === null || _d === void 0 ? void 0 : _d.nativeElement.selectionStart);
this.inputValue = slice1_2 + clipboard + slice2;
setTimeout(function () {
var _a;
(_a = _this.inputScan) === null || _a === void 0 ? void 0 : _a.nativeElement.setSelectionRange(slice1_2.length + clipboard.length, slice1_2.length + clipboard.length);
}, 20);
// this.inputValue = this.inputValue+clipboard;
}
}
};
InputTextComponent.prototype.selectionChange = function (ev) {
// console.log('selection asdf:', ev.target.value.substring(ev.target.selectionStart, ev.target.selectionEnd));
// console.log('start: ',ev.target.selectionStart, 'end:', ev.target.selectionEnd)
// this.selectedText = ev.target.value.substring(ev.target.selectionStart, ev.target.selectionEnd);
this.selectionStart = ev.target.selectionStart;
this.selectionEnd = ev.target.selectionEnd;
};
return InputTextComponent;
}());
InputTextComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: InputTextComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
InputTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: InputTextComponent, selector: "lct-input-text", inputs: { disabled: "disabled", icon: "icon", iconPosition: "iconPosition", pdaAutoEnter: "pdaAutoEnter", placeholder: "placeholder", showIcon: "showIcon", title: "title", type: "type", error: "error", id: "id", transparent: "transparent" }, outputs: { enterEmitted: "enterEmitted", iconClick: "iconClick", inputClick: "inputClick" }, providers: [{
provide: i4.NG_VALUE_ACCESSOR,
useExisting: InputTextComponent,
multi: true
}], viewQueries: [{ propertyName: "inputScan", first: true, predicate: ["inputScan"], descendants: true }, { propertyName: "titleRef", first: true, predicate: ["titleRef"], descendants: true }, { propertyName: "iconDiv", first: true, predicate: ["iconDiv"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div>\n <div #titleRef class=\"title\">\n {{title}}\n </div>\n <div class=\"input-with-icon iconLeft\">\n <input [attr.id]=\"inputId\"\n [type]=\"type\"\n class=\"form-control-lct\"\n #inputScan\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"inputValue\"\n (keydown.enter)=\"enterEmit()\"\n (keydown.tab)=\"enterEmit()\"\n (keyup)=\"onKeyUpHandler($event)\"\n (click)=\"clickInput()\"\n (ngModelChange)=\"lpnUpdate.next(inputScan.value);\"\n (paste)=\"onPaste($event)\"\n (select)=\"selectionChange($event)\"\n >\n <div class=\"icon\" #iconDiv *ngIf=\"showIcon\">\n <img [src]=\"icon\" [ngStyle]=\"{'cursor': disabled ? 'not-allowed' : 'pointer'}\" alt=\"\" (click)=\"click()\">\n </div>\n </div>\n</div>\n", styles: ["*{font-family:\"Barlow\",\"Open Sans\",\"Helvetica Neue\",\"Segoe UI\",\"Calibri\",\"Arial\",sans-serif}.title{color:#3c4149;font-size:12px;letter-spacing:0;line-height:15px;margin-left:2px;margin-bottom:5px}.title.error{color:#c60e4c}.input-with-icon{box-sizing:border-box;position:relative;height:40px}.form-control-lct::placeholder{color:#3c4149}.input-with-icon .form-control-lct{height:100%;width:100%;border:0;border-radius:4px;background-color:#e0e5ee;box-sizing:border-box;color:#3c4149;font-size:14px;font-weight:400;letter-spacing:0;line-height:17px;padding:12px 20px 12px 15px}.input-with-icon .form-control-lct.error{color:#c60e4c;border:1px solid #C60E4C}.input-with-icon .form-control-lct.iconLeft{padding:12px 20px 12px 60px}.input-with-icon .form-control-lct:disabled{cursor:not-allowed;background-color:#f5f7fa;color:#c8ccd4}.input-with-icon .form-control-lct:focus-visible{outline:unset}.input-with-icon .form-control-lct.transparent{background-color:#fff;color:#fff}.input-with-icon .icon{position:absolute;right:1%;top:.01rem;width:2.6rem;height:2.6rem;border-radius:.3rem;display:flex;justify-content:center;align-items:center;box-sizing:border-box}.input-with-icon .icon :hover{cursor:pointer}@media (max-width: 375px){.input-with-icon .icon{top:.3rem}}.input-with-icon .icon.iconLeft{left:15px}\n"], directives: [{ type: i4__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: InputTextComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-input-text',
templateUrl: './input-text.component.html',
styleUrls: ['./input-text.component.scss'],
providers: [{
provide: i4.NG_VALUE_ACCESSOR,
useExisting: InputTextComponent,
multi: true
}]
}]
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { disabled: [{
type: i0.Input
}], icon: [{
type: i0.Input
}], iconPosition: [{
type: i0.Input
}], pdaAutoEnter: [{
type: i0.Input
}], placeholder: [{
type: i0.Input
}], showIcon: [{
type: i0.Input
}], title: [{
type: i0.Input
}], type: [{
type: i0.Input
}], error: [{
type: i0.Input
}], id: [{
type: i0.Input
}], transparent: [{
type: i0.Input
}], enterEmitted: [{
type: i0.Output
}], iconClick: [{
type: i0.Output
}], inputClick: [{
type: i0.Output
}], inputScan: [{
type: i0.ViewChild,
args: ['inputScan']
}], titleRef: [{
type: i0.ViewChild,
args: ['titleRef']
}], iconDiv: [{
type: i0.ViewChild,
args: ['iconDiv']
}] } });
var LabelTitlePipe = /** @class */ (function () {
function LabelTitlePipe() {
}
LabelTitlePipe.prototype.transform = function (value) {
var isMobile = window.innerWidth < 576;
if (isMobile && (value === null || value === void 0 ? void 0 : value.length) > 26)
return (value === null || value === void 0 ? void 0 : value.substring(0, 26)) + '...';
if ((value === null || value === void 0 ? void 0 : value.length) > 32)
return (value === null || value === void 0 ? void 0 : value.substring(0, 32)) + '...';
return value;
};
return LabelTitlePipe;
}());
LabelTitlePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LabelTitlePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
LabelTitlePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LabelTitlePipe, name: "labelTitlePipe" });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LabelTitlePipe, decorators: [{
type: i0.Pipe,
args: [{
name: 'labelTitlePipe'
}]
}] });
var LabelPipe = /** @class */ (function () {
function LabelPipe() {
}
LabelPipe.prototype.transform = function (value) {
var isMobile = window.innerWidth < 576;
if (isMobile && (value === null || value === void 0 ? void 0 : value.length) > 32)
return (value === null || value === void 0 ? void 0 : value.substring(0, 32)) + '...';
if ((value === null || value === void 0 ? void 0 : value.length) > 34)
return (value === null || value === void 0 ? void 0 : value.substring(0, 34)) + '...';
return value;
};
return LabelPipe;
}());
LabelPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LabelPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
LabelPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LabelPipe, name: "labelPipe" });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LabelPipe, decorators: [{
type: i0.Pipe,
args: [{
name: 'labelPipe'
}]
}] });
var SelectMultipleComponent = /** @class */ (function () {
function SelectMultipleComponent(sanitizer) {
this.sanitizer = sanitizer;
this.list = [];
this.listFiltered = [];
this.title = 'Insert title';
this.disabled = 'false';
this.showIcon = true;
this.placeholder = 'Insert placeholder';
this.placeholderFilter = 'Buscar';
this.quantityToFilter = 6;
this.heightOptions = '200px';
this.id = ''; // ID en Button Opcional
this.shareCheckedList = new i0.EventEmitter();
this.shareIndividualCheckedList = new i0.EventEmitter();
this.setAutofocusEvent = new i0.EventEmitter();
this.disabledValue = false;
this.filter = '';
this.showDropDown = false;
this.iconFinder = this.sanitizer.bypassSecurityTrustResourceUrl("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMCAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjE1MDMgMTIuNDE2M0MxMi4yOTUgMTIuMjcxNyAxMi41MTk1IDEyLjI1NTYgMTIuNjgxOSAxMi4zNjgxTDEyLjczOTYgMTIuNDE2M0wxNi40MDYxIDE2LjA4MjhDMTYuNTY4OCAxNi4yNDU1IDE2LjU2ODggMTYuNTA5MyAxNi40MDYxIDE2LjY3MkMxNi4yNjE0IDE2LjgxNjcgMTYuMDM2OSAxNi44MzI4IDE1Ljg3NDUgMTYuNzIwM0wxNS44MTY4IDE2LjY3MkwxMi4xNTAzIDEzLjAwNTZDMTEuOTg3NiAxMi44NDI4IDExLjk4NzYgMTIuNTc5IDEyLjE1MDMgMTIuNDE2M1oiIGZpbGw9IiMyNjQ5QjYiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi4zOTcxIDUuNTkxOTFDMTAuNDQ0NSAzLjYzOTI5IDcuMjc4NjggMy42MzkyOSA1LjMyNjA2IDUuNTkxOTFDMy4zNzM0NCA3LjU0NDUzIDMuMzczNDQgMTAuNzEwNCA1LjMyNjA2IDEyLjY2M0M3LjI3ODY4IDE0LjYxNTYgMTAuNDQ0NSAxNC42MTU2IDEyLjM5NzEgMTIuNjYzQzE0LjM0OTggMTAuNzEwNCAxNC4zNDk4IDcuNTQ0NTMgMTIuMzk3MSA1LjU5MTkxWk01LjkxNTMyIDEyLjA3MzdDNC4yODgxMyAxMC40NDY1IDQuMjg4MTMgNy44MDgzNSA1LjkxNTMyIDYuMTgxMTZDNy41NDI1IDQuNTUzOTggMTAuMTgwNyA0LjU1Mzk4IDExLjgwNzkgNi4xODExNkMxMy40MzUxIDcuODA4MzUgMTMuNDM1MSAxMC40NDY1IDExLjgwNzkgMTIuMDczN0MxMC4xODA3IDEzLjcwMDkgNy41NDI1IDEzLjcwMDkgNS45MTUzMiAxMi4wNzM3WiIgZmlsbD0iIzI2NDlCNiIvPgo8L3N2Zz4K");
}
Object.defineProperty(SelectMultipleComponent.prototype, "selectId", {
// Propiedad calculada para generar el id dinámico
get: function () {
return this.id ? "select-" + this.id : null;
},
enumerable: false,
configurable: true
});
SelectMultipleComponent.prototype.ngOnInit = function () {
this.disabledValue = this.disabled === true || this.disabled == 'true' || this.disabled === '';
};
SelectMultipleComponent.prototype.ngOnChanges = function (changes) {
if (changes['disabled'] && !changes['disabled'].firstChange) {
if (changes['disabled'].currentValue === true || changes['disabled'].currentValue == 'true' || changes['disabled'].currentValue === '') {
this.disabledValue = true;
}
else {
this.disabledValue = false;
}
}
};
SelectMultipleComponent.prototype.getListChecked = function () {
return this.list.filter((function (o) { return o.checked === true; }));
};
SelectMultipleComponent.prototype.getSelectedValue = function (status, name, value) {
if (value) {
this.currentSelected = { checked: status, name: name, value: value, quantity: 10 };
}
else {
this.currentSelected = { checked: status, name: name, quantity: 10 };
}
//share checked list
this.shareChecked();
//share individual selected item
this.shareIndividualStatus();
};
SelectMultipleComponent.prototype.shareChecked = function () {
this.shareCheckedList.emit(this.getListChecked());
};
SelectMultipleComponent.prototype.shareIndividualStatus = function () {
this.shareIndividualCheckedList.emit(this.currentSelected);
};
SelectMultipleComponent.prototype.uncheck = function (name, value) {
this.list.filter(function (el) { return el.name === name; })[0].checked = false;
this.getSelectedValue(false, name, value);
};
SelectMultipleComponent.prototype.cleanSelecteds = function () {
var _a;
this.list = (_a = this.list) === null || _a === void 0 ? void 0 : _a.map(function (item) {
return { name: item.name, value: item.value, checked: false, quantity: 0 };
});
};
SelectMultipleComponent.prototype.clickFilterComponent = function () {
var _a;
this.showDropDown = !this.showDropDown;
//Desactivar autofocus externo cuando se muestra el buscador
if (this.list.length >= this.quantityToFilter) {
(_a = this.setAutofocusEvent) === null || _a === void 0 ? void 0 : _a.emit(this.showDropDown);
}
};
SelectMultipleComponent.prototype.leaveComponent = function () {
var _a;
this.showDropDown = false;
//Desactivar autofocus externo cuando se muestra el buscador
if (this.list.length >= this.quantityToFilter) {
(_a = this.setAutofocusEvent) === null || _a === void 0 ? void 0 : _a.emit(this.showDropDown);
}
};
SelectMultipleComponent.prototype.filterData = function (value) {
if (!value) {
return;
}
var normalizar = function (str) { return str
.normalize('NFD') // Descompone los caracteres con tilde
.replace(/[\u0300-\u036f]/g, '') // Elimina los signos diacríticos
.toLowerCase(); };
this.listFiltered = this.list.filter(function (opt) { return normalizar(opt.name).includes(normalizar(value)); });
};
return SelectMultipleComponent;
}());
SelectMultipleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SelectMultipleComponent, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Component });
SelectMultipleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: SelectMultipleComponent, selector: "lct-select-multiple", inputs: { list: "list", listFiltered: "listFiltered", title: "title", disabled: "disabled", showIcon: "showIcon", placeholder: "placeholder", placeholderFilter: "placeholderFilter", quantityToFilter: "quantityToFilter", heightOptions: "heightOptions", id: "id" }, outputs: { shareCheckedList: "shareCheckedList", shareIndividualCheckedList: "shareIndividualCheckedList", setAutofocusEvent: "setAutofocusEvent" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div id=\"lct-filter\">\n <div class=\"title\">{{title}}</div>\n <div class=\"containerSelectMultiple\" (mouseleave)=\"leaveComponent()\">\n <button [attr.id]=\"selectId\" class=\"drop-toggle\" [disabled]=\"disabledValue\" (click)=\"clickFilterComponent()\">\n <span *ngIf=\"getListChecked().length<=0\">{{placeholder}}</span>\n <span *ngIf=\"getListChecked().length>0\">\n <div class=\"selected\">\n <span [ngClass]=\"{'text-disabled':getListChecked()[0].disabled?true: false}\">{{getListChecked()[0].name | labelTitlePipe}}</span>\n <div class=\"icon\" (click)=\"uncheck(getListChecked()[0].name, getListChecked()[0].value)\" [ngClass]=\"{'icon-disabled':getListChecked()[0].disabled?true: false}\">\n <svg [ngClass]=\"{'text-disabled':getListChecked()[0].disabled?true: false}\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 4 24 24\"\n fill=\"none\"\n style=\"color: #2649B6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z\"\n fill=\"currentColor\"\n />\n </svg>\n </div>\n </div>\n <span class=\"moreSelected\" *ngIf=\"getListChecked().length > 1 \">(+ {{getListChecked().length - 1}} m\u00E1s)</span>\n <!--{{getListChecked().join(', ')}}-->\n </span>\n <img *ngIf=\"showIcon\"\n class=\"select-box__icon\"\n [ngStyle]=\"{'transform': showDropDown ? 'translateY(-50%) rotate(180deg)' : 'translateY(-50%) rotate(0deg)' }\"\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gU3ZnIFZlY3RvciBJY29ucyA6IGh0dHA6Ly93d3cub25saW5ld2ViZm9udHMuY29tL2ljb24gLS0+DQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPG1ldGFkYXRhPiBTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiA8L21ldGFkYXRhPg0KPGc+PHBhdGggZD0iTTUwMCw3NzUuNEwxMCwyODcuMmw2NC40LTYyLjZMNTAwLDY1MC4ybDQyNS42LTQyNS42bDY0LjQsNjIuNkw1MDAsNzc1LjR6Ii8+PC9nPg0KPC9zdmc+\" alt=\"Arrow Icon\"\n aria-hidden=\"true\"/>\n </button>\n <div class=\"drop-show\" *ngIf=\"showDropDown && list.length>0\">\n <div *ngIf=\"list.length>=quantityToFilter\" class=\"main\">\n <lct-input-text [placeholder]=\"placeholderFilter\" title=\"\"\n [(ngModel)]=\"filter\"\n (ngModelChange)=\"filterData($event)\"\n [icon]=\"iconFinder\"\n [showIcon]=\"true\"\n ></lct-input-text>\n </div>\n <div [ngStyle]=\"{'height': list.length>=quantityToFilter ? heightOptions : 'auto','overflow-y':list.length>=quantityToFilter ? 'auto':''}\" *ngIf=\"!filter.length\">\n <label class=\"main\" *ngFor=\"let a of list\">\n <span class=\"text\" [ngClass]=\"{'text-disabled': a.disabled?true: false}\">{{a.name | labelPipe}} </span>\n <span *ngIf=\"a.quantity\">({{a.quantity}})</span>\n <input type=\"checkbox\" [(ngModel)]=\"a.checked\"\n (change)=\"getSelectedValue(a.checked,a.name, a?.value)\" [disabled]=\"a.disabled?true: false\">\n <span class=\"mark\" [ngClass]=\"{'mark-disabled': a.disabled?true: false}\"></span>\n </label>\n\n </div>\n <div [ngStyle]=\"{'height': list.length>=quantityToFilter ? heightOptions : 'auto','overflow-y':list.length>=quantityToFilter ? 'auto':''}\" *ngIf=\"filter.length\">\n <label class=\"main\" *ngFor=\"let a of listFiltered\">\n <span class=\"text\" >{{a.name | labelPipe}} </span>\n <span *ngIf=\"a.quantity\">({{a.quantity}})</span>\n <input type=\"checkbox\" [(ngModel)]=\"a.checked\"\n (change)=\"getSelectedValue(a.checked,a.name, a?.value)\" [disabled]=\"a.disabled?true: false\">\n <span class=\"mark\"></span>\n </label>\n </div>\n </div>\n <div class=\"drop-empty\" *ngIf=\"showDropDown && list.length===0\">\n Sin informaci\u00F3n\n </div>\n </div>\n</div>\n", styles: ["*{font-family:\"Barlow\",\"Open Sans\",\"Helvetica Neue\",\"Segoe UI\",\"Calibri\",\"Arial\",sans-serif}.title{color:#3c4149;font-size:12px;letter-spacing:0;line-height:15px;margin-left:2px;margin-bottom:5px}.containerSelectMultiple{width:100%;position:relative}.drop-toggle{background-color:#e0e5ee;cursor:pointer;box-sizing:border-box;height:41px;width:100%;border:0;border-radius:5px;text-align:left;font-size:14px;padding-left:12px;color:#3c4149;overflow:hidden}.select-box__icon{position:absolute;right:15px;width:20px;top:50%;transform:translateY(-50%) rotate(0);opacity:.3;transition:.2s ease}button:disabled{background-color:#f5f7fa;cursor:not-allowed;color:#c8ccd4}.drop-toggle i{float:right}.drop-show{box-sizing:border-box;width:100%;border:1px solid #E0E5EE;border-radius:5px;background-color:#fff;position:absolute;z-index:2;box-shadow:0 6px 10px #00000026;margin-left:1px}.mark-disabled{background-color:#c8ccd4!important}.text-disabled{color:#c8ccd4!important}.icon-disabled{pointer-events:none}.selected{display:inline-block;position:relative;margin-right:5px;box-sizing:border-box;height:26px;border:1px solid #C2C2C2;border-radius:3px;background-color:#f5f7fa;font-size:13px;letter-spacing:0;line-height:16px;padding:5px}.selected span{vertical-align:top}.selected .icon{display:inline;margin-left:2px}.moreSelected{position:absolute;margin-top:8px;color:#3c4149;font-size:12px;letter-spacing:0;line-height:15px}.drop-empty{width:100%;border:1px solid #E0E5EE;border-radius:5px;background-color:#fff;position:absolute;z-index:2;box-shadow:0 6px 10px #00000026;padding:12px;cursor:no-drop}.main{display:block;position:relative;margin-left:17px;margin-right:17px;margin-bottom:5px;cursor:pointer;color:#3c4149;font-size:13px;letter-spacing:0;line-height:27px}.text{margin-left:27px}input[type=checkbox]{visibility:hidden}.mark{position:absolute;top:5px;left:0;box-sizing:border-box;height:17px;width:17px;border:1px solid #D6D6D6;border-radius:2px;background-color:#f4f4f4}.main:hover input~.mark{background-color:#c2c2c2}.main input:active~.mark{background-color:#546c84}.main input:checked~.mark{background-color:#2649b6}.mark:after{content:\"\";position:absolute;display:none}.main input:checked~.mark:after{display:block}.main .mark:after{left:5px;bottom:5px;width:3px;height:6px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}\n"], components: [{ type: InputTextComponent, selector: "lct-input-text", inputs: ["disabled", "icon", "iconPosition", "pdaAutoEnter", "placeholder", "showIcon", "title", "type", "error", "id", "transparent"], outputs: ["enterEmitted", "iconClick", "inputClick"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }], pipes: { "labelTitlePipe": LabelTitlePipe, "labelPipe": LabelPipe } });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SelectMultipleComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-select-multiple',
templateUrl: './select-multiple.component.html',
styleUrls: ['./select-multiple.component.css']
}]
}], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; }, propDecorators: { list: [{
type: i0.Input
}], listFiltered: [{
type: i0.Input
}], title: [{
type: i0.Input
}], disabled: [{
type: i0.Input
}], showIcon: [{
type: i0.Input
}], placeholder: [{
type: i0.Input
}], placeholderFilter: [{
type: i0.Input
}], quantityToFilter: [{
type: i0.Input
}], heightOptions: [{
type: i0.Input
}], id: [{
type: i0.Input
}], shareCheckedList: [{
type: i0.Output
}], shareIndividualCheckedList: [{
type: i0.Output
}], setAutofocusEvent: [{
type: i0.Output
}] } });
var SelectComponent = /** @class */ (function () {
function SelectComponent(sanitizer) {
this.sanitizer = sanitizer;
this.options = ['Insert Values as string array'];
this.sort = undefined; //Indica si el array se debe ordenar, 'asc' o 'desc'
this.title = 'Insert title';
this.disabled = 'false';
this.showIcon = true;
this.placeholder = 'Insert placeholder';
this.quantityToFilter = 7;
this.id = ''; // ID en Button Opcional
this.selectedUser = '';
this.value = new i0.EventEmitter();
this.setAutofocusEvent = new i0.EventEmitter();
this.filterStore = '';
this.filteredOptions = [];
this.disabledValue = false;
this.showDropDown = false;
this.selected = '';
this.iconFinder = this.sanitizer.bypassSecurityTrustResourceUrl("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMCAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjE1MDMgMTIuNDE2M0MxMi4yOTUgMTIuMjcxNyAxMi41MTk1IDEyLjI1NTYgMTIuNjgxOSAxMi4zNjgxTDEyLjczOTYgMTIuNDE2M0wxNi40MDYxIDE2LjA4MjhDMTYuNTY4OCAxNi4yNDU1IDE2LjU2ODggMTYuNTA5MyAxNi40MDYxIDE2LjY3MkMxNi4yNjE0IDE2LjgxNjcgMTYuMDM2OSAxNi44MzI4IDE1Ljg3NDUgMTYuNzIwM0wxNS44MTY4IDE2LjY3MkwxMi4xNTAzIDEzLjAwNTZDMTEuOTg3NiAxMi44NDI4IDExLjk4NzYgMTIuNTc5IDEyLjE1MDMgMTIuNDE2M1oiIGZpbGw9IiMyNjQ5QjYiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi4zOTcxIDUuNTkxOTFDMTAuNDQ0NSAzLjYzOTI5IDcuMjc4NjggMy42MzkyOSA1LjMyNjA2IDUuNTkxOTFDMy4zNzM0NCA3LjU0NDUzIDMuMzczNDQgMTAuNzEwNCA1LjMyNjA2IDEyLjY2M0M3LjI3ODY4IDE0LjYxNTYgMTAuNDQ0NSAxNC42MTU2IDEyLjM5NzEgMTIuNjYzQzE0LjM0OTggMTAuNzEwNCAxNC4zNDk4IDcuNTQ0NTMgMTIuMzk3MSA1LjU5MTkxWk01LjkxNTMyIDEyLjA3MzdDNC4yODgxMyAxMC40NDY1IDQuMjg4MTMgNy44MDgzNSA1LjkxNTMyIDYuMTgxMTZDNy41NDI1IDQuNTUzOTggMTAuMTgwNyA0LjU1Mzk4IDExLjgwNzkgNi4xODExNkMxMy40MzUxIDcuODA4MzUgMTMuNDM1MSAxMC40NDY1IDExLjgwNzkgMTIuMDczN0MxMC4xODA3IDEzLjcwMDkgNy41NDI1IDEzLjcwMDkgNS45MTUzMiAxMi4wNzM3WiIgZmlsbD0iIzI2NDlCNiIvPgo8L3N2Zz4K");
}
Object.defineProperty(SelectComponent.prototype, "selectId", {
// Propiedad calculada para generar el id dinámico
get: function () {
return this.id ? "select-" + this.id : null;
},
enumerable: false,
configurable: true
});
SelectComponent.prototype.ngOnInit = function () {
this.disabledValue =
this.disabled === true || this.disabled == 'true' || this.disabled === '';
this.filteredOptions = this.options;
if (this.sort) {
this.sortData();
}
};
SelectComponent.prototype.ngOnChanges = function (changes) {
if (changes['selectedUser']) {
this.selected = changes['selectedUser'].currentValue;
}
if (changes['disabled'] && !changes['disabled'].firstChange) {
if (changes['disabled'].currentValue === true ||
changes['disabled'].currentValue == 'true' ||
changes['disabled'].currentValue === '') {
this.disabledValue = true;
}
else {
this.disabledValue = false;
}
}
if (changes['options'] && !changes['options'].firstChange) {
this.filteredOptions = this.options = changes['options'].currentValue;
if (this.sort) {
this.sortData();
}
}
};
SelectComponent.prototype.filterData = function (value) {
var normalizar = function (str) { return str
.normalize('NFD') // Descompone los caracteres con tilde
.replace(/[\u0300-\u036f]/g, '') // Elimina los signos diacríticos
.toLowerCase(); };
this.filteredOptions = this.options.filter(function (opt) { return normalizar(opt).includes(normalizar(value)); });
};
SelectComponent.prototype.clickFilterComponent = function () {
var _a;
this.showDropDown = !this.showDropDown;
//Desactivar autofocus externo cuando se muestra el buscador
if (this.options.length >= this.quantityToFilter) {
(_a = this.setAutofocusEvent) === null || _a === void 0 ? void 0 : _a.emit(this.showDropDown);
}
};
SelectComponent.prototype.leaveComponent = function () {
var _a;
this.showDropDown = false;
//Desactivar autofocus externo cuando se muestra el buscador
if (this.options.length >= this.quantityToFilter) {
(_a = this.setAutofocusEvent) === null || _a === void 0 ? void 0 : _a.emit(this.showDropDown);
}
};
SelectComponent.prototype.sortData = function () {
var _this = this;
this.filteredOptions.sort(function (a, b) {
if ((a === null || a === void 0 ? void 0 : a.toLowerCase()) > (b === null || b === void 0 ? void 0 : b.toLowerCase())) {
return _this.sort === 'asc' ? 1 : -1;
}
if ((a === null || a === void 0 ? void 0 : a.toLowerCase()) < (b === null || b === void 0 ? void 0 : b.toLowerCase())) {
return _this.sort === 'asc' ? -1 : 1;
}
return 0;
});
};
SelectComponent.prototype.changeValue = function (value) {
var _a;
//Activar autofocus externo
this.selected = value;
this.showDropDown = false;
(_a = this.setAutofocusEvent) === null || _a === void 0 ? void 0 : _a.emit(false);
this.value.emit(this.selected);
};
return SelectComponent;
}());
SelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SelectComponent, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Component });
SelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: SelectComponent, selector: "lct-select", inputs: { options: "options", sort: "sort", title: "title", disabled: "disabled", showIcon: "showIcon", placeholder: "placeholder", quantityToFilter: "quantityToFilter", id: "id", selectedUser: "selectedUser" }, outputs: { value: "value", setAutofocusEvent: "setAutofocusEvent" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div>\n <div class=\"title\">{{title}}</div>\n <div class=\"containerSelectMultiple\" (mouseleave)=\"leaveComponent()\" >\n <button [attr.id]=\"selectId\" class=\"drop-toggle\" [disabled]=\"disabledValue\" (click)=\"clickFilterComponent();\">\n <span *ngIf=\"!selected\">{{placeholder}}</span>\n <span *ngIf=\"selected\">\n <div>\n <span>{{selected | labelPipe}}</span>\n </div>\n </span>\n <img *ngIf=\"showIcon\"\n class=\"select-box__icon\"\n [ngStyle]=\"{'transform': showDropDown ? 'translateY(-50%) rotate(180deg)' : 'translateY(-50%) rotate(0deg)' }\"\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gU3ZnIFZlY3RvciBJY29ucyA6IGh0dHA6Ly93d3cub25saW5ld2ViZm9udHMuY29tL2ljb24gLS0+DQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPG1ldGFkYXRhPiBTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiA8L21ldGFkYXRhPg0KPGc+PHBhdGggZD0iTTUwMCw3NzUuNEwxMCwyODcuMmw2NC40LTYyLjZMNTAwLDY1MC4ybDQyNS42LTQyNS42bDY0LjQsNjIuNkw1MDAsNzc1LjR6Ii8+PC9nPg0KPC9zdmc+\" alt=\"Arrow Icon\"\n aria-hidden=\"true\"/>\n </button>\n <div class=\"drop-show\" *ngIf=\"showDropDown && options.length>0\" >\n <div *ngIf=\"options.length>=quantityToFilter\" style=\"width: 95%;padding-left:5%;\">\n <lct-input-text placeholder=\"Buscar\" title=\"\"\n [(ngModel)]=\"filterStore\"\n (ngModelChange)=\"filterData($event)\"\n [icon]=\"iconFinder\"\n [showIcon]=\"true\"\n ></lct-input-text>\n </div>\n <div [ngStyle]=\"{'height': options.length>7 ? '200px' : 'auto','overflow-y':options.length>7 ? 'auto':''}\">\n <label class=\"main\" *ngFor=\"let option of filteredOptions; let i = index\" >\n <span class=\"text\" [ngStyle]=\"{'padding-top': i===0 ? '8px' : ''}\" (click)=\"changeValue(option)\">{{option | labelPipe}}</span>\n </label>\n </div>\n\n </div>\n <div class=\"drop-empty\" *ngIf=\"showDropDown && options.length===0\">\n Sin informaci\u00F3n\n </div>\n </div>\n</div>\n", styles: ["*{font-family:\"Barlow\",\"Open Sans\",\"Helvetica Neue\",\"Segoe UI\",\"Calibri\",\"Arial\",sans-serif}.title{color:#3c4149;font-size:12px;letter-spacing:0;line-height:15px;margin-left:2px;margin-bottom:5px}.containerSelectMultiple{width:100%;position:relative}.drop-toggle{background-color:#e0e5ee;cursor:pointer;box-sizing:border-box;height:41px;width:100%;border:0;border-radius:5px;text-align:left;font-size:14px;padding-left:12px;color:#3c4149;overflow:hidden}.select-box__icon{position:absolute;right:15px;width:20px;top:50%;transform:translateY(-50%) rotate(0);opacity:.3;transition:.2s ease}button:disabled{background-color:#f5f7fa;cursor:not-allowed;color:#c8ccd4}.drop-toggle i{float:right}.drop-show{width:100%;border:1px solid #E0E5EE;border-radius:5px;background-color:#fff;position:absolute;z-index:2;box-shadow:0 6px 10px #00000026;margin-left:1px}.drop-empty{width:100%;border:1px solid #E0E5EE;border-radius:5px;background-color:#fff;position:absolute;z-index:2;box-shadow:0 6px 10px #00000026;padding:12px;cursor:no-drop}.main{display:block;position:relative;margin-left:17px;margin-right:5px;margin-bottom:5px;cursor:pointer;color:#3c4149;font-size:13px;letter-spacing:0;line-height:27px}.text{width:100%;display:block}input[type=checkbox]{visibility:hidden}.mark{position:absolute;top:5px;left:0;box-sizing:border-box;height:17px;width:17px;border:1px solid #D6D6D6;border-radius:2px;background-color:#f4f4f4}.main:hover input~.mark{background-color:#c2c2c2}.main input:active~.mark{background-color:#546c84}.main input:checked~.mark{background-color:#2649b6}.mark:after{content:\"\";position:absolute;display:none}.main input:checked~.mark:after{display:block}.main .mark:after{left:5px;bottom:5px;width:3px;height:6px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}\n"], components: [{ type: InputTextComponent, selector: "lct-input-text", inputs: ["disabled", "icon", "iconPosition", "pdaAutoEnter", "placeholder", "showIcon", "title", "type", "error", "id", "transparent"], outputs: ["enterEmitted", "iconClick", "inputClick"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "labelPipe": LabelPipe } });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SelectComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-select',
templateUrl: './select.component.html',
styleUrls: ['./select.component.css'],
}]
}], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; }, propDecorators: { options: [{
type: i0.Input
}], sort: [{
type: i0.Input
}], title: [{
type: i0.Input
}], disabled: [{
type: i0.Input
}], showIcon: [{
type: i0.Input
}], placeholder: [{
type: i0.Input
}], quantityToFilter: [{
type: i0.Input
}], id: [{
type: i0.Input
}], selectedUser: [{
type: i0.Input
}], value: [{
type: i0.Output
}], setAutofocusEvent: [{
type: i0.Output
}] } });
var ButtonComponent = /** @class */ (function () {
function ButtonComponent(renderer) {
this.renderer = renderer;
this.title = 'Insert Title';
this.buttonType = 'primary';
this.disabled = 'false';
this.shape = 'normal';
this.icon = '';
this.width = '';
this.height = '';
this.bold = 'false';
this.iconWidth = 30;
this.iconHeight = 30;
this.counter = -1;
this.id = ''; // ID en Button Opcional
this.disabledValue = false;
this.boldValue = false;
}
Object.defineProperty(ButtonComponent.prototype, "buttonId", {
// Propiedad calculada para generar el id dinámico
get: function () {
return this.id ? "btn-" + this.id : null;
},
enumerable: false,
configurable: true
});
ButtonComponent.prototype.ngAfterViewInit = function () {
var _a, _b;
this.renderButtonType();
if (this.width) {
this.renderer.setStyle((_a = this.button) === null || _a === void 0 ? void 0 : _a.nativeElement, 'width', this.width);
}
if (this.height) {
this.renderer.setStyle((_b = this.button) === null || _b === void 0 ? void 0 : _b.nativeElement, 'height', this.height);
}
};
ButtonComponent.prototype.ngOnInit = function () {
if (this.disabled === true || this.disabled == 'true' || this.disabled === '') {
this.disabledValue = true;
}
else {
this.disabledValue = false;
}
if (this.bold === true || this.bold == 'true') {
this.boldValue = true;
}
else {
this.boldValue = false;
}
};
ButtonComponent.prototype.ngOnChanges = function (changes) {
var _a, _b, _c;
if (changes['buttonType'] && !changes['buttonType'].firstChange) {
this.buttonType = (_a = changes.buttonType) === null || _a === void 0 ? void 0 : _a.currentValue;
this.renderer.removeClass((_b = this.button) === null || _b === void 0 ? void 0 : _b.nativeElement, (_c = changes.buttonType) === null || _c === void 0 ? void 0 : _c.previousValue);
this.renderButtonType();
}
else if (changes['disabled'] && !changes['disabled'].firstChange) {
console.log('disabled:', changes);
if (changes['disabled'].currentValue === true || changes['disabled'].currentValue == 'true' || changes['disabled'].currentValue === '') {
this.disabledValue = true;
}
else {
this.disabledValue = false;
}
}
};
ButtonComponent.prototype.renderButtonType = function () {
var _a;
this.renderer.addClass((_a = this.button) === null || _a === void 0 ? void 0 : _a.nativeElement, this.buttonType);
};
return ButtonComponent;
}());
ButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ButtonComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
ButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: ButtonComponent, selector: "lct-button", inputs: { title: "title", buttonType: "buttonType", disabled: "disabled", shape: "shape", icon: "icon", width: "width", height: "height", bold: "bold", iconWidth: "iconWidth", iconHeight: "iconHeight", counter: "counter", id: "id" }, viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div [ngClass]=\"{'containerBtnRound': shape==='round'}\">\n <button [attr.id]=\"buttonId\" [disabled]=\"disabledValue\" #button [ngClass]=\"{'button-round': shape==='round'}\" [ngStyle]=\"{'padding': title && shape==='normal' ? '0px 14px': ''}\" >\n <img\n *ngIf=\"icon\" [ngClass]=\"{'counterAndIconImg': counter >= 0 && icon}\"\n [width]=\"iconWidth\"\n [height]=\"iconHeight\"\n [ngStyle]=\"{'margin-right': title ? '8px': ''}\" [src]=\"icon\" alt=\"icon\">\n <span *ngIf=\"title\"\n [ngClass]=\"{'counterOn': counter >= 0 && !icon, 'counterAndIconTxt': counter >= 0 && icon}\"\n >{{shape==='normal' ? title : ''}}</span>\n <span *ngIf=\"counter >= 0\" class=\"btnCounter\">{{counter}}</span>\n </button>\n <span *ngIf=\"shape==='round'\"\n [class.fw-bold]=\"boldValue\"\n class=\"titleBtnRound\"\n >{{title}}</span>\n</div>\n", styles: [".containerBtnRound{display:flex;flex-direction:column;justify-content:center;align-items:center}button{width:100%;height:40px;border-radius:8px;border:1px solid #C2C2C2;background-color:#c8ccd4;font-size:14px;letter-spacing:0;line-height:18px;font-family:\"Barlow\",serif;cursor:pointer}button:disabled{cursor:not-allowed;background-color:#c8ccd4;color:#fff;font-weight:unset}button:not([disabled]):active img{filter:hue-rotate(10deg) saturate(.5) brightness(390%) saturate(4)}.button-round{height:44px;width:44px;border-radius:22px;padding:0!important}.button-round img{margin:0!important;width:28px;height:28px}.titleBtnRound{color:#3c4149;font-size:13px;font-style:normal;font-weight:400;line-height:14px;margin-top:6px}.primary{background-color:#2649b6;color:#fff;font-weight:bold}.primary:not([disabled]):active{background:#2A5AED}@media (hover: hover){.primary:not([disabled]):hover{background:#2A5AED}}.secondary{box-sizing:border-box;border:1px solid #2649B6;background-color:#fff;color:#2649b6}.secondary:disabled{border:0}.secondary:not([disabled]):active{background:#2A5AED;color:#fff}@media (hover: hover){.secondary:not([disabled]):hover{border:1px solid #2A5AED;color:#2a5aed}.secondary:active{color:#fff!important}}.counterOn{position:relative;float:left;left:12px}.btnCounter{background-color:#fff;color:#2649b6;position:relative;right:12px;float:right;padding:.1rem .4rem;border:1px solid #2649B6;border-radius:2px}.counterAndIconTxt{position:relative;vertical-align:middle}.counterAndIconImg{vertical-align:middle;position:relative;float:left;left:12px}.tertiary{box-sizing:border-box;background-color:#6a80b1;color:#fff}.tertiary:disabled{border:0}.tertiary:not([disabled]):hover{border:1px solid #2649B6}.tertiary:not([disabled]):active{background:#809AD2}.quaternary{box-sizing:border-box;border:1px solid #2649B6;background-color:#223359;color:#fff}.quaternary:disabled{border:0}.quaternary:not([disabled]):active{background-color:#2a5aed;color:#fff}@media (hover: hover){.quaternary:not([disabled]):hover{background-color:#fff;border:1px solid #223359;color:#223359}}.quintary{box-sizing:border-box;border:1px solid #a2a2a2;background-color:#fff;color:#000;font-weight:bold}.quintary:disabled{border:0}.quintary:not([disabled]):active{background:#a2a2a2;color:#fff}@media (hover: hover){.quintary:not([disabled]):hover{border:1px solid #a2a2a2;color:#000}.quintary:active{color:#fff!important}}.sextary{box-sizing:border-box;border:1px solid #F1F2F4;background-color:#f1f2f4;color:#151618;font-weight:bold}.sextary:disabled{border:0}.sextary:not([disabled]):active{background:#a2a2a2;color:#fff}@media (hover: hover){.sextary:not([disabled]):hover{border:1px solid #a2a2a2;color:#000}.sextary:active{color:#fff!important}}.error{background-color:#c60e4c;color:#fff}.success{background-color:#8cba37;color:#fff}\n"], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ButtonComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-button',
templateUrl: './button.component.html',
styleUrls: ['./button.component.scss']
}]
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { title: [{
type: i0.Input
}], buttonType: [{
type: i0.Input
}], disabled: [{
type: i0.Input
}], shape: [{
type: i0.Input
}], icon: [{
type: i0.Input
}], width: [{
type: i0.Input
}], height: [{
type: i0.Input
}], bold: [{
type: i0.Input
}], iconWidth: [{
type: i0.Input
}], iconHeight: [{
type: i0.Input
}], counter: [{
type: i0.Input
}], id: [{
type: i0.Input
}], button: [{
type: i0.ViewChild,
args: ['button']
}] } });
var LoadingComponent = /** @class */ (function () {
function LoadingComponent() {
}
LoadingComponent.prototype.show = function () {
this.overlay.nativeElement.style.display = 'block';
};
LoadingComponent.prototype.dismiss = function () {
this.overlay.nativeElement.style.display = 'none';
};
return LoadingComponent;
}());
LoadingComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LoadingComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
LoadingComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: LoadingComponent, selector: "lct-loading", viewQueries: [{ propertyName: "overlay", first: true, predicate: ["overlay"], descendants: true }], ngImport: i0__namespace, template: "<div id=\"overlay\" #overlay>\n<!-- <div id=\"text\">Overlay Text</div>-->\n <div id=\"text\">\n <div class=\"lds-ring\"><div></div><div></div><div></div><div></div></div>\n </div>\n</div>\n\n<!--<div style=\"padding:20px\">\n <button (click)=\"show()\">Turn on overlay effect</button>\n</div>-->\n", styles: ["#overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;z-index:999;background-color:#2c2c2c80;cursor:pointer}#text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)}.lds-ring{display:inline-block;position:relative;width:80px;height:80px}.lds-ring div{box-sizing:border-box;display:block;position:absolute;width:100px;height:100px;margin:8px;border:8px solid #2649B6;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#2649B6 transparent transparent transparent}.lds-ring div:nth-child(1){animation-delay:-.45s}.lds-ring div:nth-child(2){animation-delay:-.3s}.lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LoadingComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-loading',
templateUrl: './loading.component.html',
styleUrls: ['./loading.component.css']
}]
}], ctorParameters: function () { return []; }, propDecorators: { overlay: [{
type: i0.ViewChild,
args: ['overlay']
}] } });
var SwitchComponent = /** @class */ (function () {
function SwitchComponent() {
this.checked = false;
this.disabled = false;
this.enterEmitted = new i0.EventEmitter();
this.propagateChange = function (_) { };
}
SwitchComponent.prototype.ngOnInit = function () {
};
SwitchComponent.prototype.ngAfterViewInit = function () {
if ((typeof this.checked === 'string' && (this.checked.toLowerCase() === 'true' || this.checked.toLowerCase() === 'checked' || this.checked === '')) ||
(typeof this.checked === 'boolean' && this.checked)) {
console.log('entra al true check');
this.checked = true;
}
else {
this.checked = false;
}
if ((typeof this.disabled === 'string' && (this.disabled.toLowerCase() === 'true' || this.disabled.toLowerCase() === 'disabled' || this.disabled === '')) ||
(typeof this.disabled === 'boolean' && this.disabled)) {
this.disabled = true;
}
else {
this.disabled = false;
}
};
SwitchComponent.prototype.toggle = function () {
this.checked = !this.checked;
this.onKeyUpHandler();
};
SwitchComponent.prototype.writeValue = function (value) {
if (typeof value !== 'undefined') {
this.onKeyUpHandler(value);
}
};
SwitchComponent.prototype.registerOnChange = function (fn) {
this.propagateChange = fn;
};
SwitchComponent.prototype.registerOnTouched = function (fn) {
// console.log('reg touch', fn)
};
SwitchComponent.prototype.onKeyUpHandler = function (event) {
if (typeof event === 'boolean') {
this.checked = event;
}
this.propagateChange(this.checked);
};
SwitchComponent.prototype.enterEmit = function () {
this.enterEmitted.emit(this.checked);
};
return SwitchComponent;
}());
SwitchComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SwitchComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
SwitchComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: SwitchComponent, selector: "lct-switch", inputs: { checked: "checked", disabled: "disabled" }, outputs: { enterEmitted: "enterEmitted" }, providers: [{
provide: i4.NG_VALUE_ACCESSOR,
useExisting: SwitchComponent,
multi: true
}], ngImport: i0__namespace, template: "<label class=\"switch\">\n <input type=\"checkbox\" (click)=\"toggle()\" [checked]=\"checked\" [disabled]=\"disabled\">\n <span class=\"slider round\"></span>\n</label>\n", styles: [".switch{position:relative;display:inline-block;width:38px;height:20px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;border:1px solid #C8CCD4;transition:.4s}.slider:before{position:absolute;content:\"\";left:0%;right:50%;top:0%;bottom:0%;background-color:#e0e5ee;box-shadow:0 2px 2px #12245e26;transition:.4s}.slider:after{border:1px solid #C8CCD4;box-sizing:border-box}input:checked+.slider{background-color:#2a5aed;border:1px solid #2A5AED;box-sizing:border-box}input:disabled+.slider{background-color:#c8ccd4;cursor:not-allowed}input:checked+.slider:before{transform:translate(17px)}.slider.round{border-radius:100px}.slider.round:before{border-radius:50%}\n"] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SwitchComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-switch',
templateUrl: './switch.component.html',
styleUrls: ['./switch.component.css'],
providers: [{
provide: i4.NG_VALUE_ACCESSOR,
useExisting: SwitchComponent,
multi: true
}]
}]
}], ctorParameters: function () { return []; }, propDecorators: { checked: [{
type: i0.Input
}], disabled: [{
type: i0.Input
}], enterEmitted: [{
type: i0.Output
}] } });
var TooltipComponent = /** @class */ (function () {
function TooltipComponent(renderer) {
this.renderer = renderer;
this.message = 'insert text Tooltip';
this.secondaryMessage = '';
this.classes = 'top primary';
this.marginBottom = '';
}
TooltipComponent.prototype.ngOnInit = function () {
};
TooltipComponent.prototype.ngAfterViewInit = function () {
var _a;
if (this.marginBottom && this.classes.includes('top')) {
this.renderer.setStyle((_a = this.tooltipContainer) === null || _a === void 0 ? void 0 : _a.nativeElement, 'bottom', this.marginBottom);
}
};
return TooltipComponent;
}());
TooltipComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: TooltipComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
TooltipComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: TooltipComponent, selector: "lct-tooltip", viewQueries: [{ propertyName: "tooltipContainer", first: true, predicate: ["tooltipContainer"], descendants: true }], ngImport: i0__namespace, template: "<!--<div class=\"tooltip\">-->\n<div #tooltipContainer class=\"tooltipLCT\" [ngClass]=\"classes\">\n <span class=\"tooltipLCTText\" [ngClass]=\"classes\">\n {{message}}\n <span *ngIf=\"secondaryMessage\"><br>{{secondaryMessage}}</span>\n </span>\n</div>\n", styles: [".tooltipLCT{position:relative;display:inline-block}.tooltipLCT.top{display:flex;flex-direction:column-reverse;align-items:center;bottom:25px}.tooltipLCT.right{display:inline-flex;align-items:center;vertical-align:middle}.tooltipLCT.left{display:block}.tooltipLCT .tooltipLCTText{width:max-content;color:#fff;text-align:center;border-radius:6px;padding:10px;position:absolute;z-index:1000}.tooltipLCT .tooltipLCTText.primary{background-color:#2649b6}.tooltipLCT .tooltipLCTText.secondary{background-color:#8cba37}.tooltipLCT .tooltipLCTText.tertiary{background-color:#c60e4c}.tooltipLCT .tooltipLCTText.top.primary:after{bottom:-10px;left:48%;border-color:#2649B6 transparent transparent transparent}.tooltipLCT .tooltipLCTText.top.secondary:after{bottom:-10px;left:48%;border-color:#8CBA37 transparent transparent transparent}.tooltipLCT .tooltipLCTText.top.tertiary:after{bottom:-10px;left:48%;border-color:#C60E4C transparent transparent transparent}.tooltipLCT .tooltipLCTText.right{left:5px}.tooltipLCT .tooltipLCTText.right.primary:after{top:50%;right:100%;border-color:transparent #2649B6 transparent transparent}.tooltipLCT .tooltipLCTText.right.secondary:after{top:50%;right:100%;border-color:transparent #8CBA37 transparent transparent}.tooltipLCT .tooltipLCTText.right.tertiary:after{top:50%;right:100%;border-color:transparent #C60E4C transparent transparent}.tooltipLCT .tooltipLCTText.left{right:105%;bottom:-8px}.tooltipLCT .tooltipLCTText.left:after{display:block;width:14px;height:14px;transform:rotate(45deg);right:-7px;top:50%;border-width:0;border-style:none}.tooltipLCT .tooltipLCTText.left.primary:after{background:#2649B6}.tooltipLCT .tooltipLCTText.left.secondary:after{background:#8CBA37}.tooltipLCT .tooltipLCTText.left.tertiary:after{background:#C60E4C}.tooltipLCT .tooltipLCTText:after{content:\"\";position:absolute;margin-top:-5px;border-width:5px;border-style:solid}\n"], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: TooltipComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-tooltip',
templateUrl: './tooltip.component.html',
styleUrls: ['./tooltip.component.scss']
}]
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { tooltipContainer: [{
type: i0.ViewChild,
args: ['tooltipContainer']
}] } });
var TooltipDirective = /** @class */ (function () {
function TooltipDirective(renderer, viewContainerRef, resolver) {
this.renderer = renderer;
this.viewContainerRef = viewContainerRef;
this.resolver = resolver;
this.tooltipText = '';
this.secondaryMessage = '';
this.position = 'top';
this.color = 'primary';
this.marginBottom = '';
}
TooltipDirective.prototype.onMouseEnter = function () {
var componentFactory = this.resolver.resolveComponentFactory(TooltipComponent);
var componentRef = this.viewContainerRef.createComponent(componentFactory);
if (this.tooltipText) {
componentRef.instance.message = this.tooltipText;
}
if (this.secondaryMessage) {
componentRef.instance.secondaryMessage = this.secondaryMessage;
}
if (this.marginBottom) {
componentRef.instance.marginBottom = this.marginBottom;
}
componentRef.instance.classes = this.position + " " + this.color + " ";
};
TooltipDirective.prototype.onMouseLeave = function () {
if (this.viewContainerRef) {
this.viewContainerRef.clear();
}
};
return TooltipDirective;
}());
TooltipDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: TooltipDirective, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Directive });
TooltipDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.5", type: TooltipDirective, selector: "[lctTooltip]", inputs: { tooltipText: "tooltipText", secondaryMessage: "secondaryMessage", position: "position", color: "color", marginBottom: "marginBottom" }, host: { listeners: { "mouseover": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: TooltipDirective, decorators: [{
type: i0.Directive,
args: [{
selector: '[lctTooltip]',
}]
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { tooltipText: [{
type: i0.Input
}], secondaryMessage: [{
type: i0.Input
}], position: [{
type: i0.Input
}], color: [{
type: i0.Input
}], marginBottom: [{
type: i0.Input
}], onMouseEnter: [{
type: i0.HostListener,
args: ["mouseover"]
}], onMouseLeave: [{
type: i0.HostListener,
args: ["mouseleave"]
}] } });
var ModalTooltipComponent = /** @class */ (function () {
function ModalTooltipComponent() {
/* directive variable */
this.nameStore = '-';
this.version = '-';
this.dateVersion = '-';
this.conditional2 = new rxjs.BehaviorSubject(false);
this.openModalStore = new rxjs.BehaviorSubject(false);
this.showChangeStore = false;
}
ModalTooltipComponent.prototype.cerrarModal = function () {
this.conditional2.next(true);
};
ModalTooltipComponent.prototype.openChangeStore = function () {
this.openModalStore.next(true);
};
return ModalTooltipComponent;
}());
ModalTooltipComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ModalTooltipComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
ModalTooltipComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: ModalTooltipComponent, selector: "lct-modal-tooltip", ngImport: i0__namespace, template: "<div class=\"tooltipTienda\">\n <span class=\"tooltiptext\">\n <div class=\"row\">\n <div class=\"estoy\">\n <span> Estoy en: </span>\n <svg (click)=\"cerrarModal()\" style=\"float: right; margin-right: 39px; cursor: pointer\" width=\"15\"\n height=\"14\" viewBox=\"0 0 15 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.7704 0.937266C13.3804 0.547266 12.7504 0.547266 12.3604 0.937266L7.47043 5.81727L2.58043 0.927266C2.19043 0.537266 1.56043 0.537266 1.17043 0.927266C0.78043 1.31727 0.78043 1.94727 1.17043 2.33727L6.06043 7.22727L1.17043 12.1173C0.78043 12.5073 0.78043 13.1373 1.17043 13.5273C1.56043 13.9173 2.19043 13.9173 2.58043 13.5273L7.47043 8.63727L12.3604 13.5273C12.7504 13.9173 13.3804 13.9173 13.7704 13.5273C14.1604 13.1373 14.1604 12.5073 13.7704 12.1173L8.88043 7.22727L13.7704 2.33727C14.1504 1.95727 14.1504 1.31727 13.7704 0.937266Z\"\n fill=\"#3C4149\" />\n </svg>\n </div>\n\n <div class=\"col col-12\">\n <div class=\"col col-2\">\n <svg class=\"icon-tooltip\" width=\"31\" height=\"31\" viewBox=\"0 0 31 31\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.78618 2.72754C7.3764 2.72754 7.04213 2.99376 7.04213 3.32278C7.04213 3.6518 7.3764 3.91802 7.78618 3.91802H24.1552C24.5679 3.91802 24.8993 3.6518 24.8993 3.32278C24.8993 2.99376 24.5679 2.72754 24.1552 2.72754H7.78618ZM25.3457 5.10849H6.5957L3.4707 11.0609H28.4707L25.3457 5.10849ZM3.4707 13.0252C3.4707 14.4655 4.46865 15.6655 5.81445 16.0116V26.1799H4.25195C3.82163 26.1799 3.4707 26.526 3.4707 26.9537C3.4707 27.3815 3.82168 27.7275 4.25195 27.7275H27.6895C28.1228 27.7275 28.4707 27.3815 28.4707 26.9537C28.4707 26.526 28.1228 26.1799 27.6895 26.1799H26.127V16.0116C27.4728 15.6655 28.4707 14.4655 28.4707 13.0252V12.2513H3.4707V13.0252ZM19.0957 16.1204C20.823 16.1204 22.2207 14.7345 22.2207 13.0251C22.2207 14.4655 23.2187 15.6655 24.5645 16.0116V26.1799H12.8457V16.1204C14.573 16.1204 15.9707 14.7345 15.9707 13.0251C15.9707 14.7345 17.3715 16.1204 19.0957 16.1204ZM12.0645 26.1799V16.0116C10.7187 15.6655 9.7207 14.4655 9.7207 13.0251C9.7207 14.4655 8.7228 15.6655 7.37695 16.0116V26.1799H12.0645Z\"\n fill=\"#2649B6\" />\n </svg>\n </div>\n <div class=\"font-tienda\">\n <span>\n {{nameStore | titlecase}}\n </span>\n </div>\n </div>\n <div *ngIf=\"showChangeStore\" class=\"col col-12 font-change-store\" (click)=\"openChangeStore()\">\n Cambiar tienda\n </div>\n <div class=\"compilation-text\">\n Version {{version}} / Compilaci\u00F3n: {{dateVersion}}\n </div>\n </div>\n </span>\n</div>", styles: [".tooltipTienda{position:relative;display:inline-block;border-bottom:1px dotted black}.tooltipTienda .tooltiptext{position:absolute;width:368px;height:157px;left:-376px;top:17px;background:#ffffff;box-shadow:0 2px 8px #00000026;border-radius:8px;z-index:99}@media screen and (min-width: 320px) and (max-width: 561px){.tooltipTienda .tooltiptext{width:310px;left:-304px}}.tooltipTienda .tooltiptext .text{position:absolute;width:53px;height:24px;left:17.75px;top:9.2px;font-family:\"Barlow\",serif;font-style:normal;font-weight:400;font-size:13px;line-height:24px}.tooltipTienda .tooltiptext .icon-tooltip{position:absolute!important;left:8.33%!important;right:8.33%;top:30.33%!important;bottom:8.33%}.tooltipTienda .tooltiptext .font-tienda{margin-top:14px;margin-left:70px;font-family:\"Barlow\",serif;font-style:normal;font-weight:700;font-size:14px;line-height:24px;color:#3c4149;text-align:left!important}.tooltipTienda .tooltiptext .font-change-store{font-family:\"Barlow\";font-style:normal;font-weight:700;font-size:14px;line-height:24px;-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#2649b6;margin-top:17px!important;text-align:center;cursor:pointer}.tooltipTienda .tooltiptext .compilation-text{font-size:13px;margin-left:12px;margin-top:130px;font-family:\"Barlow\",serif;text-align:center!important;position:absolute}.tooltipTienda .tooltiptext .estoy{margin-left:27px;margin-top:9px;text-align:left!important;font-family:\"Barlow\",serif;font-style:normal;font-weight:400;font-size:13px;line-height:24px;color:#000}\n"], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "titlecase": i3__namespace.TitleCasePipe } });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ModalTooltipComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-modal-tooltip',
templateUrl: './modal-tooltip.component.html',
styleUrls: ['./modal-tooltip.component.scss']
}]
}], ctorParameters: function () { return []; } });
var ModalChangeStoreComponent = /** @class */ (function () {
function ModalChangeStoreComponent() {
this.widthModalConfig = '100px';
this.heightModalConfig = '100px';
this.tiendas = [];
this.sendSelectStore = new i0.EventEmitter();
this.closeModalStore = new rxjs.BehaviorSubject({ change: undefined });
this.storeSelect = undefined;
this.buttonDisable = false;
this.storeName = [];
this.closeIcon = false;
this.userId = '';
}
ModalChangeStoreComponent.prototype.ngOnInit = function () {
var _this = this;
this.checkStoreSelected();
this.tiendas.forEach(function (element) {
_this.storeName.push(element.nodeName);
});
if (!this.storeSelect) {
this.buttonDisable = true;
}
};
ModalChangeStoreComponent.prototype.cerrarModal = function () {
this.closeModalStore.next({ change: false });
};
ModalChangeStoreComponent.prototype.selectedValue = function (evento) {
this.buttonDisable = false;
this.storeSelect = this.tiendas.find(function (str) { return str.nodeName === evento; });
};
ModalChangeStoreComponent.prototype.selectStore = function () {
var _a;
if (!this.buttonDisable) {
var storeSelected = sessionStorage.getItem('storeSelected');
console.log('store selec', storeSelected);
if (storeSelected) {
var storeSelectedJson = JSON.parse(storeSelected);
if ((storeSelectedJson === null || storeSelectedJson === void 0 ? void 0 : storeSelectedJson.nodeId) === ((_a = this.storeSelect) === null || _a === void 0 ? void 0 : _a.nodeId)) {
this.closeModalStore.next({ change: false });
return;
}
else {
sessionStorage.setItem('storeSelected', JSON.stringify(this.storeSelect));
sessionStorage.setItem('userId', this.userId);
this.closeModalStore.next({ change: true });
}
}
else {
sessionStorage.setItem('userId', this.userId);
sessionStorage.setItem('storeSelected', JSON.stringify(this.storeSelect));
this.closeModalStore.next({ change: true });
}
}
};
ModalChangeStoreComponent.prototype.checkStoreSelected = function () {
this.closeIcon = !!sessionStorage.getItem('storeSelected');
};
return ModalChangeStoreComponent;
}());
ModalChangeStoreComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ModalChangeStoreComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
ModalChangeStoreComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: ModalChangeStoreComponent, selector: "lct-modal", inputs: { widthModalConfig: "widthModalConfig", heightModalConfig: "heightModalConfig", tiendas: "tiendas", userId: "userId" }, outputs: { sendSelectStore: "sendSelectStore" }, ngImport: i0__namespace, template: "<div class=\"modalmask open\" >\n <div class=\"modalbox movedown\" [ngStyle]=\"{'width': widthModalConfig,'height': heightModalConfig}\">\n <div class=\"row\" [ngStyle]=\"{'margin-top': closeIcon? '0px': '25px'}\" >\n <!-- X close -->\n\n <div *ngIf=\"closeIcon\" >\n <svg (click)=\"cerrarModal()\" style=\"margin-top: 9px; float: right; margin-right: 20px;\n cursor: pointer\" width=\"15\" height=\"14\" viewBox=\"0 0 15 14\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.7704 0.937266C13.3804 0.547266 12.7504 0.547266 12.3604 0.937266L7.47043 5.81727L2.58043 0.927266C2.19043 0.537266 1.56043 0.537266 1.17043 0.927266C0.78043 1.31727 0.78043 1.94727 1.17043 2.33727L6.06043 7.22727L1.17043 12.1173C0.78043 12.5073 0.78043 13.1373 1.17043 13.5273C1.56043 13.9173 2.19043 13.9173 2.58043 13.5273L7.47043 8.63727L12.3604 13.5273C12.7504 13.9173 13.3804 13.9173 13.7704 13.5273C14.1604 13.1373 14.1604 12.5073 13.7704 12.1173L8.88043 7.22727L13.7704 2.33727C14.1504 1.95727 14.1504 1.31727 13.7704 0.937266Z\"\n fill=\"#3C4149\" />\n </svg>\n </div>\n\n <div class=\"col col-2\">\n<!-- <img [src]=\"icon\">-->\n <svg width=\"61\" height=\"61\" viewBox=\"0 0 61 61\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"30.2793\" cy=\"30.0234\" r=\"30\" fill=\"#F5F7FA\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M21.5495 16.6904C21.1124 16.6904 20.7558 16.9744 20.7558 17.3254C20.7558 17.6763 21.1124 17.9603 21.5495 17.9603H39.0098C39.45 17.9603 39.8034 17.6763 39.8034 17.3254C39.8034 16.9744 39.45 16.6904 39.0098 16.6904H21.5495ZM40.2796 19.2301H20.2796L16.9463 25.5793H43.613L40.2796 19.2301ZM16.9463 27.6746C16.9463 29.2109 18.0108 30.4909 19.4463 30.8601V41.7063H17.7796C17.3206 41.7063 16.9463 42.0755 16.9463 42.5317C16.9463 42.9879 17.3207 43.3571 17.7796 43.3571H42.7796C43.2419 43.3571 43.613 42.9879 43.613 42.5317C43.613 42.0755 43.2419 41.7063 42.7796 41.7063H41.113V30.8601C42.5485 30.4909 43.613 29.2109 43.613 27.6746V26.8492H16.9463V27.6746ZM33.613 30.9761C35.4554 30.9761 36.9463 29.4978 36.9463 27.6745C36.9463 29.2109 38.0108 30.4909 39.4463 30.8601V41.7063H26.9463V30.9761C28.7887 30.9761 30.2796 29.4978 30.2796 27.6745C30.2796 29.4978 31.7738 30.9761 33.613 30.9761ZM26.113 41.7063V30.8601C24.6774 30.4909 23.613 29.2109 23.613 27.6745C23.613 29.2109 22.5485 30.4909 21.113 30.8601V41.7063H26.113Z\" fill=\"#2649B6\"/>\n </svg>\n\n </div>\n <div class=\"col col-10 title-modal\">Selecci\u00F3n de tienda</div>\n </div>\n <div class=\"selector\">\n <lct-select title=\"\" placeholder=\"Seleccione tienda\"\n [options]=\"storeName\" \n sort=\"asc\"\n (value)=\"selectedValue($event)\">\n </lct-select>\n </div>\n <div class=\"button-accept\">\n <lct-button buttonType=\"primary\" title=\"Seleccionar\" (click)=\"selectStore()\" [disabled]=\"buttonDisable\"></lct-button>\n </div>\n </div>\n</div>\n", styles: [".modalmask{position:fixed;font-family:Arial,sans-serif;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8);z-index:99999;opacity:0;transition:opacity .4s ease-in;pointer-events:none}.modalmask.open{opacity:1;pointer-events:auto}.modalmask .modalbox{width:400px;position:relative;padding:5px 20px 13px;background:#fff;border-radius:3px;transition:all .5s ease-in}.modalmask .modalbox.movedown{margin:0 auto;margin-top:calc(50vh - 134px)}@media screen and (min-width: 100px) and (max-width: 490px){.modalmask .modalbox.movedown{margin-top:0%!important}}.modalmask .modalbox .title-modal{margin-top:15px;font-family:\"Barlow\";font-style:normal;font-weight:700;font-size:20px;line-height:24px;color:#3c4149}.modalmask .modalbox .selector{width:288px;margin:20px auto 0}.modalmask .modalbox .button-accept{width:288px;margin-top:25px!important;margin:0 auto}\n"], components: [{ type: SelectComponent, selector: "lct-select", inputs: ["options", "sort", "title", "disabled", "showIcon", "placeholder", "quantityToFilter", "id", "selectedUser"], outputs: ["value", "setAutofocusEvent"] }, { type: ButtonComponent, selector: "lct-button", inputs: ["title", "buttonType", "disabled", "shape", "icon", "width", "height", "bold", "iconWidth", "iconHeight", "counter", "id"] }], directives: [{ type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ModalChangeStoreComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-modal',
templateUrl: './modal-change-store.component.html',
styleUrls: ['./modal-change-store.scss']
}]
}], ctorParameters: function () { return []; }, propDecorators: { widthModalConfig: [{
type: i0.Input
}], heightModalConfig: [{
type: i0.Input
}], tiendas: [{
type: i0.Input
}], sendSelectStore: [{
type: i0.Output
}], userId: [{
type: i0.Input
}] } });
var ModalTooltipDirective = /** @class */ (function () {
function ModalTooltipDirective(viewContainerRef, resolver) {
this.viewContainerRef = viewContainerRef;
this.resolver = resolver;
this.tooltipText = '';
this.version = '';
this.dateVersion = '';
this.country = '';
this.nodes = [];
this.stores = [];
this.changeNode = new i0.EventEmitter();
this.closeModal = new i0.EventEmitter();
this.openModalChangeNode = new i0.EventEmitter();
this.isMobile = false;
this.userId = '';
this.componentRef2 = undefined;
}
ModalTooltipDirective.prototype.ngOnInit = function () {
var userID = sessionStorage.getItem('userId');
this.formatStore();
this.assingStore();
if (userID !== this.userId) {
sessionStorage.removeItem('userId');
sessionStorage.removeItem('storeSelected');
}
var storeSelected = sessionStorage.getItem('storeSelected');
this.selectedStore(storeSelected);
};
ModalTooltipDirective.prototype.formatStore = function () {
var _this = this;
this.nodes.forEach(function (e) {
e.node.forEach(function (nEl) {
var obj = new LctNode(e.operator, nEl);
_this.stores.push(obj);
});
});
};
ModalTooltipDirective.prototype.ngOnChanges = function (changes) {
var _a, _b;
if (((_a = changes.country) === null || _a === void 0 ? void 0 : _a.currentValue) !== ((_b = changes.country) === null || _b === void 0 ? void 0 : _b.previousValue)) {
if (this.componentRef2 !== undefined) {
console.log('ejecuta limpiza de conponente y abre el modal');
this.viewContainerRef.clear();
this.openModal();
}
}
};
ModalTooltipDirective.prototype.onMouseEnter = function () {
var _this = this;
var componentFactory = this.resolver.resolveComponentFactory(ModalTooltipComponent);
var componentRef = this.viewContainerRef.createComponent(componentFactory);
if (this.tooltipText) {
componentRef.instance.nameStore = this.tooltipText;
}
if (this.version) {
componentRef.instance.version = this.version;
}
if (this.dateVersion) {
componentRef.instance.dateVersion = this.dateVersion;
}
if (this.stores.length > 1) {
componentRef.instance.showChangeStore = true;
}
componentRef.instance.conditional2.subscribe(function (resp) {
if (resp) {
if (_this.viewContainerRef) {
_this.viewContainerRef.clear();
_this.closeModal.next(true);
}
}
});
componentRef.instance.openModalStore.subscribe(function (reso) {
if (reso) {
_this.openModal();
}
});
};
ModalTooltipDirective.prototype.openModal = function () {
var _this = this;
var componentFactory = this.resolver.resolveComponentFactory(ModalChangeStoreComponent);
this.componentRef2 = this.viewContainerRef.createComponent(componentFactory);
if (this.openModalChangeNode)
this.openModalChangeNode.next(true);
this.componentRef2.instance.widthModalConfig = this.isMobile ? "100%" : '458px';
this.componentRef2.instance.heightModalConfig = this.isMobile ? "100%" : '268px';
if (this.stores) {
// Filtra las tiendas en base al pais
this.componentRef2.instance.tiendas = this.stores.filter(function (x) { return x.country === _this.country; });
}
if (this.userId) {
this.componentRef2.instance.userId = this.userId;
}
this.componentRef2.instance.closeModalStore.subscribe(function (resp) {
if (typeof resp.change === 'boolean') {
if (_this.viewContainerRef) {
if (resp.change) {
_this.assingStore();
}
_this.changeNode.next(resp.change);
_this.viewContainerRef.clear();
}
}
});
};
ModalTooltipDirective.prototype.assingStore = function () {
var _a;
var storeSelected = sessionStorage.getItem('storeSelected');
if (storeSelected) {
this.tooltipText = ((_a = JSON.parse(storeSelected)) === null || _a === void 0 ? void 0 : _a.nodeName) || '';
}
};
ModalTooltipDirective.prototype.selectedStore = function (storeSelected) {
if (this.stores.length > 1 && !storeSelected) {
this.openModal();
}
else if (this.stores.length === 1) {
this.tooltipText = this.stores[0].nodeName;
sessionStorage.setItem('storeSelected', JSON.stringify(this.stores[0]));
}
else {
console.error('You don`t have store');
}
};
return ModalTooltipDirective;
}());
ModalTooltipDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ModalTooltipDirective, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Directive });
ModalTooltipDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.5", type: ModalTooltipDirective, selector: "[lctModalTooltip]", inputs: { version: "version", dateVersion: "dateVersion", country: "country", nodes: "nodes", isMobile: "isMobile", userId: "userId" }, outputs: { changeNode: "changeNode", closeModal: "closeModal", openModalChangeNode: "openModalChangeNode" }, host: { listeners: { "click": "onMouseEnter()" } }, usesOnChanges: true, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ModalTooltipDirective, decorators: [{
type: i0.Directive,
args: [{
selector: '[lctModalTooltip]'
}]
}], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { version: [{
type: i0.Input
}], dateVersion: [{
type: i0.Input
}], country: [{
type: i0.Input
}], nodes: [{
type: i0.Input
}], changeNode: [{
type: i0.Output
}], closeModal: [{
type: i0.Output
}], openModalChangeNode: [{
type: i0.Output
}], isMobile: [{
type: i0.Input
}], userId: [{
type: i0.Input
}], onMouseEnter: [{
type: i0.HostListener,
args: ["click"]
}] } });
var LctNode = /** @class */ (function () {
function LctNode(_operator, _node) {
this.nodeName = _node.nodeName;
this.nodeId = _node.nodeId;
this.country = _operator.country;
this.commerce = _operator.commerce;
}
return LctNode;
}());
;
// import {TooltipComponent} from "../tooltip/tooltip.component";
var ClipboardComponent = /** @class */ (function () {
function ClipboardComponent(viewContainerRef,
// private resolver: ComponentFactoryResolver,
componentFactoryResolver) {
this.viewContainerRef = viewContainerRef;
this.componentFactoryResolver = componentFactoryResolver;
this.message = '';
this.copyActive = false;
}
ClipboardComponent.prototype.ngOnInit = function () {
};
ClipboardComponent.prototype.ngAfterViewInit = function () {
};
ClipboardComponent.prototype.copyToClipboard = function () {
var _this = this;
var input = document.createElement("input");
input.setAttribute("value", this.message);
input.setAttribute('inputMode', 'none');
document.body.appendChild(input);
console.error('Se Copia al portapapeles: ', input.value); //CONSOLE PARA DEBUG
if (input.value !== '') {
this.copyActive = true;
}
setTimeout(function () {
input.select();
document.execCommand("copy");
document.body.removeChild(input);
});
setTimeout(function () {
_this.copyActive = false;
}, 3000);
};
ClipboardComponent.prototype.close = function () {
this.copyActive = false;
};
return ClipboardComponent;
}());
ClipboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ClipboardComponent, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
ClipboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: ClipboardComponent, selector: "lct-clipboard", providers: [{
provide: i4.NG_VALUE_ACCESSOR,
useExisting: ClipboardComponent,
multi: true
}], ngImport: i0__namespace, template: "<div *ngIf=\"copyActive\" class=\"copy-message\">\n Dato copiado.\n <svg class=\"close-board\" width=\"13.19\" height=\"13.19\" viewBox=\"0 0 14 14\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 15px;height: 15px;margin-left: 10px;\" (click)=\"close()\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.2997 0.709971C12.9097 0.319971 12.2797 0.319971 11.8897 0.709971L6.99973 5.58997L2.10973 0.699971C1.71973 0.309971 1.08973 0.309971 0.699727 0.699971C0.309727 1.08997 0.309727 1.71997 0.699727 2.10997L5.58973 6.99997L0.699727 11.89C0.309727 12.28 0.309727 12.91 0.699727 13.3C1.08973 13.69 1.71973 13.69 2.10973 13.3L6.99973 8.40997L11.8897 13.3C12.2797 13.69 12.9097 13.69 13.2997 13.3C13.6897 12.91 13.6897 12.28 13.2997 11.89L8.40973 6.99997L13.2997 2.10997C13.6797 1.72997 13.6797 1.08997 13.2997 0.709971Z\"\n fill=\"#ffffff\" />\n </svg>\n</div>\n<div>\n <img class=\"copy_icon\"\n (click)=\"copyToClipboard()\"\n src=\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzM3MzVfNzU3NDApIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04IDZDOCA1LjQ2OTU3IDguMjEwNzEgNC45NjA4NiA4LjU4NTc5IDQuNTg1NzlDOC45NjA4NiA0LjIxMDcxIDkuNDY5NTcgNCAxMCA0SDE4QzE4LjUzMDQgNCAxOS4wMzkxIDQuMjEwNzEgMTkuNDE0MiA0LjU4NTc5QzE5Ljc4OTMgNC45NjA4NiAyMCA1LjQ2OTU3IDIwIDZWMTRDMjAgMTQuNTMwNCAxOS43ODkzIDE1LjAzOTEgMTkuNDE0MiAxNS40MTQyQzE5LjAzOTEgMTUuNzg5MyAxOC41MzA0IDE2IDE4IDE2SDEwQzkuNDY5NTcgMTYgOC45NjA4NiAxNS43ODkzIDguNTg1NzkgMTUuNDE0MkM4LjIxMDcxIDE1LjAzOTEgOCAxNC41MzA0IDggMTRWNlpNMTAgNUM5LjczNDc4IDUgOS40ODA0MyA1LjEwNTM2IDkuMjkyODkgNS4yOTI4OUM5LjEwNTM2IDUuNDgwNDMgOSA1LjczNDc4IDkgNlYxNEM5IDE0LjI2NTIgOS4xMDUzNiAxNC41MTk2IDkuMjkyODkgMTQuNzA3MUM5LjQ4MDQzIDE0Ljg5NDYgOS43MzQ3OCAxNSAxMCAxNUgxOEMxOC4yNjUyIDE1IDE4LjUxOTYgMTQuODk0NiAxOC43MDcxIDE0LjcwNzFDMTguODk0NiAxNC41MTk2IDE5IDE0LjI2NTIgMTkgMTRWNkMxOSA1LjczNDc4IDE4Ljg5NDYgNS40ODA0MyAxOC43MDcxIDUuMjkyODlDMTguNTE5NiA1LjEwNTM2IDE4LjI2NTIgNSAxOCA1SDEwWk02IDlDNS43MzQ3OCA5IDUuNDgwNDMgOS4xMDUzNiA1LjI5Mjg5IDkuMjkyODlDNS4xMDUzNiA5LjQ4MDQzIDUgOS43MzQ3OCA1IDEwVjE4QzUgMTguMjY1MiA1LjEwNTM2IDE4LjUxOTYgNS4yOTI4OSAxOC43MDcxQzUuNDgwNDMgMTguODk0NiA1LjczNDc4IDE5IDYgMTlIMTRDMTQuMjY1MiAxOSAxNC41MTk2IDE4Ljg5NDYgMTQuNzA3MSAxOC43MDcxQzE0Ljg5NDYgMTguNTE5NiAxNSAxOC4yNjUyIDE1IDE4VjE3SDE2VjE4QzE2IDE4LjUzMDQgMTUuNzg5MyAxOS4wMzkxIDE1LjQxNDIgMTkuNDE0MkMxNS4wMzkxIDE5Ljc4OTMgMTQuNTMwNCAyMCAxNCAyMEg2QzUuNDY5NTcgMjAgNC45NjA4NiAxOS43ODkzIDQuNTg1NzkgMTkuNDE0MkM0LjIxMDcxIDE5LjAzOTEgNCAxOC41MzA0IDQgMThWMTBDNCA5LjQ2OTU3IDQuMjEwNzEgOC45NjA4NiA0LjU4NTc5IDguNTg1NzlDNC45NjA4NiA4LjIxMDcxIDUuNDY5NTcgOCA2IDhIN1Y5SDZaIiBmaWxsPSIjMjY0OUI2Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMzczNV83NTc0MCI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQgNCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K\"\n alt=\"Copy Clipboard\" aria-hidden=\"true\" />\n</div>", styles: [".copy_icon{width:25px;height:25px;cursor:pointer}.copy-message{background-color:#2649b6;color:#fff;width:147px;padding:5px 10px!important;display:block;position:absolute;border-radius:5px;font-size:16px;height:37px;font-weight:400!important;align-items:center;display:flex;z-index:100;margin-left:-55px;margin-top:-40px}\n"], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ClipboardComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-clipboard',
templateUrl: './clipboard.component.html',
styleUrls: ['./clipboard.component.css'],
providers: [{
provide: i4.NG_VALUE_ACCESSOR,
useExisting: ClipboardComponent,
multi: true
}]
}]
}], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ComponentFactoryResolver }]; } });
var ClipboardDirective = /** @class */ (function () {
function ClipboardDirective(
// private renderer: Renderer2,
viewContainerRef, resolver, componentFactoryResolver) {
this.viewContainerRef = viewContainerRef;
this.resolver = resolver;
this.componentFactoryResolver = componentFactoryResolver;
this.textCopy = '';
}
ClipboardDirective.prototype.ngOnInit = function () {
this.loadImageComponent();
};
ClipboardDirective.prototype.loadImageComponent = function () {
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(ClipboardComponent);
var componentRef = this.viewContainerRef.createComponent(componentFactory);
// Si tienes una lógica para pasar datos al componente de imagen, aquí puedes hacerlo
if (this.textCopy) {
componentRef.instance.message = this.textCopy;
}
};
return ClipboardDirective;
}());
ClipboardDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ClipboardDirective, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Directive });
ClipboardDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.5", type: ClipboardDirective, selector: "[lctClipboard]", inputs: { textCopy: "textCopy" }, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ClipboardDirective, decorators: [{
type: i0.Directive,
args: [{
selector: '[lctClipboard]',
}]
}], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { textCopy: [{
type: i0.Input
}] } });
var SelectMultipleNestedComponent = /** @class */ (function () {
function SelectMultipleNestedComponent(sanitizer) {
this.sanitizer = sanitizer;
this.list = [];
this.listFiltered = [];
this.title = 'Insert title';
this.disabled = 'false';
this.showIcon = true;
this.placeholder = 'Insert placeholder';
this.placeholderFilter = 'Buscar';
this.quantityToFilter = 6;
this.heightOptions = '200px';
this.id = ''; // ID en Button Opcional
this.shareCheckedList = new i0.EventEmitter();
this.shareIndividualCheckedList = new i0.EventEmitter();
this.setAutofocusEvent = new i0.EventEmitter();
this.disabledValue = false;
this.filter = '';
this.currentSelected = null;
this.showDropDown = false;
this.searchValue = '';
this.iconFinder = this.sanitizer.bypassSecurityTrustResourceUrl("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMCAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjE1MDMgMTIuNDE2M0MxMi4yOTUgMTIuMjcxNyAxMi41MTk1IDEyLjI1NTYgMTIuNjgxOSAxMi4zNjgxTDEyLjczOTYgMTIuNDE2M0wxNi40MDYxIDE2LjA4MjhDMTYuNTY4OCAxNi4yNDU1IDE2LjU2ODggMTYuNTA5MyAxNi40MDYxIDE2LjY3MkMxNi4yNjE0IDE2LjgxNjcgMTYuMDM2OSAxNi44MzI4IDE1Ljg3NDUgMTYuNzIwM0wxNS44MTY4IDE2LjY3MkwxMi4xNTAzIDEzLjAwNTZDMTEuOTg3NiAxMi44NDI4IDExLjk4NzYgMTIuNTc5IDEyLjE1MDMgMTIuNDE2M1oiIGZpbGw9IiMyNjQ5QjYiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi4zOTcxIDUuNTkxOTFDMTAuNDQ0NSAzLjYzOTI5IDcuMjc4NjggMy42MzkyOSA1LjMyNjA2IDUuNTkxOTFDMy4zNzM0NCA3LjU0NDUzIDMuMzczNDQgMTAuNzEwNCA1LjMyNjA2IDEyLjY2M0M3LjI3ODY4IDE0LjYxNTYgMTAuNDQ0NSAxNC42MTU2IDEyLjM5NzEgMTIuNjYzQzE0LjM0OTggMTAuNzEwNCAxNC4zNDk4IDcuNTQ0NTMgMTIuMzk3MSA1LjU5MTkxWk01LjkxNTMyIDEyLjA3MzdDNC4yODgxMyAxMC40NDY1IDQuMjg4MTMgNy44MDgzNSA1LjkxNTMyIDYuMTgxMTZDNy41NDI1IDQuNTUzOTggMTAuMTgwNyA0LjU1Mzk4IDExLjgwNzkgNi4xODExNkMxMy40MzUxIDcuODA4MzUgMTMuNDM1MSAxMC40NDY1IDExLjgwNzkgMTIuMDczN0MxMC4xODA3IDEzLjcwMDkgNy41NDI1IDEzLjcwMDkgNS45MTUzMiAxMi4wNzM3WiIgZmlsbD0iIzI2NDlCNiIvPgo8L3N2Zz4K");
}
Object.defineProperty(SelectMultipleNestedComponent.prototype, "selectId", {
// Propiedad calculada para generar el id dinámico
get: function () {
return this.id ? "select-" + this.id : null;
},
enumerable: false,
configurable: true
});
SelectMultipleNestedComponent.prototype.ngOnInit = function () {
this.listFiltered = __spreadArray([], __read(this.list));
// console.log(this.listFiltered);
this.disabledValue =
this.disabled === true || this.disabled == 'true' || this.disabled === '';
};
SelectMultipleNestedComponent.prototype.ngOnChanges = function (changes) {
if (changes['disabled'] && !changes['disabled'].firstChange) {
if (changes['disabled'].currentValue === true ||
changes['disabled'].currentValue == 'true' ||
changes['disabled'].currentValue === '') {
this.disabledValue = true;
}
else {
this.disabledValue = false;
}
}
if (changes['list']) {
if (Array.isArray(changes['list'].currentValue)) {
this.list = changes['list'].currentValue;
this.applyFilter();
}
}
};
SelectMultipleNestedComponent.prototype.getListChecked = function () {
return this.listFiltered.reduce(function (accumulator, category) {
var checkedOptions = category.listOptions.filter(function (option) { return option.checked; });
return accumulator.concat(checkedOptions);
}, []);
};
SelectMultipleNestedComponent.prototype.getTotalCategoryCount = function () {
var totalCount = 0;
for (var _category in this.list) {
totalCount += 1;
}
return totalCount;
};
SelectMultipleNestedComponent.prototype.getCategories = function () {
return Object.keys(this.list);
};
SelectMultipleNestedComponent.prototype.toggleCategory = function (category) {
category.open = !category.open;
};
SelectMultipleNestedComponent.prototype.shareChecked = function () {
this.shareCheckedList.emit(this.getListChecked());
};
SelectMultipleNestedComponent.prototype.shareIndividualStatus = function () {
if (this.currentSelected) {
this.shareIndividualCheckedList.emit(this.currentSelected);
}
};
SelectMultipleNestedComponent.prototype.toggleAllOptions = function (category) {
//category.checkedAll = !category.checkedAll;
category.listOptions.forEach(function (option) {
if (!option.disabled) {
option.checked = category.checkedAll || false;
}
});
this.shareChecked();
};
SelectMultipleNestedComponent.prototype.toggleOption = function (category, option) {
if (category) {
category.checkedAll = category.listOptions
.filter(function (option) { return !option.disabled; })
.every(function (option) { return option.checked; });
this.currentSelected = option;
this.shareIndividualStatus();
this.shareChecked();
}
};
SelectMultipleNestedComponent.prototype.discardOption = function (category, option) {
this.showDropDown = !this.showDropDown;
if (category) {
option.checked = false;
category.checkedAll = category.listOptions.every(function (option) { return option.checked; });
this.currentSelected = option;
this.shareIndividualStatus();
this.shareChecked();
}
};
// Método para filtrar los datos basados en el nombre de las opciones
SelectMultipleNestedComponent.prototype.filterData = function (value) {
if (!value) {
return this.list; // Retorna la lista completa si no hay valor de búsqueda
}
// Filtra cada categoría y sus opciones
var normalizar = function (str) { return str
.normalize('NFD') // Descompone los caracteres con tilde
.replace(/[\u0300-\u036f]/g, '') // Elimina los signos diacríticos
.toLowerCase(); };
return this.list
.map(function (category) {
var filteredOptions = category.listOptions.filter(function (opt) { return normalizar(opt.name).includes(normalizar(value)); });
return Object.assign(Object.assign({}, category), { listOptions: filteredOptions });
})
.filter(function (category) { return category.listOptions.length > 0; });
};
SelectMultipleNestedComponent.prototype.applyFilter = function () {
this.listFiltered = this.filterData(this.searchValue); // Actualiza la lista filtrada
};
SelectMultipleNestedComponent.prototype.findOptionCategory = function (option) {
var e_1, _b;
try {
for (var _c = __values(this.list), _d = _c.next(); !_d.done; _d = _c.next()) {
var category = _d.value;
if (category.listOptions.includes(option)) {
return category;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
return null; // Retornar null si no se encuentra la categoría
};
SelectMultipleNestedComponent.prototype.clickFilterComponent = function () {
var _a;
this.showDropDown = !this.showDropDown;
//Desactivar autofocus externo cuando se muestra el buscador
if (this.list.length >= this.quantityToFilter) {
(_a = this.setAutofocusEvent) === null || _a === void 0 ? void 0 : _a.emit(this.showDropDown);
}
};
SelectMultipleNestedComponent.prototype.leaveComponent = function () {
var _a;
this.showDropDown = false;
//Desactivar autofocus externo cuando se muestra el buscador
if (this.list.length >= this.quantityToFilter) {
(_a = this.setAutofocusEvent) === null || _a === void 0 ? void 0 : _a.emit(this.showDropDown);
}
};
return SelectMultipleNestedComponent;
}());
SelectMultipleNestedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SelectMultipleNestedComponent, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Component });
SelectMultipleNestedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: SelectMultipleNestedComponent, selector: "lct-select-multiple-nested", inputs: { list: "list", title: "title", disabled: "disabled", showIcon: "showIcon", placeholder: "placeholder", placeholderFilter: "placeholderFilter", quantityToFilter: "quantityToFilter", heightOptions: "heightOptions", id: "id" }, outputs: { shareCheckedList: "shareCheckedList", shareIndividualCheckedList: "shareIndividualCheckedList", setAutofocusEvent: "setAutofocusEvent" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div>\n <div class=\"title\">{{title}}</div>\n <div class=\"containerSelectMultiple\" (mouseleave)=\"leaveComponent()\">\n <button [attr.id]=\"selectId\" class=\"drop-toggle\" [disabled]=\"disabledValue\" (click)=\"clickFilterComponent()\">\n <span *ngIf=\"getListChecked().length<=0\">{{placeholder}}</span>\n <span *ngIf=\"getListChecked().length>0\">\n <div class=\"selected\">\n <span [ngClass]=\"{'text-disabled':getListChecked()[0].disabled || false}\">{{getListChecked()[0].name | labelTitlePipe}}</span>\n <div class=\"icon\" (click)=\"discardOption(findOptionCategory(getListChecked()[0]), getListChecked()[0])\" [ngClass]=\"{'icon-disabled':getListChecked()[0].disabled || false}\">\n <svg [ngClass]=\"{'text-disabled':getListChecked()[0].disabled || false}\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 4 24 24\"\n fill=\"none\"\n style=\"color: #2649B6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z\"\n fill=\"currentColor\"\n />\n </svg>\n </div>\n </div>\n <span class=\"moreSelected\" *ngIf=\"getListChecked().length > 1 \">(+ {{getListChecked().length - 1}} m\u00E1s)</span>\n <!--{{getListChecked().join(', ')}}-->\n </span>\n <img *ngIf=\"showIcon\"\n class=\"select-box__icon\"\n [ngStyle]=\"{'transform': showDropDown ? 'translateY(-50%) rotate(180deg)' : 'translateY(-50%) rotate(0deg)' }\"\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gU3ZnIFZlY3RvciBJY29ucyA6IGh0dHA6Ly93d3cub25saW5ld2ViZm9udHMuY29tL2ljb24gLS0+DQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPG1ldGFkYXRhPiBTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiA8L21ldGFkYXRhPg0KPGc+PHBhdGggZD0iTTUwMCw3NzUuNEwxMCwyODcuMmw2NC40LTYyLjZMNTAwLDY1MC4ybDQyNS42LTQyNS42bDY0LjQsNjIuNkw1MDAsNzc1LjR6Ii8+PC9nPg0KPC9zdmc+\" alt=\"Arrow Icon\"\n aria-hidden=\"true\"/>\n </button>\n <div class=\"drop-show\" *ngIf=\"showDropDown && list.length>0\">\n <div *ngIf=\"getTotalCategoryCount()>=quantityToFilter\" class=\"main\">\n <lct-input-text [placeholder]=\"placeholderFilter\" title=\"\"\n [(ngModel)]=\"searchValue\"\n (ngModelChange)=\"applyFilter()\"\n [icon]=\"iconFinder\"\n [showIcon]=\"true\"\n ></lct-input-text>\n </div>\n <div [ngStyle]=\"{'height': getTotalCategoryCount()>=quantityToFilter ? heightOptions : 'auto','overflow-y':getTotalCategoryCount()>=quantityToFilter ? 'auto':''}\">\n <div *ngFor=\"let category of listFiltered\">\n <div style=\"display: inline-flex;\">\n <svg [ngStyle]=\"{'transform': category.open ? 'translateY(25%) rotate(180deg)' : 'translateY(25%) rotate(0deg)' }\"\n (click)=\"toggleCategory(category)\" class=\"select-box__category\"\n width=\"17\" height=\"18\" viewBox=\"0 0 17 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13.459 7.58398L8.50065 11.834L3.54232 7.58398\" stroke=\"#2649B6\" stroke-width=\"1.3\" stroke-linecap=\"round\"/>\n </svg>\n <!-- <img *ngIf=\"showIcon\"\n class=\"select-box__category\"\n [ngStyle]=\"{'transform': category.open ? 'translateY(32%) rotate(180deg)' : 'translateY(32%) rotate(0deg)' }\"\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gU3ZnIFZlY3RvciBJY29ucyA6IGh0dHA6Ly93d3cub25saW5ld2ViZm9udHMuY29tL2ljb24gLS0+DQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPG1ldGFkYXRhPiBTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiA8L21ldGFkYXRhPg0KPGc+PHBhdGggZD0iTTUwMCw3NzUuNEwxMCwyODcuMmw2NC40LTYyLjZMNTAwLDY1MC4ybDQyNS42LTQyNS42bDY0LjQsNjIuNkw1MDAsNzc1LjR6Ii8+PC9nPg0KPC9zdmc+\" alt=\"Arrow Icon\"\n aria-hidden=\"true\" height=\"17px\" width=\"17px\" (click)=\"toggleCategory(category)\"/> -->\n <label class=\"main\">\n <span class=\"text-capitalize\" style=\"margin-left: 21px;\">{{ category.name.toLowerCase() | labelPipe }} </span>\n <span *ngIf=\"category.quantity\">({{category.quantity}})</span>\n <input type=\"checkbox\" [(ngModel)]=\"category.checkedAll\"\n (change)=\"toggleAllOptions(category)\" [disabled]=\"category.disabled || false || searchValue.length > 0\">\n <span class=\"mark\" [ngClass]=\"{'mark-disabled': category.disabled || false || searchValue.length > 0}\"></span>\n </label>\n </div>\n\n <ul *ngIf=\"category.open\">\n <label class=\"main\" *ngFor=\"let option of category.listOptions\">\n <span class=\"text-capitalize\" style=\"margin-left: 21px;\" [ngClass]=\"{ 'text-disabled': option.disabled }\">{{ option.name.toLowerCase() | labelPipe }} </span>\n <span *ngIf=\"option.quantity\">({{option.quantity}})</span>\n <input type=\"checkbox\" [(ngModel)]=\"option.checked\"\n (change)=\"toggleOption(category, option)\" [disabled]=\"option.disabled || false\"/>\n <span class=\"mark\" [ngClass]=\"{'mark-disabled': option.disabled || false}\"></span>\n </label>\n </ul>\n\n </div>\n\n </div>\n </div>\n <div class=\"drop-empty\" *ngIf=\"showDropDown && list.length===0\">\n Sin informaci\u00F3n\n </div>\n </div>\n</div>\n", styles: ["*{font-family:\"Barlow\",\"Open Sans\",\"Helvetica Neue\",\"Segoe UI\",\"Calibri\",\"Arial\",sans-serif}.title{color:#3c4149;font-size:12px;letter-spacing:0;line-height:15px;margin-left:2px;margin-bottom:5px}.containerSelectMultiple{width:100%;position:relative}.drop-toggle{background-color:#e0e5ee;cursor:pointer;box-sizing:border-box;height:41px;width:100%;border:0;border-radius:5px;text-align:left;font-size:14px;padding-left:12px;color:#3c4149;overflow:hidden}.select-box__icon{position:absolute;right:15px;width:20px;top:50%;transform:translateY(-50%) rotate(0);opacity:.3;transition:.2s ease}.select-box__category{width:17px;transform:translateY(25%) rotate(0);color:#2649b6;transition:.2s ease;margin-left:10px;cursor:pointer}button:disabled{background-color:#f5f7fa;cursor:not-allowed;color:#c8ccd4}.drop-toggle i{float:right}.drop-show{box-sizing:border-box;width:100%;border:1px solid #E0E5EE;border-radius:5px;background-color:#fff;position:absolute;z-index:2;box-shadow:0 6px 10px #00000026;margin-left:1px}.drop-empty{width:100%;border:1px solid #E0E5EE;border-radius:5px;background-color:#fff;position:absolute;z-index:2;box-shadow:0 6px 10px #00000026;padding:12px;cursor:no-drop}.mark-disabled{background-color:#c8ccd4!important}.text-disabled{color:#c8ccd4!important}.icon-disabled{pointer-events:none}.selected{display:inline-block;position:relative;margin-right:5px;box-sizing:border-box;height:26px;border:1px solid #C2C2C2;border-radius:3px;background-color:#f5f7fa;font-size:13px;letter-spacing:0;line-height:16px;padding:5px}.selected span{vertical-align:top}.selected .icon{display:inline;margin-left:2px}.moreSelected{position:absolute;margin-top:8px;color:#3c4149;font-size:12px;letter-spacing:0;line-height:15px}ul .main{display:block;position:relative;margin-left:17px;margin-right:17px;margin-bottom:5px;cursor:pointer;color:#3c4149;font-size:13px;letter-spacing:0;line-height:27px}.main{display:block;position:relative;margin-left:10px;margin-right:17px;margin-bottom:5px;cursor:pointer;color:#3c4149;font-size:13px;letter-spacing:0;line-height:27px}.text{margin-left:27px}input[type=checkbox]{visibility:hidden}.mark{position:absolute;top:5px;left:0;box-sizing:border-box;height:17px;width:17px;border:1px solid #D6D6D6;border-radius:2px;background-color:#f4f4f4}.main:hover input~.mark{background-color:#c2c2c2}.main input:active~.mark{background-color:#546c84}.main input:checked~.mark{background-color:#2649b6}.mark:after{content:\"\";position:absolute;display:none}.main input:checked~.mark:after{display:block}.main .mark:after{left:5px;bottom:5px;width:3px;height:6px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}\n"], components: [{ type: InputTextComponent, selector: "lct-input-text", inputs: ["disabled", "icon", "iconPosition", "pdaAutoEnter", "placeholder", "showIcon", "title", "type", "error", "id", "transparent"], outputs: ["enterEmitted", "iconClick", "inputClick"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }], pipes: { "labelTitlePipe": LabelTitlePipe, "labelPipe": LabelPipe } });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: SelectMultipleNestedComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-select-multiple-nested',
templateUrl: './select-multiple-nested.component.html',
styleUrls: ['./select-multiple-nested.component.css'],
}]
}], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; }, propDecorators: { list: [{
type: i0.Input
}], title: [{
type: i0.Input
}], disabled: [{
type: i0.Input
}], showIcon: [{
type: i0.Input
}], placeholder: [{
type: i0.Input
}], placeholderFilter: [{
type: i0.Input
}], quantityToFilter: [{
type: i0.Input
}], heightOptions: [{
type: i0.Input
}], id: [{
type: i0.Input
}], shareCheckedList: [{
type: i0.Output
}], shareIndividualCheckedList: [{
type: i0.Output
}], setAutofocusEvent: [{
type: i0.Output
}] } });
var RateExperienceComponent = /** @class */ (function () {
function RateExperienceComponent() {
this.inputValue = '';
this.finallyThanks = false;
this.second = 5;
this.sendVote = new i0.EventEmitter();
this.closeRate = new i0.EventEmitter();
this.skip = new i0.EventEmitter();
this.focusInOption = new i0.EventEmitter();
this.focusOutOption = new i0.EventEmitter();
}
RateExperienceComponent.prototype.ngOnInit = function () {
};
RateExperienceComponent.prototype.response = function (voteResp) {
var _this = this;
if (voteResp >= 0 && voteResp <= 6) {
this.respVote = voteResp;
}
else {
this.finallyThanks = true;
this.respVote = voteResp;
var voteResponse = {
vote: this.respVote,
commentary: this.inputValue
};
this.intervalId = setInterval(function () {
if (_this.second > 0) {
_this.second--;
}
else {
_this.clearInterval();
}
}, 1000);
setTimeout(function () {
_this.close(true);
}, 5000); // Ejecutar close() después de 5 segundos
this.sendVote.emit(voteResponse);
}
};
RateExperienceComponent.prototype.sendComentary = function () {
var _this = this;
if (this.respVote === null || this.respVote === undefined) {
return;
}
if ((this.inputValue.length > 0 && this.inputValue.length < 10) || this.inputValue.length > 300) {
return;
}
this.finallyThanks = true;
var voteResponse = {
vote: this.respVote,
commentary: this.inputValue,
finallythanks: true
};
this.intervalId = setInterval(function () {
if (_this.second > 0) {
_this.second--;
}
else {
_this.clearInterval();
_this.close(true);
}
}, 800);
setTimeout(function () {
_this.skipRate();
}, 5000); // Ejecutar close() después de 5 segundos
this.sendVote.emit(voteResponse);
};
RateExperienceComponent.prototype.clearInterval = function () {
if (this.intervalId) {
this.respVote = undefined;
clearInterval(this.intervalId);
}
};
RateExperienceComponent.prototype.skipRate = function () {
this.respVote = undefined;
this.inputValue = '';
this.finallyThanks = false;
this.skip.emit(true);
};
RateExperienceComponent.prototype.close = function (option) {
var closeOption = false;
if (option) {
closeOption = option;
}
this.inputValue = '';
this.finallyThanks = false;
this.closeRate.emit(closeOption);
};
RateExperienceComponent.prototype.back = function () {
this.respVote = undefined;
this.finallyThanks = false;
};
RateExperienceComponent.prototype.onClick = function () {
this.focusInOption.emit(true);
};
RateExperienceComponent.prototype.onFocusOut = function () {
this.focusOutOption.emit(false);
};
return RateExperienceComponent;
}());
RateExperienceComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: RateExperienceComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
RateExperienceComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: RateExperienceComponent, selector: "lct-rate-experience", inputs: { titleQuestion: "titleQuestion" }, outputs: { sendVote: "sendVote", closeRate: "closeRate", skip: "skip", focusInOption: "focusInOption", focusOutOption: "focusOutOption" }, ngImport: i0__namespace, template: "<div class=\"container-rate-experience\" *ngIf=\"respVote === null || respVote === undefined && !finallyThanks \"> \n <div class=\"mt-3\" style=\"padding-left: 25px; padding-right: 10px;\">\n\n <div class=\"row mt-4\">\n <div class=\"col-11 text-question mt-2\">\n <b>{{titleQuestion}}</b>\n </div>\n <div class=\"col-1 p-0\">\n <svg (click)=\"close(false)\" style=\" cursor: pointer; margin-top: 15px; margin-left: 23px;\" width=\"15\"\n height=\"14\" viewBox=\"0 0 15 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.7704 0.937266C13.3804 0.547266 12.7504 0.547266 12.3604 0.937266L7.47043 5.81727L2.58043 0.927266C2.19043 0.537266 1.56043 0.537266 1.17043 0.927266C0.78043 1.31727 0.78043 1.94727 1.17043 2.33727L6.06043 7.22727L1.17043 12.1173C0.78043 12.5073 0.78043 13.1373 1.17043 13.5273C1.56043 13.9173 2.19043 13.9173 2.58043 13.5273L7.47043 8.63727L12.3604 13.5273C12.7504 13.9173 13.3804 13.9173 13.7704 13.5273C14.1604 13.1373 14.1604 12.5073 13.7704 12.1173L8.88043 7.22727L13.7704 2.33727C14.1504 1.95727 14.1504 1.31727 13.7704 0.937266Z\"\n fill=\"#3C4149\" />\n </svg>\n </div>\n </div>\n\n <div class=\"row mt-3\">\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(0)\" width=\"40px\" title=\"0\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(1)\" width=\"40px\" title=\"1\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(2)\" width=\"40px\" title=\"2\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(3)\" width=\"40px\" title=\"3\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(4)\" width=\"40px\" title=\"4\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(5)\" width=\"40px\" title=\"5\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(6)\" width=\"40px\" title=\"6\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(7)\" width=\"40px\" title=\"7\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(8)\" width=\"40px\" title=\"8\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(9)\" width=\"40px\" title=\"9\"></lct-button>\n </div>\n <div class=\"col-auto ps-2 pe-1\">\n <lct-button buttonType=\"quintary\" (click)=\"response(10)\" width=\"40px\" title=\"10\"></lct-button>\n </div>\n </div>\n\n <div class=\"row mt-2 mb-4\">\n <div class=\"col-6 font-footer text-start\">Mal, tuve inconvenientes</div>\n <div class=\"col-6 font-footer text-end\">Muy bien, fue muy f\u00E1cil</div>\n </div>\n </div>\n</div>\n\n<div class=\"rate-expeciente-write\" *ngIf=\"respVote !== null && respVote !== undefined && !finallyThanks\">\n <div class=\"mt-3\" style=\"padding-left: 25px; padding-right: 10px;\">\n <div class=\"row mt-4\">\n <div class=\"col-11 pe-0 text-question mt-2\">\n <b>Marcaste que tuviste inconvenientes,</b> \u00BFnos puedes dar detalles de qu\u00E9 <br>\n pas\u00F3?, esto nos ayudara a mejorar la experiencia en Backstore.\n </div>\n <div class=\"col-1 p-0\">\n <svg (click)=\"close(false)\" style=\" cursor: pointer; margin-top: 15px;\" width=\"15\"\n height=\"14\" viewBox=\"0 0 15 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.7704 0.937266C13.3804 0.547266 12.7504 0.547266 12.3604 0.937266L7.47043 5.81727L2.58043 0.927266C2.19043 0.537266 1.56043 0.537266 1.17043 0.927266C0.78043 1.31727 0.78043 1.94727 1.17043 2.33727L6.06043 7.22727L1.17043 12.1173C0.78043 12.5073 0.78043 13.1373 1.17043 13.5273C1.56043 13.9173 2.19043 13.9173 2.58043 13.5273L7.47043 8.63727L12.3604 13.5273C12.7504 13.9173 13.3804 13.9173 13.7704 13.5273C14.1604 13.1373 14.1604 12.5073 13.7704 12.1173L8.88043 7.22727L13.7704 2.33727C14.1504 1.95727 14.1504 1.31727 13.7704 0.937266Z\"\n fill=\"#3C4149\" />\n </svg>\n </div>\n </div>\n\n <div class=\"row mt-2\">\n <div class=\"form-group\">\n <textarea\n [(ngModel)]=\"inputValue\"\n class=\"form-control\"\n rows=\"3\"\n [placeholder]=\"'Ingresa tu comentario ac\u00E1'\"\n (click)=\"onClick()\"\n (focusout)=\"onFocusOut()\"\n required\n minlength=\"10\"\n maxlength=\"300\"\n #comment=\"ngModel\"\n [ngClass]=\"{'is-invalid': comment.invalid && comment.touched && inputValue.length > 0}\"\n\n \n></textarea>\n<div class=\"row\">\n <div class=\"col-10\">\n <div *ngIf=\"comment.invalid && comment.touched\" class=\"text-dangerous\">\n <small *ngIf=\"comment.errors?.minlength\">\n Su comentario debe tener al menos 10 caracteres.\n </small>\n <small *ngIf=\"comment.errors?.maxlength\">\n Su comentario no debe exceder los 300 caracteres.\n </small>\n </div>\n </div>\n <div class=\"col-auto\">\n <div class=\"character-count text-end\">\n {{ inputValue.length }}/300\n </div>\n </div>\n</div>\n </div>\n </div> \n <div class=\"row mt-2 mb-4 d-flex justify-content-end\">\n <div class=\"col-3 pe-0 font-footer\"><lct-button buttonType=\"sextary\" title=\"Primary\" (click)=\"back()\" title=\"Volver Atras\"></lct-button></div>\n <div class=\"col-2 font-footer\"><lct-button title=\"Primary\" (click)=\"sendComentary()\" title=\"Enviar\"></lct-button></div>\n </div>\n\n </div>\n</div>\n\n\n<div class=\"rate-expeciente-thanks\" *ngIf=\"finallyThanks\">\n\n <div class=\"container mt-3\" style=\"padding-left: 25px;\">\n <div class=\"row mt-4 justify-content-center\">\n <div class=\"col-10 text-center text-question mt-2\">\n <svg style=\"width: 50px; height: 50px; margin-left:22px\" version=\"1.1\" viewBox=\"0 0 2048 1782\" width=\"1280\" height=\"1280\" xmlns=\"http://www.w3.org/2000/svg\">\n<path transform=\"translate(0)\" d=\"m0 0h2048v1782h-2048z\" fill=\"#FEFEFE\"/>\n<path transform=\"translate(989,82)\" d=\"m0 0 26 1 20 3 20 6 19 8 14 8 12 9 10 9 10 10 11 14 10 14 9 15 10 18 13 26 13 34 8 24 8 36 4 25 2 20 1 20v30l-3 39-4 28-7 33-4 15-1 8h409l60 1 17 1 24 4 20 6 25 12 17 12 14 12 7 7 9 11 11 16 9 16 7 16 9 27 3 15 1 11v25l-4 19-11 29-8 17-8 12-14 18-11 12-11 11-18 13-11 8 1 7 10 26 3 11 1 7v41l-3 16-6 21-9 19-10 15-9 15-13 15-16 16-28 16 1 10 10 28 3 14 1 12v23l-3 21-12 36-8 16-7 11-12 16-11 12-7 7-11 9-13 10-11 9-2 3 1 5 8 16 5 12 2 13 1 13v20l-2 15-7 24-9 21-13 22-9 12-12 13-9 10-13 11-13 9-19 10-19 7-19 5-21 3-20 1-141 1h-51l-121-1-36-1-39-3-38-5-34-7-41-11-41-14-29-11-62-23-47-17-18-8-8-2h-8l-5 3-5 5-4 3-10 2-38 1h-316l-12-2-11-6-12-8-6-5-8-11-3-9-2-21v-232l1-506 1-68 2-15 5-13 6-8 11-8 16-9 4-1 23-1 296-1 17-1 10-2 24-13 15-10 22-15 13-10 11-10 8-7 9-9 10-13 12-18 17-28 8-17 9-24 9-32 6-35 3-27 2-27 1-31 3-18 10-30 8-16 8-12 11-13 18-18 18-13 16-9 18-8 14-5 21-4z\" fill=\"#2E4FB3\"/>\n<path transform=\"translate(999,202)\" d=\"m0 0 8 1 9 3 10 6 10 10 10 14 9 16 9 19 9 27 9 33 4 23 3 32v37l-3 23-9 42-7 25-10 28-15 35-4 13v16l5 13 6 11 9 10 13 8 12 5 12 2 559 1 17 2 11 6 13 11 6 9 4 13 1 16-2 12-8 17-11 11-11 7-9 4-13 2-93 1-9 3-11 8-12 10-10 16-4 11v20l4 13 7 11 11 13 14 7 20 5h10l21 9 11 6 8 8 4 10 4 18v10l-5 17-4 8-12 13-6 5-8 3-8 2-10 1h-76l-15 1-15 4-15 8-7 6-6 10-4 9-2 11v22l4 12 10 16 6 7 5 3 17 6 11 4 5 1 22 2 10 4 15 20 4 8 4 14v13l-4 14-7 14-4 5-9 6-14 7-6 2-13 2h-87l-12 3-14 7-11 10-7 11-4 10-2 11v11l2 10 8 16 8 11 8 7 14 7 31 3 15 8 12 9 6 5 6 10 3 11v18l-2 8-5 13-8 10-9 6-3 3-1 4h-5l-2 2-13 2-45 1h-312l-44-4-29-5-36-9-25-8-28-10-89-33-37-14-53-18-5-3-1-16-2-204v-236l1-162 1-71 7-6 27-16 16-11 13-10 16-12 14-12 12-11 26-26 9-11 12-15 22-33 10-18 9-19 10-26 9-27 8-31 7-36 5-38 2-24 2-46 6-8 5-6 14-9 12-4z\" fill=\"#FEFEFE\"/>\n<path transform=\"translate(539,675)\" d=\"m0 0h53l7 2v653l-2 11-5 6-6 12-5 4-138 1h-61l-2-4-1-116-1-565 2-2 27-1z\" fill=\"#FEFEFE\"/>\n<path transform=\"translate(723,1472)\" d=\"m0 0 7 1 16 6 21 7 21 8 24 9 14 5 9 1v2l4 1 13 6 34 12 23 8 16 4 37 9 25 4 26 2 2 1h17l14 1h72l13 1h7l3 1 7-1h17l21 1h78l22-1h42l26 2h65l17-1 5-1 28-7 8-3h3v-2l7-4 12-3 2-4 3 1v-2l8-4 6-5 5-1v4l-5 5-13 9-19 10-19 7-19 5-21 3-20 1-141 1h-51l-121-1-36-1-39-3-38-5-34-7-41-11-41-14-29-11-81-30-1-2-25-9-6-4z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1189,528)\" d=\"m0 0h1v7h409l60 1 17 1 24 4 20 6 25 12 17 12 14 12 7 7 9 11 11 16 9 16 7 16 9 27 3 15 1 11v25l-4 19-11 29-8 17-8 12-6 8-4-1 7-14 4-7 4-9 1-9 3-10 3-8 2-18 1-17v-25l-1-25-1-10-2-10 1-6-5-13-8-13-4-6-4-1-1-3h-2l-2-5h-2l-9-11-4-3v-2h-2v-2l-6-3v-2l-4-1-16-11-8-5-5-2-11-5-9-3h-3v-2l-12-2-5-1-17-4-7-1-13-1h-24l-48 1-26 1-75-1h-135l-78-1h-58l-16-1-8-2 1-6z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(396,673)\" d=\"m0 0h22l15 1h164l5 5 2 40-1 20-2 86v66l1 10 1 15-1 2 3 1 1 16v22l1 3-1 4 1 7v211l-1 36v28l-1 39-2 23-1 3-2 25-2 2v-661l-6-1h-53l-132 1-27 1-2 1 1-4 3-1z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(267,593)\" d=\"m0 0 2 4 1 9-1 7h-2l-1 36v214l-1 99v25l1 125 1 6v26l1 5v14l1 7v152l-1 21 1 13v52l1 4-1 4 1 13 1 6 4 13 2 6 2 7-3 2-9-11-4-11-2-21v-232l1-506 1-68 2-15z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1055,550)\" d=\"m0 0 4 1-4 16-2 16-2 6-1 2v12l5 14 3 11 5 5 6 4v2l4 1 11 6 18 3h3v2l7-1h8l2-1v2l7-1h17l2-1 4 1 3-1 20-1h71l1 2-1 2h-19-2l-12 1h403l17-2h30l10 3 7 1 16 9 8 8 8 16 2 5 2 12v11l-4 11-2 6-5 9-7 9-6 1-2 5h-2l1 3-7 3-9 2-10-1v-1l10-3 9-5 9-7 7-7 8-17 2-12-1-16-4-13-6-9-12-10-11-6-17-2-559-1-12-2-12-5-14-9-7-7-8-14-5-13v-16l6-18z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1655,1091)\" d=\"m0 0h1l4 16 8 22 3 14 1 12v23l-3 21-12 36-8 16-7 11-12 16-11 12-7 7-11 9-13 10-8 7-2-1 1-5 6-5h2v-2l8-7 10-8 10-9 5-5 8-11 3-5 6-9v-5h2l2-6 2-4 3-8 2-4 4-16 1-10 2-22v-36l-1-18-1-12z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1809,631)\" d=\"m0 0h2l8 18 9 27 3 15 1 11v25l-4 19-11 29-8 17-8 12-6 8-4-1 7-14 4-7 4-9 1-9 3-10 3-8 2-18 1-17v-25l-1-25-1-10-2-10 1-6-4-10z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1574,1326)\" d=\"m0 0 1 2 1 5 8 16 5 12 2 13 1 13v20l-2 15-7 24-9 21-13 22h-3l-2-2 8-16 5-9v-8l4-12 2-4 3-28v-32l-2-12-1-25h-2v-3l-4-1-1-2h2l2-6z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1380,1233)\" d=\"m0 0 2 1-3 7-1 2h-2l-2 4-6 7-5 10-2 12 1 15 11 23 4 4v2l4 2 4 1v3l6 2 7 2v2l7 1 7 2h6l4 2 9 2 5 2 6 2 13 9 5 4v2h2l7 10 5 16v18l-2 7-4 10-3 9-3 6-3 1-2 4-5 5-7 2-1 1h-6v2h-8l4-2 2-2h5l1-4h2l2-4 8-5 8-11 5-13 1-6v-18l-4-13-6-9-12-9-13-8-6-3-31-3-14-7-11-10-9-14-5-11-2-10v-11l3-14 7-14 10-11z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1734,866)\" d=\"m0 0 2 4 11 29 3 11 1 7v41l-3 16-6 21-9 19-10 15-3 5-3-3 8-18 5-7 2-14 4-10 1-7 2-23v-22l-3-30-2-14v-7l1-4z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(1633,651)\" d=\"m0 0h30l10 3 7 1 16 9 8 8 8 16 2 5 2 12v11l-4 11-2 6-5 9-7 9-6 1-2 5h-2l1 3-7 3-9 2-10-1v-1l10-3 9-5 9-7 7-7 8-17 2-12-1-16-4-13-6-9-12-10-11-6-17-2-445-1v-1l404-1z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(1456 1e3)\" d=\"m0 0h2l1 4-3 7-3 5-2 19-5 7-1 3v7l1 8 2 2v4h2l4 7 3 11 6 2 6 4 9 3 5 3 11 3 7 2 11 3 5 4v2l-22-1-12-3-17-7-7-3-7-6-11-17-4-10-1-4v-22l3-14 7-13 6-7z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(992,197)\" d=\"m0 0 20 1 8 3 12 9 9 10 10 15 14 27 8 20 8 25 7 25 3 17-1 3v71h-1l-1-37-3-32-4-23-10-36-8-24-12-25-10-16-9-11-10-9-10-5-8-2-14 1-14 5-13 9-6 7-2-1 1-6 5-6 11-8 15-6z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1529,787)\" d=\"m0 0 2 1-2 12-3 10-3 6v11l1 3 1 5 3 6 5 7 2 6h2l3 4v2h2l3 4v2h2l2 3 3 1v2l10 3 11 3 15 2 26 13 4 3v2l4 2 4 6h-5l-7-7-16-8-16-7h-10l-20-5-14-7-10-11-9-14-4-13v-20l4-11 8-13z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(791,1375)\" d=\"m0 0h7l26 10 84 31 24 9 34 10 25 6v1h-21l-6-4h-11l-15-4-11-3-4-3-4-1v-2l-7-1v-2l-3 1-9-3-7-2v-2l-7-1-8-3-3-1v-2h-6l-4-2-12-3-7-3-7-4h-2l-1-2-6-1-10-4-10-2-8-3-4-3v-2h-3v-2h-3z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1501,992)\" d=\"m0 0h86v1h-5l-1 3h-2v2h-2v2l-2 1-21 1h-78l-3-2-3 4-1-1h-5l-1-2 11-5 12-3z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(953,228)\" d=\"m0 0 1 2-2 46-2 24-5 38-4-3-1 2v-8l2-13 1-15 1-58 4-10z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1042,89)\" d=\"m0 0 7 1 21 8 15 8 14 10 12 11 9 9 11 14 4 5-1 4-4-2-4-5-9-11-10-12-8-6-7-3-2-1v-2l-6-2-8-6-8-4-10-4-9-4-4-1v-2h-3v-2h-2v-2z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1531,1120)\" d=\"m0 0 4 2 11 14 5 11 3 9 1 13-2 10h-2l-2 14-3 7h-2l-2 5-4 5-7 5h-3l-1 3-8 1-5 2-3-1 12-7 8-4 5-4 6-11 5-12 2-8v-13l-5-17-5-9-2-6z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(916,433)\" d=\"m0 0 3 3-3 9-8 20-10 20-6 10-6 9-3-2h2l-1-4 4-8 6-11 4-9 6-13 2-10 7-12z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1623,908)\" d=\"m0 0 5 1 5 16 2 10-1 7-1 2-1 12h-2v5h-2l-3 11-2 3h-2v2h-3v2l-8 7h-5l6-7 10-11 5-13 3-11v-10l-5-21z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(891,124)\" d=\"m0 0 2 2-5 7-4 1v2h-2l-1 3h-2l-1 4h-2l-1 3h-2l-2 5-4 2-2 5-4 4-2-1v3h-2l-2 5-5 3 2-5 9-14 11-13 15-15z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(1712,1037)\" d=\"m0 0v3l1 5-12 14-16 16-12 7-2-1 2-2v-3l9-6 7-7h2v-2h2l3-6h2l2-4 8-9h2l1-4z\" fill=\"#3A5DC3\"/>\n<path transform=\"translate(765,468)\" d=\"m0 0 1 3-4 8h-2l-2 5-5 4-3 4h-2l-2 4h-2l-2 4-14 11-3-2 13-12 8-7 9-9z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(443,1363)\" d=\"m0 0h137v1l-17 2-37-1-83-1z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(762,1489)\" d=\"m0 0 6 1 12 4 10 4 14 5h2v2l5 1 27 10v1l-7-1-30-11-27-10-12-5z\" fill=\"#3153B8\"/>\n<path transform=\"translate(923,1546)\" d=\"m0 0 7 1 36 8 14 3v1h-9l-28-6-19-5z\" fill=\"#3254B8\"/>\n<path transform=\"translate(789,430)\" d=\"m0 0 3 1-2 5-1 2h-2l-1 5-7 11-4 5-3-1 13-21z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(1068,643)\" d=\"m0 0 6 2 8 4 14 3 33 1v1h-39l-12-4-9-5z\" fill=\"#3052B6\"/>\n<path transform=\"translate(1031,216)\" d=\"m0 0 4 2 6 7 4 5 5 11h-2l-10-15-7-8z\" fill=\"#3152B7\"/>\n<path transform=\"translate(799,412)\" d=\"m0 0 3 1-3 10-4 6-2-1 1-6z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(1663,1082)\" d=\"m0 0h8l-3 3-9 5h-2l1-5z\" fill=\"#3B5EC4\"/>\n<path transform=\"translate(1051,243)\" d=\"m0 0 4 5 4 8v2h-2l-6-12z\" fill=\"#3355BA\"/>\n<path transform=\"translate(1535,1512)\" d=\"m0 0 4 1-2 5h-6l2-4z\" fill=\"#3A5DC3\"/>\n </svg>\n </div>\n\n </div>\n\n <div class=\"row justify-content-center\">\n <div class=\"col-auto text-question mt-2\">\n <b>\u00A1Gracias!</b>\n </div>\n </div>\n\n <div class=\"row justify-content-center\">\n <div class=\"col-auto text-question mt-1\">\n Tus comentarios nos ayudar\u00E1n a mejorar.\n </div>\n </div>\n\n <div class=\"row justify-content-center\">\n <div class=\"col-auto text-question mt-4\">\n mensaje se cerrara en {{second}} segundos ...\n </div>\n </div>\n \n\n </div>\n \n</div>\n\n\n\n\n\n\n", styles: ["@charset \"UTF-8\";.container-rate-experience{box-shadow:1px 1px 5px #0000004d;width:610px;height:120px;border-radius:10px}.rate-expeciente-write{box-shadow:1px 1px 5px #0000004d;width:580px;height:220px;border-radius:10px}.rate-expeciente-thanks{box-shadow:1px 1px 5px #0000004d;width:537px;height:190px;border-radius:10px}.text-question{font-size:15px}.font-footer{font-size:12px}#comentary{width:100%;height:100%;padding:10px;font-size:16px;border:1px solid #ccc;border-radius:5px;resize:none}.is-invalid{border:2px solid #C60E4C}.text-dangerous{color:#c60e4c}\n"], components: [{ type: ButtonComponent, selector: "lct-button", inputs: ["title", "buttonType", "disabled", "shape", "icon", "width", "height", "bold", "iconWidth", "iconHeight", "counter", "id"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { type: i4__namespace.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: RateExperienceComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lct-rate-experience',
templateUrl: './rate-experience.component.html',
styleUrls: ['./rate-experience.component.scss']
}]
}], ctorParameters: function () { return []; }, propDecorators: { sendVote: [{
type: i0.Output
}], closeRate: [{
type: i0.Output
}], skip: [{
type: i0.Output
}], titleQuestion: [{
type: i0.Input
}], focusInOption: [{
type: i0.Output
}], focusOutOption: [{
type: i0.Output
}] } });
var ToastService = /** @class */ (function () {
function ToastService(componentFactoryResolver, appRef, injector) {
this.componentFactoryResolver = componentFactoryResolver;
this.appRef = appRef;
this.injector = injector;
this.toastsSubject = new rxjs.BehaviorSubject([]);
this.toasts$ = this.toastsSubject.asObservable();
this.componentRef = null;
}
ToastService.prototype.showToast = function (message, type, duration) {
var _this = this;
if (type === void 0) { type = 'toastPrimary'; }
if (duration === void 0) { duration = 6000; }
var toast = { message: message, type: type };
var currentToasts = this.toastsSubject.value;
this.toastsSubject.next(__spreadArray([toast], __read(currentToasts)));
if (!this.componentRef) {
var factory = this.componentFactoryResolver.resolveComponentFactory(ToastComponent);
this.componentRef = factory.create(this.injector);
this.appRef.attachView(this.componentRef.hostView);
document.body.appendChild(this.componentRef.location.nativeElement);
}
setTimeout(function () {
_this.removeToast(toast);
if (_this.toastsSubject.value.length === 0 && _this.componentRef) {
_this.appRef.detachView(_this.componentRef.hostView);
_this.componentRef.destroy();
_this.componentRef = null;
}
}, duration);
};
ToastService.prototype.removeToast = function (toast) {
var currentToasts = this.toastsSubject.value;
this.toastsSubject.next(currentToasts.filter(function (t) { return t !== toast; }));
};
ToastService.prototype.clearToasts = function () {
this.toastsSubject.next([]);
};
return ToastService;
}());
ToastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ToastService, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ApplicationRef }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
ToastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ToastService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ToastService, decorators: [{
type: i0.Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ApplicationRef }, { type: i0__namespace.Injector }]; } });
var ToastComponent = /** @class */ (function () {
function ToastComponent(toastService) {
this.toastService = toastService;
this.toasts = [];
}
ToastComponent.prototype.ngOnInit = function () {
var _this = this;
this.toastService.toasts$.subscribe(function (toasts) {
_this.toasts = toasts;
});
};
ToastComponent.prototype.removeToast = function (toast) {
this.toastService.removeToast(toast);
};
ToastComponent.prototype.ngOnDestroy = function () {
this.toastService.clearToasts(); // Opcional: Limpia los toasts al destruir el componente
};
return ToastComponent;
}());
ToastComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ToastComponent, deps: [{ token: ToastService }], target: i0__namespace.ɵɵFactoryTarget.Component });
ToastComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: ToastComponent, selector: "app-toast", ngImport: i0__namespace, template: "<!-- toast.component.html -->\n<div class=\"toast-container\">\n <div class=\"toast\" [ngClass]=\"toast.type\" *ngFor=\"let toast of toasts\">\n <span >{{ toast.message }}</span>\n <button (click)=\"removeToast(toast)\">X</button>\n </div>\n</div>", styles: ["@charset \"UTF-8\";.toast-container{position:fixed;top:10px;right:10px;z-index:1000}.toast{margin:5px;padding:10px;border-radius:5px;color:#fff;font-family:\"Barlow\";display:flex!important;justify-content:space-between;animation:slide-in-left 1s ease-out forwards}@keyframes slide-in-left{0%{opacity:0;transform:translateX 100%}to{opacity:1;transform:translateX 0}}.toastPrimary{background-color:#2649b6}.toastSecondary{background-color:#b19300}.toastError{background-color:#c60e4c}button{background:none;border:none;color:#fff;cursor:pointer}\n"], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ToastComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'app-toast',
templateUrl: './toast.component.html',
styleUrls: ['./toast.component.scss']
}]
}], ctorParameters: function () { return [{ type: ToastService }]; } });
var LctComponentsModule = /** @class */ (function () {
function LctComponentsModule() {
}
return LctComponentsModule;
}());
LctComponentsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
LctComponentsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsModule, declarations: [ButtonComponent,
InputTextComponent,
LctComponentsComponent,
SelectComponent,
SelectMultipleComponent,
LoadingComponent,
SwitchComponent,
TooltipDirective,
TooltipComponent,
ModalTooltipDirective,
ModalTooltipComponent,
ModalChangeStoreComponent,
ClipboardComponent,
ClipboardDirective,
SelectMultipleNestedComponent,
RateExperienceComponent,
ToastComponent,
LabelPipe,
LabelTitlePipe], imports: [i3.CommonModule,
i4.FormsModule], exports: [ButtonComponent,
InputTextComponent,
LctComponentsComponent,
SelectComponent,
SelectMultipleComponent,
LoadingComponent,
SwitchComponent,
TooltipDirective,
ModalTooltipDirective,
ModalChangeStoreComponent,
ClipboardDirective,
SelectMultipleNestedComponent,
RateExperienceComponent,
ToastComponent] });
LctComponentsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsModule, providers: [ToastService], imports: [[
i3.CommonModule,
i4.FormsModule
]] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LctComponentsModule, decorators: [{
type: i0.NgModule,
args: [{
declarations: [
ButtonComponent,
InputTextComponent,
LctComponentsComponent,
SelectComponent,
SelectMultipleComponent,
LoadingComponent,
SwitchComponent,
TooltipDirective,
TooltipComponent,
ModalTooltipDirective,
ModalTooltipComponent,
ModalChangeStoreComponent,
ClipboardComponent,
ClipboardDirective,
SelectMultipleNestedComponent,
RateExperienceComponent,
ToastComponent,
LabelPipe,
LabelTitlePipe,
],
imports: [
i3.CommonModule,
i4.FormsModule
],
providers: [ToastService],
exports: [
ButtonComponent,
InputTextComponent,
LctComponentsComponent,
SelectComponent,
SelectMultipleComponent,
LoadingComponent,
SwitchComponent,
TooltipDirective,
ModalTooltipDirective,
ModalChangeStoreComponent,
ClipboardDirective,
SelectMultipleNestedComponent,
RateExperienceComponent,
ToastComponent
],
}]
}] });
/*
* Public API Surface of lct-components
*/
/**
* Generated bundle index. Do not edit.
*/
exports.ButtonComponent = ButtonComponent;
exports.ClipboardDirective = ClipboardDirective;
exports.InputTextComponent = InputTextComponent;
exports.LctComponentsComponent = LctComponentsComponent;
exports.LctComponentsModule = LctComponentsModule;
exports.LctComponentsService = LctComponentsService;
exports.LctNode = LctNode;
exports.LoadingComponent = LoadingComponent;
exports.ModalChangeStoreComponent = ModalChangeStoreComponent;
exports.ModalTooltipDirective = ModalTooltipDirective;
exports.RateExperienceComponent = RateExperienceComponent;
exports.SelectComponent = SelectComponent;
exports.SelectMultipleComponent = SelectMultipleComponent;
exports.SelectMultipleNestedComponent = SelectMultipleNestedComponent;
exports.SwitchComponent = SwitchComponent;
exports.ToastComponent = ToastComponent;
exports.ToastService = ToastService;
exports.TooltipDirective = TooltipDirective;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=lct-components.umd.js.map