Skip to content

Commit

Permalink
Merge branch '1.3' of https://github.com/steedos/steedos-widgets into…
Browse files Browse the repository at this point in the history
… 1.3
  • Loading branch information
sunhaolin committed Nov 24, 2023
2 parents 9894f51 + dc2ef13 commit c5a8152
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 20 deletions.
2 changes: 1 addition & 1 deletion apps/experience/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@steedos/ee_experience",
"version": "1.3.13",
"version": "1.3.14",
"main": "package.service.js",
"private": true,
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "storybook",
"version": "1.3.13",
"version": "1.3.14",
"main": "index.js",
"private": true,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "1.3.13"
"version": "1.3.14"
}
2 changes: 1 addition & 1 deletion packages/@steedos-widgets/amis-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos-widgets/amis-lib",
"private": false,
"version": "1.3.13",
"version": "1.3.14",
"unpkg": "./dist/index.umd.js",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/@steedos-widgets/amis-lib/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"frontend_record_detail_tab_related": "Related",
"frontend_all_apps": "All apps",
"frontend_all_projects": "All projects",
"frontend_open_app_launcher": "Open App Launcher",
"frontend_application_launcher": "Application launcher",
"frontend_menu": "Menu",
"frontend_help": "Help",
Expand Down
1 change: 1 addition & 0 deletions packages/@steedos-widgets/amis-lib/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"frontend_record_detail_tab_related": "相关",
"frontend_all_apps": "所有应用",
"frontend_all_projects": "所有项目",
"frontend_open_app_launcher": "打开应用程序启动器",
"frontend_application_launcher": "应用程序启动器",
"frontend_menu": "菜单",
"frontend_help": "帮助",
Expand Down
4 changes: 2 additions & 2 deletions packages/@steedos-widgets/amis-object/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos-widgets/amis-object",
"private": false,
"version": "1.3.13",
"version": "1.3.14",
"main": "dist/amis-object.cjs.js",
"module": "dist/amis-object.esm.js",
"unpkg": "dist/amis-object.umd.js",
Expand Down Expand Up @@ -61,7 +61,7 @@
"uglify-js": "^3.17.0"
},
"dependencies": {
"@steedos-widgets/amis-lib": "1.3.13",
"@steedos-widgets/amis-lib": "1.3.14",
"autoprefixer": "^10.4.13",
"postcss": "^8.4.19",
"tailwindcss": "^3.2.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: [email protected]
* @Date: 2022-09-01 14:44:57
* @LastEditors: 涂佳俊 [email protected]
* @LastEditTime: 2023-11-22 09:07:37
* @LastEditors: liaodaxue
* @LastEditTime: 2023-11-24 15:52:55
* @Description:
*/

Expand Down Expand Up @@ -34,7 +34,7 @@ export const AmisAppLauncher = async (props) => {
}
`
let dialogSchema = {}
const badgeText = "${IF(${id} == 'approve_workflow',${ss:keyvalues.badge.value|pick:'workflow'},${keyvalues.badge.value|pick:${id}}) | toInt}";
const badgeText = "${IF(${id} == 'approve_workflow',${ss:keyvalues.badge.value|pick:'workflow'},${ss:keyvalues.badge.value|pick:${id}}) | toInt}";
if(isMobile){
dialogSchema = {
"type": "service",
Expand Down Expand Up @@ -328,7 +328,7 @@ export const AmisAppLauncher = async (props) => {
{
"type": "tpl",
"className": "flex items-center",
"tpl": "<div aria-haspopup='true' title='Open App Launcher' class='slds-icon-waffle_container slds-context-bar__button' title='Open App Launcher' type='button'><span class='slds-icon-waffle'><span class='slds-r1'></span><span class='slds-r2'></span><span class='slds-r3'></span><span class='slds-r4'></span><span class='slds-r5'></span><span class='slds-r6'></span><span class='slds-r7'></span><span class='slds-r8'></span><span class='slds-r9'></span></span></div>",
"tpl": `<div aria-haspopup='true' title='${i18next.t('frontend_open_app_launcher')}' class='slds-icon-waffle_container slds-context-bar__button' type='button'><span class='slds-icon-waffle'><span class='slds-r1'></span><span class='slds-r2'></span><span class='slds-r3'></span><span class='slds-r4'></span><span class='slds-r5'></span><span class='slds-r6'></span><span class='slds-r7'></span><span class='slds-r8'></span><span class='slds-r9'></span></span></div>`,
"badge": {
"visibleOn": "${ss:keyvalues.badge.value.workflow | toInt}",
"offset": [3, -3],
Expand Down
2 changes: 1 addition & 1 deletion packages/@steedos-widgets/example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos-widgets/example",
"private": true,
"version": "1.3.13",
"version": "1.3.14",
"main": "dist/meta.js",
"module": "dist/meta.js",
"unpkg": "dist/meta.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/@steedos-widgets/fullcalendar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos-widgets/fullcalendar",
"private": false,
"version": "1.3.13",
"version": "1.3.14",
"main": "dist/fullcalendar.cjs.js",
"module": "dist/fullcalendar.esm.js",
"unpkg": "dist/fullcalendar.umd.js",
Expand Down Expand Up @@ -54,7 +54,7 @@
"@fullcalendar/list": "5.11.4",
"@fullcalendar/react": "5.11.4",
"@fullcalendar/timegrid": "5.11.4",
"@steedos-widgets/amis-lib": "1.3.13"
"@steedos-widgets/amis-lib": "1.3.14"
},
"gitHead": "ffb730e16642eb8e7a7ae5d98d0773c42482e7d2"
}
4 changes: 2 additions & 2 deletions packages/@steedos-widgets/reactflow/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos-widgets/reactflow",
"private": false,
"version": "1.3.13",
"version": "1.3.14",
"main": "dist/reactflow.cjs.js",
"module": "dist/reactflow.esm.js",
"unpkg": "dist/reactflow.umd.js",
Expand Down Expand Up @@ -49,7 +49,7 @@
},
"dependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@steedos-widgets/amis-lib": "1.3.13",
"@steedos-widgets/amis-lib": "1.3.14",
"reactflow": "^11.5.6"
},
"gitHead": "ffb730e16642eb8e7a7ae5d98d0773c42482e7d2"
Expand Down
4 changes: 2 additions & 2 deletions packages/@steedos-widgets/sortable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@steedos-widgets/sortable",
"version": "1.3.13",
"version": "1.3.14",
"main": "dist/sortable.cjs.js",
"module": "dist/sortable.esm.js",
"unpkg": "dist/sortable.umd.js",
Expand Down Expand Up @@ -45,7 +45,7 @@
"dependencies": {
"@dnd-kit/core": "^6.0.5",
"@dnd-kit/sortable": "^7.0.1",
"@steedos-widgets/amis-lib": "1.3.13"
"@steedos-widgets/amis-lib": "1.3.14"
},
"gitHead": "ffb730e16642eb8e7a7ae5d98d0773c42482e7d2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ export function MultipleContainers(props) {
cardClassName = "",
}: Props = props

if(!props.data){
// 为了解决3.2 dispatchevent不生效的问题, https://github.com/baidu/amis/issues/7488
// 如果data为undefined,dispatchEvent时第三个参数传入的current的data为undefined会报错
props.data = {}
}
const MultipleContainersRef: any = useRef();

value && delete(value.$$id);

const [items, setItems] = useState<Items>(
Expand Down Expand Up @@ -244,7 +251,8 @@ export function MultipleContainers(props) {
'change',
createObject(amisData, {
value
})
}),
MultipleContainersRef.current
);
if (rendererEvent?.prevented) {
return;
Expand Down Expand Up @@ -374,7 +382,7 @@ export function MultipleContainers(props) {
});
}, [items]);

return (
let multipleContainers = (
<DndContext
sensors={sensors}
collisionDetection={collisionDetectionStrategy}
Expand Down Expand Up @@ -554,6 +562,7 @@ export function MultipleContainers(props) {
cancelDrop={cancelDrop}
onDragCancel={onDragCancel}
modifiers={modifiers}
{...props}//dispatchevent需要实例中的props有amis的各项属性,因此将所有props一起传下来
>
<div
style={{
Expand Down Expand Up @@ -654,6 +663,11 @@ export function MultipleContainers(props) {
</DndContext>
);

// 为了解决3.2 dispatchevent不生效的问题, https://github.com/baidu/amis/issues/7488
// dispatchEvent时第三个参数传入的current必须是一个带props属性的对象
MultipleContainersRef.current = multipleContainers;
return multipleContainers;

function renderSortableItemDragOverlay(id: UniqueIdentifier) {
const item = cloneDeep(keyBy(cardSource, 'id')[id]) || {id: id, label: '' + id, columnSpan:1}
if (item.columnSpan && item.columnSpan > columns)
Expand Down
2 changes: 1 addition & 1 deletion packages/@steedos-widgets/steedos-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos-widgets/steedos-lib",
"private": false,
"version": "1.3.13",
"version": "1.3.14",
"unpkg": "./dist/index.umd.js",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
Expand Down

0 comments on commit c5a8152

Please sign in to comment.