From a7296d2ea2ba6abfffd686d20a2c443b90a429bc Mon Sep 17 00:00:00 2001 From: qkiroc Date: Sun, 14 Aug 2022 16:37:46 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6d908ad872292ab201e9415365f6b656b932981f --- .../eidtor-core-i18n-en-US-1660304908871.xlsx | Bin 0 -> 58046 bytes packages/amis-editor-core/i18nConfig.js | 37 ++++ packages/amis-editor-core/package.json | 8 +- packages/amis-editor-core/src/index.ts | 2 + packages/amis-editor-core/src/local/en-US.ts | 195 ++++++++++++++++++ packages/amis-editor-core/src/local/index.ts | 2 + packages/amis-editor-core/src/local/zh-CN.ts | 178 ++++++++++++++++ packages/amis-editor-core/webpack.config.js | 22 +- 8 files changed, 436 insertions(+), 8 deletions(-) create mode 100644 packages/amis-editor-core/eidtor-core-i18n-en-US-1660304908871.xlsx create mode 100644 packages/amis-editor-core/i18nConfig.js create mode 100644 packages/amis-editor-core/src/local/en-US.ts create mode 100644 packages/amis-editor-core/src/local/index.ts create mode 100644 packages/amis-editor-core/src/local/zh-CN.ts diff --git a/packages/amis-editor-core/eidtor-core-i18n-en-US-1660304908871.xlsx b/packages/amis-editor-core/eidtor-core-i18n-en-US-1660304908871.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..669c6123990f14e20ff2acc9774c9816198a5893 GIT binary patch literal 58046 zcmeHwYm6M%mEQQV*^RT_T_gFi2oRt#Ka2zmvg`ezIdsIAB}=pkk&?Z3jK!_0TQe>8 z%UwNu?5+WlGDT7nMOqK)VM-#kvP4T3Nj+@7#s3C^1PHKyf-C}Px@Q;%(4Sy|{0NZm z*6pdPbEk@=q+z!AsJ1&V7CN+;h*_e*c%g{FN#3-=Dnl#}EDe(|`N5AADhI zO8k5cpGBQ;d#}??>S3qH*Y0g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R_CecnAPSuYZ5r1L>lRi@en8Xx-kVar?|`8f{_06bjUc z{ZGiewq-9QAZ?yd({ybl5;_0GsA+_$O;KHZi(y()E)b?mmF0G~qqVJM4d08Qv^KRG zT8jbwQ3qt>GQW@-IX(Le-qwA*lS z>lRvAx|@HIR#VPG(CR7;;93K{FFr3X(G{95B2-yId|qB+wh@<>5TBQq;H~l!d)J6> z%FFDjEF-=tFY`#ZoR>$syo#Cht1|v?QKnxZ0DN9WS^8C3Gq)(yjZ~=>r-}HsTnezx zgK-4u(qh4qaXeZh))KqEzZgx#@4{BG*MKg0JL{zpg=ePgicRAuYfYIo#7J>8am6IP zgZ8CupfvSNE&W!Jkj%XEHgu!_reJLNnMg=0yG?^Roc&BqDPk8#m*iG0FN4l{2vb?H zgMG5rmxq`ry`~HF%3IiAQ26_&|MqJ?!0QC@^EC`J`rnF4 zz5RY#eDSw~e>5;c#m}FSvPV&2R(v!8)zX85H~#4Dx2LAW&!3ahH@}oUmRPZ|tF@?) zEb@wedp@gW`N@S^SbZ{(7xv#x3#(nKR-h`G@(S+#PiX~tcc?|xqhVh3KmM1}gQ8l2 vx-sPyocOO~n^Fs^i%VYc5B?z~x?-u>e*Yi*Gm-b7<9{2_<&XS#@z?(aJ6&OC literal 0 HcmV?d00001 diff --git a/packages/amis-editor-core/i18nConfig.js b/packages/amis-editor-core/i18nConfig.js new file mode 100644 index 000000000..d874d8a96 --- /dev/null +++ b/packages/amis-editor-core/i18nConfig.js @@ -0,0 +1,37 @@ +module.exports = { + entry: { + dir: './src' + }, + file: { + test: /.*(ts|tsx|js|jsx)$/ + }, + ignore: { + list: ['src/local'] + }, + importInfo: { + source: 'i18n-runtime', + imported: 'i18n', + local: '_i18n' + }, + i18nModule: 'amis-core', + languages: [ + { + name: 'en-US', + path: './src/local' + }, + { + name: 'zh-CN', + path: './src/local' + } + ], + init: { + fileName: 'eidtor-core-i18n', + fileExtension: 'xlsx', + path: './' + }, + translate: { + appId: '20220810001301703', + key: 'WW7jKaJJBrtCawTOkCpk', + host: 'http://api.fanyi.baidu.com' + } +}; diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index a1b1ba79f..fdc257786 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -7,7 +7,9 @@ "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", @@ -27,6 +29,7 @@ }, "dependencies": { "deep-diff": "1.0.2", + "i18n-runtime": "0.0.0-alpha.11", "json-ast-comments": "^1.1.0", "lodash": "^4.17.15", "mobx": "^4.5.0", @@ -90,7 +93,8 @@ "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.0-alpha.11" }, "peerDependencies": { "amis": "*", diff --git a/packages/amis-editor-core/src/index.ts b/packages/amis-editor-core/src/index.ts index db88b0721..375a4cc5c 100644 --- a/packages/amis-editor-core/src/index.ts +++ b/packages/amis-editor-core/src/index.ts @@ -1,6 +1,8 @@ /** * @file 总入口 */ +import 'amis'; +import './local/index'; import Editor from './component/Editor'; import './component/ClassNameControl'; diff --git a/packages/amis-editor-core/src/local/en-US.ts b/packages/amis-editor-core/src/local/en-US.ts new file mode 100644 index 000000000..476af76bf --- /dev/null +++ b/packages/amis-editor-core/src/local/en-US.ts @@ -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': '  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.' +}); diff --git a/packages/amis-editor-core/src/local/index.ts b/packages/amis-editor-core/src/local/index.ts new file mode 100644 index 000000000..85a1241c2 --- /dev/null +++ b/packages/amis-editor-core/src/local/index.ts @@ -0,0 +1,2 @@ +import './en-US'; +import './zh-CN'; \ No newline at end of file diff --git a/packages/amis-editor-core/src/local/zh-CN.ts b/packages/amis-editor-core/src/local/zh-CN.ts new file mode 100644 index 000000000..c1480207a --- /dev/null +++ b/packages/amis-editor-core/src/local/zh-CN.ts @@ -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': '选中组件插入到 ', + 'd87481b371771b4f150da76e311bbbef': '输入关键字可过滤组件', + 'becdc848350872592201e31bab03892a': '无法预览', + 'f3430f4fdd8b9643daa74f4a5716dd15': ' 详情 ', + '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': + '
拖入占位
', + '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': '请从左侧组件面板中点击添加新的元素。' +}); diff --git a/packages/amis-editor-core/webpack.config.js b/packages/amis-editor-core/webpack.config.js index 5fb7557b3..6a54adfca 100644 --- a/packages/amis-editor-core/webpack.config.js +++ b/packages/amis-editor-core/webpack.config.js @@ -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, From 9104b26351e08ba894116b7ad83632d6ae99184a Mon Sep 17 00:00:00 2001 From: qkiroc Date: Thu, 25 Aug 2022 11:27:54 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E8=B0=83=E6=95=B4i18n=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I71f51f1cd0878a4cbc3198fd4b0b810388b559e6 --- packages/amis-editor-core/i18nConfig.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/amis-editor-core/i18nConfig.js b/packages/amis-editor-core/i18nConfig.js index d874d8a96..cfd41d9a3 100644 --- a/packages/amis-editor-core/i18nConfig.js +++ b/packages/amis-editor-core/i18nConfig.js @@ -6,25 +6,25 @@ module.exports = { test: /.*(ts|tsx|js|jsx)$/ }, ignore: { - list: ['src/local'] + list: ['src/locale'] }, importInfo: { source: 'i18n-runtime', imported: 'i18n', local: '_i18n' }, - i18nModule: 'amis-core', + i18nModule: 'i18n-runtime', languages: [ { name: 'en-US', - path: './src/local' + path: './src/locale' }, { name: 'zh-CN', - path: './src/local' + path: './src/locale' } ], - init: { + output: { fileName: 'eidtor-core-i18n', fileExtension: 'xlsx', path: './' From 719290ec9f7a7edbc05e774cc73ba83a16eb4a8a Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Thu, 25 Aug 2022 15:02:25 +0800 Subject: [PATCH 03/14] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=AF=B9scss?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=AD=E7=B1=BB=E5=90=8Dcxd=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E7=9A=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id8a1776922789758c4b7e63af360c6c0d983510e --- packages/amis-editor-core/package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index fdc257786..a836bcdbd 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -24,7 +24,8 @@ ], "lint-staged": { "{src,scss,examples}/**/**/*.{js,jsx,ts,tsx,scss,json}": [ - "prettier --write" + "prettier --write", + "stylelint" ] }, "dependencies": { @@ -87,6 +88,7 @@ "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", From a8ba29ddb2fb1434ac42f5a5d357836ef9879f0b Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Thu, 25 Aug 2022 17:40:29 +0800 Subject: [PATCH 04/14] =?UTF-8?q?fix:=20amis-saas-6135=20[Bug]=20=E9=9D=9E?= =?UTF-8?q?=E4=BA=91=E8=88=8D=E4=B8=BB=E9=A2=98=E7=9A=84=E5=BA=94=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I29e29ecbbdebd1640419593e6bbabfe72eddcc85 --- .../amis-editor-core/scss/_rightPanel.scss | 18 +++--------------- .../scss/control/_formula-control.scss | 10 +++------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/packages/amis-editor-core/scss/_rightPanel.scss b/packages/amis-editor-core/scss/_rightPanel.scss index 7334f2d25..ee3f82420 100644 --- a/packages/amis-editor-core/scss/_rightPanel.scss +++ b/packages/amis-editor-core/scss/_rightPanel.scss @@ -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; diff --git a/packages/amis-editor-core/scss/control/_formula-control.scss b/packages/amis-editor-core/scss/control/_formula-control.scss index b073f9666..1770bc3e1 100644 --- a/packages/amis-editor-core/scss/control/_formula-control.scss +++ b/packages/amis-editor-core/scss/control/_formula-control.scss @@ -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; @@ -75,7 +70,8 @@ > div:first-child { max-width: calc(100% - 20px); // 避免表达式内容太长撑开面板 - > div,span { + > div, + span { padding-right: 0; // 覆盖 amis 默认样式 } } From 02e71cde2bac80df5542a88d2264c984892a6244 Mon Sep 17 00:00:00 2001 From: liqiu03 Date: Thu, 25 Aug 2022 23:56:47 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9Acxd=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8e2e0631fedcd1ee61677d5e534201615e1cd854 --- .../amis-editor-core/scss/control/_formItem-control.scss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/amis-editor-core/scss/control/_formItem-control.scss b/packages/amis-editor-core/scss/control/_formItem-control.scss index a11322c48..dc229e36b 100644 --- a/packages/amis-editor-core/scss/control/_formItem-control.scss +++ b/packages/amis-editor-core/scss/control/_formItem-control.scss @@ -1,4 +1,5 @@ /* 表单项配置面板 */ +$ns: cxd-; .ae-formItemControl { & > div:last-child { .ae-formItemControl-header { @@ -42,21 +43,21 @@ &-body { padding: var(--gap-base); --Form-item-gap: 12px; - .cxd-IconPickerControl { - .cxd-IconPickerControl-value { + .#{$ns}IconPickerControl { + .#{$ns}IconPickerControl-value { width: 88%; } input { width: 0; } - .cxd-IconPickerControl-clear { + .#{$ns}IconPickerControl-clear { display: inline-block; } } } .inputGroup-addOn-no-border { - .cxd-InputGroup-addOn { + .#{$ns}InputGroup-addOn { border: none; padding-left: 5px; padding-right: 5px; From 43045372ca36eee69867086de461e7d512a946aa Mon Sep 17 00:00:00 2001 From: qkiroc Date: Fri, 26 Aug 2022 17:09:12 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0d20387b12540e68aac7c42c846018ee10919bc4 --- packages/amis-editor-core/package.json | 7 ++++--- packages/amis-editor-core/src/index.ts | 2 +- packages/amis-editor-core/src/{local => locale}/en-US.ts | 0 packages/amis-editor-core/src/{local => locale}/index.ts | 0 packages/amis-editor-core/src/{local => locale}/zh-CN.ts | 0 5 files changed, 5 insertions(+), 4 deletions(-) rename packages/amis-editor-core/src/{local => locale}/en-US.ts (100%) rename packages/amis-editor-core/src/{local => locale}/index.ts (100%) rename packages/amis-editor-core/src/{local => locale}/zh-CN.ts (100%) diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index a836bcdbd..618d00a5c 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "deep-diff": "1.0.2", - "i18n-runtime": "0.0.0-alpha.11", + "i18n-runtime": "0.0.2", "json-ast-comments": "^1.1.0", "lodash": "^4.17.15", "mobx": "^4.5.0", @@ -96,12 +96,13 @@ "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^4.8.0", "webpack-node-externals": "^3.0.0", - "webpack-react-i18n": "^0.0.0-alpha.11" + "webpack-react-i18n": "0.0.2" }, "peerDependencies": { "amis": "*", "amis-core": "*", "amis-formula": "*", - "amis-ui": "*" + "amis-ui": "*", + "i18n-runtime": "*" } } diff --git a/packages/amis-editor-core/src/index.ts b/packages/amis-editor-core/src/index.ts index 375a4cc5c..0cbca643e 100644 --- a/packages/amis-editor-core/src/index.ts +++ b/packages/amis-editor-core/src/index.ts @@ -2,7 +2,7 @@ * @file 总入口 */ import 'amis'; -import './local/index'; +import './locale/index'; import Editor from './component/Editor'; import './component/ClassNameControl'; diff --git a/packages/amis-editor-core/src/local/en-US.ts b/packages/amis-editor-core/src/locale/en-US.ts similarity index 100% rename from packages/amis-editor-core/src/local/en-US.ts rename to packages/amis-editor-core/src/locale/en-US.ts diff --git a/packages/amis-editor-core/src/local/index.ts b/packages/amis-editor-core/src/locale/index.ts similarity index 100% rename from packages/amis-editor-core/src/local/index.ts rename to packages/amis-editor-core/src/locale/index.ts diff --git a/packages/amis-editor-core/src/local/zh-CN.ts b/packages/amis-editor-core/src/locale/zh-CN.ts similarity index 100% rename from packages/amis-editor-core/src/local/zh-CN.ts rename to packages/amis-editor-core/src/locale/zh-CN.ts From a966e61960183c23b5010459ce5b492e0d644768 Mon Sep 17 00:00:00 2001 From: qkiroc Date: Tue, 30 Aug 2022 22:27:33 +0800 Subject: [PATCH 07/14] =?UTF-8?q?amis-saas-6369=20=20i18n=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I211221ab3033a4b9376bb1f37f4ba6de47dc3c0c --- packages/amis-editor-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index 618d00a5c..5e8e98feb 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "deep-diff": "1.0.2", - "i18n-runtime": "0.0.2", + "i18n-runtime": "0.0.4", "json-ast-comments": "^1.1.0", "lodash": "^4.17.15", "mobx": "^4.5.0", From 7813f78de8d2cc83485aaf0e10af4d967fa190b9 Mon Sep 17 00:00:00 2001 From: liqiu03 Date: Wed, 31 Aug 2022 10:06:42 +0800 Subject: [PATCH 08/14] =?UTF-8?q?amis-saas-6135=20[Bug]=20=E9=9D=9E?= =?UTF-8?q?=E4=BA=91=E8=88=8D=E4=B8=BB=E9=A2=98=E7=9A=84=E5=BA=94=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I65527e5d938179efc714c67af44586cb04a233b6 --- .../scss/control/_formItem-control.scss | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/packages/amis-editor-core/scss/control/_formItem-control.scss b/packages/amis-editor-core/scss/control/_formItem-control.scss index dc229e36b..e1fa0e9f3 100644 --- a/packages/amis-editor-core/scss/control/_formItem-control.scss +++ b/packages/amis-editor-core/scss/control/_formItem-control.scss @@ -1,5 +1,4 @@ /* 表单项配置面板 */ -$ns: cxd-; .ae-formItemControl { & > div:last-child { .ae-formItemControl-header { @@ -43,24 +42,34 @@ $ns: cxd-; &-body { padding: var(--gap-base); --Form-item-gap: 12px; - .#{$ns}IconPickerControl { - .#{$ns}IconPickerControl-value { - width: 88%; - } - input { - width: 0; - } - .#{$ns}IconPickerControl-clear { - display: inline-block; + .fix-icon-picker-overflow { + > div { + > div { + > div { + div:first-child { + width: 88%; + } + input { + width: 0; + } + a { + display: inline-block; + } + } + } } } } .inputGroup-addOn-no-border { - .#{$ns}InputGroup-addOn { - border: none; - padding-left: 5px; - padding-right: 5px; + > div { + > div { + > span { + border: none; + padding-left: 5px; + padding-right: 5px; + } + } } } } From 2cdfb8165c125d01c86e6006a65d43bec41f8b1a Mon Sep 17 00:00:00 2001 From: pianruijie Date: Mon, 29 Aug 2022 21:23:21 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E9=80=82=E9=85=8D=E5=A4=9A=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=20amis-saas-6135?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I86ed8983ede31c469c5c6b3b360db498bd08b97b --- .../scss/control/_event-action.scss | 349 ++++++++---------- 1 file changed, 152 insertions(+), 197 deletions(-) diff --git a/packages/amis-editor-core/scss/control/_event-action.scss b/packages/amis-editor-core/scss/control/_event-action.scss index 804748848..368c7af33 100644 --- a/packages/amis-editor-core/scss/control/_event-action.scss +++ b/packages/amis-editor-core/scss/control/_event-action.scss @@ -18,8 +18,8 @@ button { top: 44px; width: 100%; - color: #2468F2; - border: #{px2rem(1px)} solid #2468F2; + color: #2468f2; + border: #{px2rem(1px)} solid #2468f2; border-radius: #{px2rem(4px)}; span { display: none; @@ -28,7 +28,7 @@ } ul { width: 100%; - .cxd-DropDown-button { + li { height: auto; padding: #{px2rem(7px)} #{px2rem(12px)}; } @@ -46,7 +46,7 @@ width: #{px2rem(16px)}; height: #{px2rem(16px)}; &:hover { - color: #2468F2; + color: #2468f2; } } .event-item { @@ -56,8 +56,8 @@ display: flex; flex-direction: row; justify-content: space-between; - background: #F2F2F4; - border: #{px2rem(1px)} solid #d4D6D9; + background: #f2f2f4; + border: #{px2rem(1px)} solid #d4d6d9; border-left: none; border-right: none; padding: 0 12px; @@ -69,7 +69,7 @@ align-items: center; & > div { margin-right: #{px2rem(12px)}; - &:last-child{ + &:last-child { margin-right: 0; } } @@ -77,7 +77,7 @@ } &:last-child { .event-item-header { - border-bottom: #{px2rem(1px)} solid #d4D6D9; + border-bottom: #{px2rem(1px)} solid #d4d6d9; } } .no-bd-btm { @@ -91,25 +91,26 @@ background: #ffffff; list-style-type: none; .ae-option-control-item { - background: #F7F7F9; + background: #f7f7f9; width: 100%; padding: #{px2rem(8px)}; margin-bottom: #{px2rem(12px)}; border-radius: #{px2rem(4px)}; border: #{px2rem(1px)} solid transparent; &:hover { - border: #{px2rem(1px)} solid #2468F2; + border: #{px2rem(1px)} solid #2468f2; } .action-control-header { @include flexBox(row, space-between); - &-left, &-right { + &-left, + &-right { color: #303540; display: flex; align-items: center; - .icon{ - color: #84868C; + .icon { + color: #84868c; &:hover { - color: #2468F2; + color: #2468f2; } } .action-item-actiontype { @@ -122,14 +123,14 @@ &-right { & > div { margin-right: #{px2rem(8px)}; - &:last-child{ + &:last-child { margin-right: 0; } } } } .action-control-content { - color: #84868C; + color: #84868c; letter-spacing: 0; line-height: #{px2rem(20px)}; font-weight: 400; @@ -140,11 +141,11 @@ white-space: nowrap; text-overflow: ellipsis; .variable-left { - color: #2468F2; + color: #2468f2; margin-left: #{px2rem(4px)}; } .variable-right { - color: #2468F2; + color: #2468f2; margin-right: #{px2rem(4px)}; } } @@ -202,7 +203,7 @@ border-bottom: none; } &-placeholder { - color: #84868C; + color: #84868c; line-height: #{px2rem(24px)}; background: url('../static/empty.png'); text-align: center; @@ -223,7 +224,7 @@ align-items: center; justify-content: center; font-size: 12px; - color: #84868C; + color: #84868c; line-height: #{px2rem(24px)}; &.no-settings { @@ -246,131 +247,109 @@ } .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; + .cxd-Tree-placeholder { + margin-top: 82px; + height: 64px; + background: url('../static/empty.png') center/contain no-repeat; + color: transparent; + } + } - .is-matched { - color: #2468F2; + .action-tree-control { + ul { + li { + font-size: 12px; + & > div { + flex-direction: row-reverse; + padding-left: 16px; + height: 32px; + line-height: 32px; + + .cxd-Tree-itemText { + color: #151a26; + + .is-matched { + color: #2468f2; + } + } + + .cxd-Tree-item-icons { + display: none; + } + 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); @@ -382,65 +361,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; - } - } - - .cxd-Checkbox { - font-size: 12px; - } - - .cxd-Remark { - margin-left: 0; - margin-top: 5px; } } } @@ -449,24 +411,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; } } } From bb94ca65c4834124135f586c354c6821daa88ade Mon Sep 17 00:00:00 2001 From: liqiu03 Date: Wed, 31 Aug 2022 16:10:22 +0800 Subject: [PATCH 10/14] =?UTF-8?q?amis-saas-6135=20[Bug]=20=E9=9D=9E?= =?UTF-8?q?=E4=BA=91=E8=88=8D=E4=B8=BB=E9=A2=98=E7=9A=84=E5=BA=94=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idef4818b655677a563abbcdcb07a37f0ccb72826 --- .../scss/control/_formItem-control.scss | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/packages/amis-editor-core/scss/control/_formItem-control.scss b/packages/amis-editor-core/scss/control/_formItem-control.scss index e1fa0e9f3..aeba9228f 100644 --- a/packages/amis-editor-core/scss/control/_formItem-control.scss +++ b/packages/amis-editor-core/scss/control/_formItem-control.scss @@ -43,33 +43,25 @@ padding: var(--gap-base); --Form-item-gap: 12px; .fix-icon-picker-overflow { - > div { - > div { - > div { - div:first-child { - width: 88%; - } - input { - width: 0; - } - a { - display: inline-block; - } - } - } + + input { + width: 0; + } + a { + display: inline-block; + position: relative; + left: -10px; } } } .inputGroup-addOn-no-border { - > div { - > div { - > span { - border: none; - padding-left: 5px; - padding-right: 5px; - } - } + + .inputGroup-split-line { + border: none; + padding-left: 5px; + padding-right: 5px; + line-height: 30px; } } } From 13ce7676d50f5171874ebe58c4c339e521081d6a Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Wed, 31 Aug 2022 20:14:30 +0800 Subject: [PATCH 11/14] =?UTF-8?q?fix:amis-saas-6393=20[Bug]=20EditorToolba?= =?UTF-8?q?r=E5=9B=BE=E6=A0=87=E7=BB=8F=E8=BF=87svgr=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=90=8E=E7=9A=84SVG=E6=96=87=E4=BB=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2a0c9de3d2b7432192a35e7542cfae018c56bc92 --- packages/amis-editor-core/scss/editor.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/amis-editor-core/scss/editor.scss b/packages/amis-editor-core/scss/editor.scss index 74f825a6a..8a95e6857 100644 --- a/packages/amis-editor-core/scss/editor.scss +++ b/packages/amis-editor-core/scss/editor.scss @@ -64,6 +64,7 @@ // 覆盖amis默认top值,避免导致未垂直居中 .ae-Editor-toolbar svg.icon { top: 0 !important; + font-size: 14px; } &.is-fixed { From be287802e516873e512e962dc943cd1008c1ad8f Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Thu, 1 Sep 2022 15:53:15 +0800 Subject: [PATCH 12/14] =?UTF-8?q?amis-saas-6135=20[Bug]=20=E9=9D=9E?= =?UTF-8?q?=E4=BA=91=E8=88=8D=E4=B8=BB=E9=A2=98=E7=9A=84=E5=BA=94=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I271f9b8e081ca9699753d8a4ff37f14a90ffb67a --- packages/amis-editor-core/package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index b62eef504..25f69af8e 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -24,7 +24,9 @@ ], "lint-staged": { "{src,scss,examples}/**/**/*.{js,jsx,ts,tsx,scss,json}": [ - "prettier --write", + "prettier --write" + ], + "{src,scss,examples}/**/**/*.{scss}": [ "stylelint" ] }, From c61ee3546bcf1615243c69abe88de5ecb30a1ffb Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Fri, 2 Sep 2022 10:23:23 +0800 Subject: [PATCH 13/14] =?UTF-8?q?amis-saas-6452=20editor=20=E4=BB=8E=205.2?= =?UTF-8?q?.1=E7=89=88=E6=9C=AC=E6=94=AF=E6=8C=81=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=20esm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I42d72f5550db1ad4f4d0c6cde8b3e708661909a8 --- packages/amis-editor-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index 25f69af8e..9554f1068 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -26,7 +26,7 @@ "{src,scss,examples}/**/**/*.{js,jsx,ts,tsx,scss,json}": [ "prettier --write" ], - "{src,scss,examples}/**/**/*.{scss}": [ + "{src,scss,examples}/**/**/*.scss": [ "stylelint" ] }, From 449a81e1a234e035d86604b10bf5f7ee35aa22e2 Mon Sep 17 00:00:00 2001 From: qianchuan Date: Sun, 4 Sep 2022 20:39:39 +0800 Subject: [PATCH 14/14] fix:[amis-saas-6481]minieditor isMobile error Change-Id: Ice4000ef72681d82d70c845849df8af67d41b672 --- packages/amis-editor-core/package.json | 2 +- packages/amis-editor-core/src/component/MiniEditor.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index 9554f1068..5014e2ebe 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -1,6 +1,6 @@ { "name": "amis-editor-core", - "version": "5.2.0-beta.36", + "version": "5.2.0-beta.55", "description": "amis 可视化编辑器", "main": "lib/index.min.js", "types": "lib/index.d.ts", diff --git a/packages/amis-editor-core/src/component/MiniEditor.tsx b/packages/amis-editor-core/src/component/MiniEditor.tsx index 8dc8045bf..96a1c24ef 100644 --- a/packages/amis-editor-core/src/component/MiniEditor.tsx +++ b/packages/amis-editor-core/src/component/MiniEditor.tsx @@ -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 (