-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yangzy0603
committed
Jun 27, 2023
1 parent
238bc0a
commit a82c32c
Showing
96 changed files
with
2,416 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// more config: http://gitlab.alibaba-inc.com/parrot/parrot-tool-must/blob/master/doc/config.md | ||
const name = 'advance'; | ||
module.exports = { | ||
extract: { | ||
name, | ||
sourcePath: 'src', | ||
fileType: 'ts', | ||
prettier: true, | ||
exclude: (path)=>{ | ||
return path.includes('/pages/') ; // | ||
}, | ||
macro: { | ||
path: 'src/i18n', | ||
method: '$i18n.get({id:"$key$",dm:"$defaultMessage$"})', | ||
import: 'import $i18n from "src/i18n"', | ||
keySplitter: '.', | ||
placeholder: variable => { | ||
return `{${variable}}`; | ||
}, | ||
implement: `import locale from '@aligov/global-locale'; | ||
import stringFormat from '@aligov/global-string-format'; | ||
import strings from './strings'; | ||
let language; // Current language | ||
let intl; // Instance of intl-universal. Create by provideIntl | ||
function update() { | ||
const { lang } = locale.getLocale(); | ||
language = lang; | ||
intl = stringFormat.init(lang, strings, { name: '${name}' }); | ||
} | ||
function change(langTag) { | ||
locale.setLang(langTag); | ||
update(); | ||
} | ||
function get(id, variable = {}) { | ||
if (!intl) update(); | ||
if (typeof id === 'string') { | ||
return stringFormat.format( | ||
{ | ||
id: id, | ||
}, | ||
variable, | ||
{ name: '${name}' } | ||
); | ||
} else if (typeof id === 'object' && id.dm) { | ||
id.defaultMessage = id.dm; | ||
} | ||
return stringFormat.format( | ||
{ | ||
id: id.id, | ||
defaultString: id.dm, | ||
}, | ||
variable, | ||
{ name: '${name}' } | ||
); | ||
} | ||
export default { | ||
get, | ||
update, | ||
change, | ||
language, | ||
}; | ||
`, | ||
dependencies: ['@aligov/global-locale', '@aligov/global-string-format'], | ||
}, | ||
babel: { | ||
allowImportExportEverywhere: true, | ||
decoratorsBeforeExport: true, | ||
plugins: [ | ||
'asyncGenerators', | ||
'classProperties', | ||
'decorators-legacy', | ||
'doExpressions', | ||
'exportExtensions', | ||
'exportDefaultFrom', | ||
'typescript', | ||
'functionSent', | ||
'functionBind', | ||
'jsx', | ||
'objectRestSpread', | ||
'dynamicImport', | ||
'numericSeparator', | ||
'optionalChaining', | ||
'optionalCatchBinding', | ||
], | ||
}, | ||
isNeedUploadCopyToMedusa: false, | ||
sourceLang: 'zh-CN', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ | |
"postpublish": "tnpm sync @antv/gi-assets-advance" | ||
}, | ||
"dependencies": { | ||
"@aligov/global-locale": "^1.0.5", | ||
"@aligov/global-string-format": "^1.0.7", | ||
"@ant-design/icons": "^4.6.2", | ||
"@antv/algorithm": "^0.1.26-beta.0", | ||
"@antv/g2plot": "^2.4.4", | ||
|
@@ -48,14 +50,14 @@ | |
"lodash": "^4.17.21", | ||
"nanoid": "^4.0.0", | ||
"query-string": "^7.1.1", | ||
"react-draggable": "^4.4.5", | ||
"react-force-graph-3d": "^1.21.10", | ||
"react-json-view": "^1.21.3", | ||
"react-spring": "9.3.2", | ||
"react-transition-group": "^4.4.5", | ||
"react-draggable": "^4.4.5", | ||
"size-sensor": "^1.0.1", | ||
"three": "^0.135.0", | ||
"use-immer": "^0.6.0", | ||
"size-sensor": "^1.0.1" | ||
"use-immer": "^0.6.0" | ||
}, | ||
"peerDependencies": { | ||
"@antv/graphin": "^2.7.15", | ||
|
@@ -65,5 +67,6 @@ | |
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"repository": "[email protected]:antvis/G6VP.git" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
packages/gi-assets-advance/src/components/AddSheetbar/registerMeta.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/gi-assets-advance/src/components/AjustLayout/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
packages/gi-assets-advance/src/components/AjustLayout/registerMeta.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.