diff --git a/docs/index.html b/docs/index.html index 10e59496..5f47c225 100644 --- a/docs/index.html +++ b/docs/index.html @@ -212,6 +212,6 @@
Demonstrator app
- + \ No newline at end of file diff --git a/docs/main.58ac6ac0a827554d.js b/docs/main.58ac6ac0a827554d.js deleted file mode 100644 index e8d0ea3d..00000000 --- a/docs/main.58ac6ac0a827554d.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkaccordion_sample=self.webpackChunkaccordion_sample||[]).push([["main"],{8198:(g,O,d)=>{var h=d(4497),t=d(3210),Z=d(9906),B=d(5802),S=d(745),R=d(6099);const v={id:"Accord_1",name:"Accordion 1",items:[{title:"Accordion Card 1",body:"[[TMPL]]"},{title:"Accordion Card 2",body:'\n\t\t\tProject Repository\n\t\t\t
\n\t\t\tSimple Angular accordion component and a simple demonstrator app; the app is a simple demonstrator project - showcasing the integration of the accordion library and applying basic setting of it.'},{title:"Accordion simple Card 3 x 11",body:"\n\t\t\t\t

Para1

\n\t\t\t\t

Heading

\n\t\t\t\t\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t],\n};\n\nexport const dummyAccordionList2: Accordion = {\n\tid: 'Accord_2',\n\tname: 'Accordion 2',\n\titems: [\n\t\t{\n\t\t\tid: 'item0',\n\t\t\ttitle: 'Card ',\n\t\t\tbody: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione',\n\t\t},\n\t\t{\n\t\t\tid: 'item1',\n\t\t\ttitle: 'Card 1',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item2',\n\t\t\ttitle: 'Card 2',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item3',\n\t\t\ttitle: 'Card 3',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item4',\n\t\t\ttitle: 'Card 4',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item5',\n\t\t\ttitle: 'Long Card 5',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t],\n};\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { trigger, transition, style, animate, keyframes } from '@angular/animations';\n\nexport const loaderIn = trigger('moveIn', [\n\ttransition(':enter', [\n\t\tstyle({ opacity: 0, transform: 'translateY(-3rem)' }),\n\t\tanimate(\n\t\t\t'1s ease-in-out',\n\t\t\tkeyframes([\n\t\t\t\tstyle({ offset: 0.2, opacity: 0.1, transform: 'translateY(-1rem)' }),\n\t\t\t\tstyle({ offset: 0.6, opacity: 0.4, transform: 'translateY(-0.1rem)' }),\n\t\t\t\tstyle({ offset: 1, opacity: 1, transform: 'none' }),\n\t\t\t])\n\t\t),\n\t]),\n]);\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Injectable, Inject, InjectionToken } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { IToggler } from './settings/';\n\nexport function iniTogglerFn() {\n\treturn [] as IToggler[];\n}\n\nexport const INI_STATE = new InjectionToken('Accordion Initial Items Open state provider token', { factory: iniTogglerFn });\n\n@Injectable()\nexport class AccordionOpenService extends BehaviorSubject {\n\tconstructor(@Inject(INI_STATE) iniState: IToggler[] = []) {\n\t\tsuper(iniState);\n\t}\n\n\tget itemsOpen$() {\n\t\treturn this.asObservable();\n\t}\n\tget itemsOpenSnapshot() {\n\t\treturn this.value;\n\t}\n\n\tsetItemsOpen = (itemsStats: IToggler[]) => this.next(itemsStats);\n\n\tclose = () => {\n\t\tthis.complete();\n\t\tsuper.unsubscribe();\n\t};\n}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { trigger, query, stagger, transition, animate, style, keyframes, state, AnimationTriggerMetadata } from '@angular/animations';\nexport { AnimationEvent as NgAnimationEvent } from '@angular/animations';\n\nexport const accordionAnimations: {\n\treadonly accordItemsIn: AnimationTriggerMetadata;\n\treadonly spinnerIn: AnimationTriggerMetadata;\n} = {\n\taccordItemsIn: trigger('accordItemsIn', [\n\t\ttransition('* => *', [\n\t\t\tquery(\n\t\t\t\t':leave',\n\t\t\t\t[\n\t\t\t\t\tstagger(-25, [\n\t\t\t\t\t\tanimate(\n\t\t\t\t\t\t\t'.3s',\n\t\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\ttransform: 'scale(0.7, 0.7) translateY(-3rem)',\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t],\n\t\t\t\t{ optional: true }\n\t\t\t),\n\t\t\tquery(\n\t\t\t\t':enter',\n\t\t\t\t[\n\t\t\t\t\tstyle({ opacity: 0, transform: 'scale(0.7, 0.7) translateY(-3rem)' }),\n\t\t\t\t\tstagger(25, [\n\t\t\t\t\t\tanimate(\n\t\t\t\t\t\t\t'.3s ease-out',\n\t\t\t\t\t\t\tkeyframes([\n\t\t\t\t\t\t\t\tstyle({ offset: 0, opacity: 0 }),\n\t\t\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\t\t\toffset: 0.2,\n\t\t\t\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t\t\t\t\ttransform: 'scale(0.85, 0.85) translateY(-4rem)',\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\t\t\toffset: 0.5,\n\t\t\t\t\t\t\t\t\topacity: 0.8,\n\t\t\t\t\t\t\t\t\ttransform: 'scale(0.9, 0.9) translateY(3rem)',\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tstyle({ offset: 1, opacity: 1, transform: 'none' }),\n\t\t\t\t\t\t\t])\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t],\n\t\t\t\t{ optional: true }\n\t\t\t),\n\t\t]),\n\t]),\n\n\tspinnerIn: trigger('spinnerIn', [\n\t\ttransition('void => *', [\n\t\t\tquery(\n\t\t\t\t'.loader',\n\t\t\t\tanimate(\n\t\t\t\t\t'.5s ease-out',\n\t\t\t\t\tkeyframes([\n\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\ttransformOrigin: 'bottom right',\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\ttransform: 'translateY(-100px) scale(0, 0)',\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\toffset: 0.8,\n\t\t\t\t\t\t\topacity: 0.6,\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\ttransform: 'translateY(40px) scale(0.5, 0.5)',\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\toffset: 1,\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\theight: '*',\n\t\t\t\t\t\t\ttransform: 'translateY(0) scale(1, 1)',\n\t\t\t\t\t\t}),\n\t\t\t\t\t])\n\t\t\t\t),\n\t\t\t\t{ optional: true }\n\t\t\t),\n\t\t]),\n\t]),\n};\n\nexport const accordionItemAnimations: {\n\treadonly accordionItemBodyHeightCollapse: AnimationTriggerMetadata;\n} = {\n\taccordionItemBodyHeightCollapse: trigger('openClose', [\n\t\tstate(\n\t\t\t'closed',\n\t\t\tstyle({\n\t\t\t\theight: '0',\n\t\t\t\topacity: '0',\n\t\t\t\tvisibility: 'collapsed',\n\t\t\t})\n\t\t),\n\t\tstate(\n\t\t\t'opened',\n\t\t\tstyle({\n\t\t\t\theight: '*',\n\t\t\t\topacity: '1',\n\t\t\t\tvisibility: 'visible',\n\t\t\t})\n\t\t),\n\t\ttransition('opened <=> closed', animate('.3s ease-out')),\n\t]),\n};\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { AccordionItemInternal } from './IAccordion';\n\nexport interface IToggler {\n\titemId: number;\n\tisOpen: boolean;\n}\n\nexport const pluckIToggler = ({ itemId, isOpen, ...rest }: AccordionItemInternal) => { itemId, isOpen };\nexport const pluckOpenTogglesIdsToStr = (toggles: IToggler[]): string =>\n\ttoggles\n\t\t.filter((t) => t.isOpen === true)\n\t\t.map((t) => t.itemId)\n\t\t.join(',');\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { TemplateRef, SecurityContext } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { ItemTemplateContext } from './IAccordion';\n\nexport const imgBase64ToBlob = (Base64Image: any, imageType = 'image/png') => {\n\tconst parts = Base64Image.split(';base64,');\n\tconst decodedData = window.atob(parts[1]);\n\tconst uInt8Array = new Uint8Array(decodedData.length);\n\tfor (let i = 0; i < decodedData.length; ++i) {\n\t\tuInt8Array[i] = decodedData.charCodeAt(i);\n\t}\n\treturn new Blob([uInt8Array], { type: imageType });\n};\n\nexport const svgToBase64src = (rawSvg: string) => 'data:image/svg+xml;base64,' + btoa(rawSvg);\nexport const prepRes = (item: string, sanitizer: DomSanitizer) => sanitizer.bypassSecurityTrustResourceUrl(item);\nexport const sanitizeHTML = (item: string | object | undefined, sanitizer: DomSanitizer) => !!item && sanitizer.sanitize(SecurityContext.HTML, item);\nexport const getSvgSafeRes = (file: string, sanitizer: DomSanitizer) => prepRes(svgToBase64src(file), sanitizer);\nexport const getPngSafeRes = (file: string, sanitizer: DomSanitizer) => prepRes(URL.createObjectURL(imgBase64ToBlob(file)), sanitizer);\nexport const blobToSafeRes = (blob: Blob, sanitizer: DomSanitizer) => prepRes(URL.createObjectURL(blob), sanitizer);\n\nexport const bodyWithTmpl = (item: string | ItemTemplateContext): item is ItemTemplateContext => !!item && typeof item !== 'string' && !!item.itemTemplate;\nexport const getItemBodyTemplate = (item: string | ItemTemplateContext, defaultTmpl: TemplateRef) => (!!bodyWithTmpl(item) ? item.itemTemplate : defaultTmpl);\nexport const getItemBodyCtx = (item: string | ItemTemplateContext) => (bodyWithTmpl(item) && typeof item.itemBody === 'string' ? item.itemBody : item);\n\n// export const svgToBase64srcWithBuf = (rawSvg: string) => {\n// \tlet buf = Buffer.from(rawSvg);\n// \treturn buf.toString('base64url');\n// };\n","/* eslint-disable @angular-eslint/no-host-metadata-property */\n/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { AfterContentChecked, AfterViewInit, Directive, ElementRef, HostBinding, Renderer2, NgZone } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\nimport { getSvgSafeRes } from './settings/';\nimport { arrow_down, logo_svg } from './theming/icons-base';\n\nconst l = console.log;\n\nenum ImgClasses {\n\tLOGO = 'accord-item__header--start-img',\n\tENDING = 'accord-item__header--end-img',\n}\nenum ImgLoadClass {\n\tSUCCESS = 'img-loaded__success',\n\tALTER = 'img-load__alter',\n}\n\n@Directive({\n\tselector: '.accord-item__header-img',\n\thost: {\n\t\t'(load)': 'onLoad($event)',\n\t\t'(error)': 'onError($event)',\n\t\t'[attr.loading]': '\"lazy\"',\n\t},\n})\nexport class AccordionItemImgDirective implements AfterViewInit, AfterContentChecked {\n\t@HostBinding('attr.src') get src() {\n\t\treturn this._src;\n\t}\n\n\tprivate _nativeImgEl: HTMLImageElement;\n\tprivate _src: string | SafeResourceUrl | undefined;\n\tprivate _openSign: string | SafeResourceUrl | undefined;\n\tprivate _closeSign: string | SafeResourceUrl | undefined;\n\tprivate _baseLogoImg = getSvgSafeRes(logo_svg, this.sanitizer);\n\tprivate _baseChevronImg = getSvgSafeRes(arrow_down, this.sanitizer);\n\tprivate _isSet = false;\n\tprivate _needToRecheck = false;\n\n\tconstructor(private el: ElementRef, private renderer: Renderer2, private zone: NgZone, private sanitizer: DomSanitizer) {}\n\n\tngAfterViewInit() {\n\t\tthis._nativeImgEl = this.el.nativeElement;\n\t}\n\n\tngAfterContentChecked() {\n\t\tif (this._isSet && !this._needToRecheck) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._isSet && this._needToRecheck) {\n\t\t\treturn this._doOpenCloseSrcRecheck();\n\t\t}\n\n\t\tif (this._isLogoImg()) {\n\t\t\t// this._src = this.readElDataSet('src') || this._baseLogoImg;\n\t\t\t// return this.setNoRecheck();\n\t\t\treturn this._setItemHeaderImgSafeSrc(this._readElDataSet('src') || this._baseLogoImg);\n\t\t} else if (this._isCloserImg()) {\n\t\t\tthis._openSign = this._readElDataSet('opensrc') ?? undefined;\n\t\t\tthis._closeSign = this._readElDataSet('closesrc') ?? undefined;\n\t\t\tif (!this._isImgOpenClose()) {\n\t\t\t\t// this._src = this._baseChevronImg;\n\t\t\t\t// return this.setNoRecheck();\n\t\t\t\treturn this._setItemHeaderImgSafeSrc(this._baseChevronImg);\n\t\t\t} else {\n\t\t\t\tif (this._openSign !== this._closeSign) {\n\t\t\t\t\tthis._needToRecheck = true;\n\t\t\t\t}\n\t\t\t\tthis._isSet = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tonLoad = ({ target, ...rest }: { target: HTMLImageElement; rest: any[] }) => this._setLoadSuccess(target);\n\tonError = ({ target, ...rest }: { target: HTMLImageElement; rest: any[] }) => {\n\t\tthis._setLoadAlter(target);\n\t\tif (target.classList.contains(ImgClasses.LOGO)) {\n\t\t\t// this.setItemHeaderImgSrc(target, this._baseLogoImg);\n\t\t\tthis._setItemHeaderImgSafeSrc(this._baseLogoImg);\n\t\t} else if (target.classList.contains(ImgClasses.ENDING)) {\n\t\t\t// this.setItemHeaderImgSrc(target, this._baseChevronImg);\n\t\t\tthis._setItemHeaderImgSafeSrc(this._baseChevronImg);\n\t\t} else {\n\t\t\treturn l('Not an Accordion Item header image');\n\t\t}\n\t};\n\n\tprivate _doOpenCloseSrcRecheck = () => {\n\t\tthis.zone.runOutsideAngular(() => {\n\t\t\tthis._src = this._nativeImgEl?.classList.contains('open') ? this._closeSign : this._openSign;\n\t\t});\n\t};\n\tprivate _setItemHeaderImgSrc = (imgRef: HTMLImageElement, src: string | SafeResourceUrl) => this.renderer.setAttribute(imgRef, 'src', src as string);\n\tprivate _setItemHeaderImgSafeSrc = (src: string | SafeResourceUrl) => {\n\t\tthis._src = src;\n\t\treturn this._setNoRecheck();\n\t};\n\tprivate _readElDataSet = (attr: string) => this._nativeImgEl?.dataset[attr];\n\tprivate _setLoadSuccess = (target: HTMLImageElement) => {\n\t\ttarget.classList.add(ImgLoadClass.SUCCESS);\n\t\tthis._isSet = true;\n\t};\n\tprivate _setLoadAlter = (target: HTMLImageElement) => {\n\t\ttarget.classList.add(ImgLoadClass.ALTER);\n\t\tthis._setNoRecheck();\n\t};\n\tprivate _isImgOpenClose = () => !!this._closeSign && !!(this._closeSign as string).length && !!this._openSign && !!(this._openSign as string).length;\n\tprivate _isLogoImg = () => this._nativeImgEl?.classList.contains(ImgClasses.LOGO);\n\tprivate _isCloserImg = () => this._nativeImgEl?.classList.contains(ImgClasses.ENDING);\n\tprivate _setNoRecheck = () => {\n\t\tthis._isSet = true;\n\t\tthis._needToRecheck = false;\n\t};\n}\n","/* eslint-disable max-len */\n/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nexport const logo_svg =\n\t'';\n\nexport const arrow_down =\n\t'';\n","\r\n\r\n\r\n\r\n\t
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
\r\n\r\n\r\n\t
\r\n\t\t\r\n\t\t\t\r\n\t\t\t{{ item.itemNum }}.\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t{{ item.title }}\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
\r\n
\r\n\r\n\r\n\t{{ defctx }}\r\n\t\r\n\r\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { of } from 'rxjs';\nimport { accordionItemAnimations, NgAnimationEvent } from './animations';\nimport { AccordionItemInternal, getItemBodyCtx, getItemBodyTemplate } from './settings/';\n\n@Component({\n\tselector: 'ngxd-accordion-item',\n\ttemplateUrl: './accordion-item.component.html',\n\tstyleUrls: ['./accordion-item.component.scss'],\n\tanimations: [accordionItemAnimations.accordionItemBodyHeightCollapse],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AccordionItemComponent {\n\tgetItemBodyCtx = getItemBodyCtx!;\n\tgetItemBodyTemplate = getItemBodyTemplate!;\n\tisOpen$ = of(false);\n\titem: Partial;\n\n\tstartAnim(e: NgAnimationEvent) {\n\t\t(e.element).style.willChange = 'height, opacity, visibility';\n\t\tconst classes = e.element.classList;\n\t\tif (e.fromState === 'void') {\n\t\t\tclasses?.add('closed');\n\t\t}\n\t\tif (e.fromState === 'closed' && e.toState === 'opened') {\n\t\t\tclasses.replace('closed', 'opened');\n\t\t}\n\t}\n\n\tdoneAnim(e: NgAnimationEvent) {\n\t\t(e.element).style.willChange = 'auto';\n\t\tconst classes = e.element.classList;\n\t\tif (e.fromState == 'opened' && e.toState == 'closed') {\n\t\t\tclasses.replace('opened', 'closed');\n\t\t}\n\t}\n}\n","/* eslint-disable @angular-eslint/no-host-metadata-property */\n/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Directive, ElementRef, Output, EventEmitter, AfterViewInit, Input, Renderer2, Inject, OnInit, Host, ChangeDetectorRef, OnDestroy } from '@angular/core';\n\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { Subject } from 'rxjs';\nimport { filter, tap, pluck, map, takeUntil } from 'rxjs/operators';\n\nimport { AccordionItemComponent } from './accordion-item.component';\nimport { AccordionOpenService } from './accordion-open.service';\nimport { NgAnimationEvent } from './animations';\nimport { IToggler, IAccordionItemStyling, AccordionItem, AccordionItemInternal, ItemTemplateContext, sanitizeHTML } from './settings/';\n\n@Directive({\n\tselector: '[ngxdAccordionItem]',\n\thost: {\n\t\t'[class.opened]': 'isOpen',\n\t\t'(dblclick)': 'onDblClick([$event.target, $event.currentTarget])',\n\t\t'(click)': 'onClick([$event.target, $event.currentTarget])',\n\t},\n})\nexport class AccordionItemDirective implements OnInit, AfterViewInit, OnDestroy {\n\t@Input('ngxdAccordionItem') item!: AccordionItemInternal;\n\t@Input('styling') itemStyles: IAccordionItemStyling = {\n\t\theadHeight: '50px',\n\t\theadBgColor: '#ccc',\n\t\theadColor: '#fff',\n\t\tbodyBgColor: '#fff',\n\t\tbodyColor: '#000',\n\t\tfontSize: '10px',\n\t\tbodyPadding: '0',\n\t};\n\t@Input() logo: string;\n\t@Input() openSign: string;\n\t@Input() closeSign: string;\n\t@Input() bodyDblclkClose = false;\n\t@Input() isNumbered = false;\n\t@Output() toggled: EventEmitter = new EventEmitter();\n\tisOpen = false;\n\tprivate hostDestroy$$: Subject = new Subject();\n\n\tconstructor(\n\t\t@Inject(AccordionItemComponent) private hostCmp: AccordionItemComponent,\n\t\t@Inject(ElementRef) private hostElRef: ElementRef,\n\t\t@Host() private itemStatusSvc: AccordionOpenService,\n\t\tprivate render: Renderer2,\n\t\tprivate sanitizer: DomSanitizer,\n\t\tprivate cd: ChangeDetectorRef\n\t) {}\n\n\tngOnInit() {\n\t\tthis.hostCmp.item = {\n\t\t\t...this.item,\n\t\t\tbody:\n\t\t\t\ttypeof this.item.body === 'string'\n\t\t\t\t\t? sanitizeHTML(this.item.body, this.sanitizer)\n\t\t\t\t\t: ({\n\t\t\t\t\t\t\titemTemplate: this.item.body?.itemTemplate,\n\t\t\t\t\t\t\titemBody: sanitizeHTML(this.item.body?.itemBody, this.sanitizer),\n\t\t\t\t\t } as ItemTemplateContext),\n\t\t\titemNum: this.isNumbered ? +this.item.itemId + 1 : null,\n\t\t} as Partial;\n\n\t\tthis.hostCmp.isOpen$ = this.itemStatusSvc.itemsOpen$.pipe(\n\t\t\ttakeUntil(this.hostDestroy$$),\n\t\t\tfilter((val) => !!val && !!val.length),\n\t\t\tmap((toggles: IToggler[]) => toggles.find(({ itemId }) => itemId === +this.item.itemId)!),\n\t\t\tpluck('isOpen'),\n\t\t\ttap((isOpen = false) => (this.isOpen = isOpen))\n\t\t);\n\t}\n\n\tngAfterViewInit() {\n\t\tconst nativeEl = this.hostElRef.nativeElement;\n\t\tconst itemEl = nativeEl.getElementsByClassName('accord-item').item(0) as HTMLElement;\n\t\tconst headEl = nativeEl.getElementsByClassName('accord-item__header').item(0) as HTMLElement;\n\t\tconst bodyEl = nativeEl.getElementsByClassName('accord-item__body').item(0) as HTMLElement;\n\n\t\t{\n\t\t\t/** set up the accordion item header images\\' sources */\n\t\t\tconst headElLogoImgEl = headEl.getElementsByClassName('accord-item__header--start-img').item(0) as HTMLImageElement;\n\t\t\tconst headElCloserImgEl = headEl.getElementsByClassName('accord-item__header--end-img').item(0) as HTMLImageElement;\n\t\t\tthis.logo && this.render.setAttribute(headElLogoImgEl, 'data-src', this.logo);\n\t\t\tthis.openSign && this.render.setAttribute(headElCloserImgEl, 'data-opensrc', this.openSign);\n\t\t\tthis.closeSign && this.render.setAttribute(headElCloserImgEl, 'data-closesrc', this.closeSign);\n\t\t\tthis.cd.detectChanges();\n\t\t}\n\n\t\tthis.render.setStyle(itemEl, 'margin', this.itemStyles.margin ?? '0');\n\t\tthis.render.setStyle(itemEl, 'padding', this.itemStyles.padding ?? '0');\n\t\tthis.itemStyles.font && this.render.setStyle(itemEl, 'font', this.itemStyles.font);\n\t\tthis.itemStyles.fontSize && this.render.setStyle(itemEl, 'font-size', this.itemStyles.fontSize);\n\t\tthis.itemStyles.fontStyle && this.render.setStyle(itemEl, 'font-style', this.itemStyles.fontStyle);\n\t\tthis.itemStyles.fontFamily && this.render.setStyle(itemEl, 'font-family', this.itemStyles.fontFamily);\n\t\tthis.render.setStyle(itemEl, 'margin-bottom', this.itemStyles.marginBottom);\n\t\tthis.render.setStyle(itemEl, 'margin-top', this.itemStyles.marginTop);\n\t\tthis.itemStyles.headBgColor && nativeEl.style.setProperty('--ngxd-head-item-color', this.itemStyles.headBgColor);\n\n\t\tthis.itemStyles.headHeight && this.render.setStyle(headEl, 'height', this.itemStyles.headHeight);\n\t\tthis.itemStyles.headFont && this.render.setStyle(headEl, 'font', this.itemStyles.headFont);\n\t\tthis.render.setStyle(headEl, 'font-size', this.itemStyles.headFontSize ?? '1.1rem');\n\t\tthis.render.setStyle(headEl, 'color', this.itemStyles.headColor ?? '#ccc');\n\n\t\tthis.render.setStyle(bodyEl, 'background-color', this.itemStyles.bodyBgColor ?? 'rgba(200, 200, 200, 0.2)');\n\t\tthis.render.setStyle(bodyEl, 'color', this.itemStyles.bodyColor ?? '#000');\n\t\tthis.render.setStyle(bodyEl, 'padding', this.itemStyles.bodyPadding ?? '.1rem');\n\t\tthis.render.setStyle(bodyEl, 'margin', this.itemStyles.bodyMargin ?? '0');\n\t\tthis.itemStyles.bodyFont && this.render.setStyle(bodyEl, 'font', this.itemStyles.bodyFont);\n\t\tthis.render.setStyle(bodyEl, 'font-size', this.itemStyles.bodyFontSize ?? '1rem');\n\t\tthis.itemStyles.bodyTextAlign && this.render.setStyle(bodyEl, 'text-align', this.itemStyles.bodyTextAlign);\n\n\t\tthis.render.setStyle(bodyEl, 'cursor', this.bodyDblclkClose ? 'grab' : 'default');\n\t}\n\n\tngOnDestroy() {\n\t\tthis.hostDestroy$$.next();\n\t\tthis.hostDestroy$$.complete();\n\t}\n\n\tonClick = ([{ outerHTML }, { dataset }]: [{ outerHTML: string }, { dataset: any }]) =>\n\t\t!!outerHTML && !!dataset && outerHTML.includes('header') ? this._handleClick({ ...dataset }) : void 0;\n\n\tonDblClick = ([{ outerHTML }, { dataset }]: [{ outerHTML: string }, { dataset: any }]) =>\n\t\t!!outerHTML && this.bodyDblclkClose && outerHTML.includes('accord-item__body') ? this._handleClick({ ...dataset }) : void 0;\n\n\tprivate _handleClick = ({ idx, ...rest } = { idx: -1 }) => this._toggle(+idx);\n\tprivate _toggle = (itemId: number) => this.toggled.emit({ itemId, isOpen: !this.isOpen });\n}\n","\n
\n\t \n
\n\n\n\t\n\n\n\n\t\n\n\n\n\t\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
\n
\n","/*!\r\n * @ngx-dummy/Accordion-Simple library\r\n * Simple accordion created for angular / ionic projects.\r\n * https://github.com/ngx-dummy/accordion-simple\r\n *\r\n * Copyright Vladimir Ovsyukov \r\n * Published under GNU LGPLv3 License\r\n */\r\nimport {\r\n\tComponent,\r\n\tInput,\r\n\tHostBinding,\r\n\tChangeDetectionStrategy,\r\n\tOnInit,\r\n\tSelf,\r\n\tSimpleChanges,\r\n\tOnChanges,\r\n\tOnDestroy,\r\n\tTemplateRef,\r\n\tViewChild,\r\n\tElementRef,\r\n\tRenderer2,\r\n} from '@angular/core';\r\nimport { map, filter } from 'rxjs/operators';\r\n\r\nimport { AccordionOpenService } from './accordion-open.service';\r\nimport { accordionAnimations } from './animations';\r\nimport { Accordion, IAccordionStyling, IAccordionItemStyling, IToggler, AccordionItemInternal, AccordionInternal, pluckIToggler, pluckOpenTogglesIdsToStr } from './settings/';\r\n\r\n@Component({\r\n\tselector: 'ngxd-accordion',\r\n\texportAs: 'ngxdAccordion',\r\n\ttemplateUrl: './accordion.component.html',\r\n\tstyleUrls: ['./accordion.component.scss'],\r\n\tanimations: [accordionAnimations.accordItemsIn, accordionAnimations.spinnerIn],\r\n\tviewProviders: [AccordionOpenService],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AccordionComponent implements OnInit, OnChanges, OnDestroy {\r\n\tstatic idx = 0;\r\n\t@ViewChild('defloadingTpl', { read: TemplateRef, static: true }) private defloadingTpl!: TemplateRef;\r\n\t@HostBinding('attr.data-items-opened') _openedItems: string;\r\n\t@HostBinding('attr.id') get id() {\r\n\t\treturn `${this.attributes.id}`;\r\n\t}\r\n\t@HostBinding('attr.name') get name() {\r\n\t\treturn this.attributes.name;\r\n\t}\r\n\t@Input() set accordionList(acc: Accordion) {\r\n\t\tlet [name, id] = [(!!acc && !!acc['name']?.length && acc.name) || 'Sample-Accordion', (!!acc && !!acc['id'] && acc.id) || `accordion_${++AccordionComponent.idx}`];\r\n\t\tthis._accord = Object.assign(\r\n\t\t\t{ id, name },\r\n\t\t\t{\r\n\t\t\t\titems: acc?.items.map(\r\n\t\t\t\t\t(item, i) =>\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...item,\r\n\t\t\t\t\t\t\tid: !!item.id && typeof item.id === 'string' ? item.id : `${id}__accord-item_${i}`,\r\n\t\t\t\t\t\t\titemId: i,\r\n\t\t\t\t\t\t}\r\n\t\t\t\t),\r\n\t\t\t}\r\n\t\t) as AccordionInternal;\r\n\t}\r\n\tget accordionItems(): AccordionItemInternal[] {\r\n\t\treturn this._accord?.items;\r\n\t}\r\n\t@Input() openSign: string;\r\n\t@Input() closeSign: string;\r\n\t@Input() listLogo: string;\r\n\t@Input() accordionStyling: IAccordionStyling = {\r\n\t\tnumberedItems: false,\r\n\t\tisMultiShow: false,\r\n\t\tbodyDblclkCloseItems: false,\r\n\t\tmaxWidth: '100%',\r\n\t\titemsGuts: '1rem',\r\n\t\tmargin: '0',\r\n\t\titemStyling: {\r\n\t\t\theadBgColor: '#4197b2',\r\n\t\t\theadColor: '#fff',\r\n\t\t\tbodyBgColor: '#fff',\r\n\t\t\tbodyColor: '#000',\r\n\t\t\tmargin: '0',\r\n\t\t\tpadding: '0',\r\n\t\t},\r\n\t};\r\n\t@Input() set loadingTpl(val: TemplateRef) {\r\n\t\tthis._loadingTpl = val || this.defloadingTpl;\r\n\t}\r\n\tget loadingTpl(): TemplateRef {\r\n\t\treturn this._loadingTpl ?? this.defloadingTpl;\r\n\t}\r\n\t_bodyDblclkClose = false;\r\n\t_itemStyle: IAccordionItemStyling;\r\n\t_isNumbered = false;\r\n\r\n\tprivate _loadingTpl: TemplateRef;\r\n\tprivate _accord: AccordionInternal;\r\n\tprivate multiSelect = false;\r\n\r\n\tconstructor(@Self() private itemsOpenSvc: AccordionOpenService, private hostEl: ElementRef, private renderer: Renderer2) {}\r\n\r\n\tngOnInit() {\r\n\t\tthis._bodyDblclkClose = !!this.accordionStyling.bodyDblclkCloseItems ?? false;\r\n\t\tthis.multiSelect = !!this.accordionStyling.isMultiShow ?? false;\r\n\t\tthis.itemsOpenSvc.itemsOpen$\r\n\t\t\t.pipe(\r\n\t\t\t\tfilter((val) => !!val?.length),\r\n\t\t\t\tmap(pluckOpenTogglesIdsToStr)\r\n\t\t\t)\r\n\t\t\t.subscribe((ids) => (this._openedItems = ids));\r\n\r\n\t\tthis._isNumbered = this.accordionStyling.numberedItems ?? false;\r\n\t\tthis._bodyDblclkClose = this.accordionStyling.bodyDblclkCloseItems ?? false;\r\n\r\n\t\tlet itemStyles: IAccordionItemStyling = Array.isArray(this.accordionStyling.itemStyling)\r\n\t\t\t? this.accordionStyling.itemStyling.reduce((accu = {}, curr) => ({ ...accu, ...curr }))\r\n\t\t\t: { ...this.accordionStyling.itemStyling };\r\n\r\n\t\tconst itemsGuts = this.accordionStyling.itemsGuts ?? 0;\r\n\t\titemStyles = {\r\n\t\t\tpadding: '0',\r\n\t\t\tmarginBottom: itemsGuts,\r\n\t\t\tmarginTop: itemsGuts,\r\n\t\t\t...itemStyles,\r\n\t\t};\r\n\t\tthis._itemStyle = Object.entries(itemStyles)\r\n\t\t\t.map(([key, val]) => ({\r\n\t\t\t\t[key]: typeof val === 'number' ? `${val}px` : val,\r\n\t\t\t}))\r\n\t\t\t.reduce((accu, val) => ({ ...accu, ...val }));\r\n\r\n\t\tconst accordEl = this.hostEl.nativeElement;\r\n\t\tthis.renderer.setStyle(accordEl, 'max-width', this.accordionStyling.maxWidth ?? '100%');\r\n\t\tthis.renderer.setStyle(accordEl, 'margin', this.accordionStyling.margin ?? '0');\r\n\t}\r\n\r\n\tngOnChanges(changes: SimpleChanges) {\r\n\t\tObject.keys(changes).forEach((prop) => {\r\n\t\t\tif (prop === 'accordionList' && changes[prop].previousValue !== changes[prop].currentValue) this.itemsOpenSvc.setItemsOpen(this.accordionItems?.map(pluckIToggler));\r\n\t\t});\r\n\t}\r\n\r\n\tngOnDestroy() {\r\n\t\tthis.itemsOpenSvc.close();\r\n\t}\r\n\r\n\tonItemToggled = ({ itemId, isOpen }: IToggler = { itemId: 0, isOpen: false }) =>\r\n\t\tthis.itemsOpenSvc.setItemsOpen(\r\n\t\t\tthis.itemsOpenSvc.itemsOpenSnapshot.map(\r\n\t\t\t\t({ itemId: eId, isOpen: opened }) =>\r\n\t\t\t\t\t(eId === +itemId\r\n\t\t\t\t\t\t? { itemId, isOpen }\r\n\t\t\t\t\t\t: {\r\n\t\t\t\t\t\t\t\titemId: eId,\r\n\t\t\t\t\t\t\t\tisOpen: this.multiSelect ? opened : false,\r\n\t\t\t\t\t\t }) as IToggler\r\n\t\t\t)\r\n\t\t);\r\n\r\n\tpublic closeAll = () => this.accordionItems?.forEach(({ itemId, ...rest }) => this.onItemToggled({ itemId, isOpen: false }));\r\n\r\n\tpublic trackByFn = (_ind: number, { itemId, ...rest }: any) => +itemId;\r\n\r\n\tprivate get attributes(): Partial {\r\n\t\tconst { id, name } = this._accord;\r\n\t\treturn { id, name };\r\n\t}\r\n}\r\n","\n
\n\t
\n\t\t
\n\t\t\t

{{ title }}

\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n\n\n\t\n\t
\n\t\t\n\t
\n
\n\n\n\t\n\t\n\t\t
\n\t\t\t
\n\t\t\t\t
Custom templated Item sample
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

by Vladimir Ovsyukov

\n\t\t\t\t\t\t\t
https://github.com/VovanSuper
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\tfavorite\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tshare\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t
\n
\n\n\n\t\n\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\tSample Accordion Item (alike one of materializecss)\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSimple material template Card\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tshare\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t

{{ ctxcontent }}

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n
\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Component, ViewChild, TemplateRef, OnInit, AfterViewInit } from '@angular/core';\nimport { delay } from 'rxjs/operators';\nimport { of } from 'rxjs';\nimport { MDCRipple } from '@material/ripple';\n\nimport { IAccordionStyling, Accordion } from '@ngx-dummy/accordion-simple/settings';\nimport { dummyAccordionList1 as list1, dummyAccordionList2 } from './helpers/dummy-data';\nimport { loaderIn } from './loader.anim';\n\n@Component({\n\tselector: 'app-root',\n\tanimations: [loaderIn],\n\ttemplateUrl: './app.component.html',\n\tstyleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit, AfterViewInit {\n\t@ViewChild('simpleBodyTmpl', { static: true }) simpleBodyTmpl: TemplateRef;\n\t@ViewChild('tmpl2', { static: true }) tmpl2: TemplateRef;\n\ttitle = 'Accordion Sample';\n\taccordList2: Accordion = null;\n\taccordList$ = of(dummyAccordionList2).pipe(delay(3000));\n\n\tstyling: IAccordionStyling = {\n\t\titemsGuts: '.1rem',\n\t\tmaxWidth: '99%',\n\t\tmargin: '.1rem',\n\t\tnumberedItems: true,\n\t\titemStyling: {\n\t\t\theadBgColor: '#89a',\n\t\t\theadColor: '#fff',\n\t\t\tmargin: '.1rem',\n\t\t\tbodyPadding: '1rem',\n\t\t\tbodyMargin: 1,\n\t\t},\n\t};\n\n\tstyling1: IAccordionStyling = {\n\t\t...this.styling,\n\t\titemsGuts: 0,\n\t\tnumberedItems: false,\n\t\tmargin: '0 auto',\n\t\tisMultiShow: true,\n\t\tmaxWidth: '94%',\n\t\tbodyDblclkCloseItems: true,\n\n\t\titemStyling: {\n\t\t\t...this.styling.itemStyling,\n\t\t\theadBgColor: 'darkcyan',\n\t\t\theadColor: 'yellow',\n\t\t\tbodyColor: '#aaffff',\n\t\t\tbodyBgColor: '#87a3d1',\n\t\t\tfont: 'Comic Sans MS',\n\t\t\tbodyPadding: 1,\n\t\t\tbodyMargin: 0,\n\t\t\tbodyTextAlign: 'left',\n\t\t\tmargin: 0,\n\t\t},\n\t};\n\n\tngOnInit() {\n\t\tthis.accordList2 = {\n\t\t\t...list1,\n\t\t\titems: [\n\t\t\t\t...list1.items\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\titem.title.includes('Accordion Card 2')\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\t\t\t\titemTemplate: this.simpleBodyTmpl,\n\t\t\t\t\t\t\t\t\t\titemBody: item.body,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { ...item }\n\t\t\t\t\t)\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\titem.title.includes('Accordion Card 1')\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\t\t\t\titemTemplate: this.tmpl2,\n\t\t\t\t\t\t\t\t\t\titemBody: 'Lorem ipsum card ...',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { ...item }\n\t\t\t\t\t),\n\t\t\t],\n\t\t};\n\t}\n\n\tngAfterViewInit() {\n\t\tconst btnRipple = document.querySelector('.mdc-button');\n\t\tconst ripple = new MDCRipple(btnRipple);\n\t\treturn () => ripple.destroy();\n\t}\n}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './accordion-item.component';\nimport { AccordionItemDirective } from './accordion-item.directive';\nimport { AccordionItemImgDirective } from './accordion-item-img.directive';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n\timports: [CommonModule, HttpClientModule],\n\tdeclarations: [AccordionComponent, AccordionItemComponent, AccordionItemDirective, AccordionItemImgDirective],\n\texports: [AccordionComponent],\n})\nexport class AccordionModule {}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Component } from '@angular/core';\n\nimport { Accordion, IAccordionStyling } from '@ngx-dummy/accordion-simple/index';\nimport { dummyAccordionList2, dummyAccordionList1 } from './helpers/dummy-data';\nimport { AppComponent } from './app.component';\n\n@Component({\n\tselector: 'app-root2',\n\ttemplate: `\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

{{ title }}

\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t`,\n\tstyleUrls: ['./app.component.scss'],\n})\nexport class App2Component extends AppComponent {\n\ttitle = 'Yet another Accordion Sample';\n\taccordList1$: Promise = new Promise((resolve) =>\n\t\tresolve({\n\t\t\t...dummyAccordionList2,\n\t\t\titems: [...dummyAccordionList1.items, ...dummyAccordionList2.items],\n\t\t})\n\t);\n\n\t// colors = ['red', 'blue', 'yellow', 'pink'];\n\t// randColor$ = interval(2000).pipe(\n\t// \tmap(_ => Math.floor(Math.random() * this.colors.length)),\n\t// \ttap(ind => console.log(\"Index \", ind)),\n\t// \tmap(ind => this.colors[ind] || \"#ccc\"),\n\t// \ttap(val => console.log(\"Selected color ::: \", val))\n\t// );\n\n\tstyling: IAccordionStyling = {\n\t\t...super.styling,\n\t\tbodyDblclkCloseItems: true,\n\t\titemStyling: {\n\t\t\theadBgColor: 'grey',\n\t\t\tpadding: 1,\n\t\t\theadColor: 'lightgreen',\n\t\t},\n\t};\n}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\nimport { AppComponent } from './app.component';\nimport { AccordionModule } from '@ngx-dummy/accordion-simple/accordion.module';\nimport { App2Component } from './app2.component';\n\n@NgModule({\n\timports: [BrowserAnimationsModule, AccordionModule],\n\tdeclarations: [AppComponent, App2Component],\n\tbootstrap: [AppComponent, App2Component],\n})\nexport class AppModule {}\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n\tenableProdMode();\n}\n\nsetTimeout(() => {\n\tplatformBrowserDynamic()\n\t\t.bootstrapModule(AppModule, { ngZoneEventCoalescing: true })\n\t\t.catch((err) => console.error(err));\n}, 1500);\n"]} \ No newline at end of file diff --git a/docs/main.79d8e1ce6e46de39.js b/docs/main.79d8e1ce6e46de39.js new file mode 100644 index 00000000..71f0d38a --- /dev/null +++ b/docs/main.79d8e1ce6e46de39.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkaccordion_sample=self.webpackChunkaccordion_sample||[]).push([["main"],{8198:(g,O,d)=>{var h=d(4497),t=d(3210),Z=d(9906),B=d(5802),S=d(745),R=d(6099);const v={id:"Accord_1",name:"Accordion 1",items:[{title:"Accordion Card 1",body:"[[TMPL]]"},{title:"Accordion Card 2",body:'\n\t\t\tProject Repository\n\t\t\t
\n\t\t\tSimple Angular accordion component and a simple demonstrator app; the app is a simple demonstrator project - showcasing the integration of the accordion library and applying basic setting of it.'},{title:"Accordion simple Card 3 x 11",body:"\n\t\t\t\t

Para1

\n\t\t\t\t

Heading

\n\t\t\t\t\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t],\n};\n\nexport const dummyAccordionList2: Accordion = {\n\tid: 'Accord_2',\n\tname: 'Accordion 2',\n\titems: [\n\t\t{\n\t\t\tid: 'item0',\n\t\t\ttitle: 'Card ',\n\t\t\tbody: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione',\n\t\t},\n\t\t{\n\t\t\tid: 'item1',\n\t\t\ttitle: 'Card 1',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item2',\n\t\t\ttitle: 'Card 2',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item3',\n\t\t\ttitle: 'Card 3',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item4',\n\t\t\ttitle: 'Card 4',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t\t{\n\t\t\tid: 'item5',\n\t\t\ttitle: 'Long Card 5',\n\t\t\tbody: `\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit vero quo, veritatis ex atque voluptate dolore unde quas. Veritatis doloremque optio dignissimos enim voluptatum voluptas nemo suscipit commodi. Adipisci, ratione\n `,\n\t\t},\n\t],\n};\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { trigger, transition, style, animate, keyframes } from '@angular/animations';\n\nexport const loaderIn = trigger('moveIn', [\n\ttransition(':enter', [\n\t\tstyle({ opacity: 0, transform: 'translateY(-3rem)' }),\n\t\tanimate(\n\t\t\t'1s ease-in-out',\n\t\t\tkeyframes([\n\t\t\t\tstyle({ offset: 0.2, opacity: 0.1, transform: 'translateY(-1rem)' }),\n\t\t\t\tstyle({ offset: 0.6, opacity: 0.4, transform: 'translateY(-0.1rem)' }),\n\t\t\t\tstyle({ offset: 1, opacity: 1, transform: 'none' }),\n\t\t\t])\n\t\t),\n\t]),\n]);\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Injectable, Inject, InjectionToken } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { IToggler } from './settings/';\n\nexport function iniTogglerFn() {\n\treturn [] as IToggler[];\n}\n\nexport const INI_STATE = new InjectionToken('Accordion Initial Items Open state provider token', { factory: iniTogglerFn });\n\n@Injectable()\nexport class AccordionOpenService extends BehaviorSubject {\n\tconstructor(@Inject(INI_STATE) iniState: IToggler[] = []) {\n\t\tsuper(iniState);\n\t}\n\n\tget itemsOpen$() {\n\t\treturn this.asObservable();\n\t}\n\tget itemsOpenSnapshot() {\n\t\treturn this.value;\n\t}\n\n\tsetItemsOpen = (itemsStats: IToggler[]) => this.next(itemsStats);\n\n\tclose = () => {\n\t\tthis.complete();\n\t\tsuper.unsubscribe();\n\t};\n}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { trigger, query, stagger, transition, animate, style, keyframes, state, AnimationTriggerMetadata } from '@angular/animations';\nexport { AnimationEvent as NgAnimationEvent } from '@angular/animations';\n\nexport const accordionAnimations: {\n\treadonly accordItemsIn: AnimationTriggerMetadata;\n\treadonly spinnerIn: AnimationTriggerMetadata;\n} = {\n\taccordItemsIn: trigger('accordItemsIn', [\n\t\ttransition('* => *', [\n\t\t\tquery(\n\t\t\t\t':leave',\n\t\t\t\t[\n\t\t\t\t\tstagger(-25, [\n\t\t\t\t\t\tanimate(\n\t\t\t\t\t\t\t'.3s',\n\t\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\ttransform: 'scale(0.7, 0.7) translateY(-3rem)',\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t],\n\t\t\t\t{ optional: true }\n\t\t\t),\n\t\t\tquery(\n\t\t\t\t':enter',\n\t\t\t\t[\n\t\t\t\t\tstyle({ opacity: 0, transform: 'scale(0.7, 0.7) translateY(-3rem)' }),\n\t\t\t\t\tstagger(25, [\n\t\t\t\t\t\tanimate(\n\t\t\t\t\t\t\t'.3s ease-out',\n\t\t\t\t\t\t\tkeyframes([\n\t\t\t\t\t\t\t\tstyle({ offset: 0, opacity: 0 }),\n\t\t\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\t\t\toffset: 0.2,\n\t\t\t\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t\t\t\t\ttransform: 'scale(0.85, 0.85) translateY(-4rem)',\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\t\t\toffset: 0.5,\n\t\t\t\t\t\t\t\t\topacity: 0.8,\n\t\t\t\t\t\t\t\t\ttransform: 'scale(0.9, 0.9) translateY(3rem)',\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tstyle({ offset: 1, opacity: 1, transform: 'none' }),\n\t\t\t\t\t\t\t])\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t],\n\t\t\t\t{ optional: true }\n\t\t\t),\n\t\t]),\n\t]),\n\n\tspinnerIn: trigger('spinnerIn', [\n\t\ttransition('void => *', [\n\t\t\tquery(\n\t\t\t\t'.loader',\n\t\t\t\tanimate(\n\t\t\t\t\t'.5s ease-out',\n\t\t\t\t\tkeyframes([\n\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\ttransformOrigin: 'bottom right',\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\ttransform: 'translateY(-100px) scale(0, 0)',\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\toffset: 0.8,\n\t\t\t\t\t\t\topacity: 0.6,\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\ttransform: 'translateY(40px) scale(0.5, 0.5)',\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tstyle({\n\t\t\t\t\t\t\toffset: 1,\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\theight: '*',\n\t\t\t\t\t\t\ttransform: 'translateY(0) scale(1, 1)',\n\t\t\t\t\t\t}),\n\t\t\t\t\t])\n\t\t\t\t),\n\t\t\t\t{ optional: true }\n\t\t\t),\n\t\t]),\n\t]),\n};\n\nexport const accordionItemAnimations: {\n\treadonly accordionItemBodyHeightCollapse: AnimationTriggerMetadata;\n} = {\n\taccordionItemBodyHeightCollapse: trigger('openClose', [\n\t\tstate(\n\t\t\t'closed',\n\t\t\tstyle({\n\t\t\t\theight: '0',\n\t\t\t\topacity: '0',\n\t\t\t\tvisibility: 'collapse',\n\t\t\t})\n\t\t),\n\t\tstate(\n\t\t\t'opened',\n\t\t\tstyle({\n\t\t\t\theight: '*',\n\t\t\t\topacity: '1',\n\t\t\t\tvisibility: 'visible',\n\t\t\t})\n\t\t),\n\t\ttransition('opened <=> closed', animate('.3s ease-out')),\n\t]),\n};\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { AccordionItemInternal } from './IAccordion';\n\nexport interface IToggler {\n\titemId: number;\n\tisOpen: boolean;\n}\n\nexport const pluckIToggler = ({ itemId, isOpen, ...rest }: AccordionItemInternal) => { itemId, isOpen };\nexport const pluckOpenTogglesIdsToStr = (toggles: IToggler[]): string =>\n\ttoggles\n\t\t.filter((t) => t.isOpen === true)\n\t\t.map((t) => t.itemId)\n\t\t.join(',');\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { TemplateRef, SecurityContext } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { ItemTemplateContext } from './IAccordion';\n\nexport const imgBase64ToBlob = (Base64Image: any, imageType = 'image/png') => {\n\tconst parts = Base64Image.split(';base64,');\n\tconst decodedData = window.atob(parts[1]);\n\tconst uInt8Array = new Uint8Array(decodedData.length);\n\tfor (let i = 0; i < decodedData.length; ++i) {\n\t\tuInt8Array[i] = decodedData.charCodeAt(i);\n\t}\n\treturn new Blob([uInt8Array], { type: imageType });\n};\n\nexport const svgToBase64src = (rawSvg: string) => 'data:image/svg+xml;base64,' + btoa(rawSvg);\nexport const prepRes = (item: string, sanitizer: DomSanitizer) => sanitizer.bypassSecurityTrustResourceUrl(item);\nexport const sanitizeHTML = (item: string | object | undefined, sanitizer: DomSanitizer) => !!item && sanitizer.sanitize(SecurityContext.HTML, item);\nexport const getSvgSafeRes = (file: string, sanitizer: DomSanitizer) => prepRes(svgToBase64src(file), sanitizer);\nexport const getPngSafeRes = (file: string, sanitizer: DomSanitizer) => prepRes(URL.createObjectURL(imgBase64ToBlob(file)), sanitizer);\nexport const blobToSafeRes = (blob: Blob, sanitizer: DomSanitizer) => prepRes(URL.createObjectURL(blob), sanitizer);\n\nexport const bodyWithTmpl = (item: string | ItemTemplateContext): item is ItemTemplateContext => !!item && typeof item !== 'string' && !!item.itemTemplate;\nexport const getItemBodyTemplate = (item: string | ItemTemplateContext, defaultTmpl: TemplateRef) => (!!bodyWithTmpl(item) ? item.itemTemplate : defaultTmpl);\nexport const getItemBodyCtx = (item: string | ItemTemplateContext) => (bodyWithTmpl(item) && typeof item.itemBody === 'string' ? item.itemBody : item);\n\n// export const svgToBase64srcWithBuf = (rawSvg: string) => {\n// \tlet buf = Buffer.from(rawSvg);\n// \treturn buf.toString('base64url');\n// };\n","/* eslint-disable @angular-eslint/no-host-metadata-property */\n/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { AfterContentChecked, AfterViewInit, Directive, ElementRef, HostBinding, Renderer2, NgZone } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\nimport { getSvgSafeRes } from './settings/';\nimport { arrow_down, logo_svg } from './theming/icons-base';\n\nconst l = console.log;\n\nenum ImgClasses {\n\tLOGO = 'accord-item__header--start-img',\n\tENDING = 'accord-item__header--end-img',\n}\nenum ImgLoadClass {\n\tSUCCESS = 'img-loaded__success',\n\tALTER = 'img-load__alter',\n}\n\n@Directive({\n\tselector: '.accord-item__header-img',\n\thost: {\n\t\t'(load)': 'onLoad($event)',\n\t\t'(error)': 'onError($event)',\n\t\t'[attr.loading]': '\"lazy\"',\n\t},\n})\nexport class AccordionItemImgDirective implements AfterViewInit, AfterContentChecked {\n\t@HostBinding('attr.src') get src() {\n\t\treturn this._src;\n\t}\n\n\tprivate _nativeImgEl: HTMLImageElement;\n\tprivate _src: string | SafeResourceUrl | undefined;\n\tprivate _openSign: string | SafeResourceUrl | undefined;\n\tprivate _closeSign: string | SafeResourceUrl | undefined;\n\tprivate _baseLogoImg = getSvgSafeRes(logo_svg, this.sanitizer);\n\tprivate _baseChevronImg = getSvgSafeRes(arrow_down, this.sanitizer);\n\tprivate _isSet = false;\n\tprivate _needToRecheck = false;\n\n\tconstructor(private el: ElementRef, private renderer: Renderer2, private zone: NgZone, private sanitizer: DomSanitizer) {}\n\n\tngAfterViewInit() {\n\t\tthis._nativeImgEl = this.el.nativeElement;\n\t}\n\n\tngAfterContentChecked() {\n\t\tif (this._isSet && !this._needToRecheck) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._isSet && this._needToRecheck) {\n\t\t\treturn this._doOpenCloseSrcRecheck();\n\t\t}\n\n\t\tif (this._isLogoImg()) {\n\t\t\t// this._src = this.readElDataSet('src') || this._baseLogoImg;\n\t\t\t// return this.setNoRecheck();\n\t\t\treturn this._setItemHeaderImgSafeSrc(this._readElDataSet('src') || this._baseLogoImg);\n\t\t} else if (this._isCloserImg()) {\n\t\t\tthis._openSign = this._readElDataSet('opensrc') ?? undefined;\n\t\t\tthis._closeSign = this._readElDataSet('closesrc') ?? undefined;\n\t\t\tif (!this._isImgOpenClose()) {\n\t\t\t\t// this._src = this._baseChevronImg;\n\t\t\t\t// return this.setNoRecheck();\n\t\t\t\treturn this._setItemHeaderImgSafeSrc(this._baseChevronImg);\n\t\t\t} else {\n\t\t\t\tif (this._openSign !== this._closeSign) {\n\t\t\t\t\tthis._needToRecheck = true;\n\t\t\t\t}\n\t\t\t\tthis._isSet = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tonLoad = ({ target, ...rest }: { target: HTMLImageElement; rest: any[] }) => this._setLoadSuccess(target);\n\tonError = ({ target, ...rest }: { target: HTMLImageElement; rest: any[] }) => {\n\t\tthis._setLoadAlter(target);\n\t\tif (target.classList.contains(ImgClasses.LOGO)) {\n\t\t\t// this.setItemHeaderImgSrc(target, this._baseLogoImg);\n\t\t\tthis._setItemHeaderImgSafeSrc(this._baseLogoImg);\n\t\t} else if (target.classList.contains(ImgClasses.ENDING)) {\n\t\t\t// this.setItemHeaderImgSrc(target, this._baseChevronImg);\n\t\t\tthis._setItemHeaderImgSafeSrc(this._baseChevronImg);\n\t\t} else {\n\t\t\treturn l('Not an Accordion Item header image');\n\t\t}\n\t};\n\n\tprivate _doOpenCloseSrcRecheck = () => {\n\t\tthis.zone.runOutsideAngular(() => {\n\t\t\tthis._src = this._nativeImgEl?.classList.contains('open') ? this._closeSign : this._openSign;\n\t\t});\n\t};\n\tprivate _setItemHeaderImgSrc = (imgRef: HTMLImageElement, src: string | SafeResourceUrl) => this.renderer.setAttribute(imgRef, 'src', src as string);\n\tprivate _setItemHeaderImgSafeSrc = (src: string | SafeResourceUrl) => {\n\t\tthis._src = src;\n\t\treturn this._setNoRecheck();\n\t};\n\tprivate _readElDataSet = (attr: string) => this._nativeImgEl?.dataset[attr];\n\tprivate _setLoadSuccess = (target: HTMLImageElement) => {\n\t\ttarget.classList.add(ImgLoadClass.SUCCESS);\n\t\tthis._isSet = true;\n\t};\n\tprivate _setLoadAlter = (target: HTMLImageElement) => {\n\t\ttarget.classList.add(ImgLoadClass.ALTER);\n\t\tthis._setNoRecheck();\n\t};\n\tprivate _isImgOpenClose = () => !!this._closeSign && !!(this._closeSign as string).length && !!this._openSign && !!(this._openSign as string).length;\n\tprivate _isLogoImg = () => this._nativeImgEl?.classList.contains(ImgClasses.LOGO);\n\tprivate _isCloserImg = () => this._nativeImgEl?.classList.contains(ImgClasses.ENDING);\n\tprivate _setNoRecheck = () => {\n\t\tthis._isSet = true;\n\t\tthis._needToRecheck = false;\n\t};\n}\n","/* eslint-disable max-len */\n/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nexport const logo_svg =\n\t'';\n\nexport const arrow_down =\n\t'';\n","\r\n\r\n\r\n\r\n\t
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
\r\n\r\n\r\n\t
\r\n\t\t\r\n\t\t\t\r\n\t\t\t{{ item.itemNum }}.\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t{{ item.title }}\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
\r\n
\r\n\r\n\r\n\t{{ defctx }}\r\n\t\r\n\r\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { of } from 'rxjs';\nimport { accordionItemAnimations, NgAnimationEvent } from './animations';\nimport { AccordionItemInternal, getItemBodyCtx, getItemBodyTemplate } from './settings/';\n\n@Component({\n\tselector: 'ngxd-accordion-item',\n\ttemplateUrl: './accordion-item.component.html',\n\tstyleUrls: ['./accordion-item.component.scss'],\n\tanimations: [accordionItemAnimations.accordionItemBodyHeightCollapse],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AccordionItemComponent {\n\tgetItemBodyCtx = getItemBodyCtx!;\n\tgetItemBodyTemplate = getItemBodyTemplate!;\n\tisOpen$ = of(false);\n\titem: Partial;\n\n\tstartAnim(e: NgAnimationEvent) {\n\t\t(e.element).style.willChange = 'height, opacity, visibility';\n\t\tconst classes = e.element.classList;\n\t\tif (e.fromState === 'void') {\n\t\t\tclasses?.add('closed');\n\t\t}\n\t\tif (e.fromState === 'closed' && e.toState === 'opened') {\n\t\t\tclasses.replace('closed', 'opened');\n\t\t}\n\t}\n\n\tdoneAnim(e: NgAnimationEvent) {\n\t\t(e.element).style.willChange = 'auto';\n\t\tconst classes = e.element.classList;\n\t\tif (e.fromState == 'opened' && e.toState == 'closed') {\n\t\t\tclasses.replace('opened', 'closed');\n\t\t}\n\t}\n}\n","/* eslint-disable @angular-eslint/no-host-metadata-property */\n/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Directive, ElementRef, Output, EventEmitter, AfterViewInit, Input, Renderer2, Inject, OnInit, Host, ChangeDetectorRef, OnDestroy } from '@angular/core';\n\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { Subject } from 'rxjs';\nimport { filter, tap, pluck, map, takeUntil } from 'rxjs/operators';\n\nimport { AccordionItemComponent } from './accordion-item.component';\nimport { AccordionOpenService } from './accordion-open.service';\nimport { NgAnimationEvent } from './animations';\nimport { IToggler, IAccordionItemStyling, AccordionItem, AccordionItemInternal, ItemTemplateContext, sanitizeHTML } from './settings/';\n\n@Directive({\n\tselector: '[ngxdAccordionItem]',\n\thost: {\n\t\t'[class.opened]': 'isOpen',\n\t\t'(dblclick)': 'onDblClick([$event.target, $event.currentTarget])',\n\t\t'(click)': 'onClick([$event.target, $event.currentTarget])',\n\t},\n})\nexport class AccordionItemDirective implements OnInit, AfterViewInit, OnDestroy {\n\t@Input('ngxdAccordionItem') item!: AccordionItemInternal;\n\t@Input('styling') itemStyles: IAccordionItemStyling = {\n\t\theadHeight: '50px',\n\t\theadBgColor: '#ccc',\n\t\theadColor: '#fff',\n\t\tbodyBgColor: '#fff',\n\t\tbodyColor: '#000',\n\t\tfontSize: '10px',\n\t\tbodyPadding: '0',\n\t};\n\t@Input() logo: string;\n\t@Input() openSign: string;\n\t@Input() closeSign: string;\n\t@Input() bodyDblclkClose = false;\n\t@Input() isNumbered = false;\n\t@Output() toggled: EventEmitter = new EventEmitter();\n\tisOpen = false;\n\tprivate hostDestroy$$: Subject = new Subject();\n\n\tconstructor(\n\t\t@Inject(AccordionItemComponent) private hostCmp: AccordionItemComponent,\n\t\t@Inject(ElementRef) private hostElRef: ElementRef,\n\t\t@Host() private itemStatusSvc: AccordionOpenService,\n\t\tprivate render: Renderer2,\n\t\tprivate sanitizer: DomSanitizer,\n\t\tprivate cd: ChangeDetectorRef\n\t) {}\n\n\tngOnInit() {\n\t\tthis.hostCmp.item = {\n\t\t\t...this.item,\n\t\t\tbody:\n\t\t\t\ttypeof this.item.body === 'string'\n\t\t\t\t\t? sanitizeHTML(this.item.body, this.sanitizer)\n\t\t\t\t\t: ({\n\t\t\t\t\t\t\titemTemplate: this.item.body?.itemTemplate,\n\t\t\t\t\t\t\titemBody: sanitizeHTML(this.item.body?.itemBody, this.sanitizer),\n\t\t\t\t\t } as ItemTemplateContext),\n\t\t\titemNum: this.isNumbered ? +this.item.itemId + 1 : null,\n\t\t} as Partial;\n\n\t\tthis.hostCmp.isOpen$ = this.itemStatusSvc.itemsOpen$.pipe(\n\t\t\ttakeUntil(this.hostDestroy$$),\n\t\t\tfilter((val) => !!val && !!val.length),\n\t\t\tmap((toggles: IToggler[]) => toggles.find(({ itemId }) => itemId === +this.item.itemId)!),\n\t\t\tpluck('isOpen'),\n\t\t\ttap((isOpen = false) => (this.isOpen = isOpen))\n\t\t);\n\t}\n\n\tngAfterViewInit() {\n\t\tconst nativeEl = this.hostElRef.nativeElement;\n\t\tconst itemEl = nativeEl.getElementsByClassName('accord-item').item(0) as HTMLElement;\n\t\tconst headEl = nativeEl.getElementsByClassName('accord-item__header').item(0) as HTMLElement;\n\t\tconst bodyEl = nativeEl.getElementsByClassName('accord-item__body').item(0) as HTMLElement;\n\n\t\t{\n\t\t\t/** set up the accordion item header images\\' sources */\n\t\t\tconst headElLogoImgEl = headEl.getElementsByClassName('accord-item__header--start-img').item(0) as HTMLImageElement;\n\t\t\tconst headElCloserImgEl = headEl.getElementsByClassName('accord-item__header--end-img').item(0) as HTMLImageElement;\n\t\t\tthis.logo && this.render.setAttribute(headElLogoImgEl, 'data-src', this.logo);\n\t\t\tthis.openSign && this.render.setAttribute(headElCloserImgEl, 'data-opensrc', this.openSign);\n\t\t\tthis.closeSign && this.render.setAttribute(headElCloserImgEl, 'data-closesrc', this.closeSign);\n\t\t\tthis.cd.detectChanges();\n\t\t}\n\n\t\tthis.render.setStyle(itemEl, 'margin', this.itemStyles.margin ?? '0');\n\t\tthis.render.setStyle(itemEl, 'padding', this.itemStyles.padding ?? '0');\n\t\tthis.itemStyles.font && this.render.setStyle(itemEl, 'font', this.itemStyles.font);\n\t\tthis.itemStyles.fontSize && this.render.setStyle(itemEl, 'font-size', this.itemStyles.fontSize);\n\t\tthis.itemStyles.fontStyle && this.render.setStyle(itemEl, 'font-style', this.itemStyles.fontStyle);\n\t\tthis.itemStyles.fontFamily && this.render.setStyle(itemEl, 'font-family', this.itemStyles.fontFamily);\n\t\tthis.render.setStyle(itemEl, 'margin-bottom', this.itemStyles.marginBottom);\n\t\tthis.render.setStyle(itemEl, 'margin-top', this.itemStyles.marginTop);\n\t\tthis.itemStyles.headBgColor && nativeEl.style.setProperty('--ngxd-head-item-color', this.itemStyles.headBgColor);\n\n\t\tthis.itemStyles.headHeight && this.render.setStyle(headEl, 'height', this.itemStyles.headHeight);\n\t\tthis.itemStyles.headFont && this.render.setStyle(headEl, 'font', this.itemStyles.headFont);\n\t\tthis.render.setStyle(headEl, 'font-size', this.itemStyles.headFontSize ?? '1.1rem');\n\t\tthis.render.setStyle(headEl, 'color', this.itemStyles.headColor ?? '#ccc');\n\n\t\tthis.render.setStyle(bodyEl, 'background-color', this.itemStyles.bodyBgColor ?? 'rgba(200, 200, 200, 0.2)');\n\t\tthis.render.setStyle(bodyEl, 'color', this.itemStyles.bodyColor ?? '#000');\n\t\tthis.render.setStyle(bodyEl, 'padding', this.itemStyles.bodyPadding ?? '.1rem');\n\t\tthis.render.setStyle(bodyEl, 'margin', this.itemStyles.bodyMargin ?? '0');\n\t\tthis.itemStyles.bodyFont && this.render.setStyle(bodyEl, 'font', this.itemStyles.bodyFont);\n\t\tthis.render.setStyle(bodyEl, 'font-size', this.itemStyles.bodyFontSize ?? '1rem');\n\t\tthis.itemStyles.bodyTextAlign && this.render.setStyle(bodyEl, 'text-align', this.itemStyles.bodyTextAlign);\n\n\t\tthis.render.setStyle(bodyEl, 'cursor', this.bodyDblclkClose ? 'grab' : 'default');\n\t}\n\n\tngOnDestroy() {\n\t\tthis.hostDestroy$$.next();\n\t\tthis.hostDestroy$$.complete();\n\t}\n\n\tonClick = ([{ outerHTML }, { dataset }]: [{ outerHTML: string }, { dataset: any }]) =>\n\t\t!!outerHTML && !!dataset && outerHTML.includes('header') ? this._handleClick({ ...dataset }) : void 0;\n\n\tonDblClick = ([{ outerHTML }, { dataset }]: [{ outerHTML: string }, { dataset: any }]) =>\n\t\t!!outerHTML && this.bodyDblclkClose && outerHTML.includes('accord-item__body') ? this._handleClick({ ...dataset }) : void 0;\n\n\tprivate _handleClick = ({ idx, ...rest } = { idx: -1 }) => this._toggle(+idx);\n\tprivate _toggle = (itemId: number) => this.toggled.emit({ itemId, isOpen: !this.isOpen });\n}\n","\n
\n\t \n
\n\n\n\t\n\n\n\n\t\n\n\n\n\t\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
\n
\n","/*!\r\n * @ngx-dummy/Accordion-Simple library\r\n * Simple accordion created for angular / ionic projects.\r\n * https://github.com/ngx-dummy/accordion-simple\r\n *\r\n * Copyright Vladimir Ovsyukov \r\n * Published under GNU LGPLv3 License\r\n */\r\nimport {\r\n\tComponent,\r\n\tInput,\r\n\tHostBinding,\r\n\tChangeDetectionStrategy,\r\n\tOnInit,\r\n\tSelf,\r\n\tSimpleChanges,\r\n\tOnChanges,\r\n\tOnDestroy,\r\n\tTemplateRef,\r\n\tViewChild,\r\n\tElementRef,\r\n\tRenderer2,\r\n} from '@angular/core';\r\nimport { map, filter } from 'rxjs/operators';\r\n\r\nimport { AccordionOpenService } from './accordion-open.service';\r\nimport { accordionAnimations } from './animations';\r\nimport { Accordion, IAccordionStyling, IAccordionItemStyling, IToggler, AccordionItemInternal, AccordionInternal, pluckIToggler, pluckOpenTogglesIdsToStr } from './settings/';\r\n\r\n@Component({\r\n\tselector: 'ngxd-accordion',\r\n\texportAs: 'ngxdAccordion',\r\n\ttemplateUrl: './accordion.component.html',\r\n\tstyleUrls: ['./accordion.component.scss'],\r\n\tanimations: [accordionAnimations.accordItemsIn, accordionAnimations.spinnerIn],\r\n\tviewProviders: [AccordionOpenService],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AccordionComponent implements OnInit, OnChanges, OnDestroy {\r\n\tstatic idx = 0;\r\n\t@ViewChild('defloadingTpl', { read: TemplateRef, static: true }) private defloadingTpl!: TemplateRef;\r\n\t@HostBinding('attr.data-items-opened') _openedItems: string;\r\n\t@HostBinding('attr.id') get id() {\r\n\t\treturn `${this.attributes.id}`;\r\n\t}\r\n\t@HostBinding('attr.name') get name() {\r\n\t\treturn this.attributes.name;\r\n\t}\r\n\t@Input() set accordionList(acc: Accordion) {\r\n\t\tlet [name, id] = [(!!acc && !!acc['name']?.length && acc.name) || 'Sample-Accordion', (!!acc && !!acc['id'] && acc.id) || `accordion_${++AccordionComponent.idx}`];\r\n\t\tthis._accord = Object.assign(\r\n\t\t\t{ id, name },\r\n\t\t\t{\r\n\t\t\t\titems: acc?.items.map(\r\n\t\t\t\t\t(item, i) =>\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...item,\r\n\t\t\t\t\t\t\tid: !!item.id && typeof item.id === 'string' ? item.id : `${id}__accord-item_${i}`,\r\n\t\t\t\t\t\t\titemId: i,\r\n\t\t\t\t\t\t}\r\n\t\t\t\t),\r\n\t\t\t}\r\n\t\t) as AccordionInternal;\r\n\t}\r\n\tget accordionItems(): AccordionItemInternal[] {\r\n\t\treturn this._accord?.items;\r\n\t}\r\n\t@Input() openSign: string;\r\n\t@Input() closeSign: string;\r\n\t@Input() listLogo: string;\r\n\t@Input() accordionStyling: IAccordionStyling = {\r\n\t\tnumberedItems: false,\r\n\t\tisMultiShow: false,\r\n\t\tbodyDblclkCloseItems: false,\r\n\t\tmaxWidth: '100%',\r\n\t\titemsGuts: '1rem',\r\n\t\tmargin: '0',\r\n\t\titemStyling: {\r\n\t\t\theadBgColor: '#4197b2',\r\n\t\t\theadColor: '#fff',\r\n\t\t\tbodyBgColor: '#fff',\r\n\t\t\tbodyColor: '#000',\r\n\t\t\tmargin: '0',\r\n\t\t\tpadding: '0',\r\n\t\t},\r\n\t};\r\n\t@Input() set loadingTpl(val: TemplateRef) {\r\n\t\tthis._loadingTpl = val || this.defloadingTpl;\r\n\t}\r\n\tget loadingTpl(): TemplateRef {\r\n\t\treturn this._loadingTpl ?? this.defloadingTpl;\r\n\t}\r\n\t_bodyDblclkClose = false;\r\n\t_itemStyle: IAccordionItemStyling;\r\n\t_isNumbered = false;\r\n\r\n\tprivate _loadingTpl: TemplateRef;\r\n\tprivate _accord: AccordionInternal;\r\n\tprivate multiSelect = false;\r\n\r\n\tconstructor(@Self() private itemsOpenSvc: AccordionOpenService, private hostEl: ElementRef, private renderer: Renderer2) {}\r\n\r\n\tngOnInit() {\r\n\t\tthis._bodyDblclkClose = !!this.accordionStyling.bodyDblclkCloseItems ?? false;\r\n\t\tthis.multiSelect = !!this.accordionStyling.isMultiShow ?? false;\r\n\t\tthis.itemsOpenSvc.itemsOpen$\r\n\t\t\t.pipe(\r\n\t\t\t\tfilter((val) => !!val?.length),\r\n\t\t\t\tmap(pluckOpenTogglesIdsToStr)\r\n\t\t\t)\r\n\t\t\t.subscribe((ids) => (this._openedItems = ids));\r\n\r\n\t\tthis._isNumbered = this.accordionStyling.numberedItems ?? false;\r\n\t\tthis._bodyDblclkClose = this.accordionStyling.bodyDblclkCloseItems ?? false;\r\n\r\n\t\tlet itemStyles: IAccordionItemStyling = Array.isArray(this.accordionStyling.itemStyling)\r\n\t\t\t? this.accordionStyling.itemStyling.reduce((accu = {}, curr) => ({ ...accu, ...curr }))\r\n\t\t\t: { ...this.accordionStyling.itemStyling };\r\n\r\n\t\tconst itemsGuts = this.accordionStyling.itemsGuts ?? 0;\r\n\t\titemStyles = {\r\n\t\t\tpadding: '0',\r\n\t\t\tmarginBottom: itemsGuts,\r\n\t\t\tmarginTop: itemsGuts,\r\n\t\t\t...itemStyles,\r\n\t\t};\r\n\t\tthis._itemStyle = Object.entries(itemStyles)\r\n\t\t\t.map(([key, val]) => ({\r\n\t\t\t\t[key]: typeof val === 'number' ? `${val}px` : val,\r\n\t\t\t}))\r\n\t\t\t.reduce((accu, val) => ({ ...accu, ...val }));\r\n\r\n\t\tconst accordEl = this.hostEl.nativeElement;\r\n\t\tthis.renderer.setStyle(accordEl, 'max-width', this.accordionStyling.maxWidth ?? '100%');\r\n\t\tthis.renderer.setStyle(accordEl, 'margin', this.accordionStyling.margin ?? '0');\r\n\t}\r\n\r\n\tngOnChanges(changes: SimpleChanges) {\r\n\t\tObject.keys(changes).forEach((prop) => {\r\n\t\t\tif (prop === 'accordionList' && changes[prop].previousValue !== changes[prop].currentValue) this.itemsOpenSvc.setItemsOpen(this.accordionItems?.map(pluckIToggler));\r\n\t\t});\r\n\t}\r\n\r\n\tngOnDestroy() {\r\n\t\tthis.itemsOpenSvc.close();\r\n\t}\r\n\r\n\tonItemToggled = ({ itemId, isOpen }: IToggler = { itemId: 0, isOpen: false }) =>\r\n\t\tthis.itemsOpenSvc.setItemsOpen(\r\n\t\t\tthis.itemsOpenSvc.itemsOpenSnapshot.map(\r\n\t\t\t\t({ itemId: eId, isOpen: opened }) =>\r\n\t\t\t\t\t(eId === +itemId\r\n\t\t\t\t\t\t? { itemId, isOpen }\r\n\t\t\t\t\t\t: {\r\n\t\t\t\t\t\t\t\titemId: eId,\r\n\t\t\t\t\t\t\t\tisOpen: this.multiSelect ? opened : false,\r\n\t\t\t\t\t\t }) as IToggler\r\n\t\t\t)\r\n\t\t);\r\n\r\n\tpublic closeAll = () => this.accordionItems?.forEach(({ itemId, ...rest }) => this.onItemToggled({ itemId, isOpen: false }));\r\n\r\n\tpublic trackByFn = (_ind: number, { itemId, ...rest }: any) => +itemId;\r\n\r\n\tprivate get attributes(): Partial {\r\n\t\tconst { id, name } = this._accord;\r\n\t\treturn { id, name };\r\n\t}\r\n}\r\n","\n
\n\t
\n\t\t
\n\t\t\t

{{ title }}

\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n\n\n\t\n\t
\n\t\t\n\t
\n
\n\n\n\t\n\t\n\t\t
\n\t\t\t
\n\t\t\t\t
Custom templated Item sample
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

by Vladimir Ovsyukov

\n\t\t\t\t\t\t\t
https://github.com/VovanSuper
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\tfavorite\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tshare\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t
\n
\n\n\n\t\n\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\tSample Accordion Item (alike one of materializecss)\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSimple material template Card\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tshare\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t

{{ ctxcontent }}

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n
\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Component, ViewChild, TemplateRef, OnInit, AfterViewInit } from '@angular/core';\nimport { delay } from 'rxjs/operators';\nimport { of } from 'rxjs';\nimport { MDCRipple } from '@material/ripple';\n\nimport { IAccordionStyling, Accordion } from '@ngx-dummy/accordion-simple/settings';\nimport { dummyAccordionList1 as list1, dummyAccordionList2 } from './helpers/dummy-data';\nimport { loaderIn } from './loader.anim';\n\n@Component({\n\tselector: 'app-root',\n\tanimations: [loaderIn],\n\ttemplateUrl: './app.component.html',\n\tstyleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit, AfterViewInit {\n\t@ViewChild('simpleBodyTmpl', { static: true }) simpleBodyTmpl: TemplateRef;\n\t@ViewChild('tmpl2', { static: true }) tmpl2: TemplateRef;\n\ttitle = 'Accordion Sample';\n\taccordList2: Accordion = null;\n\taccordList$ = of(dummyAccordionList2).pipe(delay(3000));\n\n\tstyling: IAccordionStyling = {\n\t\titemsGuts: '.1rem',\n\t\tmaxWidth: '99%',\n\t\tmargin: '.1rem',\n\t\tnumberedItems: true,\n\t\titemStyling: {\n\t\t\theadBgColor: '#89a',\n\t\t\theadColor: '#fff',\n\t\t\tmargin: '.1rem',\n\t\t\tbodyPadding: '1rem',\n\t\t\tbodyMargin: 1,\n\t\t},\n\t};\n\n\tstyling1: IAccordionStyling = {\n\t\t...this.styling,\n\t\titemsGuts: 0,\n\t\tnumberedItems: false,\n\t\tmargin: '0 auto',\n\t\tisMultiShow: true,\n\t\tmaxWidth: '94%',\n\t\tbodyDblclkCloseItems: true,\n\n\t\titemStyling: {\n\t\t\t...this.styling.itemStyling,\n\t\t\theadBgColor: 'darkcyan',\n\t\t\theadColor: 'yellow',\n\t\t\tbodyColor: '#aaffff',\n\t\t\tbodyBgColor: '#87a3d1',\n\t\t\tfont: 'Comic Sans MS',\n\t\t\tbodyPadding: 1,\n\t\t\tbodyMargin: 0,\n\t\t\tbodyTextAlign: 'left',\n\t\t\tmargin: 0,\n\t\t},\n\t};\n\n\tngOnInit() {\n\t\tthis.accordList2 = {\n\t\t\t...list1,\n\t\t\titems: [\n\t\t\t\t...list1.items\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\titem.title.includes('Accordion Card 2')\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\t\t\t\titemTemplate: this.simpleBodyTmpl,\n\t\t\t\t\t\t\t\t\t\titemBody: item.body,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { ...item }\n\t\t\t\t\t)\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\titem.title.includes('Accordion Card 1')\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\t\t\t\titemTemplate: this.tmpl2,\n\t\t\t\t\t\t\t\t\t\titemBody: 'Lorem ipsum card ...',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { ...item }\n\t\t\t\t\t),\n\t\t\t],\n\t\t};\n\t}\n\n\tngAfterViewInit() {\n\t\tconst btnRipple = document.querySelector('.mdc-button');\n\t\tconst ripple = new MDCRipple(btnRipple);\n\t\treturn () => ripple.destroy();\n\t}\n}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './accordion-item.component';\nimport { AccordionItemDirective } from './accordion-item.directive';\nimport { AccordionItemImgDirective } from './accordion-item-img.directive';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n\timports: [CommonModule, HttpClientModule],\n\tdeclarations: [AccordionComponent, AccordionItemComponent, AccordionItemDirective, AccordionItemImgDirective],\n\texports: [AccordionComponent],\n})\nexport class AccordionModule {}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { Component } from '@angular/core';\n\nimport { Accordion, IAccordionStyling } from '@ngx-dummy/accordion-simple/index';\nimport { dummyAccordionList2, dummyAccordionList1 } from './helpers/dummy-data';\nimport { AppComponent } from './app.component';\n\n@Component({\n\tselector: 'app-root2',\n\ttemplate: `\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

{{ title }}

\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t`,\n\tstyleUrls: ['./app.component.scss'],\n})\nexport class App2Component extends AppComponent {\n\ttitle = 'Yet another Accordion Sample';\n\taccordList1$: Promise = new Promise((resolve) =>\n\t\tresolve({\n\t\t\t...dummyAccordionList2,\n\t\t\titems: [...dummyAccordionList1.items, ...dummyAccordionList2.items],\n\t\t})\n\t);\n\n\t// colors = ['red', 'blue', 'yellow', 'pink'];\n\t// randColor$ = interval(2000).pipe(\n\t// \tmap(_ => Math.floor(Math.random() * this.colors.length)),\n\t// \ttap(ind => console.log(\"Index \", ind)),\n\t// \tmap(ind => this.colors[ind] || \"#ccc\"),\n\t// \ttap(val => console.log(\"Selected color ::: \", val))\n\t// );\n\n\tstyling: IAccordionStyling = {\n\t\t...super.styling,\n\t\tbodyDblclkCloseItems: true,\n\t\titemStyling: {\n\t\t\theadBgColor: 'grey',\n\t\t\tpadding: 1,\n\t\t\theadColor: 'lightgreen',\n\t\t},\n\t};\n}\n","/*!\n * @ngx-dummy/Accordion-Simple library\n * Simple accordion created for angular / ionic projects.\n * https://github.com/ngx-dummy/accordion-simple\n *\n * Copyright Vladimir Ovsyukov \n * Published under GNU LGPLv3 License\n */\nimport { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\nimport { AppComponent } from './app.component';\nimport { AccordionModule } from '@ngx-dummy/accordion-simple/accordion.module';\nimport { App2Component } from './app2.component';\n\n@NgModule({\n\timports: [BrowserAnimationsModule, AccordionModule],\n\tdeclarations: [AppComponent, App2Component],\n\tbootstrap: [AppComponent, App2Component],\n})\nexport class AppModule {}\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n\tenableProdMode();\n}\n\nsetTimeout(() => {\n\tplatformBrowserDynamic()\n\t\t.bootstrapModule(AppModule, { ngZoneEventCoalescing: true })\n\t\t.catch((err) => console.error(err));\n}, 1500);\n"]} \ No newline at end of file diff --git a/docs/scripts.5a3a491caa7667d2.js b/docs/scripts.5a3a491caa7667d2.js new file mode 100644 index 00000000..abc82e20 --- /dev/null +++ b/docs/scripts.5a3a491caa7667d2.js @@ -0,0 +1,2 @@ +(function(r,c){var e,o,a,n,i;(function(e,o,a,s){var t=o.createElement("script");function n(){dataLayer.push(arguments)}t.async=1,t.src="https://www.googletagmanager.com/gtag/js?id=G-0G4LK2LFGZ",e.dataLayer=e.dataLayer||[],n("js",new Date),n("config","G-0G4LK2LFGZ"),n("config","G-EWVJVMTQHK")})(r=r||window,c=c||document),o=c,a="script",(e=r).ym=e.ym||function(){(e.ym.a=e.ym.a||[]).push(arguments)},e.ym.l=1*new Date,n=o.createElement(a),i=o.getElementsByTagName(a)[0],n.async=1,n.src="https://mc.yandex.ru/metrika/tag.js",i.parentNode.insertBefore(n,i),ym(67019512,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0})})(window,document),function(){function r(e){e.open=!e.open}window.addEventListener("DOMContentLoaded",function(e){const o=function c(){return new Swiper(".swiper-container",{effect:"flip",grabCursor:!0,allowTouchMove:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})}(),a=window.mdc.topAppBar?.MDCTopAppBar,s=window.mdc.drawer.MDCDrawer,t=window.mdc.list.MDCList,n=window.mdc.menu.MDCMenu,i=document.getElementById("forward"),m=document.getElementById("nav-to-docs"),w=document.getElementById("back"),p=s.attachTo(document.querySelector(".mdc-drawer")),u=new n(document.querySelector(".mdc-menu"));u.setFixedPosition(!0),u.setAnchorElement(vert_menu_opener),vert_menu_opener.addEventListener("click",d=>{u.open=!u.open}),i.addEventListener("click",d=>{d.preventDefault(),o.slideNext(),r(p)}),w.addEventListener("click",d=>{d.preventDefault(),o.slidePrev(),r(p)}),m.addEventListener("click",d=>{o.slideTo(o.slides.length-1,2e3)});const l=a?.attachTo(document.getElementById("app-bar"));l?.setScrollTarget(document.getElementById("main-content")),t.attachTo(document.querySelector(".mdc-list")).wrapFocus=!0,l?.listen("MDCTopAppBar:nav",()=>{r(p)})})}(); +//# sourceMappingURL=scripts.5a3a491caa7667d2.js.map \ No newline at end of file diff --git a/docs/scripts.99b81ef0cc4f5a4a.js.map b/docs/scripts.5a3a491caa7667d2.js.map similarity index 52% rename from docs/scripts.99b81ef0cc4f5a4a.js.map rename to docs/scripts.5a3a491caa7667d2.js.map index b489c471..7d422f4b 100644 --- a/docs/scripts.99b81ef0cc4f5a4a.js.map +++ b/docs/scripts.5a3a491caa7667d2.js.map @@ -1 +1 @@ -{"version":3,"file":"scripts.99b81ef0cc4f5a4a.js","mappings":"CAAA,cAmBA,eAfA,kBACA,sBAYE,UARF,aACAA,0BAJAC,UACAA,MAUE,2DATFC,4BAKAC,iBAEAA,2BACAA,4BAZA,CAHAC,YACAC,eAiBAC,EAQED,EARFE,EAQE,UARFL,EAQEE,GAPF,GACAF,MACA,YACAA,oCAEAA,kBACAC,oEACE,sCADFK,+BAGAC,oBACAC,YACAC,cACAC,0BAhCA,CAkCCC,iBChCD,WAsDA,cACAX,eAtDAW,uDACA,QAuDA,aACA,uCACAC,cACAC,cACAC,kBACAC,YACAC,6BACAC,gCA9DAd,GAaAE,oCACAa,8BACAnB,0BACAE,0BAGAK,qCACAa,yCACAC,kCACAC,oDACAC,6CACAA,uBACAA,qCACAC,8CACAD,iBAEAhB,+BACAkB,mBACApB,cACAF,OAEAkB,+BACAI,mBACApB,cACAF,OAEAiB,+BAEAf,mCAGA,uDACAqB,2DACA1B,gDACA2B,aACAD,iCACAvB,SAnDA","names":["dataLayer","t","e","n","r","c","o","a","i","ym","clickmap","trackLinks","accurateTrackBounce","window","effect","grabCursor","allowTouchMove","navigation","nextEl","prevEl","s","m","w","p","u","vert_menu_opener","d","l","wrapFocus"],"sourceRoot":"webpack:///","sources":["src\\analytics.js","src\\loading.js"],"sourcesContent":["(function (w, d) {\r\n\tw = w || window;\r\n\td = d || document;\r\n\t// \r\n\t(function (w, d, t, u) {\r\n\t\tvar s = d.createElement(t);\r\n\t\ts.async = 1;\r\n\t\ts.src = u;\r\n\t\tw.dataLayer = w.dataLayer || [];\r\n\t\tfunction gtag() {\r\n\t\t\tdataLayer.push(arguments);\r\n\t\t}\r\n\r\n\t\tgtag('js', new Date());\r\n\r\n\t\tgtag('config', 'G-0G4LK2LFGZ');\r\n\t\tgtag('config', 'G-EWVJVMTQHK');\r\n\t})(w, d, 'script', 'https://www.googletagmanager.com/gtag/js?id=G-0G4LK2LFGZ');\r\n\t// \r\n\t(function (m, e, t, r, i, k, a) {\r\n\t\tm[i] =\r\n\t\t\tm[i] ||\r\n\t\t\tfunction () {\r\n\t\t\t\t(m[i].a = m[i].a || []).push(arguments);\r\n\t\t\t};\r\n\t\tm[i].l = 1 * new Date();\r\n\t\t(k = e.createElement(t)), (a = e.getElementsByTagName(t)[0]), (k.async = 1), (k.src = r), a.parentNode.insertBefore(k, a);\r\n\t})(w, d, 'script', 'https://mc.yandex.ru/metrika/tag.js', 'ym');\r\n\r\n\tym(67019512, 'init', {\r\n\t\tclickmap: true,\r\n\t\ttrackLinks: true,\r\n\t\taccurateTrackBounce: true,\r\n\t});\r\n})(window, document);\r\n","//** Sample Loading */\r\n\r\n(function () {\r\n\twindow.addEventListener('DOMContentLoaded', function (e) {\r\n\t\tconst swiper = initSwiper();\r\n\t\t// setTimeout(function() {\r\n\t\t// let app = document.getElementById('app1');\r\n\t\t// let app2Container = document.getElementById('app2Container');\r\n\t\t// let app3Container = document.getElementById('app3Container');\r\n\t\t// let clone = app.cloneNode(true);\r\n\t\t// let clone2 = app.cloneNode(true);\r\n\r\n\t\t// clone.id = 'app2'\r\n\t\t// clone2.id = 'app3'\r\n\t\t// app2Container.appendChild(clone);\r\n\t\t// app3Container.appendChild(clone2);\r\n\t\t// }, 2000);\r\n\t\tconst MDCTopAppBar = window.mdc.topAppBar.MDCTopAppBar;\r\n\t\tconst MDCDrawer = window.mdc.drawer.MDCDrawer;\r\n\t\tconst MDCList = window.mdc.list.MDCList;\r\n\t\tconst MDCMenu = window.mdc.menu.MDCMenu;\r\n\r\n\t\t// const vert_menu_opener = document.getElementById('vert_menu_opener');`\r\n\t\tconst forwardBtn = document.getElementById('forward');\r\n\t\tconst navToDocs = document.getElementById('nav-to-docs');\r\n\t\tconst backBtn = document.getElementById('back');\r\n\t\tconst drawer = MDCDrawer.attachTo(document.querySelector('.mdc-drawer'));\r\n\t\tconst menu = new MDCMenu(document.querySelector('.mdc-menu'));\r\n\t\tmenu.setFixedPosition(true);\r\n\t\tmenu.setAnchorElement(vert_menu_opener);\r\n\t\tvert_menu_opener.addEventListener('click', (e) => {\r\n\t\t\tmenu.open = !!!menu.open;\r\n\t\t});\r\n\t\tforwardBtn.addEventListener('click', (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tswiper.slideNext();\r\n\t\t\ttoggleDrawer(drawer);\r\n\t\t});\r\n\t\tbackBtn.addEventListener('click', (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tswiper.slidePrev();\r\n\t\t\ttoggleDrawer(drawer);\r\n\t\t});\r\n\t\tnavToDocs.addEventListener('click', (e) => {\r\n\t\t\t// e.preventDefault();\r\n\t\t\tswiper.slideTo(swiper.slides.length - 1, 2000);\r\n\t\t});\r\n\r\n\t\tconst topAppBar = MDCTopAppBar.attachTo(document.getElementById('app-bar'));\r\n\t\ttopAppBar.setScrollTarget(document.getElementById('main-content'));\r\n\t\tconst list = MDCList.attachTo(document.querySelector('.mdc-list'));\r\n\t\tlist.wrapFocus = true;\r\n\t\ttopAppBar.listen('MDCTopAppBar:nav', () => {\r\n\t\t\ttoggleDrawer(drawer);\r\n\t\t});\r\n\t});\r\n\tfunction toggleDrawer(drawer) {\r\n\t\tdrawer.open = !drawer.open;\r\n\t}\r\n\tfunction initSwiper() {\r\n\t\treturn new Swiper('.swiper-container', {\r\n\t\t\teffect: 'flip',\r\n\t\t\tgrabCursor: true,\r\n\t\t\tallowTouchMove: true,\r\n\t\t\tnavigation: {\r\n\t\t\t\tnextEl: '.swiper-button-next',\r\n\t\t\t\tprevEl: '.swiper-button-prev',\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n})();\r\n"]} \ No newline at end of file +{"version":3,"file":"scripts.5a3a491caa7667d2.js","mappings":"CAAA,cAmBA,eAfA,kBACA,sBAYE,UARF,aACAA,0BAJAC,UACAA,MAUE,2DATFC,4BAKAC,iBAEAA,2BACAA,4BAZA,CAHAC,YACAC,eAiBAC,EAQED,EARFE,EAQE,UARFL,EAQEE,GAPF,GACAF,MACA,YACAA,oCAEAA,kBACAC,oEACE,sCADFK,+BAGAC,oBACAC,YACAC,cACAC,0BAhCA,CAkCCC,iBChCD,WAsDA,cACAX,eAtDAW,uDACA,QAuDA,aACA,uCACAC,cACAC,cACAC,kBACAC,YACAC,6BACAC,gCA9DAd,GAaAE,qCACAa,8BACAnB,0BACAE,0BAGAK,qCACAa,yCACAC,kCACAC,oDACAC,6CACAA,uBACAA,qCACAC,8CACAD,iBAEAhB,+BACAkB,mBACApB,cACAF,OAEAkB,+BACAI,mBACApB,cACAF,OAEAiB,+BAEAf,mCAGA,wDACAqB,4DACA1B,gDACA2B,aACAD,kCACAvB,SAnDA","names":["dataLayer","t","e","n","r","c","o","a","i","ym","clickmap","trackLinks","accurateTrackBounce","window","effect","grabCursor","allowTouchMove","navigation","nextEl","prevEl","s","m","w","p","u","vert_menu_opener","d","l","wrapFocus"],"sourceRoot":"webpack:///","sources":["src\\analytics.js","src\\loading.js"],"sourcesContent":["(function (w, d) {\r\n\tw = w || window;\r\n\td = d || document;\r\n\t// \r\n\t(function (w, d, t, u) {\r\n\t\tvar s = d.createElement(t);\r\n\t\ts.async = 1;\r\n\t\ts.src = u;\r\n\t\tw.dataLayer = w.dataLayer || [];\r\n\t\tfunction gtag() {\r\n\t\t\tdataLayer.push(arguments);\r\n\t\t}\r\n\r\n\t\tgtag('js', new Date());\r\n\r\n\t\tgtag('config', 'G-0G4LK2LFGZ');\r\n\t\tgtag('config', 'G-EWVJVMTQHK');\r\n\t})(w, d, 'script', 'https://www.googletagmanager.com/gtag/js?id=G-0G4LK2LFGZ');\r\n\t// \r\n\t(function (m, e, t, r, i, k, a) {\r\n\t\tm[i] =\r\n\t\t\tm[i] ||\r\n\t\t\tfunction () {\r\n\t\t\t\t(m[i].a = m[i].a || []).push(arguments);\r\n\t\t\t};\r\n\t\tm[i].l = 1 * new Date();\r\n\t\t(k = e.createElement(t)), (a = e.getElementsByTagName(t)[0]), (k.async = 1), (k.src = r), a.parentNode.insertBefore(k, a);\r\n\t})(w, d, 'script', 'https://mc.yandex.ru/metrika/tag.js', 'ym');\r\n\r\n\tym(67019512, 'init', {\r\n\t\tclickmap: true,\r\n\t\ttrackLinks: true,\r\n\t\taccurateTrackBounce: true,\r\n\t});\r\n})(window, document);\r\n","//** Sample Loading */\r\n\r\n(function () {\r\n\twindow.addEventListener('DOMContentLoaded', function (e) {\r\n\t\tconst swiper = initSwiper();\r\n\t\t// setTimeout(function() {\r\n\t\t// let app = document.getElementById('app1');\r\n\t\t// let app2Container = document.getElementById('app2Container');\r\n\t\t// let app3Container = document.getElementById('app3Container');\r\n\t\t// let clone = app.cloneNode(true);\r\n\t\t// let clone2 = app.cloneNode(true);\r\n\r\n\t\t// clone.id = 'app2'\r\n\t\t// clone2.id = 'app3'\r\n\t\t// app2Container.appendChild(clone);\r\n\t\t// app3Container.appendChild(clone2);\r\n\t\t// }, 2000);\r\n\t\tconst MDCTopAppBar = window.mdc.topAppBar?.MDCTopAppBar;\r\n\t\tconst MDCDrawer = window.mdc.drawer.MDCDrawer;\r\n\t\tconst MDCList = window.mdc.list.MDCList;\r\n\t\tconst MDCMenu = window.mdc.menu.MDCMenu;\r\n\r\n\t\t// const vert_menu_opener = document.getElementById('vert_menu_opener');`\r\n\t\tconst forwardBtn = document.getElementById('forward');\r\n\t\tconst navToDocs = document.getElementById('nav-to-docs');\r\n\t\tconst backBtn = document.getElementById('back');\r\n\t\tconst drawer = MDCDrawer.attachTo(document.querySelector('.mdc-drawer'));\r\n\t\tconst menu = new MDCMenu(document.querySelector('.mdc-menu'));\r\n\t\tmenu.setFixedPosition(true);\r\n\t\tmenu.setAnchorElement(vert_menu_opener);\r\n\t\tvert_menu_opener.addEventListener('click', (e) => {\r\n\t\t\tmenu.open = !!!menu.open;\r\n\t\t});\r\n\t\tforwardBtn.addEventListener('click', (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tswiper.slideNext();\r\n\t\t\ttoggleDrawer(drawer);\r\n\t\t});\r\n\t\tbackBtn.addEventListener('click', (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\tswiper.slidePrev();\r\n\t\t\ttoggleDrawer(drawer);\r\n\t\t});\r\n\t\tnavToDocs.addEventListener('click', (e) => {\r\n\t\t\t// e.preventDefault();\r\n\t\t\tswiper.slideTo(swiper.slides.length - 1, 2000);\r\n\t\t});\r\n\r\n\t\tconst topAppBar = MDCTopAppBar?.attachTo(document.getElementById('app-bar'));\r\n\t\ttopAppBar?.setScrollTarget(document.getElementById('main-content'));\r\n\t\tconst list = MDCList.attachTo(document.querySelector('.mdc-list'));\r\n\t\tlist.wrapFocus = true;\r\n\t\ttopAppBar?.listen('MDCTopAppBar:nav', () => {\r\n\t\t\ttoggleDrawer(drawer);\r\n\t\t});\r\n\t});\r\n\tfunction toggleDrawer(drawer) {\r\n\t\tdrawer.open = !drawer.open;\r\n\t}\r\n\tfunction initSwiper() {\r\n\t\treturn new Swiper('.swiper-container', {\r\n\t\t\teffect: 'flip',\r\n\t\t\tgrabCursor: true,\r\n\t\t\tallowTouchMove: true,\r\n\t\t\tnavigation: {\r\n\t\t\t\tnextEl: '.swiper-button-next',\r\n\t\t\t\tprevEl: '.swiper-button-prev',\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n})();\r\n"]} \ No newline at end of file diff --git a/docs/scripts.99b81ef0cc4f5a4a.js b/docs/scripts.99b81ef0cc4f5a4a.js deleted file mode 100644 index f6120a88..00000000 --- a/docs/scripts.99b81ef0cc4f5a4a.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(r,c){var e,o,a,n,i;(function(e,o,a,s){var t=o.createElement("script");function n(){dataLayer.push(arguments)}t.async=1,t.src="https://www.googletagmanager.com/gtag/js?id=G-0G4LK2LFGZ",e.dataLayer=e.dataLayer||[],n("js",new Date),n("config","G-0G4LK2LFGZ"),n("config","G-EWVJVMTQHK")})(r=r||window,c=c||document),o=c,a="script",(e=r).ym=e.ym||function(){(e.ym.a=e.ym.a||[]).push(arguments)},e.ym.l=1*new Date,n=o.createElement(a),i=o.getElementsByTagName(a)[0],n.async=1,n.src="https://mc.yandex.ru/metrika/tag.js",i.parentNode.insertBefore(n,i),ym(67019512,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0})})(window,document),function(){function r(e){e.open=!e.open}window.addEventListener("DOMContentLoaded",function(e){const o=function c(){return new Swiper(".swiper-container",{effect:"flip",grabCursor:!0,allowTouchMove:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})}(),a=window.mdc.topAppBar.MDCTopAppBar,s=window.mdc.drawer.MDCDrawer,t=window.mdc.list.MDCList,n=window.mdc.menu.MDCMenu,i=document.getElementById("forward"),m=document.getElementById("nav-to-docs"),w=document.getElementById("back"),p=s.attachTo(document.querySelector(".mdc-drawer")),u=new n(document.querySelector(".mdc-menu"));u.setFixedPosition(!0),u.setAnchorElement(vert_menu_opener),vert_menu_opener.addEventListener("click",d=>{u.open=!u.open}),i.addEventListener("click",d=>{d.preventDefault(),o.slideNext(),r(p)}),w.addEventListener("click",d=>{d.preventDefault(),o.slidePrev(),r(p)}),m.addEventListener("click",d=>{o.slideTo(o.slides.length-1,2e3)});const l=a.attachTo(document.getElementById("app-bar"));l.setScrollTarget(document.getElementById("main-content")),t.attachTo(document.querySelector(".mdc-list")).wrapFocus=!0,l.listen("MDCTopAppBar:nav",()=>{r(p)})})}(); -//# sourceMappingURL=scripts.99b81ef0cc4f5a4a.js.map \ No newline at end of file diff --git a/docs/typedocs/classes/AccordionComponent.html b/docs/typedocs/classes/AccordionComponent.html index e28cda6d..7203a876 100644 --- a/docs/typedocs/classes/AccordionComponent.html +++ b/docs/typedocs/classes/AccordionComponent.html @@ -84,47 +84,47 @@

Properties

_bodyDblclkClose: boolean = false
+
  • Defined in lib/accordion.component.ts:93
  • _isNumbered: boolean = false
    +
  • Defined in lib/accordion.component.ts:95
  • +
  • Defined in lib/accordion.component.ts:94
  • _openedItems: string
    +
  • Defined in lib/accordion.component.ts:42
  • accordionStyling: IAccordionStyling = ...
    +
  • Defined in lib/accordion.component.ts:71
  • closeSign: string
    +
  • Defined in lib/accordion.component.ts:69
  • listLogo: string
    +
  • Defined in lib/accordion.component.ts:70
  • openSign: string
    +
  • Defined in lib/accordion.component.ts:68
  • idx: number = 0
    +
  • Defined in lib/accordion.component.ts:40
  • Accessors

    diff --git a/docs/typedocs/index.html b/docs/typedocs/index.html index c55bd231..74cee183 100644 --- a/docs/typedocs/index.html +++ b/docs/typedocs/index.html @@ -130,7 +130,7 @@

    Documentation

    Select Simple -https://github.com/ngx-dummy/select-simple +https://www.npmjs.com/package/@ngx-dummy/select-simple diff --git a/docs/typedocs/interfaces/Accordion.html b/docs/typedocs/interfaces/Accordion.html index c59285d8..02fce49f 100644 --- a/docs/typedocs/interfaces/Accordion.html +++ b/docs/typedocs/interfaces/Accordion.html @@ -48,7 +48,7 @@

    Description

    (Optional) Id property of accordion components. Would be

    Property

    Could be omitted (in the case id attribute would be set by AccordionComponent itself)

    +
  • Defined in lib/settings/IAccordion.ts:29
  • items: AccordionItem[]
    @@ -65,7 +65,7 @@

    Member

    items[].body bo

    +
  • Defined in lib/settings/IAccordion.ts:56
  • name?: string
    @@ -75,7 +75,7 @@

    Description

    (Optional) Name property of accordion components. Would b

    Property

    Could be omitted (in the case name attribute would be set by AccordionComponent itself)

    +
  • Defined in lib/settings/IAccordion.ts:39
  • +
  • Defined in lib/settings/IAccordion.ts:66
  • title: string
    @@ -67,7 +67,7 @@
    +
  • Defined in lib/settings/IAccordion.ts:68
  • +
  • Defined in lib/settings/IAccordion.ts:56
  • +
  • Defined in lib/settings/IAccordionStylings.ts:31
  • itemsGuts?: string | number

    defines margins between accordion elements

    +
  • Defined in lib/settings/IAccordionStylings.ts:27
  • margin?: string | number

    defines margin styles within accordion elements

    +
  • Defined in lib/settings/IAccordionStylings.ts:29
  • maxWidth?: string | number

    max-width css style for accordion element

    +
  • Defined in lib/settings/IAccordionStylings.ts:19
  • numberedItems?: boolean

    defines whether every accordion item element for particular accordion component should be numbered (have numbers in header element)

    +
  • Defined in lib/settings/IAccordionStylings.ts:21
  • +
  • Defined in lib/settings/IAccordionStylings.ts:39