Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bi-types

Package Overview
Dependencies
Maintainers
2
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bi-types - npm Package Compare versions

Comparing version 1.0.0-qbi39-open.5 to 1.0.0-qbi39-open.6

25

declaration/component-meta.d.ts

@@ -8,14 +8,21 @@ /**

/**
* 面板配置
*/
export interface IPropsSchema {
/** 数据面板配置 */
dataSchema?: IDataSchema;
/** 样式面板配置 */
styleSchema?: IStyleSchema;
/** 高级面板配置 */
advancedSchema?: IStyleSchema;
}
/**
* 组件元信息
*/
export interface BIComponentMeta {
propsSchema?: {
/** 数据面板配置 */
dataSchema?: IDataSchema;
/** 样式面板配置 */
styleSchema?: IStyleSchema;
/** 高级面板配置 */
advancedSchema?: IStyleSchema;
};
propsSchema?: IPropsSchema;
}
/**
* 开放组件生命周期属性
*/
export interface BIComponentLifecycleProps<T = object> {

@@ -44,3 +51,3 @@ container?: HTMLElement;

/**
* 生命周期
* 开放组件生命周期
*/

@@ -47,0 +54,0 @@ export interface BIComponentLifecycle {

@@ -5,22 +5,17 @@ /**

*/
/** 字段类型枚举 */
export declare enum IRuleType {
/** 维度类型 */
dimension = "dimension",
/** 度量类型 */
measure = "measure",
/** 任意类型 */
all = "all"
}
/** 区块功能枚举 */
export declare enum IAreaType {
/** 设置为列,RuleType一般对应于度量类型 */
column = "column",
/** 设置为行,RuleType一般对应于维度类型 */
row = "row",
/** 设置为钻取维度,RuleType必须是维度类型 */
drill = "drill",
/** 设置为过滤器,RuleType可以是维度或者度量 */
filters = "filters"
}
/**
* 字段类型枚举
* - dimension: 维度类型
* - measure: 度量类型
* - all: 任意类型
*/
export declare type IRuleType = 'dimension' | 'measure' | 'all';
/**
* 区块功能枚举
* - column: 设置为列,RuleType 一般对应于度量类型
* - row: 设置为行,RuleType 一般对应于维度类型
* - drill: 设置为钻取维度,RuleType必须是维度类型
* - filters: 设置为过滤器,RuleType可以是维度或者度量
* */
export declare type IAreaType = 'column' | 'row' | 'drill' | 'filters';
export interface IDataSchemaConfig {

@@ -34,7 +29,9 @@ /** Schema所包含的区块 */

/** 最大的取数数量限制 */
limit: number;
limitNum: number;
}
export interface IDataOptions {
id?: 'string';
/** 设置轴查询时对应的类型 */
id?: string;
/**
* 设置轴查询时对应的类型
* */
queryAxis?: IAreaType;

@@ -62,4 +59,7 @@ /** 区块名称 */

}
/**
* 样式面板配置
*/
export interface IDataSchema {
schema: IDataSchemaConfig;
}

@@ -18,6 +18,6 @@ /**

interface IAndDepend {
$and: IDepend[];
$and?: IDepend[];
}
interface IOrDepend {
$or: IDepend[];
$or?: IDepend[];
}

@@ -34,12 +34,21 @@ export declare type IDepend = IBaseDepend & IAndDepend & IOrDepend;

}
export interface IValidationResult {
pass: boolean;
details: {
field: string;
message: string;
}[];
}
export interface IStyleSchema {
/** styleSchema 配置 */
schema: ISchemaConfig;
schema: ISchemaBase;
/** 自定义编辑器 */
localEditors: {
[key: string]: React.ComponentType;
localEditors?: {
[key: string]: React.ComponentType<any>;
};
/** change 事件处理函数 */
onChange?: (data?: any, currentSchema?: ISchema, keyPaths?: string[], validation?: IValidationResult) => void;
}
/** styleSchema 配置 */
export interface ISchemaConfig<T = string> {
export interface ISchemaBase<P = any, T = string> {
/** 使用的子组件类型 */

@@ -52,3 +61,3 @@ type: T;

/** 子字段 */
properties?: any;
properties?: ISchemaProperties;
/** 容器类名 */

@@ -81,3 +90,3 @@ className?: string;

/** 子组件 props */
props?: ISchemaConfig;
props?: P;
/** 字段重定向(点分字符串) */

@@ -90,2 +99,29 @@ redirect?: string;

}
/** type 为 object 的配置 */
export interface ISchemaContainerObject extends ISchemaBase {
type: 'object';
props?: {
/** 分组类型 */
mode?: 'tabs' | 'collapse';
};
/** 提示气泡 */
info?: string;
/** 布局属性 */
grid?: {
row: number;
col: number;
};
}
/** type 为 array 的配置 */
export interface ISchemaContainerArray extends ISchemaBase {
type: 'array';
/** 数组元素默认值 */
arrayItemDefaultValue?: any;
}
export declare type ISchemaContainer = ISchemaContainerObject | ISchemaContainerArray;
export declare type ISchema = ISchemaContainer | ISchemaBase;
/** properties 属性 */
export declare type ISchemaProperties = {
[key: string]: ISchema;
} | string;
export {};

@@ -1,24 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.IAreaType = exports.IRuleType = void 0;
var IRuleType;
exports.IRuleType = IRuleType;
(function (IRuleType) {
IRuleType["dimension"] = "dimension";
IRuleType["measure"] = "measure";
IRuleType["all"] = "all";
})(IRuleType || (exports.IRuleType = IRuleType = {}));
var IAreaType;
exports.IAreaType = IAreaType;
(function (IAreaType) {
IAreaType["column"] = "column";
IAreaType["row"] = "row";
IAreaType["drill"] = "drill";
IAreaType["filters"] = "filters";
})(IAreaType || (exports.IAreaType = IAreaType = {}));
"use strict";
{
"name": "bi-types",
"version": "1.0.0-qbi39-open.5",
"version": "1.0.0-qbi39-open.6",
"dependencies": {},

@@ -5,0 +5,0 @@ "main": "dist/main",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc