[amis-saas-6692]merge pre-release code

Change-Id: I336d46180fae1d9b2807a6254af545da1d0312db
This commit is contained in:
qianchuan 2022-09-08 17:10:43 +08:00
commit 917447596a
14 changed files with 580 additions and 237 deletions

View File

@ -0,0 +1,37 @@
module.exports = {
entry: {
dir: './src'
},
file: {
test: /.*(ts|tsx|js|jsx)$/
},
ignore: {
list: ['src/locale']
},
importInfo: {
source: 'i18n-runtime',
imported: 'i18n',
local: '_i18n'
},
i18nModule: 'i18n-runtime',
languages: [
{
name: 'en-US',
path: './src/locale'
},
{
name: 'zh-CN',
path: './src/locale'
}
],
output: {
fileName: 'eidtor-core-i18n',
fileExtension: 'xlsx',
path: './'
},
translate: {
appId: '20220810001301703',
key: 'WW7jKaJJBrtCawTOkCpk',
host: 'http://api.fanyi.baidu.com'
}
};

View File

@ -1,13 +1,15 @@
{
"name": "amis-editor-core",
"version": "5.2.0-beta.50",
"version": "5.2.0-beta.62",
"description": "amis 可视化编辑器",
"main": "lib/index.min.js",
"types": "lib/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "npm run clean-dist && webpack",
"clean-dist": "rimraf lib/* esm/*"
"clean-dist": "rimraf lib/* esm/*",
"i18n:update": "npx i18n update --config=./i18nConfig.js",
"i18n:translate": "npx i18n translate --config=./i18nConfig.js --l=en-US"
},
"keywords": [
"amis",
@ -23,10 +25,14 @@
"lint-staged": {
"{src,scss,examples}/**/**/*.{js,jsx,ts,tsx,scss,json}": [
"prettier --write"
],
"{src,scss,examples}/**/**/*.scss": [
"stylelint"
]
},
"dependencies": {
"deep-diff": "1.0.2",
"i18n-runtime": "0.0.4",
"json-ast-comments": "^1.1.0",
"lodash": "^4.17.15",
"mobx": "^4.5.0",
@ -84,18 +90,21 @@
"sass": "^1.49.7",
"sass-loader": "^12.5.0",
"style-loader": "^3.2.1",
"stylelint": "^14.11.0",
"ts-loader": "^9.2.5",
"tslib": "^2.3.1",
"typescript": "^4.4.2",
"webpack": "^5.52.1",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.8.0",
"webpack-node-externals": "^3.0.0"
"webpack-node-externals": "^3.0.0",
"webpack-react-i18n": "0.0.2"
},
"peerDependencies": {
"amis": "*",
"amis-core": "*",
"amis-formula": "*",
"amis-ui": "*"
"amis-ui": "*",
"i18n-runtime": "*"
}
}

View File

