Sha256: 59a3c63c5481e598d83fc078d684ed158134e26122e93dfb9a263c1332ae4417

Contents?: true

Size: 880 Bytes

Versions: 18

Compression:

Stored size: 880 Bytes

Contents

import {hookupComponents, VBaseComponent} from './base-component';
import {MDCLinearProgress} from '@material/linear-progress';

export function initProgress(e) {
    console.debug('\tProgress');
    hookupComponents(e, '.v-progress', VProgress, MDCLinearProgress);
}

export class VProgress extends VBaseComponent {
    constructor(element, mdcComponent) {
        super(element, mdcComponent);
        element.dataset.hidden === 'true' ? this.hide() : this.show();
        this.root.addEventListener('V:postStarted', (e) => {
            this.show();
        });
        this.root.addEventListener('V:postFinished', (e) => {
            this.hide();
        });
        this.root.addEventListener('V:eventsHalted', (e) => {
            this.hide();
        });
    }

    show() {
        this.mdcComponent.open();
    }

    hide() {
        this.mdcComponent.close();
    }
}

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
coprl-3.0.0.beta.12 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.11 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.10 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.9 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.8 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.7 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.6 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.5 views/mdc/assets/js/components/progress.js
voom-presenters-2.1.2 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.4 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.3 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.2 views/mdc/assets/js/components/progress.js
coprl-3.0.0.beta.1 views/mdc/assets/js/components/progress.js
voom-presenters-2.1.0 views/mdc/assets/js/components/progress.js
voom-presenters-2.0.3 views/mdc/assets/js/components/progress.js
voom-presenters-2.0.2 views/mdc/assets/js/components/progress.js
voom-presenters-2.0.1 views/mdc/assets/js/components/progress.js
voom-presenters-2.0.0 views/mdc/assets/js/components/progress.js