Sha256: 4450014d84747d5cd30849390e156b321605154f426175878c202354e8f9d820

Contents?: true

Size: 1.01 KB

Versions: 66

Compression:

Stored size: 1.01 KB

Contents

import {Controller} from '@hotwired/stimulus'

export default class SlideoverComponent extends Controller {
  static targets = ['expandable', 'expandWrapper', 'slidePanel', 'buttonWrapper']

  declare readonly expandableTarget: HTMLDivElement
  declare readonly expandWrapperTarget: HTMLDivElement
  declare readonly slidePanelTargets: [HTMLDivElement]
  declare readonly buttonWrapperTarget: HTMLDivElement

  toggle() {
    this.expandableTarget.classList.toggle('ariadne-hidden')
    this.expandWrapperTarget.classList.toggle('bg-filter-panel')
    for (const slidePanel of this.slidePanelTargets) {
      slidePanel.classList.toggle('ariadne-hidden')
    }
    this.buttonWrapperTarget.classList.toggle('bg-filter-panel')
    if (document.getElementById('btnClose')?.classList.contains('ariadne-hidden')) {
      const formID = this.buttonWrapperTarget.getAttribute('data-slideover-component-form-id')
      if (formID) {
        const form = <HTMLFormElement>document.getElementById(formID)
        form?.submit()
      }
    }
  }
}

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.18 app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.18-x86_64-linux app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.18-x86_64-darwin app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.18-x64-mingw32 app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.18-x64-mingw-ucrt app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.18-arm64-darwin app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.18-aarch64-linux app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.17-x86_64-linux app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.17-x86_64-darwin app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.17-x64-mingw32 app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.17-x64-mingw-ucrt app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.17-arm64-darwin app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.17-aarch64-linux app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.17 app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.16-x86_64-linux app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.16-x86_64-darwin app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.16-x64-mingw32 app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.16-x64-mingw-ucrt app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.16-arm64-darwin app/components/ariadne/slideover-component.ts
ariadne_view_components-0.0.16-aarch64-linux app/components/ariadne/slideover-component.ts