@ -21,23 +21,11 @@ $category-2-height: px2rem(32px);
.ae-Settings-content {
padding: var(--gap-base);
[data-tooltip][data-position=bottom]:hover:after {
[data-tooltip][data-position='bottom']:hover:after {
margin-left: 15px;
}
}
// FIXME: icon-picker临时修复超出内容显示滚动条问题后amis中修复后可删除 fix-icon-picker-overflow
.fix-icon-picker-overflow {
.cxd-IconPickerControl-valueWrap {
> div {
display: block;
}
> a {
display: inline-block;
}
}
}
// 宽度可拖拽时不增加过渡避免卡顿
&.width-draggable {
transition: none;
@ -362,8 +350,8 @@ $category-2-height: px2rem(32px);
// tab内容
&-cont {
height: calc( 100% - 45px);
position:absolute;
height: calc(100% - 45px);
position: absolute;
width: 100%;
padding: 0;
overflow-y: overlay !important;

View File

@ -1,4 +1,4 @@
.ae-event-control {
ae-event-control {
font-size: #{px2rem(12px)};
&-header-oldentry {
height: 100px;
@ -28,7 +28,7 @@
}
ul {
width: 100%;
.cxd-DropDown-button {
li {
height: auto;
padding: #{px2rem(7px)} #{px2rem(12px)};
}
@ -247,132 +247,100 @@
}
.action-config-dialog {
.antd-Modal-content,
.cxd-Modal-content {
width: 800px;
}
font-size: 12px;
.cxd-Tree {
font-size: 12px;
.cxd-Tree-itemArrow {
.icon-right-arrow-bold {
color: #888a90;
}
.action-config-panel {
background: #ffffff;
border: 1px solid #e8e9eb;
border-radius: 4px;
height: #{px2rem(420px)};
max-height: #{px2rem(420px)};
width: 100%;
@include panel-sm-content();
.action-panel-title {
margin: 16px 16px 12px;
line-height: 18px;
font-size: 12px;
font-weight: 500;
}
}
.cxd-Modal-footer {
.cxd-Button {
min-width: #{px2rem(72px)};
}
}
.cxd-RadiosControl {
padding-top: 5px;
font-size: 12px;
}
.cxd-NestedSelect-popover {
font-size: 12px;
}
}
.action-config-panel {
background: #ffffff;
border: 1px solid #e8e9eb;
border-radius: 4px;
height: #{px2rem(420px)};
max-height: #{px2rem(420px)};
width: 100%;
@include panel-sm-content();
.action-panel-title {
margin: 16px 16px 12px;
line-height: 18px;
font-size: 12px;
font-weight: 500;
}
.action-tree-search {
margin: 0 16px 8px;
.cxd-TextControl-input {
background: url('../static/search.svg') no-repeat right 12px center;
padding-right: 28px;
}
}
.action-search-list {
.search-result-label:hover {
background: var(--Tree-item-onHover-bg-pure);
}
}
.left-panel {
height: 100%;
padding-right: 0px;
border-right: 1px solid #e8e9eb;
max-width: #{px2rem(200px)};
.action-tree {
height: calc(100% - 88px);
border-top: 1px solid #e8e9eb;
.action-tree-control {
height: 100%;
max-height: 100%;
padding: 0;
.cxd-Tree-placeholder {
margin-top: 82px;
height: 64px;
background: url('../static/empty.png') center/contain no-repeat;
color: transparent;
.action-tree-search {
margin: 0 16px 8px;
&-input {
& > div {
background: url('../static/search.svg') no-repeat right 12px center;
padding-right: 28px;
}
}
}
.cxd-Tree {
&-list {
& > .cxd-Tree-item {
font-size: 12px;
.cxd-Tree-itemLabel {
flex-direction: row-reverse;
padding-left: 16px;
height: 32px;
line-height: 32px;
.action-search-list {
.search-result-label:hover {
background: var(--Tree-item-onHover-bg-pure);
}
}
.cxd-Tree-itemText {
color: #151a26;
.left-panel {
height: 100%;
padding-right: 0px;
border-right: 1px solid #e8e9eb;
max-width: #{px2rem(200px)};
.action-tree {
height: calc(100% - 88px);
border-top: 1px solid #e8e9eb;
.action-tree-control {
height: 100%;
max-height: 100%;
padding: 0;
font-size: 12px;
& > div > div {
margin-top: 82px;
height: 64px;
background: url('../static/empty.png') center/contain no-repeat;
color: transparent;
}
}
.is-matched {
.action-tree-control {
ul {
li {
font-size: 12px;
& > div {
flex-direction: row-reverse;
padding-left: 16px;
height: 32px;
line-height: 32px;
span .is-matched {
color: #2468f2;
}
svg {
transform: rotate(180deg);
}
.is-folded > svg {
transform: rotate(0);
}
}
.cxd-Tree-item-icons {
display: none;
}
.cxd-Tree-itemArrow > svg {
transform: rotate(180deg);
}
.cxd-Tree-itemArrow.is-folded > svg {
transform: rotate(0);
& > ul {
margin-left: 0;
li > div {
padding-left: #{px2rem(32px)};
}
li > div > div {
&:hover {
background-color: var(--Tree-item-onHover-bg-pure);
}
}
li .is-checked > div {
background: var(--Tree-item-onChekced-bg);
&:hover {
background-color: var(--Tree-item-onChekced-bg) !important;
}
}
}
}
.cxd-Tree-sublist {
margin-left: 0;
.cxd-Tree-itemLabel .cxd-Tree-itemText {
padding-left: var(--Tree-indent);
}
}
}
.cxd-Tree-item--isLeaf {
.cxd-Tree-itemLabel {
&:hover {
background-color: var(--Tree-item-onHover-bg-pure);
}
}
.cxd-Tree-itemLabel.is-checked {
background: var(--Tree-item-onChekced-bg);
}
.cxd-Tree-itemLabel.is-checked::before {
li .is-checked::before {
content: '';
background: url('../static/check.svg') no-repeat center center;
height: var(--Tree-itemHeight);
@ -384,86 +352,48 @@
}
}
}
}
.right-panel {
overflow-y: auto;
height: 100%;
padding: 0 8px 0 0;
.right-panel {
overflow-y: auto;
height: 100%;
padding: 0 8px 0 0;
.event-action-radio {
padding-top: 5px;
font-size: 12px;
}
.action-desc {
font-size: 12px;
margin-left: 16px;
color: var(--Form-item-fontColor);
}
.action-desc {
font-size: 12px;
margin-left: 16px;
color: var(--Form-item-fontColor);
}
.cmpt-action-select,
.action-btn-width {
width: auto;
min-width: #{px2rem(320px)};
}
.ae-ApiControl-tabs {
.cxd-Tabs-links {
margin-left: 0;
a {
&-container {
max-height: calc(100% - 46px);
margin: 0px 16px 16px;
.action-panel-title {
margin-left: 0;
}
.action-exec-on {
width: 100%;
}
label {
text-align: left;
}
span {
font-size: 12px;
}
}
}
.ae-ApiControl-tabContent {
max-height: #{px2rem(430px)};
overflow-y: auto;
padding-bottom: 0;
.cxd-Tabs-pane {
padding-left: 0;
padding-bottom: 0;
}
}
.cmpt-action-select,
.action-btn-width {
width: auto;
min-width: #{px2rem(320px)};
}
&-container {
max-height: calc(100% - 46px);
margin: 0px 16px 16px;
.action-panel-title {
.ae-BaseRemark {
margin-left: 0;
margin-top: 5px;
}
.action-exec-on {
width: 100%;
}
.cxd-Form-item--horizontal > .cxd-Form-label {
text-align: left;
}
.action-apiControl {
margin-top: 25px;
.cxd-Service {
margin-bottom: 0;
}
.ApiControl {
&-header {
position: absolute;
right: 0;
top: -25px;
}
}
.cxd-Form-row {
align-items: center;
}
}
}
.cxd-Checkbox {
font-size: 12px;
}
.cxd-Remark {
margin-left: 0;
margin-top: 5px;
}
}
}
@ -472,24 +402,17 @@
background: #070c14d9 !important;
box-shadow: 0 px2rem(2px) px2rem(8px) 0 rgba(7, 12, 20, 0.12);
border: none;
.cxd-Tooltip-body {
div {
font-size: 12px;
color: #fff;
}
}
.event-item-header-tip.cxd-Tooltip--top {
.cxd-Tooltip-arrow {
.event-item-header-tip {
& > div {
&:after {
border-top-color: #070c14d9;
}
}
}
.event-item-header-tip.cxd-Tooltip--bottom {
.cxd-Tooltip-arrow {
&:after {
border-bottom-color: #070c14d9;
border-top-color: #070c14d9 !important;
border-bottom-color: #070c14d9 !important;
}
}
}

View File

@ -42,24 +42,26 @@
&-body {
padding: var(--gap-base);
--Form-item-gap: 12px;
.cxd-IconPickerControl {
.cxd-IconPickerControl-value {
width: 88%;
}
.fix-icon-picker-overflow {
input {
width: 0;
}
.cxd-IconPickerControl-clear {
a {
display: inline-block;
position: relative;
left: -10px;
}
}
}
.inputGroup-addOn-no-border {
.cxd-InputGroup-addOn {
.inputGroup-split-line {
border: none;
padding-left: 5px;
padding-right: 5px;
line-height: 30px;
}
}
}

View File

@ -47,7 +47,7 @@
}
&-custom-renderer {
width: calc( 100% - 36px);
width: calc(100% - 36px);
flex: 1 1 auto;
margin-right: 3px;
border: none;
@ -58,11 +58,6 @@
border: 1px dashed #e8e9eb;
}
}
&-select-style {
.cxd-Select-valueWrap {
overflow: hidden;
}
}
&-ResultBox {
flex: 1;

View File

@ -69,6 +69,7 @@
// 覆盖amis默认top值避免导致未垂直居中
.ae-Editor-toolbar svg.icon {
top: 0 !important;
font-size: 14px;
}
&.is-fixed {

View File

@ -29,7 +29,7 @@ export default class MiniEditor extends Editor {
}
render() {
const {preview, className, theme, data} = this.props;
const {preview, className, theme, data, isMobile} = this.props;
return (
<div
@ -44,6 +44,7 @@ export default class MiniEditor extends Editor {
<div className="ae-Editor-inner" onContextMenu={this.handleContextMenu}>
<div className="ae-Main">
<Preview
isMobile={isMobile}
editable={!preview}
store={this.store}
manager={this.manager}

View File

@ -1,6 +1,8 @@
/**
* @file
*/
import 'amis';
import './locale/index';
import Editor from './component/Editor';
import './component/ClassNameControl';

View File

@ -0,0 +1,195 @@
import {extendLocale} from 'amis-core';
extendLocale('en-US', {
'4e7f76261f8c4c6d78998f85fc1f4c6e': 'Margin ',
'16a20243f9b741c08216dc9548de2968': 'whole',
'23ecf42cada8bf2715792d718544d107': 'minimum',
'391b8fa9c747a1799353ab856e666ad5': 'Small',
'fd6e80f1e0199d6ecc3ee81ae04aa9ef': 'normal',
'aed1dfbc31703955e64806b799b67645': 'in',
'ab18e30c0dc4093ceeda8961fac3d1f4': 'large',
'461d364c67ec6a45e011ed13f2f7154f': 'top margin',
'31e3752986d64c8b36897c8641c8628d': 'Right margin',
'eabe91d9426b6446f707cea3e7ab2418': 'margin-bottom ',
'2e46d251ee6188bb1b3ff20656276572': 'left ',
'3dc4038d0f0a2d2b3c2b2e29a5ec6dde': 'None',
'a8b0c20416853bda54120bf19477ad11': 'whole',
'af767b7e4ae069d54f9ea839858d4c6d': 'upper',
'4d9c32c23df5d234e629c922c58d8e12': 'right',
'3850a186c3235bc646d4c2f79cebac36': 'lower',
'd2aff1417831aa621c16cd5b95306b4b': 'Left',
'841d77223f0ec8cd0b530ed8e0775b20': 'padding ',
'961534b4ea37e4e88aada736b299d063': 'frame',
'd4d2a66820d30e07b44c850eb3f116c0': 'position',
'58f966670529f4753fb3c5a0647606be': 'size',
'6b36c6f7ec834692ec6c8e3816349fdd': 'colour',
'fbae87bcc352f6933541fb77a07418ed': 'Main color',
'd8c7e04c8e2be23dd3b81a31db6e04f1': 'information',
'900c70fa5f7dbc014e6f762d5e0e885c': 'warning',
'540f84ddc0883866b229f71c2844199a': 'danger',
'330363dfc524cff2488f2ebde0500896': 'success',
'2fc96b2704b05d6a9f299c442573ee77': 'white',
'adb7e5312abdb9a44297e48d63815fa3': 'dark colors',
'48d0a09bdd5fe7e89f0a445b0ffdf14f': 'light colour',
'0d98c74797e49d00bcc4c17c9d557a2b': 'other',
'0103eb2d3dca70270d1a74e9ec987ac9': 'fillet',
'8456bc40d48da5af833f1c63385e9879': 'typeface',
'b3b2682579133673d3fe08c156d565dc': 'fine',
'56dce5d1cbb97439d291c458e50107e0': 'crude',
'49a79f4047b81186c069ed1c9c151c66': 'Pale',
'8e1b944f4389bdaab6f11d5bc83190c8': 'background',
'c28479019e24e0e4745f4948e9e97ee7': 'width',
'f72ce9ad683cc82e0eab557ffc9c67a0': 'Extremely small',
'b95c462d7697958c25861193fc89ae07': 'enlarge',
'3386da5f56fac758ed0f18e024ecb943': 'Extra large',
'ffaa96ef7232cb6d8ee4d7e673dbf4ac': 'completely fill',
'47eac1ac32a8aa9081dffbdc4d374318': 'Please enter the CSS class name',
'939d5345ad4345dbaabe14798f6ac0f1': 'Submit',
'55c56d01a7747ffe0346d42145b62d97':
'[Amis editor] respond to the event of dynamically adding plug-ins:',
'd6f73c6f3b92be5a64f7ea0163501284': 'Region nodes are not allowed to be cut.',
'4fda4f585214d469c04466e2fc98b796': 'The root node does not allow cutting.',
'657bbe06d3922b23552817df7fa8268e':
'The current element does not allow cutting.',
'416445a316595bdeb44b661c7de875a8': 'The current element cannot be moved up',
'6ac88d87b2fd118ba7beab8c17880470':
'The current element cannot be moved down',
'fdb3cba60407b2f1aea0230cca644573': 'Area nodes cannot be deleted directly.',
'8a4b4e2e3b0382007e0c69ed1fe6fe71':
'The root node is not allowed to be deleted.',
'22f031f3de2e55c430a818d8c588f7a1': 'The current element cannot be deleted.',
'3b6d5995e9f2ecd3df059b3f1bea201e': 'Call error or cross domain exists.',
'09f33be5ec04eb48b3102e4e31af5b38': 'Call error',
'283c2a52955ad87574fd6c0cc932c443': 'Can only be called in iframe',
'a71002967924a83e32b38a80705290fb': 'System error',
'058ebdf2884474ebff2977ba2f0e275e': 'System message',
'88f000a0fdc38ce3808cef072b00893c': 'Rendering',
'279321f97f11da7bc90facca156b3444': 'Code error, the error is: \\ n {{@1}}',
'7e4b38ba0ab9cbfcabd9dd859e36b601':
'Some of the changed data has not been saved due to incorrect format. Are you sure you want to discard these changes?',
'af86ad9dd8a221f931dcdc5a63382b6f': 'View changes',
'43d586cd6cf1a512c0bcb85ed9efde51': 'Please confirm',
'bb79667f37035e9562ec6bcffd6cf8ef': 'assembly',
'5cb297585d4c81bb8fdbd31210a30d6f': 'System components',
'6fce1c9aa3654ae2f0eedcc068a7e189': 'Custom components',
'06e004ef21414c06d3e4ff2cefaf6a04': 'code',
'7f7c624a843b0d539a4ea59a696702f9': 'Batch operation',
'b80ed82d124c6fd9242dcacdda2a2f8b': 'Change component type',
'35b5a48a773a81f0b67b3058e7231569':
'The selected component is inserted into & nbsp;',
'd87481b371771b4f150da76e311bbbef': 'Enter keywords to filter components',
'becdc848350872592201e31bab03892a': 'Cannot Preview',
'f3430f4fdd8b9643daa74f4a5716dd15': '&nbsp; Details & nbsp;',
'751dfe6f476903c21381c9acf88332e2':
'There are no components available. Maybe you should try switching containers.',
'e22c9a05b424b761efce11f17726fdd7': 'replace',
'9bdb07e72d3a9a6084201a7398523f5a': 'insert',
'625fb26b4b3340f7872b411f401e754c': 'cancel',
'95509c09bdef4bb7842a9b957ab1f971': 'Turn off levitation mode',
'426480bb614633c8c3ba8faa0338b72f': 'Turn on levitation mode',
'fbf7967f9baf6a22bd6ca7f4e6390bf9': '{{@1}} - [public configuration]',
'93383ef1ab4a433df97a56a73e571b9f': 'outline',
'962d43ff8d39c381d8e2c73838412111': 'Query page elements',
'0c95d1856ffdeeade7cebe0ef928f361':
'You can switch containers by dragging a target into a node in the navigation',
'c482df2a3ac8e014febd8a5fc9cadaea': 'Loading, please wait',
'c44c6c179c44e794b103053886847dc4': 'No preview',
'e4cefe7df36e92da1d7e875b92655507': 'Click expand',
'7ae451de83aa6f5f140e941904377391': 'Click collapse',
'84c8f0087acfc9b9862371d0bd59b830': 'Click to add "{{@1}}"',
'b797a8992ef41320919e45a069f2b459':
'There are no available components found. You can continue searching with another keyword.',
'0bd36c8db19e3a93506f39ebc8ff0ab9':
'When components such as forms and lists have names, they will appear here for easy selection',
'bb28ec819520ced0ffb4c3da01f112e2': 'Click to clear the current area',
'e83a256e4f5bb4ff8b3d804b5473217a': 'confirm',
'22c799040acdb2601b437ed5449de076': 'container',
'bd9fcf46b4e5993f97fe04ee9ebcd7ed': 'revoke',
'c3c873d33f1c6482c79b0ffd862786cd': 'redo',
'e9509c688a0df6b088503d21569b6e8f': 'Wrong type, unable to render',
'2168c5735883bd040eaf09909d0911b8': 'Input keyword query component',
'e9c38f88375807704270aa3572454976': 'Search history',
'288f0c404c4e546aa3683ff5054e85e2': 'empty',
'4b9bc9abf2a2beb3772d903a3d01d1de': 'Click delete this search record',
'9d3128a1675de32cdd290b31140a7290':
'The search result is empty. You can continue to search with another keyword.',
'accb901a02b1415b40d95cdd31b8da1d': 'Component classification',
'79d3abe929f67f0644a78bf32adb3a89': 'copy',
'b7d817611230d382f6ef92b41848a342': 'Copy the currently selected element',
'eafbece1016a6af76cce466e55ad9f00': 'paste',
'e0b9bb8e41eccd3ce6b282664643d7f8':
'Inserts the copied element into the currently selected node',
'43fc77886b7fbcd658f0ccdba36bd5a0': 'shear',
'a6be4ad12e9612811963c44466af3218': 'Cut the currently selected element',
'58887132871b71b015c3a391e7755815': 'Redo the last undone operation',
'be5fbbe34ce9979bfb6576d9eddc5612': 'preservation',
'1f81fd4598e9151538f29c41b8aa0020': 'Save all current operations',
'645dbc5504e722a30896486085a06b32': 'preview',
'5bc425ac8b75c571093a63eb6073c354': 'Turn on preview mode',
'2f4aaddde33c9b93c36fd2503f3d122b': 'delete',
'426cd14ebd62a4922186527d07ba37f3': 'Delete current node',
'499e58e764420aeed2d1476a56d8fa34': 'Move up',
'd040485f0e3887f0b297f8f772db03e4': 'Move the current node up',
'08ad565f066d30572d1f8e2ee17cbe12': 'Move down',
'6348dc0e83d6ab391a8816f67d0e5ceb': 'Move the current node down',
'fbec96e028142496df88ed2c63b44512':
'Click to view the currently available shortcut keys',
'9c3f1278ffa822835bb3a677f02bca27': 'Currently available shortcut keys',
'4e98a5dcd3defffb23629fce3add04f6': 'No shortcut key',
'186733ed7ec817040b8f9cbc610ba49a': 'Program error',
'e777eb796f8a02e97a891fde43d10ce4': '{{@1}} variable',
'5d665bc55779aafdefcc4050e3a8429e': '{{@1}} ({{@2}}) rendering error:',
'a30dd4945df5b44b264fa3be6ee9682e': 'Current renderer information:',
'63f94190d2d4ea22263e6e9f07c96558': 'Error object:',
'f66335b5bff0e26fdff2a3303e0f9bb0': 'Error message:',
'966e23b5c1efe8e18fc4f0c326d47314':
'An error occurred in rendering. Please check the console output for detailed error information.',
'44e049d9ecbe2c474100a3424021570e':
'< div class = wrapper SM B-A B-light m-b-sm > drag in space < / div >',
'245897371cda2055f5c17c6cf298ed48':
'Warm prompt: skipping is prohibited in preview mode',
'e1b7255934e3189b1f5d440fc1aa0230':
'Registered plug-in exception, plug-in with the same name already exists:',
'979a50681e278dcc0be18f68459e8217': 'System variable',
'75c142934800d6ee31fcf3fdff9e5d53':
'[Amis editor] currently has {{@1}} plug-in',
'0e24e1bbc19612a350f81296d9fb7802':
'Please select an element as the insertion position first.',
'bd690facb536d759814ee64f2760fecb':
'The current node is not allowed to append new components.',
'02f180cd26ff0951ddfda490080ee5ea': 'Configuration item copied',
'1ff035555ac8a68dc5b0ea2d0af55f00': 'Clipboard content is empty',
'6cb01692eea2fa7066d20fe2b6ccaea3': 'False data',
'7f2f0461a58c43667d7245ce92bb2e77':
'Press and hold drag to adjust the position',
'78c1c38b91c672da1113fa2564c14ea6': 'Insert components forward',
'87f48bbadfbef5ef4554e06b7e141d37': 'Insert component backward',
'95b351c86267f3aedf89520959bce689': 'edit',
'0ec9eaf9c3525eb110db58aae5912210': 'more',
'417db09508befe7dbe9f84a517a6edec': 'Repeat',
'99b81127ef28368151621cdfccce69f8': 'Cancel multiple selection',
'205f45ee17394bd5668412780eaa55e2': 'Insert component',
'4c725f0159023c485ead728680e277ba': 'Select {{@1}}',
'7ad78e0991f34ff3a345c59a2fc31572': 'Select hierarchy',
'aafda9e8f6b7b613680677c513edb7a6': 'Uncheck',
'b58d101f52531c845f15db63d7212115': 'Copy configuration',
'74e2bc6615b7dbbb11fd5e1e212263ae': 'Cut configuration',
'e2f401af580d1354ae00ec4ca19e2e24': 'Paste configuration',
'21462ae22216eec41dc688cc4a8ae64b': 'Move forward',
'ed2bc13d8bbd99e16e017dd5f5393393': 'Move backward',
'9e54f3e4ee3330299c5fdc910c2e8d3c': 'Undo',
'ae8e86e426c2ba00da274b66dc372a8b': 'Redo',
'2b6bc0f293f5ca01b006206c2535ccbc': 'operation',
'aa920263020f14211a44ea172efc7253': 'Context data',
'48ac479789304b37afa2f1b06642f4da': 'current',
'9bc16c658ab8a8c4eddc5e24d85bef20': 'upper strata',
'004d4be2ba8e6b8eed9333d15bc80a88': 'Upper {{@1}} level',
'e366ccf1556c0672dcecba135ed5472e': 'set up',
'0cbec43d00e491a663ff0525ffe31868': 'Quickly build "{{@1}}"',
'1dd554cdfc1ddf7dce13453805523c16': 'change',
'a82240ce09faf0b972a8aa5c9e93d209': 'Insert component panel',
'eadc8c8d4a8776893672330598babca0':
'Location error, target location not found',
'f3c057f37fb9a4e7dd44b04919c12578':
'Please click add new element from the left component panel.'
});

View File

@ -0,0 +1,2 @@
import './en-US';
import './zh-CN';

View File

@ -0,0 +1,178 @@
import {extendLocale} from 'amis-core';
extendLocale('zh-CN', {
'4e7f76261f8c4c6d78998f85fc1f4c6e': '外边距',
'16a20243f9b741c08216dc9548de2968': '整体',
'23ecf42cada8bf2715792d718544d107': '极小',
'391b8fa9c747a1799353ab856e666ad5': '小',
'fd6e80f1e0199d6ecc3ee81ae04aa9ef': '正常',
'aed1dfbc31703955e64806b799b67645': '中',
'ab18e30c0dc4093ceeda8961fac3d1f4': '大',
'461d364c67ec6a45e011ed13f2f7154f': '上边距',
'31e3752986d64c8b36897c8641c8628d': '右边距',
'eabe91d9426b6446f707cea3e7ab2418': '下边距',
'2e46d251ee6188bb1b3ff20656276572': '左边距',
'3dc4038d0f0a2d2b3c2b2e29a5ec6dde': '置无',
'a8b0c20416853bda54120bf19477ad11': '全部',
'af767b7e4ae069d54f9ea839858d4c6d': '上',
'4d9c32c23df5d234e629c922c58d8e12': '右',
'3850a186c3235bc646d4c2f79cebac36': '下',
'd2aff1417831aa621c16cd5b95306b4b': '左',
'841d77223f0ec8cd0b530ed8e0775b20': '内边距',
'961534b4ea37e4e88aada736b299d063': '边框',
'd4d2a66820d30e07b44c850eb3f116c0': '位置',
'58f966670529f4753fb3c5a0647606be': '大小',
'6b36c6f7ec834692ec6c8e3816349fdd': '颜色',
'fbae87bcc352f6933541fb77a07418ed': '主色',
'd8c7e04c8e2be23dd3b81a31db6e04f1': '信息',
'900c70fa5f7dbc014e6f762d5e0e885c': '警告',
'540f84ddc0883866b229f71c2844199a': '危险',
'330363dfc524cff2488f2ebde0500896': '成功',
'2fc96b2704b05d6a9f299c442573ee77': '白色',
'adb7e5312abdb9a44297e48d63815fa3': '暗色',
'48d0a09bdd5fe7e89f0a445b0ffdf14f': '浅色',
'0d98c74797e49d00bcc4c17c9d557a2b': '其他',
'0103eb2d3dca70270d1a74e9ec987ac9': '圆角',
'8456bc40d48da5af833f1c63385e9879': '字体',
'b3b2682579133673d3fe08c156d565dc': '细',
'56dce5d1cbb97439d291c458e50107e0': '粗',
'49a79f4047b81186c069ed1c9c151c66': '淡色',
'8e1b944f4389bdaab6f11d5bc83190c8': '背景',
'c28479019e24e0e4745f4948e9e97ee7': '宽度',
'f72ce9ad683cc82e0eab557ffc9c67a0': '特小',
'b95c462d7697958c25861193fc89ae07': '加大',
'3386da5f56fac758ed0f18e024ecb943': '特大',
'ffaa96ef7232cb6d8ee4d7e673dbf4ac': '占满',
'47eac1ac32a8aa9081dffbdc4d374318': '请输入 css 类名',
'939d5345ad4345dbaabe14798f6ac0f1': '提交',
'55c56d01a7747ffe0346d42145b62d97': '[amis-editor]响应动态添加插件事件:',
'd6f73c6f3b92be5a64f7ea0163501284': '区域节点不允许剪切。',
'4fda4f585214d469c04466e2fc98b796': '根节点不允许剪切。',
'657bbe06d3922b23552817df7fa8268e': '当前元素不允许剪切。',
'416445a316595bdeb44b661c7de875a8': '当前元素不能向上移动',
'6ac88d87b2fd118ba7beab8c17880470': '当前元素不能向下移动',
'fdb3cba60407b2f1aea0230cca644573': '区域节点不可以直接删除。',
'8a4b4e2e3b0382007e0c69ed1fe6fe71': '根节点不允许删除。',
'22f031f3de2e55c430a818d8c588f7a1': '当前元素不允许删除。',
'3b6d5995e9f2ecd3df059b3f1bea201e': '调用错误,或者存在跨域。',
'09f33be5ec04eb48b3102e4e31af5b38': '调用错误',
'283c2a52955ad87574fd6c0cc932c443': '只能在 Iframe 里面调用',
'a71002967924a83e32b38a80705290fb': '系统错误',
'058ebdf2884474ebff2977ba2f0e275e': '系统消息',
'88f000a0fdc38ce3808cef072b00893c': '渲染中...',
'279321f97f11da7bc90facca156b3444': '代码有误,错误的地方是\\n {{@1}}',
'7e4b38ba0ab9cbfcabd9dd859e36b601':
'当前有部分已更改数据因为格式不正确尚未保存,您确认要丢弃这部分更改吗?',
'af86ad9dd8a221f931dcdc5a63382b6f': '查看更改',
'43d586cd6cf1a512c0bcb85ed9efde51': '请确认',
'bb79667f37035e9562ec6bcffd6cf8ef': '组件',
'5cb297585d4c81bb8fdbd31210a30d6f': '系统组件',
'6fce1c9aa3654ae2f0eedcc068a7e189': '自定义组件',
'06e004ef21414c06d3e4ff2cefaf6a04': '代码',
'7f7c624a843b0d539a4ea59a696702f9': '批量操作',
'b80ed82d124c6fd9242dcacdda2a2f8b': '更改组件类型',
'35b5a48a773a81f0b67b3058e7231569': '选中组件插入到&nbsp;',
'd87481b371771b4f150da76e311bbbef': '输入关键字可过滤组件',
'becdc848350872592201e31bab03892a': '无法预览',
'f3430f4fdd8b9643daa74f4a5716dd15': '&nbsp;详情&nbsp;',
'751dfe6f476903c21381c9acf88332e2': '没有可用组件,也许你该切换容器试试。',
'e22c9a05b424b761efce11f17726fdd7': '替换',
'9bdb07e72d3a9a6084201a7398523f5a': '插入',
'625fb26b4b3340f7872b411f401e754c': '取消',
'95509c09bdef4bb7842a9b957ab1f971': '关闭悬浮模式',
'426480bb614633c8c3ba8faa0338b72f': '开启悬浮模式',
'fbf7967f9baf6a22bd6ca7f4e6390bf9': '{{@1}}-[公共配置]',
'93383ef1ab4a433df97a56a73e571b9f': '大纲',
'962d43ff8d39c381d8e2c73838412111': '查询页面元素',
'0c95d1856ffdeeade7cebe0ef928f361': '将目标拖入导航中的节点可以切换容器',
'c482df2a3ac8e014febd8a5fc9cadaea': '加载中,请稍等...',
'c44c6c179c44e794b103053886847dc4': '没有预览图',
'e4cefe7df36e92da1d7e875b92655507': '点击展开',
'7ae451de83aa6f5f140e941904377391': '点击折叠',
'84c8f0087acfc9b9862371d0bd59b830': '点击添加「{{@1}}」',
'b797a8992ef41320919e45a069f2b459':
'没有找到可用组件,您可以换个关键字继续查找。',
'0bd36c8db19e3a93506f39ebc8ff0ab9':
'当表单、列表等组件有名字时会出现在这里方便选择',
'bb28ec819520ced0ffb4c3da01f112e2': '点击清空当前区域',
'e83a256e4f5bb4ff8b3d804b5473217a': '确认',
'22c799040acdb2601b437ed5449de076': '容器',
'bd9fcf46b4e5993f97fe04ee9ebcd7ed': '撤销',
'c3c873d33f1c6482c79b0ffd862786cd': '重做',
'e9509c688a0df6b088503d21569b6e8f': '类型错误,无法渲染',
'2168c5735883bd040eaf09909d0911b8': '输入关键字查询组件',
'e9c38f88375807704270aa3572454976': '搜索历史',
'288f0c404c4e546aa3683ff5054e85e2': '清空',
'4b9bc9abf2a2beb3772d903a3d01d1de': '点击删除这条搜索记录',
'9d3128a1675de32cdd290b31140a7290':
'搜索结果为空,您可以换个关键字继续查找。',
'accb901a02b1415b40d95cdd31b8da1d': '组件分类',
'79d3abe929f67f0644a78bf32adb3a89': '复制',
'b7d817611230d382f6ef92b41848a342': '复制当前选中元素',
'eafbece1016a6af76cce466e55ad9f00': '粘贴',
'e0b9bb8e41eccd3ce6b282664643d7f8': '将复制的元素插入到当前选中节点',
'43fc77886b7fbcd658f0ccdba36bd5a0': '剪切',
'a6be4ad12e9612811963c44466af3218': '剪切当前选中元素',
'58887132871b71b015c3a391e7755815': '恢复上一次撤销的操作',
'be5fbbe34ce9979bfb6576d9eddc5612': '保存',
'1f81fd4598e9151538f29c41b8aa0020': '保存当前所有操作',
'645dbc5504e722a30896486085a06b32': '预览',
'5bc425ac8b75c571093a63eb6073c354': '开启预览模式',
'2f4aaddde33c9b93c36fd2503f3d122b': '删除',
'426cd14ebd62a4922186527d07ba37f3': '删除当前节点',
'499e58e764420aeed2d1476a56d8fa34': '向上移动',
'd040485f0e3887f0b297f8f772db03e4': '向上移动当前节点',
'08ad565f066d30572d1f8e2ee17cbe12': '向下移动',
'6348dc0e83d6ab391a8816f67d0e5ceb': '向下移动当前节点',
'fbec96e028142496df88ed2c63b44512': '点击查看当前可用快捷键',
'9c3f1278ffa822835bb3a677f02bca27': '当前可用快捷键',
'4e98a5dcd3defffb23629fce3add04f6': '暂无快捷键',
'186733ed7ec817040b8f9cbc610ba49a': '程序错误',
'e777eb796f8a02e97a891fde43d10ce4': '{{@1}}变量',
'5d665bc55779aafdefcc4050e3a8429e': '{{@1}}({{@2}})渲染发生错误:',
'a30dd4945df5b44b264fa3be6ee9682e': '当前渲染器信息:',
'63f94190d2d4ea22263e6e9f07c96558': '错误对象:',
'f66335b5bff0e26fdff2a3303e0f9bb0': '错误信息:',
'966e23b5c1efe8e18fc4f0c326d47314':
')渲染发生错误,详细错误信息请查看控制台输出。',
'44e049d9ecbe2c474100a3424021570e':
'<div class=wrapper-sm b-a b-light m-b-sm>拖入占位</div>',
'245897371cda2055f5c17c6cf298ed48': '温馨提示:预览模式下禁止跳转',
'e1b7255934e3189b1f5d440fc1aa0230': '注册插件异常,已存在同名插件:',
'979a50681e278dcc0be18f68459e8217': '系统变量',
'75c142934800d6ee31fcf3fdff9e5d53': '[amis-editor]当前已有{{@1}}插件',
'0e24e1bbc19612a350f81296d9fb7802': '请先选择一个元素作为插入的位置。',
'bd690facb536d759814ee64f2760fecb': '当前节点不允许追加新组件。',
'02f180cd26ff0951ddfda490080ee5ea': '配置项已复制',
'1ff035555ac8a68dc5b0ea2d0af55f00': '剪切板内容为空',
'6cb01692eea2fa7066d20fe2b6ccaea3': '假数据',
'7f2f0461a58c43667d7245ce92bb2e77': '按住拖动调整位置',
'78c1c38b91c672da1113fa2564c14ea6': '向前插入组件',
'87f48bbadfbef5ef4554e06b7e141d37': '向后插入组件',
'95b351c86267f3aedf89520959bce689': '编辑',
'0ec9eaf9c3525eb110db58aae5912210': '更多',
'417db09508befe7dbe9f84a517a6edec': '重复一份',
'99b81127ef28368151621cdfccce69f8': '取消多选',
'205f45ee17394bd5668412780eaa55e2': '插入组件',
'4c725f0159023c485ead728680e277ba': '选中{{@1}}',
'7ad78e0991f34ff3a345c59a2fc31572': '选中层级',
'aafda9e8f6b7b613680677c513edb7a6': '取消选中',
'b58d101f52531c845f15db63d7212115': '复制配置',
'74e2bc6615b7dbbb11fd5e1e212263ae': '剪切配置',
'e2f401af580d1354ae00ec4ca19e2e24': '粘贴配置',
'21462ae22216eec41dc688cc4a8ae64b': '向前移动',
'ed2bc13d8bbd99e16e017dd5f5393393': '向后移动',
'9e54f3e4ee3330299c5fdc910c2e8d3c': '撤销Undo',
'ae8e86e426c2ba00da274b66dc372a8b': '重做Redo',
'2b6bc0f293f5ca01b006206c2535ccbc': '操作',
'aa920263020f14211a44ea172efc7253': '上下文数据',
'48ac479789304b37afa2f1b06642f4da': '当前',
'9bc16c658ab8a8c4eddc5e24d85bef20': '上层',
'004d4be2ba8e6b8eed9333d15bc80a88': '上{{@1}}层',
'e366ccf1556c0672dcecba135ed5472e': '设置',
'0cbec43d00e491a663ff0525ffe31868': '快速构建「{{@1}}」',
'1dd554cdfc1ddf7dce13453805523c16': '变更',
'a82240ce09faf0b972a8aa5c9e93d209': '插入组件面板',
'eadc8c8d4a8776893672330598babca0': '位置错误,目标位置没有找到',
'f3c057f37fb9a4e7dd44b04919c12578': '请从左侧组件面板中点击添加新的元素。'
});

View File

@ -5,6 +5,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const nodeExternals = require('webpack-node-externals');
const path = require('path');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const i18nConfig = require('./i18nConfig');
module.exports = {
mode: 'production', // development production
@ -24,13 +25,22 @@ module.exports = {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
compilerOptions: {
declaration: true,
outDir: './lib'
use: [
{
loader: 'ts-loader',
options: {
compilerOptions: {
declaration: true,
outDir: './lib'
}
}
},
{
loader: 'webpack-react-i18n',
options: i18nConfig
}
}
]
},
{
test: /\.scss$/i,