source: trip-planner-front/node_modules/.cache/babel-webpack/280b088dc4d4dd0b16d2972594cf3103.json@ 8d391a1

Last change on this file since 8d391a1 was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago

primeNG components

  • Property mode set to 100644
File size: 24.4 KB
Line 
1{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { forwardRef, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nconst _c0 = function (a0, a1, a2) {\n return {\n \"p-checkbox-label-active\": a0,\n \"p-disabled\": a1,\n \"p-checkbox-label-focus\": a2\n };\n};\n\nfunction TriStateCheckbox_label_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"label\", 7);\n i0.ɵɵlistener(\"click\", function TriStateCheckbox_label_6_Template_label_click_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r2 = i0.ɵɵnextContext();\n\n const _r0 = i0.ɵɵreference(3);\n\n return ctx_r2.onClick($event, _r0);\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction3(3, _c0, ctx_r1.value != null, ctx_r1.disabled, ctx_r1.focused));\n i0.ɵɵattribute(\"for\", ctx_r1.inputId);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(ctx_r1.label);\n }\n}\n\nconst _c1 = function (a1, a2) {\n return {\n \"p-checkbox p-component\": true,\n \"p-checkbox-disabled\": a1,\n \"p-checkbox-focused\": a2\n };\n};\n\nconst _c2 = function (a0, a1, a2) {\n return {\n \"p-highlight\": a0,\n \"p-disabled\": a1,\n \"p-focus\": a2\n };\n};\n\nconst TRISTATECHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TriStateCheckbox),\n multi: true\n};\n\nclass TriStateCheckbox {\n constructor(cd) {\n this.cd = cd;\n this.checkboxTrueIcon = 'pi pi-check';\n this.checkboxFalseIcon = 'pi pi-times';\n this.onChange = new EventEmitter();\n\n this.onModelChange = () => {};\n\n this.onModelTouched = () => {};\n }\n\n onClick(event, input) {\n if (!this.disabled && !this.readonly) {\n this.toggle(event);\n this.focused = true;\n input.focus();\n }\n }\n\n onKeydown(event) {\n if (event.keyCode == 32) {\n event.preventDefault();\n }\n }\n\n onKeyup(event) {\n if (event.keyCode == 32 && !this.readonly) {\n this.toggle(event);\n event.preventDefault();\n }\n }\n\n toggle(event) {\n if (this.value == null || this.value == undefined) this.value = true;else if (this.value == true) this.value = false;else if (this.value == false) this.value = null;\n this.onModelChange(this.value);\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n }\n\n onFocus() {\n this.focused = true;\n }\n\n onBlur() {\n this.focused = false;\n this.onModelTouched();\n }\n\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn) {\n this.onModelTouched = fn;\n }\n\n writeValue(value) {\n this.value = value;\n this.cd.markForCheck();\n }\n\n setDisabledState(disabled) {\n this.disabled = disabled;\n this.cd.markForCheck();\n }\n\n}\n\nTriStateCheckbox.ɵfac = function TriStateCheckbox_Factory(t) {\n return new (t || TriStateCheckbox)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n};\n\nTriStateCheckbox.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TriStateCheckbox,\n selectors: [[\"p-triStateCheckbox\"]],\n hostAttrs: [1, \"p-element\"],\n inputs: {\n disabled: \"disabled\",\n name: \"name\",\n ariaLabelledBy: \"ariaLabelledBy\",\n tabindex: \"tabindex\",\n inputId: \"inputId\",\n style: \"style\",\n styleClass: \"styleClass\",\n label: \"label\",\n readonly: \"readonly\",\n checkboxTrueIcon: \"checkboxTrueIcon\",\n checkboxFalseIcon: \"checkboxFalseIcon\"\n },\n outputs: {\n onChange: \"onChange\"\n },\n features: [i0.ɵɵProvidersFeature([TRISTATECHECKBOX_VALUE_ACCESSOR])],\n decls: 7,\n vars: 21,\n consts: [[3, \"ngStyle\", \"ngClass\"], [1, \"p-hidden-accessible\"], [\"type\", \"text\", \"inputmode\", \"none\", 3, \"name\", \"readonly\", \"disabled\", \"keyup\", \"keydown\", \"focus\", \"blur\"], [\"input\", \"\"], [\"role\", \"checkbox\", 1, \"p-checkbox-box\", 3, \"ngClass\", \"click\"], [1, \"p-checkbox-icon\", 3, \"ngClass\"], [\"class\", \"p-checkbox-label\", 3, \"ngClass\", \"click\", 4, \"ngIf\"], [1, \"p-checkbox-label\", 3, \"ngClass\", \"click\"]],\n template: function TriStateCheckbox_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵelementStart(2, \"input\", 2, 3);\n i0.ɵɵlistener(\"keyup\", function TriStateCheckbox_Template_input_keyup_2_listener($event) {\n return ctx.onKeyup($event);\n })(\"keydown\", function TriStateCheckbox_Template_input_keydown_2_listener($event) {\n return ctx.onKeydown($event);\n })(\"focus\", function TriStateCheckbox_Template_input_focus_2_listener() {\n return ctx.onFocus();\n })(\"blur\", function TriStateCheckbox_Template_input_blur_2_listener() {\n return ctx.onBlur();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 4);\n i0.ɵɵlistener(\"click\", function TriStateCheckbox_Template_div_click_4_listener($event) {\n i0.ɵɵrestoreView(_r4);\n\n const _r0 = i0.ɵɵreference(3);\n\n return ctx.onClick($event, _r0);\n });\n i0.ɵɵelement(5, \"span\", 5);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(6, TriStateCheckbox_label_6_Template, 2, 7, \"label\", 6);\n }\n\n if (rf & 2) {\n i0.ɵɵclassMap(ctx.styleClass);\n i0.ɵɵproperty(\"ngStyle\", ctx.style)(\"ngClass\", i0.ɵɵpureFunction2(14, _c1, ctx.disabled, ctx.focused));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"name\", ctx.name)(\"readonly\", ctx.readonly)(\"disabled\", ctx.disabled);\n i0.ɵɵattribute(\"id\", ctx.inputId)(\"tabindex\", ctx.tabindex)(\"aria-labelledby\", ctx.ariaLabelledBy);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction3(17, _c2, ctx.value != null, ctx.disabled, ctx.focused));\n i0.ɵɵattribute(\"aria-checked\", ctx.value === true);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngClass\", ctx.value === true ? ctx.checkboxTrueIcon : ctx.value === false ? ctx.checkboxFalseIcon : \"\");\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.label);\n }\n },\n directives: [i1.NgStyle, i1.NgClass, i1.NgIf],\n encapsulation: 2,\n changeDetection: 0\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(TriStateCheckbox, [{\n type: Component,\n args: [{\n selector: 'p-triStateCheckbox',\n template: `\n <div [ngStyle]=\"style\" [ngClass]=\"{'p-checkbox p-component': true,'p-checkbox-disabled': disabled, 'p-checkbox-focused': focused}\" [class]=\"styleClass\">\n <div class=\"p-hidden-accessible\">\n <input #input type=\"text\" [attr.id]=\"inputId\" [name]=\"name\" [attr.tabindex]=\"tabindex\" [readonly]=\"readonly\" [disabled]=\"disabled\" (keyup)=\"onKeyup($event)\" (keydown)=\"onKeydown($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" [attr.aria-labelledby]=\"ariaLabelledBy\" inputmode=\"none\">\n </div>\n <div class=\"p-checkbox-box\" (click)=\"onClick($event,input)\" role=\"checkbox\" [attr.aria-checked]=\"value === true\"\n [ngClass]=\"{'p-highlight':value!=null,'p-disabled':disabled,'p-focus':focused}\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"value === true ? checkboxTrueIcon : value === false ? checkboxFalseIcon : ''\"></span>\n </div>\n </div>\n <label class=\"p-checkbox-label\" (click)=\"onClick($event,input)\"\n [ngClass]=\"{'p-checkbox-label-active':value!=null, 'p-disabled':disabled, 'p-checkbox-label-focus':focused}\"\n *ngIf=\"label\" [attr.for]=\"inputId\">{{label}}</label>\n `,\n providers: [TRISTATECHECKBOX_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n }\n }]\n }], function () {\n return [{\n type: i0.ChangeDetectorRef\n }];\n }, {\n disabled: [{\n type: Input\n }],\n name: [{\n type: Input\n }],\n ariaLabelledBy: [{\n type: Input\n }],\n tabindex: [{\n type: Input\n }],\n inputId: [{\n type: Input\n }],\n style: [{\n type: Input\n }],\n styleClass: [{\n type: Input\n }],\n label: [{\n type: Input\n }],\n readonly: [{\n type: Input\n }],\n checkboxTrueIcon: [{\n type: Input\n }],\n checkboxFalseIcon: [{\n type: Input\n }],\n onChange: [{\n type: Output\n }]\n });\n})();\n\nclass TriStateCheckboxModule {}\n\nTriStateCheckboxModule.ɵfac = function TriStateCheckboxModule_Factory(t) {\n return new (t || TriStateCheckboxModule)();\n};\n\nTriStateCheckboxModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TriStateCheckboxModule\n});\nTriStateCheckboxModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(TriStateCheckboxModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [TriStateCheckbox],\n declarations: [TriStateCheckbox]\n }]\n }], null, null);\n})();\n/**\n * Generated bundle index. Do not edit.\n */\n\n\nexport { TRISTATECHECKBOX_VALUE_ACCESSOR, TriStateCheckbox, TriStateCheckboxModule };","map":{"version":3,"sources":["C:/Users/DELL/Desktop/bachelor-thesis/trip-planner-front/node_modules/primeng/fesm2015/primeng-tristatecheckbox.mjs"],"names":["i0","forwardRef","EventEmitter","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","Output","NgModule","i1","CommonModule","NG_VALUE_ACCESSOR","TRISTATECHECKBOX_VALUE_ACCESSOR","provide","useExisting","TriStateCheckbox","multi","constructor","cd","checkboxTrueIcon","checkboxFalseIcon","onChange","onModelChange","onModelTouched","onClick","event","input","disabled","readonly","toggle","focused","focus","onKeydown","keyCode","preventDefault","onKeyup","value","undefined","emit","originalEvent","onFocus","onBlur","registerOnChange","fn","registerOnTouched","writeValue","markForCheck","setDisabledState","ɵfac","ChangeDetectorRef","ɵcmp","NgStyle","NgClass","NgIf","type","args","selector","template","providers","changeDetection","OnPush","encapsulation","None","host","name","ariaLabelledBy","tabindex","inputId","style","styleClass","label","TriStateCheckboxModule","ɵmod","ɵinj","imports","exports","declarations"],"mappings":"AAAA,OAAO,KAAKA,EAAZ,MAAoB,eAApB;AACA,SAASC,UAAT,EAAqBC,YAArB,EAAmCC,SAAnC,EAA8CC,uBAA9C,EAAuEC,iBAAvE,EAA0FC,KAA1F,EAAiGC,MAAjG,EAAyGC,QAAzG,QAAyH,eAAzH;AACA,OAAO,KAAKC,EAAZ,MAAoB,iBAApB;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,iBAAT,QAAkC,gBAAlC;;;;;;;;;;;;gBAqEmGX,E;;AAAAA,IAAAA,EAW3F,8B;AAX2FA,IAAAA,EAW3D;AAX2DA,MAAAA,EAW3D;AAAA,qBAX2DA,EAW3D;;AAAA,kBAX2DA,EAW3D;;AAAA;AAAA,M;AAX2DA,IAAAA,EAajD,U;AAbiDA,IAAAA,EAaxC,e;;;;mBAbwCA,E;AAAAA,IAAAA,EAYpF,uBAZoFA,EAYpF,gF;AAZoFA,IAA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A,gBAAgB,EAAE,CAAC;AACnBmC,MAAAA,IAAI,EAAEhD;AADa,KAAD,CAlBoE;AAoBtFc,IAAAA,iBAAiB,EAAE,CAAC;AACpBkC,MAAAA,IAAI,EAAEhD;AADc,KAAD,CApBmE;AAsBtFe,IAAAA,QAAQ,EAAE,CAAC;AACXiC,MAAAA,IAAI,EAAE/C;AADK,KAAD;AAtB4E,GAzBtG;AAAA;;AAkDA,MAAMgE,sBAAN,CAA6B;;AAE7BA,sBAAsB,CAACvB,IAAvB;AAAA,mBAAmHuB,sBAAnH;AAAA;;AACAA,sBAAsB,CAACC,IAAvB,kBApEmGxE,EAoEnG;AAAA,QAAoHuE;AAApH;AACAA,sBAAsB,CAACE,IAAvB,kBArEmGzE,EAqEnG;AAAA,YAAsJ,CAACU,YAAD,CAAtJ;AAAA;;AACA;AAAA,qDAtEmGV,EAsEnG,mBAA2FuE,sBAA3F,EAA+H,CAAC;AACpHjB,IAAAA,IAAI,EAAE9C,QAD8G;AAEpH+C,IAAAA,IAAI,EAAE,CAAC;AACCmB,MAAAA,OAAO,EAAE,CAAChE,YAAD,CADV;AAECiE,MAAAA,OAAO,EAAE,CAAC5D,gBAAD,CAFV;AAGC6D,MAAAA,YAAY,EAAE,CAAC7D,gBAAD;AAHf,KAAD;AAF8G,GAAD,CAA/H;AAAA;AASA;AACA;AACA;;;AAEA,SAASH,+BAAT,EAA0CG,gBAA1C,EAA4DwD,sBAA5D","sourcesContent":["import * as i0 from '@angular/core';\nimport { forwardRef, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nconst TRISTATECHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TriStateCheckbox),\n multi: true\n};\nclass TriStateCheckbox {\n constructor(cd) {\n this.cd = cd;\n this.checkboxTrueIcon = 'pi pi-check';\n this.checkboxFalseIcon = 'pi pi-times';\n this.onChange = new EventEmitter();\n this.onModelChange = () => { };\n this.onModelTouched = () => { };\n }\n onClick(event, input) {\n if (!this.disabled && !this.readonly) {\n this.toggle(event);\n this.focused = true;\n input.focus();\n }\n }\n onKeydown(event) {\n if (event.keyCode == 32) {\n event.preventDefault();\n }\n }\n onKeyup(event) {\n if (event.keyCode == 32 && !this.readonly) {\n this.toggle(event);\n event.preventDefault();\n }\n }\n toggle(event) {\n if (this.value == null || this.value == undefined)\n this.value = true;\n else if (this.value == true)\n this.value = false;\n else if (this.value == false)\n this.value = null;\n this.onModelChange(this.value);\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n }\n onFocus() {\n this.focused = true;\n }\n onBlur() {\n this.focused = false;\n this.onModelTouched();\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onModelTouched = fn;\n }\n writeValue(value) {\n this.value = value;\n this.cd.markForCheck();\n }\n setDisabledState(disabled) {\n this.disabled = disabled;\n this.cd.markForCheck();\n }\n}\nTriStateCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TriStateCheckbox, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nTriStateCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.0.0\", type: TriStateCheckbox, selector: \"p-triStateCheckbox\", inputs: { disabled: \"disabled\", name: \"name\", ariaLabelledBy: \"ariaLabelledBy\", tabindex: \"tabindex\", inputId: \"inputId\", style: \"style\", styleClass: \"styleClass\", label: \"label\", readonly: \"readonly\", checkboxTrueIcon: \"checkboxTrueIcon\", checkboxFalseIcon: \"checkboxFalseIcon\" }, outputs: { onChange: \"onChange\" }, host: { classAttribute: \"p-element\" }, providers: [TRISTATECHECKBOX_VALUE_ACCESSOR], ngImport: i0, template: `\n <div [ngStyle]=\"style\" [ngClass]=\"{'p-checkbox p-component': true,'p-checkbox-disabled': disabled, 'p-checkbox-focused': focused}\" [class]=\"styleClass\">\n <div class=\"p-hidden-accessible\">\n <input #input type=\"text\" [attr.id]=\"inputId\" [name]=\"name\" [attr.tabindex]=\"tabindex\" [readonly]=\"readonly\" [disabled]=\"disabled\" (keyup)=\"onKeyup($event)\" (keydown)=\"onKeydown($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" [attr.aria-labelledby]=\"ariaLabelledBy\" inputmode=\"none\">\n </div>\n <div class=\"p-checkbox-box\" (click)=\"onClick($event,input)\" role=\"checkbox\" [attr.aria-checked]=\"value === true\"\n [ngClass]=\"{'p-highlight':value!=null,'p-disabled':disabled,'p-focus':focused}\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"value === true ? checkboxTrueIcon : value === false ? checkboxFalseIcon : ''\"></span>\n </div>\n </div>\n <label class=\"p-checkbox-label\" (click)=\"onClick($event,input)\"\n [ngClass]=\"{'p-checkbox-label-active':value!=null, 'p-disabled':disabled, 'p-checkbox-label-focus':focused}\"\n *ngIf=\"label\" [attr.for]=\"inputId\">{{label}}</label>\n `, isInline: true, directives: [{ type: i1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { type: i1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { type: i1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TriStateCheckbox, decorators: [{\n type: Component,\n args: [{\n selector: 'p-triStateCheckbox',\n template: `\n <div [ngStyle]=\"style\" [ngClass]=\"{'p-checkbox p-component': true,'p-checkbox-disabled': disabled, 'p-checkbox-focused': focused}\" [class]=\"styleClass\">\n <div class=\"p-hidden-accessible\">\n <input #input type=\"text\" [attr.id]=\"inputId\" [name]=\"name\" [attr.tabindex]=\"tabindex\" [readonly]=\"readonly\" [disabled]=\"disabled\" (keyup)=\"onKeyup($event)\" (keydown)=\"onKeydown($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" [attr.aria-labelledby]=\"ariaLabelledBy\" inputmode=\"none\">\n </div>\n <div class=\"p-checkbox-box\" (click)=\"onClick($event,input)\" role=\"checkbox\" [attr.aria-checked]=\"value === true\"\n [ngClass]=\"{'p-highlight':value!=null,'p-disabled':disabled,'p-focus':focused}\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"value === true ? checkboxTrueIcon : value === false ? checkboxFalseIcon : ''\"></span>\n </div>\n </div>\n <label class=\"p-checkbox-label\" (click)=\"onClick($event,input)\"\n [ngClass]=\"{'p-checkbox-label-active':value!=null, 'p-disabled':disabled, 'p-checkbox-label-focus':focused}\"\n *ngIf=\"label\" [attr.for]=\"inputId\">{{label}}</label>\n `,\n providers: [TRISTATECHECKBOX_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n }\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{\n type: Input\n }], name: [{\n type: Input\n }], ariaLabelledBy: [{\n type: Input\n }], tabindex: [{\n type: Input\n }], inputId: [{\n type: Input\n }], style: [{\n type: Input\n }], styleClass: [{\n type: Input\n }], label: [{\n type: Input\n }], readonly: [{\n type: Input\n }], checkboxTrueIcon: [{\n type: Input\n }], checkboxFalseIcon: [{\n type: Input\n }], onChange: [{\n type: Output\n }] } });\nclass TriStateCheckboxModule {\n}\nTriStateCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TriStateCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nTriStateCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TriStateCheckboxModule, declarations: [TriStateCheckbox], imports: [CommonModule], exports: [TriStateCheckbox] });\nTriStateCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TriStateCheckboxModule, imports: [[CommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TriStateCheckboxModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [TriStateCheckbox],\n declarations: [TriStateCheckbox]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TRISTATECHECKBOX_VALUE_ACCESSOR, TriStateCheckbox, TriStateCheckboxModule };\n"]},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.