How to use the @ptsecurity/mosaic/core.MultipleMode.CHECKBOX function in @ptsecurity/mosaic

To help you get started, we’ve selected a few @ptsecurity/mosaic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github positive-js / mosaic / packages / mosaic / tree-select / tree-select.component.ts View on Github external
ngAfterContentInit() {
        if (!this.tree) { return; }

        this.tree.resetFocusedItemOnBlur = false;

        this.selectionModel = this.tree.selectionModel = new SelectionModel(this.multiple);
        this.tree.ngAfterContentInit();

        this.initKeyManager();

        this.options = this.tree.renderedOptions;
        this.tree.autoSelect = this.autoSelect;
        this.tree.multipleMode = this.multiple ? MultipleMode.CHECKBOX : null;

        if (this.multiple) {
            this.tree.noUnselectLast = false;
        }

        if (this.tempValues) {
            this.setSelectionByValue(this.tempValues);
            this.tempValues = null;
        }

        this.optionSelectionChanges
            .pipe(takeUntil(this.destroy))
            .subscribe((event) => {
                if (!this.multiple && this.panelOpen && event.isUserInput) {
                    this.close();
                }
github positive-js / mosaic / packages / mosaic / list / list-selection.component.ts View on Github external
private element: ElementRef,
        private changeDetectorRef: ChangeDetectorRef,
        @Attribute('tabindex') tabIndex: string,
        @Attribute('auto-select') autoSelect: string,
        @Attribute('no-unselect') noUnselect: string,
        @Attribute('multiple') multiple: string
    ) {
        super();

        this.autoSelect = autoSelect === null ? true : toBoolean(autoSelect);
        this.noUnselect = noUnselect === null ? true : toBoolean(noUnselect);

        if (multiple === MultipleMode.CHECKBOX || multiple === MultipleMode.KEYBOARD) {
            this.multipleMode = multiple;
        } else if (multiple !== null) {
            this.multipleMode = MultipleMode.CHECKBOX;
        }

        this._tabIndex = parseInt(tabIndex) || 0;

        this.selectionModel = new SelectionModel(this.multiple);
    }
github positive-js / mosaic / packages / mosaic / tree / tree-selection.component.ts View on Github external
differs: IterableDiffers,
        changeDetectorRef: ChangeDetectorRef,
        @Attribute('tabindex') tabIndex: string,
        @Attribute('multiple') multiple: string
    ) {
        super(differs, changeDetectorRef);

        this.tabIndex = parseInt(tabIndex) || 0;

        if (multiple === MultipleMode.CHECKBOX || multiple === MultipleMode.KEYBOARD) {
            this.multipleMode = multiple;
        } else if (multiple !== null) {
            this.multipleMode = MultipleMode.CHECKBOX;
        }

        if (this.multipleMode === MultipleMode.CHECKBOX) {
            this.autoSelect = false;
            this.noUnselectLast = false;
        }

        this.selectionModel = new SelectionModel(this.multiple);
    }
github positive-js / mosaic / packages / mosaic / tree / tree-selection.component.ts View on Github external
constructor(
        private elementRef: ElementRef,
        differs: IterableDiffers,
        changeDetectorRef: ChangeDetectorRef,
        @Attribute('tabindex') tabIndex: string,
        @Attribute('multiple') multiple: string
    ) {
        super(differs, changeDetectorRef);

        this.tabIndex = parseInt(tabIndex) || 0;

        if (multiple === MultipleMode.CHECKBOX || multiple === MultipleMode.KEYBOARD) {
            this.multipleMode = multiple;
        } else if (multiple !== null) {
            this.multipleMode = MultipleMode.CHECKBOX;
        }

        if (this.multipleMode === MultipleMode.CHECKBOX) {
            this.autoSelect = false;
            this.noUnselectLast = false;
        }

        this.selectionModel = new SelectionModel(this.multiple);
    }
github positive-js / mosaic / packages / mosaic / list / list-selection.component.ts View on Github external
get showCheckbox(): boolean {
        return this.multipleMode === MultipleMode.CHECKBOX;
    }
github positive-js / mosaic / packages / mosaic / tree / tree-selection.component.ts View on Github external
get showCheckbox(): boolean {
        return this.multipleMode === MultipleMode.CHECKBOX;
    }