UNPKG

ng-zorro-antd-yj

Version:

An enterprise-class UI components based on Ant Design and Angular

779 lines 58.5 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import * as tslib_1 from "tslib"; import { Injectable } from '@angular/core'; import { BehaviorSubject, Subject } from 'rxjs'; import { arraysEqual } from '../core/util/array'; import { isShowSearchObject } from './nz-cascader-definitions'; import { isChildOption, isParentOption } from './nz-cascader-utils'; /** * All data is stored and parsed in NzCascaderService. */ var NzCascaderService = /** @class */ (function () { function NzCascaderService() { /** * Activated options in each column. */ this.activatedOptions = []; /** * An array to store cascader items arranged in different layers. */ this.columns = [[]]; /** * If user has entered searching mode. */ this.inSearchingMode = false; /** * Selected options would be output to user. */ this.selectedOptions = []; this.values = []; // tslint:disable-line:no-any // tslint:disable-line:no-any this.$loading = new BehaviorSubject(false); /** * Emit an event to notify cascader it needs to redraw because activated or * selected options are changed. */ this.$redraw = new Subject(); /** * Emit an event when an option gets selected. * Emit true if a leaf options is selected. */ this.$optionSelected = new Subject(); /** * Emit an event to notify cascader it needs to quit searching mode. * Only emit when user do select a searching option. */ this.$quitSearching = new Subject(); /** * To hold columns before entering searching mode. */ this.columnsSnapshot = [[]]; /** * To hold activated options before entering searching mode. */ this.activatedOptionsSnapshot = []; } Object.defineProperty(NzCascaderService.prototype, "nzOptions", { /** Return cascader options in the first layer. */ get: /** * Return cascader options in the first layer. * @return {?} */ function () { return this.columns[0]; }, enumerable: true, configurable: true }); /** * @return {?} */ NzCascaderService.prototype.ngOnDestroy = /** * @return {?} */ function () { this.$redraw.complete(); this.$quitSearching.complete(); this.$optionSelected.complete(); this.$loading.complete(); }; /** * Make sure that value matches what is displayed in the dropdown. */ /** * Make sure that value matches what is displayed in the dropdown. * @param {?=} first * @return {?} */ NzCascaderService.prototype.syncOptions = /** * Make sure that value matches what is displayed in the dropdown. * @param {?=} first * @return {?} */ function (first) { var _this = this; if (first === void 0) { first = false; } /** @type {?} */ var values = this.values; /** @type {?} */ var hasValue = values && values.length; /** @type {?} */ var lastColumnIndex = values.length - 1; /** @type {?} */ var initColumnWithIndex = (/** * @param {?} columnIndex * @return {?} */ function (columnIndex) { /** @type {?} */ var activatedOptionSetter = (/** * @return {?} */ function () { var _a; /** @type {?} */ var currentValue = values[columnIndex]; if (!currentValue) { _this.$redraw.next(); return; } /** @type {?} */ var option = _this.findOptionWithValue(columnIndex, values[columnIndex]) || (typeof currentValue === 'object' ? currentValue : (_a = {}, _a["" + _this.cascaderComponent.nzValueProperty] = currentValue, _a["" + _this.cascaderComponent.nzLabelProperty] = currentValue, _a)); _this.setOptionActivated(option, columnIndex, false, false); if (columnIndex < lastColumnIndex) { initColumnWithIndex(columnIndex + 1); } else { _this.dropBehindColumns(columnIndex); _this.selectedOptions = tslib_1.__spread(_this.activatedOptions); _this.$redraw.next(); } }); if (_this.isLoaded(columnIndex) || !_this.cascaderComponent.nzLoadData) { activatedOptionSetter(); } else { /** @type {?} */ var option = _this.activatedOptions[columnIndex - 1] || {}; _this.loadChildren(option, columnIndex - 1, activatedOptionSetter); } }); this.activatedOptions = []; this.selectedOptions = []; if (first && this.cascaderComponent.nzLoadData && !hasValue) { return; } else { initColumnWithIndex(0); } }; /** * Bind cascader component so this service could use inputs. */ /** * Bind cascader component so this service could use inputs. * @param {?} cascaderComponent * @return {?} */ NzCascaderService.prototype.withComponent = /** * Bind cascader component so this service could use inputs. * @param {?} cascaderComponent * @return {?} */ function (cascaderComponent) { this.cascaderComponent = cascaderComponent; }; /** * Reset all options. Rebuild searching options if in searching mode. */ /** * Reset all options. Rebuild searching options if in searching mode. * @param {?} options * @return {?} */ NzCascaderService.prototype.withOptions = /** * Reset all options. Rebuild searching options if in searching mode. * @param {?} options * @return {?} */ function (options) { this.columnsSnapshot = this.columns = options && options.length ? [options] : []; if (this.inSearchingMode) { this.prepareSearchOptions(this.cascaderComponent.inputValue); } else if (this.columns.length) { this.syncOptions(); } }; /** * Try to set a option as activated. * @param option Cascader option * @param columnIndex Of which column this option is in * @param select Select * @param loadingChildren Try to load children asynchronously. */ /** * Try to set a option as activated. * @param {?} option Cascader option * @param {?} columnIndex Of which column this option is in * @param {?=} select Select * @param {?=} loadingChildren Try to load children asynchronously. * @return {?} */ NzCascaderService.prototype.setOptionActivated = /** * Try to set a option as activated. * @param {?} option Cascader option * @param {?} columnIndex Of which column this option is in * @param {?=} select Select * @param {?=} loadingChildren Try to load children asynchronously. * @return {?} */ function (option, columnIndex, select, loadingChildren) { if (select === void 0) { select = false; } if (loadingChildren === void 0) { loadingChildren = true; } if (option.disabled) { return; } this.activatedOptions[columnIndex] = option; this.trackAncestorActivatedOptions(columnIndex); this.dropBehindActivatedOptions(columnIndex); /** @type {?} */ var isParent = isParentOption(option); if (isParent) { // Parent option that has children. this.setColumnData((/** @type {?} */ (option.children)), columnIndex + 1, option); } else if (!option.isLeaf && loadingChildren) { // Parent option that should try to load children asynchronously. this.loadChildren(option, columnIndex); } else if (option.isLeaf) { // Leaf option. this.dropBehindColumns(columnIndex); } // Actually perform selection to make an options not only activated but also selected. if (select) { this.setOptionSelected(option, columnIndex); } this.$redraw.next(); }; /** * Set a searching option as activated, finishing up things. * @param option */ /** * Set a searching option as activated, finishing up things. * @param {?} option * @return {?} */ NzCascaderService.prototype.setSearchOptionSelected = /** * Set a searching option as activated, finishing up things. * @param {?} option * @return {?} */ function (option) { var _this = this; this.activatedOptions = [option]; this.selectedOptions = tslib_1.__spread(option.path); this.prepareEmitValue(); this.$redraw.next(); this.$optionSelected.next({ option: option, index: 0 }); setTimeout((/** * @return {?} */ function () { // Reset data and tell UI only to remove input and reset dropdown width style. _this.$quitSearching.next(); _this.$redraw.next(); _this.inSearchingMode = false; _this.columns = tslib_1.__spread(_this.columnsSnapshot); _this.activatedOptions = tslib_1.__spread(_this.selectedOptions); }), 200); }; /** * Filter cascader options to reset `columns`. * @param searchValue The string user wants to search. */ /** * Filter cascader options to reset `columns`. * @param {?} searchValue The string user wants to search. * @return {?} */ NzCascaderService.prototype.prepareSearchOptions = /** * Filter cascader options to reset `columns`. * @param {?} searchValue The string user wants to search. * @return {?} */ function (searchValue) { var _this = this; /** @type {?} */ var results = []; // Search results only have one layer. /** @type {?} */ var path = []; /** @type {?} */ var defaultFilter = (/** * @param {?} i * @param {?} p * @return {?} */ function (i, p) { return p.some((/** * @param {?} o * @return {?} */ function (o) { /** @type {?} */ var label = _this.getOptionLabel(o); return !!label && label.indexOf(i) !== -1; })); }); /** @type {?} */ var showSearch = this.cascaderComponent.nzShowSearch; /** @type {?} */ var filter = isShowSearchObject(showSearch) && showSearch.filter ? showSearch.filter : defaultFilter; /** @type {?} */ var sorter = isShowSearchObject(showSearch) && showSearch.sorter ? showSearch.sorter : null; /** @type {?} */ var loopChild = (/** * @param {?} node * @param {?=} forceDisabled * @return {?} */ function (node, forceDisabled) { if (forceDisabled === void 0) { forceDisabled = false; } var _a; path.push(node); /** @type {?} */ var cPath = Array.from(path); if (filter(searchValue, cPath)) { /** @type {?} */ var disabled = forceDisabled || node.disabled; /** @type {?} */ var option = (_a = { disabled: disabled, isLeaf: true, path: cPath }, _a[_this.cascaderComponent.nzLabelProperty] = cPath.map((/** * @param {?} p * @return {?} */ function (p) { return _this.getOptionLabel(p); })).join(' / '), _a); results.push(option); } path.pop(); }); /** @type {?} */ var loopParent = (/** * @param {?} node * @param {?=} forceDisabled * @return {?} */ function (node, forceDisabled) { if (forceDisabled === void 0) { forceDisabled = false; } /** @type {?} */ var disabled = forceDisabled || node.disabled; path.push(node); (/** @type {?} */ (node.children)).forEach((/** * @param {?} sNode * @return {?} */ function (sNode) { if (!sNode.parent) { sNode.parent = node; } if (!sNode.isLeaf) { loopParent(sNode, disabled); } if (sNode.isLeaf || !sNode.children || !sNode.children.length) { loopChild(sNode, disabled); } })); path.pop(); }); if (!this.columnsSnapshot.length) { this.columns = [[]]; return; } this.columnsSnapshot[0].forEach((/** * @param {?} o * @return {?} */ function (o) { return (isChildOption(o) ? loopChild(o) : loopParent(o)); })); if (sorter) { results.sort((/** * @param {?} a * @param {?} b * @return {?} */ function (a, b) { return sorter(a.path, b.path, searchValue); })); } this.columns = [results]; }; /** * Toggle searching mode by UI. It deals with things not directly related to UI. * @param toSearching If this cascader is entering searching mode */ /** * Toggle searching mode by UI. It deals with things not directly related to UI. * @param {?} toSearching If this cascader is entering searching mode * @return {?} */ NzCascaderService.prototype.toggleSearchingMode = /** * Toggle searching mode by UI. It deals with things not directly related to UI. * @param {?} toSearching If this cascader is entering searching mode * @return {?} */ function (toSearching) { this.inSearchingMode = toSearching; if (toSearching) { this.activatedOptionsSnapshot = tslib_1.__spread(this.activatedOptions); this.activatedOptions = []; this.selectedOptions = []; this.$redraw.next(); } else { // User quit searching mode without selecting an option. this.activatedOptions = tslib_1.__spread(this.activatedOptionsSnapshot); this.selectedOptions = tslib_1.__spread(this.activatedOptions); this.columns = tslib_1.__spread(this.columnsSnapshot); this.syncOptions(); this.$redraw.next(); } }; /** * @param {?} option * @param {?} index * @return {?} */ NzCascaderService.prototype.setOptionSelected = /** * @param {?} option * @param {?} index * @return {?} */ function (option, index) { /** @type {?} */ var changeOn = this.cascaderComponent.nzChangeOn; /** @type {?} */ var shouldPerformSelection = (/** * @param {?} o * @param {?} i * @return {?} */ function (o, i) { return typeof changeOn === 'function' ? changeOn(o, i) : false; }); if (option.isLeaf || this.cascaderComponent.nzChangeOnSelect || shouldPerformSelection(option, index)) { this.selectedOptions = tslib_1.__spread(this.activatedOptions); this.prepareEmitValue(); this.$redraw.next(); this.$optionSelected.next({ option: option, index: index }); } }; /** * Clear selected options. */ /** * Clear selected options. * @return {?} */ NzCascaderService.prototype.clear = /** * Clear selected options. * @return {?} */ function () { this.values = []; this.selectedOptions = []; this.activatedOptions = []; this.dropBehindColumns(0); this.prepareEmitValue(); this.$redraw.next(); this.$optionSelected.next(null); }; /** * @param {?} o * @return {?} */ NzCascaderService.prototype.getOptionLabel = /** * @param {?} o * @return {?} */ function (o) { return (/** @type {?} */ (o[this.cascaderComponent.nzLabelProperty || 'label'])); }; // tslint:disable-next-line:no-any // tslint:disable-next-line:no-any /** * @param {?} o * @return {?} */ NzCascaderService.prototype.getOptionValue = // tslint:disable-next-line:no-any /** * @param {?} o * @return {?} */ function (o) { return o[this.cascaderComponent.nzValueProperty || 'value']; }; /** * Try to insert options into a column. * @param options Options to insert * @param columnIndex Position */ /** * Try to insert options into a column. * @private * @param {?} options Options to insert * @param {?} columnIndex Position * @param {?} parent * @return {?} */ NzCascaderService.prototype.setColumnData = /** * Try to insert options into a column. * @private * @param {?} options Options to insert * @param {?} columnIndex Position * @param {?} parent * @return {?} */ function (options, columnIndex, parent) { /** @type {?} */ var existingOptions = this.columns[columnIndex]; if (!arraysEqual(existingOptions, options)) { options.forEach((/** * @param {?} o * @return {?} */ function (o) { return (o.parent = parent); })); this.columns[columnIndex] = options; this.dropBehindColumns(columnIndex); } }; /** * Set all ancestor options as activated. */ /** * Set all ancestor options as activated. * @private * @param {?} startIndex * @return {?} */ NzCascaderService.prototype.trackAncestorActivatedOptions = /** * Set all ancestor options as activated. * @private * @param {?} startIndex * @return {?} */ function (startIndex) { for (var i = startIndex - 1; i >= 0; i--) { if (!this.activatedOptions[i]) { this.activatedOptions[i] = (/** @type {?} */ (this.activatedOptions[i + 1].parent)); } } }; /** * @private * @param {?} lastReserveIndex * @return {?} */ NzCascaderService.prototype.dropBehindActivatedOptions = /** * @private * @param {?} lastReserveIndex * @return {?} */ function (lastReserveIndex) { this.activatedOptions = this.activatedOptions.splice(0, lastReserveIndex + 1); }; /** * @private * @param {?} lastReserveIndex * @return {?} */ NzCascaderService.prototype.dropBehindColumns = /** * @private * @param {?} lastReserveIndex * @return {?} */ function (lastReserveIndex) { if (lastReserveIndex < this.columns.length - 1) { this.columns = this.columns.slice(0, lastReserveIndex + 1); } }; /** * Load children of an option asynchronously. */ /** * Load children of an option asynchronously. * @param {?} option * @param {?} columnIndex * @param {?=} success * @param {?=} failure * @return {?} */ NzCascaderService.prototype.loadChildren = /** * Load children of an option asynchronously. * @param {?} option * @param {?} columnIndex * @param {?=} success * @param {?=} failure * @return {?} */ function (option, // tslint:disable-line:no-any columnIndex, success, failure) { var _this = this; /** @type {?} */ var loadFn = this.cascaderComponent.nzLoadData; if (loadFn) { // If there isn't any option in columns. this.$loading.next(columnIndex < 0); if (typeof option === 'object') { option.loading = true; } loadFn(option, columnIndex).then((/** * @return {?} */ function () { option.loading = false; if (option.children) { _this.setColumnData(option.children, columnIndex + 1, option); } if (success) { success(); } _this.$loading.next(false); _this.$redraw.next(); }), (/** * @return {?} */ function () { option.loading = false; option.isLeaf = true; if (failure) { failure(); } _this.$redraw.next(); })); } }; /** * @private * @param {?} index * @return {?} */ NzCascaderService.prototype.isLoaded = /** * @private * @param {?} index * @return {?} */ function (index) { return this.columns[index] && this.columns[index].length > 0; }; /** * Find a option that has a given value in a given column. */ /** * Find a option that has a given value in a given column. * @private * @param {?} columnIndex * @param {?} value * @return {?} */ NzCascaderService.prototype.findOptionWithValue = /** * Find a option that has a given value in a given column. * @private * @param {?} columnIndex * @param {?} value * @return {?} */ function (columnIndex, value // tslint:disable-line:no-any ) { var _this = this; /** @type {?} */ var targetColumn = this.columns[columnIndex]; if (targetColumn) { /** @type {?} */ var v_1 = typeof value === 'object' ? this.getOptionValue(value) : value; return (/** @type {?} */ (targetColumn.find((/** * @param {?} o * @return {?} */ function (o) { return v_1 === _this.getOptionValue(o); })))); } return null; }; /** * @private * @return {?} */ NzCascaderService.prototype.prepareEmitValue = /** * @private * @return {?} */ function () { var _this = this; this.values = this.selectedOptions.map((/** * @param {?} o * @return {?} */ function (o) { return _this.getOptionValue(o); })); }; NzCascaderService.decorators = [ { type: Injectable } ]; return NzCascaderService; }()); export { NzCascaderService }; if (false) { /** * Activated options in each column. * @type {?} */ NzCascaderService.prototype.activatedOptions; /** * An array to store cascader items arranged in different layers. * @type {?} */ NzCascaderService.prototype.columns; /** * If user has entered searching mode. * @type {?} */ NzCascaderService.prototype.inSearchingMode; /** * Selected options would be output to user. * @type {?} */ NzCascaderService.prototype.selectedOptions; /** @type {?} */ NzCascaderService.prototype.values; /** @type {?} */ NzCascaderService.prototype.$loading; /** * Emit an event to notify cascader it needs to redraw because activated or * selected options are changed. * @type {?} */ NzCascaderService.prototype.$redraw; /** * Emit an event when an option gets selected. * Emit true if a leaf options is selected. * @type {?} */ NzCascaderService.prototype.$optionSelected; /** * Emit an event to notify cascader it needs to quit searching mode. * Only emit when user do select a searching option. * @type {?} */ NzCascaderService.prototype.$quitSearching; /** * To hold columns before entering searching mode. * @type {?} * @private */ NzCascaderService.prototype.columnsSnapshot; /** * To hold activated options before entering searching mode. * @type {?} * @private */ NzCascaderService.prototype.activatedOptionsSnapshot; /** * @type {?} * @private */ NzCascaderService.prototype.cascaderComponent; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnotY2FzY2FkZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLXpvcnJvLWFudGQteWovIiwic291cmNlcyI6WyJjYXNjYWRlci9uei1jYXNjYWRlci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBYSxNQUFNLGVBQWUsQ0FBQztBQUN0RCxPQUFPLEVBQUUsZUFBZSxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUNoRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFakQsT0FBTyxFQUNMLGtCQUFrQixFQUtuQixNQUFNLDJCQUEyQixDQUFDO0FBQ25DLE9BQU8sRUFBRSxhQUFhLEVBQUUsY0FBYyxFQUFFLE1BQU0scUJBQXFCLENBQUM7Ozs7QUFLcEU7SUFBQTs7OztRQUdFLHFCQUFnQixHQUFxQixFQUFFLENBQUM7Ozs7UUFHeEMsWUFBTyxHQUF1QixDQUFDLEVBQUUsQ0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