-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path469.d3e14135c889e589.js.map
1 lines (1 loc) · 62.7 KB
/
469.d3e14135c889e589.js.map
1
{"version":3,"mappings":"yEAMA,WAAsBA,GAClB,OAAOA,EAAEC,QAAQ,uBAAwB,QAK7C,WAAwBC,EAAOC,GAC3B,IAAkCC,QAAlB,IAAPD,EAAgB,GAAKA,GAAYE,YAAaA,OAAqB,IAAPD,EAAgB,IAAMA,EAC3F,GAAqB,iBAAVF,EACP,OAAOA,EAAMI,WAEjB,GAAqB,iBAAVJ,EACP,MAAO,MAEX,IAAIK,EAAoBC,EAAaH,GACjCI,EAAIP,EAAMQ,OACVC,EAAWF,EAAEG,MAAM,eACnBC,EAAkB,IAAIC,OAAO,QAAUP,EAAoB,KAAOA,EAAoB,QAAUA,EAAoB,UAAYA,EAAoB,QAAS,KACjKE,MACU,MADVA,EAAIA,EAAER,QAAQY,EAAiB,IAAIZ,QAAQI,EAAa,MAEpDI,EAAI,MAECE,IACLF,EAAI,IAAMA,GAEPA,EA7B6CM,UAA4C,EA2CpGA,KARA,WAAkBb,EAAOC,GACrB,IAAkCC,QAAlB,IAAPD,EAAgB,GAAKA,GAAYE,YACtCL,EAAIgB,EAAed,EAAO,CAAEG,iBAD4C,IAAPD,EAAgB,IAAMA,IAE3F,MAAU,QAANJ,EACOiB,IAEJC,OAAOlB,uhBCjB+EmB,2BA+KwE,WA/KxEA,sBA+KmN,uCA/KnNA,iHA+K+I,mBA/K/IA,sBA+KoP,GA/KpPA,uBA+KoP,4BA/KpPA,CA+KoP,kDA/KpPA,CA+KoP,kDA/KpPA,2BA+K2a,SA/K3aA,2BA+Kqd,OA/KrdA,mBA+Kwd,kEA/KxdA,uDAVjG,MAAMC,EAAmB,IAAIC,iBAAe,uBAEtCC,QAAN,QACIC,YAAYC,GACRC,KAAKD,QAAUA,EAEnBE,IAAIC,GACA,OAAOF,KAAKD,QAAQI,KAAKC,GAAKA,EAAEC,OAASH,IAGjDL,SAAeS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AAe,IAAIlD,KAAYkH,EAAQ1M,MAAOyF,eAC9CnB,WAAY,IAAIG,KAAU,MAE9B,OAAIiI,EAAQpI,YAAcoI,EAAQpI,WAAWa,OAAS,GAClDuH,EAAQpI,WAAWe,QAAQvF,IACvB6M,EAAGnL,IAAI,cAAc+D,KAAKhE,KAAKkL,eAAe3M,MAG/C6M,GAGfd,SAA2BhK,UAA3B,0BAAuHgK,GA1sBtB5K,qBA0sBkEqK,KACnKO,EAA2B/J,WA3sBsEb,+BA2sBjG,OAA2H4K,EAA3H9J,QAA2H8J,EAA3H,qBAAmK,SAvJ7JA","names":["s","replace","value","_a","_c","decimalMark","toString","regexpDecimalMark","regexpEscape","n","trim","negative","match","getNumberRegexp","RegExp","exports","toNumberString","NaN","Number","i0","ATTRIBUTE_WIDGET","InjectionToken","WidgetsService","constructor","widgets","this","get","widget","find","w","name","ɵfac","ɵprov","factory","WidgetPluginManager","BasePluginManager","pcm","moduleLoader","super","pluginDef","of","PluginDef","i1","i2","AttributeWidgetDirective","viewContainerRef","ɵdir","selectors","AttributeWidgetComponent","componentFactoryResolver","controlContainer","appearance","ngOnInit","subscribe","componentFactory","resolveComponentFactory","component","widgetHost","clear","componentRef","createComponent","instance","attribute","i1$1","ɵcmp","o","i","directives","styles","AttributesBuilderComponent","widgetsService","wpm","attributes","attributesForm","FormGroup","FormArray","_attributeValues","onTouched","attributeValues","applyValues","attributesArray","ngOnChanges","changes","previousValue","currentValue","length","removeAt","forEach","attr","push","FormControl","Validators","type","displayName","label","required","map","attr2","writeValue","val","console","log","setValue","emitEvent","registerOnChange","fn","valueChanges","registerOnTouched","setDisabledState","isDisabled","disable","enable","validate","c","valid","invalidForm","message","discoverWidget","getPlugin","controls","index","attrValue","av","undefined","updateValueAndValidity","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","NG_VALIDATORS","decls","i5","TextWidgetComponent","i2$1","i3","MinMaxWidgetComponent","AttributeMatcherService","getComputedValue","matchAttribute","computedValue","getValue","len","AttributePipe","attributeMatcher","transform","ɵpipe","pure","AttributeTypes","Text","Complex","Float","Array","Bool","Date","Plugin","data","id","schema","Attribute","options","a","intValue","isArray","reduce","p","_store","AttributeValue","r","textFactory","AttributeWidget","title","minmaxFactory","AttributesModule","widgetPlugins","register","ɵmod","ɵinj","useFactory","imports","CommonModule","ReactiveFormsModule","MaterialModule","HttpClientJsonpModule","ValueComputerService","compute","computedAttributes","computeAttribute","resolveComputedValue","toNumber","isNaN","AttributeSerializerService","valueComputer","serialize","obj","prop","attrValues","toJSON","deserializeAsObject","ignoreAttributes","deserialize","findIndex","b","convertToGroup","setting","fg"],"sources":["./node_modules/number-string/dist/app.js","./node_modules/@rollthecloudinc/attributes/fesm2020/rollthecloudinc-attributes.mjs"],"sourcesContent":["\"use strict\";\nexports.__esModule = true;\nexports.toClosest = exports.toMoney = exports.toClean = exports.toNumber = exports.toNumberString = void 0;\n/**\n * Escape special RegExp characters in string\n */\nfunction regexpEscape(s) {\n return s.replace(/[-[\\]/{}()*+?.\\\\^$]/g, \"\\\\$&\");\n}\n/**\n * Convert value to number string\n */\nfunction toNumberString(value, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.decimalMark, decimalMark = _c === void 0 ? \".\" : _c;\n if (typeof value === \"number\") {\n return value.toString();\n }\n if (typeof value !== \"string\") {\n return \"NaN\";\n }\n var regexpDecimalMark = regexpEscape(decimalMark);\n var n = value.trim();\n var negative = n.match(/^\\(.*\\)$|^-/); //negative if matches '(...)' or '-...'\n var getNumberRegexp = new RegExp(\"[^\\\\d\" + regexpDecimalMark + \"]|\" + regexpDecimalMark + \"(?=.*\" + regexpDecimalMark + \")|^\\\\D*\" + regexpDecimalMark + \"\\\\D*$\", \"g\");\n n = n.replace(getNumberRegexp, \"\").replace(decimalMark, \".\"); //remove all except digits and last dot\n if (n === \"\") {\n n = \"NaN\";\n }\n else if (negative) {\n n = \"-\" + n;\n }\n return n;\n}\nexports.toNumberString = toNumberString;\n/**\n * Convert value to number\n */\nfunction toNumber(value, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.decimalMark, decimalMark = _c === void 0 ? \".\" : _c;\n var s = toNumberString(value, { decimalMark: decimalMark });\n if (s === \"NaN\") {\n return NaN;\n }\n return Number(s);\n}\nexports.toNumber = toNumber;\n/**\n * Like `toFixed` but removes trailing zeros\n */\nfunction toClean(value, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.decimalMark, decimalMark = _c === void 0 ? \".\" : _c, _d = _b.thousandSeperator, thousandSeperator = _d === void 0 ? null : _d, _e = _b.thousandSeparator, thousandSeparator = _e === void 0 ? \",\" : _e, _f = _b.maxPrecision, maxPrecision = _f === void 0 ? 100 : _f, _g = _b.minPrecision, minPrecision = _g === void 0 ? 0 : _g;\n if (thousandSeperator) {\n thousandSeparator = thousandSeperator;\n console.error(\"`thousandSeperator` is deprecated use `thousandSeparator` instead.\");\n }\n value = toNumberString(value);\n if (value === \"NaN\") {\n return \"NaN\";\n }\n if (maxPrecision < 0) {\n throw new Error(\"maxPrecision must be >= 0\");\n }\n if (minPrecision < 0) {\n throw new Error(\"minPrecision must be >= 0\");\n }\n if (maxPrecision > 100) {\n throw new Error(\"maxPrecision must be <= 100\");\n }\n if (minPrecision > 100) {\n throw new Error(\"minPrecision must be <= 100\");\n }\n if (minPrecision > maxPrecision) {\n throw new Error(\"minPrecision must be <= maxPrecision\");\n }\n var s = value;\n // limit to maxPrecision\n var dotIndex = s.lastIndexOf(\".\");\n if (dotIndex > -1) {\n var integer = (dotIndex === 0 ? \"0\" : s.slice(0, dotIndex));\n var fraction = s.slice(dotIndex + 1, dotIndex + 1 + maxPrecision);\n var remainder = s.slice(dotIndex + 1 + maxPrecision);\n if (remainder.length > 0 && +remainder[0] > 4) {\n // round up\n var i = (BigInt(integer + fraction) + BigInt(1)).toString(10);\n integer = i.slice(0, i.length - fraction.length);\n fraction = i.slice(i.length - fraction.length);\n }\n s = integer + decimalMark + fraction;\n }\n else {\n s += decimalMark;\n }\n // remove trailing 0s\n var rmLen = 0;\n for (var i = s.length - 1; i >= 0; i--) {\n if (s[i] !== \"0\") {\n break;\n }\n rmLen++;\n }\n s = s.slice(0, s.length - rmLen);\n // limit to minPrecision\n if (minPrecision > 0) {\n var numZeros = void 0;\n if (dotIndex > -1) {\n numZeros = minPrecision - (s.length - dotIndex - 1);\n }\n else {\n numZeros = minPrecision;\n }\n for (var i = 0; i < numZeros; i++) {\n s += \"0\";\n }\n }\n var regexpDecimalMark = regexpEscape(decimalMark);\n var thousandSeparatorRegexp = new RegExp(\"\\\\d(?=(\\\\d{3})+\" + regexpDecimalMark + \")\", \"g\");\n var trimRegexp = new RegExp(regexpDecimalMark + \"$\");\n s = s.replace(thousandSeparatorRegexp, \"$&\" + thousandSeparator).replace(trimRegexp, \"\");\n return s;\n}\nexports.toClean = toClean;\n/**\n * Convert string or number to currency string\n * modified from http://stackoverflow.com/a/149099/806777\\\n */\nfunction toMoney(value, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.decimalMark, decimalMark = _c === void 0 ? \".\" : _c, _d = _b.thousandSeperator, thousandSeperator = _d === void 0 ? null : _d, _e = _b.thousandSeparator, thousandSeparator = _e === void 0 ? \",\" : _e, _f = _b.maxPrecision, maxPrecision = _f === void 0 ? 2 : _f, _g = _b.minPrecision, minPrecision = _g === void 0 ? 2 : _g, _h = _b.symbol, symbol = _h === void 0 ? \"$\" : _h, _j = _b.symbolBehind, symbolBehind = _j === void 0 ? false : _j, _k = _b.useParens, useParens = _k === void 0 ? true : _k;\n if (thousandSeperator) {\n thousandSeparator = thousandSeperator;\n console.error(\"`thousandSeperator` is deprecated use `thousandSeparator` instead.\");\n }\n var n = (typeof value === \"number\"\n ? value\n : toNumber(value, {\n decimalMark: decimalMark\n }));\n var s = toNumberString(value, {\n decimalMark: decimalMark\n });\n if (isNaN(n)) {\n return \"NaN\";\n }\n if (n === Infinity) {\n return \"Infinity\";\n }\n if (n === -Infinity) {\n return (useParens ? \"(Infinity)\" : \"-Infinity\");\n }\n if (maxPrecision < 2 && typeof arguments[1].minPrecision === \"undefined\") {\n minPrecision = maxPrecision;\n }\n if (minPrecision > 2 && typeof arguments[1].maxPrecision === \"undefined\") {\n maxPrecision = minPrecision;\n }\n var negative = n < 0;\n s = toClean(negative ? s.slice(1) : s, {\n decimalMark: decimalMark,\n thousandSeparator: thousandSeparator,\n maxPrecision: maxPrecision,\n minPrecision: minPrecision\n });\n s = (symbolBehind ? s + \" \" + symbol : symbol + s);\n if (negative) {\n s = (useParens ? \"(\" + s + \")\" : \"-\" + s);\n }\n return s;\n}\nexports.toMoney = toMoney;\n/**\n * Round number to closest multiple of number\n */\nfunction toClosest(value, roundTo) {\n if (roundTo === void 0) { roundTo = 1; }\n if (typeof value !== \"number\") {\n value = toNumber(value);\n }\n if (isNaN(value)) {\n return NaN;\n }\n if (value === Infinity || value === -Infinity) {\n return value;\n }\n if (typeof roundTo !== \"number\") {\n roundTo = toNumber(roundTo);\n }\n if (isNaN(roundTo)) {\n throw Error(\"roundTo must be a number\");\n }\n if (roundTo === Infinity || roundTo === -Infinity) {\n return roundTo;\n }\n var n = Math.round(value / roundTo) * roundTo;\n var maxPrecision = 0;\n while (!Number.isInteger(roundTo)) {\n roundTo *= 10;\n maxPrecision++;\n }\n n = +n.toFixed(maxPrecision);\n return n;\n}\nexports.toClosest = toClosest;\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Inject, Directive, Component, Input, ViewChild, forwardRef, Pipe, NgModule } from '@angular/core';\nimport * as i5 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { HttpClientJsonpModule } from '@angular/common/http';\nimport * as i1$1 from '@angular/forms';\nimport { FormGroup, FormArray, FormControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '@rollthecloudinc/material';\nimport { of } from 'rxjs';\nimport * as i1 from '@rollthecloudinc/plugin';\nimport { BasePluginManager, PluginDef, Plugin } from '@rollthecloudinc/plugin';\nimport * as i2 from '@rollthecloudinc/utils';\nimport * as i2$1 from '@angular/material/form-field';\nimport * as i3 from '@angular/material/input';\nimport { toNumber } from 'number-string';\n\nconst ATTRIBUTE_WIDGET = new InjectionToken('AttributeWidget');\n\nclass WidgetsService {\n constructor(widgets) {\n this.widgets = widgets;\n }\n get(widget) {\n return this.widgets.find(w => w.name === widget);\n }\n}\nWidgetsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: WidgetsService, deps: [{ token: ATTRIBUTE_WIDGET }], target: i0.ɵɵFactoryTarget.Injectable });\nWidgetsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: WidgetsService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: WidgetsService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: Array, decorators: [{\n type: Inject,\n args: [ATTRIBUTE_WIDGET]\n }] }]; } });\n\nclass WidgetPluginManager extends BasePluginManager {\n constructor(pcm, moduleLoader) {\n super(pcm, moduleLoader);\n }\n pluginDef() {\n return of(new PluginDef({ name: 'widget' }));\n }\n}\nWidgetPluginManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: WidgetPluginManager, deps: [{ token: i1.PluginConfigurationManager }, { token: i2.ModuleLoaderService }], target: i0.ɵɵFactoryTarget.Injectable });\nWidgetPluginManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: WidgetPluginManager, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: WidgetPluginManager, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return [{ type: i1.PluginConfigurationManager }, { type: i2.ModuleLoaderService }]; } });\n\nclass AttributeWidgetDirective {\n constructor(viewContainerRef) {\n this.viewContainerRef = viewContainerRef;\n }\n}\nAttributeWidgetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeWidgetDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nAttributeWidgetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"12.0.0\", version: \"13.1.3\", type: AttributeWidgetDirective, selector: \"[classifiedsUiWidgetHost]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeWidgetDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[classifiedsUiWidgetHost]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });\n\nclass AttributeWidgetComponent {\n constructor(componentFactoryResolver, controlContainer) {\n this.componentFactoryResolver = componentFactoryResolver;\n this.controlContainer = controlContainer;\n this.appearance = \"legacy\";\n }\n ngOnInit() {\n this.widget.subscribe(widget => {\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(widget.component);\n const viewContainerRef = this.widgetHost.viewContainerRef;\n viewContainerRef.clear();\n const componentRef = viewContainerRef.createComponent(componentFactory);\n componentRef.instance.attribute = this.attribute;\n componentRef.instance.appearance = this.appearance;\n });\n }\n}\nAttributeWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeWidgetComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i1$1.ControlContainer }], target: i0.ɵɵFactoryTarget.Component });\nAttributeWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.3\", type: AttributeWidgetComponent, selector: \"classifieds-ui-attribute-widget\", inputs: { widget: \"widget\", attribute: \"attribute\", appearance: \"appearance\" }, viewQueries: [{ propertyName: \"widgetHost\", first: true, predicate: AttributeWidgetDirective, descendants: true, static: true }], ngImport: i0, template: `<ng-container [formGroup]=\"controlContainer.control\"><ng-template classifiedsUiWidgetHost></ng-template></ng-container>`, isInline: true, styles: [\"\"], directives: [{ type: i1$1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\" }, { type: i1$1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }, { type: AttributeWidgetDirective, selector: \"[classifiedsUiWidgetHost]\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeWidgetComponent, decorators: [{\n type: Component,\n args: [{ selector: 'classifieds-ui-attribute-widget', template: `<ng-container [formGroup]=\"controlContainer.control\"><ng-template classifiedsUiWidgetHost></ng-template></ng-container>`, styles: [\"\"] }]\n }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i1$1.ControlContainer }]; }, propDecorators: { widget: [{\n type: Input\n }], attribute: [{\n type: Input\n }], appearance: [{\n type: Input\n }], widgetHost: [{\n type: ViewChild,\n args: [AttributeWidgetDirective, { static: true }]\n }] } });\n\nclass AttributesBuilderComponent {\n constructor(widgetsService, wpm) {\n this.widgetsService = widgetsService;\n this.wpm = wpm;\n this.attributes = [];\n this.appearance = 'legacy';\n this.attributesForm = new FormGroup({\n attributes: new FormArray([])\n });\n this._attributeValues = [];\n this.onTouched = () => { };\n }\n set attributeValues(attributeValues) {\n this._attributeValues = attributeValues;\n this.applyValues();\n }\n get attributeValues() {\n return this._attributeValues;\n }\n get attributesArray() {\n return this.attributesForm.get('attributes');\n }\n ngOnChanges(changes) {\n if (changes.attributes && (!changes.attributes.previousValue || changes.attributes.previousValue !== changes.attributes.currentValue)) {\n while (this.attributesArray.length !== 0) {\n this.attributesArray.removeAt(0);\n }\n // @todo: Supports 2 levels of nesting currently (no recursion).\n this.attributes.forEach(attr => {\n this.attributesArray.push(new FormGroup({\n name: new FormControl(attr.name, Validators.required),\n type: new FormControl(attr.type, Validators.required),\n displayName: new FormControl(attr.label, Validators.required),\n value: new FormControl('', attr.required ? Validators.required : []),\n attributes: new FormArray(!attr.attributes ? [] : attr.attributes.map(attr2 => new FormGroup({\n name: new FormControl(attr2.name, Validators.required),\n type: new FormControl(attr2.type, Validators.required),\n displayName: new FormControl(attr2.label, Validators.required),\n value: new FormControl('', attr2.required ? Validators.required : [])\n })))\n }));\n });\n this.applyValues();\n }\n }\n writeValue(val) {\n if (val) {\n console.log(`write value: ${val}`);\n this.attributesArray.setValue(val, { emitEvent: false });\n }\n }\n registerOnChange(fn) {\n this.attributesArray.valueChanges.subscribe(fn);\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled) {\n if (isDisabled) {\n this.attributesArray.disable();\n }\n else {\n this.attributesArray.enable();\n }\n }\n validate(c) {\n return this.attributesForm.valid ? null : { invalidForm: { valid: false, message: \"attributes are invalid\" } };\n }\n discoverWidget(widget) {\n // return this.widgetsService.get(widget);\n return this.wpm.getPlugin(widget);\n }\n applyValues() {\n this.attributesArray.controls.forEach((c, index) => {\n const attrValue = this.attributeValues ? this.attributeValues.find(av => av.name === c.get('name').value) : undefined;\n if (attrValue !== undefined) {\n c.get('value').setValue(attrValue.value);\n c.updateValueAndValidity();\n }\n c.get('attributes').controls.forEach(c => {\n const attrValue = this.attributeValues && this.attributeValues[index] !== undefined ? this.attributeValues[index].attributes.find(av => av.name === c.get('name').value) : undefined;\n if (attrValue !== undefined) {\n c.get('value').setValue(attrValue.value);\n c.updateValueAndValidity();\n }\n });\n });\n }\n}\nAttributesBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributesBuilderComponent, deps: [{ token: WidgetsService }, { token: WidgetPluginManager }], target: i0.ɵɵFactoryTarget.Component });\nAttributesBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.3\", type: AttributesBuilderComponent, selector: \"classifieds-ui-attributes-builder\", inputs: { attributes: \"attributes\", appearance: \"appearance\", attributeValues: \"attributeValues\" }, providers: [\n WidgetsService,\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AttributesBuilderComponent),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => AttributesBuilderComponent),\n multi: true\n },\n ], usesOnChanges: true, ngImport: i0, template: \"<ng-container [formGroup]=\\\"attributesForm\\\">\\n <div formArrayName=\\\"attributes\\\" class=\\\"attribute-fields\\\">\\n <div *ngFor=\\\"let attribute of attributesArray.controls; let i=index\\\" formGroupName=\\\"{{i}}\\\" class=\\\"attribute-field-container\\\">\\n <classifieds-ui-attribute-widget [attribute]=\\\"attributes[i]\\\" [widget]=\\\"discoverWidget(attributes[i].widget)\\\" [appearance]=\\\"appearance\\\"></classifieds-ui-attribute-widget>\\n </div>\\n </div>\\n</ng-container>\\n<div *ngIf=\\\"attributes.length == 0\\\">\\n <p>No attributes available for ad type. Click next to continue.</p>\\n</div>\\n\", styles: [\"\"], components: [{ type: AttributeWidgetComponent, selector: \"classifieds-ui-attribute-widget\", inputs: [\"widget\", \"attribute\", \"appearance\"] }], directives: [{ type: i1$1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\" }, { type: i1$1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }, { type: i1$1.FormArrayName, selector: \"[formArrayName]\", inputs: [\"formArrayName\"] }, { type: i5.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: i1$1.FormGroupName, selector: \"[formGroupName]\", inputs: [\"formGroupName\"] }, { type: i5.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributesBuilderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'classifieds-ui-attributes-builder', providers: [\n WidgetsService,\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AttributesBuilderComponent),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => AttributesBuilderComponent),\n multi: true\n },\n ], template: \"<ng-container [formGroup]=\\\"attributesForm\\\">\\n <div formArrayName=\\\"attributes\\\" class=\\\"attribute-fields\\\">\\n <div *ngFor=\\\"let attribute of attributesArray.controls; let i=index\\\" formGroupName=\\\"{{i}}\\\" class=\\\"attribute-field-container\\\">\\n <classifieds-ui-attribute-widget [attribute]=\\\"attributes[i]\\\" [widget]=\\\"discoverWidget(attributes[i].widget)\\\" [appearance]=\\\"appearance\\\"></classifieds-ui-attribute-widget>\\n </div>\\n </div>\\n</ng-container>\\n<div *ngIf=\\\"attributes.length == 0\\\">\\n <p>No attributes available for ad type. Click next to continue.</p>\\n</div>\\n\", styles: [\"\"] }]\n }], ctorParameters: function () { return [{ type: WidgetsService }, { type: WidgetPluginManager }]; }, propDecorators: { attributes: [{\n type: Input\n }], appearance: [{\n type: Input\n }], attributeValues: [{\n type: Input\n }] } });\n\nclass TextWidgetComponent {\n constructor(controlContainer) {\n this.controlContainer = controlContainer;\n this.appearance = \"legacy\";\n }\n}\nTextWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: TextWidgetComponent, deps: [{ token: i1$1.ControlContainer }], target: i0.ɵɵFactoryTarget.Component });\nTextWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.3\", type: TextWidgetComponent, selector: \"classifieds-ui-text-widget\", inputs: { attribute: \"attribute\", appearance: \"appearance\" }, ngImport: i0, template: \"<ng-container [formGroup]=\\\"controlContainer.control\\\">\\n <mat-form-field [appearance]=\\\"appearance\\\">\\n <input matInput [placeholder]=\\\"attribute.label\\\" formControlName=\\\"value\\\">\\n </mat-form-field>\\n</ng-container>\\n\", styles: [\"\"], components: [{ type: i2$1.MatFormField, selector: \"mat-form-field\", inputs: [\"color\", \"appearance\", \"hideRequiredMarker\", \"hintLabel\", \"floatLabel\"], exportAs: [\"matFormField\"] }], directives: [{ type: i1$1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\" }, { type: i1$1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }, { type: i3.MatInput, selector: \"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]\", inputs: [\"disabled\", \"id\", \"placeholder\", \"name\", \"required\", \"type\", \"errorStateMatcher\", \"aria-describedby\", \"value\", \"readonly\"], exportAs: [\"matInput\"] }, { type: i1$1.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: i1$1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { type: i1$1.FormControlName, selector: \"[formControlName]\", inputs: [\"formControlName\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: TextWidgetComponent, decorators: [{\n type: Component,\n args: [{ selector: 'classifieds-ui-text-widget', template: \"<ng-container [formGroup]=\\\"controlContainer.control\\\">\\n <mat-form-field [appearance]=\\\"appearance\\\">\\n <input matInput [placeholder]=\\\"attribute.label\\\" formControlName=\\\"value\\\">\\n </mat-form-field>\\n</ng-container>\\n\", styles: [\"\"] }]\n }], ctorParameters: function () { return [{ type: i1$1.ControlContainer }]; }, propDecorators: { attribute: [{\n type: Input\n }], appearance: [{\n type: Input\n }] } });\n\nclass MinMaxWidgetComponent {\n constructor(controlContainer) {\n this.controlContainer = controlContainer;\n }\n}\nMinMaxWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: MinMaxWidgetComponent, deps: [{ token: i1$1.ControlContainer }], target: i0.ɵɵFactoryTarget.Component });\nMinMaxWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.3\", type: MinMaxWidgetComponent, selector: \"classifieds-ui-min-max-widget\", inputs: { attribute: \"attribute\" }, ngImport: i0, template: \"<ng-container [formGroup]=\\\"controlContainer.control\\\">\\n <label>{{ attribute.label }}</label>\\n <div formArrayName=\\\"attributes\\\">\\n <mat-form-field formGroupName=\\\"0\\\">\\n <input matInput type=\\\"number\\\" [placeholder]=\\\"attribute.attributes[0].label\\\" formControlName=\\\"value\\\">\\n </mat-form-field>\\n <mat-form-field formGroupName=\\\"1\\\">\\n <input matInput type=\\\"number\\\" [placeholder]=\\\"attribute.attributes[1].label\\\" formControlName=\\\"value\\\">\\n </mat-form-field>\\n </div>\\n</ng-container>\\n\", styles: [\"\"], components: [{ type: i2$1.MatFormField, selector: \"mat-form-field\", inputs: [\"color\", \"appearance\", \"hideRequiredMarker\", \"hintLabel\", \"floatLabel\"], exportAs: [\"matFormField\"] }], directives: [{ type: i1$1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\" }, { type: i1$1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }, { type: i1$1.FormArrayName, selector: \"[formArrayName]\", inputs: [\"formArrayName\"] }, { type: i1$1.FormGroupName, selector: \"[formGroupName]\", inputs: [\"formGroupName\"] }, { type: i3.MatInput, selector: \"input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]\", inputs: [\"disabled\", \"id\", \"placeholder\", \"name\", \"required\", \"type\", \"errorStateMatcher\", \"aria-describedby\", \"value\", \"readonly\"], exportAs: [\"matInput\"] }, { type: i1$1.NumberValueAccessor, selector: \"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]\" }, { type: i1$1.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: i1$1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { type: i1$1.FormControlName, selector: \"[formControlName]\", inputs: [\"formControlName\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: MinMaxWidgetComponent, decorators: [{\n type: Component,\n args: [{ selector: 'classifieds-ui-min-max-widget', template: \"<ng-container [formGroup]=\\\"controlContainer.control\\\">\\n <label>{{ attribute.label }}</label>\\n <div formArrayName=\\\"attributes\\\">\\n <mat-form-field formGroupName=\\\"0\\\">\\n <input matInput type=\\\"number\\\" [placeholder]=\\\"attribute.attributes[0].label\\\" formControlName=\\\"value\\\">\\n </mat-form-field>\\n <mat-form-field formGroupName=\\\"1\\\">\\n <input matInput type=\\\"number\\\" [placeholder]=\\\"attribute.attributes[1].label\\\" formControlName=\\\"value\\\">\\n </mat-form-field>\\n </div>\\n</ng-container>\\n\", styles: [\"\"] }]\n }], ctorParameters: function () { return [{ type: i1$1.ControlContainer }]; }, propDecorators: { attribute: [{\n type: Input\n }] } });\n\nclass AttributeMatcherService {\n getComputedValue(attr, attributes) {\n const attribute = attributes && attributes.length > 0 && this.matchAttribute(attr, attributes);\n if (attribute) {\n return attribute.computedValue;\n }\n else {\n return;\n }\n }\n getValue(attr, attributes) {\n const attribute = attributes && attributes.length > 0 && this.matchAttribute(attr, attributes);\n if (attribute) {\n return attribute.value;\n }\n else {\n return;\n }\n }\n matchAttribute(attr, attributes) {\n const len = attributes.length;\n for (let i = 0; i < len; i++) {\n if (attributes[i].attributes && attributes[i].attributes.length > 0) {\n const value = this.matchAttribute(attr, attributes[i].attributes);\n if (value) {\n return attributes[i];\n }\n else {\n continue;\n }\n }\n else if (attr === attributes[i].name) {\n return attributes[i];\n }\n else {\n continue;\n }\n }\n }\n}\nAttributeMatcherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeMatcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nAttributeMatcherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeMatcherService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeMatcherService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }] });\n\nclass AttributePipe {\n constructor(attributeMatcher) {\n this.attributeMatcher = attributeMatcher;\n }\n transform(attributes, attr) {\n const computedValue = this.attributeMatcher.getComputedValue(attr, attributes);\n if (computedValue) {\n return computedValue;\n }\n else {\n return '';\n }\n }\n}\nAttributePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributePipe, deps: [{ token: AttributeMatcherService }], target: i0.ɵɵFactoryTarget.Pipe });\nAttributePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributePipe, name: \"attribute\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'attribute'\n }]\n }], ctorParameters: function () { return [{ type: AttributeMatcherService }]; } });\n\nvar AttributeTypes;\n(function (AttributeTypes) {\n AttributeTypes[AttributeTypes[\"Number\"] = 0] = \"Number\";\n AttributeTypes[AttributeTypes[\"Text\"] = 1] = \"Text\";\n AttributeTypes[AttributeTypes[\"Complex\"] = 2] = \"Complex\";\n AttributeTypes[AttributeTypes[\"Float\"] = 3] = \"Float\";\n AttributeTypes[AttributeTypes[\"Array\"] = 4] = \"Array\";\n AttributeTypes[AttributeTypes[\"Bool\"] = 5] = \"Bool\";\n AttributeTypes[AttributeTypes[\"Date\"] = 6] = \"Date\";\n})(AttributeTypes || (AttributeTypes = {}));\nclass AttributeWidget extends Plugin {\n constructor(data) {\n super(data);\n if (data) {\n this.name = this.id;\n this.schema = data.schema ? new Attribute(data.schema) : undefined;\n this.component = data.component;\n }\n }\n}\nclass Attribute {\n constructor(data) {\n this.attributes = [];\n if (data) {\n this.name = data.name;\n this.widget = data.widget !== undefined ? data.widget : 'text';\n this.type = data.type;\n this.label = data.label;\n this.required = data.required;\n this.options = data.options;\n if (data.attributes) {\n this.attributes = data.attributes.map(a => new Attribute(a));\n }\n }\n }\n}\nclass AttributeValue {\n constructor(data) {\n this.attributes = [];\n if (data) {\n this.name = data.name;\n this.displayName = data.displayName;\n this.type = data.type;\n this.value = data.value;\n this.intValue = data.intValue;\n this.computedValue = data.computedValue;\n if (data.attributes) {\n if (Array.isArray(data.attributes)) {\n this.attributes = data.attributes.reduce((p, a) => (a._store === undefined || a._store) ? [...p, new AttributeValue(a)] : p, []);\n }\n else if (data.attributes._store === undefined || data.attributes._store) {\n this.attributes = [data.attributes];\n }\n }\n if (data.value && typeof (data.value) === 'object') {\n this.value = undefined;\n this.type = AttributeTypes.Complex;\n data.value.attributes.reduce((p, a) => (a._store === undefined || a._store) ? [...p, new AttributeValue(a)] : p, []);\n }\n else {\n this.value = data.value;\n }\n }\n }\n}\n\n// import { YmmSelectorComponent } from './widgets/ymm-selector/ymm-selector.component';\n// import { CitySelectorComponent } from './widgets/city-selector/city-selector.component';\nconst textFactory = () => {\n const schema = new Attribute({\n name: '',\n type: AttributeTypes.Text,\n label: '',\n required: false,\n widget: 'text',\n options: {},\n attributes: []\n });\n return new AttributeWidget({ id: 'text', name: 'text', title: 'Text', component: TextWidgetComponent, schema });\n};\nconst minmaxFactory = () => {\n return new AttributeWidget({ id: 'minmax', name: 'minmax', title: 'MinMax', component: MinMaxWidgetComponent, schema: undefined });\n};\n/*export const ymmFactory = () => {\n const schema = new Attribute({\n name: '',\n type: AttributeTypes.Complex,\n label: '',\n required: false,\n widget: 'ymm_selector',\n options: {},\n attributes: [\n new Attribute({\n name: 'year',\n type: AttributeTypes.Number,\n label: 'Year',\n required: false,\n widget: '',\n options: {},\n attributes: []\n }),\n new Attribute({\n name: 'make',\n type: AttributeTypes.Text,\n label: 'Make',\n required: false,\n widget: '',\n options: {},\n attributes: []\n }),\n new Attribute({\n name: 'model',\n type: AttributeTypes.Text,\n label: 'Model',\n required: false,\n widget: '',\n options: {},\n attributes: []\n })\n ]\n });\n return new AttributeWidget({ name: 'ymm_selector', component: YmmSelectorComponent, schema });\n};*/\n/*export const cityFactory = () => {\n const schema = new Attribute({\n name: '',\n type: AttributeTypes.Complex,\n label: '',\n required: false,\n widget: 'city_selector',\n options: {},\n attributes: []\n });\n return new AttributeWidget({ name: 'city_selector', component: CitySelectorComponent, schema });\n};*/\n\nclass AttributesModule {\n constructor(widgetPlugins, wpm) {\n widgetPlugins.forEach(p => wpm.register(p));\n }\n}\nAttributesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributesModule, deps: [{ token: ATTRIBUTE_WIDGET }, { token: WidgetPluginManager }], target: i0.ɵɵFactoryTarget.NgModule });\nAttributesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributesModule, declarations: [AttributesBuilderComponent,\n AttributeWidgetComponent,\n AttributeWidgetDirective,\n TextWidgetComponent,\n MinMaxWidgetComponent,\n AttributePipe\n /*, YmmSelectorComponent, CitySelectorComponent*/\n ], imports: [CommonModule, ReactiveFormsModule, MaterialModule, /*HttpClientModule,*/ HttpClientJsonpModule /*, CitiesModule */], exports: [AttributesBuilderComponent, AttributePipe, AttributeWidgetComponent] });\nAttributesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributesModule, providers: [\n {\n provide: ATTRIBUTE_WIDGET,\n useFactory: textFactory,\n multi: true\n },\n {\n provide: ATTRIBUTE_WIDGET,\n useFactory: minmaxFactory,\n multi: true\n },\n /*{\n provide: ATTRIBUTE_WIDGET,\n useFactory: attrFactories.ymmFactory,\n multi: true\n },\n {\n provide: ATTRIBUTE_WIDGET,\n useFactory: attrFactories.cityFactory,\n multi: true\n }*/\n ], imports: [[CommonModule, ReactiveFormsModule, MaterialModule, /*HttpClientModule,*/ HttpClientJsonpModule /*, CitiesModule */]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributesModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, ReactiveFormsModule, MaterialModule, /*HttpClientModule,*/ HttpClientJsonpModule /*, CitiesModule */],\n declarations: [\n AttributesBuilderComponent,\n AttributeWidgetComponent,\n AttributeWidgetDirective,\n TextWidgetComponent,\n MinMaxWidgetComponent,\n AttributePipe\n /*, YmmSelectorComponent, CitySelectorComponent*/\n ],\n exports: [AttributesBuilderComponent, AttributePipe, AttributeWidgetComponent],\n providers: [\n {\n provide: ATTRIBUTE_WIDGET,\n useFactory: textFactory,\n multi: true\n },\n {\n provide: ATTRIBUTE_WIDGET,\n useFactory: minmaxFactory,\n multi: true\n },\n /*{\n provide: ATTRIBUTE_WIDGET,\n useFactory: attrFactories.ymmFactory,\n multi: true\n },\n {\n provide: ATTRIBUTE_WIDGET,\n useFactory: attrFactories.cityFactory,\n multi: true\n }*/\n ]\n }]\n }], ctorParameters: function () { return [{ type: Array, decorators: [{\n type: Inject,\n args: [ATTRIBUTE_WIDGET]\n }] }, { type: WidgetPluginManager }]; } });\n\nclass ValueComputerService {\n constructor() { }\n compute(attributes) {\n const computedAttributes = [];\n attributes.forEach(a => computedAttributes.push(this.computeAttribute(a)));\n return computedAttributes;\n }\n computeAttribute(attribute) {\n const computedValue = this.resolveComputedValue(attribute.value, attribute.type);\n if (attribute.attributes && attribute.attributes.length > 0) {\n return new AttributeValue({ ...attribute, computedValue, attributes: this.compute(attribute.attributes) });\n }\n else {\n return new AttributeValue({ ...attribute, computedValue });\n }\n }\n /**\n * @todo: Support below strings.\n * beds: 1.5\n * beds: 1 1/2\n * price: $1,000\n * price: 1,000\n * price $1,000,000.00\n * baths: one\n */\n resolveComputedValue(value, type) {\n let computedValue;\n if (type === AttributeTypes.Number) {\n computedValue = toNumber(value.trim());\n if (computedValue && isNaN(computedValue)) {\n computedValue = undefined;\n }\n }\n else {\n computedValue = value.trim();\n }\n return computedValue === undefined ? computedValue : `${computedValue}`;\n }\n}\nValueComputerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: ValueComputerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nValueComputerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: ValueComputerService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: ValueComputerService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return []; } });\n\nclass AttributeSerializerService {\n constructor(valueComputer) {\n this.valueComputer = valueComputer;\n }\n serialize(obj, prop) {\n const type = typeof (obj);\n if (type !== 'object') {\n return new AttributeValue({\n name: prop,\n type: type !== 'string' ? type !== 'boolean' ? AttributeTypes.Number : AttributeTypes.Bool : AttributeTypes.Text,\n displayName: prop,\n value: `${obj}`,\n intValue: undefined,\n computedValue: this.valueComputer.resolveComputedValue(`${obj}`, type !== 'string' ? type !== 'boolean' ? AttributeTypes.Number : AttributeTypes.Bool : AttributeTypes.Text),\n attributes: []\n });\n }\n else if (Array.isArray(obj) && (prop === 'attributes' || prop === 'settings')) {\n return new AttributeValue({\n name: prop,\n type: AttributeTypes.Complex,\n displayName: prop,\n value: undefined,\n intValue: undefined,\n computedValue: undefined,\n attributes: obj\n });\n }\n else if (Array.isArray(obj)) {\n const len = obj.length;\n const attrValues = [];\n for (let i = 0; i < len; i++) {\n if (typeof (obj[i]) !== 'object') {\n // attrValues.push(this.serialize({ value: obj[i] }, `${i}`));\n attrValues.push(this.serialize(obj[i], `${i}`));\n }\n else {\n attrValues.push(this.serialize(obj[i], `${i}`));\n }\n }\n return new AttributeValue({\n name: prop,\n type: AttributeTypes.Array,\n displayName: prop,\n value: undefined,\n intValue: undefined,\n computedValue: undefined,\n attributes: attrValues\n });\n }\n else if (obj instanceof Date) {\n // store as string for now.\n return new AttributeValue({\n name: prop,\n type: AttributeTypes.Date,\n displayName: prop,\n value: obj.toJSON(),\n intValue: undefined,\n computedValue: obj.toJSON(),\n attributes: []\n });\n }\n else {\n const attrValues = [];\n for (const p in obj) {\n attrValues.push(this.serialize(obj[p], p));\n }\n return new AttributeValue({\n name: prop,\n type: AttributeTypes.Complex,\n displayName: prop,\n value: undefined,\n intValue: undefined,\n computedValue: undefined,\n attributes: attrValues\n });\n }\n }\n deserializeAsObject(attrValues, ignoreAttributes = false) {\n return this.deserialize(new AttributeValue({\n name: 'root',\n type: AttributeTypes.Complex,\n displayName: 'root',\n value: undefined,\n computedValue: undefined,\n intValue: 0,\n attributes: attrValues\n }), ignoreAttributes);\n }\n deserialize(attrValue, ignoreAttributes = false) {\n let obj;\n let len;\n switch (attrValue.type) {\n case AttributeTypes.Complex:\n if (!ignoreAttributes && (attrValue.name === 'attributes' || attrValue.name === 'settings')) {\n obj = attrValue.attributes.map(a => new AttributeValue(a));\n }\n else {\n len = attrValue.attributes.length;\n for (let i = 0; i < len; i++) {\n obj = { ...obj, [attrValue.attributes[i].name]: this.deserialize(attrValue.attributes[i]) };\n }\n }\n break;\n case AttributeTypes.Bool:\n obj = attrValue.value !== undefined ? ['1', 'true', 'on'].findIndex(b => b === attrValue.value) > -1 : undefined;\n break;\n case AttributeTypes.Number:\n case AttributeTypes.Float:\n obj = attrValue.value !== undefined && attrValue.value !== '' && attrValue.value !== 'undefined' ? attrValue.value !== '0' ? toNumber(attrValue.value.trim()) : 0 : undefined;\n break;\n case AttributeTypes.Text:\n obj = attrValue.value;\n break;\n case AttributeTypes.Array:\n if (!ignoreAttributes && (attrValue.name === 'attributes' || attrValue.name === 'settings')) {\n obj = attrValue.attributes.map(a => new AttributeValue(a));\n }\n else {\n len = attrValue.attributes.length;\n obj = [];\n for (let i = 0; i < len; i++) {\n obj = [...obj, this.deserialize(attrValue.attributes[i])];\n }\n }\n break;\n case AttributeTypes.Date:\n obj = attrValue.value !== undefined && attrValue.value !== '' ? new Date(attrValue.value) : undefined;\n break;\n default:\n }\n return obj;\n }\n convertToGroup(setting) {\n const fg = new FormGroup({\n name: new FormControl(setting.name, Validators.required),\n type: new FormControl(setting.type, Validators.required),\n displayName: new FormControl(setting.displayName, Validators.required),\n value: new FormControl(setting.value, Validators.required),\n computedValue: new FormControl(setting.value, Validators.required),\n attributes: new FormArray([])\n });\n if (setting.attributes && setting.attributes.length > 0) {\n setting.attributes.forEach(s => {\n fg.get('attributes').push(this.convertToGroup(s));\n });\n }\n return fg;\n }\n}\nAttributeSerializerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeSerializerService, deps: [{ token: ValueComputerService }], target: i0.ɵɵFactoryTarget.Injectable });\nAttributeSerializerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeSerializerService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.3\", ngImport: i0, type: AttributeSerializerService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return [{ type: ValueComputerService }]; } });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ATTRIBUTE_WIDGET, Attribute, AttributeMatcherService, AttributePipe, AttributeSerializerService, AttributeTypes, AttributeValue, AttributeWidget, AttributeWidgetComponent, AttributesBuilderComponent, AttributesModule, ValueComputerService, WidgetPluginManager, WidgetsService };\n"],"sourceRoot":"webpack:///","file":"469.d3e14135c889e589.js"}