Skip to content

Commit

Permalink
build: build lib
Browse files Browse the repository at this point in the history
  • Loading branch information
lljj-x committed Jul 20, 2020
1 parent 76e9d13 commit b95799e
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 130 deletions.
126 changes: 63 additions & 63 deletions packages/lib/dist/vueJsonSchemaForm.esm.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @license @lljj/vue-json-schema-form (c) 2020-2020 Liu.Jun License: Apache-2.0 */
import Vue from 'vue';

/**
* Created by Liu.Jun on 2020/4/22 18:58.
/**
* Created by Liu.Jun on 2020/4/22 18:58.
*/
// 递归参数,统一props
var vueProps = {
Expand Down Expand Up @@ -258,8 +258,8 @@ function localizeZh(errors) {
}
}

/**
* Created by Liu.Jun on 2020/4/30 11:22.
/**
* Created by Liu.Jun on 2020/4/30 11:22.
*/
var i18n = {
$$currentLocalizeFn: localizeZh,
Expand All @@ -271,8 +271,8 @@ var i18n = {
}
};

/**
* Created by Liu.Jun on 2020/4/25 14:45.
/**
* Created by Liu.Jun on 2020/4/25 14:45.
*/

var pathSeparator = '.'; // nodePath 转css类名
Expand Down Expand Up @@ -584,8 +584,8 @@ function findSchemaDefinition($ref) {
return current;
}

/**
* Created by Liu.Jun on 2020/4/25 10:53.
/**
* Created by Liu.Jun on 2020/4/25 10:53.
*/
// 通过 index 上移
function moveUpAt(target, index) {
Expand Down Expand Up @@ -627,8 +627,8 @@ function intersection(arr1, arr2) {
});
}

/**
* Created by Liu.Jun on 2020/4/17 17:05.
/**
* Created by Liu.Jun on 2020/4/17 17:05.
*/
// is object
function isObject(thing) {
Expand Down Expand Up @@ -8036,9 +8036,9 @@ function createAjvInstance() {
/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/);
return ajvInstance;
}
/**
* 将错误输出从ajv转换为jsonschema使用的格式
* At some point, components should be updated to support ajv.
/**
* 将错误输出从ajv转换为jsonschema使用的格式
* At some point, components should be updated to support ajv.
*/


Expand Down Expand Up @@ -8068,14 +8068,14 @@ function transformAjvErrors() {
};
});
}
/**
* 通过 schema校验formData并返回错误信息
* @param formData 校验的数据
* @param schema
* @param transformErrors function - 转换错误, 如个性化的配置
* @param additionalMetaSchemas 数组 添加 ajv metaSchema
* @param customFormats 添加 ajv 自定义 formats
* @returns {{errors: ([]|{stack: string, schemaPath: *, name: *, property: string, message: *, params: *}[])}}
/**
* 通过 schema校验formData并返回错误信息
* @param formData 校验的数据
* @param schema
* @param transformErrors function - 转换错误, 如个性化的配置
* @param additionalMetaSchemas 数组 添加 ajv metaSchema
* @param customFormats 添加 ajv 自定义 formats
* @returns {{errors: ([]|{stack: string, schemaPath: *, name: *, property: string, message: *, params: *}[])}}
*/


Expand Down Expand Up @@ -8210,11 +8210,11 @@ function validateFormDataAndTransformMsg() {
return preErrors;
}, []);
}
/**
* 根据模式验证数据,如果数据有效则返回true,否则返回* false。如果模式无效,那么这个函数将返回* false。
* @param schema
* @param data
* @returns {boolean|PromiseLike<any>}
/**
* 根据模式验证数据,如果数据有效则返回true,否则返回* false。如果模式无效,那么这个函数将返回* false。
* @param schema
* @param data
* @returns {boolean|PromiseLike<any>}
*/

function isValid(schema, data) {
Expand Down Expand Up @@ -9472,8 +9472,8 @@ Object.entries(widgetComponents).forEach(function (_ref) {
return Vue.component(key, value);
});

/**
* Created by Liu.Jun on 2020/4/21 18:23.
/**
* Created by Liu.Jun on 2020/4/21 18:23.
*/
var CheckboxesWidget = widgetComponents.CheckboxesWidget,
RadioWidget = widgetComponents.RadioWidget,
Expand Down Expand Up @@ -9522,9 +9522,9 @@ var StringField = {
}
};

/**
* Created by Liu.Jun on 2020/4/21 9:24.
* NumberField 复用StringField
/**
* Created by Liu.Jun on 2020/4/21 9:24.
* NumberField 复用StringField
*/
var NumberField = {
name: 'NumberField',
Expand All @@ -9537,9 +9537,9 @@ var NumberField = {
}
};

/**
* Created by Liu.Jun on 2020/4/21 9:24.
* IntegerField 复用StringField
/**
* Created by Liu.Jun on 2020/4/21 9:24.
* IntegerField 复用StringField
*/
var IntegerField = {
name: 'IntegerField',
Expand Down Expand Up @@ -9579,19 +9579,19 @@ var BooleanField = {
}
};

