@cniot/mdd-editor 0.2.0-beta.2 → 0.2.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +6 -0
- package/build/index.cjs.js +12 -12
- package/build/index.es.js +141 -10
- package/package.json +2 -2
- package/src/template/const.js +5 -0
package/build/index.es.js
CHANGED
|
@@ -2022,7 +2022,7 @@ const propFields = {
|
|
|
2022
2022
|
"showSearch"
|
|
2023
2023
|
],
|
|
2024
2024
|
"time-picker2": ["format", "outputFormat", "defaultValue", "placeholder", "name", "hasClear"],
|
|
2025
|
-
"date-picker2": ["format", "outputFormat", "showTime", "defaultValue", "placeholder", "name", "hasClear"],
|
|
2025
|
+
"date-picker2": ["format", "mode", "outputFormat", "showTime", "defaultValue", "placeholder", "name", "hasClear"],
|
|
2026
2026
|
switch: ["defaultValue", "checkedChildren", "unCheckedChildren", "name"],
|
|
2027
2027
|
radio: ["defaultValue", "name"],
|
|
2028
2028
|
"check-box": ["defaultValue", "name"],
|
|
@@ -19461,19 +19461,39 @@ const formValidator$1 = {
|
|
|
19461
19461
|
enum: [
|
|
19462
19462
|
{
|
|
19463
19463
|
label: "\u90AE\u7BB1",
|
|
19464
|
-
value: "
|
|
19464
|
+
value: "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"
|
|
19465
19465
|
},
|
|
19466
19466
|
{
|
|
19467
|
-
label: "\
|
|
19468
|
-
value: "
|
|
19467
|
+
label: "\u6570\u5B57",
|
|
19468
|
+
value: "^[+-]?\\d+(\\.\\d+)?$"
|
|
19469
19469
|
},
|
|
19470
19470
|
{
|
|
19471
|
-
label: "\
|
|
19472
|
-
value: "
|
|
19471
|
+
label: "\u6574\u6570",
|
|
19472
|
+
value: "^[+-]?\\d+$"
|
|
19473
19473
|
},
|
|
19474
19474
|
{
|
|
19475
19475
|
label: "QQ",
|
|
19476
|
-
value: "
|
|
19476
|
+
value: "^(\\+?[1-9]\\d*|0)$"
|
|
19477
|
+
},
|
|
19478
|
+
{
|
|
19479
|
+
label: "\u624B\u673A\u53F7",
|
|
19480
|
+
value: "^\\d{3}-\\d{8}$|^\\d{4}-\\d{7}$|^\\d{11}$"
|
|
19481
|
+
},
|
|
19482
|
+
{
|
|
19483
|
+
label: "\u8EAB\u4EFD\u8BC1\u53F7",
|
|
19484
|
+
value: "^\\d{15}$|^\\d{17}(\\d|x|X)$"
|
|
19485
|
+
},
|
|
19486
|
+
{
|
|
19487
|
+
label: "\u91D1\u989D",
|
|
19488
|
+
value: "^([\\u0024\\u00A2\\u00A3\\u00A4\\u20AC\\u00A5\\u20B1\\u20B9\\uFFE5]\\s*)(\\d+,?)+\\.?\\d*\\s*$"
|
|
19489
|
+
},
|
|
19490
|
+
{
|
|
19491
|
+
label: "\u4E2D\u6587",
|
|
19492
|
+
value: "^[\\u4e00-\\u9fa5]+$"
|
|
19493
|
+
},
|
|
19494
|
+
{
|
|
19495
|
+
label: "\u65E5\u671F",
|
|
19496
|
+
value: "^[0-9]+[./-][0-9]+[./-][0-9]+\\s*(?:[0-9]+\\s*:\\s*[0-9]+\\s*:\\s*[0-9]+)?$"
|
|
19477
19497
|
}
|
|
19478
19498
|
],
|
|
19479
19499
|
"x-designable-id": "df97o0zfqde"
|
|
@@ -19801,7 +19821,7 @@ var EditNumberPickerSchema = {
|
|
|
19801
19821
|
"x-designable-id": "edit-table-j744a1rk494"
|
|
19802
19822
|
}
|
|
19803
19823
|
};
|
|
19804
|
-
const selectSchema$
|
|
19824
|
+
const selectSchema$3 = {
|
|
19805
19825
|
...editCommonItem,
|
|
19806
19826
|
mode: {
|
|
19807
19827
|
type: "string | number",
|
|
@@ -19997,7 +20017,7 @@ var EditSelectSchema = {
|
|
|
19997
20017
|
title: "\u7F16\u8F91\u5668\u5C5E\u6027",
|
|
19998
20018
|
"x-designable-id": "xoirvxpflgk",
|
|
19999
20019
|
properties: {
|
|
20000
|
-
...selectSchema$
|
|
20020
|
+
...selectSchema$3
|
|
20001
20021
|
}
|
|
20002
20022
|
}
|
|
20003
20023
|
},
|
|
@@ -20629,6 +20649,112 @@ var EditAddressSelectSchema = {
|
|
|
20629
20649
|
"x-designable-id": "yk7opli2cp8"
|
|
20630
20650
|
}
|
|
20631
20651
|
};
|
|
20652
|
+
const selectSchema$2 = {
|
|
20653
|
+
...editCommonItem,
|
|
20654
|
+
mode: {
|
|
20655
|
+
type: "string | number",
|
|
20656
|
+
title: "\u9009\u62E9\u6A21\u5F0F",
|
|
20657
|
+
"x-decorator": "CnFormItem",
|
|
20658
|
+
"x-component": "CnRadioGroup",
|
|
20659
|
+
default: "single",
|
|
20660
|
+
enum: [
|
|
20661
|
+
{
|
|
20662
|
+
label: "\u5355\u9009",
|
|
20663
|
+
value: "single"
|
|
20664
|
+
},
|
|
20665
|
+
{
|
|
20666
|
+
label: "\u591A\u9009",
|
|
20667
|
+
value: "multiple"
|
|
20668
|
+
}
|
|
20669
|
+
],
|
|
20670
|
+
"x-validator": [],
|
|
20671
|
+
"x-component-props": {},
|
|
20672
|
+
"x-decorator-props": {},
|
|
20673
|
+
name: "mode",
|
|
20674
|
+
"x-designable-id": "y5mtbwr162t"
|
|
20675
|
+
},
|
|
20676
|
+
source: {
|
|
20677
|
+
type: "string",
|
|
20678
|
+
title: "\u6570\u636E\u6E90",
|
|
20679
|
+
"x-decorator": "CnFormItem",
|
|
20680
|
+
"x-component": "FormilyAjaxSchemaForm",
|
|
20681
|
+
"x-validator": [],
|
|
20682
|
+
"x-component-props": {},
|
|
20683
|
+
default: {
|
|
20684
|
+
type: "json",
|
|
20685
|
+
content: [
|
|
20686
|
+
{
|
|
20687
|
+
label: "\u9009\u98791",
|
|
20688
|
+
value: "1"
|
|
20689
|
+
},
|
|
20690
|
+
{
|
|
20691
|
+
label: "\u9009\u98792",
|
|
20692
|
+
value: "2"
|
|
20693
|
+
}
|
|
20694
|
+
]
|
|
20695
|
+
},
|
|
20696
|
+
"x-decorator-props": {},
|
|
20697
|
+
name: "dataSource",
|
|
20698
|
+
"x-designable-id": "t0uv4o8e9ds"
|
|
20699
|
+
},
|
|
20700
|
+
optionLabelKey: {
|
|
20701
|
+
title: "\u9009\u9879\u6807\u9898Key",
|
|
20702
|
+
"x-decorator": "CnFormItem",
|
|
20703
|
+
"x-component": "Input",
|
|
20704
|
+
"x-validator": [],
|
|
20705
|
+
"x-component-props": {},
|
|
20706
|
+
"x-decorator-props": {},
|
|
20707
|
+
name: "optionLabelKey",
|
|
20708
|
+
default: "label",
|
|
20709
|
+
"x-designable-id": "511333ac9k"
|
|
20710
|
+
},
|
|
20711
|
+
optionValueKey: {
|
|
20712
|
+
title: "\u9009\u9879\u503CKey",
|
|
20713
|
+
"x-decorator": "CnFormItem",
|
|
20714
|
+
"x-component": "Input",
|
|
20715
|
+
"x-validator": [],
|
|
20716
|
+
"x-component-props": {},
|
|
20717
|
+
"x-decorator-props": {},
|
|
20718
|
+
name: "optionLabelKey",
|
|
20719
|
+
default: "value",
|
|
20720
|
+
"x-designable-id": "5112229k"
|
|
20721
|
+
},
|
|
20722
|
+
changeOnSelect: {
|
|
20723
|
+
type: "string",
|
|
20724
|
+
title: "\u9009\u62E9\u5373\u6539\u53D8",
|
|
20725
|
+
"x-decorator": "CnFormItem",
|
|
20726
|
+
"x-component": "Switch",
|
|
20727
|
+
"x-validator": [],
|
|
20728
|
+
"x-component-props": {},
|
|
20729
|
+
"x-decorator-props": {},
|
|
20730
|
+
name: "changeOnSelect",
|
|
20731
|
+
default: false,
|
|
20732
|
+
"x-designable-id": "bt66221112xl3px"
|
|
20733
|
+
}
|
|
20734
|
+
};
|
|
20735
|
+
var EditCascaderSelectSchema = {
|
|
20736
|
+
form: {
|
|
20737
|
+
labelCol: 6,
|
|
20738
|
+
wrapperCol: 16
|
|
20739
|
+
},
|
|
20740
|
+
schema: {
|
|
20741
|
+
type: "object",
|
|
20742
|
+
properties: {
|
|
20743
|
+
...getEditCommonColumnProps(),
|
|
20744
|
+
decoratorProps: {
|
|
20745
|
+
type: "object",
|
|
20746
|
+
"x-validator": [],
|
|
20747
|
+
name: "decoratorProps",
|
|
20748
|
+
title: "\u7F16\u8F91\u5668\u5C5E\u6027",
|
|
20749
|
+
"x-designable-id": "xoirvxpflgk",
|
|
20750
|
+
properties: {
|
|
20751
|
+
...selectSchema$2
|
|
20752
|
+
}
|
|
20753
|
+
}
|
|
20754
|
+
},
|
|
20755
|
+
"x-designable-id": "edit-table-j744a1rk494"
|
|
20756
|
+
}
|
|
20757
|
+
};
|
|
20632
20758
|
var EditColumns = {
|
|
20633
20759
|
"edit-custom": EditCustomSchema,
|
|
20634
20760
|
"edit-input": EditInputSchema,
|
|
@@ -20637,7 +20763,8 @@ var EditColumns = {
|
|
|
20637
20763
|
"edit-select": EditSelectSchema,
|
|
20638
20764
|
"edit-date-picker": EditDatePickerSchema,
|
|
20639
20765
|
"edit-time-picker": EditTimePickerSchema,
|
|
20640
|
-
"edit-address-select": EditAddressSelectSchema
|
|
20766
|
+
"edit-address-select": EditAddressSelectSchema,
|
|
20767
|
+
"edit-cascader-select": EditCascaderSelectSchema
|
|
20641
20768
|
};
|
|
20642
20769
|
var ModuleImport = {
|
|
20643
20770
|
form: {
|
|
@@ -24175,6 +24302,10 @@ const columnsTypeOptionsWithEditCnTable = [
|
|
|
24175
24302
|
value: "edit-address-select",
|
|
24176
24303
|
label: "\u5730\u5740\u9009\u62E9"
|
|
24177
24304
|
},
|
|
24305
|
+
{
|
|
24306
|
+
value: "edit-cascader-select",
|
|
24307
|
+
label: "\u7EA7\u8054\u9009\u62E9\u5668"
|
|
24308
|
+
},
|
|
24178
24309
|
{
|
|
24179
24310
|
value: "edit-custom",
|
|
24180
24311
|
label: "\u81EA\u5B9A\u4E49"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cniot/mdd-editor",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.4",
|
|
4
4
|
"description": "模型驱动编辑器",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build"
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
"@monaco-editor/react": "*"
|
|
40
40
|
},
|
|
41
41
|
"repository": "git@gitlab.alibaba-inc.com:one-code/mdd.git"
|
|
42
|
-
}
|
|
42
|
+
}
|
package/src/template/const.js
CHANGED