@lxlib/seed
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.
1,650 lines (1,620 loc) • 190 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@lxlib/acl'), require('@lxlib/theme'), require('@lxlib/util'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('@lxlib/seed/xlsx'), require('@angular/router'), require('ng-zorro-antd/table'), require('@angular/forms'), require('ng-zorro-antd/badge'), require('ng-zorro-antd/checkbox'), require('ng-zorro-antd/divider'), require('ng-zorro-antd/dropdown'), require('ng-zorro-antd/icon'), require('ng-zorro-antd/input'), require('ng-zorro-antd/menu'), require('ng-zorro-antd/popconfirm'), require('ng-zorro-antd/radio'), require('ng-zorro-antd/tag'), require('ng-zorro-antd/tooltip')) :
typeof define === 'function' && define.amd ? define('@lxlib/seed/st', ['exports', '@angular/core', '@angular/platform-browser', '@lxlib/acl', '@lxlib/theme', '@lxlib/util', '@angular/common', 'rxjs', 'rxjs/operators', '@lxlib/seed/xlsx', '@angular/router', 'ng-zorro-antd/table', '@angular/forms', 'ng-zorro-antd/badge', 'ng-zorro-antd/checkbox', 'ng-zorro-antd/divider', 'ng-zorro-antd/dropdown', 'ng-zorro-antd/icon', 'ng-zorro-antd/input', 'ng-zorro-antd/menu', 'ng-zorro-antd/popconfirm', 'ng-zorro-antd/radio', 'ng-zorro-antd/tag', 'ng-zorro-antd/tooltip'], factory) :
(global = global || self, factory((global.lxlib = global.lxlib || {}, global.lxlib.seed = global.lxlib.seed || {}, global.lxlib.seed.st = {}), global.ng.core, global.ng.platformBrowser, global.lxlib.acl, global.lxlib.theme, global.lxlib.util, global.ng.common, global.rxjs, global.rxjs.operators, global.lxlib.seed.xlsx, global.ng.router, global['ng-zorro-antd/table'], global.ng.forms, global['ng-zorro-antd/badge'], global['ng-zorro-antd/checkbox'], global['ng-zorro-antd/divider'], global['ng-zorro-antd/dropdown'], global['ng-zorro-antd/icon'], global['ng-zorro-antd/input'], global['ng-zorro-antd/menu'], global['ng-zorro-antd/popconfirm'], global['ng-zorro-antd/radio'], global['ng-zorro-antd/tag'], global['ng-zorro-antd/tooltip']));
}(this, (function (exports, core, platformBrowser, acl, theme, util, common, rxjs, operators, xlsx, router, table, forms, badge, checkbox, divider, dropdown, icon, input, menu, popconfirm, radio, tag, tooltip) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
function __exportStar(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
}
function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
}
/**
* @fileoverview added by tsickle
* Generated from: st.interfaces.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function STWidthMode() { }
if (false) {
/**
* 宽度类型
* - `default` 默认行为
* - `strict` 严格模式,即强制按 `width` 指定的宽度呈现,并根据 `strictBehavior` 类型处理
* @type {?|undefined}
*/
STWidthMode.prototype.type;
/**
* 严格模式的处理行为
* - `wrap` 强制换行
* - `truncate` 截短
* @type {?|undefined}
*/
STWidthMode.prototype.strictBehavior;
}
/**
* @record
*/
function STResetColumnsOption() { }
if (false) {
/** @type {?|undefined} */
STResetColumnsOption.prototype.pi;
/** @type {?|undefined} */
STResetColumnsOption.prototype.ps;
/** @type {?|undefined} */
STResetColumnsOption.prototype.columns;
/**
* Whether to trigger a data load, default: `true`
* @type {?|undefined}
*/
STResetColumnsOption.prototype.emitReload;
}
/**
* @record
*/
function STReq() { }
if (false) {
/**
* 分页类型,默认:`page`
* - `page` 使用 `pi`,`ps` 组合
* - `skip` 使用 `skip`,`limit` 组合
* @type {?|undefined}
*/
STReq.prototype.type;
/**
* 额外请求参数,默认自动附加 `pi`、`ps` 至URL
* - `{ status: 'new' }` => `url?pi=1&ps=10&status=new`
* @type {?|undefined}
*/
STReq.prototype.params;
/**
* 请求方法,默认:`GET`
* @type {?|undefined}
*/
STReq.prototype.method;
/**
* 请求体 `body`
* @type {?|undefined}
*/
STReq.prototype.body;
/**
* 请求体 `Header`
* @type {?|undefined}
*/
STReq.prototype.headers;
/**
* 重命名参数 `pi`、`ps`,默认:`{ pi: 'pi', ps: 'ps' }`
* - `{ pi: 'Page' }` => `pi` 会被替换成 Page
* @type {?|undefined}
*/
STReq.prototype.reName;
/**
* 是否将请求所有参数数据都放入 `body` 当中(`url` 地址本身参数除外),仅当 `method: 'POST'` 时有效,默认:`false`
* @type {?|undefined}
*/
STReq.prototype.allInBody;
/**
* 是否延迟加载数据,即渲染结束后不会主动发起请求,默认:`false`
* @type {?|undefined}
*/
STReq.prototype.lazyLoad;
/**
* 请求前数据处理
* @type {?|undefined}
*/
STReq.prototype.process;
}
/**
* @record
*/
function STRequestOptions() { }
if (false) {
/** @type {?|undefined} */
STRequestOptions.prototype.body;
/** @type {?|undefined} */
STRequestOptions.prototype.headers;
/** @type {?|undefined} */
STRequestOptions.prototype.params;
/** @type {?|undefined} */
STRequestOptions.prototype.observe;
/** @type {?|undefined} */
STRequestOptions.prototype.reportProgress;
/** @type {?|undefined} */
STRequestOptions.prototype.responseType;
/** @type {?|undefined} */
STRequestOptions.prototype.withCredentials;
}
/**
* @record
*/
function STLoadOptions() { }
if (false) {
/**
* 是否合并,默认:`false`
* @type {?|undefined}
*/
STLoadOptions.prototype.merge;
/**
* 是否跳转至顶部,若不指定由 `page.toTop` 来决定
* @type {?|undefined}
*/
STLoadOptions.prototype.toTop;
}
/**
* @record
*/
function STRes() { }
if (false) {
/**
* 重命名返回参数 `total`、`list`
* - `{ total: 'Total' }` => Total 会被当作 `total`
* @type {?|undefined}
*/
STRes.prototype.reName;
/**
* 数据预处理
* @type {?|undefined}
*/
STRes.prototype.process;
}
/**
* @record
*/
function STPage() { }
if (false) {
/**
* 前端分页,当 `data` 为`any[]` 或 `Observable<any[]>` 有效,默认:`true`
* - `true` 由 `st` 根据 `data` 长度受控分页,包括:排序、过滤等
* - `false` 由用户通过 `total` 和 `data` 参数受控分页,并维护 `(change)` 当分页变更时重新加载数据
* @type {?|undefined}
*/
STPage.prototype.front;
/**
* 后端分页是否采用`0`基索引,只在`data`类型为`string`时有效,默认:`false`
* @type {?|undefined}
*/
STPage.prototype.zeroIndexed;
/**
* 指定分页显示的位置,默认:`bottom`
* @type {?|undefined}
*/
STPage.prototype.position;
/**
* 指定分页分页方向,默认:`right`
* @type {?|undefined}
*/
STPage.prototype.placement;
/**
* 是否显示分页器,默认:`true`
* @type {?|undefined}
*/
STPage.prototype.show;
/**
* 是否显示分页器中改变页数,默认:`false`
* @type {?|undefined}
*/
STPage.prototype.showSize;
/**
* 分页器中每页显示条目数下拉框值,默认:`[10, 20, 30, 40, 50]`
* @type {?|undefined}
*/
STPage.prototype.pageSizes;
/**
* 是否显示分页器中快速跳转,默认:`false`
* @type {?|undefined}
*/
STPage.prototype.showQuickJumper;
/**
* 是否显示总数据量
* - `boolean` 类型显示与否,默认模板:`共 {{total}} 条`
* - `string` 自定义模板,模板变量:
* - `{{total}}` 表示数据总量
* - `{{range[0]}}` 表示当前页开始数量值
* - `{{range[1]}}` 表示当前页结束数量值
* @type {?|undefined}
*/
STPage.prototype.total;
/**
* 切换分页时返回顶部,默认:`true`
* @type {?|undefined}
*/
STPage.prototype.toTop;
/**
* 返回顶部偏移值,默认:`100`
* @type {?|undefined}
*/
STPage.prototype.toTopOffset;
}
/**
* 数据源
* @record
*/
function STData() { }
if (false) {
/**
* 选择框或单选框状态值
* @type {?|undefined}
*/
STData.prototype.checked;
/**
* 选择框或单选框 `disabled` 值
* @type {?|undefined}
*/
STData.prototype.disabled;
/**
* 是否展开状态
* @type {?|undefined}
*/
STData.prototype.expand;
/**
* 是否显示展开按钮
* @type {?|undefined}
*/
STData.prototype.showExpand;
/* Skipping unhandled member: [key: string]: any;*/
}
/**
* 列描述
* @record
*/
function STColumn() { }
if (false) {
/**
* 用于定义数据源主键,例如:`STStatistical`
* @type {?|undefined}
*/
STColumn.prototype.key;
/**
* 列标题
* @type {?|undefined}
*/
STColumn.prototype.title;
/**
* 列数据在数据项中对应的 key,支持 `a.b.c` 的嵌套写法,例如:
* - `id`
* - `price.market`
* - `[ 'price', 'market' ]`
* @type {?|undefined}
*/
STColumn.prototype.index;
/**
* 类型
* - `no` 行号,计算规则:`index + noIndex`
* - `checkbox` 多选
* - `radio` 单选
* - `link` 链接,务必指定 `click`
* - `badge` [徽标](https://ng.ant.design/components/badge/zh),务必指定 `badge` 参数配置徽标对应值
* - `tag` [标签](https://ng.ant.design/components/tag/zh),务必指定 `tag` 参数配置标签对应值
* - `img` 图片且居中(若 `className` 存在则优先)
* - `number` 数字且居右(若 `className` 存在则优先)
* - `currency` 货币且居右(若 `className` 存在则优先)
* - `date` 日期格式且居中(若 `className` 存在则优先),使用 `dateFormat` 自定义格式
* - `yn` 将`boolean`类型徽章化 [document](https://ng-alain.com/docs/data-render#yn)
* @type {?|undefined}
*/
STColumn.prototype.type;
/**
* 链接回调,若返回一个字符串表示导航URL会自动触发 `router.navigateByUrl`
* @type {?|undefined}
*/
STColumn.prototype.click;
/**
* 按钮组
* @type {?|undefined}
*/
STColumn.prototype.buttons;
/**
* 自定义渲染ID
* \@example
* <ng-template st-row="custom" let-item let-index="index" let-column="column">
* {{ c.title }}
* </ng-template>
* @type {?|undefined}
*/
STColumn.prototype.render;
/**
* 标题自定义渲染ID
* \@example
* <ng-template st-row="custom" type="title" let-c>
* {{ item | json }}
* </ng-template>
* @type {?|undefined}
*/
STColumn.prototype.renderTitle;
/**
* 列宽(数字型表示 `px` 值),例如:`100`、`10%`、`100px`
*
* **注意:** 若固定列必须是数字
* @type {?|undefined}
*/
STColumn.prototype.width;
/**
* 排序配置项,远程数据配置**优先**规则:
* - `true` 表示允许排序
* - `string` 表示远程数据排序相对应 `key` 值
* @type {?|undefined}
*/
STColumn.prototype.sort;
/**
* 过滤配置项
* @type {?|undefined}
*/
STColumn.prototype.filter;
/**
* 格式化列值
* @type {?|undefined}
*/
STColumn.prototype.format;
/**
* 自定义全/反选选择项
* @type {?|undefined}
*/
STColumn.prototype.selections;
/**
* 列 `class` 属性值(注:无须 `.` 点)多个用空格隔开,例如:
* - `text-center` 居中
* - `text-right` 居右
* - `text-success` 成功色
* - `text-danger` 异常色
* @type {?|undefined}
*/
STColumn.prototype.className;
/**
* 合并列
* @type {?|undefined}
*/
STColumn.prototype.colSpan;
/**
* 数字格式,`type=number` 有效
* @type {?|undefined}
*/
STColumn.prototype.numberDigits;
/**
* 日期格式,`type=date` 有效,(默认:`yyyy-MM-dd HH:mm`)
* @type {?|undefined}
*/
STColumn.prototype.dateFormat;
/**
* 当 `type=yn` 有效
* @type {?|undefined}
*/
STColumn.prototype.yn;
/**
* 是否允许导出,默认 `true`
* @type {?|undefined}
*/
STColumn.prototype.exported;
/**
* 权限,等同 [ACLCanType](https://ng-alain.com/acl/getting-started/#ACLCanType) 参数值
* @type {?|undefined}
*/
STColumn.prototype.acl;
/**
* 当不存在数据时以默认值替代
* @type {?|undefined}
*/
STColumn.prototype.default;
/**
* 固定前后列,当指定时务必指定 `width` 否则视为无效,有若干 **注意:** 项:
*
* - 若列头与内容不对齐或出现列重复,请指定列的宽度 `width`
* - 建议指定 `scroll.x` 为大于表格宽度的固定值或百分比。注意,且非固定列宽度之和不要超过 `scroll.x`
* @type {?|undefined}
*/
STColumn.prototype.fixed;
/**
* 徽标配置项
* @type {?|undefined}
*/
STColumn.prototype.badge;
/**
* 标签配置项
* @type {?|undefined}
*/
STColumn.prototype.tag;
/**
* 行号索引,默认:`1`
* - 计算规则为:`index + noIndex`
* - 支持自定义方法
* @type {?|undefined}
*/
STColumn.prototype.noIndex;
/**
* 条件表达式
* - 仅赋值 `columns` 时执行一次
* - 可调用 `resetColumns()` 再一次触发
* @type {?|undefined}
*/
STColumn.prototype.iif;
/**
* 统计
* @type {?|undefined}
*/
STColumn.prototype.statistical;
/**
* @ignore internal property
* @type {?|undefined}
*/
STColumn.prototype._sort;
/* Skipping unhandled member: [key: string]: any;*/
}
/**
* @record
*/
function STColumnTitle() { }
if (false) {
/**
* Text of header, can be choose one of `text` or `i18n`
* @type {?|undefined}
*/
STColumnTitle.prototype.text;
/**
* I18n key of header, can be choose one of `text` or `i18n`
* @type {?|undefined}
*/
STColumnTitle.prototype.i18n;
/**
* Optional information of header
* @type {?|undefined}
*/
STColumnTitle.prototype.optional;
/**
* Optional help of header
* @type {?|undefined}
*/
STColumnTitle.prototype.optionalHelp;
/* Skipping unhandled member: [key: string]: any;*/
}
/**
* @record
*/
function STStatistical() { }
if (false) {
/** @type {?} */
STStatistical.prototype.type;
/**
* 保留小数位数,默认:`2`
* @type {?|undefined}
*/
STStatistical.prototype.digits;
/**
* 是否需要货币格式化,默认以下情况为 `true`
* - `type` 为 `STStatisticalFn`、 `sum`、`average`、`max`、`min`
* @type {?|undefined}
*/
STStatistical.prototype.currency;
}
/**
* @record
*/
function STStatisticalResults() { }
/**
* @record
*/
function STStatisticalResult() { }
if (false) {
/** @type {?} */
STStatisticalResult.prototype.value;
/** @type {?|undefined} */
STStatisticalResult.prototype.text;
}
/**
* @record
*/
function STColumnSort() { }
if (false) {
/**
* 排序的默认受控属性
* @type {?|undefined}
*/
STColumnSort.prototype.default;
/**
* 本地数据的排序函数,使用一个函数(参考 [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) 的 compareFunction)
* - `null` 忽略本地排序,但保持排序功能
* @type {?|undefined}
*/
STColumnSort.prototype.compare;
/**
* 远程数据的排序时后端相对应的KEY,默认使用 `index` 属性
* - 若 `multiSort: false` 时:`key: 'name' => ?name=1&pi=1`
* - 若 `multiSort: true` 允许多个排序 key 存在,或使用 `STMultiSort` 指定多列排序key合并规则
* @type {?|undefined}
*/
STColumnSort.prototype.key;
/**
* 远程数据的排序时后端相对应的VALUE
* - `{ ascend: '0', descend: '1' }` 结果 `?name=1&pi=1`
* - `{ ascend: 'asc', descend: 'desc' }` 结果 `?name=desc&pi=1`
* @type {?|undefined}
*/
STColumnSort.prototype.reName;
}
/**
* @record
*/
function STSortMap() { }
if (false) {
/**
* 是否启用排序
* @type {?|undefined}
*/
STSortMap.prototype.enabled;
/* Skipping unhandled member: [key: string]: any;*/
}
/**
* @record
*/
function STColumnFilter() { }
if (false) {
/**
* 搜索方式
* - `defualt` 默认形式
* - `keyword` 文本框形式
* @type {?|undefined}
*/
STColumnFilter.prototype.type;
/**
* 表头的筛选菜单项,至少一项才会生效
* - 当 `type='keyword'` 时可为空
* @type {?|undefined}
*/
STColumnFilter.prototype.menus;
/**
* 本地数据的筛选函数
* @type {?|undefined}
*/
STColumnFilter.prototype.fn;
/**
* 标识数据是否已过滤,筛选图标会高亮
* @type {?|undefined}
*/
STColumnFilter.prototype.default;
/**
* 自定义 filter 图标
* - 当 `type='default'` 默认 `filter`
* - 当 `type='keyword'` 默认 `search`
* @type {?|undefined}
*/
STColumnFilter.prototype.icon;
/**
* 确认按钮文本,默认 `确认`
* @type {?|undefined}
*/
STColumnFilter.prototype.confirmText;
/**
* 清除按钮文本,默认 `重置`
* @type {?|undefined}
*/
STColumnFilter.prototype.clearText;
/**
* 是否多选,默认 `true`
* @type {?|undefined}
*/
STColumnFilter.prototype.multiple;
/**
* 远程数据的过滤时后端相对应的KEY,默认使用 `index` 属性
* `key: 'name'` 结果 `?name=1&pi=1`
* @type {?|undefined}
*/
STColumnFilter.prototype.key;
/**
* 远程数据的过滤时后端相对应的VALUE
* - 默认当 `multiple: true` 时以英文逗号拼接的字符串
* \@return 返回为 Object 对象
* @type {?|undefined}
*/
STColumnFilter.prototype.reName;
}
/**
* @record
*/
function STColumnFilterMenu() { }
if (false) {
/**
* 文本
* - 当 `type: 'keyword'` 时表示 `placeholder`
* @type {?|undefined}
*/
STColumnFilterMenu.prototype.text;
/**
* 值
* @type {?|undefined}
*/
STColumnFilterMenu.prototype.value;
/**
* 是否选中
* @type {?|undefined}
*/
STColumnFilterMenu.prototype.checked;
/**
* 权限,等同 [ACLCanType](https://ng-alain.com/acl/getting-started/#ACLCanType) 参数值
* @type {?|undefined}
*/
STColumnFilterMenu.prototype.acl;
/* Skipping unhandled member: [key: string]: any;*/
}
/**
* @record
*/
function STColumnSelection() { }
if (false) {
/**
* 选择项显示的文字
* @type {?}
*/
STColumnSelection.prototype.text;
/**
* 选择项点击回调,允许对参数 `data.checked` 进行操作
* @type {?}
*/
STColumnSelection.prototype.select;
/**
* 权限,等同 `can()` 参数值
* @type {?|undefined}
*/
STColumnSelection.prototype.acl;
}
/**
* 当 `type=yn` 有效
* @record
*/
function STColumnYn() { }
if (false) {
/**
* 真值条件,(默认:`true`)
* @type {?|undefined}
*/
STColumnYn.prototype.truth;
/**
* 徽章 `true` 时文本,(默认:`是`)
* @type {?|undefined}
*/
STColumnYn.prototype.yes;
/**
* 徽章 `false` 时文本,(默认:`否`)
* @type {?|undefined}
*/
STColumnYn.prototype.no;
/**
* 徽章显示风格
* - `full` 图标和文本
* - `icon` 图标
* - `text` 文本
* @type {?|undefined}
*/
STColumnYn.prototype.mode;
}
/**
* @record
*/
function STIcon() { }
if (false) {
/**
* 图标类型
* @type {?}
*/
STIcon.prototype.type;
/**
* 图标主题风格,默认:`outline`
* @type {?|undefined}
*/
STIcon.prototype.theme;
/**
* 是否有旋转动画,默认:`false`
* @type {?|undefined}
*/
STIcon.prototype.spin;
/**
* 仅适用双色图标,设置双色图标的主要颜色,仅对当前 icon 生效
* @type {?|undefined}
*/
STIcon.prototype.twoToneColor;
/**
* 指定来自 IconFont 的图标类型
* @type {?|undefined}
*/
STIcon.prototype.iconfont;
}
/**
* 按钮配置
* @record
*/
function STColumnButton() { }
if (false) {
/**
* 文本
* @type {?|undefined}
*/
STColumnButton.prototype.text;
/**
* 文本 i18n
* @type {?|undefined}
*/
STColumnButton.prototype.i18n;
/**
* 图标
* @type {?|undefined}
*/
STColumnButton.prototype.icon;
/**
* 按钮类型
* - `none` 无任何互动
* - `del` 删除,默认开启 `pop: true`
* - `modal` 对话框,需要指定 `component` 才会生效
* - `static` 静态对话框,需要指定 `component` 才会生效
* - `drawer` 抽屉,需要指定 `component` 才会生效
* - `link` 链接,当 `click` 返回字符串时自动调用 `navigateByUrl` 导航
* - `divider` 分割线
* @type {?|undefined}
*/
STColumnButton.prototype.type;
/**
* 点击回调
* - Function
* - `type=modal` 只会在当有传回值时才会触发回调
* - reload:重新刷新当前页
* - load:重新加载数据,并重置页码为:`1`
*
* \@todo Bad parameter design
* @type {?|undefined}
*/
STColumnButton.prototype.click;
/**
* 气泡确认框参数,若 `string` 类型表示标题
* @type {?|undefined}
*/
STColumnButton.prototype.pop;
/**
* 对话框参数
* @type {?|undefined}
*/
STColumnButton.prototype.modal;
/**
* 抽屉参数
* @type {?|undefined}
*/
STColumnButton.prototype.drawer;
/**
* 下拉菜单,当存在时以 `dropdown` 形式渲染
* - 只支持一级
* @type {?|undefined}
*/
STColumnButton.prototype.children;
/**
* 权限,等同 [ACLCanType](https://ng-alain.com/acl/getting-started/#ACLCanType) 参数值
* @type {?|undefined}
*/
STColumnButton.prototype.acl;
/**
* Conditional expression
*
* \@todo Bad parameter design
* @type {?|undefined}
*/
STColumnButton.prototype.iif;
/**
* Conditional expression rendering behavior, can be set to `hide` (default) or `disabled`
* @type {?|undefined}
*/
STColumnButton.prototype.iifBehavior;
/** @type {?|undefined} */
STColumnButton.prototype.tooltip;
/* Skipping unhandled member: [key: string]: any;*/
}
/**
* @record
*/
function STColumnButtonOK() { }
if (false) {
/** @type {?} */
STColumnButtonOK.prototype.record;
/**
* Modal or drawer return value when trigger confirm.
* @type {?|undefined}
*/
STColumnButtonOK.prototype.ret;
/** @type {?|undefined} */
STColumnButtonOK.prototype.instance;
/** @type {?} */
STColumnButtonOK.prototype.event;
}
/**
* @record
*/
function STColumnButtonModal() { }
if (false) {
/**
* 对话框组件对象,务必在 `entryComponents` 注册
* @type {?|undefined}
*/
STColumnButtonModal.prototype.component;
/**
* 对话框参数
* @type {?|undefined}
*/
STColumnButtonModal.prototype.params;
/**
* 对话框目标组件的接收参数名,默认:`record`
* @type {?|undefined}
*/
STColumnButtonModal.prototype.paramsName;
}
/**
* @record
*/
function STColumnButtonModalConfig() { }
if (false) {
/**
* 指定模态框目标组件的接收参数名,默认:`record`
* @type {?|undefined}
*/
STColumnButtonModalConfig.prototype.paramsName;
/**
* 大小;例如:lg、600,默认:`lg`
* @type {?|undefined}
*/
STColumnButtonModalConfig.prototype.size;
/**
* 对话框 [ModalOptions](https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/modal/modal-types.ts) 参数
* @type {?|undefined}
*/
STColumnButtonModalConfig.prototype.modalOptions;
/**
* 是否精准(默认:`true`),若返回值非空值(`null`或`undefined`)视为成功,否则视为错误
* @type {?|undefined}
*/
STColumnButtonModalConfig.prototype.exact;
}
/**
* @record
*/
function STColumnButtonDrawer() { }
if (false) {
/**
* 标题
* @type {?|undefined}
*/
STColumnButtonDrawer.prototype.title;
/**
* 抽屉组件对象,务必在 `entryComponents` 注册
* @type {?|undefined}
*/
STColumnButtonDrawer.prototype.component;
/**
* 抽屉参数
* @type {?|undefined}
*/
STColumnButtonDrawer.prototype.params;
/**
* 抽屉目标组件的接收参数名,默认:`record`
* @type {?|undefined}
*/
STColumnButtonDrawer.prototype.paramsName;
}
/**
* @record
*/
function STColumnButtonDrawerConfig() { }
if (false) {
/**
* 抽屉目标组件的接收参数名,默认:`record`
* @type {?|undefined}
*/
STColumnButtonDrawerConfig.prototype.paramsName;
/**
* 大小;例如:lg、600,默认:`md`
*
* | 类型 | 默认大小 |
* | --- | ------ |
* | `sm` | `300` |
* | `md` | `600` |
* | `lg` | `900` |
* | `xl` | `1200` |
*
* > 以上值,可通过覆盖相应的LESS参数自行调整
* @type {?|undefined}
*/
STColumnButtonDrawerConfig.prototype.size;
/**
* 是否包含底部工具条,默认:`true`
* @type {?|undefined}
*/
STColumnButtonDrawerConfig.prototype.footer;
/**
* 底部工具条高度,默认:`55`
* @type {?|undefined}
*/
STColumnButtonDrawerConfig.prototype.footerHeight;
/**
* 抽屉 [NzDrawerOptions](https://ng.ant.design/components/drawer/zh#nzdraweroptions) 参数
* @type {?|undefined}
*/
STColumnButtonDrawerConfig.prototype.drawerOptions;
}
/**
* @record
*/
function STColumnButtonPop() { }
if (false) {
/**
* Title of the popover, default: `确认删除吗?`
* @type {?|undefined}
*/
STColumnButtonPop.prototype.title;
/**
* Popover trigger mode, default: `click`
* @type {?|undefined}
*/
STColumnButtonPop.prototype.trigger;
/**
* The position of the popover relative to the target, default: `top`
* @type {?|undefined}
*/
STColumnButtonPop.prototype.placement;
/**
* Class name of the popover card
* @type {?|undefined}
*/
STColumnButtonPop.prototype.overlayClassName;
/**
* Style of the popover card
* @type {?|undefined}
*/
STColumnButtonPop.prototype.overlayStyle;
/**
* Text of the Cancel button
* @type {?|undefined}
*/
STColumnButtonPop.prototype.cancelText;
/**
* Text of the Confirm button
* @type {?|undefined}
*/
STColumnButtonPop.prototype.okText;
/**
* Button `type` of the Confirm button
* @type {?|undefined}
*/
STColumnButtonPop.prototype.okType;
/**
* Customize icon of confirmation
* @type {?|undefined}
*/
STColumnButtonPop.prototype.icon;
/**
* Whether to directly emit `onConfirm` without showing Popconfirm, default: `() => false`
* @type {?|undefined}
*/
STColumnButtonPop.prototype.condition;
}
/**
* @record
*/
function STReqReNameType() { }
if (false) {
/** @type {?|undefined} */
STReqReNameType.prototype.pi;
/** @type {?|undefined} */
STReqReNameType.prototype.ps;
/** @type {?|undefined} */
STReqReNameType.prototype.skip;
/** @type {?|undefined} */
STReqReNameType.prototype.limit;
}
/**
* @record
*/
function STResReNameType() { }
if (false) {
/** @type {?|undefined} */
STResReNameType.prototype.total;
/** @type {?|undefined} */
STResReNameType.prototype.list;
}
/**
* @record
*/
function STExportOptions() { }
if (false) {
/**
* @ignore internal property
* @type {?|undefined}
*/
STExportOptions.prototype._d;
/**
* @ignore internal property
* @type {?|undefined}
*/
STExportOptions.prototype._c;
/**
* 工作溥名
* @type {?|undefined}
*/
STExportOptions.prototype.sheetname;
/**
* 文件名
* @type {?|undefined}
*/
STExportOptions.prototype.filename;
/**
* triggers when saveas
* @type {?|undefined}
*/
STExportOptions.prototype.callback;
}
/**
* 单排序规则
* - 若不指定,则返回:`columnName=ascend|descend`
* - 若指定,则返回:`sort=columnName.(ascend|descend)`
* @record
*/
function STSingleSort() { }
if (false) {
/**
* 请求参数名,默认:`sort`
* @type {?|undefined}
*/
STSingleSort.prototype.key;
/**
* 列名与状态间分隔符,默认:`.`
* @type {?|undefined}
*/
STSingleSort.prototype.nameSeparator;
}
/**
* 多排序相同排序 key 时合并规则
* @record
*/
function STMultiSort() { }
if (false) {
/**
* 请求参数名,默认:`sort`
* @type {?|undefined}
*/
STMultiSort.prototype.key;
/**
* 不同属性间分隔符,默认:`-`
* @type {?|undefined}
*/
STMultiSort.prototype.separator;
/**
* 列名与状态间分隔符,默认:`.`
* @type {?|undefined}
*/
STMultiSort.prototype.nameSeparator;
/**
* 是否全局多排序模式,默认:`true`
* - `true` 表示所有 `st` 默认为多排序
* - `false` 表示需要为每个 `st` 添加 `multiSort` 才会视为多排序模式
* @type {?|undefined}
*/
STMultiSort.prototype.global;
/**
* 是否保持空值的键名,默认:`true`
* - `true` 表示不管是否有排序都会发送 `key` 键名
* - `false` 表示无排序动作时不会发送 `key` 键名
* @type {?|undefined}
*/
STMultiSort.prototype.keepEmptyKey;
}
/**
* 徽标信息
* @record
*/
function STColumnBadge() { }
/**
* @record
*/
function STColumnBadgeValue() { }
if (false) {
/**
* 文本
* @type {?|undefined}
*/
STColumnBadgeValue.prototype.text;
/**
* 徽标颜色值
* @type {?|undefined}
*/
STColumnBadgeValue.prototype.color;
}
/**
* 标签信息
* @record
*/
function STColumnTag() { }
/**
* @record
*/
function STColumnTagValue() { }
if (false) {
/**
* 文本
* @type {?|undefined}
*/
STColumnTagValue.prototype.text;
/**
* 颜色值,支持预设和色值
* - 预设:geekblue,blue,purple,success,red,volcano,orange,gold,lime,green,cyan
* - 色值:#f50,#ff0
* @type {?|undefined}
*/
STColumnTagValue.prototype.color;
}
/**
* 回调数据
* @record
*/
function STChange() { }
if (false) {
/**
* 回调类型
* @type {?}
*/
STChange.prototype.type;
/**
* 当前页码
* @type {?}
*/
STChange.prototype.pi;
/**
* 每页数量
* @type {?}
*/
STChange.prototype.ps;
/**
* 数据总量
* @type {?}
*/
STChange.prototype.total;
/**
* `loaded` 参数
* @type {?|undefined}
*/
STChange.prototype.loaded;
/**
* `checkbox` 参数
* @type {?|undefined}
*/
STChange.prototype.checkbox;
/**
* `radio` 参数
* @type {?|undefined}
*/
STChange.prototype.radio;
/**
* 排序参数
* @type {?|undefined}
*/
STChange.prototype.sort;
/**
* 过滤参数
* @type {?|undefined}
*/
STChange.prototype.filter;
/**
* 行点击参数
* @type {?|undefined}
*/
STChange.prototype.click;
/**
* 行双击参数
* @type {?|undefined}
*/
STChange.prototype.dblClick;
/**
* `expand` 参数
* @type {?|undefined}
*/
STChange.prototype.expand;
}
/**
* 行单击参数
* @record
*/
function STChangeSort() { }
if (false) {
/** @type {?|undefined} */
STChangeSort.prototype.value;
/** @type {?|undefined} */
STChangeSort.prototype.map;
/** @type {?|undefined} */
STChangeSort.prototype.column;
}
/**
* 行单击参数
* @record
*/
function STChangeRowClick() { }
if (false) {
/** @type {?|undefined} */
STChangeRowClick.prototype.e;
/** @type {?|undefined} */
STChangeRowClick.prototype.item;
/** @type {?|undefined} */
STChangeRowClick.prototype.index;
}
/**
* @record
*/
function STError() { }
if (false) {
/** @type {?|undefined} */
STError.prototype.type;
/** @type {?|undefined} */
STError.prototype.error;
}
/**
* @fileoverview added by tsickle
* Generated from: st-row.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var STRowSource = /** @class */ (function () {
function STRowSource() {
this.titles = {};
this.rows = {};
}
/**
* @param {?} type
* @param {?} path
* @param {?} ref
* @return {?}
*/
STRowSource.prototype.add = /**
* @param {?} type
* @param {?} path
* @param {?} ref
* @return {?}
*/
function (type, path, ref) {
this[type === 'title' ? 'titles' : 'rows'][path] = ref;
};
/**
* @param {?} path
* @return {?}
*/
STRowSource.prototype.getTitle = /**
* @param {?} path
* @return {?}
*/
function (path) {
return this.titles[path];
};
/**
* @param {?} path
* @return {?}
*/
STRowSource.prototype.getRow = /**
* @param {?} path
* @return {?}
*/
function (path) {
return this.rows[path];
};
STRowSource.decorators = [
{ type: core.Injectable }
];
return STRowSource;
}());
if (false) {
/**
* @type {?}
* @private
*/
STRowSource.prototype.titles;
/**
* @type {?}
* @private
*/
STRowSource.prototype.rows;
}
var STRowDirective = /** @class */ (function () {
function STRowDirective(ref, source) {
this.ref = ref;
this.source = source;
}
/**
* @return {?}
*/
STRowDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.source.add(this.type, this.id, this.ref);
};
STRowDirective.decorators = [
{ type: core.Directive, args: [{ selector: '[st-row]' },] }
];
/** @nocollapse */
STRowDirective.ctorParameters = function () { return [
{ type: core.TemplateRef },
{ type: STRowSource, decorators: [{ type: core.Host }] }
]; };
STRowDirective.propDecorators = {
id: [{ type: core.Input, args: ['st-row',] }],
type: [{ type: core.Input }]
};
return STRowDirective;
}());
if (false) {
/** @type {?} */
STRowDirective.prototype.id;
/** @type {?} */
STRowDirective.prototype.type;
/**
* @type {?}
* @private
*/
STRowDirective.prototype.ref;
/**
* @type {?}
* @private
*/
STRowDirective.prototype.source;
}
/**
* @fileoverview added by tsickle
* Generated from: st.config.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var STConfig = /** @class */ (function () {
function STConfig() {
/**
* table大小
*/
this.size = 'default';
/**
* 是否开启响应式,默认:`true`
*/
this.responsive = true;
/**
* 是否在小屏幕下才显示顶部与底部,默认:`false`
*/
this.responsiveHideHeaderFooter = false;
/**
* 请求体配置
*/
this.req = {
type: 'page',
method: 'GET',
allInBody: false,
lazyLoad: false,
reName: { pi: 'pi', ps: 'ps', skip: 'skip', limit: 'limit' },
};
/**
* 返回体配置
*/
this.res = {
reName: { list: ['list'], total: ['total'] },
};
/**
* 返回体配置
*/
this.page = {
front: true,
zeroIndexed: false,
position: 'bottom',
placement: 'right',
show: true,
showSize: false,
pageSizes: [10, 20, 30, 40, 50],
showQuickJumper: false,
total: true,
toTop: true,
toTopOffset: 100,
};
/**
* 单排序规则
* - 若不指定,则返回:`columnName=ascend|descend`
* - 若指定,则返回:`sort=columnName.(ascend|descend)`
*/
this.singleSort = null;
/**
* 是否多排序,当 `sort` 多个相同值时自动合并,建议后端支持时使用
*/
this.multiSort = null;
/**
* 按钮模态框配置
*/
this.modal = {
paramsName: 'record',
size: 'lg',
exact: true,
};
/**
* 按钮抽屉配置
*/
this.drawer = {
paramsName: 'record',
size: 'md',
footer: true,
footerHeight: 55,
};
/**
* 气泡参数
*/
this.pop = {