/**
* 根据schema计算出formData的初始值
* 源码来自:react-jsonschema-form 做了细节调整,重写了allOf实现逻辑
* https://github.com/rjsf-team/react-jsonschema-form/blob/master/packages/core/src/utils.js#L283
/**
* 根据schema计算出formData的初始值
* 源码来自:react-jsonschema-form 做了细节调整,重写了allOf实现逻辑
* https://github.com/rjsf-team/react-jsonschema-form/blob/master/packages/core/src/utils.js#L283
*/
/**
* When merging defaults and form data, we want to merge in this specific way:
* - objects are deeply merged
* - arrays are merged in such a way that:
* - when the array is set in form data, only array entries set in form data
* are deeply merged; additional entries from the defaults are ignored
* - when the array is not set in form data, the default is copied over
* - scalars are overwritten/set by form data
/**
* When merging defaults and form data, we want to merge in this specific way:
* - objects are deeply merged
* - arrays are merged in such a way that:
* - when the array is set in form data, only array entries set in form data
* are deeply merged; additional entries from the defaults are ignored
* - when the array is not set in form data, the default is copied over
* - scalars are overwritten/set by form data
*/

function mergeDefaultsWithFormData(defaults, formData) {
Expand Down Expand Up @@ -9768,8 +9768,8 @@ function getDefaultFormState(_schema, formData) {
return formData || defaults;
}

/**
* Created by Liu.Jun on 2020/4/24 16:47.
/**
* Created by Liu.Jun on 2020/4/24 16:47.
*/
// 支持数字排序 ,新增 ,删除等操作
var ArrayOrderList = {
Expand Down Expand Up @@ -10585,8 +10585,8 @@ var OneOfField = {
}
};

/**
* Created by Liu.Jun on 2020/4/20 9:55 下午.
/**
* Created by Liu.Jun on 2020/4/20 9:55 下午.
*/

var FIELDS_MAPS = {
Expand Down Expand Up @@ -10789,9 +10789,9 @@ function orderProperties(properties, order) {
complete.splice.apply(complete, [restIndex, 1].concat(_toConsumableArray(rest)));
return complete;
}
/**
* 单个匹配
* 常量,或者只有一个枚举
/**
* 单个匹配
* 常量,或者只有一个枚举
*/

function isConstant(schema) {
Expand All @@ -10808,12 +10808,12 @@ function toConstant(schema) {

throw new Error('schema cannot be inferred as a constant');
}
/**
* 是否为选择列表
* 枚举 或者 oneOf anyOf 每项都只有一个固定常量值
* @param _schema
* @param rootSchema
* @returns {boolean|*}
/**
* 是否为选择列表
* 枚举 或者 oneOf anyOf 每项都只有一个固定常量值
* @param _schema
* @param rootSchema
* @returns {boolean|*}
*/

function isSelect(_schema) {
Expand Down Expand Up @@ -11084,8 +11084,8 @@ __vue_render__$4._withStripped = true;
/* style */
const __vue_inject_styles__$4 = function (inject) {
if (!inject) return
inject("data-v-431cede5_0", { source: "\n.src-JsonSchemaForm-item-e4q8 {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n}\n", map: {"version":3,"sources":["/Users/ryuushun/liujun/git/vue-element-schema-form/packages/lib/src/JsonSchemaForm/FormFooter.vue"],"names":[],"mappings":";AAwBA;IACA,iBAAA;IACA,yCAAA;IACA,iBAAA;AACA","file":"FormFooter.vue","sourcesContent":["<template>\n <el-form-item :class=\"$style.item\">\n <el-button size=\"small\" @click=\"$emit('onCancel')\">{{ cancelBtn }}</el-button>\n <el-button size=\"small\" type=\"primary\" @click=\"$emit('onSubmit')\">{{ okBtn }}</el-button>\n </el-form-item>\n</template>\n\n<script>\n export default {\n name: 'FormFooter',\n props: {\n okBtn: {\n type: String,\n default: '保存'\n },\n cancelBtn: {\n type: String,\n default: '取消'\n },\n }\n };\n</script>\n\n<style module>\n .item {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n }\n</style>\n"]}, media: undefined });
Object.defineProperty(this, "$style", { value: {"item":"src-JsonSchemaForm-item-e4q8"} });
inject("data-v-25c5ccb1_0", { source: "\n.src-JsonSchemaForm-item-1UFV {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n}\n", map: {"version":3,"sources":["D:\\code\\git_my\\vue-json-schema-form\\packages\\lib\\src\\JsonSchemaForm\\FormFooter.vue"],"names":[],"mappings":";AAwBA;IACA,iBAAA;IACA,yCAAA;IACA,iBAAA;AACA","file":"FormFooter.vue","sourcesContent":["<template>\r\n <el-form-item :class=\"$style.item\">\r\n <el-button size=\"small\" @click=\"$emit('onCancel')\">{{ cancelBtn }}</el-button>\r\n <el-button size=\"small\" type=\"primary\" @click=\"$emit('onSubmit')\">{{ okBtn }}</el-button>\r\n </el-form-item>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: 'FormFooter',\r\n props: {\r\n okBtn: {\r\n type: String,\r\n default: '保存'\r\n },\r\n cancelBtn: {\r\n type: String,\r\n default: '取消'\r\n },\r\n }\r\n };\r\n</script>\r\n\r\n<style module>\r\n .item {\r\n text-align: right;\r\n border-top: 1px solid rgba(0, 0, 0, 0.08);\r\n padding-top: 10px;\r\n }\r\n</style>\r\n"]}, media: undefined });
Object.defineProperty(this, "$style", { value: {"item":"src-JsonSchemaForm-item-1UFV"} });

};
/* scoped */
Expand Down Expand Up @@ -11259,8 +11259,8 @@ var JsonSchemaForm = {
}
};

/**
* Created by Liu.Jun on 2019/11/29 11:25.
/**
* Created by Liu.Jun on 2019/11/29 11:25.
*/

if (typeof window !== 'undefined' && window.Vue) {
Expand Down
Loading

0 comments on commit b95799e

Please sign in to comment.