diff --git a/.eslintignore b/.eslintignore index 92c7bb060..56c5551b7 100755 --- a/.eslintignore +++ b/.eslintignore @@ -13,4 +13,11 @@ packages/element esm doc-site public -package \ No newline at end of file +packages/*/*/client.d.ts +packages/*/*/server.d.ts +packages/*/*/client.js +packages/*/*/server.js +packages/core/build +packages/core/dumi-theme-nocobase +packages/core/devtools +packages/core/database/src/sql-parser/index.js \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index 25db40cac..641cb4f55 100755 --- a/.eslintrc +++ b/.eslintrc @@ -1,20 +1,46 @@ { + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:promise/recommended", + // "plugin:import/recommended", + "plugin:prettier/recommended" + ], "parser": "@typescript-eslint/parser", - "env": { - "node": true - }, + "plugins": [ + "@typescript-eslint", + "react", + "react-hooks", + "prettier", + "promise" + //"import" + ], "globals": { "sleep": true, "prettyFormat": true }, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" + "settings": { + "react": { + "version": "detect" + } + }, + "parserOptions": { + "ecmaVersion": 11, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } }, - "plugins": [ - "react-hooks" - ], "rules": { - "react-hooks/rules-of-hooks": "error" + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "off", + "no-empty-function": "off", + "@typescript-eslint/no-empty-function": "off", + "react/display-name": "off", + "react/prop-types": "off", + "no-explicit-any": "off", + "@typescript-eslint/no-explicit-any": "off" } } diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..f994e815a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,1614 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +## [v0.9.2-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.2-alpha.1...v0.9.2-alpha.2) - 2023-04-19 + +### Merged + +- fix: press enter to reload when the Pagination is focused [`#1720`](https://github.com/nocobase/nocobase/pull/1720) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.2-alpha.2 [`3dfd5a1`](https://github.com/nocobase/nocobase/commit/3dfd5a1f7a3ff14606357f441f547f40fdaa1344) + +## [v0.9.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.9.1-alpha.2...v0.9.2-alpha.1) - 2023-04-19 + +### Merged + +- refactor(plugin-workflow): change single form to custom form block [`#1707`](https://github.com/nocobase/nocobase/pull/1707) +- chore(ci): add timeout config for jobs [`#1725`](https://github.com/nocobase/nocobase/pull/1725) +- refactor(plugin-workflow): migrate menu items to options [`#1724`](https://github.com/nocobase/nocobase/pull/1724) +- fix(client): fix error on clear value in variable input [`#1723`](https://github.com/nocobase/nocobase/pull/1723) +- fix(record-picker): fix the table paging problem [`#1718`](https://github.com/nocobase/nocobase/pull/1718) +- fix(map-plugin): some data is incorrect [`#1717`](https://github.com/nocobase/nocobase/pull/1717) +- fix: data scope not effect in gantt [`#1716`](https://github.com/nocobase/nocobase/pull/1716) +- fix: button loading does not disappear when the operation submit failed [`#1698`](https://github.com/nocobase/nocobase/pull/1698) +- fix(linkage rule):multiple select condition judgment failed [`#1715`](https://github.com/nocobase/nocobase/pull/1715) +- Fix/save through table data [`#1714`](https://github.com/nocobase/nocobase/pull/1714) +- feat: improve ui design for linkage action [`#1659`](https://github.com/nocobase/nocobase/pull/1659) +- feat(map): support to filter other blocks [`#1691`](https://github.com/nocobase/nocobase/pull/1691) +- refactor: improve linkage rule enable [`#1700`](https://github.com/nocobase/nocobase/pull/1700) +- fix: find fields arg [`#1710`](https://github.com/nocobase/nocobase/pull/1710) +- feat(form-block): data templates [`#1704`](https://github.com/nocobase/nocobase/pull/1704) +- fix: linkage relationship data condition judgment failed [`#1681`](https://github.com/nocobase/nocobase/pull/1681) +- fix(gantt): update permission check in gantt block [`#1701`](https://github.com/nocobase/nocobase/pull/1701) +- fix: clearFormGraph [`#1706`](https://github.com/nocobase/nocobase/pull/1706) +- fix(plugin-workflow): fix request body variable component [`#1703`](https://github.com/nocobase/nocobase/pull/1703) +- fix(gantt): improve task bar text [`#1696`](https://github.com/nocobase/nocobase/pull/1696) +- fix: long text should be line feed [`#1686`](https://github.com/nocobase/nocobase/pull/1686) +- fix: cannot display data when remove last page and the page only just one item [`#1685`](https://github.com/nocobase/nocobase/pull/1685) +- fix: meta acl with association query [`#1695`](https://github.com/nocobase/nocobase/pull/1695) +- fix: linkage rule title can not set empty [`#1688`](https://github.com/nocobase/nocobase/pull/1688) +- feat: improve plugin manager ui [`#1650`](https://github.com/nocobase/nocobase/pull/1650) +- feat: gantt block [`#1393`](https://github.com/nocobase/nocobase/pull/1393) +- fix(client): fix constant input lose focus in variable [`#1689`](https://github.com/nocobase/nocobase/pull/1689) +- feat(plugin-workflow): add workflow specific logger [`#1677`](https://github.com/nocobase/nocobase/pull/1677) +- fix: remove designer [`#1684`](https://github.com/nocobase/nocobase/pull/1684) +- test: should load the .env.test [`#1678`](https://github.com/nocobase/nocobase/pull/1678) +- fix: incorrect language after logout [`#1679`](https://github.com/nocobase/nocobase/pull/1679) +- feat: optimize file collection [`#1666`](https://github.com/nocobase/nocobase/pull/1666) +- fix: sort field init performance [`#1675`](https://github.com/nocobase/nocobase/pull/1675) +- fix(plugin-workflow): fix null collection fields [`#1674`](https://github.com/nocobase/nocobase/pull/1674) +- fix(client): fix variable component read pretty mode [`#1673`](https://github.com/nocobase/nocobase/pull/1673) +- fix: ui problem of compact theme [`#1670`](https://github.com/nocobase/nocobase/pull/1670) +- fix: linkage rule enable effect in form [`#1669`](https://github.com/nocobase/nocobase/pull/1669) +- feat: collection template summary [`#1672`](https://github.com/nocobase/nocobase/pull/1672) +- feat: (plugin-workflow) dynamic expression [`#1560`](https://github.com/nocobase/nocobase/pull/1560) +- chore: find inherit collection warn [`#1663`](https://github.com/nocobase/nocobase/pull/1663) +- fix: linkage rule title config clear exception [`#1665`](https://github.com/nocobase/nocobase/pull/1665) +- feat: support tableoid filter [`#1657`](https://github.com/nocobase/nocobase/pull/1657) +- feat(plugin-workflow): add array mapping support in processor [`#1662`](https://github.com/nocobase/nocobase/pull/1662) +- fix(plugin-workflow): fix appends null to collection trigger [`#1661`](https://github.com/nocobase/nocobase/pull/1661) +- feat(filter-operators): eq and ne operators support array [`#1658`](https://github.com/nocobase/nocobase/pull/1658) +- fix(plugin-workflow): fix todo drawer data load [`#1656`](https://github.com/nocobase/nocobase/pull/1656) +- refactor(client): improve translation [`#1654`](https://github.com/nocobase/nocobase/pull/1654) +- fix: fix the 'Add menu item' button disappears [`#1655`](https://github.com/nocobase/nocobase/pull/1655) +- chore: add new allowAddtoCurrent config [`#1652`](https://github.com/nocobase/nocobase/pull/1652) +- feat: support file collection [`#1636`](https://github.com/nocobase/nocobase/pull/1636) +- fix(plugin-workflow): fix manual node drawer [`#1653`](https://github.com/nocobase/nocobase/pull/1653) +- chore: inhertis api with difference schema [`#1545`](https://github.com/nocobase/nocobase/pull/1545) +- fix: select record can not enable child collection [`#1649`](https://github.com/nocobase/nocobase/pull/1649) +- feat: plugin before enable hook [`#1648`](https://github.com/nocobase/nocobase/pull/1648) +- chore: add transaction in set field action [`#1647`](https://github.com/nocobase/nocobase/pull/1647) +- fix(linkage rule):linkage rule not display in action [`#1644`](https://github.com/nocobase/nocobase/pull/1644) +- refactor: view collection options [`#1643`](https://github.com/nocobase/nocobase/pull/1643) +- fix: update field error [`#1645`](https://github.com/nocobase/nocobase/pull/1645) +- feat(Table): column action support linkage rules [`#1638`](https://github.com/nocobase/nocobase/pull/1638) +- fix(view-collection): field name cannot be edited when there with field source [`#1642`](https://github.com/nocobase/nocobase/pull/1642) +- fix: linkage rule config closing rules require reopening the form to take effect [`#1640`](https://github.com/nocobase/nocobase/pull/1640) +- refactor(client): change Variable.TextArea to controlled component [`#1605`](https://github.com/nocobase/nocobase/pull/1605) +- fix: get pg view def [`#1641`](https://github.com/nocobase/nocobase/pull/1641) +- fix: infer view column type with alias [`#1634`](https://github.com/nocobase/nocobase/pull/1634) +- fix(plugin-workflow): fix minors ui issues [`#1635`](https://github.com/nocobase/nocobase/pull/1635) +- chore: disabled underscored in view collection. [`#1633`](https://github.com/nocobase/nocobase/pull/1633) +- fix: form action dragging area is too large [`#1628`](https://github.com/nocobase/nocobase/pull/1628) +- fix: FixedBlock related ui [`#1632`](https://github.com/nocobase/nocobase/pull/1632) +- feat: database view collection [`#1587`](https://github.com/nocobase/nocobase/pull/1587) +- fix: init sort value in sort field with scopeKey [`#1626`](https://github.com/nocobase/nocobase/pull/1626) +- style: linkage rule style improve [`#1625`](https://github.com/nocobase/nocobase/pull/1625) +- fix: find with attributes and group [`#1411`](https://github.com/nocobase/nocobase/pull/1411) +- docs: transform video link to video tag [`#1414`](https://github.com/nocobase/nocobase/pull/1414) +- feat(parse-variables): support to parse variables in filter params [`#1558`](https://github.com/nocobase/nocobase/pull/1558) +- fix(linkage rules) : support naming, enabling and disabling, copying, and assigning null values [`#1511`](https://github.com/nocobase/nocobase/pull/1511) +- chore: update test ci [`#1622`](https://github.com/nocobase/nocobase/pull/1622) +- fix: history add new button does not support enabling child collection [`#1536`](https://github.com/nocobase/nocobase/pull/1536) +- fix/(linkages-action): detail block actions does not support linkage rules [`#1504`](https://github.com/nocobase/nocobase/pull/1504) +- fix: avoid fixedblock height working in popup [`#1621`](https://github.com/nocobase/nocobase/pull/1621) +- fix: when the page has FixedBlock, the table of popup is not displayed [`#1619`](https://github.com/nocobase/nocobase/pull/1619) +- feat: association-filter-improve [`#1606`](https://github.com/nocobase/nocobase/pull/1606) +- fix(Table): cannot display table data [`#1617`](https://github.com/nocobase/nocobase/pull/1617) +- fix(plugin-workflow): fix todo list form read-pretty for non-assigneed user [`#1615`](https://github.com/nocobase/nocobase/pull/1615) +- feat(table): hidden pagination when only one page is available [`#1614`](https://github.com/nocobase/nocobase/pull/1614) +- refactor: improve FixedBlock performance [`#1593`](https://github.com/nocobase/nocobase/pull/1593) +- fix(collection-manager): infinite recursion [`#1608`](https://github.com/nocobase/nocobase/pull/1608) +- fix(audit-logs): Add ellipsis feature to table columns [`#1603`](https://github.com/nocobase/nocobase/pull/1603) +- feat: improve the non-link ui of association data [`#1602`](https://github.com/nocobase/nocobase/pull/1602) +- feat(Kanban): the card support open mode [`#1601`](https://github.com/nocobase/nocobase/pull/1601) +- fix( importable-field): incorrect display when moving sort handle [`#1613`](https://github.com/nocobase/nocobase/pull/1613) +- fix: enable child collections remain after deleting a child collection [`#1610`](https://github.com/nocobase/nocobase/pull/1610) +- fix: destroy through table record referencing collections table [`#1611`](https://github.com/nocobase/nocobase/pull/1611) +- fix(plugin-workflow): add default actions value of manual node [`#1600`](https://github.com/nocobase/nocobase/pull/1600) +- feat(plugin-workflow): add failOnEmpty option for query node [`#1599`](https://github.com/nocobase/nocobase/pull/1599) +- fix(plugin-workflow): use toJSON instead of get to get valid result [`#1596`](https://github.com/nocobase/nocobase/pull/1596) +- Translation pt-BR (Brazilian Portuguese) [`#1591`](https://github.com/nocobase/nocobase/pull/1591) +- fix: role permission add new scope display blank [`#1592`](https://github.com/nocobase/nocobase/pull/1592) +- fix(FixedBlock): avoid kanban triggering programmatic scrolling [`#1406`](https://github.com/nocobase/nocobase/pull/1406) +- fix: repeat request categories when switching between graph interface and collection&fields [`#1590`](https://github.com/nocobase/nocobase/pull/1590) +- fix: collectionFieldsOptions cannot get all fields [`#1588`](https://github.com/nocobase/nocobase/pull/1588) +- fix(plugin-workflow): fix input width in request node config [`#1585`](https://github.com/nocobase/nocobase/pull/1585) +- feat(filter-blocks): support filter-blocks [`#1505`](https://github.com/nocobase/nocobase/pull/1505) +- refactor: multi-app [`#1578`](https://github.com/nocobase/nocobase/pull/1578) +- feat: compact theme [`#1574`](https://github.com/nocobase/nocobase/pull/1574) +- feat: support cron field [`#1421`](https://github.com/nocobase/nocobase/pull/1421) +- fix(Calendar): ensur to get correct gridInitializer when adding a newโ€ฆ [`#1425`](https://github.com/nocobase/nocobase/pull/1425) +- feat(markdown): support mermaid and better style [`#1583`](https://github.com/nocobase/nocobase/pull/1583) +- fix(plugin-map): map block repeats [`#1582`](https://github.com/nocobase/nocobase/pull/1582) +- feat: tree collection [`#1561`](https://github.com/nocobase/nocobase/pull/1561) +- feat(plugin-map): add map block [`#1486`](https://github.com/nocobase/nocobase/pull/1486) +- chore: lazy load sub app in share collection [`#1569`](https://github.com/nocobase/nocobase/pull/1569) +- fix(record-picker): supports adding sub-collection records [`#1573`](https://github.com/nocobase/nocobase/pull/1573) +- fix: app manager reload [`#1565`](https://github.com/nocobase/nocobase/pull/1565) +- feat: multi-app-share-collection plugin [`#1562`](https://github.com/nocobase/nocobase/pull/1562) +- feat: record picker support to enable links [`#1515`](https://github.com/nocobase/nocobase/pull/1515) +- feat: multiple apps [`#1540`](https://github.com/nocobase/nocobase/pull/1540) +- docs(client): add variable docs [`#1556`](https://github.com/nocobase/nocobase/pull/1556) +- fix(charts): improve chart table preview with object type [`#1555`](https://github.com/nocobase/nocobase/pull/1555) +- feat(plugin-workflow) config preload associations in triggers and nodes [`#1548`](https://github.com/nocobase/nocobase/pull/1548) + +### Fixed + +- fix(plugin-workflow): fix todo list form read-pretty for non-assigneed user (#1615) [`#1572`](https://github.com/nocobase/nocobase/issues/1572) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.2-alpha.1 [`d1adc9d`](https://github.com/nocobase/nocobase/commit/d1adc9de0b87b896e90c81c226646b840309c240) +- fix(file-manager): upgrade s3 version [`50183b0`](https://github.com/nocobase/nocobase/commit/50183b065d32be5d2f6590bfb0c6190fafc12881) +- fix: linkage rule [`b8776fe`](https://github.com/nocobase/nocobase/commit/b8776fe2d0fd6729c18b968d9f7b15e7c81c4ef2) + +## [v0.9.1-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.1-alpha.1...v0.9.1-alpha.2) - 2023-03-09 + +### Merged + +- fix(plugin-workflow): fix module import (#1550) [`#1552`](https://github.com/nocobase/nocobase/pull/1552) +- chore: relation repository response when source model not found [`#1546`](https://github.com/nocobase/nocobase/pull/1546) +- fix(plugin-workflow): fix assignees config component in manual node [`#1547`](https://github.com/nocobase/nocobase/pull/1547) +- feat: stopped state in application [`#1543`](https://github.com/nocobase/nocobase/pull/1543) +- fix(plugin-workflow): fix AssociationInput field path [`#1542`](https://github.com/nocobase/nocobase/pull/1542) +- fix: cache with index.html [`#1541`](https://github.com/nocobase/nocobase/pull/1541) +- fix: belongs to many through table with custom schema [`#1539`](https://github.com/nocobase/nocobase/pull/1539) +- fix(plugin-formula): expose formula field result in form [`#1534`](https://github.com/nocobase/nocobase/pull/1534) +- test: with collection_manager_schema env [`#1532`](https://github.com/nocobase/nocobase/pull/1532) +- fix: filter by association field with underscored [`#1537`](https://github.com/nocobase/nocobase/pull/1537) +- fix(charts): fix copy [`#1533`](https://github.com/nocobase/nocobase/pull/1533) +- feat: add chart plugin [`#1477`](https://github.com/nocobase/nocobase/pull/1477) +- feat: support add new in block for inheritance collection [`#1518`](https://github.com/nocobase/nocobase/pull/1518) +- refactor(plugin-workflow): change canvas card and adjust styles [`#1529`](https://github.com/nocobase/nocobase/pull/1529) +- fix: test with nocobase plugin [`#1525`](https://github.com/nocobase/nocobase/pull/1525) +- fix: nginx cache [`#1523`](https://github.com/nocobase/nocobase/pull/1523) +- fix: remove field when collection has difference schema with database [`#1524`](https://github.com/nocobase/nocobase/pull/1524) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.1-alpha.2 [`bc5156d`](https://github.com/nocobase/nocobase/commit/bc5156d458adecce8189aa535e5738672e63c2c0) +- fix: add new blocks [`3904aa7`](https://github.com/nocobase/nocobase/commit/3904aa7c111eaa522cc7072a268a579aa115906e) +- fix: schema name conflicts [`a463c3d`](https://github.com/nocobase/nocobase/commit/a463c3d747666496721571110bd77dba3726c2f7) + +## [v0.9.1-alpha.1](https://github.com/nocobase/nocobase/compare/v0.9.0-alpha.2...v0.9.1-alpha.1) - 2023-03-03 + +### Merged + +- refactor: audit logs block [`#1517`](https://github.com/nocobase/nocobase/pull/1517) +- fix(evaluators): fix preprocessing and add test cases [`#1519`](https://github.com/nocobase/nocobase/pull/1519) +- chore(debug): fix debug filename when run test [`#1520`](https://github.com/nocobase/nocobase/pull/1520) +- feat: collection manager schema env [`#1506`](https://github.com/nocobase/nocobase/pull/1506) +- fix(client): fix checkbox unchecked display [`#1508`](https://github.com/nocobase/nocobase/pull/1508) +- feat(snapshot-field): improve transition [`#1513`](https://github.com/nocobase/nocobase/pull/1513) +- fix(plugin-workflow): fix CollectionField validation when using variable [`#1512`](https://github.com/nocobase/nocobase/pull/1512) +- feat(plugin-formula): calculation with snapshot field [`#1498`](https://github.com/nocobase/nocobase/pull/1498) +- fix(association-select): filter without data scope not work [`#1509`](https://github.com/nocobase/nocobase/pull/1509) +- feat: fallback sort field init to createdAt field [`#1507`](https://github.com/nocobase/nocobase/pull/1507) +- fix(graphical-interface): collection category does not display title [`#1503`](https://github.com/nocobase/nocobase/pull/1503) +- fix(association-select): data is incorrect when use data scope [`#1491`](https://github.com/nocobase/nocobase/pull/1491) +- feat: dialect version accessors [`#1502`](https://github.com/nocobase/nocobase/pull/1502) +- fix: collection schema updated but model _schema not change [`#1500`](https://github.com/nocobase/nocobase/pull/1500) +- Update zh_CN.ts [`#1481`](https://github.com/nocobase/nocobase/pull/1481) +- fix(linkageRules): support empty condiction [`#1496`](https://github.com/nocobase/nocobase/pull/1496) +- feat: form/button linkage rules [`#1456`](https://github.com/nocobase/nocobase/pull/1456) +- fix: collection importer has incorrect reference [`#1495`](https://github.com/nocobase/nocobase/pull/1495) +- feat: support custom plugin deployment in dockerfile [`#1494`](https://github.com/nocobase/nocobase/pull/1494) +- fix: environment variables [`#1490`](https://github.com/nocobase/nocobase/pull/1490) +- feat: prepare database method [`#1492`](https://github.com/nocobase/nocobase/pull/1492) +- Fix/multiple schema query [`#1488`](https://github.com/nocobase/nocobase/pull/1488) +- fix: string violation [`#1487`](https://github.com/nocobase/nocobase/pull/1487) +- refactor(plugin-workflow): migrate evaluators [`#1485`](https://github.com/nocobase/nocobase/pull/1485) +- docs: fix typo [`#1482`](https://github.com/nocobase/nocobase/pull/1482) +- fix(plugin-workflow): fix customized job status [`#1484`](https://github.com/nocobase/nocobase/pull/1484) +- fix(plugin-workflow): fix condition config param [`#1483`](https://github.com/nocobase/nocobase/pull/1483) +- fix(plugin-workflow): fix migration [`#1479`](https://github.com/nocobase/nocobase/pull/1479) +- fix(plugin-workflow): fix migration on table prefix [`#1478`](https://github.com/nocobase/nocobase/pull/1478) +- refactor(plugin-formula): combine 2 formula field type into 1 [`#1457`](https://github.com/nocobase/nocobase/pull/1457) +- fix(plugin-workflow): fix migration for calculation [`#1476`](https://github.com/nocobase/nocobase/pull/1476) +- fix(plugin-workflow): fix schedule trigger number type repeat [`#1475`](https://github.com/nocobase/nocobase/pull/1475) +- Feat(plugin-workflow) manual instruction [`#1339`](https://github.com/nocobase/nocobase/pull/1339) +- feat: support for importing attachments [`#1466`](https://github.com/nocobase/nocobase/pull/1466) +- fix: column not exists error after destory relation field [`#1465`](https://github.com/nocobase/nocobase/pull/1465) +- fix: add schema [`#1464`](https://github.com/nocobase/nocobase/pull/1464) +- fix: avoid o2o, o2m can select the data already selected [`#1462`](https://github.com/nocobase/nocobase/pull/1462) +- feat: add test cases [`#1463`](https://github.com/nocobase/nocobase/pull/1463) +- feat: update zh_CN.ts [`#1458`](https://github.com/nocobase/nocobase/pull/1458) +- refactor: export plugin [`#1460`](https://github.com/nocobase/nocobase/pull/1460) +- Fix/pg schema with inherit [`#1446`](https://github.com/nocobase/nocobase/pull/1446) +- feat: multiple apps admin [`#1431`](https://github.com/nocobase/nocobase/pull/1431) +- chore: fix build plugin error [`#1454`](https://github.com/nocobase/nocobase/pull/1454) +- feat: provide the underscored option for the database [`#1366`](https://github.com/nocobase/nocobase/pull/1366) +- Revert "fix(table): make filed overflow behavior right (#1392)" [`#1452`](https://github.com/nocobase/nocobase/pull/1452) +- fix(collection category): zh_cn locale defect [`#1451`](https://github.com/nocobase/nocobase/pull/1451) +- feat: add namespace and duplicator parameters for collection options [`#1449`](https://github.com/nocobase/nocobase/pull/1449) +- fix(snapshot-field): remove depth limit [`#1450`](https://github.com/nocobase/nocobase/pull/1450) +- chore: update licenses url [`#1285`](https://github.com/nocobase/nocobase/pull/1285) +- feat: association snapshot [`#1438`](https://github.com/nocobase/nocobase/pull/1438) +- fix(table): make filed overflow behavior right [`#1392`](https://github.com/nocobase/nocobase/pull/1392) +- fix(plugin-sequence): fix missed createdAt field in bulk hook [`#1448`](https://github.com/nocobase/nocobase/pull/1448) +- fix: error:0308010C:digital envelope routines::unsupported [`#1447`](https://github.com/nocobase/nocobase/pull/1447) +- feat: collection categories [`#1327`](https://github.com/nocobase/nocobase/pull/1327) +- fix(plugin-fm): fix path config for storages [`#1445`](https://github.com/nocobase/nocobase/pull/1445) +- fix: node.js 17+, add openssl-legacy-provider [`#1434`](https://github.com/nocobase/nocobase/pull/1434) +- fix(plugin-workflow): fix schedule on field null value [`#1442`](https://github.com/nocobase/nocobase/pull/1442) +- feat: pg schema support [`#1439`](https://github.com/nocobase/nocobase/pull/1439) +- fix(i18n): set key and ns separator default to false [`#1432`](https://github.com/nocobase/nocobase/pull/1432) +- feat: disable trigger when import collection [`#1417`](https://github.com/nocobase/nocobase/pull/1417) +- chore: translate 'Add tab' in page header [`#1424`](https://github.com/nocobase/nocobase/pull/1424) +- fix(plugin-workflow): use promise to request [`#1426`](https://github.com/nocobase/nocobase/pull/1426) +- fix(acl): custom appends merge strategy [`#1416`](https://github.com/nocobase/nocobase/pull/1416) +- docs: update G2Plot example url [`#1408`](https://github.com/nocobase/nocobase/pull/1408) +- docs: fix typo [`#1412`](https://github.com/nocobase/nocobase/pull/1412) +- fix(FixedBlock): using both association filters and FixedBlock does not show the complete table [`#1405`](https://github.com/nocobase/nocobase/pull/1405) +- feat(calendar): startDate and endDate support the use of association fields [`#1397`](https://github.com/nocobase/nocobase/pull/1397) +- fix: load through collection before belongsToMany field bind [`#1409`](https://github.com/nocobase/nocobase/pull/1409) +- feat(verification-plugin): support tencent sms [`#1382`](https://github.com/nocobase/nocobase/pull/1382) +- fix: foreign keys are editable when adding fields [`#1404`](https://github.com/nocobase/nocobase/pull/1404) +- fix: navbar_ui style [`#1398`](https://github.com/nocobase/nocobase/pull/1398) +- fix: inherit startup sort [`#1402`](https://github.com/nocobase/nocobase/pull/1402) +- fix(plugin-workflow): fix url input width for request config [`#1401`](https://github.com/nocobase/nocobase/pull/1401) +- Fix/snapshot [`#1396`](https://github.com/nocobase/nocobase/pull/1396) +- feat: fix through collections inherits filter [`#1394`](https://github.com/nocobase/nocobase/pull/1394) +- Fix(plugin-sequence): support sequence field in m2m through table [`#1383`](https://github.com/nocobase/nocobase/pull/1383) +- fix(plugin-workflow): adjust executed alert position [`#1381`](https://github.com/nocobase/nocobase/pull/1381) +- fix: through collection individual hooks [`#1378`](https://github.com/nocobase/nocobase/pull/1378) +- fix: through collection records should not be reset [`#1377`](https://github.com/nocobase/nocobase/pull/1377) +- feat(client): add form disabled context [`#1374`](https://github.com/nocobase/nocobase/pull/1374) +- Fix(plugin-workflow): request node [`#1367`](https://github.com/nocobase/nocobase/pull/1367) + +### Commits + +- docs: add plug-in documentation [`68511f0`](https://github.com/nocobase/nocobase/commit/68511f05bc7dbca49e0ab95eb868a193a3502d71) +- feat(db): field value parser [`5805b69`](https://github.com/nocobase/nocobase/commit/5805b69455532ad643e9c87831da985d41bc5d6d) +- chore(versions): ๐Ÿ˜Š publish v0.9.1-alpha.1 [`946c8f2`](https://github.com/nocobase/nocobase/commit/946c8f25a3df538f4a83abe4468786cf554d8914) + +## [v0.9.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.0-alpha.1...v0.9.0-alpha.2) - 2023-01-14 + +### Merged + +- feat: load multiple languages dynamically [`#1355`](https://github.com/nocobase/nocobase/pull/1355) +- refactor(plugin-workflow): refactor request instruction [`#1356`](https://github.com/nocobase/nocobase/pull/1356) +- feat: update dependencies [`#1353`](https://github.com/nocobase/nocobase/pull/1353) + +### Commits + +- feat: add en-US.example.json [`86554c0`](https://github.com/nocobase/nocobase/commit/86554c0205d6cb8f5dd3a293c9929b4aa9cb5897) +- fix: locale cache [`a4116a2`](https://github.com/nocobase/nocobase/commit/a4116a251b00109dad96e5062bf9b6441544f8b3) +- chore(versions): ๐Ÿ˜Š publish v0.9.0-alpha.2 [`daa91e9`](https://github.com/nocobase/nocobase/commit/daa91e95a6192bac19702eb17e9f764a7df11477) + +## [v0.9.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.8.1-alpha.4...v0.9.0-alpha.1) - 2023-01-11 + +### Merged + +- feat: change license [`#1350`](https://github.com/nocobase/nocobase/pull/1350) +- feat: formula plugin [`#1344`](https://github.com/nocobase/nocobase/pull/1344) +- feat: acl optimization [`#1136`](https://github.com/nocobase/nocobase/pull/1136) +- feat: duplicator plugin [`#1265`](https://github.com/nocobase/nocobase/pull/1265) +- fix(plugin-workflow): fix missed preparing [`#1337`](https://github.com/nocobase/nocobase/pull/1337) +- fix: FixedBlock does not disappear when the current tab is deleted [`#1324`](https://github.com/nocobase/nocobase/pull/1324) +- feat(Select): should compile title and label [`#1332`](https://github.com/nocobase/nocobase/pull/1332) +- fix: improve filter [`#1333`](https://github.com/nocobase/nocobase/pull/1333) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.0-alpha.1 [`013f091`](https://github.com/nocobase/nocobase/commit/013f0916a521fef74970ba6feed76c1b17b6ff01) +- fix: typeError: Cannot read properties of undefined (reading 'find') [`1dc4142`](https://github.com/nocobase/nocobase/commit/1dc4142da2195fb6f09bd691b23948d9d5f9e01d) +- feat: improve translation [`31794d3`](https://github.com/nocobase/nocobase/commit/31794d3c1b7af13d9dbaca8d12b1843c18553307) + +## [v0.8.1-alpha.4](https://github.com/nocobase/nocobase/compare/v0.8.1-alpha.2...v0.8.1-alpha.4) - 2023-01-05 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.8.1-alpha.4 [`#1331`](https://github.com/nocobase/nocobase/pull/1331) + +## [v0.8.1-alpha.2](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.13...v0.8.1-alpha.2) - 2023-01-05 + +### Merged + +- fix(plugin-sequence-field): integer generated should not less then start [`#1330`](https://github.com/nocobase/nocobase/pull/1330) +- fix: filter removeNullConditions [`#1329`](https://github.com/nocobase/nocobase/pull/1329) +- fix: snapshot display fix [`#1328`](https://github.com/nocobase/nocobase/pull/1328) +- fix(plugin-workflow): fix history drawer in workflow canvas [`#1326`](https://github.com/nocobase/nocobase/pull/1326) +- feat: snapshot field plugin [`#1253`](https://github.com/nocobase/nocobase/pull/1253) +- feat: configure fields style fix [`#1322`](https://github.com/nocobase/nocobase/pull/1322) +- fix(plugin-workflow): fix events in prepare [`#1325`](https://github.com/nocobase/nocobase/pull/1325) +- fix(database): filter match [`#1319`](https://github.com/nocobase/nocobase/pull/1319) +- fix: action merge params [`#1321`](https://github.com/nocobase/nocobase/pull/1321) +- chore: set belongs to many on delete to cascade [`#1311`](https://github.com/nocobase/nocobase/pull/1311) +- fix: disable filterByTk options in destory method when collection has no primary key or has composite primary key [`#1313`](https://github.com/nocobase/nocobase/pull/1313) +- fix: slow find with include in mysql [`#1304`](https://github.com/nocobase/nocobase/pull/1304) +- fix(map-plugin): cannot save because the value is null [`#1309`](https://github.com/nocobase/nocobase/pull/1309) +- fix: create inherits with table name contains upper case [`#1308`](https://github.com/nocobase/nocobase/pull/1308) +- fix: upgrade error [`#1303`](https://github.com/nocobase/nocobase/pull/1303) +- fix: association filter [`#1301`](https://github.com/nocobase/nocobase/pull/1301) +- fix: pageSize 200 & not a function [`#1299`](https://github.com/nocobase/nocobase/pull/1299) +- refactor(client): make tab initializer more common [`#1298`](https://github.com/nocobase/nocobase/pull/1298) +- fix(Select): title field and clear button not work [`#1296`](https://github.com/nocobase/nocobase/pull/1296) +- fix(plugin-fm): fix local storage config and skip empty base url [`#1294`](https://github.com/nocobase/nocobase/pull/1294) +- feat: antd->4.2.8 [`#1231`](https://github.com/nocobase/nocobase/pull/1231) +- feat: association filter [`#1274`](https://github.com/nocobase/nocobase/pull/1274) +- chore: upgrade sequelize version to to latest [`#1234`](https://github.com/nocobase/nocobase/pull/1234) +- feat: add iframe-block plugin [`#1281`](https://github.com/nocobase/nocobase/pull/1281) +- feat: update page size to 200 and limit fields [`#1282`](https://github.com/nocobase/nocobase/pull/1282) +- fix: prevent horizontal scroll of menus [`#1279`](https://github.com/nocobase/nocobase/pull/1279) +- Turkish language created for Docs. Belgeler iรงin tรผrkรงe dil desteฤŸi [`#1071`](https://github.com/nocobase/nocobase/pull/1071) +- fix(client/kanban): fix kanban card default active all fields bug [`#1270`](https://github.com/nocobase/nocobase/pull/1270) +- fix: cannot delete event in calendar [`#1277`](https://github.com/nocobase/nocobase/pull/1277) +- fix(AssociationSelect): missing field title in details [`#1275`](https://github.com/nocobase/nocobase/pull/1275) +- fix: menu cannot scroll [`#1276`](https://github.com/nocobase/nocobase/pull/1276) +- feat: support fixed block [`#1267`](https://github.com/nocobase/nocobase/pull/1267) +- fix(plugin-sequence): fix test case [`#1268`](https://github.com/nocobase/nocobase/pull/1268) +- fix(plugin-sequence): fix update pattern index [`#1266`](https://github.com/nocobase/nocobase/pull/1266) +- feat : support fixed menu and header [`#1260`](https://github.com/nocobase/nocobase/pull/1260) +- fix: destroy field in parent table [`#1263`](https://github.com/nocobase/nocobase/pull/1263) +- refactor(client/popup): text: 'Set popup size' changed to 'Popup size' [`#1262`](https://github.com/nocobase/nocobase/pull/1262) +- feat: page tabs [`#1261`](https://github.com/nocobase/nocobase/pull/1261) +- fix(plugin-fm): drawer form values [`#1259`](https://github.com/nocobase/nocobase/pull/1259) +- feat: support sync button [`#1258`](https://github.com/nocobase/nocobase/pull/1258) +- fix: isOverride cannot work [`#1257`](https://github.com/nocobase/nocobase/pull/1257) +- refactor(sequence-field): move to plugin and use table to record [`#1209`](https://github.com/nocobase/nocobase/pull/1209) +- feat: add map plugin [`#1229`](https://github.com/nocobase/nocobase/pull/1229) +- fix(plugin-workflow): fix job result in history [`#1242`](https://github.com/nocobase/nocobase/pull/1242) +- feat: set field [`#1237`](https://github.com/nocobase/nocobase/pull/1237) +- chore: update ci [`#1239`](https://github.com/nocobase/nocobase/pull/1239) +- feat(client/popup): support set drawer and modal popup size [`#1224`](https://github.com/nocobase/nocobase/pull/1224) +- fix(plugin-file-manager): fix local serve middleware [`#1226`](https://github.com/nocobase/nocobase/pull/1226) +- feat: iframe block [`#1225`](https://github.com/nocobase/nocobase/pull/1225) +- fix(workflow/request-var): fix request node var editor [`#1223`](https://github.com/nocobase/nocobase/pull/1223) +- fix: change nginx timeout as 10min [`#1222`](https://github.com/nocobase/nocobase/pull/1222) +- fix: change import timeout as 10 min [`#1221`](https://github.com/nocobase/nocobase/pull/1221) +- fix: field component options appears in non-association interface [`#1220`](https://github.com/nocobase/nocobase/pull/1220) +- Fix(plugin-workflow): client refactor [`#1163`](https://github.com/nocobase/nocobase/pull/1163) +- feat(cli): quickstart [`#1204`](https://github.com/nocobase/nocobase/pull/1204) +- fix(plugin-cm): fix interfaces injection and getter [`#1196`](https://github.com/nocobase/nocobase/pull/1196) +- fix(i18n): move back key to global [`#1195`](https://github.com/nocobase/nocobase/pull/1195) +- test(plugin-workflow): add cache and test for sqlite [`#1194`](https://github.com/nocobase/nocobase/pull/1194) +- fix(plugin-workflow): use dual pipes to process triggers [`#1187`](https://github.com/nocobase/nocobase/pull/1187) +- fix(plugin-workflow): temp skip case [`#1188`](https://github.com/nocobase/nocobase/pull/1188) +- feat(menu): when a group is selected, the submenu items are also selected together [`#1152`](https://github.com/nocobase/nocobase/pull/1152) +- fix(plugin-workflow): fix transaction in trigger [`#1186`](https://github.com/nocobase/nocobase/pull/1186) +- feat: export blob type error [`#1170`](https://github.com/nocobase/nocobase/pull/1170) +- fix(plugin-workflow): dispatch when server start [`#1183`](https://github.com/nocobase/nocobase/pull/1183) +- fix: yarn start error in windows system [`#1177`](https://github.com/nocobase/nocobase/pull/1177) +- fix(plugin-users): fix initialization of sms verification [`#1173`](https://github.com/nocobase/nocobase/pull/1173) +- fix(plugin-workflow): fix test case [`#1172`](https://github.com/nocobase/nocobase/pull/1172) +- feat(plugin-workflow): add duplicate action [`#1171`](https://github.com/nocobase/nocobase/pull/1171) +- fix(plugin-workflow): fix context operand [`#1169`](https://github.com/nocobase/nocobase/pull/1169) +- fix: auto deploy error [`#1168`](https://github.com/nocobase/nocobase/pull/1168) +- feat: configurable the scope of target collections [`#1165`](https://github.com/nocobase/nocobase/pull/1165) +- ci(workflows): fix auto deploy error [`#1166`](https://github.com/nocobase/nocobase/pull/1166) +- ci(workflows): support manual depoly and stop pr [`#1132`](https://github.com/nocobase/nocobase/pull/1132) +- fix: saml oidc text [`#1164`](https://github.com/nocobase/nocobase/pull/1164) +- fix: transaction error [`#1162`](https://github.com/nocobase/nocobase/pull/1162) +- fix: create inherits with empty table [`#1160`](https://github.com/nocobase/nocobase/pull/1160) +- fix: sso optimization [`#1159`](https://github.com/nocobase/nocobase/pull/1159) +- feat: saml [`#1143`](https://github.com/nocobase/nocobase/pull/1143) +- feat: oidc [`#1126`](https://github.com/nocobase/nocobase/pull/1126) +- feat: belongs to many on delete [`#1158`](https://github.com/nocobase/nocobase/pull/1158) +- Feat/collection templates [`#1124`](https://github.com/nocobase/nocobase/pull/1124) +- Fix/action 404 [`#1157`](https://github.com/nocobase/nocobase/pull/1157) +- fix: 404 response [`#1156`](https://github.com/nocobase/nocobase/pull/1156) +- Feat: plugin verification config [`#1129`](https://github.com/nocobase/nocobase/pull/1129) +- feat: support use select field [`#1105`](https://github.com/nocobase/nocobase/pull/1105) +- fix(plugin-workflow): fix trigger context getters [`#1149`](https://github.com/nocobase/nocobase/pull/1149) +- feat: option readPretty optimization [`#1138`](https://github.com/nocobase/nocobase/pull/1138) +- fix(plugin-workflow): fix locale [`#1145`](https://github.com/nocobase/nocobase/pull/1145) +- fix(plugin-workflow): fix endsOn field [`#1144`](https://github.com/nocobase/nocobase/pull/1144) +- fix: create empty collection [`#1141`](https://github.com/nocobase/nocobase/pull/1141) +- fix(client): fix no key warning in menu [`#1140`](https://github.com/nocobase/nocobase/pull/1140) +- Fix(plugin workflow) interval [`#1139`](https://github.com/nocobase/nocobase/pull/1139) +- fix: x-collection-field [`#1134`](https://github.com/nocobase/nocobase/pull/1134) +- feat: update many [`#1135`](https://github.com/nocobase/nocobase/pull/1135) +- feat(workflow): support Http Request Node [`#1102`](https://github.com/nocobase/nocobase/pull/1102) +- fix: incorrect repeat of calendar [`#1131`](https://github.com/nocobase/nocobase/pull/1131) +- fix(database): refresh indexes [`#1127`](https://github.com/nocobase/nocobase/pull/1127) +- fix: reference check after remove collection [`#1123`](https://github.com/nocobase/nocobase/pull/1123) +- fix: sort field with table dose not have primary key [`#1119`](https://github.com/nocobase/nocobase/pull/1119) +- fix: test [`#1118`](https://github.com/nocobase/nocobase/pull/1118) +- fix: update to bigint [`#1117`](https://github.com/nocobase/nocobase/pull/1117) +- fix(cm): default values for override [`#1112`](https://github.com/nocobase/nocobase/pull/1112) +- fix: update sequence and foreignKey [`#1116`](https://github.com/nocobase/nocobase/pull/1116) +- fix(plugin-workflow): fix workflow schema [`#1115`](https://github.com/nocobase/nocobase/pull/1115) +- fix(client): menu key warnings [`#1114`](https://github.com/nocobase/nocobase/pull/1114) +- fix: fk type invalid [`#1113`](https://github.com/nocobase/nocobase/pull/1113) +- fix: handle column does not exist error [`#1110`](https://github.com/nocobase/nocobase/pull/1110) +- fix: inherits with collection not exists [`#1109`](https://github.com/nocobase/nocobase/pull/1109) +- fix(locale): move description to global [`#1108`](https://github.com/nocobase/nocobase/pull/1108) +- feat: using bigint for id field [`#1100`](https://github.com/nocobase/nocobase/pull/1100) +- refactor: formula plugin [`#1082`](https://github.com/nocobase/nocobase/pull/1082) +- fix: create inherits from a table that has no id [`#1104`](https://github.com/nocobase/nocobase/pull/1104) +- fix: find table sequence [`#1101`](https://github.com/nocobase/nocobase/pull/1101) +- Feat/collection inherits [`#1097`](https://github.com/nocobase/nocobase/pull/1097) +- fix: create collection with emtpy inhertis params [`#1096`](https://github.com/nocobase/nocobase/pull/1096) +- fix: remove node after collection removed [`#1095`](https://github.com/nocobase/nocobase/pull/1095) +- fix: unbind error [`#1094`](https://github.com/nocobase/nocobase/pull/1094) +- chore: type conflict error message [`#1093`](https://github.com/nocobase/nocobase/pull/1093) +- feat: collection inheritance [`#1069`](https://github.com/nocobase/nocobase/pull/1069) +- feat: no recursive update associations [`#1091`](https://github.com/nocobase/nocobase/pull/1091) +- fix(plugin-workflow): fix transaction chain in trigger [`#1089`](https://github.com/nocobase/nocobase/pull/1089) +- fix(plugin-workflow): fix schema name conflict [`#1087`](https://github.com/nocobase/nocobase/pull/1087) +- refactor(plugin-workflow): split transaction for collection trigger [`#1080`](https://github.com/nocobase/nocobase/pull/1080) +- fix: skip records that do not exist [`#1084`](https://github.com/nocobase/nocobase/pull/1084) +- refactor(plugin-workflow): adjust style [`#1079`](https://github.com/nocobase/nocobase/pull/1079) +- fix: mysql variable 'lower_case_table_names' must be set to '0' or '2' [`#1078`](https://github.com/nocobase/nocobase/pull/1078) +- feat: logging package [`#1021`](https://github.com/nocobase/nocobase/pull/1021) +- Refactor: plugin-workflow client [`#1077`](https://github.com/nocobase/nocobase/pull/1077) +- fix: reference options sync [`#1061`](https://github.com/nocobase/nocobase/pull/1061) +- refactor(plugin-workflow): adjust some api [`#1067`](https://github.com/nocobase/nocobase/pull/1067) +- fix(plugin-workflow): fix trigger getter [`#1060`](https://github.com/nocobase/nocobase/pull/1060) +- Update README.md [`#1053`](https://github.com/nocobase/nocobase/pull/1053) +- test(collection-manager): 20221104151410-update-collections-hidden test correct [`#1042`](https://github.com/nocobase/nocobase/pull/1042) + +### Fixed + +- fix(client): page title translation doesn't work [`#838`](https://github.com/nocobase/nocobase/issues/838) + +### Commits + +- feat: update docs [`15cbad3`](https://github.com/nocobase/nocobase/commit/15cbad30b4e40121ab768273d6d42832960cd4bf) +- Revert "refactor: formula plugin (#1082)" [`0cbfa0a`](https://github.com/nocobase/nocobase/commit/0cbfa0a52177cce6b5400107a639d97de0b4e7a9) +- chore(versions): ๐Ÿ˜Š publish v0.8.1-alpha.2 [`4ecd2ee`](https://github.com/nocobase/nocobase/commit/4ecd2ee40d0ddfdfc5440670aa4f2b3a64f1c819) + +## [v0.8.0-alpha.13](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.11...v0.8.0-alpha.13) - 2022-11-04 + +### Merged + +- test(collection-manager): migration - 20221104151410-update-collections-hidden test optimize [`#1040`](https://github.com/nocobase/nocobase/pull/1040) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.13 [`ce588ee`](https://github.com/nocobase/nocobase/commit/ce588eefb0bfc50f7d5bbee575e0b5e843bf6644) + +## [v0.8.0-alpha.11](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.9...v0.8.0-alpha.11) - 2022-11-04 + +### Merged + +- chore(collection-manager): migration - 20221104151410-update-collections-hidden [`#1039`](https://github.com/nocobase/nocobase/pull/1039) +- fix: db sync failed [`#1037`](https://github.com/nocobase/nocobase/pull/1037) +- feat: ๆทปๅŠ ๅญ—ๆฎตๆตฎ็ช—ๅฎšไฝไผ˜ๅŒ– [`#1034`](https://github.com/nocobase/nocobase/pull/1034) +- fix: association accessors rebind [`#1027`](https://github.com/nocobase/nocobase/pull/1027) +- chore(debugger): clean scripts [`#1029`](https://github.com/nocobase/nocobase/pull/1029) +- fix(calendar): events cannot support moment [`#1017`](https://github.com/nocobase/nocobase/pull/1017) +- Fix: debugger [`#1014`](https://github.com/nocobase/nocobase/pull/1014) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.11 [`6d9006f`](https://github.com/nocobase/nocobase/commit/6d9006f361f569546777f05f03414acc66d06506) +- feat: more console log [`f15c67a`](https://github.com/nocobase/nocobase/commit/f15c67afd5745ccf37b5303f2bf8d61513d62183) +- feat(client): add filter option [`af3fbeb`](https://github.com/nocobase/nocobase/commit/af3fbeb99b9d2b80433bb25ec7c1158ae8addda6) + +## [v0.8.0-alpha.9](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.8...v0.8.0-alpha.9) - 2022-11-02 + +### Merged + +- feat: improve collection manager [`#1013`](https://github.com/nocobase/nocobase/pull/1013) +- feat(calendar): support for add/remove repeats events [`#988`](https://github.com/nocobase/nocobase/pull/988) +- Fix: sequence field [`#1009`](https://github.com/nocobase/nocobase/pull/1009) +- feat: update docs [`#1006`](https://github.com/nocobase/nocobase/pull/1006) +- fix(sample): fix shop-i18n client [`#1005`](https://github.com/nocobase/nocobase/pull/1005) +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.7 [`#1002`](https://github.com/nocobase/nocobase/pull/1002) +- fix(plugin-workflow): fix trigger config [`#997`](https://github.com/nocobase/nocobase/pull/997) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.9 [`642e044`](https://github.com/nocobase/nocobase/commit/642e04490d41acd9c4abba00112fa7f634d83d89) +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.8 [`d5680f8`](https://github.com/nocobase/nocobase/commit/d5680f80d7e468ee5972f008e162eca39c86aa87) +- fix: remove sample plugin client files [`7cded43`](https://github.com/nocobase/nocobase/commit/7cded4395a95922918a2b8abe041160b715a601b) + +## [v0.8.0-alpha.8](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.7...v0.8.0-alpha.8) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.8 [`6d3aa09`](https://github.com/nocobase/nocobase/commit/6d3aa092c0e788824bd0f7fd92607002e8000d66) +- fix: remove sample plugin client files [`8da81f0`](https://github.com/nocobase/nocobase/commit/8da81f00e5f65d3cd17819f1959d0ef4575461fd) + +## [v0.8.0-alpha.7](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.6...v0.8.0-alpha.7) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.7 [`9fbb789`](https://github.com/nocobase/nocobase/commit/9fbb78932ac739fa4c97869fa28d9a676f905519) +- fix(pm): upgrade error when using sqlite database [`bc7848d`](https://github.com/nocobase/nocobase/commit/bc7848da68516f18a5332c3ab1154675314f1ab1) + +## [v0.8.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.5...v0.8.0-alpha.6) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.6 [`88b8a0f`](https://github.com/nocobase/nocobase/commit/88b8a0f379a261b2b65ee5ba3a958a1d450e0e37) +- fix: upgrade failure using docker [`af32f08`](https://github.com/nocobase/nocobase/commit/af32f08d5f624468c371bff61d2e7f62cfe20db8) +- Update README.zh-CN.md [`fc7b17b`](https://github.com/nocobase/nocobase/commit/fc7b17b0858b328a0f2844260ebd3adfaa3f08e3) + +## [v0.8.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.3...v0.8.0-alpha.5) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.5 [`3453f46`](https://github.com/nocobase/nocobase/commit/3453f46997df9648f6aace49c80922a19611bf99) + +## [v0.8.0-alpha.3](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.2...v0.8.0-alpha.3) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.3 [`3395eb6`](https://github.com/nocobase/nocobase/commit/3395eb66898d506fd5f465f11c60513a1b46bcab) + +## [v0.8.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.1...v0.8.0-alpha.2) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.2 [`7f4c2de`](https://github.com/nocobase/nocobase/commit/7f4c2de98dd9bad88398351080c56753b0cac03c) + +## [v0.8.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.7-alpha.1...v0.8.0-alpha.1) - 2022-11-01 + +### Merged + +- Some features [`#979`](https://github.com/nocobase/nocobase/pull/979) +- fix(client/form-fields): fix fields's x-read-pretty [`#994`](https://github.com/nocobase/nocobase/pull/994) +- feat: reference check [`#989`](https://github.com/nocobase/nocobase/pull/989) +- fix(client/menu-permisssions-page): fix menu-permisssions-page no data [`#993`](https://github.com/nocobase/nocobase/pull/993) +- feat: update docs [`#996`](https://github.com/nocobase/nocobase/pull/996) +- fix(client): add locale for sequence field [`#995`](https://github.com/nocobase/nocobase/pull/995) +- docs: update api docs [`#973`](https://github.com/nocobase/nocobase/pull/973) +- feat: update docs [`#990`](https://github.com/nocobase/nocobase/pull/990) +- fix(client/upload): fix upload mutiple files always uploading status [`#974`](https://github.com/nocobase/nocobase/pull/974) +- fix(client/table-selector-provider): make data range config effective [`#960`](https://github.com/nocobase/nocobase/pull/960) +- fix(client/formula): set cursor focus on input [`#959`](https://github.com/nocobase/nocobase/pull/959) +- feat: plugin workflow visualization [`#987`](https://github.com/nocobase/nocobase/pull/987) +- feat: support show lunar day in week and day [`#977`](https://github.com/nocobase/nocobase/pull/977) +- fix: add sample plugins [`#986`](https://github.com/nocobase/nocobase/pull/986) +- feat: improve code [`#978`](https://github.com/nocobase/nocobase/pull/978) +- chore: improve ci [`#976`](https://github.com/nocobase/nocobase/pull/976) +- feat: support show lunar day [`#972`](https://github.com/nocobase/nocobase/pull/972) +- chore: fix incorrect deps [`#970`](https://github.com/nocobase/nocobase/pull/970) +- fix: empty logic operator filter [`#961`](https://github.com/nocobase/nocobase/pull/961) +- fix(plugin-workflow): fix workflow update action [`#964`](https://github.com/nocobase/nocobase/pull/964) +- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save [`#962`](https://github.com/nocobase/nocobase/pull/962) +- feat(file-manager): support tencent cos [`#958`](https://github.com/nocobase/nocobase/pull/958) +- feat: push ali docker registry [`#957`](https://github.com/nocobase/nocobase/pull/957) +- fix(plugin-workflow): fix constant schedule trigger time [`#956`](https://github.com/nocobase/nocobase/pull/956) +- Turkish readme [`#955`](https://github.com/nocobase/nocobase/pull/955) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`#954`](https://github.com/nocobase/nocobase/pull/954) +- Turkish language [`#939`](https://github.com/nocobase/nocobase/pull/939) +- refactor(plugin-file-manager): move client code into plugin folder and enable path config [`#913`](https://github.com/nocobase/nocobase/pull/913) +- refactor: plugin manager [`#965`](https://github.com/nocobase/nocobase/pull/965) +- feat: add filter action to collection table [`#953`](https://github.com/nocobase/nocobase/pull/953) +- feat: ui schema cache [`#877`](https://github.com/nocobase/nocobase/pull/877) +- feat: changed with associations [`#943`](https://github.com/nocobase/nocobase/pull/943) +- feat: docker optimizing [`#948`](https://github.com/nocobase/nocobase/pull/948) +- fix(plugin-workflow): test changedWithAssociations() [`#950`](https://github.com/nocobase/nocobase/pull/950) +- fix(plugin-workflow): skip time based test [`#951`](https://github.com/nocobase/nocobase/pull/951) +- fix(plugin-workflow): fix schedule trigger bug [`#949`](https://github.com/nocobase/nocobase/pull/949) +- fix(plugin-workflow): fix collection fieldset component [`#942`](https://github.com/nocobase/nocobase/pull/942) +- fix(plugin-workflow): avoid revision with ghost nodes [`#941`](https://github.com/nocobase/nocobase/pull/941) +- fix(plugin-workflow): add req context to processor [`#936`](https://github.com/nocobase/nocobase/pull/936) +- feat: plugin workflow collection field [`#934`](https://github.com/nocobase/nocobase/pull/934) +- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set [`#926`](https://github.com/nocobase/nocobase/pull/926) +- fix(plugin-workflow): temp disable validation of collection field in node [`#928`](https://github.com/nocobase/nocobase/pull/928) +- Doc/db repository [`#896`](https://github.com/nocobase/nocobase/pull/896) +- docs: fix resource & action dev doc [`#880`](https://github.com/nocobase/nocobase/pull/880) +- docs: fix i18n dev sample [`#910`](https://github.com/nocobase/nocobase/pull/910) +- feat: create with array of values [`#912`](https://github.com/nocobase/nocobase/pull/912) +- fix: unbind on error throwing [`#914`](https://github.com/nocobase/nocobase/pull/914) +- fix: appends merge now using primary key [`#911`](https://github.com/nocobase/nocobase/pull/911) +- Doc: api database events [`#887`](https://github.com/nocobase/nocobase/pull/887) +- feat: limit database identifier [`#908`](https://github.com/nocobase/nocobase/pull/908) +- fix: sync collection field default value [`#907`](https://github.com/nocobase/nocobase/pull/907) +- fix: appends merge includes [`#905`](https://github.com/nocobase/nocobase/pull/905) +- fix(samples): fix test case [`#903`](https://github.com/nocobase/nocobase/pull/903) +- fix: single relation repository appends query issue [`#901`](https://github.com/nocobase/nocobase/pull/901) +- feat(plugin-workflow): add concat calculator [`#894`](https://github.com/nocobase/nocobase/pull/894) +- fix(client/record-picker): support record-picker show format DataPicker [`#888`](https://github.com/nocobase/nocobase/pull/888) +- fix(client/block-select-collection): fix select collection menu view error [`#889`](https://github.com/nocobase/nocobase/pull/889) +- fix: unable to submit form during file upload [`#892`](https://github.com/nocobase/nocobase/pull/892) +- fix: run test by jest [`#891`](https://github.com/nocobase/nocobase/pull/891) +- feat(collection-manager): inverse fields can be configured [`#883`](https://github.com/nocobase/nocobase/pull/883) +- fix(formula): support integer and fix NaN error [`#879`](https://github.com/nocobase/nocobase/pull/879) +- fix: sort parameter is missing [`#849`](https://github.com/nocobase/nocobase/pull/849) +- fix: slow join query issued by appends field in find method of repository [`#845`](https://github.com/nocobase/nocobase/pull/845) +- feat(core/cache): support cache [`#876`](https://github.com/nocobase/nocobase/pull/876) +- feat: update option must have filter or filterByTk [`#847`](https://github.com/nocobase/nocobase/pull/847) +- added Russian translation [`#840`](https://github.com/nocobase/nocobase/pull/840) +- feat(database): add sequence field type [`#779`](https://github.com/nocobase/nocobase/pull/779) +- fix: can't access pages without permission via url [`#826`](https://github.com/nocobase/nocobase/pull/826) +- fix: listen promisify [`#899`](https://github.com/nocobase/nocobase/pull/899) +- refactor(core): simplify some code [`#895`](https://github.com/nocobase/nocobase/pull/895) +- feat: sample-custom-signup-page [`#893`](https://github.com/nocobase/nocobase/pull/893) +- docs: relation repository & acl [`#848`](https://github.com/nocobase/nocobase/pull/848) +- Update actions.md [`#873`](https://github.com/nocobase/nocobase/pull/873) +- docs: add testing dev doc [`#871`](https://github.com/nocobase/nocobase/pull/871) +- Doc: dev migration [`#870`](https://github.com/nocobase/nocobase/pull/870) +- Doc: command [`#869`](https://github.com/nocobase/nocobase/pull/869) +- docs: add hooks dev doc [`#868`](https://github.com/nocobase/nocobase/pull/868) +- feat: update development doc [`#866`](https://github.com/nocobase/nocobase/pull/866) +- feat: ratelimit sample plugin [`#862`](https://github.com/nocobase/nocobase/pull/862) +- feat: custom block sample [`#867`](https://github.com/nocobase/nocobase/pull/867) +- docs: move http to dev [`#861`](https://github.com/nocobase/nocobase/pull/861) +- refactor: middleware [`#857`](https://github.com/nocobase/nocobase/pull/857) +- Doc: dev i18n [`#858`](https://github.com/nocobase/nocobase/pull/858) +- docs: add resources-actions doc and sample [`#853`](https://github.com/nocobase/nocobase/pull/853) +- feat: add custom page sample and doc [`#855`](https://github.com/nocobase/nocobase/pull/855) +- feat: nocobase cli doc [`#854`](https://github.com/nocobase/nocobase/pull/854) +- fix: auto install a plugin on enable [`#852`](https://github.com/nocobase/nocobase/pull/852) +- Doc: dev collection fields [`#846`](https://github.com/nocobase/nocobase/pull/846) +- docs: server application api [`#842`](https://github.com/nocobase/nocobase/pull/842) +- docs: add actions api [`#844`](https://github.com/nocobase/nocobase/pull/844) +- refactor(doc): change to new structure [`#804`](https://github.com/nocobase/nocobase/pull/804) +- refactor: plugin manager [`#775`](https://github.com/nocobase/nocobase/pull/775) + +### Commits + +- feat: release notes [`b185412`](https://github.com/nocobase/nocobase/commit/b18541255c4c07d138793a018c785451542aab74) +- Update v08-changelog.md [`d242169`](https://github.com/nocobase/nocobase/commit/d24216962b46c286411d15051e85861f764f5a03) +- fix(client): tab pane initializers for create form block [`929a4f8`](https://github.com/nocobase/nocobase/commit/929a4f848a327d7f8c55bcc786f584f4444ad36e) + +## [v0.7.7-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.6-alpha.2...v0.7.7-alpha.1) - 2022-10-26 + +### Merged + +- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save [`#962`](https://github.com/nocobase/nocobase/pull/962) +- feat(file-manager): support tencent cos [`#958`](https://github.com/nocobase/nocobase/pull/958) +- feat: push ali docker registry [`#957`](https://github.com/nocobase/nocobase/pull/957) +- fix(plugin-workflow): fix constant schedule trigger time [`#956`](https://github.com/nocobase/nocobase/pull/956) +- Turkish readme [`#955`](https://github.com/nocobase/nocobase/pull/955) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`#954`](https://github.com/nocobase/nocobase/pull/954) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.7-alpha.1 [`a7a807c`](https://github.com/nocobase/nocobase/commit/a7a807c433df69e4edf93dfb1bd31ee5a9f4beab) +- fix: lerna ERR! EUNCOMMIT M yarn.lock [`39eb3c9`](https://github.com/nocobase/nocobase/commit/39eb3c90bea25e6308723a87f91c80f60939d3cb) +- feat: api service [`59f102d`](https://github.com/nocobase/nocobase/commit/59f102de8acd7dd16a8ba0955aeef9df8d77d655) + +## [v0.7.6-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.5-alpha.1.1666403334...v0.7.6-alpha.2) - 2022-10-24 + +### Merged + +- Turkish language [`#939`](https://github.com/nocobase/nocobase/pull/939) +- refactor(plugin-file-manager): move client code into plugin folder and enable path config [`#913`](https://github.com/nocobase/nocobase/pull/913) +- feat: add filter action to collection table [`#953`](https://github.com/nocobase/nocobase/pull/953) +- feat: ui schema cache [`#877`](https://github.com/nocobase/nocobase/pull/877) +- feat: docker optimizing [`#948`](https://github.com/nocobase/nocobase/pull/948) +- fix(plugin-workflow): test changedWithAssociations() [`#950`](https://github.com/nocobase/nocobase/pull/950) +- fix(plugin-workflow): skip time based test [`#951`](https://github.com/nocobase/nocobase/pull/951) +- fix(plugin-workflow): fix schedule trigger bug [`#949`](https://github.com/nocobase/nocobase/pull/949) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.1 [`a0382a9`](https://github.com/nocobase/nocobase/commit/a0382a90c1e764dc48d25153f03856d991bc27d2) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`b304681`](https://github.com/nocobase/nocobase/commit/b3046819d88b3341b9e2ead41e9c15bde2c41da8) +- Revert "fix: registry.npmjs.org" [`e24d6bd`](https://github.com/nocobase/nocobase/commit/e24d6bdebce7b076974dd4759688ab434369e41c) + +## [v0.7.5-alpha.1.1666403334](https://github.com/nocobase/nocobase/compare/v0.7.5-alpha.1...v0.7.5-alpha.1.1666403334) - 2022-10-22 + +### Merged + +- feat: changed with associations [`#943`](https://github.com/nocobase/nocobase/pull/943) +- fix(plugin-workflow): fix collection fieldset component [`#942`](https://github.com/nocobase/nocobase/pull/942) +- fix(plugin-workflow): avoid revision with ghost nodes [`#941`](https://github.com/nocobase/nocobase/pull/941) +- fix(plugin-workflow): add req context to processor [`#936`](https://github.com/nocobase/nocobase/pull/936) +- Feat/plugin workflow collection field [`#934`](https://github.com/nocobase/nocobase/pull/934) +- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set [`#926`](https://github.com/nocobase/nocobase/pull/926) +- fix(plugin-workflow): temp disable validation of collection field in node [`#928`](https://github.com/nocobase/nocobase/pull/928) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.5-alpha.1.1666403334 [`692f7e7`](https://github.com/nocobase/nocobase/commit/692f7e7ae5ddca3a3f3793bf57604603924c6af9) +- chore: dockerfile [`65724de`](https://github.com/nocobase/nocobase/commit/65724de42cfe65cbcfcbc56496c9fda1b0509ff7) +- chore: dockerfile [`bd5a0ce`](https://github.com/nocobase/nocobase/commit/bd5a0cefed7ff837237ff730ccf6e50a0419b49f) + +## [v0.7.5-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.7...v0.7.5-alpha.1) - 2022-10-16 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.5-alpha.1 [`#920`](https://github.com/nocobase/nocobase/pull/920) +- Feat: plugin workflow collection field [`#919`](https://github.com/nocobase/nocobase/pull/919) +- feat: create with array of values [`#912`](https://github.com/nocobase/nocobase/pull/912) +- fix: unbind on error throwing [`#914`](https://github.com/nocobase/nocobase/pull/914) +- fix: appends merge now using primary key [`#911`](https://github.com/nocobase/nocobase/pull/911) +- feat: limit database identifier [`#908`](https://github.com/nocobase/nocobase/pull/908) +- fix: sync collection field default value [`#907`](https://github.com/nocobase/nocobase/pull/907) +- fix: appends merge includes [`#905`](https://github.com/nocobase/nocobase/pull/905) +- fix: single relation repository appends query issue [`#901`](https://github.com/nocobase/nocobase/pull/901) +- feat(plugin-workflow): add concat calculator [`#894`](https://github.com/nocobase/nocobase/pull/894) +- fix(client/record-picker): support record-picker show format DataPicker [`#888`](https://github.com/nocobase/nocobase/pull/888) +- fix(client/block-select-collection): fix select collection menu view error [`#889`](https://github.com/nocobase/nocobase/pull/889) +- fix: unable to submit form during file upload [`#892`](https://github.com/nocobase/nocobase/pull/892) +- fix: run test by jest [`#891`](https://github.com/nocobase/nocobase/pull/891) +- feat(collection-manager): inverse fields can be configured [`#883`](https://github.com/nocobase/nocobase/pull/883) +- fix(formula): support integer and fix NaN error [`#879`](https://github.com/nocobase/nocobase/pull/879) +- fix: sort parameter is missing [`#849`](https://github.com/nocobase/nocobase/pull/849) +- fix: slow join query issued by appends field in find method of repository [`#845`](https://github.com/nocobase/nocobase/pull/845) +- feat(core/cache): support cache [`#876`](https://github.com/nocobase/nocobase/pull/876) +- feat: update option must have filter or filterByTk [`#847`](https://github.com/nocobase/nocobase/pull/847) +- added Russian translation [`#840`](https://github.com/nocobase/nocobase/pull/840) +- feat(database): add sequence field type [`#779`](https://github.com/nocobase/nocobase/pull/779) +- fix: can't access pages without permission via url [`#826`](https://github.com/nocobase/nocobase/pull/826) +- refactor(resourcer): combine middleware class [`#825`](https://github.com/nocobase/nocobase/pull/825) +- refactor(database): fix some fields and types [`#820`](https://github.com/nocobase/nocobase/pull/820) +- feat(locale): added Japanese translation [`#813`](https://github.com/nocobase/nocobase/pull/813) +- fix(plugin-workflow): fix value type for DatePicker to moment (#815) [`#819`](https://github.com/nocobase/nocobase/pull/819) +- refactor(plugin-workflow): export client calculators registry [`#816`](https://github.com/nocobase/nocobase/pull/816) +- fix: number storage type changed to double [`#810`](https://github.com/nocobase/nocobase/pull/810) +- refactor(server) [`#795`](https://github.com/nocobase/nocobase/pull/795) +- fix(plugin-verification): change provider rate limit error to 429 [`#788`](https://github.com/nocobase/nocobase/pull/788) +- fix(plugin-cm): fix field disappear after failed to update [`#773`](https://github.com/nocobase/nocobase/pull/773) +- fix: fix uiSchema undefined [`#770`](https://github.com/nocobase/nocobase/pull/770) +- fix(plugin-cm): fix unique option default value to update [`#768`](https://github.com/nocobase/nocobase/pull/768) +- fix(plugin-users): fix update profile 500 (#766) [`#767`](https://github.com/nocobase/nocobase/pull/767) +- fix: mysql column in where clause is ambiguous [`#756`](https://github.com/nocobase/nocobase/pull/756) +- feat(plugin-cm): add unique option for base fields [`#745`](https://github.com/nocobase/nocobase/pull/745) +- feat(plugin-verification): add plugin-verification and phone for users [`#722`](https://github.com/nocobase/nocobase/pull/722) +- feat: resize grid columns with drag and drop [`#748`](https://github.com/nocobase/nocobase/pull/748) +- refactor(client): split schema-initializer items into multiple files [`#744`](https://github.com/nocobase/nocobase/pull/744) +- refactor(plugin-workflow): change files mode to 644 [`#755`](https://github.com/nocobase/nocobase/pull/755) +- fix: db version check [`#749`](https://github.com/nocobase/nocobase/pull/749) +- feat: add examples [`#718`](https://github.com/nocobase/nocobase/pull/718) + +### Fixed + +- fix(plugin-workflow): fix value type for DatePicker to moment (#815) (#819) [`#815`](https://github.com/nocobase/nocobase/issues/815) +- fix(plugin-users): fix update profile 500 (#766) (#767) [`#766`](https://github.com/nocobase/nocobase/issues/766) +- fix: db version check (#749) [`#742`](https://github.com/nocobase/nocobase/issues/742) + +### Commits + +- fix(client): tab pane initializers for create form block [`7efc4bc`](https://github.com/nocobase/nocobase/commit/7efc4bca0e3c5f2e1c5cd9e1365e77a005f3e108) +- fix: transaction cannot be rolled back because it has been finished with state: rollback [`6dacec4`](https://github.com/nocobase/nocobase/commit/6dacec4158103fd165ec2865ea87ed9d3d4ceaa4) +- fix(database): fix the index name too long error [`7bfe6b8`](https://github.com/nocobase/nocobase/commit/7bfe6b8c46bef0183c4703683175561c7fc91aee) + +## [v0.7.4-alpha.7](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.4...v0.7.4-alpha.7) - 2022-08-15 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.7 [`#740`](https://github.com/nocobase/nocobase/pull/740) + +### Commits + +- docs: update release notes [`a260d29`](https://github.com/nocobase/nocobase/commit/a260d29222abe49d1453df828bb06a368e83dcf3) +- fix(collection-manager): update collection without fields [`03538ee`](https://github.com/nocobase/nocobase/commit/03538ee82f7b7cd73367d9904e4ac3c87d7a4345) + +## [v0.7.4-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.1...v0.7.4-alpha.4) - 2022-08-12 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.4 [`#727`](https://github.com/nocobase/nocobase/pull/727) +- fix: sync table sort to export [`#723`](https://github.com/nocobase/nocobase/pull/723) +- feat: full version of the NocoBase dockerfile [`#719`](https://github.com/nocobase/nocobase/pull/719) +- fix(plugin-workflow): fix extend collection [`#708`](https://github.com/nocobase/nocobase/pull/708) +- fix: DB_TABLE_PREFIX doesn't get applied [`#710`](https://github.com/nocobase/nocobase/pull/710) +- feat: default value [`#679`](https://github.com/nocobase/nocobase/pull/679) +- fix: required field delete submit error (#688) [`#694`](https://github.com/nocobase/nocobase/pull/694) + +### Commits + +- feat: add examples [`b848b9c`](https://github.com/nocobase/nocobase/commit/b848b9cd6774df6ed86acd30edb81ed6381c3555) +- fix: record provider required for read pretty [`38c3e3e`](https://github.com/nocobase/nocobase/commit/38c3e3e4cc2698069c741d25ddda8e3e8e4d1db0) +- Update README.zh-CN.md [`ba0e618`](https://github.com/nocobase/nocobase/commit/ba0e61873e7f69dee6a76929eb774828ac980760) + +## [v0.7.4-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.3-alpha.1...v0.7.4-alpha.1) - 2022-07-28 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.1 [`#696`](https://github.com/nocobase/nocobase/pull/696) +- fix: append roles to current user [`#695`](https://github.com/nocobase/nocobase/pull/695) +- fix: fix date format [`#686`](https://github.com/nocobase/nocobase/pull/686) +- test(plugin-workflow): skip prompt tests [`#692`](https://github.com/nocobase/nocobase/pull/692) +- fix: fix accuracy of percent [`#685`](https://github.com/nocobase/nocobase/pull/685) +- fix(plugin-workflow): adjust await sleep time for test cases [`#691`](https://github.com/nocobase/nocobase/pull/691) +- feat(plugin-workflow): add assignees config for prompt instruction [`#690`](https://github.com/nocobase/nocobase/pull/690) +- fix: role export button display (#616) [`#666`](https://github.com/nocobase/nocobase/pull/666) +- feat: uid validate [`#681`](https://github.com/nocobase/nocobase/pull/681) +- refactor: replace react-drag-listview with @dnd-kit/sortable [`#660`](https://github.com/nocobase/nocobase/pull/660) +- refactor(plugin-users): improve extendibility of middlewares [`#677`](https://github.com/nocobase/nocobase/pull/677) +- feat: o2m delete not refresh [`#646`](https://github.com/nocobase/nocobase/pull/646) +- feat: kanban add description [`#659`](https://github.com/nocobase/nocobase/pull/659) +- fix: field loss enum [`#667`](https://github.com/nocobase/nocobase/pull/667) +- feat: add editor hot key Ctrl+Shift+U [`#675`](https://github.com/nocobase/nocobase/pull/675) +- fix: Fix calendar change field error (#626) [`#671`](https://github.com/nocobase/nocobase/pull/671) +- chore: fix eslint not work [`#670`](https://github.com/nocobase/nocobase/pull/670) +- feat: number precision [`#661`](https://github.com/nocobase/nocobase/pull/661) +- feat: nginx config [`#664`](https://github.com/nocobase/nocobase/pull/664) +- feat: form item designer form switch issue [`#656`](https://github.com/nocobase/nocobase/pull/656) + +### Commits + +- fix(client): fieldNames of RecordPicker [`9038d11`](https://github.com/nocobase/nocobase/commit/9038d111ea71a89798cb1499f3dadc3f9c3dbfd7) +- fix(client): required for the sub-table field [`609b0e2`](https://github.com/nocobase/nocobase/commit/609b0e2ff2d5aece96185cbcd30ec1810194be0d) +- feat(client): tab icon [`d9b2bf8`](https://github.com/nocobase/nocobase/commit/d9b2bf8af1c42e2f4e81533f6db92b19523410bd) + +## [v0.7.3-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.2-alpha.2...v0.7.3-alpha.1) - 2022-08-10 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.3-alpha.1 [`#657`](https://github.com/nocobase/nocobase/pull/657) +- feat: print action [`#652`](https://github.com/nocobase/nocobase/pull/652) +- feat: restore action-hooks [`#655`](https://github.com/nocobase/nocobase/pull/655) +- feat: collections&fields pagination issue [`#653`](https://github.com/nocobase/nocobase/pull/653) +- fix(core): change proxied agent methods to native [`#654`](https://github.com/nocobase/nocobase/pull/654) +- feat: remove table field details actions [`#638`](https://github.com/nocobase/nocobase/pull/638) +- fix: link to default value [`#641`](https://github.com/nocobase/nocobase/pull/641) +- feat: support for displaying relational table fields in details or form blocks [`#635`](https://github.com/nocobase/nocobase/pull/635) +- fix: record picker cannot select from different pages [`#623`](https://github.com/nocobase/nocobase/pull/623) +- fix: dragging an element to the left, right, or bottom would cause the element to disappear [`#620`](https://github.com/nocobase/nocobase/pull/620) +- feat: table action add reload button [`#630`](https://github.com/nocobase/nocobase/pull/630) +- feat: improve language settings [`#627`](https://github.com/nocobase/nocobase/pull/627) +- feat: field assignment for custom actions supports string variables [`#597`](https://github.com/nocobase/nocobase/pull/597) +- fix: skip recursive remove on grid component [`#621`](https://github.com/nocobase/nocobase/pull/621) +- feat: fix time and collection pagination [`#618`](https://github.com/nocobase/nocobase/pull/618) +- feat: recordblockinitializers fields pick [`#558`](https://github.com/nocobase/nocobase/pull/558) +- fix: incorrectly :active background [`#607`](https://github.com/nocobase/nocobase/pull/607) +- fix: obo table selector [`#613`](https://github.com/nocobase/nocobase/pull/613) +- feat: form validator [`#569`](https://github.com/nocobase/nocobase/pull/569) +- fix: table selector [`#612`](https://github.com/nocobase/nocobase/pull/612) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.7 [`#611`](https://github.com/nocobase/nocobase/pull/611) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.3 [`#608`](https://github.com/nocobase/nocobase/pull/608) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.2 [`#606`](https://github.com/nocobase/nocobase/pull/606) + +### Commits + +- fix(client): build error [`600f13f`](https://github.com/nocobase/nocobase/commit/600f13f4a06ccfed27df928d7435afa83391c18a) +- fix(client): blocks are deleted when they are dragged below the current block [`20ab8c1`](https://github.com/nocobase/nocobase/commit/20ab8c15017d9dbf941bf963ce3023115050edf8) +- feat(client): plugin toolbar icons and translations [`c51c6c0`](https://github.com/nocobase/nocobase/commit/c51c6c097f24417f0ff82d3c5178ec3be1ee7630) + +## [v0.7.2-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.2-alpha.1...v0.7.2-alpha.2) - 2022-07-07 + +### Merged + +- fix: field permissions cannot be saved [`#605`](https://github.com/nocobase/nocobase/pull/605) +- fix(plugin-workflow): fix revision bug [`#603`](https://github.com/nocobase/nocobase/pull/603) +- fix(plugin-workflow): fix select value [`#600`](https://github.com/nocobase/nocobase/pull/600) +- fix(plugin-workflow): fix CollectionFieldSelect component [`#598`](https://github.com/nocobase/nocobase/pull/598) +- feat(plugin-workflow): add association select in calculation [`#584`](https://github.com/nocobase/nocobase/pull/584) + +### Fixed + +- fix: field permissions cannot be saved (#605) [`#599`](https://github.com/nocobase/nocobase/issues/599) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.1 [`a0cc501`](https://github.com/nocobase/nocobase/commit/a0cc50154cc292248ef107c95a24bcc0c7a586fa) +- fix(g2plot): import all plots [`2bb8fd9`](https://github.com/nocobase/nocobase/commit/2bb8fd984fb5c9cdd484cffc18411f4b644b8fb3) +- Update issue templates [`7767335`](https://github.com/nocobase/nocobase/commit/7767335ba7fe83e22bcc1976a8fd57926dc12c0a) + +## [v0.7.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.1-alpha.5...v0.7.2-alpha.1) - 2022-07-05 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.1 [`#578`](https://github.com/nocobase/nocobase/pull/578) +- fix: drop all foreign keys [`#576`](https://github.com/nocobase/nocobase/pull/576) +- fix(plugin-workflow): fix collection trigger config [`#575`](https://github.com/nocobase/nocobase/pull/575) +- feat: filter with variable [`#574`](https://github.com/nocobase/nocobase/pull/574) +- feat(cli): check database version before installation [`#572`](https://github.com/nocobase/nocobase/pull/572) +- fix(database): index invalid [`#564`](https://github.com/nocobase/nocobase/pull/564) +- fix: export association table data [`#561`](https://github.com/nocobase/nocobase/pull/561) +- Refactor(plugin workflow): move client files into plugin [`#556`](https://github.com/nocobase/nocobase/pull/556) +- fix(database): constraints default to false [`#550`](https://github.com/nocobase/nocobase/pull/550) +- fix(plugin-workflow): fix select width [`#552`](https://github.com/nocobase/nocobase/pull/552) +- feat: compatible with old kanban [`#553`](https://github.com/nocobase/nocobase/pull/553) +- feat: display association fields [`#512`](https://github.com/nocobase/nocobase/pull/512) +- Fix(plugin workflow) [`#549`](https://github.com/nocobase/nocobase/pull/549) +- fix:update mysql port [`#548`](https://github.com/nocobase/nocobase/pull/548) +- fix: export of relation blocks [`#546`](https://github.com/nocobase/nocobase/pull/546) +- fix(plugin-workflow): clear options when change collection [`#547`](https://github.com/nocobase/nocobase/pull/547) +- feat(plugin-workflow): add race mode [`#542`](https://github.com/nocobase/nocobase/pull/542) +- fix(client): change toArr to _.castArray in select component [`#543`](https://github.com/nocobase/nocobase/pull/543) +- chore(versions): ๐Ÿ˜Š publish v0.7.1-alpha.7 [`#539`](https://github.com/nocobase/nocobase/pull/539) + +### Commits + +- fix(client): comment out useless code [`4e9384b`](https://github.com/nocobase/nocobase/commit/4e9384bce27676a3cc1ce8d8fd08f5611cffbe5a) +- fix(workflow): merge workflow providers [`008a7f7`](https://github.com/nocobase/nocobase/commit/008a7f7f3351bdedf01b4490d1658edeacc95a16) +- feat(client): integer field [`9928424`](https://github.com/nocobase/nocobase/commit/9928424f5a163fe4edd7cfd60f349ca65b47c9bf) + +## [v0.7.1-alpha.5](https://github.com/nocobase/nocobase/compare/v0.7.1-alpha.4...v0.7.1-alpha.5) - 2022-06-26 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.1-alpha.5 [`c9159c6`](https://github.com/nocobase/nocobase/commit/c9159c6cf4b7deb80e87122d4b7967a510b8ae7c) +- fix(cli): upgrade from docker [`c4c96e5`](https://github.com/nocobase/nocobase/commit/c4c96e5a79562d87b597d23f0e536cd19687c890) + +## [v0.7.1-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.82...v0.7.1-alpha.4) - 2022-06-26 + +### Merged + +- chore(create-nocobase-app): fix some bugs [`#538`](https://github.com/nocobase/nocobase/pull/538) +- fix: destroy collection fields [`#536`](https://github.com/nocobase/nocobase/pull/536) +- feat(plugin-workflow): add delay node type [`#532`](https://github.com/nocobase/nocobase/pull/532) +- refactor: client application [`#533`](https://github.com/nocobase/nocobase/pull/533) +- fix: missing transaction [`#531`](https://github.com/nocobase/nocobase/pull/531) +- fix: add ellipsis property to record picker [`#527`](https://github.com/nocobase/nocobase/pull/527) +- fix: remove pattern without form item [`#528`](https://github.com/nocobase/nocobase/pull/528) +- fix(plugin-workflow): set current when update [`#526`](https://github.com/nocobase/nocobase/pull/526) +- fix: order nulls last [`#519`](https://github.com/nocobase/nocobase/pull/519) +- fix: action loading, refresh context, form submit and validate [`#523`](https://github.com/nocobase/nocobase/pull/523) +- Fix field pattern [`#520`](https://github.com/nocobase/nocobase/pull/520) +- fix(plugin-workflow): fix searchable select min-width [`#524`](https://github.com/nocobase/nocobase/pull/524) +- fix: template with fields only [`#517`](https://github.com/nocobase/nocobase/pull/517) +- fix(plugin-workflow): fix update workflow current property [`#521`](https://github.com/nocobase/nocobase/pull/521) +- refactor(plugin-workflow): abstract to classes [`#515`](https://github.com/nocobase/nocobase/pull/515) +- feat: column sortable and form item pattern [`#518`](https://github.com/nocobase/nocobase/pull/518) +- fix(custom-request): support string/json templates [`#514`](https://github.com/nocobase/nocobase/pull/514) +- feat: add block title [`#513`](https://github.com/nocobase/nocobase/pull/513) +- fix: remove collections & fields from db [`#511`](https://github.com/nocobase/nocobase/pull/511) +- feat: improve migrations [`#510`](https://github.com/nocobase/nocobase/pull/510) +- fix(client): consolidate usage of date/time as UTC in transfering [`#509`](https://github.com/nocobase/nocobase/pull/509) +- fix: formula bug [`#508`](https://github.com/nocobase/nocobase/pull/508) +- fix: default exportable fields [`#506`](https://github.com/nocobase/nocobase/pull/506) +- feat: association field block [`#493`](https://github.com/nocobase/nocobase/pull/493) +- feat: plugin export [`#479`](https://github.com/nocobase/nocobase/pull/479) +- fix(client): package path (fix #503) [`#504`](https://github.com/nocobase/nocobase/pull/504) +- fix: create or delete collection error [`#501`](https://github.com/nocobase/nocobase/pull/501) +- feat: update collections & fields [`#500`](https://github.com/nocobase/nocobase/pull/500) +- fix: rollback when field creation fails [`#498`](https://github.com/nocobase/nocobase/pull/498) +- fix(client): set `dropdownMatchSelectWidth` to false globally [`#497`](https://github.com/nocobase/nocobase/pull/497) +- fix(client): no-key warning in user menu items [`#496`](https://github.com/nocobase/nocobase/pull/496) +- Feat(plugin workflow): cron field for schedule trigger configuration [`#495`](https://github.com/nocobase/nocobase/pull/495) +- feat: audit logs [`#494`](https://github.com/nocobase/nocobase/pull/494) +- refactor(plugin-workflow): add revision column to execution [`#491`](https://github.com/nocobase/nocobase/pull/491) +- feat: relation field uiSchema [`#487`](https://github.com/nocobase/nocobase/pull/487) +- feat: change FK to input component [`#488`](https://github.com/nocobase/nocobase/pull/488) +- fix(plugin-multi-app-manager): fix pg cannot create database block tests [`#486`](https://github.com/nocobase/nocobase/pull/486) +- refactor(database): hook proxy [`#402`](https://github.com/nocobase/nocobase/pull/402) +- feat: chart blocks [`#484`](https://github.com/nocobase/nocobase/pull/484) +- Refactor(plugin workflow): support number in repeat config for schedule [`#482`](https://github.com/nocobase/nocobase/pull/482) +- chore(debug): add debug config [`#475`](https://github.com/nocobase/nocobase/pull/475) +- fix: has one bug [`#478`](https://github.com/nocobase/nocobase/pull/478) +- feat: relationships [`#473`](https://github.com/nocobase/nocobase/pull/473) +- fix(plugin-workflow): fix collection trigger transaction [`#474`](https://github.com/nocobase/nocobase/pull/474) +- fix(plugin-workflow): temporary solution for collection trigger conditions [`#472`](https://github.com/nocobase/nocobase/pull/472) +- fix: markdown component [`#469`](https://github.com/nocobase/nocobase/pull/469) +- fix: formula field and percent field [`#467`](https://github.com/nocobase/nocobase/pull/467) +- fix(plugin-workflow): fix update workflow action [`#464`](https://github.com/nocobase/nocobase/pull/464) +- fix: update formula field and percent field [`#461`](https://github.com/nocobase/nocobase/pull/461) +- feat: add formula field type [`#457`](https://github.com/nocobase/nocobase/pull/457) +- fix: the details of the associated data in the subtable are not displayed [`#454`](https://github.com/nocobase/nocobase/pull/454) +- fix(plugin-workflow): fix languages [`#451`](https://github.com/nocobase/nocobase/pull/451) +- fix: afterSync hook not triggered [`#450`](https://github.com/nocobase/nocobase/pull/450) +- docs(various): Improve readability [`#447`](https://github.com/nocobase/nocobase/pull/447) +- feat: custom request [`#439`](https://github.com/nocobase/nocobase/pull/439) +- Feat(plugin workflow): schedule trigger [`#438`](https://github.com/nocobase/nocobase/pull/438) +- feat: db migrator [`#432`](https://github.com/nocobase/nocobase/pull/432) +- fix(client): select component cannot be opened in sub-table block [`#431`](https://github.com/nocobase/nocobase/pull/431) +- docs(github): change to markdown format [`#430`](https://github.com/nocobase/nocobase/pull/430) +- fix(cli): typo [`#429`](https://github.com/nocobase/nocobase/pull/429) + +### Fixed + +- fix(client): package path (fix #503) (#504) [`#503`](https://github.com/nocobase/nocobase/issues/503) + +### Commits + +- feat(client): update locales [`e57e60e`](https://github.com/nocobase/nocobase/commit/e57e60e6cb84431e694e69830d128cd71938388f) +- docs: update doc [`e5cb948`](https://github.com/nocobase/nocobase/commit/e5cb94803f738961fcbc1986a94d258ef9e191a9) +- fix(client): improve datepicker component, date with time zone, gmt support [`1c03fbb`](https://github.com/nocobase/nocobase/commit/1c03fbb853b5885547835f50fc9a0932f63c363b) + +## [v0.7.0-alpha.82](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.67...v0.7.0-alpha.82) - 2022-05-27 + +### Merged + +- feat(client,sdk): improve api client [`#425`](https://github.com/nocobase/nocobase/pull/425) +- feat: add create-plugin command [`#423`](https://github.com/nocobase/nocobase/pull/423) +- feat: add button color [`#420`](https://github.com/nocobase/nocobase/pull/420) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.78 [`#419`](https://github.com/nocobase/nocobase/pull/419) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.82 [`4820fd0`](https://github.com/nocobase/nocobase/commit/4820fd09375c7200d1ea0bb0aab1bd4783b80d3d) +- docs: update installation documentation [`90623e8`](https://github.com/nocobase/nocobase/commit/90623e8e9a175238c3fc8bb527c8884c207ff78e) +- fix: "typescript": "4.5.5" [`c071217`](https://github.com/nocobase/nocobase/commit/c071217fff819378e982e611af1fd9fa71ebc5fb) + +## [v0.7.0-alpha.67](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.64...v0.7.0-alpha.67) - 2022-05-24 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.67 [`3262979`](https://github.com/nocobase/nocobase/commit/326297936b17c6da3f6e86891c9772c72b088312) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.66 [`9c19e4d`](https://github.com/nocobase/nocobase/commit/9c19e4d67f0b59b8ec957b1a9164acc88a50416d) + +## [v0.7.0-alpha.64](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.60...v0.7.0-alpha.64) - 2022-05-24 + +### Merged + +- feat: update docs [`#413`](https://github.com/nocobase/nocobase/pull/413) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.63 [`c01c695`](https://github.com/nocobase/nocobase/commit/c01c6952a58c2677d9f45fb41872363afda25197) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.64 [`35d01a5`](https://github.com/nocobase/nocobase/commit/35d01a5fb0f0522e263c7fc37bc8384f99424240) +- fix(plugin-users): add translations (#416) [`72c3ba4`](https://github.com/nocobase/nocobase/commit/72c3ba4fae5cdee6b84eed65e3a35180186a987e) + +## [v0.7.0-alpha.60](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.59...v0.7.0-alpha.60) - 2022-05-23 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.60 [`f0d0afb`](https://github.com/nocobase/nocobase/commit/f0d0afbb19dbd90ac3cf4155748fa084c67f54ee) +- fix(create-nocobase-app): storage path [`a0245ca`](https://github.com/nocobase/nocobase/commit/a0245caeb816fede8bb40c33e694de6419a21f26) + +## [v0.7.0-alpha.59](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.58...v0.7.0-alpha.59) - 2022-05-23 + +### Merged + +- refactor(plugin-workflow): change column type of executed from boolean to integer [`#411`](https://github.com/nocobase/nocobase/pull/411) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.59 [`c90e5ae`](https://github.com/nocobase/nocobase/commit/c90e5aee4c8257a3ab7ff492e69cb568cccff8b5) +- docs: update roadmap and release notes [`f198411`](https://github.com/nocobase/nocobase/commit/f198411c7386afaa4b6fc41ebb1806d40e3752b1) +- Update roadmap.md [`e5c5e16`](https://github.com/nocobase/nocobase/commit/e5c5e16b73174bf8092f730b196ef2ef088001b4) + +## [v0.7.0-alpha.58](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.57...v0.7.0-alpha.58) - 2022-05-22 + +### Merged + +- fix: 204 no content response [`#378`](https://github.com/nocobase/nocobase/pull/378) +- feat: destroy association field after target collection destroy [`#376`](https://github.com/nocobase/nocobase/pull/376) +- fix(type): use sequelize native Transactionable instead of TransactionAble [`#410`](https://github.com/nocobase/nocobase/pull/410) +- fix(plugin-workflow): remove previous listeners when collection changed in config [`#409`](https://github.com/nocobase/nocobase/pull/409) +- feat: add custom action [`#396`](https://github.com/nocobase/nocobase/pull/396) +- refactor(plugin-workflow): multiple instances and event management (fix #384) [`#408`](https://github.com/nocobase/nocobase/pull/408) + +### Fixed + +- refactor(plugin-workflow): multiple instances and event management (fix #384) (#408) [`#384`](https://github.com/nocobase/nocobase/issues/384) [`#384`](https://github.com/nocobase/nocobase/issues/384) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.58 [`19ee422`](https://github.com/nocobase/nocobase/commit/19ee42257edf17804d548ffd5ba9ddff6dc775d1) +- fix(plugin-acl): missing pagination parameters #394 [`b44753d`](https://github.com/nocobase/nocobase/commit/b44753d528a12075e64754828982ca80dfc90263) +- fix: missing isTruly/isFalsy filter operators #390 [`e596e6d`](https://github.com/nocobase/nocobase/commit/e596e6d365a3e46859e7d7bafcc3e54d286656cf) + +## [v0.7.0-alpha.57](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.34...v0.7.0-alpha.57) - 2022-05-19 + +### Merged + +- fix(plugin-workflow): fix node type title in drawers [`#389`](https://github.com/nocobase/nocobase/pull/389) + +### Commits + +- feat: build, cli, devtools, sdk, docs... [`6410bc8`](https://github.com/nocobase/nocobase/commit/6410bc8a75fa4dda9fe2bccfadca336fc8e794d0) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.57 [`33f076e`](https://github.com/nocobase/nocobase/commit/33f076e430645055d79254592971c50d9f131a6d) +- Update README.md [`e24e007`](https://github.com/nocobase/nocobase/commit/e24e007395ed09463acdc3cf53b856ca9e0dd664) + +## [v0.7.0-alpha.34](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.33...v0.7.0-alpha.34) - 2022-05-14 + +### Merged + +- Fix(plugin workflow): fix cannot get job result properties [`#382`](https://github.com/nocobase/nocobase/pull/382) +- feat: exist on server start throw error [`#374`](https://github.com/nocobase/nocobase/pull/374) +- chore: application options [`#375`](https://github.com/nocobase/nocobase/pull/375) +- fix: not in operator with null value record [`#377`](https://github.com/nocobase/nocobase/pull/377) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.34 [`48b2b4b`](https://github.com/nocobase/nocobase/commit/48b2b4bc7bbc39533e461d34d7f026a4ad1a9b5c) +- feat: add plugins:getPinned action api [`b5c24aa`](https://github.com/nocobase/nocobase/commit/b5c24aa7999934f2b6f7ca1e9e9448b220a61af2) + +## [v0.7.0-alpha.33](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.30...v0.7.0-alpha.33) - 2022-05-13 + +### Merged + +- Feat(plugin workflow): revisions [`#379`](https://github.com/nocobase/nocobase/pull/379) +- fix(database): fix option-parser include list index [`#371`](https://github.com/nocobase/nocobase/pull/371) +- fix(plugin-worklfow): fix duplicated description in fields values [`#368`](https://github.com/nocobase/nocobase/pull/368) +- fix(database): fix type and transaction in repository [`#366`](https://github.com/nocobase/nocobase/pull/366) +- Fix(plugin workflow): fix transaction of execution [`#364`](https://github.com/nocobase/nocobase/pull/364) +- fix(plugin-workflow): add document title [`#363`](https://github.com/nocobase/nocobase/pull/363) +- fix: set visible with confirm [`#361`](https://github.com/nocobase/nocobase/pull/361) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.33 [`c4b5f4f`](https://github.com/nocobase/nocobase/commit/c4b5f4f84b18c2d8bc40f82947b9338e2f620984) +- Update issue templates [`8466159`](https://github.com/nocobase/nocobase/commit/846615937add786319dde167f2b28e981941e18e) +- fix: link-to field data scope error (#1337) [`2156c70`](https://github.com/nocobase/nocobase/commit/2156c70ff3a7e65a8ad1bf14602f0dad150382ab) + +## [v0.7.0-alpha.30](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.29...v0.7.0-alpha.30) - 2022-05-05 + +### Merged + +- fix(plugin-workflow): fix tests [`#360`](https://github.com/nocobase/nocobase/pull/360) +- Feat: Unsaved changes tip [`#359`](https://github.com/nocobase/nocobase/pull/359) +- Fix acl error [`#358`](https://github.com/nocobase/nocobase/pull/358) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.30 [`781fb0a`](https://github.com/nocobase/nocobase/commit/781fb0a999854341cd8c353d31ae5a11ecbbe775) +- fix(client): upgrade formily packages [`58b151c`](https://github.com/nocobase/nocobase/commit/58b151c74512d5fa3f33c094580c4f5f15792342) +- fix(client): setFormValueChanged must be defined [`b33c819`](https://github.com/nocobase/nocobase/commit/b33c8198e676cc935bccf995ff3d18b249290062) + +## [v0.7.0-alpha.29](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.28...v0.7.0-alpha.29) - 2022-05-04 + +### Merged + +- fix: empty resource acl error [`#357`](https://github.com/nocobase/nocobase/pull/357) +- Feat: from values changed when unsaved will prompt [`#351`](https://github.com/nocobase/nocobase/pull/351) +- fix: modify filter close icon color [`#356`](https://github.com/nocobase/nocobase/pull/356) +- fix(plugin-workflow): fix i18n [`#354`](https://github.com/nocobase/nocobase/pull/354) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.29 [`46e660b`](https://github.com/nocobase/nocobase/commit/46e660b10d1cf94ecb808a9a45edb5e8d40398dc) +- fix(client): color styling [`90a58cc`](https://github.com/nocobase/nocobase/commit/90a58cc3cf3eab02bc61f363d4476454383907d3) +- feat(client): translation [`33a99d9`](https://github.com/nocobase/nocobase/commit/33a99d91b8dc19186ed743b1bbc073c09dd4629e) + +## [v0.7.0-alpha.28](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.24...v0.7.0-alpha.28) - 2022-05-02 + +### Merged + +- Fix(plugin-workflow) [`#353`](https://github.com/nocobase/nocobase/pull/353) +- fix(plugin-file-manager): upgrade multer-aliyun-oss package to fix size [`#352`](https://github.com/nocobase/nocobase/pull/352) +- feat: improve code [`#350`](https://github.com/nocobase/nocobase/pull/350) +- Fix/plugin workflow [`#349`](https://github.com/nocobase/nocobase/pull/349) +- fix: db:sync not working [`#348`](https://github.com/nocobase/nocobase/pull/348) +- fix(plugin-workflow): fix trigger bind logic to avoid duplication [`#347`](https://github.com/nocobase/nocobase/pull/347) +- Fix(plugin workflow) [`#346`](https://github.com/nocobase/nocobase/pull/346) +- Fix:menu url style [`#344`](https://github.com/nocobase/nocobase/pull/344) +- chore(plugin-workflow): add translation [`#345`](https://github.com/nocobase/nocobase/pull/345) +- fix(plugin-workflow): break cycling trigger through transaction id [`#341`](https://github.com/nocobase/nocobase/pull/341) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.28 [`a48d004`](https://github.com/nocobase/nocobase/commit/a48d00492ebc34c66c63d9644530c5b8a7c9914a) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.27 [`ebfe11f`](https://github.com/nocobase/nocobase/commit/ebfe11ff09bf50b4b2322cbbad65b4ea936fdb71) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.26 [`515d952`](https://github.com/nocobase/nocobase/commit/515d95276700ffafe7d2785a93fc510d36da462b) + +## [v0.7.0-alpha.24](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.16...v0.7.0-alpha.24) - 2022-04-29 + +### Merged + +- fix: model.beforeCreate not called [`#343`](https://github.com/nocobase/nocobase/pull/343) +- fix: thumbnail image in kanban card [`#338`](https://github.com/nocobase/nocobase/pull/338) +- feat: db authenticate [`#342`](https://github.com/nocobase/nocobase/pull/342) +- chore: install subApp asynchronous [`#336`](https://github.com/nocobase/nocobase/pull/336) +- fix(plugin-workflow): change collection values input ux in workflow nodes [`#340`](https://github.com/nocobase/nocobase/pull/340) +- feat: improvements [`#335`](https://github.com/nocobase/nocobase/pull/335) +- Feat(plugin workflow): add changed fields to model trigger config [`#332`](https://github.com/nocobase/nocobase/pull/332) + +### Commits + +- docs: update readme.md [`aacec30`](https://github.com/nocobase/nocobase/commit/aacec306733ee1cab3c3c7e5a7fcbbeb372a03e9) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.24 [`1fb2dd8`](https://github.com/nocobase/nocobase/commit/1fb2dd884c4f2d2167f5dde40a15012a752e53ab) +- feat: uuid field [`2c0d3fc`](https://github.com/nocobase/nocobase/commit/2c0d3fcc5ad1bce2cbc47e82e76277918c66c565) + +## [v0.7.0-alpha.16](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.15...v0.7.0-alpha.16) - 2022-04-27 + +### Merged + +- fix: cannot find module mkdirp [`#330`](https://github.com/nocobase/nocobase/pull/330) +- Fix(plugin workflow): UX issues [`#329`](https://github.com/nocobase/nocobase/pull/329) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.16 [`27399f4`](https://github.com/nocobase/nocobase/commit/27399f4e5e6d1f9f2c0eee4d6be8ff89df625bd8) +- feat: improve code [`c71f45c`](https://github.com/nocobase/nocobase/commit/c71f45ca6a15149703fdf12f4d0f68a226d10a7e) +- Update README.md [`4317de7`](https://github.com/nocobase/nocobase/commit/4317de7eb116dd7d538d0cf2c4782372e1b5fce2) + +## [v0.7.0-alpha.15](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.6...v0.7.0-alpha.15) - 2022-04-26 + +### Merged + +- fix: create-nocobase-app compatibility [`#323`](https://github.com/nocobase/nocobase/pull/323) +- fix: create-nocobase-app client package version [`#321`](https://github.com/nocobase/nocobase/pull/321) +- fix: app manager [`#320`](https://github.com/nocobase/nocobase/pull/320) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.15 [`f0d9b0e`](https://github.com/nocobase/nocobase/commit/f0d9b0ec026b589b3d10dcdbbbb656baca1a9004) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.14 [`8736278`](https://github.com/nocobase/nocobase/commit/87362789f331e043336b571137a7ace7e38a6da1) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.13 [`62eb85d`](https://github.com/nocobase/nocobase/commit/62eb85de5f341f343577232ebecce7f9fb7a5b21) + +## [v0.7.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.5...v0.7.0-alpha.6) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.6 [`7d0087c`](https://github.com/nocobase/nocobase/commit/7d0087cbb3b7663ba05366ca3b80db2853669ee9) + +## [v0.7.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.4...v0.7.0-alpha.5) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.5 [`a00b45a`](https://github.com/nocobase/nocobase/commit/a00b45a2686695c5f4824d074ac5e1aff210793a) +- fix(plugin-system-settings): cannot read property cliArgs of undefined [`b0d3274`](https://github.com/nocobase/nocobase/commit/b0d3274b2d98147679f91c468327287675de0c08) + +## [v0.7.0-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.3...v0.7.0-alpha.4) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.4 [`327e413`](https://github.com/nocobase/nocobase/commit/327e413b6dd94dad9b756b1e08cda47cad734dc1) + +## [v0.7.0-alpha.3](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.2...v0.7.0-alpha.3) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.3 [`b12507f`](https://github.com/nocobase/nocobase/commit/b12507f6e4bcb5f1fd8285670a43fb3807d90ea0) +- fix: antd use ~v4.19.5 [`733c704`](https://github.com/nocobase/nocobase/commit/733c7048ed0e00bd2c01bfaf8452731a9a89670e) + +## [v0.7.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.1...v0.7.0-alpha.2) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.2 [`0e0e99e`](https://github.com/nocobase/nocobase/commit/0e0e99ef79c0b25bb0b45ecaa477c049cb16afee) +- feat(license): update license [`ed9b2b6`](https://github.com/nocobase/nocobase/commit/ed9b2b6d950cab33423225069a7b0de24b65ef45) +- feat: kanban disableCardDrag [`05a251b`](https://github.com/nocobase/nocobase/commit/05a251b1fc06012e77e402b422e3120430effef1) + +## [v0.7.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.0...v0.7.0-alpha.1) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.1 [`e7293ad`](https://github.com/nocobase/nocobase/commit/e7293ad7aadbdf2084042f7800a232af6e0b7a8a) + +## [v0.7.0-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.12...v0.7.0-alpha.0) - 2022-04-25 + +### Merged + +- refactor: modify default lable style [`#318`](https://github.com/nocobase/nocobase/pull/318) +- Fix multiple apps [`#317`](https://github.com/nocobase/nocobase/pull/317) +- Fix multiple apps [`#316`](https://github.com/nocobase/nocobase/pull/316) +- Fix acl target action error [`#311`](https://github.com/nocobase/nocobase/pull/311) +- feat: file storages [`#314`](https://github.com/nocobase/nocobase/pull/314) +- fix(plugin-workflow): fix some ux [`#313`](https://github.com/nocobase/nocobase/pull/313) +- fix(plugin-workflow): fix query node getter field [`#308`](https://github.com/nocobase/nocobase/pull/308) +- Fix create nocobase app [`#307`](https://github.com/nocobase/nocobase/pull/307) +- fix: create-nocobase-app [`#306`](https://github.com/nocobase/nocobase/pull/306) +- Fix create nocobase app [`#305`](https://github.com/nocobase/nocobase/pull/305) +- fix: block item add overflow:hidden [`#304`](https://github.com/nocobase/nocobase/pull/304) + +### Commits + +- feat(license): replace MIT license with Apache-2.0 [`717efa8`](https://github.com/nocobase/nocobase/commit/717efa889d471fac3f909137e2adb96586414aad) +- feat: translations [`5c0184a`](https://github.com/nocobase/nocobase/commit/5c0184a397885d6de5307a7087c2d93042cd49f8) +- feat: translations [`1f04f90`](https://github.com/nocobase/nocobase/commit/1f04f90a00e071aa9ab294f21e8d02373191eecc) + +## [v0.6.2-alpha.12](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.11...v0.6.2-alpha.12) - 2022-04-21 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.12 [`5a668cf`](https://github.com/nocobase/nocobase/commit/5a668cf9d0450944f3d2d5beed9e8d5e5b96f5d7) +- fix: create-nocobase-app publish [`269e73e`](https://github.com/nocobase/nocobase/commit/269e73ef19d41835813609b39744c40fb1fff92e) +- chore: create-nocobase-app package.json [`1c30ee1`](https://github.com/nocobase/nocobase/commit/1c30ee1c630d021dc919ce6fcc56cce179db20ae) + +## [v0.6.2-alpha.11](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.10...v0.6.2-alpha.11) - 2022-04-20 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.11 [`8741015`](https://github.com/nocobase/nocobase/commit/8741015a6237cd3ea7342edcb7aa11fe794e6b18) +- fix: read-config [`f6d23ad`](https://github.com/nocobase/nocobase/commit/f6d23add8c1845dd4b567d2958c24ada8ae8cee0) + +## [v0.6.2-alpha.10](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.9...v0.6.2-alpha.10) - 2022-04-20 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.10 [`693c668`](https://github.com/nocobase/nocobase/commit/693c668282d8032b69245ae7e5c1cafa3c41e584) +- fix: publish [`9e717ae`](https://github.com/nocobase/nocobase/commit/9e717ae3ca2f453005602df03b08edca14c56505) + +## [v0.6.2-alpha.9](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.7...v0.6.2-alpha.9) - 2022-04-20 + +### Merged + +- feat: details block [`#302`](https://github.com/nocobase/nocobase/pull/302) +- Fix(plugin workflow): fix collection data form view [`#301`](https://github.com/nocobase/nocobase/pull/301) +- feat: add $isCurrentUser filter operator [`#299`](https://github.com/nocobase/nocobase/pull/299) +- fix: through table primaryKey error [`#297`](https://github.com/nocobase/nocobase/pull/297) +- feat: junction collection for linkTo field [`#296`](https://github.com/nocobase/nocobase/pull/296) +- fix: long text will wrap in FormItem [`#295`](https://github.com/nocobase/nocobase/pull/295) +- fix(client): avoid cannot getField by randomly generated name and throw error [`#294`](https://github.com/nocobase/nocobase/pull/294) +- Feat/create nocobase app [`#273`](https://github.com/nocobase/nocobase/pull/273) +- feat(plugin-workflow): add all crud nodes for workflow [`#293`](https://github.com/nocobase/nocobase/pull/293) +- feat(plugin-workflow): add create node component [`#292`](https://github.com/nocobase/nocobase/pull/292) +- fix: rich text removed value avoid dispaly html string [`#290`](https://github.com/nocobase/nocobase/pull/290) + +### Commits + +- fix: update yarn.lock [`fcfde7e`](https://github.com/nocobase/nocobase/commit/fcfde7ed0a5b7fdae3fe7424e406ca2e5d944f9b) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.9 [`1afc867`](https://github.com/nocobase/nocobase/commit/1afc86733cb090cf5f45c781ad6488c32caa740c) +- fix: update useCreateActionProps & useUpdateActionProps [`fca0943`](https://github.com/nocobase/nocobase/commit/fca0943e8d013a0e8bb46756b89cfc992aa1b6c1) + +## [v0.6.2-alpha.7](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.6...v0.6.2-alpha.7) - 2022-04-16 + +### Commits + +- feat: improve code [`2202cc6`](https://github.com/nocobase/nocobase/commit/2202cc64d960918113b50bf0dc352a59cac04484) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.7 [`d165782`](https://github.com/nocobase/nocobase/commit/d165782860681af206005039f4bec00fc7fe4241) + +## [v0.6.2-alpha.6](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.5...v0.6.2-alpha.6) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.6 [`faa064a`](https://github.com/nocobase/nocobase/commit/faa064ae8dbdcba98e1782a8e2c0b5a338e68219) + +## [v0.6.2-alpha.5](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.4...v0.6.2-alpha.5) - 2022-04-15 + +### Commits + +- chore: create-nocobase-app lib [`fc27ebc`](https://github.com/nocobase/nocobase/commit/fc27ebc08a5c889596432a2ece6ba9e0c8957bab) +- chore: create-nocobase-app [`8d0703c`](https://github.com/nocobase/nocobase/commit/8d0703c568ad0e66a14e3a4d47d57b1d63cd64f8) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.5 [`2b21546`](https://github.com/nocobase/nocobase/commit/2b21546c4c50c7b5447d991d3852b90dca7219b9) + +## [v0.6.2-alpha.4](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.3...v0.6.2-alpha.4) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.4 [`e3a9e92`](https://github.com/nocobase/nocobase/commit/e3a9e924e002afeb02fb785fcecb124dd6d995a1) + +## [v0.6.2-alpha.3](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.1...v0.6.2-alpha.3) - 2022-04-15 + +### Commits + +- feat: workspaces [`0eb6997`](https://github.com/nocobase/nocobase/commit/0eb6997c7257332751e49d4a6c623c2ccd786495) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.3 [`2feae05`](https://github.com/nocobase/nocobase/commit/2feae051e24a46c0b78b31ef2a4dafdb14344398) +- chore: 0.6.2-alpha.2 [`dbf86d5`](https://github.com/nocobase/nocobase/commit/dbf86d52ccc7653e6b23386c2aa465402702da85) + +## [v0.6.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.0...v0.6.2-alpha.1) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.1 [`c6b58b2`](https://github.com/nocobase/nocobase/commit/c6b58b215e43a48d625b8493eefc438c6b9e1e7a) + +## [v0.6.2-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.1-alpha.0...v0.6.2-alpha.0) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.0 [`5351fb3`](https://github.com/nocobase/nocobase/commit/5351fb3ab34a92b97102640dffa7aeafa5294b97) + +## [v0.6.1-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.0...v0.6.1-alpha.0) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.1-alpha.0 [`0b52b73`](https://github.com/nocobase/nocobase/commit/0b52b731dcd23e6ae251c4d5f5c4da781dd109d5) + +## [v0.6.0](https://github.com/nocobase/nocobase/compare/v0.6.0-alpha.1...v0.6.0) - 2022-04-15 + +### Merged + +- Feat: plugin-workflow [`#288`](https://github.com/nocobase/nocobase/pull/288) +- fix: slate style [`#289`](https://github.com/nocobase/nocobase/pull/289) +- fix: toJSON with belongsTo Assoication [`#287`](https://github.com/nocobase/nocobase/pull/287) +- feat: improve acl module [`#283`](https://github.com/nocobase/nocobase/pull/283) +- fix: destroy own records [`#285`](https://github.com/nocobase/nocobase/pull/285) +- feat(plugin-workflow): support context variables from model trigger [`#284`](https://github.com/nocobase/nocobase/pull/284) +- fix: acl write [`#280`](https://github.com/nocobase/nocobase/pull/280) +- fix: call root server hook after insertNewSchema [`#282`](https://github.com/nocobase/nocobase/pull/282) +- Feat/plugin workflow [`#278`](https://github.com/nocobase/nocobase/pull/278) +- feat: acl provider [`#279`](https://github.com/nocobase/nocobase/pull/279) +- feat: add Slate component [`#272`](https://github.com/nocobase/nocobase/pull/272) +- Feat/plugin users with jwt [`#258`](https://github.com/nocobase/nocobase/pull/258) +- fix: modify antd style of default [`#277`](https://github.com/nocobase/nocobase/pull/277) +- fix(client): meet undefined error after clear filter cascader value [`#267`](https://github.com/nocobase/nocobase/pull/267) +- Feat(plugin workflow): refactor calculation and add filter for query [`#264`](https://github.com/nocobase/nocobase/pull/264) +- feat: block provider [`#261`](https://github.com/nocobase/nocobase/pull/261) +- fix: toJSON with null association [`#260`](https://github.com/nocobase/nocobase/pull/260) +- fix: error handle error [`#259`](https://github.com/nocobase/nocobase/pull/259) + +### Commits + +- fix: yarn.lock [`7a7eb0c`](https://github.com/nocobase/nocobase/commit/7a7eb0cc82af0b1621476d2bb163b43ccc92da80) +- fix: yarn.lock [`e226f04`](https://github.com/nocobase/nocobase/commit/e226f04e505ed7f4d94abf3074ad4f375d15c67d) +- feat: rich text [`5b41b33`](https://github.com/nocobase/nocobase/commit/5b41b338072ec75f579a695bdae34dd69918752b) + +## [v0.6.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.5.0-alpha.33...v0.6.0-alpha.1) - 2022-04-05 + +### Merged + +- fix: textarea read pretty can support break line [`#255`](https://github.com/nocobase/nocobase/pull/255) +- fix: markdown support ellipsis [`#257`](https://github.com/nocobase/nocobase/pull/257) +- featPlugin multiple apps [`#248`](https://github.com/nocobase/nocobase/pull/248) +- add action log tempalte [`#239`](https://github.com/nocobase/nocobase/pull/239) +- fix some bugs [`#252`](https://github.com/nocobase/nocobase/pull/252) +- fix(plugin-workflow): fix adding/removing node in parallel branches [`#253`](https://github.com/nocobase/nocobase/pull/253) +- Feat: client base entry of plugin workflow [`#225`](https://github.com/nocobase/nocobase/pull/225) +- fix: updateAt on move scope change [`#251`](https://github.com/nocobase/nocobase/pull/251) +- feat: get json schema with async node [`#246`](https://github.com/nocobase/nocobase/pull/246) +- feat: insertNewSchema [`#245`](https://github.com/nocobase/nocobase/pull/245) +- fix: transaction error [`#242`](https://github.com/nocobase/nocobase/pull/242) +- feat: block templates [`#240`](https://github.com/nocobase/nocobase/pull/240) +- feat: uiSchema clearAncestor [`#241`](https://github.com/nocobase/nocobase/pull/241) +- feat: init sort field values [`#236`](https://github.com/nocobase/nocobase/pull/236) +- fix: move action without alter updatedAt [`#235`](https://github.com/nocobase/nocobase/pull/235) +- feat: role check action [`#234`](https://github.com/nocobase/nocobase/pull/234) +- feat: ne operator [`#233`](https://github.com/nocobase/nocobase/pull/233) +- fix: user current role [`#232`](https://github.com/nocobase/nocobase/pull/232) +- featEnable permission [`#229`](https://github.com/nocobase/nocobase/pull/229) +- test: update reverseField [`#231`](https://github.com/nocobase/nocobase/pull/231) +- feat: kanban [`#230`](https://github.com/nocobase/nocobase/pull/230) +- Nocobase next kanban [`#223`](https://github.com/nocobase/nocobase/pull/223) +- add: test [`#224`](https://github.com/nocobase/nocobase/pull/224) +- Plugin error handler [`#222`](https://github.com/nocobase/nocobase/pull/222) +- fix: array $noneOf with null [`#220`](https://github.com/nocobase/nocobase/pull/220) +- fix: filter parser with number in key [`#219`](https://github.com/nocobase/nocobase/pull/219) +- feat: ui-schema-tree-path descendant index [`#218`](https://github.com/nocobase/nocobase/pull/218) +- fix: array operator query error [`#217`](https://github.com/nocobase/nocobase/pull/217) +- fix: operator query value [`#216`](https://github.com/nocobase/nocobase/pull/216) +- feat: string operators [`#215`](https://github.com/nocobase/nocobase/pull/215) +- feat: error handle middleware [`#214`](https://github.com/nocobase/nocobase/pull/214) +- refactor: filter schema component [`#213`](https://github.com/nocobase/nocobase/pull/213) +- fix: empty operator with $or filter [`#212`](https://github.com/nocobase/nocobase/pull/212) +- feat: plugin install [`#211`](https://github.com/nocobase/nocobase/pull/211) +- feat: sortBy through table value [`#209`](https://github.com/nocobase/nocobase/pull/209) +- Feat: plugin workflow [`#210`](https://github.com/nocobase/nocobase/pull/210) +- fix: collection fields sort [`#208`](https://github.com/nocobase/nocobase/pull/208) +- feat: sort in collection fields [`#207`](https://github.com/nocobase/nocobase/pull/207) +- fix Collection rest api [`#205`](https://github.com/nocobase/nocobase/pull/205) +- feat: non paged list [`#204`](https://github.com/nocobase/nocobase/pull/204) +- feat: finish calendar component develop [`#199`](https://github.com/nocobase/nocobase/pull/199) +- fix(dependencies): move json-template into original sub packages [`#203`](https://github.com/nocobase/nocobase/pull/203) +- Feat(plugin workflow): add more instructions [`#201`](https://github.com/nocobase/nocobase/pull/201) +- fix: getJsonSchema with properties [`#202`](https://github.com/nocobase/nocobase/pull/202) +- fix: postgres array operator [`#200`](https://github.com/nocobase/nocobase/pull/200) +- fix: postgres sort with appends issue [`#198`](https://github.com/nocobase/nocobase/pull/198) +- feat: uiSchema remove api [`#196`](https://github.com/nocobase/nocobase/pull/196) +- refactor: perPage to pageSize [`#197`](https://github.com/nocobase/nocobase/pull/197) +- fix: option parser test [`#195`](https://github.com/nocobase/nocobase/pull/195) +- fix: nest append [`#194`](https://github.com/nocobase/nocobase/pull/194) +- fix: test with database [`#193`](https://github.com/nocobase/nocobase/pull/193) +- fix(plugin-workflow): fix dependencies in package [`#192`](https://github.com/nocobase/nocobase/pull/192) +- Fix: plugin-workflow test [`#191`](https://github.com/nocobase/nocobase/pull/191) +- Refactor(plugin-workflow): upgrade plugin to use abstract plugin class and fix types [`#190`](https://github.com/nocobase/nocobase/pull/190) +- fix: ui schema storage [`#188`](https://github.com/nocobase/nocobase/pull/188) +- fix: ui schema storage [`#187`](https://github.com/nocobase/nocobase/pull/187) +- fix: update guard with Model instance [`#186`](https://github.com/nocobase/nocobase/pull/186) +- fix: getProperties with order [`#183`](https://github.com/nocobase/nocobase/pull/183) +- feat(server): improve application [`#177`](https://github.com/nocobase/nocobase/pull/177) +- Feature: plugin-workflow MVP [`#171`](https://github.com/nocobase/nocobase/pull/171) +- fix(root): fix dependencies in packages to avoid building errors [`#178`](https://github.com/nocobase/nocobase/pull/178) +- Application [`#175`](https://github.com/nocobase/nocobase/pull/175) +- feat: add acl plugin [`#169`](https://github.com/nocobase/nocobase/pull/169) +- add Filter component into schema componens [`#176`](https://github.com/nocobase/nocobase/pull/176) +- feat: add Markdown component into schema components [`#173`](https://github.com/nocobase/nocobase/pull/173) +- feat: table related components [`#172`](https://github.com/nocobase/nocobase/pull/172) +- feat: add select component into schema component [`#168`](https://github.com/nocobase/nocobase/pull/168) +- feat: add TreeSelect component into schema components [`#167`](https://github.com/nocobase/nocobase/pull/167) +- Plugin acl [`#166`](https://github.com/nocobase/nocobase/pull/166) +- add upload component into schema components [`#165`](https://github.com/nocobase/nocobase/pull/165) +- migrate TimePicker component into schema components [`#164`](https://github.com/nocobase/nocobase/pull/164) +- Feat/plugin UI schema v0.6 [`#143`](https://github.com/nocobase/nocobase/pull/143) +- Feat/plugin collection manager [`#147`](https://github.com/nocobase/nocobase/pull/147) +- Acl [`#162`](https://github.com/nocobase/nocobase/pull/162) +- feat: acl [`#153`](https://github.com/nocobase/nocobase/pull/153) +- feat: add InputNumber Component into schema component [`#160`](https://github.com/nocobase/nocobase/pull/160) +- feature/nocobase next password [`#159`](https://github.com/nocobase/nocobase/pull/159) +- feat: add DatePicker into schema components [`#161`](https://github.com/nocobase/nocobase/pull/161) +- feat: add input into schema component [`#158`](https://github.com/nocobase/nocobase/pull/158) +- feat: add radio into schema component [`#154`](https://github.com/nocobase/nocobase/pull/154) +- optimize: rename checkbox component file [`#155`](https://github.com/nocobase/nocobase/pull/155) +- Nocobase next color select [`#157`](https://github.com/nocobase/nocobase/pull/157) +- feat: add async-data-provider component [`#151`](https://github.com/nocobase/nocobase/pull/151) +- feat: client v0.6 [`#150`](https://github.com/nocobase/nocobase/pull/150) +- Feat/GitHub actions [`#148`](https://github.com/nocobase/nocobase/pull/148) +- feat: filter by target key [`#146`](https://github.com/nocobase/nocobase/pull/146) +- refactor: actions [`#137`](https://github.com/nocobase/nocobase/pull/137) +- feat: context field type support [`#131`](https://github.com/nocobase/nocobase/pull/131) +- feat: database next [`#130`](https://github.com/nocobase/nocobase/pull/130) +- feat: rename resourceKey & associatedKey to resourceIndex & associatedIndex [`#126`](https://github.com/nocobase/nocobase/pull/126) +- refactor: table cell text overflow that show ellipsis [`#125`](https://github.com/nocobase/nocobase/pull/125) +- Add S3 storage and refactors [`#124`](https://github.com/nocobase/nocobase/pull/124) +- Fix: plugin-file-manager [`#111`](https://github.com/nocobase/nocobase/pull/111) +- refactor: code splitting of the table component [`#121`](https://github.com/nocobase/nocobase/pull/121) +- refactor: code splitting of the table component [`#120`](https://github.com/nocobase/nocobase/pull/120) +- feat: add reset button in the filter panel [`#110`](https://github.com/nocobase/nocobase/pull/110) +- feat: allow user to change password [`#109`](https://github.com/nocobase/nocobase/pull/109) + +### Commits + +- v0.6 [`732d310`](https://github.com/nocobase/nocobase/commit/732d31009eafbded78dd35dee5d891438783ba53) +- create-nocobase-app template from [develop] [`9f4bea7`](https://github.com/nocobase/nocobase/commit/9f4bea79668643d37c2b488eb969b2c93a241026) +- feat: improve view action schema initializer [`590ca26`](https://github.com/nocobase/nocobase/commit/590ca267b27b093b67aa140c4e94fd2b97c8eeb6) + +## [v0.5.0-alpha.33](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.6...v0.5.0-alpha.33) - 2021-11-22 + +### Merged + +- fix: upgrade formily & side menu render with createPortal & use deep compare effect [`#103`](https://github.com/nocobase/nocobase/pull/103) +- fix: SchemaRenderer get schema value [`#102`](https://github.com/nocobase/nocobase/pull/102) +- fix: upgrade formily and form.setValues uses overwrite strategy [`#101`](https://github.com/nocobase/nocobase/pull/101) +- feat: support i18n [`#99`](https://github.com/nocobase/nocobase/pull/99) +- feat: new version of the documentation [`#95`](https://github.com/nocobase/nocobase/pull/95) +- option-tag style [`#92`](https://github.com/nocobase/nocobase/pull/92) +- create-nocobase-app: favicon [`#91`](https://github.com/nocobase/nocobase/pull/91) +- feat: create nocobase app with simple & quickstart option [`#87`](https://github.com/nocobase/nocobase/pull/87) +- feat: export plugin [`#73`](https://github.com/nocobase/nocobase/pull/73) + +### Commits + +- v0.5 [`2cbcd08`](https://github.com/nocobase/nocobase/commit/2cbcd087ce6629d8f0df550ee35e02065db41dbc) +- refactor [`75cd158`](https://github.com/nocobase/nocobase/commit/75cd158a270935559a9922d1dd074811253013b9) +- feat: improve code [`c6b68f2`](https://github.com/nocobase/nocobase/commit/c6b68f2b10e4e8df5257345f5e39408666c5810d) + +## [v0.4.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.5...v0.4.0-alpha.6) - 2021-04-18 + +### Merged + +- docs: add docs [`#75`](https://github.com/nocobase/nocobase/pull/75) +- refactor: use boolean value instead of null [`#74`](https://github.com/nocobase/nocobase/pull/74) + +### Commits + +- fix: improve login form styles [`5319000`](https://github.com/nocobase/nocobase/commit/5319000bd613ce9d2ac0a66f73ab403a84c5b8dd) +- fix: error message for login and registration [`214b227`](https://github.com/nocobase/nocobase/commit/214b227a6c1fe92bf54968e369aeaeabb8f73d7a) +- docs: nodejs provided by docker [`22739af`](https://github.com/nocobase/nocobase/commit/22739afa2da4dd38eda9077f5ca566cd022f4dc2) + +## [v0.4.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.2...v0.4.0-alpha.5) - 2021-04-07 + +### Commits + +- chore(versions): publish packages 0.4.0-alpha.5 [`ef93a3c`](https://github.com/nocobase/nocobase/commit/ef93a3c11c28419e1e842f73799cf005d49a5116) +- chore(versions): publish packages 0.4.0-alpha.4 [`a22efec`](https://github.com/nocobase/nocobase/commit/a22efec65d85fd15e59332d2eb6483cb84a1e619) +- chore(versions): publish packages 0.4.0-alpha.3 [`e72eebb`](https://github.com/nocobase/nocobase/commit/e72eebb8cd5e666b642030a9e268961385cc4d4d) + +## [v0.4.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.1...v0.4.0-alpha.2) - 2021-04-07 + +### Commits + +- refactor: app middlewares [`17362a8`](https://github.com/nocobase/nocobase/commit/17362a844439e5510f254195fa135b6335866ef3) +- chore(versions): publish packages 0.4.0-alpha.2 [`c2f1876`](https://github.com/nocobase/nocobase/commit/c2f18763c9e7c03a7a46edafd26b1fa884b8f272) + +## v0.4.0-alpha.1 - 2021-04-07 + +### Merged + +- fix: minor problems [`#72`](https://github.com/nocobase/nocobase/pull/72) +- Develop [`#68`](https://github.com/nocobase/nocobase/pull/68) +- Feature: plugin-china-region [`#66`](https://github.com/nocobase/nocobase/pull/66) +- Feature: filter for linkTo field [`#64`](https://github.com/nocobase/nocobase/pull/64) +- fix: make default view/tab cannot be destroyed [`#63`](https://github.com/nocobase/nocobase/pull/63) +- Feature/plugin automations [`#65`](https://github.com/nocobase/nocobase/pull/65) +- Feature/action logs [`#62`](https://github.com/nocobase/nocobase/pull/62) +- Feature/action logs [`#61`](https://github.com/nocobase/nocobase/pull/61) +- Feature/destroy lock [`#60`](https://github.com/nocobase/nocobase/pull/60) +- fix: ignore some typescript error [`#59`](https://github.com/nocobase/nocobase/pull/59) +- feat: route permissions [`#58`](https://github.com/nocobase/nocobase/pull/58) +- Feature: add permission plugin api [`#57`](https://github.com/nocobase/nocobase/pull/57) +- fix: updatedBy foreignKey [`#56`](https://github.com/nocobase/nocobase/pull/56) +- feat: add permissions plugin [`#53`](https://github.com/nocobase/nocobase/pull/53) +- fix: updatedBy field in bulkUpdate hook [`#54`](https://github.com/nocobase/nocobase/pull/54) +- test: skip bug test cases for ci passing [`#52`](https://github.com/nocobase/nocobase/pull/52) +- fix: avoid bug when update other field [`#51`](https://github.com/nocobase/nocobase/pull/51) +- feat: date-only operators [`#50`](https://github.com/nocobase/nocobase/pull/50) +- Feature field for set default [`#49`](https://github.com/nocobase/nocobase/pull/49) +- Feature: custom operators for querying [`#48`](https://github.com/nocobase/nocobase/pull/48) +- fix: toInclude bug with nested associations [`#47`](https://github.com/nocobase/nocobase/pull/47) +- feat: make single file upload to attachment available [`#46`](https://github.com/nocobase/nocobase/pull/46) +- feature: add file manager base architecture [`#44`](https://github.com/nocobase/nocobase/pull/44) +- feat: add createdBy/updatedBy field config for table managed by collections [`#43`](https://github.com/nocobase/nocobase/pull/43) +- fix: use wrapped and logic for merging filters [`#42`](https://github.com/nocobase/nocobase/pull/42) +- fix: filterByFields should return same value when input == null (close 0) [`#41`](https://github.com/nocobase/nocobase/pull/41) +- fix: Symbol property could not be iterated in for-in [`#39`](https://github.com/nocobase/nocobase/pull/39) +- Feature/sort [`#38`](https://github.com/nocobase/nocobase/pull/38) +- refactor: change sort strategy from offset to targetId [`#37`](https://github.com/nocobase/nocobase/pull/37) +- Feature/sort [`#36`](https://github.com/nocobase/nocobase/pull/36) +- feat: add filter and transaction for destroy action [`#35`](https://github.com/nocobase/nocobase/pull/35) +- fix: field filter logic for create/update [`#34`](https://github.com/nocobase/nocobase/pull/34) +- Feature: action fields options for create/update [`#32`](https://github.com/nocobase/nocobase/pull/32) +- Fix: change strategy from add to set for updateAssociations [`#33`](https://github.com/nocobase/nocobase/pull/33) +- Test/ci [`#31`](https://github.com/nocobase/nocobase/pull/31) +- feat: improve collection hooks/fields/actions/views... [`#30`](https://github.com/nocobase/nocobase/pull/30) +- Fix/model update associations [`#29`](https://github.com/nocobase/nocobase/pull/29) +- fix: database test cases and table options [`#28`](https://github.com/nocobase/nocobase/pull/28) +- feat: add virtual attribute geter & setter support [`#27`](https://github.com/nocobase/nocobase/pull/27) +- feat: collection options & hooks [`#21`](https://github.com/nocobase/nocobase/pull/21) +- feat(users): add users module [`#26`](https://github.com/nocobase/nocobase/pull/26) +- feat: add sort action [`#22`](https://github.com/nocobase/nocobase/pull/22) +- Test/list [`#19`](https://github.com/nocobase/nocobase/pull/19) +- feat: pagination options [`#20`](https://github.com/nocobase/nocobase/pull/20) +- test: refactor test in database and add more [`#17`](https://github.com/nocobase/nocobase/pull/17) +- feat: actions & views [`#18`](https://github.com/nocobase/nocobase/pull/18) +- Test cases for database [`#16`](https://github.com/nocobase/nocobase/pull/16) +- Refactor: change global injection of test for actions package. [`#15`](https://github.com/nocobase/nocobase/pull/15) +- feat: improve plugins [`#14`](https://github.com/nocobase/nocobase/pull/14) +- Doc: add README.md for server. [`#12`](https://github.com/nocobase/nocobase/pull/12) +- fix: parseRequest & registerHandlers [`#10`](https://github.com/nocobase/nocobase/pull/10) +- fix #9 [`#11`](https://github.com/nocobase/nocobase/pull/11) +- feat: support register and call partial actions [`#7`](https://github.com/nocobase/nocobase/pull/7) +- ๅ‘ๅธƒๆ ธๅฟƒๆก†ๆžถ [`#6`](https://github.com/nocobase/nocobase/pull/6) + +### Fixed + +- fix #9 (#11) [`#9`](https://github.com/nocobase/nocobase/issues/9) [`#9`](https://github.com/nocobase/nocobase/issues/9) + +### Commits + +- chore: adjust parameters [`b95e2da`](https://github.com/nocobase/nocobase/commit/b95e2da129aa49b5d8fb3e31ba8975818f7053cb) +- first commit [`e5d30b3`](https://github.com/nocobase/nocobase/commit/e5d30b30ba4dd38de764b0e5044f836f04a03706) +- style: code formatting [`ce4a22f`](https://github.com/nocobase/nocobase/commit/ce4a22fbb9b1ba9b88db1dc86609e94944f9d904) diff --git a/commitlint.config.js b/commitlint.config.js index 4fedde6da..422b19445 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1 +1 @@ -module.exports = { extends: ['@commitlint/config-conventional'] } +module.exports = { extends: ['@commitlint/config-conventional'] }; diff --git a/docs/en-US/welcome/release/index.md b/docs/en-US/welcome/release/index.md index fb2b089e7..f994e815a 100644 --- a/docs/en-US/welcome/release/index.md +++ b/docs/en-US/welcome/release/index.md @@ -1,538 +1,1614 @@ -# Release Notes - -## 2023/01/11 ~v0.9.0-alpha.1 - -### License changes - -- [Core](https://github.com/nocobase/nocobase/tree/main/packages/core) continue with [Apache 2.0](https://github.com/nocobase/nocobase/blob/main/LICENSE-APACHE-2.0) -- [Plugins](https://github.com/nocobase/nocobase/tree/main/packages/plugins) changed to [AGPL 3.0](https://github.com/nocobase/nocobase/blob/main/LICENSE-AGPL) - -### Core improvements - -- [Logging system for NocoBase](/welcome/release/logger) -- [Collection inheritance](/welcome/release/inherits) -- [Collection templates](/welcome/release/collection-templates) -- Primary key of collection is BigInt type by default -- Provide more robust ACL modules -- Association field component supports switching to a simple Select component -- Support page tabs -- Table & Kanban blocks support fixed model -- Provide more friendly association filtering -- Calendar block supports displaying lunar -- Calendar block supports configuration and deletion of duplicate schedules -- Table block horizontal scroll bar optimization, support adjust column width -- Configurable size of pop-up windows - -### New plugins - -- Data import -- Graphical interface for collections -- SSO: OIDC, SAML -- Map -- Iframe block -- Data snapshot -- Duplicator: application duplication, backup, migration -- [Formula for fields: Math Formula and Excel Formula](/welcome/release/formulas) - -### Other plugin optimizations - -- Collection configuration - - Support for filtering - - Support for define the title field - - Support for classification -- Workflow - - Fix trigger fetching function - - Front-end refactoring and plugin independence - - Fix the execution history loading problem - - Optimize the execution process by no longer using the same transaction after the execution of the data table trigger - - New scheduler and trigger cache are added to solve the concurrency problem by queue execution - - Fix the problem of timed task end time component - - Fix the problem of timed task skipping seconds - - Support workflow-level duplication - - Refactor the data structure of context and node variables -- Captcha - - New captcha configuration panel -- Files Manager - - Fix local storage static file service middleware - - Local storage empty baseUrl configuration fault tolerance handling -- Auto Numbering - - Refactor to record sequence by data table - - Add configurations that can be entered and matched with rules - - Fix generating numbers not less than the configured starting value - -## 2022/10/31 ~ v0.8.0-alpha.1 - -- Starting with v0.8, NocoBase begins to provide an available plugin manager and development documentation. -- [Check out the main changes in v0.8](/welcome/release/v08-changelog) - -## 2022/10/26 ~ v0.7.7-alpha.1 - -- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save ([#962](https://github.com/nocobase/nocobase/issues/962)) -- feat(file-manager): support tencent cos ([#958](https://github.com/nocobase/nocobase/issues/958)) -- fix(plugin-workflow): fix constant schedule trigger time ([#956](https://github.com/nocobase/nocobase/issues/956)) - -## 2022/10/24 ~ v0.7.6-alpha.2 - -- Turkish language ([#939](https://github.com/nocobase/nocobase/issues/939)) -- refactor(plugin-file-manager): move client code into plugin folder and enable path config ([#913](https://github.com/nocobase/nocobase/issues/913)) -- feat: add filter action to collection table ([#953](https://github.com/nocobase/nocobase/issues/953)) -- feat: ui schema cache ([#877](https://github.com/nocobase/nocobase/issues/877)) -- feat: docker optimizing ([#948](https://github.com/nocobase/nocobase/issues/948)) -- fix(plugin-workflow): test changedWithAssociations() ([#950](https://github.com/nocobase/nocobase/issues/950)) -- fix(plugin-workflow): skip time based test ([#951](https://github.com/nocobase/nocobase/issues/951)) -- fix(plugin-workflow): fix schedule trigger bug ([#949](https://github.com/nocobase/nocobase/issues/949)) -- feat: changed with associations ([#943](https://github.com/nocobase/nocobase/issues/943)) -- feat(useSignup): customize success message -- fix(plugin-workflow): fix collection fieldset component ([#942](https://github.com/nocobase/nocobase/issues/942)) -- fix(plugin-workflow): avoid revision with ghost nodes ([#941](https://github.com/nocobase/nocobase/issues/941)) -- fix(plugin-workflow): add req context to processor ([#936](https://github.com/nocobase/nocobase/issues/936)) -- Feat/plugin workflow collection field ([#934](https://github.com/nocobase/nocobase/issues/934)) -- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set ([#926](https://github.com/nocobase/nocobase/issues/926)) -- fix(plugin-workflow): temp disable validation of collection field in node ([#928](https://github.com/nocobase/nocobase/issues/928)) - -## 2022/10/16 ~ v0.7.5-alpha.1 - -- Optimized query performance for relational fields -- Added support for mobile phone number registration and login -- Sequence field type -- Added Japanese and Russian translations -- The page layout supports drag and drop to adjust the column width -- Fixed several bugs - -### Details - -- feat: plugin workflow collection field ([#919](https://github.com/nocobase/nocobase/issues/919)) -- fix(client/route-switch): skip sub routes -- feat: create with array of values ([#912](https://github.com/nocobase/nocobase/issues/912)) -- fix: unbind on error throwing ([#914](https://github.com/nocobase/nocobase/issues/914)) -- fix: appends merge now using primary key ([#911](https://github.com/nocobase/nocobase/issues/911)) -- fix: cannot read properties of undefined (reading 'target') -- feat: limit database identifier ([#908](https://github.com/nocobase/nocobase/issues/908)) -- fix: sync collection field default value ([#907](https://github.com/nocobase/nocobase/issues/907)) -- fix: version judgment is not accurate -- fix(client): tab pane initializers for create form block -- fix: build error -- fix: appends merge includes ([#905](https://github.com/nocobase/nocobase/issues/905)) -- fix: single relation repository appends query issue ([#901](https://github.com/nocobase/nocobase/issues/901)) -- feat(plugin-workflow): add concat calculator (#894) -- feat: improve signin and signup page components -- fix(client/record-picker): support record-picker show format DataPicker (#888) -- fix(client/block-select-collection): fix select collection menu view error (#889) -- fix: unable to submit form during file upload (#892) -- feat(collection-manager): inverse fields can be configured (#883) -- fix(database): fix the index name too long error -- fix(formula): support integer and fix NaN error (#879) -- fix: sort parameter is missing (#849) -- fix: slow join query issued by appends field in find method of repository (#845) -- feat(core/cache): support cache (#876) -- feat: update option must have filter or filterByTk (#847) -- added Russian translation (#840) -- feat(database): add sequence field type (#779) -- fix: can't access pages without permission via url (#826) -- fix(collection-manger): incorrect scope key parameter -- fix: missing RefreshActionInitializer -- fix(collection-manager): o2m is array type -- fix(plugin-system-settings): convert array to json -- fix: transaction cannot be rolled back because it has been finished with state: rollback -- fix(plugin-export): filter non-existent fields -- refactor(resourcer): combine middleware class ([#825](https://github.com/nocobase/nocobase/issues/825)) -- refactor(database): fix some fields and types ([#820](https://github.com/nocobase/nocobase/issues/820)) -- feat: language settings support Japanese -- feat(locale): added Japanese translation ([#813](https://github.com/nocobase/nocobase/issues/813)) -- fix(plugin-workflow): fix value type for DatePicker to moment ([#815](https://github.com/nocobase/nocobase/issues/815)) ([#819](https://github.com/nocobase/nocobase/issues/819)) -- refactor(plugin-workflow): export client calculators registry ([#816](https://github.com/nocobase/nocobase/issues/816)) -- fix: number storage type changed to double ([#810](https://github.com/nocobase/nocobase/issues/810)) -- refactor(server) ([#795](https://github.com/nocobase/nocobase/issues/795)) -- fix(plugin-verification): change provider rate limit error to 429 ([#788](https://github.com/nocobase/nocobase/issues/788)) -- fix(plugin-cm): fix field disappear after failed to update ([#773](https://github.com/nocobase/nocobase/issues/773)) -- fix: fix uiSchema undefined ([#770](https://github.com/nocobase/nocobase/issues/770)) -- fix: translation -- fix(plugin-cm): fix unique option default value to update ([#768](https://github.com/nocobase/nocobase/issues/768)) -- fix(plugin-users): fix update profile 500 ([#766](https://github.com/nocobase/nocobase/issues/766)) ([#767](https://github.com/nocobase/nocobase/issues/767)) -- fix: mysql column in where clause is ambiguous ([#756](https://github.com/nocobase/nocobase/issues/756)) -- feat(plugin-cm): add unique option for base fields ([#745](https://github.com/nocobase/nocobase/issues/745)) -- feat(plugin-verification): add plugin-verification and phone for users ([#722](https://github.com/nocobase/nocobase/issues/722)) -- feat: resize grid columns with drag and drop ([#748](https://github.com/nocobase/nocobase/issues/748)) -- refactor(client): split schema-initializer items into multiple files ([#744](https://github.com/nocobase/nocobase/issues/744)) -- refactor(plugin-workflow): change files mode to 644 ([#755](https://github.com/nocobase/nocobase/issues/755)) -- fix: db version check ([#749](https://github.com/nocobase/nocobase/issues/749)) -- feat: add examples ([#718](https://github.com/nocobase/nocobase/issues/718)) - -## 2022/08/15 ~ v0.7.4-alpha.7 - -### Details - -- fix(collection-manager): update collection without fields - -## 2022/08/12 ~ v0.7.4-alpha.4 - -### New features - -- Field default value - -### Details - -- fix(database): error getting db version number -- fix: record provider required for read pretty -- fix: sync table sort to export (#723) -- feat: full version of the NocoBase dockerfile (#719) -- feat: add examples -- chore: update node ci -- fix(plugin-workflow): fix extend collection (#708) -- fix: DB_TABLE_PREFIX doesn't get applied (#710) -- feat: default value (#679) -- fix: required field delete submit error (#688) (#694) - -## 2022/07/28 ~ v0.7.4-alpha.1 - -### Details - -- fix: append roles to current user (#695) -- fix(client): required for the sub-table field -- fix: date format (#686) -- test(plugin-workflow): skip prompt tests (#692) -- fix: accuracy of percent (#685) -- fix: the database only supports MySQL 8.0.17 and above, SQLite 3.x and PostgreSQL 10+ -- fix(plugin-workflow): adjust await sleep time for test cases (#691) -- feat(plugin-workflow): add assignees config for prompt instruction (#690) -- fix: role export button display (#616) (#666) -- fix: uid validate (#681) -- feat(client): tab icon -- fix(plugin-error-handler): no error message -- fix(client): fieldNames of RecordPicker -- fix: hide password -- refactor: replace react-drag-listview with @dnd-kit/sortable (#660) -- refactor(plugin-users): improve extendibility of middlewares (#677) -- feat: o2m delete not refresh (#646) -- feat: kanban add description (#659) -- fix: field loss enum (#667) -- feat: add ui editor hot key Ctrl+Shift+U (#675) -- fix: calendar change field error (#626) (#671) -- chore: fix eslint not work (#670) -- feat: number precision (#661) -- feat: nginx config (#664) -- feat: form item designer form switch issue (#656) -- fix: wrong operator - -## 2022/07/20 ~ v0.7.3-alpha.1 - -### New features - -- Form validation -- Actions: Print, Refresh - -### Details - -- fix(client): hide modal header -- feat: customizable jwt expiration date -- feat: print action (#652) -- feat: restore action-hooks (#655) -- feat: collections & fields pagination issue (#653) -- fix(core): change proxied agent methods to native (#654) -- feat: remove table field details actions (#638) -- fix: link to default value (#641) -- fix(client): build error -- fix: localStorage is not defined -- feat: support for displaying relational table fields in details or form blocks (#635) -- fix: record picker cannot select from different pages (#623) -- feat(client): plugin toolbar icons and translations -- fix: dragging an element to the left, right, or bottom would cause the element to disappear (#620) -- feat: table action add reload button (#630) -- feat: improve language settings (#627) -- feat: field assignment for custom actions supports string variables (#597) -- fix(client): blocks are deleted when they are dragged below the current block -- fix: skip recursive remove on grid component (#621) -- feat: fix time and collection pagination (#618) -- feat: recordblockinitializers fields pick (#558) -- fix: incorrectly :active background (#607) -- fix: obo table selector (#613) -- feat: form validator (#569) -- fix: table selector (#612) - -## 2022/07/07 ~ v0.7.2-alpha.2 - -- fix(g2plot): import all plots -- fix: field permissions cannot be saved (#605) -- fix(plugin-workflow): fix revision bug (#603) -- fix(plugin-workflow): fix select value (#600) -- fix(plugin-workflow): fix CollectionFieldSelect component (#598) -- feat(plugin-workflow): add association select in calculation (#584) -- feat: function for chart data request -- fix(cli): remove process.env.NODE_OPTIONS - -## 2022/07/05 ~ v0.7.2-alpha.1 - -### New features - -- Fields: Integer field -- Blocks: Display fields of relational collections in blocks -- Plugins: Filter conditions support variables - -### Breaking changes - -- New version does not create foreign key constraints by default, old version will delete all created foreign key constraints after upgrade -- If you installed NocoBase using yarn create before, you need to yarn create again and then execute `yarn nocobase upgrade --raw` - -### Details - -- fix: drop all foreign keys (#576) -- fix(plugin-workflow): fix collection trigger config (#575) -- fix: improve filter item styling -- fix(collection-manager): missing collection manager context -- feat: filter with variable (#574) -- feat(cli): check database version before installation (#572) -- fix(client): comment out useless code -- fix(cli): app start before sync and upgrade -- feat(client): integer field -- fix(database): index invalid (#564) -- fix: export association table data (#561) -- fix(client): maximum call stack size exceeded (#554) -- refactor(plugin-workflow): move client files into plugin (#556) -- fix(database): constraints default to false (#550) -- fix(client): cannot read properties of undefined (reading 'split') -- fix(workflow): merge workflow providers -- fix(workflow): load workflow after application initialization -- fix(plugin-workflow): fix select width (#552) -- feat: compatible with old kanban (#553) -- fix(client): consider explicitly re-exporting to resolve the ambiguity -- feat: display association fields (#512) -- Fix(plugin workflow) (#549) -- fix: update mysql port (#548) -- fix: export of relation blocks (#546) -- fix(plugin-workflow): clear options when change collection (#547) -- feat(plugin-workflow): add race mode (#542) -- fix(client): change toArr to _.castArray in select component (#543) - -## 2022/06/26 ~ v0.7.1-alpha.7 - -### New features - -- Fields: Formulaใ€Relationships(o2o, o2m, m2o, m2m) -- Blocks: Charts(g2plot) -- Plugins: Audit logs, Export, Workflow(schedule trigger) - -### Breaking changes - -- The percentage field stores the original value. For example, the old version stored 1% as 1 and the new version stores 1% as 0.01 -- Remove sub-table field and replace it with one-to-many relationship -- If the NocoBase application was previously installed using yarn create, you need to yarn create again, and then execute yarn nocobase upgrade - -### Details - -- fix(cli): upgrade from docker -- chore(create-nocobase-app): fix some bugs (#538) -- feat: relationship fields are loaded on demand -- fix: destroy collection fields (#536) -- feat(plugin-workflow): add delay node type (#532) -- refactor: client application (#533) -- fix: missing transaction (#531) -- fix: add ellipsis property to record picker (#527) -- fix: remove pattern without form item (#528) -- fix(client): update only fields in the form -- fix(client): remove z-index -- fix(plugin-workflow): set current when update (#526) -- fix(client): non-empty judgment -- fix: order nulls last (#519) -- fix(client): close the pop-up after request -- fix: action loading, refresh context, form submit and validate (#523) -- fix: field pattern (#520) -- fix(plugin-workflow): fix searchable select min-width (#524) -- fix: template with fields only (#517) -- fix(plugin-workflow): fix update workflow current property (#521) -- feat: improve chart component -- refactor(plugin-workflow): abstract to classes (#515) -- feat: column sortable and form item pattern (#518) -- feat(client): display option value -- feat(client): hide drawer header -- fix(audit-logs): operator does not exist: character varying = integer -- fix(custom-request): support string/json templates (#514) -- fix(cli): missing await -- feat: add block title (#513) -- fix: remove collections & fields from db (#511) -- fix(cli): upgrade error in node v14 -- feat: improve migrations (#510) -- fix(client): improve datepicker component, date with time zone, gmt support -- fix: datepicker with timezone -- fix(client): consolidate usage of date/time as UTC in transfering (#509) -- fix: formula bug -- fix: default exportable fields (#506) -- fix(audit-logs): sort by createdAt -- fix(plugin-export): allow to configure in acl -- fix: sign in/sign up with enter key -- fix(client): percent precision -- feat: association field block (#493) -- feat: plugin export (#479) -- fix: create or delete collection error (#501) -- feat: update collections & fields (#500) -- fix: rollback when field creation fails (#498) -- fix(client): set `dropdownMatchSelectWidth` to false globally (#497) -- fix(client): no-key warning in user menu items (#496) -- Feat(plugin workflow): cron field for schedule trigger configuration (#495) -- feat: audit logs (#494) -- fix(client): language settings -- feat(client): improve locale -- refactor(plugin-workflow): add revision column to execution (#491) -- fix(plugin-multi-app-manager): fix pg cannot create database block tests -- refactor(database): hook proxy (#402) -- feat: chart blocks (#484) -- refactor(plugin workflow): support number in repeat config for schedule -- chore(debug): add debug config (#475) -- fix: has one bug -- feat: relationships (#473) -- fix(plugin-workflow): fix collection trigger transaction (#474) -- fix(plugin-workflow): temporary solution for collection trigger conditions -- fix: markdown component (#469) -- fix: formula field and percent field (#467) -- fix(plugin-workflow): fix update workflow action (#464) -- fix(acl): skip when field does not exist -- fix: update formula field and percent field (#461) -- fix(client): export useSignin and useSignup -- fix(ci): node_version = 14 -- fix(cli): yarn install --production error -- fix(client): build error -- feat: add formula field type (#457) -- fix: the details of the associated data in the subtable are not displayed -- fix(plugin-workflow): fix languages (#451) -- fix: afterSync hook not triggered (#450) - -## 2022/06/01 ~ v0.7.0-alpha.83 - -- fix: default value of time zone -- fix(database): add timezone support -- docs(various): Improve readability (#447) -- fix(client): datetime with timezone -- feat(plugin-file-manager): record the creator of the attachment -- feat: custom request (#439) -- feat(plugin workflow): schedule trigger (#438) -- feat(database): db migrator (#432) -- fix(client): select component cannot be opened in sub-table block (#431) -- fix: error message "error:0308010C:digital envelope routines::unsupported -- docs(github): change to markdown format (#430) -- fix(cli): typo (#429) - -### New Features - -- Core: db migrator - -## 2022/05/26 ~ v0.7.0-alpha.82 - -- feat(client,sdk): improve api client - -### Breaking changes - -There are major changes to the `APIClient` API, see details [JavaScript SDK](./development/http-api/javascript-sdk.md) - -## 2022/05/25 ~ v0.7.0-alpha.81 - -- feat: add create-plugin command (#423) -- fix: "typescript": "4.5.5" -- docs: update documentation -- fix(client): filter menu item schema by permissions -- fix(database): cannot read properties of null (reading 'substring') -- fix(client): add description -- fix(client): clone schema before insert -- feat(client): add a description to the junction collection field -- fix(devtools): unexpected token '.' - -## 2022/05/24 ~ v0.7.0-alpha.78 - -- fix(client): add RemoteDocumentTitleProvider -- fix(client): incomplete calendar events -- fix(plugin-users): add translations (#416) - -## 2022/05/23 ~ v0.7.0-alpha.59 - -- feat(docs): add alert message -- fix(create-nocobase-app): storage path error -- fix(client): improve translation -- fix(cli): nocobase test command --db-clean option is invalid -- refactor(plugin-workflow): change column type of executed from boolean to integer (#411) - -## 2022/05/22 ~ v0.7.0-alpha.58 - -- fix: 204 no content response (#378) -- feat: destroy association field after target collection destroy (#376) -- fix(type): use sequelize native Transactionable instead of TransactionAble (#410) -- fix(plugin-workflow): remove previous listeners when collection changed in config (#409) -- fix(plugin-acl): missing pagination parameters (#394) -- feat(client): add custom action (#396) -- refactor(plugin-workflow): multiple instances and event management (fix #384) (#408) -- feat(cli): --db-sync options -- fix(client): pagination dropdown menu is blocked (#398) -- feat: display version number (#386) -- fix: missing isTruly/isFalsy filter operators (#390) -- fix(client): reset page number to first page (#399) - -## 2022/05/19 ~ v0.7.0-alpha.57 - -### New features -- Packaging tool `@nocobase/build` -- CLI `@nocobase/cli` -- devtools `@nocobase/devtools` -- JavaScript SDK `@nocobase/sdk` -- Documents(v0.7) - -### Bug fixes & improvements -- `@nocobase/preset-nocobase` -- create scaffolding `create-nocobase-app` -- Documents theme `dumi-theme-nocobase` - -### Breaking changes - -๐Ÿ“ข Previously created projects need to be recreated. - -## 2022/05/14 ~ v0.7.0-alpha.34 - -- feat: add plugins:getPinned action api -- fix(plugin workflow): cannot get job result properties (#382) -- feat: exist on server start throw error (#374) -- chore: application options (#375) -- fix: not in operator with null value record (#377) +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +## [v0.9.2-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.2-alpha.1...v0.9.2-alpha.2) - 2023-04-19 + +### Merged + +- fix: press enter to reload when the Pagination is focused [`#1720`](https://github.com/nocobase/nocobase/pull/1720) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.2-alpha.2 [`3dfd5a1`](https://github.com/nocobase/nocobase/commit/3dfd5a1f7a3ff14606357f441f547f40fdaa1344) + +## [v0.9.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.9.1-alpha.2...v0.9.2-alpha.1) - 2023-04-19 + +### Merged + +- refactor(plugin-workflow): change single form to custom form block [`#1707`](https://github.com/nocobase/nocobase/pull/1707) +- chore(ci): add timeout config for jobs [`#1725`](https://github.com/nocobase/nocobase/pull/1725) +- refactor(plugin-workflow): migrate menu items to options [`#1724`](https://github.com/nocobase/nocobase/pull/1724) +- fix(client): fix error on clear value in variable input [`#1723`](https://github.com/nocobase/nocobase/pull/1723) +- fix(record-picker): fix the table paging problem [`#1718`](https://github.com/nocobase/nocobase/pull/1718) +- fix(map-plugin): some data is incorrect [`#1717`](https://github.com/nocobase/nocobase/pull/1717) +- fix: data scope not effect in gantt [`#1716`](https://github.com/nocobase/nocobase/pull/1716) +- fix: button loading does not disappear when the operation submit failed [`#1698`](https://github.com/nocobase/nocobase/pull/1698) +- fix(linkage rule):multiple select condition judgment failed [`#1715`](https://github.com/nocobase/nocobase/pull/1715) +- Fix/save through table data [`#1714`](https://github.com/nocobase/nocobase/pull/1714) +- feat: improve ui design for linkage action [`#1659`](https://github.com/nocobase/nocobase/pull/1659) +- feat(map): support to filter other blocks [`#1691`](https://github.com/nocobase/nocobase/pull/1691) +- refactor: improve linkage rule enable [`#1700`](https://github.com/nocobase/nocobase/pull/1700) +- fix: find fields arg [`#1710`](https://github.com/nocobase/nocobase/pull/1710) +- feat(form-block): data templates [`#1704`](https://github.com/nocobase/nocobase/pull/1704) +- fix: linkage relationship data condition judgment failed [`#1681`](https://github.com/nocobase/nocobase/pull/1681) +- fix(gantt): update permission check in gantt block [`#1701`](https://github.com/nocobase/nocobase/pull/1701) +- fix: clearFormGraph [`#1706`](https://github.com/nocobase/nocobase/pull/1706) +- fix(plugin-workflow): fix request body variable component [`#1703`](https://github.com/nocobase/nocobase/pull/1703) +- fix(gantt): improve task bar text [`#1696`](https://github.com/nocobase/nocobase/pull/1696) +- fix: long text should be line feed [`#1686`](https://github.com/nocobase/nocobase/pull/1686) +- fix: cannot display data when remove last page and the page only just one item [`#1685`](https://github.com/nocobase/nocobase/pull/1685) +- fix: meta acl with association query [`#1695`](https://github.com/nocobase/nocobase/pull/1695) +- fix: linkage rule title can not set empty [`#1688`](https://github.com/nocobase/nocobase/pull/1688) +- feat: improve plugin manager ui [`#1650`](https://github.com/nocobase/nocobase/pull/1650) +- feat: gantt block [`#1393`](https://github.com/nocobase/nocobase/pull/1393) +- fix(client): fix constant input lose focus in variable [`#1689`](https://github.com/nocobase/nocobase/pull/1689) +- feat(plugin-workflow): add workflow specific logger [`#1677`](https://github.com/nocobase/nocobase/pull/1677) +- fix: remove designer [`#1684`](https://github.com/nocobase/nocobase/pull/1684) +- test: should load the .env.test [`#1678`](https://github.com/nocobase/nocobase/pull/1678) +- fix: incorrect language after logout [`#1679`](https://github.com/nocobase/nocobase/pull/1679) +- feat: optimize file collection [`#1666`](https://github.com/nocobase/nocobase/pull/1666) +- fix: sort field init performance [`#1675`](https://github.com/nocobase/nocobase/pull/1675) +- fix(plugin-workflow): fix null collection fields [`#1674`](https://github.com/nocobase/nocobase/pull/1674) +- fix(client): fix variable component read pretty mode [`#1673`](https://github.com/nocobase/nocobase/pull/1673) +- fix: ui problem of compact theme [`#1670`](https://github.com/nocobase/nocobase/pull/1670) +- fix: linkage rule enable effect in form [`#1669`](https://github.com/nocobase/nocobase/pull/1669) +- feat: collection template summary [`#1672`](https://github.com/nocobase/nocobase/pull/1672) +- feat: (plugin-workflow) dynamic expression [`#1560`](https://github.com/nocobase/nocobase/pull/1560) +- chore: find inherit collection warn [`#1663`](https://github.com/nocobase/nocobase/pull/1663) +- fix: linkage rule title config clear exception [`#1665`](https://github.com/nocobase/nocobase/pull/1665) +- feat: support tableoid filter [`#1657`](https://github.com/nocobase/nocobase/pull/1657) +- feat(plugin-workflow): add array mapping support in processor [`#1662`](https://github.com/nocobase/nocobase/pull/1662) +- fix(plugin-workflow): fix appends null to collection trigger [`#1661`](https://github.com/nocobase/nocobase/pull/1661) +- feat(filter-operators): eq and ne operators support array [`#1658`](https://github.com/nocobase/nocobase/pull/1658) +- fix(plugin-workflow): fix todo drawer data load [`#1656`](https://github.com/nocobase/nocobase/pull/1656) +- refactor(client): improve translation [`#1654`](https://github.com/nocobase/nocobase/pull/1654) +- fix: fix the 'Add menu item' button disappears [`#1655`](https://github.com/nocobase/nocobase/pull/1655) +- chore: add new allowAddtoCurrent config [`#1652`](https://github.com/nocobase/nocobase/pull/1652) +- feat: support file collection [`#1636`](https://github.com/nocobase/nocobase/pull/1636) +- fix(plugin-workflow): fix manual node drawer [`#1653`](https://github.com/nocobase/nocobase/pull/1653) +- chore: inhertis api with difference schema [`#1545`](https://github.com/nocobase/nocobase/pull/1545) +- fix: select record can not enable child collection [`#1649`](https://github.com/nocobase/nocobase/pull/1649) +- feat: plugin before enable hook [`#1648`](https://github.com/nocobase/nocobase/pull/1648) +- chore: add transaction in set field action [`#1647`](https://github.com/nocobase/nocobase/pull/1647) +- fix(linkage rule):linkage rule not display in action [`#1644`](https://github.com/nocobase/nocobase/pull/1644) +- refactor: view collection options [`#1643`](https://github.com/nocobase/nocobase/pull/1643) +- fix: update field error [`#1645`](https://github.com/nocobase/nocobase/pull/1645) +- feat(Table): column action support linkage rules [`#1638`](https://github.com/nocobase/nocobase/pull/1638) +- fix(view-collection): field name cannot be edited when there with field source [`#1642`](https://github.com/nocobase/nocobase/pull/1642) +- fix: linkage rule config closing rules require reopening the form to take effect [`#1640`](https://github.com/nocobase/nocobase/pull/1640) +- refactor(client): change Variable.TextArea to controlled component [`#1605`](https://github.com/nocobase/nocobase/pull/1605) +- fix: get pg view def [`#1641`](https://github.com/nocobase/nocobase/pull/1641) +- fix: infer view column type with alias [`#1634`](https://github.com/nocobase/nocobase/pull/1634) +- fix(plugin-workflow): fix minors ui issues [`#1635`](https://github.com/nocobase/nocobase/pull/1635) +- chore: disabled underscored in view collection. [`#1633`](https://github.com/nocobase/nocobase/pull/1633) +- fix: form action dragging area is too large [`#1628`](https://github.com/nocobase/nocobase/pull/1628) +- fix: FixedBlock related ui [`#1632`](https://github.com/nocobase/nocobase/pull/1632) +- feat: database view collection [`#1587`](https://github.com/nocobase/nocobase/pull/1587) +- fix: init sort value in sort field with scopeKey [`#1626`](https://github.com/nocobase/nocobase/pull/1626) +- style: linkage rule style improve [`#1625`](https://github.com/nocobase/nocobase/pull/1625) +- fix: find with attributes and group [`#1411`](https://github.com/nocobase/nocobase/pull/1411) +- docs: transform video link to video tag [`#1414`](https://github.com/nocobase/nocobase/pull/1414) +- feat(parse-variables): support to parse variables in filter params [`#1558`](https://github.com/nocobase/nocobase/pull/1558) +- fix(linkage rules) : support naming, enabling and disabling, copying, and assigning null values [`#1511`](https://github.com/nocobase/nocobase/pull/1511) +- chore: update test ci [`#1622`](https://github.com/nocobase/nocobase/pull/1622) +- fix: history add new button does not support enabling child collection [`#1536`](https://github.com/nocobase/nocobase/pull/1536) +- fix/(linkages-action): detail block actions does not support linkage rules [`#1504`](https://github.com/nocobase/nocobase/pull/1504) +- fix: avoid fixedblock height working in popup [`#1621`](https://github.com/nocobase/nocobase/pull/1621) +- fix: when the page has FixedBlock, the table of popup is not displayed [`#1619`](https://github.com/nocobase/nocobase/pull/1619) +- feat: association-filter-improve [`#1606`](https://github.com/nocobase/nocobase/pull/1606) +- fix(Table): cannot display table data [`#1617`](https://github.com/nocobase/nocobase/pull/1617) +- fix(plugin-workflow): fix todo list form read-pretty for non-assigneed user [`#1615`](https://github.com/nocobase/nocobase/pull/1615) +- feat(table): hidden pagination when only one page is available [`#1614`](https://github.com/nocobase/nocobase/pull/1614) +- refactor: improve FixedBlock performance [`#1593`](https://github.com/nocobase/nocobase/pull/1593) +- fix(collection-manager): infinite recursion [`#1608`](https://github.com/nocobase/nocobase/pull/1608) +- fix(audit-logs): Add ellipsis feature to table columns [`#1603`](https://github.com/nocobase/nocobase/pull/1603) +- feat: improve the non-link ui of association data [`#1602`](https://github.com/nocobase/nocobase/pull/1602) +- feat(Kanban): the card support open mode [`#1601`](https://github.com/nocobase/nocobase/pull/1601) +- fix( importable-field): incorrect display when moving sort handle [`#1613`](https://github.com/nocobase/nocobase/pull/1613) +- fix: enable child collections remain after deleting a child collection [`#1610`](https://github.com/nocobase/nocobase/pull/1610) +- fix: destroy through table record referencing collections table [`#1611`](https://github.com/nocobase/nocobase/pull/1611) +- fix(plugin-workflow): add default actions value of manual node [`#1600`](https://github.com/nocobase/nocobase/pull/1600) +- feat(plugin-workflow): add failOnEmpty option for query node [`#1599`](https://github.com/nocobase/nocobase/pull/1599) +- fix(plugin-workflow): use toJSON instead of get to get valid result [`#1596`](https://github.com/nocobase/nocobase/pull/1596) +- Translation pt-BR (Brazilian Portuguese) [`#1591`](https://github.com/nocobase/nocobase/pull/1591) +- fix: role permission add new scope display blank [`#1592`](https://github.com/nocobase/nocobase/pull/1592) +- fix(FixedBlock): avoid kanban triggering programmatic scrolling [`#1406`](https://github.com/nocobase/nocobase/pull/1406) +- fix: repeat request categories when switching between graph interface and collection&fields [`#1590`](https://github.com/nocobase/nocobase/pull/1590) +- fix: collectionFieldsOptions cannot get all fields [`#1588`](https://github.com/nocobase/nocobase/pull/1588) +- fix(plugin-workflow): fix input width in request node config [`#1585`](https://github.com/nocobase/nocobase/pull/1585) +- feat(filter-blocks): support filter-blocks [`#1505`](https://github.com/nocobase/nocobase/pull/1505) +- refactor: multi-app [`#1578`](https://github.com/nocobase/nocobase/pull/1578) +- feat: compact theme [`#1574`](https://github.com/nocobase/nocobase/pull/1574) +- feat: support cron field [`#1421`](https://github.com/nocobase/nocobase/pull/1421) +- fix(Calendar): ensur to get correct gridInitializer when adding a newโ€ฆ [`#1425`](https://github.com/nocobase/nocobase/pull/1425) +- feat(markdown): support mermaid and better style [`#1583`](https://github.com/nocobase/nocobase/pull/1583) +- fix(plugin-map): map block repeats [`#1582`](https://github.com/nocobase/nocobase/pull/1582) +- feat: tree collection [`#1561`](https://github.com/nocobase/nocobase/pull/1561) +- feat(plugin-map): add map block [`#1486`](https://github.com/nocobase/nocobase/pull/1486) +- chore: lazy load sub app in share collection [`#1569`](https://github.com/nocobase/nocobase/pull/1569) +- fix(record-picker): supports adding sub-collection records [`#1573`](https://github.com/nocobase/nocobase/pull/1573) +- fix: app manager reload [`#1565`](https://github.com/nocobase/nocobase/pull/1565) +- feat: multi-app-share-collection plugin [`#1562`](https://github.com/nocobase/nocobase/pull/1562) +- feat: record picker support to enable links [`#1515`](https://github.com/nocobase/nocobase/pull/1515) +- feat: multiple apps [`#1540`](https://github.com/nocobase/nocobase/pull/1540) +- docs(client): add variable docs [`#1556`](https://github.com/nocobase/nocobase/pull/1556) +- fix(charts): improve chart table preview with object type [`#1555`](https://github.com/nocobase/nocobase/pull/1555) +- feat(plugin-workflow) config preload associations in triggers and nodes [`#1548`](https://github.com/nocobase/nocobase/pull/1548) + +### Fixed + +- fix(plugin-workflow): fix todo list form read-pretty for non-assigneed user (#1615) [`#1572`](https://github.com/nocobase/nocobase/issues/1572) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.2-alpha.1 [`d1adc9d`](https://github.com/nocobase/nocobase/commit/d1adc9de0b87b896e90c81c226646b840309c240) +- fix(file-manager): upgrade s3 version [`50183b0`](https://github.com/nocobase/nocobase/commit/50183b065d32be5d2f6590bfb0c6190fafc12881) +- fix: linkage rule [`b8776fe`](https://github.com/nocobase/nocobase/commit/b8776fe2d0fd6729c18b968d9f7b15e7c81c4ef2) + +## [v0.9.1-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.1-alpha.1...v0.9.1-alpha.2) - 2023-03-09 + +### Merged + +- fix(plugin-workflow): fix module import (#1550) [`#1552`](https://github.com/nocobase/nocobase/pull/1552) +- chore: relation repository response when source model not found [`#1546`](https://github.com/nocobase/nocobase/pull/1546) +- fix(plugin-workflow): fix assignees config component in manual node [`#1547`](https://github.com/nocobase/nocobase/pull/1547) +- feat: stopped state in application [`#1543`](https://github.com/nocobase/nocobase/pull/1543) +- fix(plugin-workflow): fix AssociationInput field path [`#1542`](https://github.com/nocobase/nocobase/pull/1542) +- fix: cache with index.html [`#1541`](https://github.com/nocobase/nocobase/pull/1541) +- fix: belongs to many through table with custom schema [`#1539`](https://github.com/nocobase/nocobase/pull/1539) +- fix(plugin-formula): expose formula field result in form [`#1534`](https://github.com/nocobase/nocobase/pull/1534) +- test: with collection_manager_schema env [`#1532`](https://github.com/nocobase/nocobase/pull/1532) +- fix: filter by association field with underscored [`#1537`](https://github.com/nocobase/nocobase/pull/1537) +- fix(charts): fix copy [`#1533`](https://github.com/nocobase/nocobase/pull/1533) +- feat: add chart plugin [`#1477`](https://github.com/nocobase/nocobase/pull/1477) +- feat: support add new in block for inheritance collection [`#1518`](https://github.com/nocobase/nocobase/pull/1518) +- refactor(plugin-workflow): change canvas card and adjust styles [`#1529`](https://github.com/nocobase/nocobase/pull/1529) +- fix: test with nocobase plugin [`#1525`](https://github.com/nocobase/nocobase/pull/1525) +- fix: nginx cache [`#1523`](https://github.com/nocobase/nocobase/pull/1523) +- fix: remove field when collection has difference schema with database [`#1524`](https://github.com/nocobase/nocobase/pull/1524) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.1-alpha.2 [`bc5156d`](https://github.com/nocobase/nocobase/commit/bc5156d458adecce8189aa535e5738672e63c2c0) +- fix: add new blocks [`3904aa7`](https://github.com/nocobase/nocobase/commit/3904aa7c111eaa522cc7072a268a579aa115906e) +- fix: schema name conflicts [`a463c3d`](https://github.com/nocobase/nocobase/commit/a463c3d747666496721571110bd77dba3726c2f7) + +## [v0.9.1-alpha.1](https://github.com/nocobase/nocobase/compare/v0.9.0-alpha.2...v0.9.1-alpha.1) - 2023-03-03 + +### Merged + +- refactor: audit logs block [`#1517`](https://github.com/nocobase/nocobase/pull/1517) +- fix(evaluators): fix preprocessing and add test cases [`#1519`](https://github.com/nocobase/nocobase/pull/1519) +- chore(debug): fix debug filename when run test [`#1520`](https://github.com/nocobase/nocobase/pull/1520) +- feat: collection manager schema env [`#1506`](https://github.com/nocobase/nocobase/pull/1506) +- fix(client): fix checkbox unchecked display [`#1508`](https://github.com/nocobase/nocobase/pull/1508) +- feat(snapshot-field): improve transition [`#1513`](https://github.com/nocobase/nocobase/pull/1513) +- fix(plugin-workflow): fix CollectionField validation when using variable [`#1512`](https://github.com/nocobase/nocobase/pull/1512) +- feat(plugin-formula): calculation with snapshot field [`#1498`](https://github.com/nocobase/nocobase/pull/1498) +- fix(association-select): filter without data scope not work [`#1509`](https://github.com/nocobase/nocobase/pull/1509) +- feat: fallback sort field init to createdAt field [`#1507`](https://github.com/nocobase/nocobase/pull/1507) +- fix(graphical-interface): collection category does not display title [`#1503`](https://github.com/nocobase/nocobase/pull/1503) +- fix(association-select): data is incorrect when use data scope [`#1491`](https://github.com/nocobase/nocobase/pull/1491) +- feat: dialect version accessors [`#1502`](https://github.com/nocobase/nocobase/pull/1502) +- fix: collection schema updated but model _schema not change [`#1500`](https://github.com/nocobase/nocobase/pull/1500) +- Update zh_CN.ts [`#1481`](https://github.com/nocobase/nocobase/pull/1481) +- fix(linkageRules): support empty condiction [`#1496`](https://github.com/nocobase/nocobase/pull/1496) +- feat: form/button linkage rules [`#1456`](https://github.com/nocobase/nocobase/pull/1456) +- fix: collection importer has incorrect reference [`#1495`](https://github.com/nocobase/nocobase/pull/1495) +- feat: support custom plugin deployment in dockerfile [`#1494`](https://github.com/nocobase/nocobase/pull/1494) +- fix: environment variables [`#1490`](https://github.com/nocobase/nocobase/pull/1490) +- feat: prepare database method [`#1492`](https://github.com/nocobase/nocobase/pull/1492) +- Fix/multiple schema query [`#1488`](https://github.com/nocobase/nocobase/pull/1488) +- fix: string violation [`#1487`](https://github.com/nocobase/nocobase/pull/1487) +- refactor(plugin-workflow): migrate evaluators [`#1485`](https://github.com/nocobase/nocobase/pull/1485) +- docs: fix typo [`#1482`](https://github.com/nocobase/nocobase/pull/1482) +- fix(plugin-workflow): fix customized job status [`#1484`](https://github.com/nocobase/nocobase/pull/1484) +- fix(plugin-workflow): fix condition config param [`#1483`](https://github.com/nocobase/nocobase/pull/1483) +- fix(plugin-workflow): fix migration [`#1479`](https://github.com/nocobase/nocobase/pull/1479) +- fix(plugin-workflow): fix migration on table prefix [`#1478`](https://github.com/nocobase/nocobase/pull/1478) +- refactor(plugin-formula): combine 2 formula field type into 1 [`#1457`](https://github.com/nocobase/nocobase/pull/1457) +- fix(plugin-workflow): fix migration for calculation [`#1476`](https://github.com/nocobase/nocobase/pull/1476) +- fix(plugin-workflow): fix schedule trigger number type repeat [`#1475`](https://github.com/nocobase/nocobase/pull/1475) +- Feat(plugin-workflow) manual instruction [`#1339`](https://github.com/nocobase/nocobase/pull/1339) +- feat: support for importing attachments [`#1466`](https://github.com/nocobase/nocobase/pull/1466) +- fix: column not exists error after destory relation field [`#1465`](https://github.com/nocobase/nocobase/pull/1465) +- fix: add schema [`#1464`](https://github.com/nocobase/nocobase/pull/1464) +- fix: avoid o2o, o2m can select the data already selected [`#1462`](https://github.com/nocobase/nocobase/pull/1462) +- feat: add test cases [`#1463`](https://github.com/nocobase/nocobase/pull/1463) +- feat: update zh_CN.ts [`#1458`](https://github.com/nocobase/nocobase/pull/1458) +- refactor: export plugin [`#1460`](https://github.com/nocobase/nocobase/pull/1460) +- Fix/pg schema with inherit [`#1446`](https://github.com/nocobase/nocobase/pull/1446) +- feat: multiple apps admin [`#1431`](https://github.com/nocobase/nocobase/pull/1431) +- chore: fix build plugin error [`#1454`](https://github.com/nocobase/nocobase/pull/1454) +- feat: provide the underscored option for the database [`#1366`](https://github.com/nocobase/nocobase/pull/1366) +- Revert "fix(table): make filed overflow behavior right (#1392)" [`#1452`](https://github.com/nocobase/nocobase/pull/1452) +- fix(collection category): zh_cn locale defect [`#1451`](https://github.com/nocobase/nocobase/pull/1451) +- feat: add namespace and duplicator parameters for collection options [`#1449`](https://github.com/nocobase/nocobase/pull/1449) +- fix(snapshot-field): remove depth limit [`#1450`](https://github.com/nocobase/nocobase/pull/1450) +- chore: update licenses url [`#1285`](https://github.com/nocobase/nocobase/pull/1285) +- feat: association snapshot [`#1438`](https://github.com/nocobase/nocobase/pull/1438) +- fix(table): make filed overflow behavior right [`#1392`](https://github.com/nocobase/nocobase/pull/1392) +- fix(plugin-sequence): fix missed createdAt field in bulk hook [`#1448`](https://github.com/nocobase/nocobase/pull/1448) +- fix: error:0308010C:digital envelope routines::unsupported [`#1447`](https://github.com/nocobase/nocobase/pull/1447) +- feat: collection categories [`#1327`](https://github.com/nocobase/nocobase/pull/1327) +- fix(plugin-fm): fix path config for storages [`#1445`](https://github.com/nocobase/nocobase/pull/1445) +- fix: node.js 17+, add openssl-legacy-provider [`#1434`](https://github.com/nocobase/nocobase/pull/1434) +- fix(plugin-workflow): fix schedule on field null value [`#1442`](https://github.com/nocobase/nocobase/pull/1442) +- feat: pg schema support [`#1439`](https://github.com/nocobase/nocobase/pull/1439) +- fix(i18n): set key and ns separator default to false [`#1432`](https://github.com/nocobase/nocobase/pull/1432) +- feat: disable trigger when import collection [`#1417`](https://github.com/nocobase/nocobase/pull/1417) +- chore: translate 'Add tab' in page header [`#1424`](https://github.com/nocobase/nocobase/pull/1424) +- fix(plugin-workflow): use promise to request [`#1426`](https://github.com/nocobase/nocobase/pull/1426) +- fix(acl): custom appends merge strategy [`#1416`](https://github.com/nocobase/nocobase/pull/1416) +- docs: update G2Plot example url [`#1408`](https://github.com/nocobase/nocobase/pull/1408) +- docs: fix typo [`#1412`](https://github.com/nocobase/nocobase/pull/1412) +- fix(FixedBlock): using both association filters and FixedBlock does not show the complete table [`#1405`](https://github.com/nocobase/nocobase/pull/1405) +- feat(calendar): startDate and endDate support the use of association fields [`#1397`](https://github.com/nocobase/nocobase/pull/1397) +- fix: load through collection before belongsToMany field bind [`#1409`](https://github.com/nocobase/nocobase/pull/1409) +- feat(verification-plugin): support tencent sms [`#1382`](https://github.com/nocobase/nocobase/pull/1382) +- fix: foreign keys are editable when adding fields [`#1404`](https://github.com/nocobase/nocobase/pull/1404) +- fix: navbar_ui style [`#1398`](https://github.com/nocobase/nocobase/pull/1398) +- fix: inherit startup sort [`#1402`](https://github.com/nocobase/nocobase/pull/1402) +- fix(plugin-workflow): fix url input width for request config [`#1401`](https://github.com/nocobase/nocobase/pull/1401) +- Fix/snapshot [`#1396`](https://github.com/nocobase/nocobase/pull/1396) +- feat: fix through collections inherits filter [`#1394`](https://github.com/nocobase/nocobase/pull/1394) +- Fix(plugin-sequence): support sequence field in m2m through table [`#1383`](https://github.com/nocobase/nocobase/pull/1383) +- fix(plugin-workflow): adjust executed alert position [`#1381`](https://github.com/nocobase/nocobase/pull/1381) +- fix: through collection individual hooks [`#1378`](https://github.com/nocobase/nocobase/pull/1378) +- fix: through collection records should not be reset [`#1377`](https://github.com/nocobase/nocobase/pull/1377) +- feat(client): add form disabled context [`#1374`](https://github.com/nocobase/nocobase/pull/1374) +- Fix(plugin-workflow): request node [`#1367`](https://github.com/nocobase/nocobase/pull/1367) + +### Commits + +- docs: add plug-in documentation [`68511f0`](https://github.com/nocobase/nocobase/commit/68511f05bc7dbca49e0ab95eb868a193a3502d71) +- feat(db): field value parser [`5805b69`](https://github.com/nocobase/nocobase/commit/5805b69455532ad643e9c87831da985d41bc5d6d) +- chore(versions): ๐Ÿ˜Š publish v0.9.1-alpha.1 [`946c8f2`](https://github.com/nocobase/nocobase/commit/946c8f25a3df538f4a83abe4468786cf554d8914) + +## [v0.9.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.0-alpha.1...v0.9.0-alpha.2) - 2023-01-14 + +### Merged + +- feat: load multiple languages dynamically [`#1355`](https://github.com/nocobase/nocobase/pull/1355) +- refactor(plugin-workflow): refactor request instruction [`#1356`](https://github.com/nocobase/nocobase/pull/1356) +- feat: update dependencies [`#1353`](https://github.com/nocobase/nocobase/pull/1353) + +### Commits + +- feat: add en-US.example.json [`86554c0`](https://github.com/nocobase/nocobase/commit/86554c0205d6cb8f5dd3a293c9929b4aa9cb5897) +- fix: locale cache [`a4116a2`](https://github.com/nocobase/nocobase/commit/a4116a251b00109dad96e5062bf9b6441544f8b3) +- chore(versions): ๐Ÿ˜Š publish v0.9.0-alpha.2 [`daa91e9`](https://github.com/nocobase/nocobase/commit/daa91e95a6192bac19702eb17e9f764a7df11477) + +## [v0.9.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.8.1-alpha.4...v0.9.0-alpha.1) - 2023-01-11 + +### Merged + +- feat: change license [`#1350`](https://github.com/nocobase/nocobase/pull/1350) +- feat: formula plugin [`#1344`](https://github.com/nocobase/nocobase/pull/1344) +- feat: acl optimization [`#1136`](https://github.com/nocobase/nocobase/pull/1136) +- feat: duplicator plugin [`#1265`](https://github.com/nocobase/nocobase/pull/1265) +- fix(plugin-workflow): fix missed preparing [`#1337`](https://github.com/nocobase/nocobase/pull/1337) +- fix: FixedBlock does not disappear when the current tab is deleted [`#1324`](https://github.com/nocobase/nocobase/pull/1324) +- feat(Select): should compile title and label [`#1332`](https://github.com/nocobase/nocobase/pull/1332) +- fix: improve filter [`#1333`](https://github.com/nocobase/nocobase/pull/1333) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.0-alpha.1 [`013f091`](https://github.com/nocobase/nocobase/commit/013f0916a521fef74970ba6feed76c1b17b6ff01) +- fix: typeError: Cannot read properties of undefined (reading 'find') [`1dc4142`](https://github.com/nocobase/nocobase/commit/1dc4142da2195fb6f09bd691b23948d9d5f9e01d) +- feat: improve translation [`31794d3`](https://github.com/nocobase/nocobase/commit/31794d3c1b7af13d9dbaca8d12b1843c18553307) + +## [v0.8.1-alpha.4](https://github.com/nocobase/nocobase/compare/v0.8.1-alpha.2...v0.8.1-alpha.4) - 2023-01-05 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.8.1-alpha.4 [`#1331`](https://github.com/nocobase/nocobase/pull/1331) + +## [v0.8.1-alpha.2](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.13...v0.8.1-alpha.2) - 2023-01-05 + +### Merged + +- fix(plugin-sequence-field): integer generated should not less then start [`#1330`](https://github.com/nocobase/nocobase/pull/1330) +- fix: filter removeNullConditions [`#1329`](https://github.com/nocobase/nocobase/pull/1329) +- fix: snapshot display fix [`#1328`](https://github.com/nocobase/nocobase/pull/1328) +- fix(plugin-workflow): fix history drawer in workflow canvas [`#1326`](https://github.com/nocobase/nocobase/pull/1326) +- feat: snapshot field plugin [`#1253`](https://github.com/nocobase/nocobase/pull/1253) +- feat: configure fields style fix [`#1322`](https://github.com/nocobase/nocobase/pull/1322) +- fix(plugin-workflow): fix events in prepare [`#1325`](https://github.com/nocobase/nocobase/pull/1325) +- fix(database): filter match [`#1319`](https://github.com/nocobase/nocobase/pull/1319) +- fix: action merge params [`#1321`](https://github.com/nocobase/nocobase/pull/1321) +- chore: set belongs to many on delete to cascade [`#1311`](https://github.com/nocobase/nocobase/pull/1311) +- fix: disable filterByTk options in destory method when collection has no primary key or has composite primary key [`#1313`](https://github.com/nocobase/nocobase/pull/1313) +- fix: slow find with include in mysql [`#1304`](https://github.com/nocobase/nocobase/pull/1304) +- fix(map-plugin): cannot save because the value is null [`#1309`](https://github.com/nocobase/nocobase/pull/1309) +- fix: create inherits with table name contains upper case [`#1308`](https://github.com/nocobase/nocobase/pull/1308) +- fix: upgrade error [`#1303`](https://github.com/nocobase/nocobase/pull/1303) +- fix: association filter [`#1301`](https://github.com/nocobase/nocobase/pull/1301) +- fix: pageSize 200 & not a function [`#1299`](https://github.com/nocobase/nocobase/pull/1299) +- refactor(client): make tab initializer more common [`#1298`](https://github.com/nocobase/nocobase/pull/1298) +- fix(Select): title field and clear button not work [`#1296`](https://github.com/nocobase/nocobase/pull/1296) +- fix(plugin-fm): fix local storage config and skip empty base url [`#1294`](https://github.com/nocobase/nocobase/pull/1294) +- feat: antd->4.2.8 [`#1231`](https://github.com/nocobase/nocobase/pull/1231) +- feat: association filter [`#1274`](https://github.com/nocobase/nocobase/pull/1274) +- chore: upgrade sequelize version to to latest [`#1234`](https://github.com/nocobase/nocobase/pull/1234) +- feat: add iframe-block plugin [`#1281`](https://github.com/nocobase/nocobase/pull/1281) +- feat: update page size to 200 and limit fields [`#1282`](https://github.com/nocobase/nocobase/pull/1282) +- fix: prevent horizontal scroll of menus [`#1279`](https://github.com/nocobase/nocobase/pull/1279) +- Turkish language created for Docs. Belgeler iรงin tรผrkรงe dil desteฤŸi [`#1071`](https://github.com/nocobase/nocobase/pull/1071) +- fix(client/kanban): fix kanban card default active all fields bug [`#1270`](https://github.com/nocobase/nocobase/pull/1270) +- fix: cannot delete event in calendar [`#1277`](https://github.com/nocobase/nocobase/pull/1277) +- fix(AssociationSelect): missing field title in details [`#1275`](https://github.com/nocobase/nocobase/pull/1275) +- fix: menu cannot scroll [`#1276`](https://github.com/nocobase/nocobase/pull/1276) +- feat: support fixed block [`#1267`](https://github.com/nocobase/nocobase/pull/1267) +- fix(plugin-sequence): fix test case [`#1268`](https://github.com/nocobase/nocobase/pull/1268) +- fix(plugin-sequence): fix update pattern index [`#1266`](https://github.com/nocobase/nocobase/pull/1266) +- feat : support fixed menu and header [`#1260`](https://github.com/nocobase/nocobase/pull/1260) +- fix: destroy field in parent table [`#1263`](https://github.com/nocobase/nocobase/pull/1263) +- refactor(client/popup): text: 'Set popup size' changed to 'Popup size' [`#1262`](https://github.com/nocobase/nocobase/pull/1262) +- feat: page tabs [`#1261`](https://github.com/nocobase/nocobase/pull/1261) +- fix(plugin-fm): drawer form values [`#1259`](https://github.com/nocobase/nocobase/pull/1259) +- feat: support sync button [`#1258`](https://github.com/nocobase/nocobase/pull/1258) +- fix: isOverride cannot work [`#1257`](https://github.com/nocobase/nocobase/pull/1257) +- refactor(sequence-field): move to plugin and use table to record [`#1209`](https://github.com/nocobase/nocobase/pull/1209) +- feat: add map plugin [`#1229`](https://github.com/nocobase/nocobase/pull/1229) +- fix(plugin-workflow): fix job result in history [`#1242`](https://github.com/nocobase/nocobase/pull/1242) +- feat: set field [`#1237`](https://github.com/nocobase/nocobase/pull/1237) +- chore: update ci [`#1239`](https://github.com/nocobase/nocobase/pull/1239) +- feat(client/popup): support set drawer and modal popup size [`#1224`](https://github.com/nocobase/nocobase/pull/1224) +- fix(plugin-file-manager): fix local serve middleware [`#1226`](https://github.com/nocobase/nocobase/pull/1226) +- feat: iframe block [`#1225`](https://github.com/nocobase/nocobase/pull/1225) +- fix(workflow/request-var): fix request node var editor [`#1223`](https://github.com/nocobase/nocobase/pull/1223) +- fix: change nginx timeout as 10min [`#1222`](https://github.com/nocobase/nocobase/pull/1222) +- fix: change import timeout as 10 min [`#1221`](https://github.com/nocobase/nocobase/pull/1221) +- fix: field component options appears in non-association interface [`#1220`](https://github.com/nocobase/nocobase/pull/1220) +- Fix(plugin-workflow): client refactor [`#1163`](https://github.com/nocobase/nocobase/pull/1163) +- feat(cli): quickstart [`#1204`](https://github.com/nocobase/nocobase/pull/1204) +- fix(plugin-cm): fix interfaces injection and getter [`#1196`](https://github.com/nocobase/nocobase/pull/1196) +- fix(i18n): move back key to global [`#1195`](https://github.com/nocobase/nocobase/pull/1195) +- test(plugin-workflow): add cache and test for sqlite [`#1194`](https://github.com/nocobase/nocobase/pull/1194) +- fix(plugin-workflow): use dual pipes to process triggers [`#1187`](https://github.com/nocobase/nocobase/pull/1187) +- fix(plugin-workflow): temp skip case [`#1188`](https://github.com/nocobase/nocobase/pull/1188) +- feat(menu): when a group is selected, the submenu items are also selected together [`#1152`](https://github.com/nocobase/nocobase/pull/1152) +- fix(plugin-workflow): fix transaction in trigger [`#1186`](https://github.com/nocobase/nocobase/pull/1186) +- feat: export blob type error [`#1170`](https://github.com/nocobase/nocobase/pull/1170) +- fix(plugin-workflow): dispatch when server start [`#1183`](https://github.com/nocobase/nocobase/pull/1183) +- fix: yarn start error in windows system [`#1177`](https://github.com/nocobase/nocobase/pull/1177) +- fix(plugin-users): fix initialization of sms verification [`#1173`](https://github.com/nocobase/nocobase/pull/1173) +- fix(plugin-workflow): fix test case [`#1172`](https://github.com/nocobase/nocobase/pull/1172) +- feat(plugin-workflow): add duplicate action [`#1171`](https://github.com/nocobase/nocobase/pull/1171) +- fix(plugin-workflow): fix context operand [`#1169`](https://github.com/nocobase/nocobase/pull/1169) +- fix: auto deploy error [`#1168`](https://github.com/nocobase/nocobase/pull/1168) +- feat: configurable the scope of target collections [`#1165`](https://github.com/nocobase/nocobase/pull/1165) +- ci(workflows): fix auto deploy error [`#1166`](https://github.com/nocobase/nocobase/pull/1166) +- ci(workflows): support manual depoly and stop pr [`#1132`](https://github.com/nocobase/nocobase/pull/1132) +- fix: saml oidc text [`#1164`](https://github.com/nocobase/nocobase/pull/1164) +- fix: transaction error [`#1162`](https://github.com/nocobase/nocobase/pull/1162) +- fix: create inherits with empty table [`#1160`](https://github.com/nocobase/nocobase/pull/1160) +- fix: sso optimization [`#1159`](https://github.com/nocobase/nocobase/pull/1159) +- feat: saml [`#1143`](https://github.com/nocobase/nocobase/pull/1143) +- feat: oidc [`#1126`](https://github.com/nocobase/nocobase/pull/1126) +- feat: belongs to many on delete [`#1158`](https://github.com/nocobase/nocobase/pull/1158) +- Feat/collection templates [`#1124`](https://github.com/nocobase/nocobase/pull/1124) +- Fix/action 404 [`#1157`](https://github.com/nocobase/nocobase/pull/1157) +- fix: 404 response [`#1156`](https://github.com/nocobase/nocobase/pull/1156) +- Feat: plugin verification config [`#1129`](https://github.com/nocobase/nocobase/pull/1129) +- feat: support use select field [`#1105`](https://github.com/nocobase/nocobase/pull/1105) +- fix(plugin-workflow): fix trigger context getters [`#1149`](https://github.com/nocobase/nocobase/pull/1149) +- feat: option readPretty optimization [`#1138`](https://github.com/nocobase/nocobase/pull/1138) +- fix(plugin-workflow): fix locale [`#1145`](https://github.com/nocobase/nocobase/pull/1145) +- fix(plugin-workflow): fix endsOn field [`#1144`](https://github.com/nocobase/nocobase/pull/1144) +- fix: create empty collection [`#1141`](https://github.com/nocobase/nocobase/pull/1141) +- fix(client): fix no key warning in menu [`#1140`](https://github.com/nocobase/nocobase/pull/1140) +- Fix(plugin workflow) interval [`#1139`](https://github.com/nocobase/nocobase/pull/1139) +- fix: x-collection-field [`#1134`](https://github.com/nocobase/nocobase/pull/1134) +- feat: update many [`#1135`](https://github.com/nocobase/nocobase/pull/1135) +- feat(workflow): support Http Request Node [`#1102`](https://github.com/nocobase/nocobase/pull/1102) +- fix: incorrect repeat of calendar [`#1131`](https://github.com/nocobase/nocobase/pull/1131) +- fix(database): refresh indexes [`#1127`](https://github.com/nocobase/nocobase/pull/1127) +- fix: reference check after remove collection [`#1123`](https://github.com/nocobase/nocobase/pull/1123) +- fix: sort field with table dose not have primary key [`#1119`](https://github.com/nocobase/nocobase/pull/1119) +- fix: test [`#1118`](https://github.com/nocobase/nocobase/pull/1118) +- fix: update to bigint [`#1117`](https://github.com/nocobase/nocobase/pull/1117) +- fix(cm): default values for override [`#1112`](https://github.com/nocobase/nocobase/pull/1112) +- fix: update sequence and foreignKey [`#1116`](https://github.com/nocobase/nocobase/pull/1116) +- fix(plugin-workflow): fix workflow schema [`#1115`](https://github.com/nocobase/nocobase/pull/1115) +- fix(client): menu key warnings [`#1114`](https://github.com/nocobase/nocobase/pull/1114) +- fix: fk type invalid [`#1113`](https://github.com/nocobase/nocobase/pull/1113) +- fix: handle column does not exist error [`#1110`](https://github.com/nocobase/nocobase/pull/1110) +- fix: inherits with collection not exists [`#1109`](https://github.com/nocobase/nocobase/pull/1109) +- fix(locale): move description to global [`#1108`](https://github.com/nocobase/nocobase/pull/1108) +- feat: using bigint for id field [`#1100`](https://github.com/nocobase/nocobase/pull/1100) +- refactor: formula plugin [`#1082`](https://github.com/nocobase/nocobase/pull/1082) +- fix: create inherits from a table that has no id [`#1104`](https://github.com/nocobase/nocobase/pull/1104) +- fix: find table sequence [`#1101`](https://github.com/nocobase/nocobase/pull/1101) +- Feat/collection inherits [`#1097`](https://github.com/nocobase/nocobase/pull/1097) +- fix: create collection with emtpy inhertis params [`#1096`](https://github.com/nocobase/nocobase/pull/1096) +- fix: remove node after collection removed [`#1095`](https://github.com/nocobase/nocobase/pull/1095) +- fix: unbind error [`#1094`](https://github.com/nocobase/nocobase/pull/1094) +- chore: type conflict error message [`#1093`](https://github.com/nocobase/nocobase/pull/1093) +- feat: collection inheritance [`#1069`](https://github.com/nocobase/nocobase/pull/1069) +- feat: no recursive update associations [`#1091`](https://github.com/nocobase/nocobase/pull/1091) +- fix(plugin-workflow): fix transaction chain in trigger [`#1089`](https://github.com/nocobase/nocobase/pull/1089) +- fix(plugin-workflow): fix schema name conflict [`#1087`](https://github.com/nocobase/nocobase/pull/1087) +- refactor(plugin-workflow): split transaction for collection trigger [`#1080`](https://github.com/nocobase/nocobase/pull/1080) +- fix: skip records that do not exist [`#1084`](https://github.com/nocobase/nocobase/pull/1084) +- refactor(plugin-workflow): adjust style [`#1079`](https://github.com/nocobase/nocobase/pull/1079) +- fix: mysql variable 'lower_case_table_names' must be set to '0' or '2' [`#1078`](https://github.com/nocobase/nocobase/pull/1078) +- feat: logging package [`#1021`](https://github.com/nocobase/nocobase/pull/1021) +- Refactor: plugin-workflow client [`#1077`](https://github.com/nocobase/nocobase/pull/1077) +- fix: reference options sync [`#1061`](https://github.com/nocobase/nocobase/pull/1061) +- refactor(plugin-workflow): adjust some api [`#1067`](https://github.com/nocobase/nocobase/pull/1067) +- fix(plugin-workflow): fix trigger getter [`#1060`](https://github.com/nocobase/nocobase/pull/1060) +- Update README.md [`#1053`](https://github.com/nocobase/nocobase/pull/1053) +- test(collection-manager): 20221104151410-update-collections-hidden test correct [`#1042`](https://github.com/nocobase/nocobase/pull/1042) + +### Fixed + +- fix(client): page title translation doesn't work [`#838`](https://github.com/nocobase/nocobase/issues/838) + +### Commits + +- feat: update docs [`15cbad3`](https://github.com/nocobase/nocobase/commit/15cbad30b4e40121ab768273d6d42832960cd4bf) +- Revert "refactor: formula plugin (#1082)" [`0cbfa0a`](https://github.com/nocobase/nocobase/commit/0cbfa0a52177cce6b5400107a639d97de0b4e7a9) +- chore(versions): ๐Ÿ˜Š publish v0.8.1-alpha.2 [`4ecd2ee`](https://github.com/nocobase/nocobase/commit/4ecd2ee40d0ddfdfc5440670aa4f2b3a64f1c819) + +## [v0.8.0-alpha.13](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.11...v0.8.0-alpha.13) - 2022-11-04 + +### Merged + +- test(collection-manager): migration - 20221104151410-update-collections-hidden test optimize [`#1040`](https://github.com/nocobase/nocobase/pull/1040) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.13 [`ce588ee`](https://github.com/nocobase/nocobase/commit/ce588eefb0bfc50f7d5bbee575e0b5e843bf6644) + +## [v0.8.0-alpha.11](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.9...v0.8.0-alpha.11) - 2022-11-04 + +### Merged + +- chore(collection-manager): migration - 20221104151410-update-collections-hidden [`#1039`](https://github.com/nocobase/nocobase/pull/1039) +- fix: db sync failed [`#1037`](https://github.com/nocobase/nocobase/pull/1037) +- feat: ๆทปๅŠ ๅญ—ๆฎตๆตฎ็ช—ๅฎšไฝไผ˜ๅŒ– [`#1034`](https://github.com/nocobase/nocobase/pull/1034) +- fix: association accessors rebind [`#1027`](https://github.com/nocobase/nocobase/pull/1027) +- chore(debugger): clean scripts [`#1029`](https://github.com/nocobase/nocobase/pull/1029) +- fix(calendar): events cannot support moment [`#1017`](https://github.com/nocobase/nocobase/pull/1017) +- Fix: debugger [`#1014`](https://github.com/nocobase/nocobase/pull/1014) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.11 [`6d9006f`](https://github.com/nocobase/nocobase/commit/6d9006f361f569546777f05f03414acc66d06506) +- feat: more console log [`f15c67a`](https://github.com/nocobase/nocobase/commit/f15c67afd5745ccf37b5303f2bf8d61513d62183) +- feat(client): add filter option [`af3fbeb`](https://github.com/nocobase/nocobase/commit/af3fbeb99b9d2b80433bb25ec7c1158ae8addda6) + +## [v0.8.0-alpha.9](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.8...v0.8.0-alpha.9) - 2022-11-02 + +### Merged + +- feat: improve collection manager [`#1013`](https://github.com/nocobase/nocobase/pull/1013) +- feat(calendar): support for add/remove repeats events [`#988`](https://github.com/nocobase/nocobase/pull/988) +- Fix: sequence field [`#1009`](https://github.com/nocobase/nocobase/pull/1009) +- feat: update docs [`#1006`](https://github.com/nocobase/nocobase/pull/1006) +- fix(sample): fix shop-i18n client [`#1005`](https://github.com/nocobase/nocobase/pull/1005) +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.7 [`#1002`](https://github.com/nocobase/nocobase/pull/1002) +- fix(plugin-workflow): fix trigger config [`#997`](https://github.com/nocobase/nocobase/pull/997) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.9 [`642e044`](https://github.com/nocobase/nocobase/commit/642e04490d41acd9c4abba00112fa7f634d83d89) +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.8 [`d5680f8`](https://github.com/nocobase/nocobase/commit/d5680f80d7e468ee5972f008e162eca39c86aa87) +- fix: remove sample plugin client files [`7cded43`](https://github.com/nocobase/nocobase/commit/7cded4395a95922918a2b8abe041160b715a601b) + +## [v0.8.0-alpha.8](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.7...v0.8.0-alpha.8) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.8 [`6d3aa09`](https://github.com/nocobase/nocobase/commit/6d3aa092c0e788824bd0f7fd92607002e8000d66) +- fix: remove sample plugin client files [`8da81f0`](https://github.com/nocobase/nocobase/commit/8da81f00e5f65d3cd17819f1959d0ef4575461fd) + +## [v0.8.0-alpha.7](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.6...v0.8.0-alpha.7) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.7 [`9fbb789`](https://github.com/nocobase/nocobase/commit/9fbb78932ac739fa4c97869fa28d9a676f905519) +- fix(pm): upgrade error when using sqlite database [`bc7848d`](https://github.com/nocobase/nocobase/commit/bc7848da68516f18a5332c3ab1154675314f1ab1) + +## [v0.8.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.5...v0.8.0-alpha.6) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.6 [`88b8a0f`](https://github.com/nocobase/nocobase/commit/88b8a0f379a261b2b65ee5ba3a958a1d450e0e37) +- fix: upgrade failure using docker [`af32f08`](https://github.com/nocobase/nocobase/commit/af32f08d5f624468c371bff61d2e7f62cfe20db8) +- Update README.zh-CN.md [`fc7b17b`](https://github.com/nocobase/nocobase/commit/fc7b17b0858b328a0f2844260ebd3adfaa3f08e3) + +## [v0.8.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.3...v0.8.0-alpha.5) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.5 [`3453f46`](https://github.com/nocobase/nocobase/commit/3453f46997df9648f6aace49c80922a19611bf99) + +## [v0.8.0-alpha.3](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.2...v0.8.0-alpha.3) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.3 [`3395eb6`](https://github.com/nocobase/nocobase/commit/3395eb66898d506fd5f465f11c60513a1b46bcab) + +## [v0.8.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.1...v0.8.0-alpha.2) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.2 [`7f4c2de`](https://github.com/nocobase/nocobase/commit/7f4c2de98dd9bad88398351080c56753b0cac03c) + +## [v0.8.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.7-alpha.1...v0.8.0-alpha.1) - 2022-11-01 + +### Merged + +- Some features [`#979`](https://github.com/nocobase/nocobase/pull/979) +- fix(client/form-fields): fix fields's x-read-pretty [`#994`](https://github.com/nocobase/nocobase/pull/994) +- feat: reference check [`#989`](https://github.com/nocobase/nocobase/pull/989) +- fix(client/menu-permisssions-page): fix menu-permisssions-page no data [`#993`](https://github.com/nocobase/nocobase/pull/993) +- feat: update docs [`#996`](https://github.com/nocobase/nocobase/pull/996) +- fix(client): add locale for sequence field [`#995`](https://github.com/nocobase/nocobase/pull/995) +- docs: update api docs [`#973`](https://github.com/nocobase/nocobase/pull/973) +- feat: update docs [`#990`](https://github.com/nocobase/nocobase/pull/990) +- fix(client/upload): fix upload mutiple files always uploading status [`#974`](https://github.com/nocobase/nocobase/pull/974) +- fix(client/table-selector-provider): make data range config effective [`#960`](https://github.com/nocobase/nocobase/pull/960) +- fix(client/formula): set cursor focus on input [`#959`](https://github.com/nocobase/nocobase/pull/959) +- feat: plugin workflow visualization [`#987`](https://github.com/nocobase/nocobase/pull/987) +- feat: support show lunar day in week and day [`#977`](https://github.com/nocobase/nocobase/pull/977) +- fix: add sample plugins [`#986`](https://github.com/nocobase/nocobase/pull/986) +- feat: improve code [`#978`](https://github.com/nocobase/nocobase/pull/978) +- chore: improve ci [`#976`](https://github.com/nocobase/nocobase/pull/976) +- feat: support show lunar day [`#972`](https://github.com/nocobase/nocobase/pull/972) +- chore: fix incorrect deps [`#970`](https://github.com/nocobase/nocobase/pull/970) +- fix: empty logic operator filter [`#961`](https://github.com/nocobase/nocobase/pull/961) +- fix(plugin-workflow): fix workflow update action [`#964`](https://github.com/nocobase/nocobase/pull/964) +- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save [`#962`](https://github.com/nocobase/nocobase/pull/962) +- feat(file-manager): support tencent cos [`#958`](https://github.com/nocobase/nocobase/pull/958) +- feat: push ali docker registry [`#957`](https://github.com/nocobase/nocobase/pull/957) +- fix(plugin-workflow): fix constant schedule trigger time [`#956`](https://github.com/nocobase/nocobase/pull/956) +- Turkish readme [`#955`](https://github.com/nocobase/nocobase/pull/955) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`#954`](https://github.com/nocobase/nocobase/pull/954) +- Turkish language [`#939`](https://github.com/nocobase/nocobase/pull/939) +- refactor(plugin-file-manager): move client code into plugin folder and enable path config [`#913`](https://github.com/nocobase/nocobase/pull/913) +- refactor: plugin manager [`#965`](https://github.com/nocobase/nocobase/pull/965) +- feat: add filter action to collection table [`#953`](https://github.com/nocobase/nocobase/pull/953) +- feat: ui schema cache [`#877`](https://github.com/nocobase/nocobase/pull/877) +- feat: changed with associations [`#943`](https://github.com/nocobase/nocobase/pull/943) +- feat: docker optimizing [`#948`](https://github.com/nocobase/nocobase/pull/948) +- fix(plugin-workflow): test changedWithAssociations() [`#950`](https://github.com/nocobase/nocobase/pull/950) +- fix(plugin-workflow): skip time based test [`#951`](https://github.com/nocobase/nocobase/pull/951) +- fix(plugin-workflow): fix schedule trigger bug [`#949`](https://github.com/nocobase/nocobase/pull/949) +- fix(plugin-workflow): fix collection fieldset component [`#942`](https://github.com/nocobase/nocobase/pull/942) +- fix(plugin-workflow): avoid revision with ghost nodes [`#941`](https://github.com/nocobase/nocobase/pull/941) +- fix(plugin-workflow): add req context to processor [`#936`](https://github.com/nocobase/nocobase/pull/936) +- feat: plugin workflow collection field [`#934`](https://github.com/nocobase/nocobase/pull/934) +- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set [`#926`](https://github.com/nocobase/nocobase/pull/926) +- fix(plugin-workflow): temp disable validation of collection field in node [`#928`](https://github.com/nocobase/nocobase/pull/928) +- Doc/db repository [`#896`](https://github.com/nocobase/nocobase/pull/896) +- docs: fix resource & action dev doc [`#880`](https://github.com/nocobase/nocobase/pull/880) +- docs: fix i18n dev sample [`#910`](https://github.com/nocobase/nocobase/pull/910) +- feat: create with array of values [`#912`](https://github.com/nocobase/nocobase/pull/912) +- fix: unbind on error throwing [`#914`](https://github.com/nocobase/nocobase/pull/914) +- fix: appends merge now using primary key [`#911`](https://github.com/nocobase/nocobase/pull/911) +- Doc: api database events [`#887`](https://github.com/nocobase/nocobase/pull/887) +- feat: limit database identifier [`#908`](https://github.com/nocobase/nocobase/pull/908) +- fix: sync collection field default value [`#907`](https://github.com/nocobase/nocobase/pull/907) +- fix: appends merge includes [`#905`](https://github.com/nocobase/nocobase/pull/905) +- fix(samples): fix test case [`#903`](https://github.com/nocobase/nocobase/pull/903) +- fix: single relation repository appends query issue [`#901`](https://github.com/nocobase/nocobase/pull/901) +- feat(plugin-workflow): add concat calculator [`#894`](https://github.com/nocobase/nocobase/pull/894) +- fix(client/record-picker): support record-picker show format DataPicker [`#888`](https://github.com/nocobase/nocobase/pull/888) +- fix(client/block-select-collection): fix select collection menu view error [`#889`](https://github.com/nocobase/nocobase/pull/889) +- fix: unable to submit form during file upload [`#892`](https://github.com/nocobase/nocobase/pull/892) +- fix: run test by jest [`#891`](https://github.com/nocobase/nocobase/pull/891) +- feat(collection-manager): inverse fields can be configured [`#883`](https://github.com/nocobase/nocobase/pull/883) +- fix(formula): support integer and fix NaN error [`#879`](https://github.com/nocobase/nocobase/pull/879) +- fix: sort parameter is missing [`#849`](https://github.com/nocobase/nocobase/pull/849) +- fix: slow join query issued by appends field in find method of repository [`#845`](https://github.com/nocobase/nocobase/pull/845) +- feat(core/cache): support cache [`#876`](https://github.com/nocobase/nocobase/pull/876) +- feat: update option must have filter or filterByTk [`#847`](https://github.com/nocobase/nocobase/pull/847) +- added Russian translation [`#840`](https://github.com/nocobase/nocobase/pull/840) +- feat(database): add sequence field type [`#779`](https://github.com/nocobase/nocobase/pull/779) +- fix: can't access pages without permission via url [`#826`](https://github.com/nocobase/nocobase/pull/826) +- fix: listen promisify [`#899`](https://github.com/nocobase/nocobase/pull/899) +- refactor(core): simplify some code [`#895`](https://github.com/nocobase/nocobase/pull/895) +- feat: sample-custom-signup-page [`#893`](https://github.com/nocobase/nocobase/pull/893) +- docs: relation repository & acl [`#848`](https://github.com/nocobase/nocobase/pull/848) +- Update actions.md [`#873`](https://github.com/nocobase/nocobase/pull/873) +- docs: add testing dev doc [`#871`](https://github.com/nocobase/nocobase/pull/871) +- Doc: dev migration [`#870`](https://github.com/nocobase/nocobase/pull/870) +- Doc: command [`#869`](https://github.com/nocobase/nocobase/pull/869) +- docs: add hooks dev doc [`#868`](https://github.com/nocobase/nocobase/pull/868) +- feat: update development doc [`#866`](https://github.com/nocobase/nocobase/pull/866) +- feat: ratelimit sample plugin [`#862`](https://github.com/nocobase/nocobase/pull/862) +- feat: custom block sample [`#867`](https://github.com/nocobase/nocobase/pull/867) +- docs: move http to dev [`#861`](https://github.com/nocobase/nocobase/pull/861) +- refactor: middleware [`#857`](https://github.com/nocobase/nocobase/pull/857) +- Doc: dev i18n [`#858`](https://github.com/nocobase/nocobase/pull/858) +- docs: add resources-actions doc and sample [`#853`](https://github.com/nocobase/nocobase/pull/853) +- feat: add custom page sample and doc [`#855`](https://github.com/nocobase/nocobase/pull/855) +- feat: nocobase cli doc [`#854`](https://github.com/nocobase/nocobase/pull/854) +- fix: auto install a plugin on enable [`#852`](https://github.com/nocobase/nocobase/pull/852) +- Doc: dev collection fields [`#846`](https://github.com/nocobase/nocobase/pull/846) +- docs: server application api [`#842`](https://github.com/nocobase/nocobase/pull/842) +- docs: add actions api [`#844`](https://github.com/nocobase/nocobase/pull/844) +- refactor(doc): change to new structure [`#804`](https://github.com/nocobase/nocobase/pull/804) +- refactor: plugin manager [`#775`](https://github.com/nocobase/nocobase/pull/775) + +### Commits + +- feat: release notes [`b185412`](https://github.com/nocobase/nocobase/commit/b18541255c4c07d138793a018c785451542aab74) +- Update v08-changelog.md [`d242169`](https://github.com/nocobase/nocobase/commit/d24216962b46c286411d15051e85861f764f5a03) +- fix(client): tab pane initializers for create form block [`929a4f8`](https://github.com/nocobase/nocobase/commit/929a4f848a327d7f8c55bcc786f584f4444ad36e) + +## [v0.7.7-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.6-alpha.2...v0.7.7-alpha.1) - 2022-10-26 + +### Merged + +- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save [`#962`](https://github.com/nocobase/nocobase/pull/962) +- feat(file-manager): support tencent cos [`#958`](https://github.com/nocobase/nocobase/pull/958) +- feat: push ali docker registry [`#957`](https://github.com/nocobase/nocobase/pull/957) +- fix(plugin-workflow): fix constant schedule trigger time [`#956`](https://github.com/nocobase/nocobase/pull/956) +- Turkish readme [`#955`](https://github.com/nocobase/nocobase/pull/955) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`#954`](https://github.com/nocobase/nocobase/pull/954) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.7-alpha.1 [`a7a807c`](https://github.com/nocobase/nocobase/commit/a7a807c433df69e4edf93dfb1bd31ee5a9f4beab) +- fix: lerna ERR! EUNCOMMIT M yarn.lock [`39eb3c9`](https://github.com/nocobase/nocobase/commit/39eb3c90bea25e6308723a87f91c80f60939d3cb) +- feat: api service [`59f102d`](https://github.com/nocobase/nocobase/commit/59f102de8acd7dd16a8ba0955aeef9df8d77d655) + +## [v0.7.6-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.5-alpha.1.1666403334...v0.7.6-alpha.2) - 2022-10-24 + +### Merged + +- Turkish language [`#939`](https://github.com/nocobase/nocobase/pull/939) +- refactor(plugin-file-manager): move client code into plugin folder and enable path config [`#913`](https://github.com/nocobase/nocobase/pull/913) +- feat: add filter action to collection table [`#953`](https://github.com/nocobase/nocobase/pull/953) +- feat: ui schema cache [`#877`](https://github.com/nocobase/nocobase/pull/877) +- feat: docker optimizing [`#948`](https://github.com/nocobase/nocobase/pull/948) +- fix(plugin-workflow): test changedWithAssociations() [`#950`](https://github.com/nocobase/nocobase/pull/950) +- fix(plugin-workflow): skip time based test [`#951`](https://github.com/nocobase/nocobase/pull/951) +- fix(plugin-workflow): fix schedule trigger bug [`#949`](https://github.com/nocobase/nocobase/pull/949) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.1 [`a0382a9`](https://github.com/nocobase/nocobase/commit/a0382a90c1e764dc48d25153f03856d991bc27d2) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`b304681`](https://github.com/nocobase/nocobase/commit/b3046819d88b3341b9e2ead41e9c15bde2c41da8) +- Revert "fix: registry.npmjs.org" [`e24d6bd`](https://github.com/nocobase/nocobase/commit/e24d6bdebce7b076974dd4759688ab434369e41c) + +## [v0.7.5-alpha.1.1666403334](https://github.com/nocobase/nocobase/compare/v0.7.5-alpha.1...v0.7.5-alpha.1.1666403334) - 2022-10-22 + +### Merged + +- feat: changed with associations [`#943`](https://github.com/nocobase/nocobase/pull/943) +- fix(plugin-workflow): fix collection fieldset component [`#942`](https://github.com/nocobase/nocobase/pull/942) +- fix(plugin-workflow): avoid revision with ghost nodes [`#941`](https://github.com/nocobase/nocobase/pull/941) +- fix(plugin-workflow): add req context to processor [`#936`](https://github.com/nocobase/nocobase/pull/936) +- Feat/plugin workflow collection field [`#934`](https://github.com/nocobase/nocobase/pull/934) +- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set [`#926`](https://github.com/nocobase/nocobase/pull/926) +- fix(plugin-workflow): temp disable validation of collection field in node [`#928`](https://github.com/nocobase/nocobase/pull/928) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.5-alpha.1.1666403334 [`692f7e7`](https://github.com/nocobase/nocobase/commit/692f7e7ae5ddca3a3f3793bf57604603924c6af9) +- chore: dockerfile [`65724de`](https://github.com/nocobase/nocobase/commit/65724de42cfe65cbcfcbc56496c9fda1b0509ff7) +- chore: dockerfile [`bd5a0ce`](https://github.com/nocobase/nocobase/commit/bd5a0cefed7ff837237ff730ccf6e50a0419b49f) + +## [v0.7.5-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.7...v0.7.5-alpha.1) - 2022-10-16 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.5-alpha.1 [`#920`](https://github.com/nocobase/nocobase/pull/920) +- Feat: plugin workflow collection field [`#919`](https://github.com/nocobase/nocobase/pull/919) +- feat: create with array of values [`#912`](https://github.com/nocobase/nocobase/pull/912) +- fix: unbind on error throwing [`#914`](https://github.com/nocobase/nocobase/pull/914) +- fix: appends merge now using primary key [`#911`](https://github.com/nocobase/nocobase/pull/911) +- feat: limit database identifier [`#908`](https://github.com/nocobase/nocobase/pull/908) +- fix: sync collection field default value [`#907`](https://github.com/nocobase/nocobase/pull/907) +- fix: appends merge includes [`#905`](https://github.com/nocobase/nocobase/pull/905) +- fix: single relation repository appends query issue [`#901`](https://github.com/nocobase/nocobase/pull/901) +- feat(plugin-workflow): add concat calculator [`#894`](https://github.com/nocobase/nocobase/pull/894) +- fix(client/record-picker): support record-picker show format DataPicker [`#888`](https://github.com/nocobase/nocobase/pull/888) +- fix(client/block-select-collection): fix select collection menu view error [`#889`](https://github.com/nocobase/nocobase/pull/889) +- fix: unable to submit form during file upload [`#892`](https://github.com/nocobase/nocobase/pull/892) +- fix: run test by jest [`#891`](https://github.com/nocobase/nocobase/pull/891) +- feat(collection-manager): inverse fields can be configured [`#883`](https://github.com/nocobase/nocobase/pull/883) +- fix(formula): support integer and fix NaN error [`#879`](https://github.com/nocobase/nocobase/pull/879) +- fix: sort parameter is missing [`#849`](https://github.com/nocobase/nocobase/pull/849) +- fix: slow join query issued by appends field in find method of repository [`#845`](https://github.com/nocobase/nocobase/pull/845) +- feat(core/cache): support cache [`#876`](https://github.com/nocobase/nocobase/pull/876) +- feat: update option must have filter or filterByTk [`#847`](https://github.com/nocobase/nocobase/pull/847) +- added Russian translation [`#840`](https://github.com/nocobase/nocobase/pull/840) +- feat(database): add sequence field type [`#779`](https://github.com/nocobase/nocobase/pull/779) +- fix: can't access pages without permission via url [`#826`](https://github.com/nocobase/nocobase/pull/826) +- refactor(resourcer): combine middleware class [`#825`](https://github.com/nocobase/nocobase/pull/825) +- refactor(database): fix some fields and types [`#820`](https://github.com/nocobase/nocobase/pull/820) +- feat(locale): added Japanese translation [`#813`](https://github.com/nocobase/nocobase/pull/813) +- fix(plugin-workflow): fix value type for DatePicker to moment (#815) [`#819`](https://github.com/nocobase/nocobase/pull/819) +- refactor(plugin-workflow): export client calculators registry [`#816`](https://github.com/nocobase/nocobase/pull/816) +- fix: number storage type changed to double [`#810`](https://github.com/nocobase/nocobase/pull/810) +- refactor(server) [`#795`](https://github.com/nocobase/nocobase/pull/795) +- fix(plugin-verification): change provider rate limit error to 429 [`#788`](https://github.com/nocobase/nocobase/pull/788) +- fix(plugin-cm): fix field disappear after failed to update [`#773`](https://github.com/nocobase/nocobase/pull/773) +- fix: fix uiSchema undefined [`#770`](https://github.com/nocobase/nocobase/pull/770) +- fix(plugin-cm): fix unique option default value to update [`#768`](https://github.com/nocobase/nocobase/pull/768) +- fix(plugin-users): fix update profile 500 (#766) [`#767`](https://github.com/nocobase/nocobase/pull/767) +- fix: mysql column in where clause is ambiguous [`#756`](https://github.com/nocobase/nocobase/pull/756) +- feat(plugin-cm): add unique option for base fields [`#745`](https://github.com/nocobase/nocobase/pull/745) +- feat(plugin-verification): add plugin-verification and phone for users [`#722`](https://github.com/nocobase/nocobase/pull/722) +- feat: resize grid columns with drag and drop [`#748`](https://github.com/nocobase/nocobase/pull/748) +- refactor(client): split schema-initializer items into multiple files [`#744`](https://github.com/nocobase/nocobase/pull/744) +- refactor(plugin-workflow): change files mode to 644 [`#755`](https://github.com/nocobase/nocobase/pull/755) +- fix: db version check [`#749`](https://github.com/nocobase/nocobase/pull/749) +- feat: add examples [`#718`](https://github.com/nocobase/nocobase/pull/718) + +### Fixed + +- fix(plugin-workflow): fix value type for DatePicker to moment (#815) (#819) [`#815`](https://github.com/nocobase/nocobase/issues/815) +- fix(plugin-users): fix update profile 500 (#766) (#767) [`#766`](https://github.com/nocobase/nocobase/issues/766) +- fix: db version check (#749) [`#742`](https://github.com/nocobase/nocobase/issues/742) + +### Commits + +- fix(client): tab pane initializers for create form block [`7efc4bc`](https://github.com/nocobase/nocobase/commit/7efc4bca0e3c5f2e1c5cd9e1365e77a005f3e108) +- fix: transaction cannot be rolled back because it has been finished with state: rollback [`6dacec4`](https://github.com/nocobase/nocobase/commit/6dacec4158103fd165ec2865ea87ed9d3d4ceaa4) +- fix(database): fix the index name too long error [`7bfe6b8`](https://github.com/nocobase/nocobase/commit/7bfe6b8c46bef0183c4703683175561c7fc91aee) + +## [v0.7.4-alpha.7](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.4...v0.7.4-alpha.7) - 2022-08-15 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.7 [`#740`](https://github.com/nocobase/nocobase/pull/740) + +### Commits + +- docs: update release notes [`a260d29`](https://github.com/nocobase/nocobase/commit/a260d29222abe49d1453df828bb06a368e83dcf3) +- fix(collection-manager): update collection without fields [`03538ee`](https://github.com/nocobase/nocobase/commit/03538ee82f7b7cd73367d9904e4ac3c87d7a4345) + +## [v0.7.4-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.1...v0.7.4-alpha.4) - 2022-08-12 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.4 [`#727`](https://github.com/nocobase/nocobase/pull/727) +- fix: sync table sort to export [`#723`](https://github.com/nocobase/nocobase/pull/723) +- feat: full version of the NocoBase dockerfile [`#719`](https://github.com/nocobase/nocobase/pull/719) +- fix(plugin-workflow): fix extend collection [`#708`](https://github.com/nocobase/nocobase/pull/708) +- fix: DB_TABLE_PREFIX doesn't get applied [`#710`](https://github.com/nocobase/nocobase/pull/710) +- feat: default value [`#679`](https://github.com/nocobase/nocobase/pull/679) +- fix: required field delete submit error (#688) [`#694`](https://github.com/nocobase/nocobase/pull/694) + +### Commits + +- feat: add examples [`b848b9c`](https://github.com/nocobase/nocobase/commit/b848b9cd6774df6ed86acd30edb81ed6381c3555) +- fix: record provider required for read pretty [`38c3e3e`](https://github.com/nocobase/nocobase/commit/38c3e3e4cc2698069c741d25ddda8e3e8e4d1db0) +- Update README.zh-CN.md [`ba0e618`](https://github.com/nocobase/nocobase/commit/ba0e61873e7f69dee6a76929eb774828ac980760) + +## [v0.7.4-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.3-alpha.1...v0.7.4-alpha.1) - 2022-07-28 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.1 [`#696`](https://github.com/nocobase/nocobase/pull/696) +- fix: append roles to current user [`#695`](https://github.com/nocobase/nocobase/pull/695) +- fix: fix date format [`#686`](https://github.com/nocobase/nocobase/pull/686) +- test(plugin-workflow): skip prompt tests [`#692`](https://github.com/nocobase/nocobase/pull/692) +- fix: fix accuracy of percent [`#685`](https://github.com/nocobase/nocobase/pull/685) +- fix(plugin-workflow): adjust await sleep time for test cases [`#691`](https://github.com/nocobase/nocobase/pull/691) +- feat(plugin-workflow): add assignees config for prompt instruction [`#690`](https://github.com/nocobase/nocobase/pull/690) +- fix: role export button display (#616) [`#666`](https://github.com/nocobase/nocobase/pull/666) +- feat: uid validate [`#681`](https://github.com/nocobase/nocobase/pull/681) +- refactor: replace react-drag-listview with @dnd-kit/sortable [`#660`](https://github.com/nocobase/nocobase/pull/660) +- refactor(plugin-users): improve extendibility of middlewares [`#677`](https://github.com/nocobase/nocobase/pull/677) +- feat: o2m delete not refresh [`#646`](https://github.com/nocobase/nocobase/pull/646) +- feat: kanban add description [`#659`](https://github.com/nocobase/nocobase/pull/659) +- fix: field loss enum [`#667`](https://github.com/nocobase/nocobase/pull/667) +- feat: add editor hot key Ctrl+Shift+U [`#675`](https://github.com/nocobase/nocobase/pull/675) +- fix: Fix calendar change field error (#626) [`#671`](https://github.com/nocobase/nocobase/pull/671) +- chore: fix eslint not work [`#670`](https://github.com/nocobase/nocobase/pull/670) +- feat: number precision [`#661`](https://github.com/nocobase/nocobase/pull/661) +- feat: nginx config [`#664`](https://github.com/nocobase/nocobase/pull/664) +- feat: form item designer form switch issue [`#656`](https://github.com/nocobase/nocobase/pull/656) + +### Commits + +- fix(client): fieldNames of RecordPicker [`9038d11`](https://github.com/nocobase/nocobase/commit/9038d111ea71a89798cb1499f3dadc3f9c3dbfd7) +- fix(client): required for the sub-table field [`609b0e2`](https://github.com/nocobase/nocobase/commit/609b0e2ff2d5aece96185cbcd30ec1810194be0d) +- feat(client): tab icon [`d9b2bf8`](https://github.com/nocobase/nocobase/commit/d9b2bf8af1c42e2f4e81533f6db92b19523410bd) + +## [v0.7.3-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.2-alpha.2...v0.7.3-alpha.1) - 2022-08-10 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.3-alpha.1 [`#657`](https://github.com/nocobase/nocobase/pull/657) +- feat: print action [`#652`](https://github.com/nocobase/nocobase/pull/652) +- feat: restore action-hooks [`#655`](https://github.com/nocobase/nocobase/pull/655) +- feat: collections&fields pagination issue [`#653`](https://github.com/nocobase/nocobase/pull/653) +- fix(core): change proxied agent methods to native [`#654`](https://github.com/nocobase/nocobase/pull/654) +- feat: remove table field details actions [`#638`](https://github.com/nocobase/nocobase/pull/638) +- fix: link to default value [`#641`](https://github.com/nocobase/nocobase/pull/641) +- feat: support for displaying relational table fields in details or form blocks [`#635`](https://github.com/nocobase/nocobase/pull/635) +- fix: record picker cannot select from different pages [`#623`](https://github.com/nocobase/nocobase/pull/623) +- fix: dragging an element to the left, right, or bottom would cause the element to disappear [`#620`](https://github.com/nocobase/nocobase/pull/620) +- feat: table action add reload button [`#630`](https://github.com/nocobase/nocobase/pull/630) +- feat: improve language settings [`#627`](https://github.com/nocobase/nocobase/pull/627) +- feat: field assignment for custom actions supports string variables [`#597`](https://github.com/nocobase/nocobase/pull/597) +- fix: skip recursive remove on grid component [`#621`](https://github.com/nocobase/nocobase/pull/621) +- feat: fix time and collection pagination [`#618`](https://github.com/nocobase/nocobase/pull/618) +- feat: recordblockinitializers fields pick [`#558`](https://github.com/nocobase/nocobase/pull/558) +- fix: incorrectly :active background [`#607`](https://github.com/nocobase/nocobase/pull/607) +- fix: obo table selector [`#613`](https://github.com/nocobase/nocobase/pull/613) +- feat: form validator [`#569`](https://github.com/nocobase/nocobase/pull/569) +- fix: table selector [`#612`](https://github.com/nocobase/nocobase/pull/612) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.7 [`#611`](https://github.com/nocobase/nocobase/pull/611) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.3 [`#608`](https://github.com/nocobase/nocobase/pull/608) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.2 [`#606`](https://github.com/nocobase/nocobase/pull/606) + +### Commits + +- fix(client): build error [`600f13f`](https://github.com/nocobase/nocobase/commit/600f13f4a06ccfed27df928d7435afa83391c18a) +- fix(client): blocks are deleted when they are dragged below the current block [`20ab8c1`](https://github.com/nocobase/nocobase/commit/20ab8c15017d9dbf941bf963ce3023115050edf8) +- feat(client): plugin toolbar icons and translations [`c51c6c0`](https://github.com/nocobase/nocobase/commit/c51c6c097f24417f0ff82d3c5178ec3be1ee7630) + +## [v0.7.2-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.2-alpha.1...v0.7.2-alpha.2) - 2022-07-07 + +### Merged + +- fix: field permissions cannot be saved [`#605`](https://github.com/nocobase/nocobase/pull/605) +- fix(plugin-workflow): fix revision bug [`#603`](https://github.com/nocobase/nocobase/pull/603) +- fix(plugin-workflow): fix select value [`#600`](https://github.com/nocobase/nocobase/pull/600) +- fix(plugin-workflow): fix CollectionFieldSelect component [`#598`](https://github.com/nocobase/nocobase/pull/598) +- feat(plugin-workflow): add association select in calculation [`#584`](https://github.com/nocobase/nocobase/pull/584) + +### Fixed + +- fix: field permissions cannot be saved (#605) [`#599`](https://github.com/nocobase/nocobase/issues/599) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.1 [`a0cc501`](https://github.com/nocobase/nocobase/commit/a0cc50154cc292248ef107c95a24bcc0c7a586fa) +- fix(g2plot): import all plots [`2bb8fd9`](https://github.com/nocobase/nocobase/commit/2bb8fd984fb5c9cdd484cffc18411f4b644b8fb3) +- Update issue templates [`7767335`](https://github.com/nocobase/nocobase/commit/7767335ba7fe83e22bcc1976a8fd57926dc12c0a) + +## [v0.7.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.1-alpha.5...v0.7.2-alpha.1) - 2022-07-05 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.1 [`#578`](https://github.com/nocobase/nocobase/pull/578) +- fix: drop all foreign keys [`#576`](https://github.com/nocobase/nocobase/pull/576) +- fix(plugin-workflow): fix collection trigger config [`#575`](https://github.com/nocobase/nocobase/pull/575) +- feat: filter with variable [`#574`](https://github.com/nocobase/nocobase/pull/574) +- feat(cli): check database version before installation [`#572`](https://github.com/nocobase/nocobase/pull/572) +- fix(database): index invalid [`#564`](https://github.com/nocobase/nocobase/pull/564) +- fix: export association table data [`#561`](https://github.com/nocobase/nocobase/pull/561) +- Refactor(plugin workflow): move client files into plugin [`#556`](https://github.com/nocobase/nocobase/pull/556) +- fix(database): constraints default to false [`#550`](https://github.com/nocobase/nocobase/pull/550) +- fix(plugin-workflow): fix select width [`#552`](https://github.com/nocobase/nocobase/pull/552) +- feat: compatible with old kanban [`#553`](https://github.com/nocobase/nocobase/pull/553) +- feat: display association fields [`#512`](https://github.com/nocobase/nocobase/pull/512) +- Fix(plugin workflow) [`#549`](https://github.com/nocobase/nocobase/pull/549) +- fix:update mysql port [`#548`](https://github.com/nocobase/nocobase/pull/548) +- fix: export of relation blocks [`#546`](https://github.com/nocobase/nocobase/pull/546) +- fix(plugin-workflow): clear options when change collection [`#547`](https://github.com/nocobase/nocobase/pull/547) +- feat(plugin-workflow): add race mode [`#542`](https://github.com/nocobase/nocobase/pull/542) +- fix(client): change toArr to _.castArray in select component [`#543`](https://github.com/nocobase/nocobase/pull/543) +- chore(versions): ๐Ÿ˜Š publish v0.7.1-alpha.7 [`#539`](https://github.com/nocobase/nocobase/pull/539) + +### Commits + +- fix(client): comment out useless code [`4e9384b`](https://github.com/nocobase/nocobase/commit/4e9384bce27676a3cc1ce8d8fd08f5611cffbe5a) +- fix(workflow): merge workflow providers [`008a7f7`](https://github.com/nocobase/nocobase/commit/008a7f7f3351bdedf01b4490d1658edeacc95a16) +- feat(client): integer field [`9928424`](https://github.com/nocobase/nocobase/commit/9928424f5a163fe4edd7cfd60f349ca65b47c9bf) + +## [v0.7.1-alpha.5](https://github.com/nocobase/nocobase/compare/v0.7.1-alpha.4...v0.7.1-alpha.5) - 2022-06-26 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.1-alpha.5 [`c9159c6`](https://github.com/nocobase/nocobase/commit/c9159c6cf4b7deb80e87122d4b7967a510b8ae7c) +- fix(cli): upgrade from docker [`c4c96e5`](https://github.com/nocobase/nocobase/commit/c4c96e5a79562d87b597d23f0e536cd19687c890) + +## [v0.7.1-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.82...v0.7.1-alpha.4) - 2022-06-26 + +### Merged + +- chore(create-nocobase-app): fix some bugs [`#538`](https://github.com/nocobase/nocobase/pull/538) +- fix: destroy collection fields [`#536`](https://github.com/nocobase/nocobase/pull/536) +- feat(plugin-workflow): add delay node type [`#532`](https://github.com/nocobase/nocobase/pull/532) +- refactor: client application [`#533`](https://github.com/nocobase/nocobase/pull/533) +- fix: missing transaction [`#531`](https://github.com/nocobase/nocobase/pull/531) +- fix: add ellipsis property to record picker [`#527`](https://github.com/nocobase/nocobase/pull/527) +- fix: remove pattern without form item [`#528`](https://github.com/nocobase/nocobase/pull/528) +- fix(plugin-workflow): set current when update [`#526`](https://github.com/nocobase/nocobase/pull/526) +- fix: order nulls last [`#519`](https://github.com/nocobase/nocobase/pull/519) +- fix: action loading, refresh context, form submit and validate [`#523`](https://github.com/nocobase/nocobase/pull/523) +- Fix field pattern [`#520`](https://github.com/nocobase/nocobase/pull/520) +- fix(plugin-workflow): fix searchable select min-width [`#524`](https://github.com/nocobase/nocobase/pull/524) +- fix: template with fields only [`#517`](https://github.com/nocobase/nocobase/pull/517) +- fix(plugin-workflow): fix update workflow current property [`#521`](https://github.com/nocobase/nocobase/pull/521) +- refactor(plugin-workflow): abstract to classes [`#515`](https://github.com/nocobase/nocobase/pull/515) +- feat: column sortable and form item pattern [`#518`](https://github.com/nocobase/nocobase/pull/518) +- fix(custom-request): support string/json templates [`#514`](https://github.com/nocobase/nocobase/pull/514) +- feat: add block title [`#513`](https://github.com/nocobase/nocobase/pull/513) +- fix: remove collections & fields from db [`#511`](https://github.com/nocobase/nocobase/pull/511) +- feat: improve migrations [`#510`](https://github.com/nocobase/nocobase/pull/510) +- fix(client): consolidate usage of date/time as UTC in transfering [`#509`](https://github.com/nocobase/nocobase/pull/509) +- fix: formula bug [`#508`](https://github.com/nocobase/nocobase/pull/508) +- fix: default exportable fields [`#506`](https://github.com/nocobase/nocobase/pull/506) +- feat: association field block [`#493`](https://github.com/nocobase/nocobase/pull/493) +- feat: plugin export [`#479`](https://github.com/nocobase/nocobase/pull/479) +- fix(client): package path (fix #503) [`#504`](https://github.com/nocobase/nocobase/pull/504) +- fix: create or delete collection error [`#501`](https://github.com/nocobase/nocobase/pull/501) +- feat: update collections & fields [`#500`](https://github.com/nocobase/nocobase/pull/500) +- fix: rollback when field creation fails [`#498`](https://github.com/nocobase/nocobase/pull/498) +- fix(client): set `dropdownMatchSelectWidth` to false globally [`#497`](https://github.com/nocobase/nocobase/pull/497) +- fix(client): no-key warning in user menu items [`#496`](https://github.com/nocobase/nocobase/pull/496) +- Feat(plugin workflow): cron field for schedule trigger configuration [`#495`](https://github.com/nocobase/nocobase/pull/495) +- feat: audit logs [`#494`](https://github.com/nocobase/nocobase/pull/494) +- refactor(plugin-workflow): add revision column to execution [`#491`](https://github.com/nocobase/nocobase/pull/491) +- feat: relation field uiSchema [`#487`](https://github.com/nocobase/nocobase/pull/487) +- feat: change FK to input component [`#488`](https://github.com/nocobase/nocobase/pull/488) +- fix(plugin-multi-app-manager): fix pg cannot create database block tests [`#486`](https://github.com/nocobase/nocobase/pull/486) +- refactor(database): hook proxy [`#402`](https://github.com/nocobase/nocobase/pull/402) +- feat: chart blocks [`#484`](https://github.com/nocobase/nocobase/pull/484) +- Refactor(plugin workflow): support number in repeat config for schedule [`#482`](https://github.com/nocobase/nocobase/pull/482) +- chore(debug): add debug config [`#475`](https://github.com/nocobase/nocobase/pull/475) +- fix: has one bug [`#478`](https://github.com/nocobase/nocobase/pull/478) +- feat: relationships [`#473`](https://github.com/nocobase/nocobase/pull/473) +- fix(plugin-workflow): fix collection trigger transaction [`#474`](https://github.com/nocobase/nocobase/pull/474) +- fix(plugin-workflow): temporary solution for collection trigger conditions [`#472`](https://github.com/nocobase/nocobase/pull/472) +- fix: markdown component [`#469`](https://github.com/nocobase/nocobase/pull/469) +- fix: formula field and percent field [`#467`](https://github.com/nocobase/nocobase/pull/467) +- fix(plugin-workflow): fix update workflow action [`#464`](https://github.com/nocobase/nocobase/pull/464) +- fix: update formula field and percent field [`#461`](https://github.com/nocobase/nocobase/pull/461) +- feat: add formula field type [`#457`](https://github.com/nocobase/nocobase/pull/457) +- fix: the details of the associated data in the subtable are not displayed [`#454`](https://github.com/nocobase/nocobase/pull/454) +- fix(plugin-workflow): fix languages [`#451`](https://github.com/nocobase/nocobase/pull/451) +- fix: afterSync hook not triggered [`#450`](https://github.com/nocobase/nocobase/pull/450) +- docs(various): Improve readability [`#447`](https://github.com/nocobase/nocobase/pull/447) +- feat: custom request [`#439`](https://github.com/nocobase/nocobase/pull/439) +- Feat(plugin workflow): schedule trigger [`#438`](https://github.com/nocobase/nocobase/pull/438) +- feat: db migrator [`#432`](https://github.com/nocobase/nocobase/pull/432) +- fix(client): select component cannot be opened in sub-table block [`#431`](https://github.com/nocobase/nocobase/pull/431) +- docs(github): change to markdown format [`#430`](https://github.com/nocobase/nocobase/pull/430) +- fix(cli): typo [`#429`](https://github.com/nocobase/nocobase/pull/429) -## 2022/05/13 ~ v0.7.0-alpha.33 +### Fixed + +- fix(client): package path (fix #503) (#504) [`#503`](https://github.com/nocobase/nocobase/issues/503) + +### Commits + +- feat(client): update locales [`e57e60e`](https://github.com/nocobase/nocobase/commit/e57e60e6cb84431e694e69830d128cd71938388f) +- docs: update doc [`e5cb948`](https://github.com/nocobase/nocobase/commit/e5cb94803f738961fcbc1986a94d258ef9e191a9) +- fix(client): improve datepicker component, date with time zone, gmt support [`1c03fbb`](https://github.com/nocobase/nocobase/commit/1c03fbb853b5885547835f50fc9a0932f63c363b) -- fix: link-to field data scope error (#1337) -- feat(plugin workflow): revisions (#379) -- fix(database): fix option-parser include list index (#371) -- fix(plugin-workflow): fix duplicated description in fields values (#368) -- fix(database): fix type and transaction in repository (#366) -- fix(plugin workflow): fix transaction of execution (#364) +## [v0.7.0-alpha.82](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.67...v0.7.0-alpha.82) - 2022-05-27 -## 2022/05/05 ~ v0.7.0-alpha.30 +### Merged -- fix(client): upgrade formily packages -- fix(client): setFormValueChanged must be defined +- feat(client,sdk): improve api client [`#425`](https://github.com/nocobase/nocobase/pull/425) +- feat: add create-plugin command [`#423`](https://github.com/nocobase/nocobase/pull/423) +- feat: add button color [`#420`](https://github.com/nocobase/nocobase/pull/420) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.78 [`#419`](https://github.com/nocobase/nocobase/pull/419) -## 2022/05/01 ~ v0.7.0-alpha.27 +### Commits -- fix: use wrapper when greater than one column -- fix: props for CreateFormBlockInitializers -- fix: add schema initializer icon -- fix: plugin workflow (#349) -- fix: db:sync not working (#348) -- fix(plugin-workflow): fix trigger bind logic to avoid duplication (#347) -- fix(plugin workflow) (#346) -- fix: action open mode -- fix: menu url style (#344) -- feat: action loading -- fix: compile the label field -- fix: invalid drag and drop sort +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.82 [`4820fd0`](https://github.com/nocobase/nocobase/commit/4820fd09375c7200d1ea0bb0aab1bd4783b80d3d) +- docs: update installation documentation [`90623e8`](https://github.com/nocobase/nocobase/commit/90623e8e9a175238c3fc8bb527c8884c207ff78e) +- fix: "typescript": "4.5.5" [`c071217`](https://github.com/nocobase/nocobase/commit/c071217fff819378e982e611af1fd9fa71ebc5fb) -## 2022/04/25 ~ v0.7.0-alpha.16 +## [v0.7.0-alpha.67](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.64...v0.7.0-alpha.67) - 2022-05-24 -- fix: cannot find module mkdirp (#330) -- fix(plugin workflow): UX issues (#329) -- fix(plugin-file-manager): test failed -- fix(app-server): dist options - -## 2022/04/25 ~ v0.7.0-alpha.0 +### Commits -- Alpha Version +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.67 [`3262979`](https://github.com/nocobase/nocobase/commit/326297936b17c6da3f6e86891c9772c72b088312) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.66 [`9c19e4d`](https://github.com/nocobase/nocobase/commit/9c19e4d67f0b59b8ec957b1a9164acc88a50416d) -## 2021/10/07 ~ v0.5.0 +## [v0.7.0-alpha.64](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.60...v0.7.0-alpha.64) - 2022-05-24 -- The second preview version +### Merged -## 2021/04/07 ~ v0.4.0 +- feat: update docs [`#413`](https://github.com/nocobase/nocobase/pull/413) -- The first preview version +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.63 [`c01c695`](https://github.com/nocobase/nocobase/commit/c01c6952a58c2677d9f45fb41872363afda25197) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.64 [`35d01a5`](https://github.com/nocobase/nocobase/commit/35d01a5fb0f0522e263c7fc37bc8384f99424240) +- fix(plugin-users): add translations (#416) [`72c3ba4`](https://github.com/nocobase/nocobase/commit/72c3ba4fae5cdee6b84eed65e3a35180186a987e) + +## [v0.7.0-alpha.60](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.59...v0.7.0-alpha.60) - 2022-05-23 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.60 [`f0d0afb`](https://github.com/nocobase/nocobase/commit/f0d0afbb19dbd90ac3cf4155748fa084c67f54ee) +- fix(create-nocobase-app): storage path [`a0245ca`](https://github.com/nocobase/nocobase/commit/a0245caeb816fede8bb40c33e694de6419a21f26) + +## [v0.7.0-alpha.59](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.58...v0.7.0-alpha.59) - 2022-05-23 + +### Merged + +- refactor(plugin-workflow): change column type of executed from boolean to integer [`#411`](https://github.com/nocobase/nocobase/pull/411) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.59 [`c90e5ae`](https://github.com/nocobase/nocobase/commit/c90e5aee4c8257a3ab7ff492e69cb568cccff8b5) +- docs: update roadmap and release notes [`f198411`](https://github.com/nocobase/nocobase/commit/f198411c7386afaa4b6fc41ebb1806d40e3752b1) +- Update roadmap.md [`e5c5e16`](https://github.com/nocobase/nocobase/commit/e5c5e16b73174bf8092f730b196ef2ef088001b4) + +## [v0.7.0-alpha.58](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.57...v0.7.0-alpha.58) - 2022-05-22 + +### Merged + +- fix: 204 no content response [`#378`](https://github.com/nocobase/nocobase/pull/378) +- feat: destroy association field after target collection destroy [`#376`](https://github.com/nocobase/nocobase/pull/376) +- fix(type): use sequelize native Transactionable instead of TransactionAble [`#410`](https://github.com/nocobase/nocobase/pull/410) +- fix(plugin-workflow): remove previous listeners when collection changed in config [`#409`](https://github.com/nocobase/nocobase/pull/409) +- feat: add custom action [`#396`](https://github.com/nocobase/nocobase/pull/396) +- refactor(plugin-workflow): multiple instances and event management (fix #384) [`#408`](https://github.com/nocobase/nocobase/pull/408) + +### Fixed + +- refactor(plugin-workflow): multiple instances and event management (fix #384) (#408) [`#384`](https://github.com/nocobase/nocobase/issues/384) [`#384`](https://github.com/nocobase/nocobase/issues/384) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.58 [`19ee422`](https://github.com/nocobase/nocobase/commit/19ee42257edf17804d548ffd5ba9ddff6dc775d1) +- fix(plugin-acl): missing pagination parameters #394 [`b44753d`](https://github.com/nocobase/nocobase/commit/b44753d528a12075e64754828982ca80dfc90263) +- fix: missing isTruly/isFalsy filter operators #390 [`e596e6d`](https://github.com/nocobase/nocobase/commit/e596e6d365a3e46859e7d7bafcc3e54d286656cf) + +## [v0.7.0-alpha.57](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.34...v0.7.0-alpha.57) - 2022-05-19 + +### Merged + +- fix(plugin-workflow): fix node type title in drawers [`#389`](https://github.com/nocobase/nocobase/pull/389) + +### Commits + +- feat: build, cli, devtools, sdk, docs... [`6410bc8`](https://github.com/nocobase/nocobase/commit/6410bc8a75fa4dda9fe2bccfadca336fc8e794d0) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.57 [`33f076e`](https://github.com/nocobase/nocobase/commit/33f076e430645055d79254592971c50d9f131a6d) +- Update README.md [`e24e007`](https://github.com/nocobase/nocobase/commit/e24e007395ed09463acdc3cf53b856ca9e0dd664) + +## [v0.7.0-alpha.34](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.33...v0.7.0-alpha.34) - 2022-05-14 + +### Merged + +- Fix(plugin workflow): fix cannot get job result properties [`#382`](https://github.com/nocobase/nocobase/pull/382) +- feat: exist on server start throw error [`#374`](https://github.com/nocobase/nocobase/pull/374) +- chore: application options [`#375`](https://github.com/nocobase/nocobase/pull/375) +- fix: not in operator with null value record [`#377`](https://github.com/nocobase/nocobase/pull/377) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.34 [`48b2b4b`](https://github.com/nocobase/nocobase/commit/48b2b4bc7bbc39533e461d34d7f026a4ad1a9b5c) +- feat: add plugins:getPinned action api [`b5c24aa`](https://github.com/nocobase/nocobase/commit/b5c24aa7999934f2b6f7ca1e9e9448b220a61af2) + +## [v0.7.0-alpha.33](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.30...v0.7.0-alpha.33) - 2022-05-13 + +### Merged + +- Feat(plugin workflow): revisions [`#379`](https://github.com/nocobase/nocobase/pull/379) +- fix(database): fix option-parser include list index [`#371`](https://github.com/nocobase/nocobase/pull/371) +- fix(plugin-worklfow): fix duplicated description in fields values [`#368`](https://github.com/nocobase/nocobase/pull/368) +- fix(database): fix type and transaction in repository [`#366`](https://github.com/nocobase/nocobase/pull/366) +- Fix(plugin workflow): fix transaction of execution [`#364`](https://github.com/nocobase/nocobase/pull/364) +- fix(plugin-workflow): add document title [`#363`](https://github.com/nocobase/nocobase/pull/363) +- fix: set visible with confirm [`#361`](https://github.com/nocobase/nocobase/pull/361) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.33 [`c4b5f4f`](https://github.com/nocobase/nocobase/commit/c4b5f4f84b18c2d8bc40f82947b9338e2f620984) +- Update issue templates [`8466159`](https://github.com/nocobase/nocobase/commit/846615937add786319dde167f2b28e981941e18e) +- fix: link-to field data scope error (#1337) [`2156c70`](https://github.com/nocobase/nocobase/commit/2156c70ff3a7e65a8ad1bf14602f0dad150382ab) + +## [v0.7.0-alpha.30](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.29...v0.7.0-alpha.30) - 2022-05-05 + +### Merged + +- fix(plugin-workflow): fix tests [`#360`](https://github.com/nocobase/nocobase/pull/360) +- Feat: Unsaved changes tip [`#359`](https://github.com/nocobase/nocobase/pull/359) +- Fix acl error [`#358`](https://github.com/nocobase/nocobase/pull/358) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.30 [`781fb0a`](https://github.com/nocobase/nocobase/commit/781fb0a999854341cd8c353d31ae5a11ecbbe775) +- fix(client): upgrade formily packages [`58b151c`](https://github.com/nocobase/nocobase/commit/58b151c74512d5fa3f33c094580c4f5f15792342) +- fix(client): setFormValueChanged must be defined [`b33c819`](https://github.com/nocobase/nocobase/commit/b33c8198e676cc935bccf995ff3d18b249290062) + +## [v0.7.0-alpha.29](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.28...v0.7.0-alpha.29) - 2022-05-04 + +### Merged + +- fix: empty resource acl error [`#357`](https://github.com/nocobase/nocobase/pull/357) +- Feat: from values changed when unsaved will prompt [`#351`](https://github.com/nocobase/nocobase/pull/351) +- fix: modify filter close icon color [`#356`](https://github.com/nocobase/nocobase/pull/356) +- fix(plugin-workflow): fix i18n [`#354`](https://github.com/nocobase/nocobase/pull/354) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.29 [`46e660b`](https://github.com/nocobase/nocobase/commit/46e660b10d1cf94ecb808a9a45edb5e8d40398dc) +- fix(client): color styling [`90a58cc`](https://github.com/nocobase/nocobase/commit/90a58cc3cf3eab02bc61f363d4476454383907d3) +- feat(client): translation [`33a99d9`](https://github.com/nocobase/nocobase/commit/33a99d91b8dc19186ed743b1bbc073c09dd4629e) + +## [v0.7.0-alpha.28](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.24...v0.7.0-alpha.28) - 2022-05-02 + +### Merged + +- Fix(plugin-workflow) [`#353`](https://github.com/nocobase/nocobase/pull/353) +- fix(plugin-file-manager): upgrade multer-aliyun-oss package to fix size [`#352`](https://github.com/nocobase/nocobase/pull/352) +- feat: improve code [`#350`](https://github.com/nocobase/nocobase/pull/350) +- Fix/plugin workflow [`#349`](https://github.com/nocobase/nocobase/pull/349) +- fix: db:sync not working [`#348`](https://github.com/nocobase/nocobase/pull/348) +- fix(plugin-workflow): fix trigger bind logic to avoid duplication [`#347`](https://github.com/nocobase/nocobase/pull/347) +- Fix(plugin workflow) [`#346`](https://github.com/nocobase/nocobase/pull/346) +- Fix:menu url style [`#344`](https://github.com/nocobase/nocobase/pull/344) +- chore(plugin-workflow): add translation [`#345`](https://github.com/nocobase/nocobase/pull/345) +- fix(plugin-workflow): break cycling trigger through transaction id [`#341`](https://github.com/nocobase/nocobase/pull/341) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.28 [`a48d004`](https://github.com/nocobase/nocobase/commit/a48d00492ebc34c66c63d9644530c5b8a7c9914a) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.27 [`ebfe11f`](https://github.com/nocobase/nocobase/commit/ebfe11ff09bf50b4b2322cbbad65b4ea936fdb71) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.26 [`515d952`](https://github.com/nocobase/nocobase/commit/515d95276700ffafe7d2785a93fc510d36da462b) + +## [v0.7.0-alpha.24](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.16...v0.7.0-alpha.24) - 2022-04-29 + +### Merged + +- fix: model.beforeCreate not called [`#343`](https://github.com/nocobase/nocobase/pull/343) +- fix: thumbnail image in kanban card [`#338`](https://github.com/nocobase/nocobase/pull/338) +- feat: db authenticate [`#342`](https://github.com/nocobase/nocobase/pull/342) +- chore: install subApp asynchronous [`#336`](https://github.com/nocobase/nocobase/pull/336) +- fix(plugin-workflow): change collection values input ux in workflow nodes [`#340`](https://github.com/nocobase/nocobase/pull/340) +- feat: improvements [`#335`](https://github.com/nocobase/nocobase/pull/335) +- Feat(plugin workflow): add changed fields to model trigger config [`#332`](https://github.com/nocobase/nocobase/pull/332) + +### Commits + +- docs: update readme.md [`aacec30`](https://github.com/nocobase/nocobase/commit/aacec306733ee1cab3c3c7e5a7fcbbeb372a03e9) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.24 [`1fb2dd8`](https://github.com/nocobase/nocobase/commit/1fb2dd884c4f2d2167f5dde40a15012a752e53ab) +- feat: uuid field [`2c0d3fc`](https://github.com/nocobase/nocobase/commit/2c0d3fcc5ad1bce2cbc47e82e76277918c66c565) + +## [v0.7.0-alpha.16](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.15...v0.7.0-alpha.16) - 2022-04-27 + +### Merged + +- fix: cannot find module mkdirp [`#330`](https://github.com/nocobase/nocobase/pull/330) +- Fix(plugin workflow): UX issues [`#329`](https://github.com/nocobase/nocobase/pull/329) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.16 [`27399f4`](https://github.com/nocobase/nocobase/commit/27399f4e5e6d1f9f2c0eee4d6be8ff89df625bd8) +- feat: improve code [`c71f45c`](https://github.com/nocobase/nocobase/commit/c71f45ca6a15149703fdf12f4d0f68a226d10a7e) +- Update README.md [`4317de7`](https://github.com/nocobase/nocobase/commit/4317de7eb116dd7d538d0cf2c4782372e1b5fce2) + +## [v0.7.0-alpha.15](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.6...v0.7.0-alpha.15) - 2022-04-26 + +### Merged + +- fix: create-nocobase-app compatibility [`#323`](https://github.com/nocobase/nocobase/pull/323) +- fix: create-nocobase-app client package version [`#321`](https://github.com/nocobase/nocobase/pull/321) +- fix: app manager [`#320`](https://github.com/nocobase/nocobase/pull/320) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.15 [`f0d9b0e`](https://github.com/nocobase/nocobase/commit/f0d9b0ec026b589b3d10dcdbbbb656baca1a9004) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.14 [`8736278`](https://github.com/nocobase/nocobase/commit/87362789f331e043336b571137a7ace7e38a6da1) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.13 [`62eb85d`](https://github.com/nocobase/nocobase/commit/62eb85de5f341f343577232ebecce7f9fb7a5b21) + +## [v0.7.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.5...v0.7.0-alpha.6) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.6 [`7d0087c`](https://github.com/nocobase/nocobase/commit/7d0087cbb3b7663ba05366ca3b80db2853669ee9) + +## [v0.7.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.4...v0.7.0-alpha.5) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.5 [`a00b45a`](https://github.com/nocobase/nocobase/commit/a00b45a2686695c5f4824d074ac5e1aff210793a) +- fix(plugin-system-settings): cannot read property cliArgs of undefined [`b0d3274`](https://github.com/nocobase/nocobase/commit/b0d3274b2d98147679f91c468327287675de0c08) + +## [v0.7.0-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.3...v0.7.0-alpha.4) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.4 [`327e413`](https://github.com/nocobase/nocobase/commit/327e413b6dd94dad9b756b1e08cda47cad734dc1) + +## [v0.7.0-alpha.3](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.2...v0.7.0-alpha.3) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.3 [`b12507f`](https://github.com/nocobase/nocobase/commit/b12507f6e4bcb5f1fd8285670a43fb3807d90ea0) +- fix: antd use ~v4.19.5 [`733c704`](https://github.com/nocobase/nocobase/commit/733c7048ed0e00bd2c01bfaf8452731a9a89670e) + +## [v0.7.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.1...v0.7.0-alpha.2) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.2 [`0e0e99e`](https://github.com/nocobase/nocobase/commit/0e0e99ef79c0b25bb0b45ecaa477c049cb16afee) +- feat(license): update license [`ed9b2b6`](https://github.com/nocobase/nocobase/commit/ed9b2b6d950cab33423225069a7b0de24b65ef45) +- feat: kanban disableCardDrag [`05a251b`](https://github.com/nocobase/nocobase/commit/05a251b1fc06012e77e402b422e3120430effef1) + +## [v0.7.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.0...v0.7.0-alpha.1) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.1 [`e7293ad`](https://github.com/nocobase/nocobase/commit/e7293ad7aadbdf2084042f7800a232af6e0b7a8a) + +## [v0.7.0-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.12...v0.7.0-alpha.0) - 2022-04-25 + +### Merged + +- refactor: modify default lable style [`#318`](https://github.com/nocobase/nocobase/pull/318) +- Fix multiple apps [`#317`](https://github.com/nocobase/nocobase/pull/317) +- Fix multiple apps [`#316`](https://github.com/nocobase/nocobase/pull/316) +- Fix acl target action error [`#311`](https://github.com/nocobase/nocobase/pull/311) +- feat: file storages [`#314`](https://github.com/nocobase/nocobase/pull/314) +- fix(plugin-workflow): fix some ux [`#313`](https://github.com/nocobase/nocobase/pull/313) +- fix(plugin-workflow): fix query node getter field [`#308`](https://github.com/nocobase/nocobase/pull/308) +- Fix create nocobase app [`#307`](https://github.com/nocobase/nocobase/pull/307) +- fix: create-nocobase-app [`#306`](https://github.com/nocobase/nocobase/pull/306) +- Fix create nocobase app [`#305`](https://github.com/nocobase/nocobase/pull/305) +- fix: block item add overflow:hidden [`#304`](https://github.com/nocobase/nocobase/pull/304) + +### Commits + +- feat(license): replace MIT license with Apache-2.0 [`717efa8`](https://github.com/nocobase/nocobase/commit/717efa889d471fac3f909137e2adb96586414aad) +- feat: translations [`5c0184a`](https://github.com/nocobase/nocobase/commit/5c0184a397885d6de5307a7087c2d93042cd49f8) +- feat: translations [`1f04f90`](https://github.com/nocobase/nocobase/commit/1f04f90a00e071aa9ab294f21e8d02373191eecc) + +## [v0.6.2-alpha.12](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.11...v0.6.2-alpha.12) - 2022-04-21 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.12 [`5a668cf`](https://github.com/nocobase/nocobase/commit/5a668cf9d0450944f3d2d5beed9e8d5e5b96f5d7) +- fix: create-nocobase-app publish [`269e73e`](https://github.com/nocobase/nocobase/commit/269e73ef19d41835813609b39744c40fb1fff92e) +- chore: create-nocobase-app package.json [`1c30ee1`](https://github.com/nocobase/nocobase/commit/1c30ee1c630d021dc919ce6fcc56cce179db20ae) + +## [v0.6.2-alpha.11](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.10...v0.6.2-alpha.11) - 2022-04-20 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.11 [`8741015`](https://github.com/nocobase/nocobase/commit/8741015a6237cd3ea7342edcb7aa11fe794e6b18) +- fix: read-config [`f6d23ad`](https://github.com/nocobase/nocobase/commit/f6d23add8c1845dd4b567d2958c24ada8ae8cee0) + +## [v0.6.2-alpha.10](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.9...v0.6.2-alpha.10) - 2022-04-20 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.10 [`693c668`](https://github.com/nocobase/nocobase/commit/693c668282d8032b69245ae7e5c1cafa3c41e584) +- fix: publish [`9e717ae`](https://github.com/nocobase/nocobase/commit/9e717ae3ca2f453005602df03b08edca14c56505) + +## [v0.6.2-alpha.9](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.7...v0.6.2-alpha.9) - 2022-04-20 + +### Merged + +- feat: details block [`#302`](https://github.com/nocobase/nocobase/pull/302) +- Fix(plugin workflow): fix collection data form view [`#301`](https://github.com/nocobase/nocobase/pull/301) +- feat: add $isCurrentUser filter operator [`#299`](https://github.com/nocobase/nocobase/pull/299) +- fix: through table primaryKey error [`#297`](https://github.com/nocobase/nocobase/pull/297) +- feat: junction collection for linkTo field [`#296`](https://github.com/nocobase/nocobase/pull/296) +- fix: long text will wrap in FormItem [`#295`](https://github.com/nocobase/nocobase/pull/295) +- fix(client): avoid cannot getField by randomly generated name and throw error [`#294`](https://github.com/nocobase/nocobase/pull/294) +- Feat/create nocobase app [`#273`](https://github.com/nocobase/nocobase/pull/273) +- feat(plugin-workflow): add all crud nodes for workflow [`#293`](https://github.com/nocobase/nocobase/pull/293) +- feat(plugin-workflow): add create node component [`#292`](https://github.com/nocobase/nocobase/pull/292) +- fix: rich text removed value avoid dispaly html string [`#290`](https://github.com/nocobase/nocobase/pull/290) + +### Commits + +- fix: update yarn.lock [`fcfde7e`](https://github.com/nocobase/nocobase/commit/fcfde7ed0a5b7fdae3fe7424e406ca2e5d944f9b) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.9 [`1afc867`](https://github.com/nocobase/nocobase/commit/1afc86733cb090cf5f45c781ad6488c32caa740c) +- fix: update useCreateActionProps & useUpdateActionProps [`fca0943`](https://github.com/nocobase/nocobase/commit/fca0943e8d013a0e8bb46756b89cfc992aa1b6c1) + +## [v0.6.2-alpha.7](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.6...v0.6.2-alpha.7) - 2022-04-16 + +### Commits + +- feat: improve code [`2202cc6`](https://github.com/nocobase/nocobase/commit/2202cc64d960918113b50bf0dc352a59cac04484) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.7 [`d165782`](https://github.com/nocobase/nocobase/commit/d165782860681af206005039f4bec00fc7fe4241) + +## [v0.6.2-alpha.6](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.5...v0.6.2-alpha.6) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.6 [`faa064a`](https://github.com/nocobase/nocobase/commit/faa064ae8dbdcba98e1782a8e2c0b5a338e68219) + +## [v0.6.2-alpha.5](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.4...v0.6.2-alpha.5) - 2022-04-15 + +### Commits + +- chore: create-nocobase-app lib [`fc27ebc`](https://github.com/nocobase/nocobase/commit/fc27ebc08a5c889596432a2ece6ba9e0c8957bab) +- chore: create-nocobase-app [`8d0703c`](https://github.com/nocobase/nocobase/commit/8d0703c568ad0e66a14e3a4d47d57b1d63cd64f8) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.5 [`2b21546`](https://github.com/nocobase/nocobase/commit/2b21546c4c50c7b5447d991d3852b90dca7219b9) + +## [v0.6.2-alpha.4](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.3...v0.6.2-alpha.4) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.4 [`e3a9e92`](https://github.com/nocobase/nocobase/commit/e3a9e924e002afeb02fb785fcecb124dd6d995a1) + +## [v0.6.2-alpha.3](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.1...v0.6.2-alpha.3) - 2022-04-15 + +### Commits + +- feat: workspaces [`0eb6997`](https://github.com/nocobase/nocobase/commit/0eb6997c7257332751e49d4a6c623c2ccd786495) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.3 [`2feae05`](https://github.com/nocobase/nocobase/commit/2feae051e24a46c0b78b31ef2a4dafdb14344398) +- chore: 0.6.2-alpha.2 [`dbf86d5`](https://github.com/nocobase/nocobase/commit/dbf86d52ccc7653e6b23386c2aa465402702da85) + +## [v0.6.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.0...v0.6.2-alpha.1) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.1 [`c6b58b2`](https://github.com/nocobase/nocobase/commit/c6b58b215e43a48d625b8493eefc438c6b9e1e7a) + +## [v0.6.2-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.1-alpha.0...v0.6.2-alpha.0) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.0 [`5351fb3`](https://github.com/nocobase/nocobase/commit/5351fb3ab34a92b97102640dffa7aeafa5294b97) + +## [v0.6.1-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.0...v0.6.1-alpha.0) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.1-alpha.0 [`0b52b73`](https://github.com/nocobase/nocobase/commit/0b52b731dcd23e6ae251c4d5f5c4da781dd109d5) + +## [v0.6.0](https://github.com/nocobase/nocobase/compare/v0.6.0-alpha.1...v0.6.0) - 2022-04-15 + +### Merged + +- Feat: plugin-workflow [`#288`](https://github.com/nocobase/nocobase/pull/288) +- fix: slate style [`#289`](https://github.com/nocobase/nocobase/pull/289) +- fix: toJSON with belongsTo Assoication [`#287`](https://github.com/nocobase/nocobase/pull/287) +- feat: improve acl module [`#283`](https://github.com/nocobase/nocobase/pull/283) +- fix: destroy own records [`#285`](https://github.com/nocobase/nocobase/pull/285) +- feat(plugin-workflow): support context variables from model trigger [`#284`](https://github.com/nocobase/nocobase/pull/284) +- fix: acl write [`#280`](https://github.com/nocobase/nocobase/pull/280) +- fix: call root server hook after insertNewSchema [`#282`](https://github.com/nocobase/nocobase/pull/282) +- Feat/plugin workflow [`#278`](https://github.com/nocobase/nocobase/pull/278) +- feat: acl provider [`#279`](https://github.com/nocobase/nocobase/pull/279) +- feat: add Slate component [`#272`](https://github.com/nocobase/nocobase/pull/272) +- Feat/plugin users with jwt [`#258`](https://github.com/nocobase/nocobase/pull/258) +- fix: modify antd style of default [`#277`](https://github.com/nocobase/nocobase/pull/277) +- fix(client): meet undefined error after clear filter cascader value [`#267`](https://github.com/nocobase/nocobase/pull/267) +- Feat(plugin workflow): refactor calculation and add filter for query [`#264`](https://github.com/nocobase/nocobase/pull/264) +- feat: block provider [`#261`](https://github.com/nocobase/nocobase/pull/261) +- fix: toJSON with null association [`#260`](https://github.com/nocobase/nocobase/pull/260) +- fix: error handle error [`#259`](https://github.com/nocobase/nocobase/pull/259) + +### Commits + +- fix: yarn.lock [`7a7eb0c`](https://github.com/nocobase/nocobase/commit/7a7eb0cc82af0b1621476d2bb163b43ccc92da80) +- fix: yarn.lock [`e226f04`](https://github.com/nocobase/nocobase/commit/e226f04e505ed7f4d94abf3074ad4f375d15c67d) +- feat: rich text [`5b41b33`](https://github.com/nocobase/nocobase/commit/5b41b338072ec75f579a695bdae34dd69918752b) + +## [v0.6.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.5.0-alpha.33...v0.6.0-alpha.1) - 2022-04-05 + +### Merged + +- fix: textarea read pretty can support break line [`#255`](https://github.com/nocobase/nocobase/pull/255) +- fix: markdown support ellipsis [`#257`](https://github.com/nocobase/nocobase/pull/257) +- featPlugin multiple apps [`#248`](https://github.com/nocobase/nocobase/pull/248) +- add action log tempalte [`#239`](https://github.com/nocobase/nocobase/pull/239) +- fix some bugs [`#252`](https://github.com/nocobase/nocobase/pull/252) +- fix(plugin-workflow): fix adding/removing node in parallel branches [`#253`](https://github.com/nocobase/nocobase/pull/253) +- Feat: client base entry of plugin workflow [`#225`](https://github.com/nocobase/nocobase/pull/225) +- fix: updateAt on move scope change [`#251`](https://github.com/nocobase/nocobase/pull/251) +- feat: get json schema with async node [`#246`](https://github.com/nocobase/nocobase/pull/246) +- feat: insertNewSchema [`#245`](https://github.com/nocobase/nocobase/pull/245) +- fix: transaction error [`#242`](https://github.com/nocobase/nocobase/pull/242) +- feat: block templates [`#240`](https://github.com/nocobase/nocobase/pull/240) +- feat: uiSchema clearAncestor [`#241`](https://github.com/nocobase/nocobase/pull/241) +- feat: init sort field values [`#236`](https://github.com/nocobase/nocobase/pull/236) +- fix: move action without alter updatedAt [`#235`](https://github.com/nocobase/nocobase/pull/235) +- feat: role check action [`#234`](https://github.com/nocobase/nocobase/pull/234) +- feat: ne operator [`#233`](https://github.com/nocobase/nocobase/pull/233) +- fix: user current role [`#232`](https://github.com/nocobase/nocobase/pull/232) +- featEnable permission [`#229`](https://github.com/nocobase/nocobase/pull/229) +- test: update reverseField [`#231`](https://github.com/nocobase/nocobase/pull/231) +- feat: kanban [`#230`](https://github.com/nocobase/nocobase/pull/230) +- Nocobase next kanban [`#223`](https://github.com/nocobase/nocobase/pull/223) +- add: test [`#224`](https://github.com/nocobase/nocobase/pull/224) +- Plugin error handler [`#222`](https://github.com/nocobase/nocobase/pull/222) +- fix: array $noneOf with null [`#220`](https://github.com/nocobase/nocobase/pull/220) +- fix: filter parser with number in key [`#219`](https://github.com/nocobase/nocobase/pull/219) +- feat: ui-schema-tree-path descendant index [`#218`](https://github.com/nocobase/nocobase/pull/218) +- fix: array operator query error [`#217`](https://github.com/nocobase/nocobase/pull/217) +- fix: operator query value [`#216`](https://github.com/nocobase/nocobase/pull/216) +- feat: string operators [`#215`](https://github.com/nocobase/nocobase/pull/215) +- feat: error handle middleware [`#214`](https://github.com/nocobase/nocobase/pull/214) +- refactor: filter schema component [`#213`](https://github.com/nocobase/nocobase/pull/213) +- fix: empty operator with $or filter [`#212`](https://github.com/nocobase/nocobase/pull/212) +- feat: plugin install [`#211`](https://github.com/nocobase/nocobase/pull/211) +- feat: sortBy through table value [`#209`](https://github.com/nocobase/nocobase/pull/209) +- Feat: plugin workflow [`#210`](https://github.com/nocobase/nocobase/pull/210) +- fix: collection fields sort [`#208`](https://github.com/nocobase/nocobase/pull/208) +- feat: sort in collection fields [`#207`](https://github.com/nocobase/nocobase/pull/207) +- fix Collection rest api [`#205`](https://github.com/nocobase/nocobase/pull/205) +- feat: non paged list [`#204`](https://github.com/nocobase/nocobase/pull/204) +- feat: finish calendar component develop [`#199`](https://github.com/nocobase/nocobase/pull/199) +- fix(dependencies): move json-template into original sub packages [`#203`](https://github.com/nocobase/nocobase/pull/203) +- Feat(plugin workflow): add more instructions [`#201`](https://github.com/nocobase/nocobase/pull/201) +- fix: getJsonSchema with properties [`#202`](https://github.com/nocobase/nocobase/pull/202) +- fix: postgres array operator [`#200`](https://github.com/nocobase/nocobase/pull/200) +- fix: postgres sort with appends issue [`#198`](https://github.com/nocobase/nocobase/pull/198) +- feat: uiSchema remove api [`#196`](https://github.com/nocobase/nocobase/pull/196) +- refactor: perPage to pageSize [`#197`](https://github.com/nocobase/nocobase/pull/197) +- fix: option parser test [`#195`](https://github.com/nocobase/nocobase/pull/195) +- fix: nest append [`#194`](https://github.com/nocobase/nocobase/pull/194) +- fix: test with database [`#193`](https://github.com/nocobase/nocobase/pull/193) +- fix(plugin-workflow): fix dependencies in package [`#192`](https://github.com/nocobase/nocobase/pull/192) +- Fix: plugin-workflow test [`#191`](https://github.com/nocobase/nocobase/pull/191) +- Refactor(plugin-workflow): upgrade plugin to use abstract plugin class and fix types [`#190`](https://github.com/nocobase/nocobase/pull/190) +- fix: ui schema storage [`#188`](https://github.com/nocobase/nocobase/pull/188) +- fix: ui schema storage [`#187`](https://github.com/nocobase/nocobase/pull/187) +- fix: update guard with Model instance [`#186`](https://github.com/nocobase/nocobase/pull/186) +- fix: getProperties with order [`#183`](https://github.com/nocobase/nocobase/pull/183) +- feat(server): improve application [`#177`](https://github.com/nocobase/nocobase/pull/177) +- Feature: plugin-workflow MVP [`#171`](https://github.com/nocobase/nocobase/pull/171) +- fix(root): fix dependencies in packages to avoid building errors [`#178`](https://github.com/nocobase/nocobase/pull/178) +- Application [`#175`](https://github.com/nocobase/nocobase/pull/175) +- feat: add acl plugin [`#169`](https://github.com/nocobase/nocobase/pull/169) +- add Filter component into schema componens [`#176`](https://github.com/nocobase/nocobase/pull/176) +- feat: add Markdown component into schema components [`#173`](https://github.com/nocobase/nocobase/pull/173) +- feat: table related components [`#172`](https://github.com/nocobase/nocobase/pull/172) +- feat: add select component into schema component [`#168`](https://github.com/nocobase/nocobase/pull/168) +- feat: add TreeSelect component into schema components [`#167`](https://github.com/nocobase/nocobase/pull/167) +- Plugin acl [`#166`](https://github.com/nocobase/nocobase/pull/166) +- add upload component into schema components [`#165`](https://github.com/nocobase/nocobase/pull/165) +- migrate TimePicker component into schema components [`#164`](https://github.com/nocobase/nocobase/pull/164) +- Feat/plugin UI schema v0.6 [`#143`](https://github.com/nocobase/nocobase/pull/143) +- Feat/plugin collection manager [`#147`](https://github.com/nocobase/nocobase/pull/147) +- Acl [`#162`](https://github.com/nocobase/nocobase/pull/162) +- feat: acl [`#153`](https://github.com/nocobase/nocobase/pull/153) +- feat: add InputNumber Component into schema component [`#160`](https://github.com/nocobase/nocobase/pull/160) +- feature/nocobase next password [`#159`](https://github.com/nocobase/nocobase/pull/159) +- feat: add DatePicker into schema components [`#161`](https://github.com/nocobase/nocobase/pull/161) +- feat: add input into schema component [`#158`](https://github.com/nocobase/nocobase/pull/158) +- feat: add radio into schema component [`#154`](https://github.com/nocobase/nocobase/pull/154) +- optimize: rename checkbox component file [`#155`](https://github.com/nocobase/nocobase/pull/155) +- Nocobase next color select [`#157`](https://github.com/nocobase/nocobase/pull/157) +- feat: add async-data-provider component [`#151`](https://github.com/nocobase/nocobase/pull/151) +- feat: client v0.6 [`#150`](https://github.com/nocobase/nocobase/pull/150) +- Feat/GitHub actions [`#148`](https://github.com/nocobase/nocobase/pull/148) +- feat: filter by target key [`#146`](https://github.com/nocobase/nocobase/pull/146) +- refactor: actions [`#137`](https://github.com/nocobase/nocobase/pull/137) +- feat: context field type support [`#131`](https://github.com/nocobase/nocobase/pull/131) +- feat: database next [`#130`](https://github.com/nocobase/nocobase/pull/130) +- feat: rename resourceKey & associatedKey to resourceIndex & associatedIndex [`#126`](https://github.com/nocobase/nocobase/pull/126) +- refactor: table cell text overflow that show ellipsis [`#125`](https://github.com/nocobase/nocobase/pull/125) +- Add S3 storage and refactors [`#124`](https://github.com/nocobase/nocobase/pull/124) +- Fix: plugin-file-manager [`#111`](https://github.com/nocobase/nocobase/pull/111) +- refactor: code splitting of the table component [`#121`](https://github.com/nocobase/nocobase/pull/121) +- refactor: code splitting of the table component [`#120`](https://github.com/nocobase/nocobase/pull/120) +- feat: add reset button in the filter panel [`#110`](https://github.com/nocobase/nocobase/pull/110) +- feat: allow user to change password [`#109`](https://github.com/nocobase/nocobase/pull/109) + +### Commits + +- v0.6 [`732d310`](https://github.com/nocobase/nocobase/commit/732d31009eafbded78dd35dee5d891438783ba53) +- create-nocobase-app template from [develop] [`9f4bea7`](https://github.com/nocobase/nocobase/commit/9f4bea79668643d37c2b488eb969b2c93a241026) +- feat: improve view action schema initializer [`590ca26`](https://github.com/nocobase/nocobase/commit/590ca267b27b093b67aa140c4e94fd2b97c8eeb6) + +## [v0.5.0-alpha.33](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.6...v0.5.0-alpha.33) - 2021-11-22 + +### Merged + +- fix: upgrade formily & side menu render with createPortal & use deep compare effect [`#103`](https://github.com/nocobase/nocobase/pull/103) +- fix: SchemaRenderer get schema value [`#102`](https://github.com/nocobase/nocobase/pull/102) +- fix: upgrade formily and form.setValues uses overwrite strategy [`#101`](https://github.com/nocobase/nocobase/pull/101) +- feat: support i18n [`#99`](https://github.com/nocobase/nocobase/pull/99) +- feat: new version of the documentation [`#95`](https://github.com/nocobase/nocobase/pull/95) +- option-tag style [`#92`](https://github.com/nocobase/nocobase/pull/92) +- create-nocobase-app: favicon [`#91`](https://github.com/nocobase/nocobase/pull/91) +- feat: create nocobase app with simple & quickstart option [`#87`](https://github.com/nocobase/nocobase/pull/87) +- feat: export plugin [`#73`](https://github.com/nocobase/nocobase/pull/73) + +### Commits + +- v0.5 [`2cbcd08`](https://github.com/nocobase/nocobase/commit/2cbcd087ce6629d8f0df550ee35e02065db41dbc) +- refactor [`75cd158`](https://github.com/nocobase/nocobase/commit/75cd158a270935559a9922d1dd074811253013b9) +- feat: improve code [`c6b68f2`](https://github.com/nocobase/nocobase/commit/c6b68f2b10e4e8df5257345f5e39408666c5810d) + +## [v0.4.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.5...v0.4.0-alpha.6) - 2021-04-18 + +### Merged + +- docs: add docs [`#75`](https://github.com/nocobase/nocobase/pull/75) +- refactor: use boolean value instead of null [`#74`](https://github.com/nocobase/nocobase/pull/74) + +### Commits + +- fix: improve login form styles [`5319000`](https://github.com/nocobase/nocobase/commit/5319000bd613ce9d2ac0a66f73ab403a84c5b8dd) +- fix: error message for login and registration [`214b227`](https://github.com/nocobase/nocobase/commit/214b227a6c1fe92bf54968e369aeaeabb8f73d7a) +- docs: nodejs provided by docker [`22739af`](https://github.com/nocobase/nocobase/commit/22739afa2da4dd38eda9077f5ca566cd022f4dc2) + +## [v0.4.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.2...v0.4.0-alpha.5) - 2021-04-07 + +### Commits + +- chore(versions): publish packages 0.4.0-alpha.5 [`ef93a3c`](https://github.com/nocobase/nocobase/commit/ef93a3c11c28419e1e842f73799cf005d49a5116) +- chore(versions): publish packages 0.4.0-alpha.4 [`a22efec`](https://github.com/nocobase/nocobase/commit/a22efec65d85fd15e59332d2eb6483cb84a1e619) +- chore(versions): publish packages 0.4.0-alpha.3 [`e72eebb`](https://github.com/nocobase/nocobase/commit/e72eebb8cd5e666b642030a9e268961385cc4d4d) + +## [v0.4.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.1...v0.4.0-alpha.2) - 2021-04-07 + +### Commits + +- refactor: app middlewares [`17362a8`](https://github.com/nocobase/nocobase/commit/17362a844439e5510f254195fa135b6335866ef3) +- chore(versions): publish packages 0.4.0-alpha.2 [`c2f1876`](https://github.com/nocobase/nocobase/commit/c2f18763c9e7c03a7a46edafd26b1fa884b8f272) + +## v0.4.0-alpha.1 - 2021-04-07 + +### Merged + +- fix: minor problems [`#72`](https://github.com/nocobase/nocobase/pull/72) +- Develop [`#68`](https://github.com/nocobase/nocobase/pull/68) +- Feature: plugin-china-region [`#66`](https://github.com/nocobase/nocobase/pull/66) +- Feature: filter for linkTo field [`#64`](https://github.com/nocobase/nocobase/pull/64) +- fix: make default view/tab cannot be destroyed [`#63`](https://github.com/nocobase/nocobase/pull/63) +- Feature/plugin automations [`#65`](https://github.com/nocobase/nocobase/pull/65) +- Feature/action logs [`#62`](https://github.com/nocobase/nocobase/pull/62) +- Feature/action logs [`#61`](https://github.com/nocobase/nocobase/pull/61) +- Feature/destroy lock [`#60`](https://github.com/nocobase/nocobase/pull/60) +- fix: ignore some typescript error [`#59`](https://github.com/nocobase/nocobase/pull/59) +- feat: route permissions [`#58`](https://github.com/nocobase/nocobase/pull/58) +- Feature: add permission plugin api [`#57`](https://github.com/nocobase/nocobase/pull/57) +- fix: updatedBy foreignKey [`#56`](https://github.com/nocobase/nocobase/pull/56) +- feat: add permissions plugin [`#53`](https://github.com/nocobase/nocobase/pull/53) +- fix: updatedBy field in bulkUpdate hook [`#54`](https://github.com/nocobase/nocobase/pull/54) +- test: skip bug test cases for ci passing [`#52`](https://github.com/nocobase/nocobase/pull/52) +- fix: avoid bug when update other field [`#51`](https://github.com/nocobase/nocobase/pull/51) +- feat: date-only operators [`#50`](https://github.com/nocobase/nocobase/pull/50) +- Feature field for set default [`#49`](https://github.com/nocobase/nocobase/pull/49) +- Feature: custom operators for querying [`#48`](https://github.com/nocobase/nocobase/pull/48) +- fix: toInclude bug with nested associations [`#47`](https://github.com/nocobase/nocobase/pull/47) +- feat: make single file upload to attachment available [`#46`](https://github.com/nocobase/nocobase/pull/46) +- feature: add file manager base architecture [`#44`](https://github.com/nocobase/nocobase/pull/44) +- feat: add createdBy/updatedBy field config for table managed by collections [`#43`](https://github.com/nocobase/nocobase/pull/43) +- fix: use wrapped and logic for merging filters [`#42`](https://github.com/nocobase/nocobase/pull/42) +- fix: filterByFields should return same value when input == null (close 0) [`#41`](https://github.com/nocobase/nocobase/pull/41) +- fix: Symbol property could not be iterated in for-in [`#39`](https://github.com/nocobase/nocobase/pull/39) +- Feature/sort [`#38`](https://github.com/nocobase/nocobase/pull/38) +- refactor: change sort strategy from offset to targetId [`#37`](https://github.com/nocobase/nocobase/pull/37) +- Feature/sort [`#36`](https://github.com/nocobase/nocobase/pull/36) +- feat: add filter and transaction for destroy action [`#35`](https://github.com/nocobase/nocobase/pull/35) +- fix: field filter logic for create/update [`#34`](https://github.com/nocobase/nocobase/pull/34) +- Feature: action fields options for create/update [`#32`](https://github.com/nocobase/nocobase/pull/32) +- Fix: change strategy from add to set for updateAssociations [`#33`](https://github.com/nocobase/nocobase/pull/33) +- Test/ci [`#31`](https://github.com/nocobase/nocobase/pull/31) +- feat: improve collection hooks/fields/actions/views... [`#30`](https://github.com/nocobase/nocobase/pull/30) +- Fix/model update associations [`#29`](https://github.com/nocobase/nocobase/pull/29) +- fix: database test cases and table options [`#28`](https://github.com/nocobase/nocobase/pull/28) +- feat: add virtual attribute geter & setter support [`#27`](https://github.com/nocobase/nocobase/pull/27) +- feat: collection options & hooks [`#21`](https://github.com/nocobase/nocobase/pull/21) +- feat(users): add users module [`#26`](https://github.com/nocobase/nocobase/pull/26) +- feat: add sort action [`#22`](https://github.com/nocobase/nocobase/pull/22) +- Test/list [`#19`](https://github.com/nocobase/nocobase/pull/19) +- feat: pagination options [`#20`](https://github.com/nocobase/nocobase/pull/20) +- test: refactor test in database and add more [`#17`](https://github.com/nocobase/nocobase/pull/17) +- feat: actions & views [`#18`](https://github.com/nocobase/nocobase/pull/18) +- Test cases for database [`#16`](https://github.com/nocobase/nocobase/pull/16) +- Refactor: change global injection of test for actions package. [`#15`](https://github.com/nocobase/nocobase/pull/15) +- feat: improve plugins [`#14`](https://github.com/nocobase/nocobase/pull/14) +- Doc: add README.md for server. [`#12`](https://github.com/nocobase/nocobase/pull/12) +- fix: parseRequest & registerHandlers [`#10`](https://github.com/nocobase/nocobase/pull/10) +- fix #9 [`#11`](https://github.com/nocobase/nocobase/pull/11) +- feat: support register and call partial actions [`#7`](https://github.com/nocobase/nocobase/pull/7) +- ๅ‘ๅธƒๆ ธๅฟƒๆก†ๆžถ [`#6`](https://github.com/nocobase/nocobase/pull/6) + +### Fixed + +- fix #9 (#11) [`#9`](https://github.com/nocobase/nocobase/issues/9) [`#9`](https://github.com/nocobase/nocobase/issues/9) + +### Commits + +- chore: adjust parameters [`b95e2da`](https://github.com/nocobase/nocobase/commit/b95e2da129aa49b5d8fb3e31ba8975818f7053cb) +- first commit [`e5d30b3`](https://github.com/nocobase/nocobase/commit/e5d30b30ba4dd38de764b0e5044f836f04a03706) +- style: code formatting [`ce4a22f`](https://github.com/nocobase/nocobase/commit/ce4a22fbb9b1ba9b88db1dc86609e94944f9d904) diff --git a/docs/zh-CN/welcome/release/index.md b/docs/zh-CN/welcome/release/index.md index 06046d47f..f994e815a 100644 --- a/docs/zh-CN/welcome/release/index.md +++ b/docs/zh-CN/welcome/release/index.md @@ -1,539 +1,1614 @@ -# ๆ›ดๆ–ฐๆ—ฅๅฟ— - -## 2023/01/11 ~v0.9.0-alpha.1 - -### ๅ่ฎฎๅ˜ๆ›ด - -- [ๅ†…ๆ ธ](https://github.com/nocobase/nocobase/tree/main/packages/core) ็ปง็ปญ้‡‡็”จ [Apache 2.0 ๅ่ฎฎ](https://github.com/nocobase/nocobase/blob/main/LICENSE-APACHE-2.0) -- [ๆ’ไปถ](https://github.com/nocobase/nocobase/tree/main/packages/plugins) ๅ˜ๆ›ดไธบ [AGPL 3.0 ๅ่ฎฎ](https://github.com/nocobase/nocobase/blob/main/LICENSE-AGPL) - -### ๅ†…ๆ ธๆ”น่ฟ› - -- [NocoBase ็š„ Logging ็ณป็ปŸ](/welcome/release/logger) -- [ๆ•ฐๆฎ่กจ็ปงๆ‰ฟ](/welcome/release/inherits) -- [ๆ•ฐๆฎ่กจๆจกๆฟ](/welcome/release/collection-templates) -- ๆ•ฐๆฎ่กจไธป้”ฎ้ป˜่ฎคไธบ BigInt ็ฑปๅž‹ -- ๆไพ›ๆ›ดๅฅๅ…จ็š„ ACL ๆจกๅ— -- ๅ…ณ็ณปๅญ—ๆฎต็ป„ไปถๆ”ฏๆŒๅˆ‡ๆขไธบ็ฎ€ๅ•็š„ Select ็ป„ไปถ -- ๆ”ฏๆŒ้กต้ขๆ ‡็ญพ้กต -- ่กจๆ ผใ€็œ‹ๆฟๆ”ฏๆŒๅ›บๅฎšๅŒบๅ— -- ๆไพ›ๆ›ดไธบๅ‹ๅฅฝ็š„ๅ…ณ็ณป็ญ›้€‰ -- ๆ—ฅๅŽ†ๅŒบๅ—ๆ”ฏๆŒๆ˜พ็คบๅ†œๅŽ† -- ๆ—ฅๅŽ†ๅŒบๅ—ๆ”ฏๆŒ้…็ฝฎใ€ๅˆ ้™ค้‡ๅคๆ—ฅ็จ‹ -- ่กจๆ ผๅŒบๅ—ๆจชๅ‘ๆปšๅŠจๆกไผ˜ๅŒ–๏ผŒๆ”ฏๆŒ่ฐƒๆ•ดๅˆ—ๅฎฝ -- ๅผน็ช—ๅฏ้…็ฝฎๅฐบๅฏธๅคงๅฐ - -### ๆ–ฐๅขžๆ’ไปถ - -- Excel ๆ•ฐๆฎๅฏผๅ…ฅๆ’ไปถ -- ๅ›พๅฝขๅŒ–ๆ•ฐๆฎ่กจ้…็ฝฎๆ’ไปถ -- SSO ๆ’ไปถ๏ผšOIDCใ€SAML -- ๅœฐๅ›พๆ’ไปถ -- iframe ๅŒบๅ—ๆ’ไปถ -- ๆ•ฐๆฎๅฟซ็…งๆ’ไปถ -- ๅบ”็”จๅคๅˆถใ€ๅค‡ไปฝใ€่ฟ็งปๆ’ไปถ -- [ๅญ—ๆฎต็š„่ฎก็ฎ—ๅ…ฌๅผๆ’ไปถ๏ผšMath Formula ๅ’Œ Excel Formula](/welcome/release/formulas) - -### ๅ…ถไป–ๆ’ไปถไผ˜ๅŒ– - -- ๆ•ฐๆฎ่กจ้…็ฝฎ๏ผš - - ๆ•ฐๆฎ่กจๆ”ฏๆŒ็ญ›้€‰ - - ๆ•ฐๆฎ่กจๆ”ฏๆŒ่ฎพ็ฝฎๆ ‡้ข˜ๅญ—ๆฎต - - ๆ•ฐๆฎ่กจๆ”ฏๆŒๅˆ†็ฑป -- ๅทฅไฝœๆต๏ผš - - ไฟฎๅค่งฆๅ‘ๅ™จๅ–ๅ€ผๅŠŸ่ƒฝ - - ๅ‰็ซฏไปฃ็ ้‡ๆž„๏ผŒๆ’ไปถ็‹ฌ็ซ‹ๅŒ– - - ไฟฎๅคๆ‰ง่กŒๅŽ†ๅฒๅŠ ่ฝฝ้—ฎ้ข˜ - - ๆ•ฐๆฎ่กจ่งฆๅ‘ๅŽๆ‰ง่กŒไธๅ†ไฝฟ็”จ็›ธๅŒไบ‹ๅŠก๏ผŒไผ˜ๅŒ–ๆ‰ง่กŒๆต็จ‹ - - ๆ–ฐๅขž่ฐƒๅบฆๅ™จๅ’Œ่งฆๅ‘็ผ“ๅญ˜๏ผŒไปฅ้˜Ÿๅˆ—ๆ‰ง่กŒๆ–นๅผ่งฃๅ†ณๅนถๅ‘้—ฎ้ข˜ - - ไฟฎๅคๅฎšๆ—ถไปปๅŠก็ป“ๆŸๆ—ถ้—ด็ป„ไปถ้—ฎ้ข˜ - - ไฟฎๅคๅฎšๆ—ถไปปๅŠก่ทณ็ง’้—ฎ้ข˜ - - ๆ”ฏๆŒๅทฅไฝœๆต็บงๅˆซๅคๅˆถ - - ้‡ๆž„ไธŠไธ‹ๆ–‡ๅŠ่Š‚็‚นๅ˜้‡ๆ•ฐๆฎ็ป“ๆž„ -- ้ชŒ่ฏ็ ๏ผš - - ๆ–ฐๅขž้ชŒ่ฏ็ ้…็ฝฎ้ขๆฟ -- ๆ–‡ไปถ็ฎก็†ๅ™จ๏ผš - - ไฟฎๅคๆœฌๅœฐๅญ˜ๅ‚จ้™ๆ€ๆ–‡ไปถๆœๅŠกไธญ้—ดไปถ - - ๆœฌๅœฐๅญ˜ๅ‚จ็ฉบ baseUrl ้…็ฝฎๅฎน้”™ๅค„็† -- ่‡ชๅŠจ็ผ–ๅท๏ผš - - ้‡ๆž„ไธบ็”ฑๆ•ฐๆฎ่กจ่ฎฐๅฝ•ๅบๅˆ— - - ๅขžๅŠ ๅฏ่พ“ๅ…ฅๅ’ŒๅŒน้…่ง„ๅˆ™็š„้…็ฝฎ - - ไฟฎๅค็”Ÿๆˆๆ•ฐๅญ—ไธๅฐไบŽ้…็ฝฎ็š„่ตทๅง‹ๅ€ผ - -## 2022/10/31 ~ v0.8.0-alpha.1 - -- ไปŽ v0.8 ๅผ€ๅง‹๏ผŒNocoBase ๅผ€ๅง‹ๆไพ›ๅฏ็”จ็š„ๆ’ไปถ็ฎก็†ๅ™จๅ’Œๅผ€ๅ‘ๆ–‡ๆกฃใ€‚[ๆŸฅ็œ‹ v0.8 ็š„ไธป่ฆๅ˜ๅŒ–](/welcome/release/v08-changelog) - -## 2022/10/26 ~ v0.7.7-alpha.1 - -- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save ([#962](https://github.com/nocobase/nocobase/issues/962)) -- feat(file-manager): support tencent cos ([#958](https://github.com/nocobase/nocobase/issues/958)) -- fix(plugin-workflow): fix constant schedule trigger time ([#956](https://github.com/nocobase/nocobase/issues/956)) - -## 2022/10/24 ~ v0.7.6-alpha.2 - -- Turkish language ([#939](https://github.com/nocobase/nocobase/issues/939)) -- refactor(plugin-file-manager): move client code into plugin folder and enable path config ([#913](https://github.com/nocobase/nocobase/issues/913)) -- feat: add filter action to collection table ([#953](https://github.com/nocobase/nocobase/issues/953)) -- feat: ui schema cache ([#877](https://github.com/nocobase/nocobase/issues/877)) -- feat: docker optimizing ([#948](https://github.com/nocobase/nocobase/issues/948)) -- fix(plugin-workflow): test changedWithAssociations() ([#950](https://github.com/nocobase/nocobase/issues/950)) -- fix(plugin-workflow): skip time based test ([#951](https://github.com/nocobase/nocobase/issues/951)) -- fix(plugin-workflow): fix schedule trigger bug ([#949](https://github.com/nocobase/nocobase/issues/949)) -- feat: changed with associations ([#943](https://github.com/nocobase/nocobase/issues/943)) -- feat(useSignup): customize success message -- fix(plugin-workflow): fix collection fieldset component ([#942](https://github.com/nocobase/nocobase/issues/942)) -- fix(plugin-workflow): avoid revision with ghost nodes ([#941](https://github.com/nocobase/nocobase/issues/941)) -- fix(plugin-workflow): add req context to processor ([#936](https://github.com/nocobase/nocobase/issues/936)) -- Feat/plugin workflow collection field ([#934](https://github.com/nocobase/nocobase/issues/934)) -- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set ([#926](https://github.com/nocobase/nocobase/issues/926)) -- fix(plugin-workflow): temp disable validation of collection field in node ([#928](https://github.com/nocobase/nocobase/issues/928)) - -## 2022/10/16 ~ v0.7.5-alpha.1 - -- ไผ˜ๅŒ–ๅ…ณ็ณปๅญ—ๆฎต็š„ๆŸฅ่ฏขๆ€ง่ƒฝ -- ๆทปๅŠ ๆ‰‹ๆœบๅทๆณจๅ†Œ็™ปๅฝ•็š„ๆ”ฏๆŒ -- ่‡ชๅŠจ็ผ–็ ็ฑปๅž‹ๅญ—ๆฎต -- ๆ–ฐๅขžๆ—ฅ่ฏญใ€ไฟ„่ฏญ็ฟป่ฏ‘ -- ้กต้ขๅธƒๅฑ€ๆ”ฏๆŒๆ‹–ๆ‹ฝ่ฐƒๆ•ดๅˆ—ๅฎฝ -- ไฟฎๅค่‹ฅๅนฒ BUG - -### Details - -- feat: plugin workflow collection field ([#919](https://github.com/nocobase/nocobase/issues/919)) -- fix(client/route-switch): skip sub routes -- feat: create with array of values ([#912](https://github.com/nocobase/nocobase/issues/912)) -- fix: unbind on error throwing ([#914](https://github.com/nocobase/nocobase/issues/914)) -- fix: appends merge now using primary key ([#911](https://github.com/nocobase/nocobase/issues/911)) -- fix: cannot read properties of undefined (reading 'target') -- feat: limit database identifier ([#908](https://github.com/nocobase/nocobase/issues/908)) -- fix: sync collection field default value ([#907](https://github.com/nocobase/nocobase/issues/907)) -- fix: version judgment is not accurate -- fix(client): tab pane initializers for create form block -- fix: build error -- fix: appends merge includes ([#905](https://github.com/nocobase/nocobase/issues/905)) -- fix: single relation repository appends query issue ([#901](https://github.com/nocobase/nocobase/issues/901)) -- feat(plugin-workflow): add concat calculator (#894) -- feat: improve signin and signup page components -- fix(client/record-picker): support record-picker show format DataPicker (#888) -- fix(client/block-select-collection): fix select collection menu view error (#889) -- fix: unable to submit form during file upload (#892) -- feat(collection-manager): inverse fields can be configured (#883) -- fix(database): fix the index name too long error -- fix(formula): support integer and fix NaN error (#879) -- fix: sort parameter is missing (#849) -- fix: slow join query issued by appends field in find method of repository (#845) -- feat(core/cache): support cache (#876) -- feat: update option must have filter or filterByTk (#847) -- added Russian translation (#840) -- feat(database): add sequence field type (#779) -- fix: can't access pages without permission via url (#826) -- fix(collection-manger): incorrect scope key parameter -- fix: missing RefreshActionInitializer -- fix(collection-manager): o2m is array type -- fix(plugin-system-settings): convert array to json -- fix: transaction cannot be rolled back because it has been finished with state: rollback -- fix(plugin-export): filter non-existent fields -- refactor(resourcer): combine middleware class ([#825](https://github.com/nocobase/nocobase/issues/825)) -- refactor(database): fix some fields and types ([#820](https://github.com/nocobase/nocobase/issues/820)) -- feat: language settings support Japanese -- feat(locale): added Japanese translation ([#813](https://github.com/nocobase/nocobase/issues/813)) -- fix(plugin-workflow): fix value type for DatePicker to moment ([#815](https://github.com/nocobase/nocobase/issues/815)) ([#819](https://github.com/nocobase/nocobase/issues/819)) -- refactor(plugin-workflow): export client calculators registry ([#816](https://github.com/nocobase/nocobase/issues/816)) -- fix: number storage type changed to double ([#810](https://github.com/nocobase/nocobase/issues/810)) -- refactor(server) ([#795](https://github.com/nocobase/nocobase/issues/795)) -- fix(plugin-verification): change provider rate limit error to 429 ([#788](https://github.com/nocobase/nocobase/issues/788)) -- fix(plugin-cm): fix field disappear after failed to update ([#773](https://github.com/nocobase/nocobase/issues/773)) -- fix: fix uiSchema undefined ([#770](https://github.com/nocobase/nocobase/issues/770)) -- fix: translation -- fix(plugin-cm): fix unique option default value to update ([#768](https://github.com/nocobase/nocobase/issues/768)) -- fix(plugin-users): fix update profile 500 ([#766](https://github.com/nocobase/nocobase/issues/766)) ([#767](https://github.com/nocobase/nocobase/issues/767)) -- fix: mysql column in where clause is ambiguous ([#756](https://github.com/nocobase/nocobase/issues/756)) -- feat(plugin-cm): add unique option for base fields ([#745](https://github.com/nocobase/nocobase/issues/745)) -- feat(plugin-verification): add plugin-verification and phone for users ([#722](https://github.com/nocobase/nocobase/issues/722)) -- feat: resize grid columns with drag and drop ([#748](https://github.com/nocobase/nocobase/issues/748)) -- refactor(client): split schema-initializer items into multiple files ([#744](https://github.com/nocobase/nocobase/issues/744)) -- refactor(plugin-workflow): change files mode to 644 ([#755](https://github.com/nocobase/nocobase/issues/755)) -- fix: db version check ([#749](https://github.com/nocobase/nocobase/issues/749)) -- feat: add examples ([#718](https://github.com/nocobase/nocobase/issues/718)) - -## 2022/08/15 ~ v0.7.4-alpha.7 - -### Details - -- fix(collection-manager): update collection without fields - -## 2022/08/12 ~ v0.7.4-alpha.4 - -### New features - -- Field default value - -### Details - -- fix(database): error getting db version number -- fix: record provider required for read pretty -- fix: sync table sort to export (#723) -- feat: full version of the NocoBase dockerfile (#719) -- feat: add examples -- chore: update node ci -- fix(plugin-workflow): fix extend collection (#708) -- fix: DB_TABLE_PREFIX doesn't get applied (#710) -- feat: default value (#679) -- fix: required field delete submit error (#688) (#694) - -## 2022/07/28 ~ v0.7.4-alpha.1 - -### Details - -- fix: append roles to current user (#695) -- fix(client): required for the sub-table field -- fix: date format (#686) -- test(plugin-workflow): skip prompt tests (#692) -- fix: accuracy of percent (#685) -- fix: the database only supports MySQL 8.0.17 and above, SQLite 3.x and PostgreSQL 10+ -- fix(plugin-workflow): adjust await sleep time for test cases (#691) -- feat(plugin-workflow): add assignees config for prompt instruction (#690) -- fix: role export button display (#616) (#666) -- fix: uid validate (#681) -- feat(client): tab icon -- fix(plugin-error-handler): no error message -- fix(client): fieldNames of RecordPicker -- fix: hide password -- refactor: replace react-drag-listview with @dnd-kit/sortable (#660) -- refactor(plugin-users): improve extendibility of middlewares (#677) -- feat: o2m delete not refresh (#646) -- feat: kanban add description (#659) -- fix: field loss enum (#667) -- feat: add ui editor hot key Ctrl+Shift+U (#675) -- fix: calendar change field error (#626) (#671) -- chore: fix eslint not work (#670) -- feat: number precision (#661) -- feat: nginx config (#664) -- feat: form item designer form switch issue (#656) -- fix: wrong operator - -## 2022/07/20 ~ v0.7.3-alpha.1 - -### New features - -- Form validation -- Actions: Print, Refresh - -### Details - -- fix(client): hide modal header -- feat: customizable jwt expiration date -- feat: print action (#652) -- feat: restore action-hooks (#655) -- feat: collections & fields pagination issue (#653) -- fix(core): change proxied agent methods to native (#654) -- feat: remove table field details actions (#638) -- fix: link to default value (#641) -- fix(client): build error -- fix: localStorage is not defined -- feat: support for displaying relational table fields in details or form blocks (#635) -- fix: record picker cannot select from different pages (#623) -- feat(client): plugin toolbar icons and translations -- fix: dragging an element to the left, right, or bottom would cause the element to disappear (#620) -- feat: table action add reload button (#630) -- feat: improve language settings (#627) -- feat: field assignment for custom actions supports string variables (#597) -- fix(client): blocks are deleted when they are dragged below the current block -- fix: skip recursive remove on grid component (#621) -- feat: fix time and collection pagination (#618) -- feat: recordblockinitializers fields pick (#558) -- fix: incorrectly :active background (#607) -- fix: obo table selector (#613) -- feat: form validator (#569) -- fix: table selector (#612) - -## 2022/07/07 ~ v0.7.2-alpha.2 - -- fix(g2plot): import all plots -- fix: field permissions cannot be saved (#605) -- fix(plugin-workflow): fix revision bug (#603) -- fix(plugin-workflow): fix select value (#600) -- fix(plugin-workflow): fix CollectionFieldSelect component (#598) -- feat(plugin-workflow): add association select in calculation (#584) -- feat: function for chart data request -- fix(cli): remove process.env.NODE_OPTIONS - -## 2022/07/05 ~ v0.7.2-alpha.1 - -### New features - -- Fields: ๆ•ดๆ•ฐๅญ—ๆฎต -- Blocks: ๆ”ฏๆŒๅœจๅŒบๅ—้‡Œๆ˜พ็คบๅ…ณ็ณป่กจ็š„ๅญ—ๆฎต -- Plugins: ็ญ›้€‰ๆกไปถๆ”ฏๆŒๅ˜้‡ - -### Breaking changes - -- ๆ–ฐ็‰ˆๆœฌๅ…ณ็ณป้ป˜่ฎคไธๅปบ็ซ‹ๅค–้”ฎ็บฆๆŸ๏ผŒๆ—ง็‰ˆๆœฌๅ‡็บงๅŽไผšๅˆ ้™คๆŽ‰ๆ‰€ๆœ‰ๅทฒๅˆ›ๅปบ็š„ๅค–้”ฎ็บฆๆŸ -- ไน‹ๅ‰ไฝฟ็”จ yarn create ๅฎ‰่ฃ…็š„ NocoBase ๅบ”็”จ๏ผŒ้œ€่ฆ้‡ๆ–ฐ yarn create๏ผŒๅ†ๆ‰ง่กŒ `yarn nocobase upgrade --raw` - -### Details - -- fix: drop all foreign keys (#576) -- fix(plugin-workflow): fix collection trigger config (#575) -- fix: improve filter item styling -- fix(collection-manager): missing collection manager context -- feat: filter with variable (#574) -- feat(cli): check database version before installation (#572) -- fix(client): comment out useless code -- fix(cli): app start before sync and upgrade -- feat(client): integer field -- fix(database): index invalid (#564) -- fix: export association table data (#561) -- fix(client): maximum call stack size exceeded (#554) -- refactor(plugin-workflow): move client files into plugin (#556) -- fix(database): constraints default to false (#550) -- fix(client): cannot read properties of undefined (reading 'split') -- fix(workflow): merge workflow providers -- fix(workflow): load workflow after application initialization -- fix(plugin-workflow): fix select width (#552) -- feat: compatible with old kanban (#553) -- fix(client): consider explicitly re-exporting to resolve the ambiguity -- feat: display association fields (#512) -- Fix(plugin workflow) (#549) -- fix: update mysql port (#548) -- fix: export of relation blocks (#546) -- fix(plugin-workflow): clear options when change collection (#547) -- feat(plugin-workflow): add race mode (#542) -- fix(client): change toArr to _.castArray in select component (#543) - -## 2022/06/26 ~ v0.7.1-alpha.7 - -### New features - -- Fields: ๅ…ฌๅผใ€่กจๅ…ณ็ณป(o2o, o2m, m2o, m2m) -- Blocks: ๅ›พ่กจ(g2plot) -- Plugins: ๆ“ไฝœ่ฎฐๅฝ•, ๅฏผๅ‡บ, ๅทฅไฝœๆต(ๅฎšๆ—ถไปปๅŠก) - -### Breaking changes - -- ็™พๅˆ†ๆฏ”ๅญ—ๆฎตๅญ˜ๅ‚จๅŽŸๅง‹ๆ•ฐๅ€ผใ€‚ ๆฏ”ๅฆ‚๏ผŒๆ—ง็‰ˆๆœฌๅฐ† 1% ๅญ˜ๅ‚จไธบ 1๏ผŒๆ–ฐ็‰ˆๆœฌๅฐ† 1% ๅญ˜ๅ‚จไธบ 0.01 -- ๅŽปๆŽ‰ๅญ่กจๆ ผๅญ—ๆฎต๏ผŒๅนถไฝฟ็”จไธ€ๅฏนๅคšๅญ—ๆฎตไปฃๆ›ฟ -- ๅฆ‚ๆžœไน‹ๅ‰ๆ˜ฏไฝฟ็”จ yarn create ๅฎ‰่ฃ…็š„ NocoBase ๅบ”็”จ๏ผŒ้œ€่ฆ้‡ๆ–ฐ yarn create๏ผŒๅ†ๆ‰ง่กŒ yarn nocobase upgrade - -### Details - -- fix(cli): upgrade from docker -- chore(create-nocobase-app): fix some bugs (#538) -- feat: relationship fields are loaded on demand -- fix: destroy collection fields (#536) -- feat(plugin-workflow): add delay node type (#532) -- refactor: client application (#533) -- fix: missing transaction (#531) -- fix: add ellipsis property to record picker (#527) -- fix: remove pattern without form item (#528) -- fix(client): update only fields in the form -- fix(client): remove z-index -- fix(plugin-workflow): set current when update (#526) -- fix(client): non-empty judgment -- fix: order nulls last (#519) -- fix(client): close the pop-up after request -- fix: action loading, refresh context, form submit and validate (#523) -- fix: field pattern (#520) -- fix(plugin-workflow): fix searchable select min-width (#524) -- fix: template with fields only (#517) -- fix(plugin-workflow): fix update workflow current property (#521) -- feat: improve chart component -- refactor(plugin-workflow): abstract to classes (#515) -- feat: column sortable and form item pattern (#518) -- feat(client): display option value -- feat(client): hide drawer header -- fix(audit-logs): operator does not exist: character varying = integer -- fix(custom-request): support string/json templates (#514) -- fix(cli): missing await -- feat: add block title (#513) -- fix: remove collections & fields from db (#511) -- fix(cli): upgrade error in node v14 -- feat: improve migrations (#510) -- fix(client): improve datepicker component, date with time zone, gmt support -- fix: datepicker with timezone -- fix(client): consolidate usage of date/time as UTC in transfering (#509) -- fix: formula bug -- fix: default exportable fields (#506) -- fix(audit-logs): sort by createdAt -- fix(plugin-export): allow to configure in acl -- fix: sign in/sign up with enter key -- fix(client): percent precision -- feat: association field block (#493) -- feat: plugin export (#479) -- fix: create or delete collection error (#501) -- feat: update collections & fields (#500) -- fix: rollback when field creation fails (#498) -- fix(client): set `dropdownMatchSelectWidth` to false globally (#497) -- fix(client): no-key warning in user menu items (#496) -- Feat(plugin workflow): cron field for schedule trigger configuration (#495) -- feat: audit logs (#494) -- fix(client): language settings -- feat(client): improve locale -- refactor(plugin-workflow): add revision column to execution (#491) -- fix(plugin-multi-app-manager): fix pg cannot create database block tests -- refactor(database): hook proxy (#402) -- feat: chart blocks (#484) -- refactor(plugin workflow): support number in repeat config for schedule -- chore(debug): add debug config (#475) -- fix: has one bug -- feat: relationships (#473) -- fix(plugin-workflow): fix collection trigger transaction (#474) -- fix(plugin-workflow): temporary solution for collection trigger conditions -- fix: markdown component (#469) -- fix: formula field and percent field (#467) -- fix(plugin-workflow): fix update workflow action (#464) -- fix(acl): skip when field does not exist -- fix: update formula field and percent field (#461) -- fix(client): export useSignin and useSignup -- fix(ci): node_version = 14 -- fix(cli): yarn install --production error -- fix(client): build error -- feat: add formula field type (#457) -- fix: the details of the associated data in the subtable are not displayed -- fix(plugin-workflow): fix languages (#451) -- fix: afterSync hook not triggered (#450) - -## 2022/06/01 ~ v0.7.0-alpha.83 - -- fix: default value of time zone -- fix(database): add timezone support -- docs(various): Improve readability (#447) -- fix(client): datetime with timezone -- feat(plugin-file-manager): record the creator of the attachment -- feat: custom request (#439) -- feat(plugin workflow): schedule trigger (#438) -- feat(database): db migrator (#432) -- fix(client): select component cannot be opened in sub-table block (#431) -- fix: error message "error:0308010C:digital envelope routines::unsupported -- docs(github): change to markdown format (#430) -- fix(cli): typo (#429) - -### New Features - -- Core: db migrator - -## 2022/05/26 ~ v0.7.0-alpha.82 - -- feat(client,sdk): improve api client - -### Breaking changes - -There are major changes to the `APIClient` API, see details [JavaScript SDK](./development/http-api/javascript-sdk.md) - -## 2022/05/25 ~ v0.7.0-alpha.81 - -- feat: add create-plugin command (#423) -- fix: "typescript": "4.5.5" -- docs: update documentation -- fix(client): filter menu item schema by permissions -- fix(database): cannot read properties of null (reading 'substring') -- fix(client): add description -- fix(client): clone schema before insert -- feat(client): add a description to the junction collection field -- fix(devtools): unexpected token '.' - -## 2022/05/24 ~ v0.7.0-alpha.78 - -- fix(client): add RemoteDocumentTitleProvider -- fix(client): incomplete calendar events -- fix(plugin-users): add translations (#416) - -## 2022/05/23 ~ v0.7.0-alpha.62 - -- feat(docs): add alert message -- fix(create-nocobase-app): storage path error -- fix(client): improve translation -- fix(cli): nocobase test command --db-clean option is invalid -- refactor(plugin-workflow): change column type of executed from boolean to integer (#411) - -## 2022/05/22 ~ v0.7.0-alpha.58 - -- fix: 204 no content response (#378) -- feat: destroy association field after target collection destroy (#376) -- fix(type): use sequelize native Transactionable instead of TransactionAble (#410) -- fix(plugin-workflow): remove previous listeners when collection changed in config (#409) -- fix(plugin-acl): missing pagination parameters (#394) -- feat(client): add custom action (#396) -- refactor(plugin-workflow): multiple instances and event management (fix #384) (#408) -- feat(cli): --db-sync options -- fix(client): pagination dropdown menu is blocked (#398) -- feat: display version number (#386) -- fix: missing isTruly/isFalsy filter operators (#390) -- fix(client): reset page number to first page (#399) - -## 2022/05/19 ~ v0.7.0-alpha.57 - -### ๆ–ฐๅŠŸ่ƒฝ - -- ๆ‰“ๅŒ…ๅทฅๅ…ท `@nocobase/build` -- cli ๅทฅๅ…ท `@nocobase/cli` -- devtools ๅŒ… `@nocobase/devtools` -- JavaScript ็‰ˆๆœฌ็š„ SDK `@nocobase/sdk` -- ๅ…จๆ–ฐ็š„ๆ–‡ๆกฃ๏ผˆv0.7๏ผ‰ - -### ้—ฎ้ข˜ไฟฎๅคๅ’Œๆ”น่ฟ› - -- ๅฐ† NocoBase ๆ— ไปฃ็ ๅนณๅฐๆ’ไปถๆ”พๅˆฐไธ€่ตท `@nocobase/preset-nocobase` -- ๆ”น่ฟ› create ่„šๆ‰‹ๆžถ `create-nocobase-app` -- ๅฎ˜็ฝ‘ๆ–‡ๆกฃไธป้ข˜ `dumi-theme-nocobase` - -### Breaking changes +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +## [v0.9.2-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.2-alpha.1...v0.9.2-alpha.2) - 2023-04-19 + +### Merged + +- fix: press enter to reload when the Pagination is focused [`#1720`](https://github.com/nocobase/nocobase/pull/1720) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.2-alpha.2 [`3dfd5a1`](https://github.com/nocobase/nocobase/commit/3dfd5a1f7a3ff14606357f441f547f40fdaa1344) + +## [v0.9.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.9.1-alpha.2...v0.9.2-alpha.1) - 2023-04-19 + +### Merged + +- refactor(plugin-workflow): change single form to custom form block [`#1707`](https://github.com/nocobase/nocobase/pull/1707) +- chore(ci): add timeout config for jobs [`#1725`](https://github.com/nocobase/nocobase/pull/1725) +- refactor(plugin-workflow): migrate menu items to options [`#1724`](https://github.com/nocobase/nocobase/pull/1724) +- fix(client): fix error on clear value in variable input [`#1723`](https://github.com/nocobase/nocobase/pull/1723) +- fix(record-picker): fix the table paging problem [`#1718`](https://github.com/nocobase/nocobase/pull/1718) +- fix(map-plugin): some data is incorrect [`#1717`](https://github.com/nocobase/nocobase/pull/1717) +- fix: data scope not effect in gantt [`#1716`](https://github.com/nocobase/nocobase/pull/1716) +- fix: button loading does not disappear when the operation submit failed [`#1698`](https://github.com/nocobase/nocobase/pull/1698) +- fix(linkage rule):multiple select condition judgment failed [`#1715`](https://github.com/nocobase/nocobase/pull/1715) +- Fix/save through table data [`#1714`](https://github.com/nocobase/nocobase/pull/1714) +- feat: improve ui design for linkage action [`#1659`](https://github.com/nocobase/nocobase/pull/1659) +- feat(map): support to filter other blocks [`#1691`](https://github.com/nocobase/nocobase/pull/1691) +- refactor: improve linkage rule enable [`#1700`](https://github.com/nocobase/nocobase/pull/1700) +- fix: find fields arg [`#1710`](https://github.com/nocobase/nocobase/pull/1710) +- feat(form-block): data templates [`#1704`](https://github.com/nocobase/nocobase/pull/1704) +- fix: linkage relationship data condition judgment failed [`#1681`](https://github.com/nocobase/nocobase/pull/1681) +- fix(gantt): update permission check in gantt block [`#1701`](https://github.com/nocobase/nocobase/pull/1701) +- fix: clearFormGraph [`#1706`](https://github.com/nocobase/nocobase/pull/1706) +- fix(plugin-workflow): fix request body variable component [`#1703`](https://github.com/nocobase/nocobase/pull/1703) +- fix(gantt): improve task bar text [`#1696`](https://github.com/nocobase/nocobase/pull/1696) +- fix: long text should be line feed [`#1686`](https://github.com/nocobase/nocobase/pull/1686) +- fix: cannot display data when remove last page and the page only just one item [`#1685`](https://github.com/nocobase/nocobase/pull/1685) +- fix: meta acl with association query [`#1695`](https://github.com/nocobase/nocobase/pull/1695) +- fix: linkage rule title can not set empty [`#1688`](https://github.com/nocobase/nocobase/pull/1688) +- feat: improve plugin manager ui [`#1650`](https://github.com/nocobase/nocobase/pull/1650) +- feat: gantt block [`#1393`](https://github.com/nocobase/nocobase/pull/1393) +- fix(client): fix constant input lose focus in variable [`#1689`](https://github.com/nocobase/nocobase/pull/1689) +- feat(plugin-workflow): add workflow specific logger [`#1677`](https://github.com/nocobase/nocobase/pull/1677) +- fix: remove designer [`#1684`](https://github.com/nocobase/nocobase/pull/1684) +- test: should load the .env.test [`#1678`](https://github.com/nocobase/nocobase/pull/1678) +- fix: incorrect language after logout [`#1679`](https://github.com/nocobase/nocobase/pull/1679) +- feat: optimize file collection [`#1666`](https://github.com/nocobase/nocobase/pull/1666) +- fix: sort field init performance [`#1675`](https://github.com/nocobase/nocobase/pull/1675) +- fix(plugin-workflow): fix null collection fields [`#1674`](https://github.com/nocobase/nocobase/pull/1674) +- fix(client): fix variable component read pretty mode [`#1673`](https://github.com/nocobase/nocobase/pull/1673) +- fix: ui problem of compact theme [`#1670`](https://github.com/nocobase/nocobase/pull/1670) +- fix: linkage rule enable effect in form [`#1669`](https://github.com/nocobase/nocobase/pull/1669) +- feat: collection template summary [`#1672`](https://github.com/nocobase/nocobase/pull/1672) +- feat: (plugin-workflow) dynamic expression [`#1560`](https://github.com/nocobase/nocobase/pull/1560) +- chore: find inherit collection warn [`#1663`](https://github.com/nocobase/nocobase/pull/1663) +- fix: linkage rule title config clear exception [`#1665`](https://github.com/nocobase/nocobase/pull/1665) +- feat: support tableoid filter [`#1657`](https://github.com/nocobase/nocobase/pull/1657) +- feat(plugin-workflow): add array mapping support in processor [`#1662`](https://github.com/nocobase/nocobase/pull/1662) +- fix(plugin-workflow): fix appends null to collection trigger [`#1661`](https://github.com/nocobase/nocobase/pull/1661) +- feat(filter-operators): eq and ne operators support array [`#1658`](https://github.com/nocobase/nocobase/pull/1658) +- fix(plugin-workflow): fix todo drawer data load [`#1656`](https://github.com/nocobase/nocobase/pull/1656) +- refactor(client): improve translation [`#1654`](https://github.com/nocobase/nocobase/pull/1654) +- fix: fix the 'Add menu item' button disappears [`#1655`](https://github.com/nocobase/nocobase/pull/1655) +- chore: add new allowAddtoCurrent config [`#1652`](https://github.com/nocobase/nocobase/pull/1652) +- feat: support file collection [`#1636`](https://github.com/nocobase/nocobase/pull/1636) +- fix(plugin-workflow): fix manual node drawer [`#1653`](https://github.com/nocobase/nocobase/pull/1653) +- chore: inhertis api with difference schema [`#1545`](https://github.com/nocobase/nocobase/pull/1545) +- fix: select record can not enable child collection [`#1649`](https://github.com/nocobase/nocobase/pull/1649) +- feat: plugin before enable hook [`#1648`](https://github.com/nocobase/nocobase/pull/1648) +- chore: add transaction in set field action [`#1647`](https://github.com/nocobase/nocobase/pull/1647) +- fix(linkage rule):linkage rule not display in action [`#1644`](https://github.com/nocobase/nocobase/pull/1644) +- refactor: view collection options [`#1643`](https://github.com/nocobase/nocobase/pull/1643) +- fix: update field error [`#1645`](https://github.com/nocobase/nocobase/pull/1645) +- feat(Table): column action support linkage rules [`#1638`](https://github.com/nocobase/nocobase/pull/1638) +- fix(view-collection): field name cannot be edited when there with field source [`#1642`](https://github.com/nocobase/nocobase/pull/1642) +- fix: linkage rule config closing rules require reopening the form to take effect [`#1640`](https://github.com/nocobase/nocobase/pull/1640) +- refactor(client): change Variable.TextArea to controlled component [`#1605`](https://github.com/nocobase/nocobase/pull/1605) +- fix: get pg view def [`#1641`](https://github.com/nocobase/nocobase/pull/1641) +- fix: infer view column type with alias [`#1634`](https://github.com/nocobase/nocobase/pull/1634) +- fix(plugin-workflow): fix minors ui issues [`#1635`](https://github.com/nocobase/nocobase/pull/1635) +- chore: disabled underscored in view collection. [`#1633`](https://github.com/nocobase/nocobase/pull/1633) +- fix: form action dragging area is too large [`#1628`](https://github.com/nocobase/nocobase/pull/1628) +- fix: FixedBlock related ui [`#1632`](https://github.com/nocobase/nocobase/pull/1632) +- feat: database view collection [`#1587`](https://github.com/nocobase/nocobase/pull/1587) +- fix: init sort value in sort field with scopeKey [`#1626`](https://github.com/nocobase/nocobase/pull/1626) +- style: linkage rule style improve [`#1625`](https://github.com/nocobase/nocobase/pull/1625) +- fix: find with attributes and group [`#1411`](https://github.com/nocobase/nocobase/pull/1411) +- docs: transform video link to video tag [`#1414`](https://github.com/nocobase/nocobase/pull/1414) +- feat(parse-variables): support to parse variables in filter params [`#1558`](https://github.com/nocobase/nocobase/pull/1558) +- fix(linkage rules) : support naming, enabling and disabling, copying, and assigning null values [`#1511`](https://github.com/nocobase/nocobase/pull/1511) +- chore: update test ci [`#1622`](https://github.com/nocobase/nocobase/pull/1622) +- fix: history add new button does not support enabling child collection [`#1536`](https://github.com/nocobase/nocobase/pull/1536) +- fix/(linkages-action): detail block actions does not support linkage rules [`#1504`](https://github.com/nocobase/nocobase/pull/1504) +- fix: avoid fixedblock height working in popup [`#1621`](https://github.com/nocobase/nocobase/pull/1621) +- fix: when the page has FixedBlock, the table of popup is not displayed [`#1619`](https://github.com/nocobase/nocobase/pull/1619) +- feat: association-filter-improve [`#1606`](https://github.com/nocobase/nocobase/pull/1606) +- fix(Table): cannot display table data [`#1617`](https://github.com/nocobase/nocobase/pull/1617) +- fix(plugin-workflow): fix todo list form read-pretty for non-assigneed user [`#1615`](https://github.com/nocobase/nocobase/pull/1615) +- feat(table): hidden pagination when only one page is available [`#1614`](https://github.com/nocobase/nocobase/pull/1614) +- refactor: improve FixedBlock performance [`#1593`](https://github.com/nocobase/nocobase/pull/1593) +- fix(collection-manager): infinite recursion [`#1608`](https://github.com/nocobase/nocobase/pull/1608) +- fix(audit-logs): Add ellipsis feature to table columns [`#1603`](https://github.com/nocobase/nocobase/pull/1603) +- feat: improve the non-link ui of association data [`#1602`](https://github.com/nocobase/nocobase/pull/1602) +- feat(Kanban): the card support open mode [`#1601`](https://github.com/nocobase/nocobase/pull/1601) +- fix( importable-field): incorrect display when moving sort handle [`#1613`](https://github.com/nocobase/nocobase/pull/1613) +- fix: enable child collections remain after deleting a child collection [`#1610`](https://github.com/nocobase/nocobase/pull/1610) +- fix: destroy through table record referencing collections table [`#1611`](https://github.com/nocobase/nocobase/pull/1611) +- fix(plugin-workflow): add default actions value of manual node [`#1600`](https://github.com/nocobase/nocobase/pull/1600) +- feat(plugin-workflow): add failOnEmpty option for query node [`#1599`](https://github.com/nocobase/nocobase/pull/1599) +- fix(plugin-workflow): use toJSON instead of get to get valid result [`#1596`](https://github.com/nocobase/nocobase/pull/1596) +- Translation pt-BR (Brazilian Portuguese) [`#1591`](https://github.com/nocobase/nocobase/pull/1591) +- fix: role permission add new scope display blank [`#1592`](https://github.com/nocobase/nocobase/pull/1592) +- fix(FixedBlock): avoid kanban triggering programmatic scrolling [`#1406`](https://github.com/nocobase/nocobase/pull/1406) +- fix: repeat request categories when switching between graph interface and collection&fields [`#1590`](https://github.com/nocobase/nocobase/pull/1590) +- fix: collectionFieldsOptions cannot get all fields [`#1588`](https://github.com/nocobase/nocobase/pull/1588) +- fix(plugin-workflow): fix input width in request node config [`#1585`](https://github.com/nocobase/nocobase/pull/1585) +- feat(filter-blocks): support filter-blocks [`#1505`](https://github.com/nocobase/nocobase/pull/1505) +- refactor: multi-app [`#1578`](https://github.com/nocobase/nocobase/pull/1578) +- feat: compact theme [`#1574`](https://github.com/nocobase/nocobase/pull/1574) +- feat: support cron field [`#1421`](https://github.com/nocobase/nocobase/pull/1421) +- fix(Calendar): ensur to get correct gridInitializer when adding a newโ€ฆ [`#1425`](https://github.com/nocobase/nocobase/pull/1425) +- feat(markdown): support mermaid and better style [`#1583`](https://github.com/nocobase/nocobase/pull/1583) +- fix(plugin-map): map block repeats [`#1582`](https://github.com/nocobase/nocobase/pull/1582) +- feat: tree collection [`#1561`](https://github.com/nocobase/nocobase/pull/1561) +- feat(plugin-map): add map block [`#1486`](https://github.com/nocobase/nocobase/pull/1486) +- chore: lazy load sub app in share collection [`#1569`](https://github.com/nocobase/nocobase/pull/1569) +- fix(record-picker): supports adding sub-collection records [`#1573`](https://github.com/nocobase/nocobase/pull/1573) +- fix: app manager reload [`#1565`](https://github.com/nocobase/nocobase/pull/1565) +- feat: multi-app-share-collection plugin [`#1562`](https://github.com/nocobase/nocobase/pull/1562) +- feat: record picker support to enable links [`#1515`](https://github.com/nocobase/nocobase/pull/1515) +- feat: multiple apps [`#1540`](https://github.com/nocobase/nocobase/pull/1540) +- docs(client): add variable docs [`#1556`](https://github.com/nocobase/nocobase/pull/1556) +- fix(charts): improve chart table preview with object type [`#1555`](https://github.com/nocobase/nocobase/pull/1555) +- feat(plugin-workflow) config preload associations in triggers and nodes [`#1548`](https://github.com/nocobase/nocobase/pull/1548) + +### Fixed + +- fix(plugin-workflow): fix todo list form read-pretty for non-assigneed user (#1615) [`#1572`](https://github.com/nocobase/nocobase/issues/1572) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.2-alpha.1 [`d1adc9d`](https://github.com/nocobase/nocobase/commit/d1adc9de0b87b896e90c81c226646b840309c240) +- fix(file-manager): upgrade s3 version [`50183b0`](https://github.com/nocobase/nocobase/commit/50183b065d32be5d2f6590bfb0c6190fafc12881) +- fix: linkage rule [`b8776fe`](https://github.com/nocobase/nocobase/commit/b8776fe2d0fd6729c18b968d9f7b15e7c81c4ef2) + +## [v0.9.1-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.1-alpha.1...v0.9.1-alpha.2) - 2023-03-09 + +### Merged + +- fix(plugin-workflow): fix module import (#1550) [`#1552`](https://github.com/nocobase/nocobase/pull/1552) +- chore: relation repository response when source model not found [`#1546`](https://github.com/nocobase/nocobase/pull/1546) +- fix(plugin-workflow): fix assignees config component in manual node [`#1547`](https://github.com/nocobase/nocobase/pull/1547) +- feat: stopped state in application [`#1543`](https://github.com/nocobase/nocobase/pull/1543) +- fix(plugin-workflow): fix AssociationInput field path [`#1542`](https://github.com/nocobase/nocobase/pull/1542) +- fix: cache with index.html [`#1541`](https://github.com/nocobase/nocobase/pull/1541) +- fix: belongs to many through table with custom schema [`#1539`](https://github.com/nocobase/nocobase/pull/1539) +- fix(plugin-formula): expose formula field result in form [`#1534`](https://github.com/nocobase/nocobase/pull/1534) +- test: with collection_manager_schema env [`#1532`](https://github.com/nocobase/nocobase/pull/1532) +- fix: filter by association field with underscored [`#1537`](https://github.com/nocobase/nocobase/pull/1537) +- fix(charts): fix copy [`#1533`](https://github.com/nocobase/nocobase/pull/1533) +- feat: add chart plugin [`#1477`](https://github.com/nocobase/nocobase/pull/1477) +- feat: support add new in block for inheritance collection [`#1518`](https://github.com/nocobase/nocobase/pull/1518) +- refactor(plugin-workflow): change canvas card and adjust styles [`#1529`](https://github.com/nocobase/nocobase/pull/1529) +- fix: test with nocobase plugin [`#1525`](https://github.com/nocobase/nocobase/pull/1525) +- fix: nginx cache [`#1523`](https://github.com/nocobase/nocobase/pull/1523) +- fix: remove field when collection has difference schema with database [`#1524`](https://github.com/nocobase/nocobase/pull/1524) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.1-alpha.2 [`bc5156d`](https://github.com/nocobase/nocobase/commit/bc5156d458adecce8189aa535e5738672e63c2c0) +- fix: add new blocks [`3904aa7`](https://github.com/nocobase/nocobase/commit/3904aa7c111eaa522cc7072a268a579aa115906e) +- fix: schema name conflicts [`a463c3d`](https://github.com/nocobase/nocobase/commit/a463c3d747666496721571110bd77dba3726c2f7) + +## [v0.9.1-alpha.1](https://github.com/nocobase/nocobase/compare/v0.9.0-alpha.2...v0.9.1-alpha.1) - 2023-03-03 + +### Merged + +- refactor: audit logs block [`#1517`](https://github.com/nocobase/nocobase/pull/1517) +- fix(evaluators): fix preprocessing and add test cases [`#1519`](https://github.com/nocobase/nocobase/pull/1519) +- chore(debug): fix debug filename when run test [`#1520`](https://github.com/nocobase/nocobase/pull/1520) +- feat: collection manager schema env [`#1506`](https://github.com/nocobase/nocobase/pull/1506) +- fix(client): fix checkbox unchecked display [`#1508`](https://github.com/nocobase/nocobase/pull/1508) +- feat(snapshot-field): improve transition [`#1513`](https://github.com/nocobase/nocobase/pull/1513) +- fix(plugin-workflow): fix CollectionField validation when using variable [`#1512`](https://github.com/nocobase/nocobase/pull/1512) +- feat(plugin-formula): calculation with snapshot field [`#1498`](https://github.com/nocobase/nocobase/pull/1498) +- fix(association-select): filter without data scope not work [`#1509`](https://github.com/nocobase/nocobase/pull/1509) +- feat: fallback sort field init to createdAt field [`#1507`](https://github.com/nocobase/nocobase/pull/1507) +- fix(graphical-interface): collection category does not display title [`#1503`](https://github.com/nocobase/nocobase/pull/1503) +- fix(association-select): data is incorrect when use data scope [`#1491`](https://github.com/nocobase/nocobase/pull/1491) +- feat: dialect version accessors [`#1502`](https://github.com/nocobase/nocobase/pull/1502) +- fix: collection schema updated but model _schema not change [`#1500`](https://github.com/nocobase/nocobase/pull/1500) +- Update zh_CN.ts [`#1481`](https://github.com/nocobase/nocobase/pull/1481) +- fix(linkageRules): support empty condiction [`#1496`](https://github.com/nocobase/nocobase/pull/1496) +- feat: form/button linkage rules [`#1456`](https://github.com/nocobase/nocobase/pull/1456) +- fix: collection importer has incorrect reference [`#1495`](https://github.com/nocobase/nocobase/pull/1495) +- feat: support custom plugin deployment in dockerfile [`#1494`](https://github.com/nocobase/nocobase/pull/1494) +- fix: environment variables [`#1490`](https://github.com/nocobase/nocobase/pull/1490) +- feat: prepare database method [`#1492`](https://github.com/nocobase/nocobase/pull/1492) +- Fix/multiple schema query [`#1488`](https://github.com/nocobase/nocobase/pull/1488) +- fix: string violation [`#1487`](https://github.com/nocobase/nocobase/pull/1487) +- refactor(plugin-workflow): migrate evaluators [`#1485`](https://github.com/nocobase/nocobase/pull/1485) +- docs: fix typo [`#1482`](https://github.com/nocobase/nocobase/pull/1482) +- fix(plugin-workflow): fix customized job status [`#1484`](https://github.com/nocobase/nocobase/pull/1484) +- fix(plugin-workflow): fix condition config param [`#1483`](https://github.com/nocobase/nocobase/pull/1483) +- fix(plugin-workflow): fix migration [`#1479`](https://github.com/nocobase/nocobase/pull/1479) +- fix(plugin-workflow): fix migration on table prefix [`#1478`](https://github.com/nocobase/nocobase/pull/1478) +- refactor(plugin-formula): combine 2 formula field type into 1 [`#1457`](https://github.com/nocobase/nocobase/pull/1457) +- fix(plugin-workflow): fix migration for calculation [`#1476`](https://github.com/nocobase/nocobase/pull/1476) +- fix(plugin-workflow): fix schedule trigger number type repeat [`#1475`](https://github.com/nocobase/nocobase/pull/1475) +- Feat(plugin-workflow) manual instruction [`#1339`](https://github.com/nocobase/nocobase/pull/1339) +- feat: support for importing attachments [`#1466`](https://github.com/nocobase/nocobase/pull/1466) +- fix: column not exists error after destory relation field [`#1465`](https://github.com/nocobase/nocobase/pull/1465) +- fix: add schema [`#1464`](https://github.com/nocobase/nocobase/pull/1464) +- fix: avoid o2o, o2m can select the data already selected [`#1462`](https://github.com/nocobase/nocobase/pull/1462) +- feat: add test cases [`#1463`](https://github.com/nocobase/nocobase/pull/1463) +- feat: update zh_CN.ts [`#1458`](https://github.com/nocobase/nocobase/pull/1458) +- refactor: export plugin [`#1460`](https://github.com/nocobase/nocobase/pull/1460) +- Fix/pg schema with inherit [`#1446`](https://github.com/nocobase/nocobase/pull/1446) +- feat: multiple apps admin [`#1431`](https://github.com/nocobase/nocobase/pull/1431) +- chore: fix build plugin error [`#1454`](https://github.com/nocobase/nocobase/pull/1454) +- feat: provide the underscored option for the database [`#1366`](https://github.com/nocobase/nocobase/pull/1366) +- Revert "fix(table): make filed overflow behavior right (#1392)" [`#1452`](https://github.com/nocobase/nocobase/pull/1452) +- fix(collection category): zh_cn locale defect [`#1451`](https://github.com/nocobase/nocobase/pull/1451) +- feat: add namespace and duplicator parameters for collection options [`#1449`](https://github.com/nocobase/nocobase/pull/1449) +- fix(snapshot-field): remove depth limit [`#1450`](https://github.com/nocobase/nocobase/pull/1450) +- chore: update licenses url [`#1285`](https://github.com/nocobase/nocobase/pull/1285) +- feat: association snapshot [`#1438`](https://github.com/nocobase/nocobase/pull/1438) +- fix(table): make filed overflow behavior right [`#1392`](https://github.com/nocobase/nocobase/pull/1392) +- fix(plugin-sequence): fix missed createdAt field in bulk hook [`#1448`](https://github.com/nocobase/nocobase/pull/1448) +- fix: error:0308010C:digital envelope routines::unsupported [`#1447`](https://github.com/nocobase/nocobase/pull/1447) +- feat: collection categories [`#1327`](https://github.com/nocobase/nocobase/pull/1327) +- fix(plugin-fm): fix path config for storages [`#1445`](https://github.com/nocobase/nocobase/pull/1445) +- fix: node.js 17+, add openssl-legacy-provider [`#1434`](https://github.com/nocobase/nocobase/pull/1434) +- fix(plugin-workflow): fix schedule on field null value [`#1442`](https://github.com/nocobase/nocobase/pull/1442) +- feat: pg schema support [`#1439`](https://github.com/nocobase/nocobase/pull/1439) +- fix(i18n): set key and ns separator default to false [`#1432`](https://github.com/nocobase/nocobase/pull/1432) +- feat: disable trigger when import collection [`#1417`](https://github.com/nocobase/nocobase/pull/1417) +- chore: translate 'Add tab' in page header [`#1424`](https://github.com/nocobase/nocobase/pull/1424) +- fix(plugin-workflow): use promise to request [`#1426`](https://github.com/nocobase/nocobase/pull/1426) +- fix(acl): custom appends merge strategy [`#1416`](https://github.com/nocobase/nocobase/pull/1416) +- docs: update G2Plot example url [`#1408`](https://github.com/nocobase/nocobase/pull/1408) +- docs: fix typo [`#1412`](https://github.com/nocobase/nocobase/pull/1412) +- fix(FixedBlock): using both association filters and FixedBlock does not show the complete table [`#1405`](https://github.com/nocobase/nocobase/pull/1405) +- feat(calendar): startDate and endDate support the use of association fields [`#1397`](https://github.com/nocobase/nocobase/pull/1397) +- fix: load through collection before belongsToMany field bind [`#1409`](https://github.com/nocobase/nocobase/pull/1409) +- feat(verification-plugin): support tencent sms [`#1382`](https://github.com/nocobase/nocobase/pull/1382) +- fix: foreign keys are editable when adding fields [`#1404`](https://github.com/nocobase/nocobase/pull/1404) +- fix: navbar_ui style [`#1398`](https://github.com/nocobase/nocobase/pull/1398) +- fix: inherit startup sort [`#1402`](https://github.com/nocobase/nocobase/pull/1402) +- fix(plugin-workflow): fix url input width for request config [`#1401`](https://github.com/nocobase/nocobase/pull/1401) +- Fix/snapshot [`#1396`](https://github.com/nocobase/nocobase/pull/1396) +- feat: fix through collections inherits filter [`#1394`](https://github.com/nocobase/nocobase/pull/1394) +- Fix(plugin-sequence): support sequence field in m2m through table [`#1383`](https://github.com/nocobase/nocobase/pull/1383) +- fix(plugin-workflow): adjust executed alert position [`#1381`](https://github.com/nocobase/nocobase/pull/1381) +- fix: through collection individual hooks [`#1378`](https://github.com/nocobase/nocobase/pull/1378) +- fix: through collection records should not be reset [`#1377`](https://github.com/nocobase/nocobase/pull/1377) +- feat(client): add form disabled context [`#1374`](https://github.com/nocobase/nocobase/pull/1374) +- Fix(plugin-workflow): request node [`#1367`](https://github.com/nocobase/nocobase/pull/1367) + +### Commits + +- docs: add plug-in documentation [`68511f0`](https://github.com/nocobase/nocobase/commit/68511f05bc7dbca49e0ab95eb868a193a3502d71) +- feat(db): field value parser [`5805b69`](https://github.com/nocobase/nocobase/commit/5805b69455532ad643e9c87831da985d41bc5d6d) +- chore(versions): ๐Ÿ˜Š publish v0.9.1-alpha.1 [`946c8f2`](https://github.com/nocobase/nocobase/commit/946c8f25a3df538f4a83abe4468786cf554d8914) + +## [v0.9.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.9.0-alpha.1...v0.9.0-alpha.2) - 2023-01-14 + +### Merged + +- feat: load multiple languages dynamically [`#1355`](https://github.com/nocobase/nocobase/pull/1355) +- refactor(plugin-workflow): refactor request instruction [`#1356`](https://github.com/nocobase/nocobase/pull/1356) +- feat: update dependencies [`#1353`](https://github.com/nocobase/nocobase/pull/1353) + +### Commits + +- feat: add en-US.example.json [`86554c0`](https://github.com/nocobase/nocobase/commit/86554c0205d6cb8f5dd3a293c9929b4aa9cb5897) +- fix: locale cache [`a4116a2`](https://github.com/nocobase/nocobase/commit/a4116a251b00109dad96e5062bf9b6441544f8b3) +- chore(versions): ๐Ÿ˜Š publish v0.9.0-alpha.2 [`daa91e9`](https://github.com/nocobase/nocobase/commit/daa91e95a6192bac19702eb17e9f764a7df11477) + +## [v0.9.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.8.1-alpha.4...v0.9.0-alpha.1) - 2023-01-11 + +### Merged + +- feat: change license [`#1350`](https://github.com/nocobase/nocobase/pull/1350) +- feat: formula plugin [`#1344`](https://github.com/nocobase/nocobase/pull/1344) +- feat: acl optimization [`#1136`](https://github.com/nocobase/nocobase/pull/1136) +- feat: duplicator plugin [`#1265`](https://github.com/nocobase/nocobase/pull/1265) +- fix(plugin-workflow): fix missed preparing [`#1337`](https://github.com/nocobase/nocobase/pull/1337) +- fix: FixedBlock does not disappear when the current tab is deleted [`#1324`](https://github.com/nocobase/nocobase/pull/1324) +- feat(Select): should compile title and label [`#1332`](https://github.com/nocobase/nocobase/pull/1332) +- fix: improve filter [`#1333`](https://github.com/nocobase/nocobase/pull/1333) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.9.0-alpha.1 [`013f091`](https://github.com/nocobase/nocobase/commit/013f0916a521fef74970ba6feed76c1b17b6ff01) +- fix: typeError: Cannot read properties of undefined (reading 'find') [`1dc4142`](https://github.com/nocobase/nocobase/commit/1dc4142da2195fb6f09bd691b23948d9d5f9e01d) +- feat: improve translation [`31794d3`](https://github.com/nocobase/nocobase/commit/31794d3c1b7af13d9dbaca8d12b1843c18553307) + +## [v0.8.1-alpha.4](https://github.com/nocobase/nocobase/compare/v0.8.1-alpha.2...v0.8.1-alpha.4) - 2023-01-05 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.8.1-alpha.4 [`#1331`](https://github.com/nocobase/nocobase/pull/1331) + +## [v0.8.1-alpha.2](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.13...v0.8.1-alpha.2) - 2023-01-05 + +### Merged + +- fix(plugin-sequence-field): integer generated should not less then start [`#1330`](https://github.com/nocobase/nocobase/pull/1330) +- fix: filter removeNullConditions [`#1329`](https://github.com/nocobase/nocobase/pull/1329) +- fix: snapshot display fix [`#1328`](https://github.com/nocobase/nocobase/pull/1328) +- fix(plugin-workflow): fix history drawer in workflow canvas [`#1326`](https://github.com/nocobase/nocobase/pull/1326) +- feat: snapshot field plugin [`#1253`](https://github.com/nocobase/nocobase/pull/1253) +- feat: configure fields style fix [`#1322`](https://github.com/nocobase/nocobase/pull/1322) +- fix(plugin-workflow): fix events in prepare [`#1325`](https://github.com/nocobase/nocobase/pull/1325) +- fix(database): filter match [`#1319`](https://github.com/nocobase/nocobase/pull/1319) +- fix: action merge params [`#1321`](https://github.com/nocobase/nocobase/pull/1321) +- chore: set belongs to many on delete to cascade [`#1311`](https://github.com/nocobase/nocobase/pull/1311) +- fix: disable filterByTk options in destory method when collection has no primary key or has composite primary key [`#1313`](https://github.com/nocobase/nocobase/pull/1313) +- fix: slow find with include in mysql [`#1304`](https://github.com/nocobase/nocobase/pull/1304) +- fix(map-plugin): cannot save because the value is null [`#1309`](https://github.com/nocobase/nocobase/pull/1309) +- fix: create inherits with table name contains upper case [`#1308`](https://github.com/nocobase/nocobase/pull/1308) +- fix: upgrade error [`#1303`](https://github.com/nocobase/nocobase/pull/1303) +- fix: association filter [`#1301`](https://github.com/nocobase/nocobase/pull/1301) +- fix: pageSize 200 & not a function [`#1299`](https://github.com/nocobase/nocobase/pull/1299) +- refactor(client): make tab initializer more common [`#1298`](https://github.com/nocobase/nocobase/pull/1298) +- fix(Select): title field and clear button not work [`#1296`](https://github.com/nocobase/nocobase/pull/1296) +- fix(plugin-fm): fix local storage config and skip empty base url [`#1294`](https://github.com/nocobase/nocobase/pull/1294) +- feat: antd->4.2.8 [`#1231`](https://github.com/nocobase/nocobase/pull/1231) +- feat: association filter [`#1274`](https://github.com/nocobase/nocobase/pull/1274) +- chore: upgrade sequelize version to to latest [`#1234`](https://github.com/nocobase/nocobase/pull/1234) +- feat: add iframe-block plugin [`#1281`](https://github.com/nocobase/nocobase/pull/1281) +- feat: update page size to 200 and limit fields [`#1282`](https://github.com/nocobase/nocobase/pull/1282) +- fix: prevent horizontal scroll of menus [`#1279`](https://github.com/nocobase/nocobase/pull/1279) +- Turkish language created for Docs. Belgeler iรงin tรผrkรงe dil desteฤŸi [`#1071`](https://github.com/nocobase/nocobase/pull/1071) +- fix(client/kanban): fix kanban card default active all fields bug [`#1270`](https://github.com/nocobase/nocobase/pull/1270) +- fix: cannot delete event in calendar [`#1277`](https://github.com/nocobase/nocobase/pull/1277) +- fix(AssociationSelect): missing field title in details [`#1275`](https://github.com/nocobase/nocobase/pull/1275) +- fix: menu cannot scroll [`#1276`](https://github.com/nocobase/nocobase/pull/1276) +- feat: support fixed block [`#1267`](https://github.com/nocobase/nocobase/pull/1267) +- fix(plugin-sequence): fix test case [`#1268`](https://github.com/nocobase/nocobase/pull/1268) +- fix(plugin-sequence): fix update pattern index [`#1266`](https://github.com/nocobase/nocobase/pull/1266) +- feat : support fixed menu and header [`#1260`](https://github.com/nocobase/nocobase/pull/1260) +- fix: destroy field in parent table [`#1263`](https://github.com/nocobase/nocobase/pull/1263) +- refactor(client/popup): text: 'Set popup size' changed to 'Popup size' [`#1262`](https://github.com/nocobase/nocobase/pull/1262) +- feat: page tabs [`#1261`](https://github.com/nocobase/nocobase/pull/1261) +- fix(plugin-fm): drawer form values [`#1259`](https://github.com/nocobase/nocobase/pull/1259) +- feat: support sync button [`#1258`](https://github.com/nocobase/nocobase/pull/1258) +- fix: isOverride cannot work [`#1257`](https://github.com/nocobase/nocobase/pull/1257) +- refactor(sequence-field): move to plugin and use table to record [`#1209`](https://github.com/nocobase/nocobase/pull/1209) +- feat: add map plugin [`#1229`](https://github.com/nocobase/nocobase/pull/1229) +- fix(plugin-workflow): fix job result in history [`#1242`](https://github.com/nocobase/nocobase/pull/1242) +- feat: set field [`#1237`](https://github.com/nocobase/nocobase/pull/1237) +- chore: update ci [`#1239`](https://github.com/nocobase/nocobase/pull/1239) +- feat(client/popup): support set drawer and modal popup size [`#1224`](https://github.com/nocobase/nocobase/pull/1224) +- fix(plugin-file-manager): fix local serve middleware [`#1226`](https://github.com/nocobase/nocobase/pull/1226) +- feat: iframe block [`#1225`](https://github.com/nocobase/nocobase/pull/1225) +- fix(workflow/request-var): fix request node var editor [`#1223`](https://github.com/nocobase/nocobase/pull/1223) +- fix: change nginx timeout as 10min [`#1222`](https://github.com/nocobase/nocobase/pull/1222) +- fix: change import timeout as 10 min [`#1221`](https://github.com/nocobase/nocobase/pull/1221) +- fix: field component options appears in non-association interface [`#1220`](https://github.com/nocobase/nocobase/pull/1220) +- Fix(plugin-workflow): client refactor [`#1163`](https://github.com/nocobase/nocobase/pull/1163) +- feat(cli): quickstart [`#1204`](https://github.com/nocobase/nocobase/pull/1204) +- fix(plugin-cm): fix interfaces injection and getter [`#1196`](https://github.com/nocobase/nocobase/pull/1196) +- fix(i18n): move back key to global [`#1195`](https://github.com/nocobase/nocobase/pull/1195) +- test(plugin-workflow): add cache and test for sqlite [`#1194`](https://github.com/nocobase/nocobase/pull/1194) +- fix(plugin-workflow): use dual pipes to process triggers [`#1187`](https://github.com/nocobase/nocobase/pull/1187) +- fix(plugin-workflow): temp skip case [`#1188`](https://github.com/nocobase/nocobase/pull/1188) +- feat(menu): when a group is selected, the submenu items are also selected together [`#1152`](https://github.com/nocobase/nocobase/pull/1152) +- fix(plugin-workflow): fix transaction in trigger [`#1186`](https://github.com/nocobase/nocobase/pull/1186) +- feat: export blob type error [`#1170`](https://github.com/nocobase/nocobase/pull/1170) +- fix(plugin-workflow): dispatch when server start [`#1183`](https://github.com/nocobase/nocobase/pull/1183) +- fix: yarn start error in windows system [`#1177`](https://github.com/nocobase/nocobase/pull/1177) +- fix(plugin-users): fix initialization of sms verification [`#1173`](https://github.com/nocobase/nocobase/pull/1173) +- fix(plugin-workflow): fix test case [`#1172`](https://github.com/nocobase/nocobase/pull/1172) +- feat(plugin-workflow): add duplicate action [`#1171`](https://github.com/nocobase/nocobase/pull/1171) +- fix(plugin-workflow): fix context operand [`#1169`](https://github.com/nocobase/nocobase/pull/1169) +- fix: auto deploy error [`#1168`](https://github.com/nocobase/nocobase/pull/1168) +- feat: configurable the scope of target collections [`#1165`](https://github.com/nocobase/nocobase/pull/1165) +- ci(workflows): fix auto deploy error [`#1166`](https://github.com/nocobase/nocobase/pull/1166) +- ci(workflows): support manual depoly and stop pr [`#1132`](https://github.com/nocobase/nocobase/pull/1132) +- fix: saml oidc text [`#1164`](https://github.com/nocobase/nocobase/pull/1164) +- fix: transaction error [`#1162`](https://github.com/nocobase/nocobase/pull/1162) +- fix: create inherits with empty table [`#1160`](https://github.com/nocobase/nocobase/pull/1160) +- fix: sso optimization [`#1159`](https://github.com/nocobase/nocobase/pull/1159) +- feat: saml [`#1143`](https://github.com/nocobase/nocobase/pull/1143) +- feat: oidc [`#1126`](https://github.com/nocobase/nocobase/pull/1126) +- feat: belongs to many on delete [`#1158`](https://github.com/nocobase/nocobase/pull/1158) +- Feat/collection templates [`#1124`](https://github.com/nocobase/nocobase/pull/1124) +- Fix/action 404 [`#1157`](https://github.com/nocobase/nocobase/pull/1157) +- fix: 404 response [`#1156`](https://github.com/nocobase/nocobase/pull/1156) +- Feat: plugin verification config [`#1129`](https://github.com/nocobase/nocobase/pull/1129) +- feat: support use select field [`#1105`](https://github.com/nocobase/nocobase/pull/1105) +- fix(plugin-workflow): fix trigger context getters [`#1149`](https://github.com/nocobase/nocobase/pull/1149) +- feat: option readPretty optimization [`#1138`](https://github.com/nocobase/nocobase/pull/1138) +- fix(plugin-workflow): fix locale [`#1145`](https://github.com/nocobase/nocobase/pull/1145) +- fix(plugin-workflow): fix endsOn field [`#1144`](https://github.com/nocobase/nocobase/pull/1144) +- fix: create empty collection [`#1141`](https://github.com/nocobase/nocobase/pull/1141) +- fix(client): fix no key warning in menu [`#1140`](https://github.com/nocobase/nocobase/pull/1140) +- Fix(plugin workflow) interval [`#1139`](https://github.com/nocobase/nocobase/pull/1139) +- fix: x-collection-field [`#1134`](https://github.com/nocobase/nocobase/pull/1134) +- feat: update many [`#1135`](https://github.com/nocobase/nocobase/pull/1135) +- feat(workflow): support Http Request Node [`#1102`](https://github.com/nocobase/nocobase/pull/1102) +- fix: incorrect repeat of calendar [`#1131`](https://github.com/nocobase/nocobase/pull/1131) +- fix(database): refresh indexes [`#1127`](https://github.com/nocobase/nocobase/pull/1127) +- fix: reference check after remove collection [`#1123`](https://github.com/nocobase/nocobase/pull/1123) +- fix: sort field with table dose not have primary key [`#1119`](https://github.com/nocobase/nocobase/pull/1119) +- fix: test [`#1118`](https://github.com/nocobase/nocobase/pull/1118) +- fix: update to bigint [`#1117`](https://github.com/nocobase/nocobase/pull/1117) +- fix(cm): default values for override [`#1112`](https://github.com/nocobase/nocobase/pull/1112) +- fix: update sequence and foreignKey [`#1116`](https://github.com/nocobase/nocobase/pull/1116) +- fix(plugin-workflow): fix workflow schema [`#1115`](https://github.com/nocobase/nocobase/pull/1115) +- fix(client): menu key warnings [`#1114`](https://github.com/nocobase/nocobase/pull/1114) +- fix: fk type invalid [`#1113`](https://github.com/nocobase/nocobase/pull/1113) +- fix: handle column does not exist error [`#1110`](https://github.com/nocobase/nocobase/pull/1110) +- fix: inherits with collection not exists [`#1109`](https://github.com/nocobase/nocobase/pull/1109) +- fix(locale): move description to global [`#1108`](https://github.com/nocobase/nocobase/pull/1108) +- feat: using bigint for id field [`#1100`](https://github.com/nocobase/nocobase/pull/1100) +- refactor: formula plugin [`#1082`](https://github.com/nocobase/nocobase/pull/1082) +- fix: create inherits from a table that has no id [`#1104`](https://github.com/nocobase/nocobase/pull/1104) +- fix: find table sequence [`#1101`](https://github.com/nocobase/nocobase/pull/1101) +- Feat/collection inherits [`#1097`](https://github.com/nocobase/nocobase/pull/1097) +- fix: create collection with emtpy inhertis params [`#1096`](https://github.com/nocobase/nocobase/pull/1096) +- fix: remove node after collection removed [`#1095`](https://github.com/nocobase/nocobase/pull/1095) +- fix: unbind error [`#1094`](https://github.com/nocobase/nocobase/pull/1094) +- chore: type conflict error message [`#1093`](https://github.com/nocobase/nocobase/pull/1093) +- feat: collection inheritance [`#1069`](https://github.com/nocobase/nocobase/pull/1069) +- feat: no recursive update associations [`#1091`](https://github.com/nocobase/nocobase/pull/1091) +- fix(plugin-workflow): fix transaction chain in trigger [`#1089`](https://github.com/nocobase/nocobase/pull/1089) +- fix(plugin-workflow): fix schema name conflict [`#1087`](https://github.com/nocobase/nocobase/pull/1087) +- refactor(plugin-workflow): split transaction for collection trigger [`#1080`](https://github.com/nocobase/nocobase/pull/1080) +- fix: skip records that do not exist [`#1084`](https://github.com/nocobase/nocobase/pull/1084) +- refactor(plugin-workflow): adjust style [`#1079`](https://github.com/nocobase/nocobase/pull/1079) +- fix: mysql variable 'lower_case_table_names' must be set to '0' or '2' [`#1078`](https://github.com/nocobase/nocobase/pull/1078) +- feat: logging package [`#1021`](https://github.com/nocobase/nocobase/pull/1021) +- Refactor: plugin-workflow client [`#1077`](https://github.com/nocobase/nocobase/pull/1077) +- fix: reference options sync [`#1061`](https://github.com/nocobase/nocobase/pull/1061) +- refactor(plugin-workflow): adjust some api [`#1067`](https://github.com/nocobase/nocobase/pull/1067) +- fix(plugin-workflow): fix trigger getter [`#1060`](https://github.com/nocobase/nocobase/pull/1060) +- Update README.md [`#1053`](https://github.com/nocobase/nocobase/pull/1053) +- test(collection-manager): 20221104151410-update-collections-hidden test correct [`#1042`](https://github.com/nocobase/nocobase/pull/1042) + +### Fixed + +- fix(client): page title translation doesn't work [`#838`](https://github.com/nocobase/nocobase/issues/838) + +### Commits + +- feat: update docs [`15cbad3`](https://github.com/nocobase/nocobase/commit/15cbad30b4e40121ab768273d6d42832960cd4bf) +- Revert "refactor: formula plugin (#1082)" [`0cbfa0a`](https://github.com/nocobase/nocobase/commit/0cbfa0a52177cce6b5400107a639d97de0b4e7a9) +- chore(versions): ๐Ÿ˜Š publish v0.8.1-alpha.2 [`4ecd2ee`](https://github.com/nocobase/nocobase/commit/4ecd2ee40d0ddfdfc5440670aa4f2b3a64f1c819) + +## [v0.8.0-alpha.13](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.11...v0.8.0-alpha.13) - 2022-11-04 + +### Merged + +- test(collection-manager): migration - 20221104151410-update-collections-hidden test optimize [`#1040`](https://github.com/nocobase/nocobase/pull/1040) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.13 [`ce588ee`](https://github.com/nocobase/nocobase/commit/ce588eefb0bfc50f7d5bbee575e0b5e843bf6644) + +## [v0.8.0-alpha.11](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.9...v0.8.0-alpha.11) - 2022-11-04 + +### Merged + +- chore(collection-manager): migration - 20221104151410-update-collections-hidden [`#1039`](https://github.com/nocobase/nocobase/pull/1039) +- fix: db sync failed [`#1037`](https://github.com/nocobase/nocobase/pull/1037) +- feat: ๆทปๅŠ ๅญ—ๆฎตๆตฎ็ช—ๅฎšไฝไผ˜ๅŒ– [`#1034`](https://github.com/nocobase/nocobase/pull/1034) +- fix: association accessors rebind [`#1027`](https://github.com/nocobase/nocobase/pull/1027) +- chore(debugger): clean scripts [`#1029`](https://github.com/nocobase/nocobase/pull/1029) +- fix(calendar): events cannot support moment [`#1017`](https://github.com/nocobase/nocobase/pull/1017) +- Fix: debugger [`#1014`](https://github.com/nocobase/nocobase/pull/1014) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.11 [`6d9006f`](https://github.com/nocobase/nocobase/commit/6d9006f361f569546777f05f03414acc66d06506) +- feat: more console log [`f15c67a`](https://github.com/nocobase/nocobase/commit/f15c67afd5745ccf37b5303f2bf8d61513d62183) +- feat(client): add filter option [`af3fbeb`](https://github.com/nocobase/nocobase/commit/af3fbeb99b9d2b80433bb25ec7c1158ae8addda6) + +## [v0.8.0-alpha.9](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.8...v0.8.0-alpha.9) - 2022-11-02 + +### Merged + +- feat: improve collection manager [`#1013`](https://github.com/nocobase/nocobase/pull/1013) +- feat(calendar): support for add/remove repeats events [`#988`](https://github.com/nocobase/nocobase/pull/988) +- Fix: sequence field [`#1009`](https://github.com/nocobase/nocobase/pull/1009) +- feat: update docs [`#1006`](https://github.com/nocobase/nocobase/pull/1006) +- fix(sample): fix shop-i18n client [`#1005`](https://github.com/nocobase/nocobase/pull/1005) +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.7 [`#1002`](https://github.com/nocobase/nocobase/pull/1002) +- fix(plugin-workflow): fix trigger config [`#997`](https://github.com/nocobase/nocobase/pull/997) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.9 [`642e044`](https://github.com/nocobase/nocobase/commit/642e04490d41acd9c4abba00112fa7f634d83d89) +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.8 [`d5680f8`](https://github.com/nocobase/nocobase/commit/d5680f80d7e468ee5972f008e162eca39c86aa87) +- fix: remove sample plugin client files [`7cded43`](https://github.com/nocobase/nocobase/commit/7cded4395a95922918a2b8abe041160b715a601b) + +## [v0.8.0-alpha.8](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.7...v0.8.0-alpha.8) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.8 [`6d3aa09`](https://github.com/nocobase/nocobase/commit/6d3aa092c0e788824bd0f7fd92607002e8000d66) +- fix: remove sample plugin client files [`8da81f0`](https://github.com/nocobase/nocobase/commit/8da81f00e5f65d3cd17819f1959d0ef4575461fd) + +## [v0.8.0-alpha.7](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.6...v0.8.0-alpha.7) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.7 [`9fbb789`](https://github.com/nocobase/nocobase/commit/9fbb78932ac739fa4c97869fa28d9a676f905519) +- fix(pm): upgrade error when using sqlite database [`bc7848d`](https://github.com/nocobase/nocobase/commit/bc7848da68516f18a5332c3ab1154675314f1ab1) + +## [v0.8.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.5...v0.8.0-alpha.6) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.6 [`88b8a0f`](https://github.com/nocobase/nocobase/commit/88b8a0f379a261b2b65ee5ba3a958a1d450e0e37) +- fix: upgrade failure using docker [`af32f08`](https://github.com/nocobase/nocobase/commit/af32f08d5f624468c371bff61d2e7f62cfe20db8) +- Update README.zh-CN.md [`fc7b17b`](https://github.com/nocobase/nocobase/commit/fc7b17b0858b328a0f2844260ebd3adfaa3f08e3) + +## [v0.8.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.3...v0.8.0-alpha.5) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.5 [`3453f46`](https://github.com/nocobase/nocobase/commit/3453f46997df9648f6aace49c80922a19611bf99) + +## [v0.8.0-alpha.3](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.2...v0.8.0-alpha.3) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.3 [`3395eb6`](https://github.com/nocobase/nocobase/commit/3395eb66898d506fd5f465f11c60513a1b46bcab) + +## [v0.8.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.8.0-alpha.1...v0.8.0-alpha.2) - 2022-11-01 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.8.0-alpha.2 [`7f4c2de`](https://github.com/nocobase/nocobase/commit/7f4c2de98dd9bad88398351080c56753b0cac03c) + +## [v0.8.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.7-alpha.1...v0.8.0-alpha.1) - 2022-11-01 + +### Merged + +- Some features [`#979`](https://github.com/nocobase/nocobase/pull/979) +- fix(client/form-fields): fix fields's x-read-pretty [`#994`](https://github.com/nocobase/nocobase/pull/994) +- feat: reference check [`#989`](https://github.com/nocobase/nocobase/pull/989) +- fix(client/menu-permisssions-page): fix menu-permisssions-page no data [`#993`](https://github.com/nocobase/nocobase/pull/993) +- feat: update docs [`#996`](https://github.com/nocobase/nocobase/pull/996) +- fix(client): add locale for sequence field [`#995`](https://github.com/nocobase/nocobase/pull/995) +- docs: update api docs [`#973`](https://github.com/nocobase/nocobase/pull/973) +- feat: update docs [`#990`](https://github.com/nocobase/nocobase/pull/990) +- fix(client/upload): fix upload mutiple files always uploading status [`#974`](https://github.com/nocobase/nocobase/pull/974) +- fix(client/table-selector-provider): make data range config effective [`#960`](https://github.com/nocobase/nocobase/pull/960) +- fix(client/formula): set cursor focus on input [`#959`](https://github.com/nocobase/nocobase/pull/959) +- feat: plugin workflow visualization [`#987`](https://github.com/nocobase/nocobase/pull/987) +- feat: support show lunar day in week and day [`#977`](https://github.com/nocobase/nocobase/pull/977) +- fix: add sample plugins [`#986`](https://github.com/nocobase/nocobase/pull/986) +- feat: improve code [`#978`](https://github.com/nocobase/nocobase/pull/978) +- chore: improve ci [`#976`](https://github.com/nocobase/nocobase/pull/976) +- feat: support show lunar day [`#972`](https://github.com/nocobase/nocobase/pull/972) +- chore: fix incorrect deps [`#970`](https://github.com/nocobase/nocobase/pull/970) +- fix: empty logic operator filter [`#961`](https://github.com/nocobase/nocobase/pull/961) +- fix(plugin-workflow): fix workflow update action [`#964`](https://github.com/nocobase/nocobase/pull/964) +- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save [`#962`](https://github.com/nocobase/nocobase/pull/962) +- feat(file-manager): support tencent cos [`#958`](https://github.com/nocobase/nocobase/pull/958) +- feat: push ali docker registry [`#957`](https://github.com/nocobase/nocobase/pull/957) +- fix(plugin-workflow): fix constant schedule trigger time [`#956`](https://github.com/nocobase/nocobase/pull/956) +- Turkish readme [`#955`](https://github.com/nocobase/nocobase/pull/955) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`#954`](https://github.com/nocobase/nocobase/pull/954) +- Turkish language [`#939`](https://github.com/nocobase/nocobase/pull/939) +- refactor(plugin-file-manager): move client code into plugin folder and enable path config [`#913`](https://github.com/nocobase/nocobase/pull/913) +- refactor: plugin manager [`#965`](https://github.com/nocobase/nocobase/pull/965) +- feat: add filter action to collection table [`#953`](https://github.com/nocobase/nocobase/pull/953) +- feat: ui schema cache [`#877`](https://github.com/nocobase/nocobase/pull/877) +- feat: changed with associations [`#943`](https://github.com/nocobase/nocobase/pull/943) +- feat: docker optimizing [`#948`](https://github.com/nocobase/nocobase/pull/948) +- fix(plugin-workflow): test changedWithAssociations() [`#950`](https://github.com/nocobase/nocobase/pull/950) +- fix(plugin-workflow): skip time based test [`#951`](https://github.com/nocobase/nocobase/pull/951) +- fix(plugin-workflow): fix schedule trigger bug [`#949`](https://github.com/nocobase/nocobase/pull/949) +- fix(plugin-workflow): fix collection fieldset component [`#942`](https://github.com/nocobase/nocobase/pull/942) +- fix(plugin-workflow): avoid revision with ghost nodes [`#941`](https://github.com/nocobase/nocobase/pull/941) +- fix(plugin-workflow): add req context to processor [`#936`](https://github.com/nocobase/nocobase/pull/936) +- feat: plugin workflow collection field [`#934`](https://github.com/nocobase/nocobase/pull/934) +- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set [`#926`](https://github.com/nocobase/nocobase/pull/926) +- fix(plugin-workflow): temp disable validation of collection field in node [`#928`](https://github.com/nocobase/nocobase/pull/928) +- Doc/db repository [`#896`](https://github.com/nocobase/nocobase/pull/896) +- docs: fix resource & action dev doc [`#880`](https://github.com/nocobase/nocobase/pull/880) +- docs: fix i18n dev sample [`#910`](https://github.com/nocobase/nocobase/pull/910) +- feat: create with array of values [`#912`](https://github.com/nocobase/nocobase/pull/912) +- fix: unbind on error throwing [`#914`](https://github.com/nocobase/nocobase/pull/914) +- fix: appends merge now using primary key [`#911`](https://github.com/nocobase/nocobase/pull/911) +- Doc: api database events [`#887`](https://github.com/nocobase/nocobase/pull/887) +- feat: limit database identifier [`#908`](https://github.com/nocobase/nocobase/pull/908) +- fix: sync collection field default value [`#907`](https://github.com/nocobase/nocobase/pull/907) +- fix: appends merge includes [`#905`](https://github.com/nocobase/nocobase/pull/905) +- fix(samples): fix test case [`#903`](https://github.com/nocobase/nocobase/pull/903) +- fix: single relation repository appends query issue [`#901`](https://github.com/nocobase/nocobase/pull/901) +- feat(plugin-workflow): add concat calculator [`#894`](https://github.com/nocobase/nocobase/pull/894) +- fix(client/record-picker): support record-picker show format DataPicker [`#888`](https://github.com/nocobase/nocobase/pull/888) +- fix(client/block-select-collection): fix select collection menu view error [`#889`](https://github.com/nocobase/nocobase/pull/889) +- fix: unable to submit form during file upload [`#892`](https://github.com/nocobase/nocobase/pull/892) +- fix: run test by jest [`#891`](https://github.com/nocobase/nocobase/pull/891) +- feat(collection-manager): inverse fields can be configured [`#883`](https://github.com/nocobase/nocobase/pull/883) +- fix(formula): support integer and fix NaN error [`#879`](https://github.com/nocobase/nocobase/pull/879) +- fix: sort parameter is missing [`#849`](https://github.com/nocobase/nocobase/pull/849) +- fix: slow join query issued by appends field in find method of repository [`#845`](https://github.com/nocobase/nocobase/pull/845) +- feat(core/cache): support cache [`#876`](https://github.com/nocobase/nocobase/pull/876) +- feat: update option must have filter or filterByTk [`#847`](https://github.com/nocobase/nocobase/pull/847) +- added Russian translation [`#840`](https://github.com/nocobase/nocobase/pull/840) +- feat(database): add sequence field type [`#779`](https://github.com/nocobase/nocobase/pull/779) +- fix: can't access pages without permission via url [`#826`](https://github.com/nocobase/nocobase/pull/826) +- fix: listen promisify [`#899`](https://github.com/nocobase/nocobase/pull/899) +- refactor(core): simplify some code [`#895`](https://github.com/nocobase/nocobase/pull/895) +- feat: sample-custom-signup-page [`#893`](https://github.com/nocobase/nocobase/pull/893) +- docs: relation repository & acl [`#848`](https://github.com/nocobase/nocobase/pull/848) +- Update actions.md [`#873`](https://github.com/nocobase/nocobase/pull/873) +- docs: add testing dev doc [`#871`](https://github.com/nocobase/nocobase/pull/871) +- Doc: dev migration [`#870`](https://github.com/nocobase/nocobase/pull/870) +- Doc: command [`#869`](https://github.com/nocobase/nocobase/pull/869) +- docs: add hooks dev doc [`#868`](https://github.com/nocobase/nocobase/pull/868) +- feat: update development doc [`#866`](https://github.com/nocobase/nocobase/pull/866) +- feat: ratelimit sample plugin [`#862`](https://github.com/nocobase/nocobase/pull/862) +- feat: custom block sample [`#867`](https://github.com/nocobase/nocobase/pull/867) +- docs: move http to dev [`#861`](https://github.com/nocobase/nocobase/pull/861) +- refactor: middleware [`#857`](https://github.com/nocobase/nocobase/pull/857) +- Doc: dev i18n [`#858`](https://github.com/nocobase/nocobase/pull/858) +- docs: add resources-actions doc and sample [`#853`](https://github.com/nocobase/nocobase/pull/853) +- feat: add custom page sample and doc [`#855`](https://github.com/nocobase/nocobase/pull/855) +- feat: nocobase cli doc [`#854`](https://github.com/nocobase/nocobase/pull/854) +- fix: auto install a plugin on enable [`#852`](https://github.com/nocobase/nocobase/pull/852) +- Doc: dev collection fields [`#846`](https://github.com/nocobase/nocobase/pull/846) +- docs: server application api [`#842`](https://github.com/nocobase/nocobase/pull/842) +- docs: add actions api [`#844`](https://github.com/nocobase/nocobase/pull/844) +- refactor(doc): change to new structure [`#804`](https://github.com/nocobase/nocobase/pull/804) +- refactor: plugin manager [`#775`](https://github.com/nocobase/nocobase/pull/775) + +### Commits + +- feat: release notes [`b185412`](https://github.com/nocobase/nocobase/commit/b18541255c4c07d138793a018c785451542aab74) +- Update v08-changelog.md [`d242169`](https://github.com/nocobase/nocobase/commit/d24216962b46c286411d15051e85861f764f5a03) +- fix(client): tab pane initializers for create form block [`929a4f8`](https://github.com/nocobase/nocobase/commit/929a4f848a327d7f8c55bcc786f584f4444ad36e) + +## [v0.7.7-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.6-alpha.2...v0.7.7-alpha.1) - 2022-10-26 + +### Merged + +- fix(database/formula-field): when formula's field caculate result is 0 it alse will be save [`#962`](https://github.com/nocobase/nocobase/pull/962) +- feat(file-manager): support tencent cos [`#958`](https://github.com/nocobase/nocobase/pull/958) +- feat: push ali docker registry [`#957`](https://github.com/nocobase/nocobase/pull/957) +- fix(plugin-workflow): fix constant schedule trigger time [`#956`](https://github.com/nocobase/nocobase/pull/956) +- Turkish readme [`#955`](https://github.com/nocobase/nocobase/pull/955) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`#954`](https://github.com/nocobase/nocobase/pull/954) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.7-alpha.1 [`a7a807c`](https://github.com/nocobase/nocobase/commit/a7a807c433df69e4edf93dfb1bd31ee5a9f4beab) +- fix: lerna ERR! EUNCOMMIT M yarn.lock [`39eb3c9`](https://github.com/nocobase/nocobase/commit/39eb3c90bea25e6308723a87f91c80f60939d3cb) +- feat: api service [`59f102d`](https://github.com/nocobase/nocobase/commit/59f102de8acd7dd16a8ba0955aeef9df8d77d655) + +## [v0.7.6-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.5-alpha.1.1666403334...v0.7.6-alpha.2) - 2022-10-24 + +### Merged + +- Turkish language [`#939`](https://github.com/nocobase/nocobase/pull/939) +- refactor(plugin-file-manager): move client code into plugin folder and enable path config [`#913`](https://github.com/nocobase/nocobase/pull/913) +- feat: add filter action to collection table [`#953`](https://github.com/nocobase/nocobase/pull/953) +- feat: ui schema cache [`#877`](https://github.com/nocobase/nocobase/pull/877) +- feat: docker optimizing [`#948`](https://github.com/nocobase/nocobase/pull/948) +- fix(plugin-workflow): test changedWithAssociations() [`#950`](https://github.com/nocobase/nocobase/pull/950) +- fix(plugin-workflow): skip time based test [`#951`](https://github.com/nocobase/nocobase/pull/951) +- fix(plugin-workflow): fix schedule trigger bug [`#949`](https://github.com/nocobase/nocobase/pull/949) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.1 [`a0382a9`](https://github.com/nocobase/nocobase/commit/a0382a90c1e764dc48d25153f03856d991bc27d2) +- chore(versions): ๐Ÿ˜Š publish v0.7.6-alpha.2 [`b304681`](https://github.com/nocobase/nocobase/commit/b3046819d88b3341b9e2ead41e9c15bde2c41da8) +- Revert "fix: registry.npmjs.org" [`e24d6bd`](https://github.com/nocobase/nocobase/commit/e24d6bdebce7b076974dd4759688ab434369e41c) + +## [v0.7.5-alpha.1.1666403334](https://github.com/nocobase/nocobase/compare/v0.7.5-alpha.1...v0.7.5-alpha.1.1666403334) - 2022-10-22 + +### Merged + +- feat: changed with associations [`#943`](https://github.com/nocobase/nocobase/pull/943) +- fix(plugin-workflow): fix collection fieldset component [`#942`](https://github.com/nocobase/nocobase/pull/942) +- fix(plugin-workflow): avoid revision with ghost nodes [`#941`](https://github.com/nocobase/nocobase/pull/941) +- fix(plugin-workflow): add req context to processor [`#936`](https://github.com/nocobase/nocobase/pull/936) +- Feat/plugin workflow collection field [`#934`](https://github.com/nocobase/nocobase/pull/934) +- fix(plugin-workflow): fix schedule infinitely trigger when repeat not set [`#926`](https://github.com/nocobase/nocobase/pull/926) +- fix(plugin-workflow): temp disable validation of collection field in node [`#928`](https://github.com/nocobase/nocobase/pull/928) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.5-alpha.1.1666403334 [`692f7e7`](https://github.com/nocobase/nocobase/commit/692f7e7ae5ddca3a3f3793bf57604603924c6af9) +- chore: dockerfile [`65724de`](https://github.com/nocobase/nocobase/commit/65724de42cfe65cbcfcbc56496c9fda1b0509ff7) +- chore: dockerfile [`bd5a0ce`](https://github.com/nocobase/nocobase/commit/bd5a0cefed7ff837237ff730ccf6e50a0419b49f) + +## [v0.7.5-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.7...v0.7.5-alpha.1) - 2022-10-16 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.5-alpha.1 [`#920`](https://github.com/nocobase/nocobase/pull/920) +- Feat: plugin workflow collection field [`#919`](https://github.com/nocobase/nocobase/pull/919) +- feat: create with array of values [`#912`](https://github.com/nocobase/nocobase/pull/912) +- fix: unbind on error throwing [`#914`](https://github.com/nocobase/nocobase/pull/914) +- fix: appends merge now using primary key [`#911`](https://github.com/nocobase/nocobase/pull/911) +- feat: limit database identifier [`#908`](https://github.com/nocobase/nocobase/pull/908) +- fix: sync collection field default value [`#907`](https://github.com/nocobase/nocobase/pull/907) +- fix: appends merge includes [`#905`](https://github.com/nocobase/nocobase/pull/905) +- fix: single relation repository appends query issue [`#901`](https://github.com/nocobase/nocobase/pull/901) +- feat(plugin-workflow): add concat calculator [`#894`](https://github.com/nocobase/nocobase/pull/894) +- fix(client/record-picker): support record-picker show format DataPicker [`#888`](https://github.com/nocobase/nocobase/pull/888) +- fix(client/block-select-collection): fix select collection menu view error [`#889`](https://github.com/nocobase/nocobase/pull/889) +- fix: unable to submit form during file upload [`#892`](https://github.com/nocobase/nocobase/pull/892) +- fix: run test by jest [`#891`](https://github.com/nocobase/nocobase/pull/891) +- feat(collection-manager): inverse fields can be configured [`#883`](https://github.com/nocobase/nocobase/pull/883) +- fix(formula): support integer and fix NaN error [`#879`](https://github.com/nocobase/nocobase/pull/879) +- fix: sort parameter is missing [`#849`](https://github.com/nocobase/nocobase/pull/849) +- fix: slow join query issued by appends field in find method of repository [`#845`](https://github.com/nocobase/nocobase/pull/845) +- feat(core/cache): support cache [`#876`](https://github.com/nocobase/nocobase/pull/876) +- feat: update option must have filter or filterByTk [`#847`](https://github.com/nocobase/nocobase/pull/847) +- added Russian translation [`#840`](https://github.com/nocobase/nocobase/pull/840) +- feat(database): add sequence field type [`#779`](https://github.com/nocobase/nocobase/pull/779) +- fix: can't access pages without permission via url [`#826`](https://github.com/nocobase/nocobase/pull/826) +- refactor(resourcer): combine middleware class [`#825`](https://github.com/nocobase/nocobase/pull/825) +- refactor(database): fix some fields and types [`#820`](https://github.com/nocobase/nocobase/pull/820) +- feat(locale): added Japanese translation [`#813`](https://github.com/nocobase/nocobase/pull/813) +- fix(plugin-workflow): fix value type for DatePicker to moment (#815) [`#819`](https://github.com/nocobase/nocobase/pull/819) +- refactor(plugin-workflow): export client calculators registry [`#816`](https://github.com/nocobase/nocobase/pull/816) +- fix: number storage type changed to double [`#810`](https://github.com/nocobase/nocobase/pull/810) +- refactor(server) [`#795`](https://github.com/nocobase/nocobase/pull/795) +- fix(plugin-verification): change provider rate limit error to 429 [`#788`](https://github.com/nocobase/nocobase/pull/788) +- fix(plugin-cm): fix field disappear after failed to update [`#773`](https://github.com/nocobase/nocobase/pull/773) +- fix: fix uiSchema undefined [`#770`](https://github.com/nocobase/nocobase/pull/770) +- fix(plugin-cm): fix unique option default value to update [`#768`](https://github.com/nocobase/nocobase/pull/768) +- fix(plugin-users): fix update profile 500 (#766) [`#767`](https://github.com/nocobase/nocobase/pull/767) +- fix: mysql column in where clause is ambiguous [`#756`](https://github.com/nocobase/nocobase/pull/756) +- feat(plugin-cm): add unique option for base fields [`#745`](https://github.com/nocobase/nocobase/pull/745) +- feat(plugin-verification): add plugin-verification and phone for users [`#722`](https://github.com/nocobase/nocobase/pull/722) +- feat: resize grid columns with drag and drop [`#748`](https://github.com/nocobase/nocobase/pull/748) +- refactor(client): split schema-initializer items into multiple files [`#744`](https://github.com/nocobase/nocobase/pull/744) +- refactor(plugin-workflow): change files mode to 644 [`#755`](https://github.com/nocobase/nocobase/pull/755) +- fix: db version check [`#749`](https://github.com/nocobase/nocobase/pull/749) +- feat: add examples [`#718`](https://github.com/nocobase/nocobase/pull/718) + +### Fixed + +- fix(plugin-workflow): fix value type for DatePicker to moment (#815) (#819) [`#815`](https://github.com/nocobase/nocobase/issues/815) +- fix(plugin-users): fix update profile 500 (#766) (#767) [`#766`](https://github.com/nocobase/nocobase/issues/766) +- fix: db version check (#749) [`#742`](https://github.com/nocobase/nocobase/issues/742) + +### Commits + +- fix(client): tab pane initializers for create form block [`7efc4bc`](https://github.com/nocobase/nocobase/commit/7efc4bca0e3c5f2e1c5cd9e1365e77a005f3e108) +- fix: transaction cannot be rolled back because it has been finished with state: rollback [`6dacec4`](https://github.com/nocobase/nocobase/commit/6dacec4158103fd165ec2865ea87ed9d3d4ceaa4) +- fix(database): fix the index name too long error [`7bfe6b8`](https://github.com/nocobase/nocobase/commit/7bfe6b8c46bef0183c4703683175561c7fc91aee) + +## [v0.7.4-alpha.7](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.4...v0.7.4-alpha.7) - 2022-08-15 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.7 [`#740`](https://github.com/nocobase/nocobase/pull/740) + +### Commits + +- docs: update release notes [`a260d29`](https://github.com/nocobase/nocobase/commit/a260d29222abe49d1453df828bb06a368e83dcf3) +- fix(collection-manager): update collection without fields [`03538ee`](https://github.com/nocobase/nocobase/commit/03538ee82f7b7cd73367d9904e4ac3c87d7a4345) + +## [v0.7.4-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.4-alpha.1...v0.7.4-alpha.4) - 2022-08-12 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.4 [`#727`](https://github.com/nocobase/nocobase/pull/727) +- fix: sync table sort to export [`#723`](https://github.com/nocobase/nocobase/pull/723) +- feat: full version of the NocoBase dockerfile [`#719`](https://github.com/nocobase/nocobase/pull/719) +- fix(plugin-workflow): fix extend collection [`#708`](https://github.com/nocobase/nocobase/pull/708) +- fix: DB_TABLE_PREFIX doesn't get applied [`#710`](https://github.com/nocobase/nocobase/pull/710) +- feat: default value [`#679`](https://github.com/nocobase/nocobase/pull/679) +- fix: required field delete submit error (#688) [`#694`](https://github.com/nocobase/nocobase/pull/694) + +### Commits + +- feat: add examples [`b848b9c`](https://github.com/nocobase/nocobase/commit/b848b9cd6774df6ed86acd30edb81ed6381c3555) +- fix: record provider required for read pretty [`38c3e3e`](https://github.com/nocobase/nocobase/commit/38c3e3e4cc2698069c741d25ddda8e3e8e4d1db0) +- Update README.zh-CN.md [`ba0e618`](https://github.com/nocobase/nocobase/commit/ba0e61873e7f69dee6a76929eb774828ac980760) + +## [v0.7.4-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.3-alpha.1...v0.7.4-alpha.1) - 2022-07-28 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.4-alpha.1 [`#696`](https://github.com/nocobase/nocobase/pull/696) +- fix: append roles to current user [`#695`](https://github.com/nocobase/nocobase/pull/695) +- fix: fix date format [`#686`](https://github.com/nocobase/nocobase/pull/686) +- test(plugin-workflow): skip prompt tests [`#692`](https://github.com/nocobase/nocobase/pull/692) +- fix: fix accuracy of percent [`#685`](https://github.com/nocobase/nocobase/pull/685) +- fix(plugin-workflow): adjust await sleep time for test cases [`#691`](https://github.com/nocobase/nocobase/pull/691) +- feat(plugin-workflow): add assignees config for prompt instruction [`#690`](https://github.com/nocobase/nocobase/pull/690) +- fix: role export button display (#616) [`#666`](https://github.com/nocobase/nocobase/pull/666) +- feat: uid validate [`#681`](https://github.com/nocobase/nocobase/pull/681) +- refactor: replace react-drag-listview with @dnd-kit/sortable [`#660`](https://github.com/nocobase/nocobase/pull/660) +- refactor(plugin-users): improve extendibility of middlewares [`#677`](https://github.com/nocobase/nocobase/pull/677) +- feat: o2m delete not refresh [`#646`](https://github.com/nocobase/nocobase/pull/646) +- feat: kanban add description [`#659`](https://github.com/nocobase/nocobase/pull/659) +- fix: field loss enum [`#667`](https://github.com/nocobase/nocobase/pull/667) +- feat: add editor hot key Ctrl+Shift+U [`#675`](https://github.com/nocobase/nocobase/pull/675) +- fix: Fix calendar change field error (#626) [`#671`](https://github.com/nocobase/nocobase/pull/671) +- chore: fix eslint not work [`#670`](https://github.com/nocobase/nocobase/pull/670) +- feat: number precision [`#661`](https://github.com/nocobase/nocobase/pull/661) +- feat: nginx config [`#664`](https://github.com/nocobase/nocobase/pull/664) +- feat: form item designer form switch issue [`#656`](https://github.com/nocobase/nocobase/pull/656) + +### Commits + +- fix(client): fieldNames of RecordPicker [`9038d11`](https://github.com/nocobase/nocobase/commit/9038d111ea71a89798cb1499f3dadc3f9c3dbfd7) +- fix(client): required for the sub-table field [`609b0e2`](https://github.com/nocobase/nocobase/commit/609b0e2ff2d5aece96185cbcd30ec1810194be0d) +- feat(client): tab icon [`d9b2bf8`](https://github.com/nocobase/nocobase/commit/d9b2bf8af1c42e2f4e81533f6db92b19523410bd) + +## [v0.7.3-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.2-alpha.2...v0.7.3-alpha.1) - 2022-08-10 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.3-alpha.1 [`#657`](https://github.com/nocobase/nocobase/pull/657) +- feat: print action [`#652`](https://github.com/nocobase/nocobase/pull/652) +- feat: restore action-hooks [`#655`](https://github.com/nocobase/nocobase/pull/655) +- feat: collections&fields pagination issue [`#653`](https://github.com/nocobase/nocobase/pull/653) +- fix(core): change proxied agent methods to native [`#654`](https://github.com/nocobase/nocobase/pull/654) +- feat: remove table field details actions [`#638`](https://github.com/nocobase/nocobase/pull/638) +- fix: link to default value [`#641`](https://github.com/nocobase/nocobase/pull/641) +- feat: support for displaying relational table fields in details or form blocks [`#635`](https://github.com/nocobase/nocobase/pull/635) +- fix: record picker cannot select from different pages [`#623`](https://github.com/nocobase/nocobase/pull/623) +- fix: dragging an element to the left, right, or bottom would cause the element to disappear [`#620`](https://github.com/nocobase/nocobase/pull/620) +- feat: table action add reload button [`#630`](https://github.com/nocobase/nocobase/pull/630) +- feat: improve language settings [`#627`](https://github.com/nocobase/nocobase/pull/627) +- feat: field assignment for custom actions supports string variables [`#597`](https://github.com/nocobase/nocobase/pull/597) +- fix: skip recursive remove on grid component [`#621`](https://github.com/nocobase/nocobase/pull/621) +- feat: fix time and collection pagination [`#618`](https://github.com/nocobase/nocobase/pull/618) +- feat: recordblockinitializers fields pick [`#558`](https://github.com/nocobase/nocobase/pull/558) +- fix: incorrectly :active background [`#607`](https://github.com/nocobase/nocobase/pull/607) +- fix: obo table selector [`#613`](https://github.com/nocobase/nocobase/pull/613) +- feat: form validator [`#569`](https://github.com/nocobase/nocobase/pull/569) +- fix: table selector [`#612`](https://github.com/nocobase/nocobase/pull/612) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.7 [`#611`](https://github.com/nocobase/nocobase/pull/611) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.3 [`#608`](https://github.com/nocobase/nocobase/pull/608) +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.2 [`#606`](https://github.com/nocobase/nocobase/pull/606) + +### Commits + +- fix(client): build error [`600f13f`](https://github.com/nocobase/nocobase/commit/600f13f4a06ccfed27df928d7435afa83391c18a) +- fix(client): blocks are deleted when they are dragged below the current block [`20ab8c1`](https://github.com/nocobase/nocobase/commit/20ab8c15017d9dbf941bf963ce3023115050edf8) +- feat(client): plugin toolbar icons and translations [`c51c6c0`](https://github.com/nocobase/nocobase/commit/c51c6c097f24417f0ff82d3c5178ec3be1ee7630) + +## [v0.7.2-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.2-alpha.1...v0.7.2-alpha.2) - 2022-07-07 + +### Merged + +- fix: field permissions cannot be saved [`#605`](https://github.com/nocobase/nocobase/pull/605) +- fix(plugin-workflow): fix revision bug [`#603`](https://github.com/nocobase/nocobase/pull/603) +- fix(plugin-workflow): fix select value [`#600`](https://github.com/nocobase/nocobase/pull/600) +- fix(plugin-workflow): fix CollectionFieldSelect component [`#598`](https://github.com/nocobase/nocobase/pull/598) +- feat(plugin-workflow): add association select in calculation [`#584`](https://github.com/nocobase/nocobase/pull/584) + +### Fixed + +- fix: field permissions cannot be saved (#605) [`#599`](https://github.com/nocobase/nocobase/issues/599) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.1 [`a0cc501`](https://github.com/nocobase/nocobase/commit/a0cc50154cc292248ef107c95a24bcc0c7a586fa) +- fix(g2plot): import all plots [`2bb8fd9`](https://github.com/nocobase/nocobase/commit/2bb8fd984fb5c9cdd484cffc18411f4b644b8fb3) +- Update issue templates [`7767335`](https://github.com/nocobase/nocobase/commit/7767335ba7fe83e22bcc1976a8fd57926dc12c0a) + +## [v0.7.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.1-alpha.5...v0.7.2-alpha.1) - 2022-07-05 + +### Merged + +- chore(versions): ๐Ÿ˜Š publish v0.7.2-alpha.1 [`#578`](https://github.com/nocobase/nocobase/pull/578) +- fix: drop all foreign keys [`#576`](https://github.com/nocobase/nocobase/pull/576) +- fix(plugin-workflow): fix collection trigger config [`#575`](https://github.com/nocobase/nocobase/pull/575) +- feat: filter with variable [`#574`](https://github.com/nocobase/nocobase/pull/574) +- feat(cli): check database version before installation [`#572`](https://github.com/nocobase/nocobase/pull/572) +- fix(database): index invalid [`#564`](https://github.com/nocobase/nocobase/pull/564) +- fix: export association table data [`#561`](https://github.com/nocobase/nocobase/pull/561) +- Refactor(plugin workflow): move client files into plugin [`#556`](https://github.com/nocobase/nocobase/pull/556) +- fix(database): constraints default to false [`#550`](https://github.com/nocobase/nocobase/pull/550) +- fix(plugin-workflow): fix select width [`#552`](https://github.com/nocobase/nocobase/pull/552) +- feat: compatible with old kanban [`#553`](https://github.com/nocobase/nocobase/pull/553) +- feat: display association fields [`#512`](https://github.com/nocobase/nocobase/pull/512) +- Fix(plugin workflow) [`#549`](https://github.com/nocobase/nocobase/pull/549) +- fix:update mysql port [`#548`](https://github.com/nocobase/nocobase/pull/548) +- fix: export of relation blocks [`#546`](https://github.com/nocobase/nocobase/pull/546) +- fix(plugin-workflow): clear options when change collection [`#547`](https://github.com/nocobase/nocobase/pull/547) +- feat(plugin-workflow): add race mode [`#542`](https://github.com/nocobase/nocobase/pull/542) +- fix(client): change toArr to _.castArray in select component [`#543`](https://github.com/nocobase/nocobase/pull/543) +- chore(versions): ๐Ÿ˜Š publish v0.7.1-alpha.7 [`#539`](https://github.com/nocobase/nocobase/pull/539) + +### Commits + +- fix(client): comment out useless code [`4e9384b`](https://github.com/nocobase/nocobase/commit/4e9384bce27676a3cc1ce8d8fd08f5611cffbe5a) +- fix(workflow): merge workflow providers [`008a7f7`](https://github.com/nocobase/nocobase/commit/008a7f7f3351bdedf01b4490d1658edeacc95a16) +- feat(client): integer field [`9928424`](https://github.com/nocobase/nocobase/commit/9928424f5a163fe4edd7cfd60f349ca65b47c9bf) + +## [v0.7.1-alpha.5](https://github.com/nocobase/nocobase/compare/v0.7.1-alpha.4...v0.7.1-alpha.5) - 2022-06-26 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.1-alpha.5 [`c9159c6`](https://github.com/nocobase/nocobase/commit/c9159c6cf4b7deb80e87122d4b7967a510b8ae7c) +- fix(cli): upgrade from docker [`c4c96e5`](https://github.com/nocobase/nocobase/commit/c4c96e5a79562d87b597d23f0e536cd19687c890) + +## [v0.7.1-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.82...v0.7.1-alpha.4) - 2022-06-26 + +### Merged + +- chore(create-nocobase-app): fix some bugs [`#538`](https://github.com/nocobase/nocobase/pull/538) +- fix: destroy collection fields [`#536`](https://github.com/nocobase/nocobase/pull/536) +- feat(plugin-workflow): add delay node type [`#532`](https://github.com/nocobase/nocobase/pull/532) +- refactor: client application [`#533`](https://github.com/nocobase/nocobase/pull/533) +- fix: missing transaction [`#531`](https://github.com/nocobase/nocobase/pull/531) +- fix: add ellipsis property to record picker [`#527`](https://github.com/nocobase/nocobase/pull/527) +- fix: remove pattern without form item [`#528`](https://github.com/nocobase/nocobase/pull/528) +- fix(plugin-workflow): set current when update [`#526`](https://github.com/nocobase/nocobase/pull/526) +- fix: order nulls last [`#519`](https://github.com/nocobase/nocobase/pull/519) +- fix: action loading, refresh context, form submit and validate [`#523`](https://github.com/nocobase/nocobase/pull/523) +- Fix field pattern [`#520`](https://github.com/nocobase/nocobase/pull/520) +- fix(plugin-workflow): fix searchable select min-width [`#524`](https://github.com/nocobase/nocobase/pull/524) +- fix: template with fields only [`#517`](https://github.com/nocobase/nocobase/pull/517) +- fix(plugin-workflow): fix update workflow current property [`#521`](https://github.com/nocobase/nocobase/pull/521) +- refactor(plugin-workflow): abstract to classes [`#515`](https://github.com/nocobase/nocobase/pull/515) +- feat: column sortable and form item pattern [`#518`](https://github.com/nocobase/nocobase/pull/518) +- fix(custom-request): support string/json templates [`#514`](https://github.com/nocobase/nocobase/pull/514) +- feat: add block title [`#513`](https://github.com/nocobase/nocobase/pull/513) +- fix: remove collections & fields from db [`#511`](https://github.com/nocobase/nocobase/pull/511) +- feat: improve migrations [`#510`](https://github.com/nocobase/nocobase/pull/510) +- fix(client): consolidate usage of date/time as UTC in transfering [`#509`](https://github.com/nocobase/nocobase/pull/509) +- fix: formula bug [`#508`](https://github.com/nocobase/nocobase/pull/508) +- fix: default exportable fields [`#506`](https://github.com/nocobase/nocobase/pull/506) +- feat: association field block [`#493`](https://github.com/nocobase/nocobase/pull/493) +- feat: plugin export [`#479`](https://github.com/nocobase/nocobase/pull/479) +- fix(client): package path (fix #503) [`#504`](https://github.com/nocobase/nocobase/pull/504) +- fix: create or delete collection error [`#501`](https://github.com/nocobase/nocobase/pull/501) +- feat: update collections & fields [`#500`](https://github.com/nocobase/nocobase/pull/500) +- fix: rollback when field creation fails [`#498`](https://github.com/nocobase/nocobase/pull/498) +- fix(client): set `dropdownMatchSelectWidth` to false globally [`#497`](https://github.com/nocobase/nocobase/pull/497) +- fix(client): no-key warning in user menu items [`#496`](https://github.com/nocobase/nocobase/pull/496) +- Feat(plugin workflow): cron field for schedule trigger configuration [`#495`](https://github.com/nocobase/nocobase/pull/495) +- feat: audit logs [`#494`](https://github.com/nocobase/nocobase/pull/494) +- refactor(plugin-workflow): add revision column to execution [`#491`](https://github.com/nocobase/nocobase/pull/491) +- feat: relation field uiSchema [`#487`](https://github.com/nocobase/nocobase/pull/487) +- feat: change FK to input component [`#488`](https://github.com/nocobase/nocobase/pull/488) +- fix(plugin-multi-app-manager): fix pg cannot create database block tests [`#486`](https://github.com/nocobase/nocobase/pull/486) +- refactor(database): hook proxy [`#402`](https://github.com/nocobase/nocobase/pull/402) +- feat: chart blocks [`#484`](https://github.com/nocobase/nocobase/pull/484) +- Refactor(plugin workflow): support number in repeat config for schedule [`#482`](https://github.com/nocobase/nocobase/pull/482) +- chore(debug): add debug config [`#475`](https://github.com/nocobase/nocobase/pull/475) +- fix: has one bug [`#478`](https://github.com/nocobase/nocobase/pull/478) +- feat: relationships [`#473`](https://github.com/nocobase/nocobase/pull/473) +- fix(plugin-workflow): fix collection trigger transaction [`#474`](https://github.com/nocobase/nocobase/pull/474) +- fix(plugin-workflow): temporary solution for collection trigger conditions [`#472`](https://github.com/nocobase/nocobase/pull/472) +- fix: markdown component [`#469`](https://github.com/nocobase/nocobase/pull/469) +- fix: formula field and percent field [`#467`](https://github.com/nocobase/nocobase/pull/467) +- fix(plugin-workflow): fix update workflow action [`#464`](https://github.com/nocobase/nocobase/pull/464) +- fix: update formula field and percent field [`#461`](https://github.com/nocobase/nocobase/pull/461) +- feat: add formula field type [`#457`](https://github.com/nocobase/nocobase/pull/457) +- fix: the details of the associated data in the subtable are not displayed [`#454`](https://github.com/nocobase/nocobase/pull/454) +- fix(plugin-workflow): fix languages [`#451`](https://github.com/nocobase/nocobase/pull/451) +- fix: afterSync hook not triggered [`#450`](https://github.com/nocobase/nocobase/pull/450) +- docs(various): Improve readability [`#447`](https://github.com/nocobase/nocobase/pull/447) +- feat: custom request [`#439`](https://github.com/nocobase/nocobase/pull/439) +- Feat(plugin workflow): schedule trigger [`#438`](https://github.com/nocobase/nocobase/pull/438) +- feat: db migrator [`#432`](https://github.com/nocobase/nocobase/pull/432) +- fix(client): select component cannot be opened in sub-table block [`#431`](https://github.com/nocobase/nocobase/pull/431) +- docs(github): change to markdown format [`#430`](https://github.com/nocobase/nocobase/pull/430) +- fix(cli): typo [`#429`](https://github.com/nocobase/nocobase/pull/429) -๐Ÿ“ข ๅœจๆญคไน‹ๅ‰ๅˆ›ๅปบ็š„้กน็›ฎ้œ€่ฆ้‡ๆ–ฐๅˆ›ๅปบใ€‚ +### Fixed + +- fix(client): package path (fix #503) (#504) [`#503`](https://github.com/nocobase/nocobase/issues/503) + +### Commits + +- feat(client): update locales [`e57e60e`](https://github.com/nocobase/nocobase/commit/e57e60e6cb84431e694e69830d128cd71938388f) +- docs: update doc [`e5cb948`](https://github.com/nocobase/nocobase/commit/e5cb94803f738961fcbc1986a94d258ef9e191a9) +- fix(client): improve datepicker component, date with time zone, gmt support [`1c03fbb`](https://github.com/nocobase/nocobase/commit/1c03fbb853b5885547835f50fc9a0932f63c363b) -## 2022/05/14 ~ v0.7.0-alpha.34 +## [v0.7.0-alpha.82](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.67...v0.7.0-alpha.82) - 2022-05-27 -- feat: add plugins:getPinned action api -- Fix(plugin workflow): fix cannot get job result properties (#382) -- feat: exist on server start throw error (#374) -- chore: application options (#375) -- fix: not in operator with null value record (#377) +### Merged -## 2022/05/13 ~ v0.7.0-alpha.33 +- feat(client,sdk): improve api client [`#425`](https://github.com/nocobase/nocobase/pull/425) +- feat: add create-plugin command [`#423`](https://github.com/nocobase/nocobase/pull/423) +- feat: add button color [`#420`](https://github.com/nocobase/nocobase/pull/420) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.78 [`#419`](https://github.com/nocobase/nocobase/pull/419) -- fix: link-to field data scope error (#1337) -- feat(plugin workflow): revisions (#379) -- fix(database): fix option-parser include list index (#371) -- fix(plugin-workflow): fix duplicated description in fields values (#368) -- fix(database): fix type and transaction in repository (#366) -- fix(plugin workflow): fix transaction of execution (#364) +### Commits -## 2022/05/05 ~ v0.7.0-alpha.30 +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.82 [`4820fd0`](https://github.com/nocobase/nocobase/commit/4820fd09375c7200d1ea0bb0aab1bd4783b80d3d) +- docs: update installation documentation [`90623e8`](https://github.com/nocobase/nocobase/commit/90623e8e9a175238c3fc8bb527c8884c207ff78e) +- fix: "typescript": "4.5.5" [`c071217`](https://github.com/nocobase/nocobase/commit/c071217fff819378e982e611af1fd9fa71ebc5fb) -- fix(client): upgrade formily packages -- fix(client): setFormValueChanged must be defined +## [v0.7.0-alpha.67](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.64...v0.7.0-alpha.67) - 2022-05-24 -## 2022/05/01 ~ v0.7.0-alpha.27 +### Commits -- fix: use wrapper when greater than one column -- fix: props for CreateFormBlockInitializers -- fix: add schema initializer icon -- fix: plugin workflow (#349) -- fix: db:sync not working (#348) -- fix(plugin-workflow): fix trigger bind logic to avoid duplication (#347) -- Fix(plugin workflow) (#346) -- fix: action open mode -- Fix: menu url style (#344) -- feat: action loading -- fix: compile the label field -- fix: invalid drag and drop sort +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.67 [`3262979`](https://github.com/nocobase/nocobase/commit/326297936b17c6da3f6e86891c9772c72b088312) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.66 [`9c19e4d`](https://github.com/nocobase/nocobase/commit/9c19e4d67f0b59b8ec957b1a9164acc88a50416d) -## 2022/04/25 ~ v0.7.0-alpha.16 +## [v0.7.0-alpha.64](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.60...v0.7.0-alpha.64) - 2022-05-24 -- fix: cannot find module mkdirp (#330) -- Fix(plugin workflow): UX issues (#329) -- fix(plugin-file-manager): test failed -- fix(app-server): dist options +### Merged -## 2022/04/25 ~ v0.7.0-alpha.0 +- feat: update docs [`#413`](https://github.com/nocobase/nocobase/pull/413) -- ๅ†…ๆต‹็‰ˆ +### Commits -## 2021/10/07 ~ v0.5.0 +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.63 [`c01c695`](https://github.com/nocobase/nocobase/commit/c01c6952a58c2677d9f45fb41872363afda25197) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.64 [`35d01a5`](https://github.com/nocobase/nocobase/commit/35d01a5fb0f0522e263c7fc37bc8384f99424240) +- fix(plugin-users): add translations (#416) [`72c3ba4`](https://github.com/nocobase/nocobase/commit/72c3ba4fae5cdee6b84eed65e3a35180186a987e) -- ็ฌฌไบŒไธช้ข„่งˆ็‰ˆ +## [v0.7.0-alpha.60](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.59...v0.7.0-alpha.60) - 2022-05-23 -## 2021/04/07 ~ v0.4.0 +### Commits -- ็ฌฌไธ€ไธช้ข„่งˆ็‰ˆ +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.60 [`f0d0afb`](https://github.com/nocobase/nocobase/commit/f0d0afbb19dbd90ac3cf4155748fa084c67f54ee) +- fix(create-nocobase-app): storage path [`a0245ca`](https://github.com/nocobase/nocobase/commit/a0245caeb816fede8bb40c33e694de6419a21f26) + +## [v0.7.0-alpha.59](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.58...v0.7.0-alpha.59) - 2022-05-23 + +### Merged + +- refactor(plugin-workflow): change column type of executed from boolean to integer [`#411`](https://github.com/nocobase/nocobase/pull/411) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.59 [`c90e5ae`](https://github.com/nocobase/nocobase/commit/c90e5aee4c8257a3ab7ff492e69cb568cccff8b5) +- docs: update roadmap and release notes [`f198411`](https://github.com/nocobase/nocobase/commit/f198411c7386afaa4b6fc41ebb1806d40e3752b1) +- Update roadmap.md [`e5c5e16`](https://github.com/nocobase/nocobase/commit/e5c5e16b73174bf8092f730b196ef2ef088001b4) + +## [v0.7.0-alpha.58](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.57...v0.7.0-alpha.58) - 2022-05-22 + +### Merged + +- fix: 204 no content response [`#378`](https://github.com/nocobase/nocobase/pull/378) +- feat: destroy association field after target collection destroy [`#376`](https://github.com/nocobase/nocobase/pull/376) +- fix(type): use sequelize native Transactionable instead of TransactionAble [`#410`](https://github.com/nocobase/nocobase/pull/410) +- fix(plugin-workflow): remove previous listeners when collection changed in config [`#409`](https://github.com/nocobase/nocobase/pull/409) +- feat: add custom action [`#396`](https://github.com/nocobase/nocobase/pull/396) +- refactor(plugin-workflow): multiple instances and event management (fix #384) [`#408`](https://github.com/nocobase/nocobase/pull/408) + +### Fixed + +- refactor(plugin-workflow): multiple instances and event management (fix #384) (#408) [`#384`](https://github.com/nocobase/nocobase/issues/384) [`#384`](https://github.com/nocobase/nocobase/issues/384) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.58 [`19ee422`](https://github.com/nocobase/nocobase/commit/19ee42257edf17804d548ffd5ba9ddff6dc775d1) +- fix(plugin-acl): missing pagination parameters #394 [`b44753d`](https://github.com/nocobase/nocobase/commit/b44753d528a12075e64754828982ca80dfc90263) +- fix: missing isTruly/isFalsy filter operators #390 [`e596e6d`](https://github.com/nocobase/nocobase/commit/e596e6d365a3e46859e7d7bafcc3e54d286656cf) + +## [v0.7.0-alpha.57](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.34...v0.7.0-alpha.57) - 2022-05-19 + +### Merged + +- fix(plugin-workflow): fix node type title in drawers [`#389`](https://github.com/nocobase/nocobase/pull/389) + +### Commits + +- feat: build, cli, devtools, sdk, docs... [`6410bc8`](https://github.com/nocobase/nocobase/commit/6410bc8a75fa4dda9fe2bccfadca336fc8e794d0) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.57 [`33f076e`](https://github.com/nocobase/nocobase/commit/33f076e430645055d79254592971c50d9f131a6d) +- Update README.md [`e24e007`](https://github.com/nocobase/nocobase/commit/e24e007395ed09463acdc3cf53b856ca9e0dd664) + +## [v0.7.0-alpha.34](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.33...v0.7.0-alpha.34) - 2022-05-14 + +### Merged + +- Fix(plugin workflow): fix cannot get job result properties [`#382`](https://github.com/nocobase/nocobase/pull/382) +- feat: exist on server start throw error [`#374`](https://github.com/nocobase/nocobase/pull/374) +- chore: application options [`#375`](https://github.com/nocobase/nocobase/pull/375) +- fix: not in operator with null value record [`#377`](https://github.com/nocobase/nocobase/pull/377) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.34 [`48b2b4b`](https://github.com/nocobase/nocobase/commit/48b2b4bc7bbc39533e461d34d7f026a4ad1a9b5c) +- feat: add plugins:getPinned action api [`b5c24aa`](https://github.com/nocobase/nocobase/commit/b5c24aa7999934f2b6f7ca1e9e9448b220a61af2) + +## [v0.7.0-alpha.33](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.30...v0.7.0-alpha.33) - 2022-05-13 + +### Merged + +- Feat(plugin workflow): revisions [`#379`](https://github.com/nocobase/nocobase/pull/379) +- fix(database): fix option-parser include list index [`#371`](https://github.com/nocobase/nocobase/pull/371) +- fix(plugin-worklfow): fix duplicated description in fields values [`#368`](https://github.com/nocobase/nocobase/pull/368) +- fix(database): fix type and transaction in repository [`#366`](https://github.com/nocobase/nocobase/pull/366) +- Fix(plugin workflow): fix transaction of execution [`#364`](https://github.com/nocobase/nocobase/pull/364) +- fix(plugin-workflow): add document title [`#363`](https://github.com/nocobase/nocobase/pull/363) +- fix: set visible with confirm [`#361`](https://github.com/nocobase/nocobase/pull/361) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.33 [`c4b5f4f`](https://github.com/nocobase/nocobase/commit/c4b5f4f84b18c2d8bc40f82947b9338e2f620984) +- Update issue templates [`8466159`](https://github.com/nocobase/nocobase/commit/846615937add786319dde167f2b28e981941e18e) +- fix: link-to field data scope error (#1337) [`2156c70`](https://github.com/nocobase/nocobase/commit/2156c70ff3a7e65a8ad1bf14602f0dad150382ab) + +## [v0.7.0-alpha.30](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.29...v0.7.0-alpha.30) - 2022-05-05 + +### Merged + +- fix(plugin-workflow): fix tests [`#360`](https://github.com/nocobase/nocobase/pull/360) +- Feat: Unsaved changes tip [`#359`](https://github.com/nocobase/nocobase/pull/359) +- Fix acl error [`#358`](https://github.com/nocobase/nocobase/pull/358) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.30 [`781fb0a`](https://github.com/nocobase/nocobase/commit/781fb0a999854341cd8c353d31ae5a11ecbbe775) +- fix(client): upgrade formily packages [`58b151c`](https://github.com/nocobase/nocobase/commit/58b151c74512d5fa3f33c094580c4f5f15792342) +- fix(client): setFormValueChanged must be defined [`b33c819`](https://github.com/nocobase/nocobase/commit/b33c8198e676cc935bccf995ff3d18b249290062) + +## [v0.7.0-alpha.29](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.28...v0.7.0-alpha.29) - 2022-05-04 + +### Merged + +- fix: empty resource acl error [`#357`](https://github.com/nocobase/nocobase/pull/357) +- Feat: from values changed when unsaved will prompt [`#351`](https://github.com/nocobase/nocobase/pull/351) +- fix: modify filter close icon color [`#356`](https://github.com/nocobase/nocobase/pull/356) +- fix(plugin-workflow): fix i18n [`#354`](https://github.com/nocobase/nocobase/pull/354) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.29 [`46e660b`](https://github.com/nocobase/nocobase/commit/46e660b10d1cf94ecb808a9a45edb5e8d40398dc) +- fix(client): color styling [`90a58cc`](https://github.com/nocobase/nocobase/commit/90a58cc3cf3eab02bc61f363d4476454383907d3) +- feat(client): translation [`33a99d9`](https://github.com/nocobase/nocobase/commit/33a99d91b8dc19186ed743b1bbc073c09dd4629e) + +## [v0.7.0-alpha.28](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.24...v0.7.0-alpha.28) - 2022-05-02 + +### Merged + +- Fix(plugin-workflow) [`#353`](https://github.com/nocobase/nocobase/pull/353) +- fix(plugin-file-manager): upgrade multer-aliyun-oss package to fix size [`#352`](https://github.com/nocobase/nocobase/pull/352) +- feat: improve code [`#350`](https://github.com/nocobase/nocobase/pull/350) +- Fix/plugin workflow [`#349`](https://github.com/nocobase/nocobase/pull/349) +- fix: db:sync not working [`#348`](https://github.com/nocobase/nocobase/pull/348) +- fix(plugin-workflow): fix trigger bind logic to avoid duplication [`#347`](https://github.com/nocobase/nocobase/pull/347) +- Fix(plugin workflow) [`#346`](https://github.com/nocobase/nocobase/pull/346) +- Fix:menu url style [`#344`](https://github.com/nocobase/nocobase/pull/344) +- chore(plugin-workflow): add translation [`#345`](https://github.com/nocobase/nocobase/pull/345) +- fix(plugin-workflow): break cycling trigger through transaction id [`#341`](https://github.com/nocobase/nocobase/pull/341) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.28 [`a48d004`](https://github.com/nocobase/nocobase/commit/a48d00492ebc34c66c63d9644530c5b8a7c9914a) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.27 [`ebfe11f`](https://github.com/nocobase/nocobase/commit/ebfe11ff09bf50b4b2322cbbad65b4ea936fdb71) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.26 [`515d952`](https://github.com/nocobase/nocobase/commit/515d95276700ffafe7d2785a93fc510d36da462b) + +## [v0.7.0-alpha.24](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.16...v0.7.0-alpha.24) - 2022-04-29 + +### Merged + +- fix: model.beforeCreate not called [`#343`](https://github.com/nocobase/nocobase/pull/343) +- fix: thumbnail image in kanban card [`#338`](https://github.com/nocobase/nocobase/pull/338) +- feat: db authenticate [`#342`](https://github.com/nocobase/nocobase/pull/342) +- chore: install subApp asynchronous [`#336`](https://github.com/nocobase/nocobase/pull/336) +- fix(plugin-workflow): change collection values input ux in workflow nodes [`#340`](https://github.com/nocobase/nocobase/pull/340) +- feat: improvements [`#335`](https://github.com/nocobase/nocobase/pull/335) +- Feat(plugin workflow): add changed fields to model trigger config [`#332`](https://github.com/nocobase/nocobase/pull/332) + +### Commits + +- docs: update readme.md [`aacec30`](https://github.com/nocobase/nocobase/commit/aacec306733ee1cab3c3c7e5a7fcbbeb372a03e9) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.24 [`1fb2dd8`](https://github.com/nocobase/nocobase/commit/1fb2dd884c4f2d2167f5dde40a15012a752e53ab) +- feat: uuid field [`2c0d3fc`](https://github.com/nocobase/nocobase/commit/2c0d3fcc5ad1bce2cbc47e82e76277918c66c565) + +## [v0.7.0-alpha.16](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.15...v0.7.0-alpha.16) - 2022-04-27 + +### Merged + +- fix: cannot find module mkdirp [`#330`](https://github.com/nocobase/nocobase/pull/330) +- Fix(plugin workflow): UX issues [`#329`](https://github.com/nocobase/nocobase/pull/329) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.16 [`27399f4`](https://github.com/nocobase/nocobase/commit/27399f4e5e6d1f9f2c0eee4d6be8ff89df625bd8) +- feat: improve code [`c71f45c`](https://github.com/nocobase/nocobase/commit/c71f45ca6a15149703fdf12f4d0f68a226d10a7e) +- Update README.md [`4317de7`](https://github.com/nocobase/nocobase/commit/4317de7eb116dd7d538d0cf2c4782372e1b5fce2) + +## [v0.7.0-alpha.15](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.6...v0.7.0-alpha.15) - 2022-04-26 + +### Merged + +- fix: create-nocobase-app compatibility [`#323`](https://github.com/nocobase/nocobase/pull/323) +- fix: create-nocobase-app client package version [`#321`](https://github.com/nocobase/nocobase/pull/321) +- fix: app manager [`#320`](https://github.com/nocobase/nocobase/pull/320) + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.15 [`f0d9b0e`](https://github.com/nocobase/nocobase/commit/f0d9b0ec026b589b3d10dcdbbbb656baca1a9004) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.14 [`8736278`](https://github.com/nocobase/nocobase/commit/87362789f331e043336b571137a7ace7e38a6da1) +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.13 [`62eb85d`](https://github.com/nocobase/nocobase/commit/62eb85de5f341f343577232ebecce7f9fb7a5b21) + +## [v0.7.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.5...v0.7.0-alpha.6) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.6 [`7d0087c`](https://github.com/nocobase/nocobase/commit/7d0087cbb3b7663ba05366ca3b80db2853669ee9) + +## [v0.7.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.4...v0.7.0-alpha.5) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.5 [`a00b45a`](https://github.com/nocobase/nocobase/commit/a00b45a2686695c5f4824d074ac5e1aff210793a) +- fix(plugin-system-settings): cannot read property cliArgs of undefined [`b0d3274`](https://github.com/nocobase/nocobase/commit/b0d3274b2d98147679f91c468327287675de0c08) + +## [v0.7.0-alpha.4](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.3...v0.7.0-alpha.4) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.4 [`327e413`](https://github.com/nocobase/nocobase/commit/327e413b6dd94dad9b756b1e08cda47cad734dc1) + +## [v0.7.0-alpha.3](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.2...v0.7.0-alpha.3) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.3 [`b12507f`](https://github.com/nocobase/nocobase/commit/b12507f6e4bcb5f1fd8285670a43fb3807d90ea0) +- fix: antd use ~v4.19.5 [`733c704`](https://github.com/nocobase/nocobase/commit/733c7048ed0e00bd2c01bfaf8452731a9a89670e) + +## [v0.7.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.1...v0.7.0-alpha.2) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.2 [`0e0e99e`](https://github.com/nocobase/nocobase/commit/0e0e99ef79c0b25bb0b45ecaa477c049cb16afee) +- feat(license): update license [`ed9b2b6`](https://github.com/nocobase/nocobase/commit/ed9b2b6d950cab33423225069a7b0de24b65ef45) +- feat: kanban disableCardDrag [`05a251b`](https://github.com/nocobase/nocobase/commit/05a251b1fc06012e77e402b422e3120430effef1) + +## [v0.7.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.7.0-alpha.0...v0.7.0-alpha.1) - 2022-04-25 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.7.0-alpha.1 [`e7293ad`](https://github.com/nocobase/nocobase/commit/e7293ad7aadbdf2084042f7800a232af6e0b7a8a) + +## [v0.7.0-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.12...v0.7.0-alpha.0) - 2022-04-25 + +### Merged + +- refactor: modify default lable style [`#318`](https://github.com/nocobase/nocobase/pull/318) +- Fix multiple apps [`#317`](https://github.com/nocobase/nocobase/pull/317) +- Fix multiple apps [`#316`](https://github.com/nocobase/nocobase/pull/316) +- Fix acl target action error [`#311`](https://github.com/nocobase/nocobase/pull/311) +- feat: file storages [`#314`](https://github.com/nocobase/nocobase/pull/314) +- fix(plugin-workflow): fix some ux [`#313`](https://github.com/nocobase/nocobase/pull/313) +- fix(plugin-workflow): fix query node getter field [`#308`](https://github.com/nocobase/nocobase/pull/308) +- Fix create nocobase app [`#307`](https://github.com/nocobase/nocobase/pull/307) +- fix: create-nocobase-app [`#306`](https://github.com/nocobase/nocobase/pull/306) +- Fix create nocobase app [`#305`](https://github.com/nocobase/nocobase/pull/305) +- fix: block item add overflow:hidden [`#304`](https://github.com/nocobase/nocobase/pull/304) + +### Commits + +- feat(license): replace MIT license with Apache-2.0 [`717efa8`](https://github.com/nocobase/nocobase/commit/717efa889d471fac3f909137e2adb96586414aad) +- feat: translations [`5c0184a`](https://github.com/nocobase/nocobase/commit/5c0184a397885d6de5307a7087c2d93042cd49f8) +- feat: translations [`1f04f90`](https://github.com/nocobase/nocobase/commit/1f04f90a00e071aa9ab294f21e8d02373191eecc) + +## [v0.6.2-alpha.12](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.11...v0.6.2-alpha.12) - 2022-04-21 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.12 [`5a668cf`](https://github.com/nocobase/nocobase/commit/5a668cf9d0450944f3d2d5beed9e8d5e5b96f5d7) +- fix: create-nocobase-app publish [`269e73e`](https://github.com/nocobase/nocobase/commit/269e73ef19d41835813609b39744c40fb1fff92e) +- chore: create-nocobase-app package.json [`1c30ee1`](https://github.com/nocobase/nocobase/commit/1c30ee1c630d021dc919ce6fcc56cce179db20ae) + +## [v0.6.2-alpha.11](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.10...v0.6.2-alpha.11) - 2022-04-20 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.11 [`8741015`](https://github.com/nocobase/nocobase/commit/8741015a6237cd3ea7342edcb7aa11fe794e6b18) +- fix: read-config [`f6d23ad`](https://github.com/nocobase/nocobase/commit/f6d23add8c1845dd4b567d2958c24ada8ae8cee0) + +## [v0.6.2-alpha.10](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.9...v0.6.2-alpha.10) - 2022-04-20 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.10 [`693c668`](https://github.com/nocobase/nocobase/commit/693c668282d8032b69245ae7e5c1cafa3c41e584) +- fix: publish [`9e717ae`](https://github.com/nocobase/nocobase/commit/9e717ae3ca2f453005602df03b08edca14c56505) + +## [v0.6.2-alpha.9](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.7...v0.6.2-alpha.9) - 2022-04-20 + +### Merged + +- feat: details block [`#302`](https://github.com/nocobase/nocobase/pull/302) +- Fix(plugin workflow): fix collection data form view [`#301`](https://github.com/nocobase/nocobase/pull/301) +- feat: add $isCurrentUser filter operator [`#299`](https://github.com/nocobase/nocobase/pull/299) +- fix: through table primaryKey error [`#297`](https://github.com/nocobase/nocobase/pull/297) +- feat: junction collection for linkTo field [`#296`](https://github.com/nocobase/nocobase/pull/296) +- fix: long text will wrap in FormItem [`#295`](https://github.com/nocobase/nocobase/pull/295) +- fix(client): avoid cannot getField by randomly generated name and throw error [`#294`](https://github.com/nocobase/nocobase/pull/294) +- Feat/create nocobase app [`#273`](https://github.com/nocobase/nocobase/pull/273) +- feat(plugin-workflow): add all crud nodes for workflow [`#293`](https://github.com/nocobase/nocobase/pull/293) +- feat(plugin-workflow): add create node component [`#292`](https://github.com/nocobase/nocobase/pull/292) +- fix: rich text removed value avoid dispaly html string [`#290`](https://github.com/nocobase/nocobase/pull/290) + +### Commits + +- fix: update yarn.lock [`fcfde7e`](https://github.com/nocobase/nocobase/commit/fcfde7ed0a5b7fdae3fe7424e406ca2e5d944f9b) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.9 [`1afc867`](https://github.com/nocobase/nocobase/commit/1afc86733cb090cf5f45c781ad6488c32caa740c) +- fix: update useCreateActionProps & useUpdateActionProps [`fca0943`](https://github.com/nocobase/nocobase/commit/fca0943e8d013a0e8bb46756b89cfc992aa1b6c1) + +## [v0.6.2-alpha.7](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.6...v0.6.2-alpha.7) - 2022-04-16 + +### Commits + +- feat: improve code [`2202cc6`](https://github.com/nocobase/nocobase/commit/2202cc64d960918113b50bf0dc352a59cac04484) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.7 [`d165782`](https://github.com/nocobase/nocobase/commit/d165782860681af206005039f4bec00fc7fe4241) + +## [v0.6.2-alpha.6](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.5...v0.6.2-alpha.6) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.6 [`faa064a`](https://github.com/nocobase/nocobase/commit/faa064ae8dbdcba98e1782a8e2c0b5a338e68219) + +## [v0.6.2-alpha.5](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.4...v0.6.2-alpha.5) - 2022-04-15 + +### Commits + +- chore: create-nocobase-app lib [`fc27ebc`](https://github.com/nocobase/nocobase/commit/fc27ebc08a5c889596432a2ece6ba9e0c8957bab) +- chore: create-nocobase-app [`8d0703c`](https://github.com/nocobase/nocobase/commit/8d0703c568ad0e66a14e3a4d47d57b1d63cd64f8) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.5 [`2b21546`](https://github.com/nocobase/nocobase/commit/2b21546c4c50c7b5447d991d3852b90dca7219b9) + +## [v0.6.2-alpha.4](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.3...v0.6.2-alpha.4) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.4 [`e3a9e92`](https://github.com/nocobase/nocobase/commit/e3a9e924e002afeb02fb785fcecb124dd6d995a1) + +## [v0.6.2-alpha.3](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.1...v0.6.2-alpha.3) - 2022-04-15 + +### Commits + +- feat: workspaces [`0eb6997`](https://github.com/nocobase/nocobase/commit/0eb6997c7257332751e49d4a6c623c2ccd786495) +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.3 [`2feae05`](https://github.com/nocobase/nocobase/commit/2feae051e24a46c0b78b31ef2a4dafdb14344398) +- chore: 0.6.2-alpha.2 [`dbf86d5`](https://github.com/nocobase/nocobase/commit/dbf86d52ccc7653e6b23386c2aa465402702da85) + +## [v0.6.2-alpha.1](https://github.com/nocobase/nocobase/compare/v0.6.2-alpha.0...v0.6.2-alpha.1) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.1 [`c6b58b2`](https://github.com/nocobase/nocobase/commit/c6b58b215e43a48d625b8493eefc438c6b9e1e7a) + +## [v0.6.2-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.1-alpha.0...v0.6.2-alpha.0) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.2-alpha.0 [`5351fb3`](https://github.com/nocobase/nocobase/commit/5351fb3ab34a92b97102640dffa7aeafa5294b97) + +## [v0.6.1-alpha.0](https://github.com/nocobase/nocobase/compare/v0.6.0...v0.6.1-alpha.0) - 2022-04-15 + +### Commits + +- chore(versions): ๐Ÿ˜Š publish v0.6.1-alpha.0 [`0b52b73`](https://github.com/nocobase/nocobase/commit/0b52b731dcd23e6ae251c4d5f5c4da781dd109d5) + +## [v0.6.0](https://github.com/nocobase/nocobase/compare/v0.6.0-alpha.1...v0.6.0) - 2022-04-15 + +### Merged + +- Feat: plugin-workflow [`#288`](https://github.com/nocobase/nocobase/pull/288) +- fix: slate style [`#289`](https://github.com/nocobase/nocobase/pull/289) +- fix: toJSON with belongsTo Assoication [`#287`](https://github.com/nocobase/nocobase/pull/287) +- feat: improve acl module [`#283`](https://github.com/nocobase/nocobase/pull/283) +- fix: destroy own records [`#285`](https://github.com/nocobase/nocobase/pull/285) +- feat(plugin-workflow): support context variables from model trigger [`#284`](https://github.com/nocobase/nocobase/pull/284) +- fix: acl write [`#280`](https://github.com/nocobase/nocobase/pull/280) +- fix: call root server hook after insertNewSchema [`#282`](https://github.com/nocobase/nocobase/pull/282) +- Feat/plugin workflow [`#278`](https://github.com/nocobase/nocobase/pull/278) +- feat: acl provider [`#279`](https://github.com/nocobase/nocobase/pull/279) +- feat: add Slate component [`#272`](https://github.com/nocobase/nocobase/pull/272) +- Feat/plugin users with jwt [`#258`](https://github.com/nocobase/nocobase/pull/258) +- fix: modify antd style of default [`#277`](https://github.com/nocobase/nocobase/pull/277) +- fix(client): meet undefined error after clear filter cascader value [`#267`](https://github.com/nocobase/nocobase/pull/267) +- Feat(plugin workflow): refactor calculation and add filter for query [`#264`](https://github.com/nocobase/nocobase/pull/264) +- feat: block provider [`#261`](https://github.com/nocobase/nocobase/pull/261) +- fix: toJSON with null association [`#260`](https://github.com/nocobase/nocobase/pull/260) +- fix: error handle error [`#259`](https://github.com/nocobase/nocobase/pull/259) + +### Commits + +- fix: yarn.lock [`7a7eb0c`](https://github.com/nocobase/nocobase/commit/7a7eb0cc82af0b1621476d2bb163b43ccc92da80) +- fix: yarn.lock [`e226f04`](https://github.com/nocobase/nocobase/commit/e226f04e505ed7f4d94abf3074ad4f375d15c67d) +- feat: rich text [`5b41b33`](https://github.com/nocobase/nocobase/commit/5b41b338072ec75f579a695bdae34dd69918752b) + +## [v0.6.0-alpha.1](https://github.com/nocobase/nocobase/compare/v0.5.0-alpha.33...v0.6.0-alpha.1) - 2022-04-05 + +### Merged + +- fix: textarea read pretty can support break line [`#255`](https://github.com/nocobase/nocobase/pull/255) +- fix: markdown support ellipsis [`#257`](https://github.com/nocobase/nocobase/pull/257) +- featPlugin multiple apps [`#248`](https://github.com/nocobase/nocobase/pull/248) +- add action log tempalte [`#239`](https://github.com/nocobase/nocobase/pull/239) +- fix some bugs [`#252`](https://github.com/nocobase/nocobase/pull/252) +- fix(plugin-workflow): fix adding/removing node in parallel branches [`#253`](https://github.com/nocobase/nocobase/pull/253) +- Feat: client base entry of plugin workflow [`#225`](https://github.com/nocobase/nocobase/pull/225) +- fix: updateAt on move scope change [`#251`](https://github.com/nocobase/nocobase/pull/251) +- feat: get json schema with async node [`#246`](https://github.com/nocobase/nocobase/pull/246) +- feat: insertNewSchema [`#245`](https://github.com/nocobase/nocobase/pull/245) +- fix: transaction error [`#242`](https://github.com/nocobase/nocobase/pull/242) +- feat: block templates [`#240`](https://github.com/nocobase/nocobase/pull/240) +- feat: uiSchema clearAncestor [`#241`](https://github.com/nocobase/nocobase/pull/241) +- feat: init sort field values [`#236`](https://github.com/nocobase/nocobase/pull/236) +- fix: move action without alter updatedAt [`#235`](https://github.com/nocobase/nocobase/pull/235) +- feat: role check action [`#234`](https://github.com/nocobase/nocobase/pull/234) +- feat: ne operator [`#233`](https://github.com/nocobase/nocobase/pull/233) +- fix: user current role [`#232`](https://github.com/nocobase/nocobase/pull/232) +- featEnable permission [`#229`](https://github.com/nocobase/nocobase/pull/229) +- test: update reverseField [`#231`](https://github.com/nocobase/nocobase/pull/231) +- feat: kanban [`#230`](https://github.com/nocobase/nocobase/pull/230) +- Nocobase next kanban [`#223`](https://github.com/nocobase/nocobase/pull/223) +- add: test [`#224`](https://github.com/nocobase/nocobase/pull/224) +- Plugin error handler [`#222`](https://github.com/nocobase/nocobase/pull/222) +- fix: array $noneOf with null [`#220`](https://github.com/nocobase/nocobase/pull/220) +- fix: filter parser with number in key [`#219`](https://github.com/nocobase/nocobase/pull/219) +- feat: ui-schema-tree-path descendant index [`#218`](https://github.com/nocobase/nocobase/pull/218) +- fix: array operator query error [`#217`](https://github.com/nocobase/nocobase/pull/217) +- fix: operator query value [`#216`](https://github.com/nocobase/nocobase/pull/216) +- feat: string operators [`#215`](https://github.com/nocobase/nocobase/pull/215) +- feat: error handle middleware [`#214`](https://github.com/nocobase/nocobase/pull/214) +- refactor: filter schema component [`#213`](https://github.com/nocobase/nocobase/pull/213) +- fix: empty operator with $or filter [`#212`](https://github.com/nocobase/nocobase/pull/212) +- feat: plugin install [`#211`](https://github.com/nocobase/nocobase/pull/211) +- feat: sortBy through table value [`#209`](https://github.com/nocobase/nocobase/pull/209) +- Feat: plugin workflow [`#210`](https://github.com/nocobase/nocobase/pull/210) +- fix: collection fields sort [`#208`](https://github.com/nocobase/nocobase/pull/208) +- feat: sort in collection fields [`#207`](https://github.com/nocobase/nocobase/pull/207) +- fix Collection rest api [`#205`](https://github.com/nocobase/nocobase/pull/205) +- feat: non paged list [`#204`](https://github.com/nocobase/nocobase/pull/204) +- feat: finish calendar component develop [`#199`](https://github.com/nocobase/nocobase/pull/199) +- fix(dependencies): move json-template into original sub packages [`#203`](https://github.com/nocobase/nocobase/pull/203) +- Feat(plugin workflow): add more instructions [`#201`](https://github.com/nocobase/nocobase/pull/201) +- fix: getJsonSchema with properties [`#202`](https://github.com/nocobase/nocobase/pull/202) +- fix: postgres array operator [`#200`](https://github.com/nocobase/nocobase/pull/200) +- fix: postgres sort with appends issue [`#198`](https://github.com/nocobase/nocobase/pull/198) +- feat: uiSchema remove api [`#196`](https://github.com/nocobase/nocobase/pull/196) +- refactor: perPage to pageSize [`#197`](https://github.com/nocobase/nocobase/pull/197) +- fix: option parser test [`#195`](https://github.com/nocobase/nocobase/pull/195) +- fix: nest append [`#194`](https://github.com/nocobase/nocobase/pull/194) +- fix: test with database [`#193`](https://github.com/nocobase/nocobase/pull/193) +- fix(plugin-workflow): fix dependencies in package [`#192`](https://github.com/nocobase/nocobase/pull/192) +- Fix: plugin-workflow test [`#191`](https://github.com/nocobase/nocobase/pull/191) +- Refactor(plugin-workflow): upgrade plugin to use abstract plugin class and fix types [`#190`](https://github.com/nocobase/nocobase/pull/190) +- fix: ui schema storage [`#188`](https://github.com/nocobase/nocobase/pull/188) +- fix: ui schema storage [`#187`](https://github.com/nocobase/nocobase/pull/187) +- fix: update guard with Model instance [`#186`](https://github.com/nocobase/nocobase/pull/186) +- fix: getProperties with order [`#183`](https://github.com/nocobase/nocobase/pull/183) +- feat(server): improve application [`#177`](https://github.com/nocobase/nocobase/pull/177) +- Feature: plugin-workflow MVP [`#171`](https://github.com/nocobase/nocobase/pull/171) +- fix(root): fix dependencies in packages to avoid building errors [`#178`](https://github.com/nocobase/nocobase/pull/178) +- Application [`#175`](https://github.com/nocobase/nocobase/pull/175) +- feat: add acl plugin [`#169`](https://github.com/nocobase/nocobase/pull/169) +- add Filter component into schema componens [`#176`](https://github.com/nocobase/nocobase/pull/176) +- feat: add Markdown component into schema components [`#173`](https://github.com/nocobase/nocobase/pull/173) +- feat: table related components [`#172`](https://github.com/nocobase/nocobase/pull/172) +- feat: add select component into schema component [`#168`](https://github.com/nocobase/nocobase/pull/168) +- feat: add TreeSelect component into schema components [`#167`](https://github.com/nocobase/nocobase/pull/167) +- Plugin acl [`#166`](https://github.com/nocobase/nocobase/pull/166) +- add upload component into schema components [`#165`](https://github.com/nocobase/nocobase/pull/165) +- migrate TimePicker component into schema components [`#164`](https://github.com/nocobase/nocobase/pull/164) +- Feat/plugin UI schema v0.6 [`#143`](https://github.com/nocobase/nocobase/pull/143) +- Feat/plugin collection manager [`#147`](https://github.com/nocobase/nocobase/pull/147) +- Acl [`#162`](https://github.com/nocobase/nocobase/pull/162) +- feat: acl [`#153`](https://github.com/nocobase/nocobase/pull/153) +- feat: add InputNumber Component into schema component [`#160`](https://github.com/nocobase/nocobase/pull/160) +- feature/nocobase next password [`#159`](https://github.com/nocobase/nocobase/pull/159) +- feat: add DatePicker into schema components [`#161`](https://github.com/nocobase/nocobase/pull/161) +- feat: add input into schema component [`#158`](https://github.com/nocobase/nocobase/pull/158) +- feat: add radio into schema component [`#154`](https://github.com/nocobase/nocobase/pull/154) +- optimize: rename checkbox component file [`#155`](https://github.com/nocobase/nocobase/pull/155) +- Nocobase next color select [`#157`](https://github.com/nocobase/nocobase/pull/157) +- feat: add async-data-provider component [`#151`](https://github.com/nocobase/nocobase/pull/151) +- feat: client v0.6 [`#150`](https://github.com/nocobase/nocobase/pull/150) +- Feat/GitHub actions [`#148`](https://github.com/nocobase/nocobase/pull/148) +- feat: filter by target key [`#146`](https://github.com/nocobase/nocobase/pull/146) +- refactor: actions [`#137`](https://github.com/nocobase/nocobase/pull/137) +- feat: context field type support [`#131`](https://github.com/nocobase/nocobase/pull/131) +- feat: database next [`#130`](https://github.com/nocobase/nocobase/pull/130) +- feat: rename resourceKey & associatedKey to resourceIndex & associatedIndex [`#126`](https://github.com/nocobase/nocobase/pull/126) +- refactor: table cell text overflow that show ellipsis [`#125`](https://github.com/nocobase/nocobase/pull/125) +- Add S3 storage and refactors [`#124`](https://github.com/nocobase/nocobase/pull/124) +- Fix: plugin-file-manager [`#111`](https://github.com/nocobase/nocobase/pull/111) +- refactor: code splitting of the table component [`#121`](https://github.com/nocobase/nocobase/pull/121) +- refactor: code splitting of the table component [`#120`](https://github.com/nocobase/nocobase/pull/120) +- feat: add reset button in the filter panel [`#110`](https://github.com/nocobase/nocobase/pull/110) +- feat: allow user to change password [`#109`](https://github.com/nocobase/nocobase/pull/109) + +### Commits + +- v0.6 [`732d310`](https://github.com/nocobase/nocobase/commit/732d31009eafbded78dd35dee5d891438783ba53) +- create-nocobase-app template from [develop] [`9f4bea7`](https://github.com/nocobase/nocobase/commit/9f4bea79668643d37c2b488eb969b2c93a241026) +- feat: improve view action schema initializer [`590ca26`](https://github.com/nocobase/nocobase/commit/590ca267b27b093b67aa140c4e94fd2b97c8eeb6) + +## [v0.5.0-alpha.33](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.6...v0.5.0-alpha.33) - 2021-11-22 + +### Merged + +- fix: upgrade formily & side menu render with createPortal & use deep compare effect [`#103`](https://github.com/nocobase/nocobase/pull/103) +- fix: SchemaRenderer get schema value [`#102`](https://github.com/nocobase/nocobase/pull/102) +- fix: upgrade formily and form.setValues uses overwrite strategy [`#101`](https://github.com/nocobase/nocobase/pull/101) +- feat: support i18n [`#99`](https://github.com/nocobase/nocobase/pull/99) +- feat: new version of the documentation [`#95`](https://github.com/nocobase/nocobase/pull/95) +- option-tag style [`#92`](https://github.com/nocobase/nocobase/pull/92) +- create-nocobase-app: favicon [`#91`](https://github.com/nocobase/nocobase/pull/91) +- feat: create nocobase app with simple & quickstart option [`#87`](https://github.com/nocobase/nocobase/pull/87) +- feat: export plugin [`#73`](https://github.com/nocobase/nocobase/pull/73) + +### Commits + +- v0.5 [`2cbcd08`](https://github.com/nocobase/nocobase/commit/2cbcd087ce6629d8f0df550ee35e02065db41dbc) +- refactor [`75cd158`](https://github.com/nocobase/nocobase/commit/75cd158a270935559a9922d1dd074811253013b9) +- feat: improve code [`c6b68f2`](https://github.com/nocobase/nocobase/commit/c6b68f2b10e4e8df5257345f5e39408666c5810d) + +## [v0.4.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.5...v0.4.0-alpha.6) - 2021-04-18 + +### Merged + +- docs: add docs [`#75`](https://github.com/nocobase/nocobase/pull/75) +- refactor: use boolean value instead of null [`#74`](https://github.com/nocobase/nocobase/pull/74) + +### Commits + +- fix: improve login form styles [`5319000`](https://github.com/nocobase/nocobase/commit/5319000bd613ce9d2ac0a66f73ab403a84c5b8dd) +- fix: error message for login and registration [`214b227`](https://github.com/nocobase/nocobase/commit/214b227a6c1fe92bf54968e369aeaeabb8f73d7a) +- docs: nodejs provided by docker [`22739af`](https://github.com/nocobase/nocobase/commit/22739afa2da4dd38eda9077f5ca566cd022f4dc2) + +## [v0.4.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.2...v0.4.0-alpha.5) - 2021-04-07 + +### Commits + +- chore(versions): publish packages 0.4.0-alpha.5 [`ef93a3c`](https://github.com/nocobase/nocobase/commit/ef93a3c11c28419e1e842f73799cf005d49a5116) +- chore(versions): publish packages 0.4.0-alpha.4 [`a22efec`](https://github.com/nocobase/nocobase/commit/a22efec65d85fd15e59332d2eb6483cb84a1e619) +- chore(versions): publish packages 0.4.0-alpha.3 [`e72eebb`](https://github.com/nocobase/nocobase/commit/e72eebb8cd5e666b642030a9e268961385cc4d4d) + +## [v0.4.0-alpha.2](https://github.com/nocobase/nocobase/compare/v0.4.0-alpha.1...v0.4.0-alpha.2) - 2021-04-07 + +### Commits + +- refactor: app middlewares [`17362a8`](https://github.com/nocobase/nocobase/commit/17362a844439e5510f254195fa135b6335866ef3) +- chore(versions): publish packages 0.4.0-alpha.2 [`c2f1876`](https://github.com/nocobase/nocobase/commit/c2f18763c9e7c03a7a46edafd26b1fa884b8f272) + +## v0.4.0-alpha.1 - 2021-04-07 + +### Merged + +- fix: minor problems [`#72`](https://github.com/nocobase/nocobase/pull/72) +- Develop [`#68`](https://github.com/nocobase/nocobase/pull/68) +- Feature: plugin-china-region [`#66`](https://github.com/nocobase/nocobase/pull/66) +- Feature: filter for linkTo field [`#64`](https://github.com/nocobase/nocobase/pull/64) +- fix: make default view/tab cannot be destroyed [`#63`](https://github.com/nocobase/nocobase/pull/63) +- Feature/plugin automations [`#65`](https://github.com/nocobase/nocobase/pull/65) +- Feature/action logs [`#62`](https://github.com/nocobase/nocobase/pull/62) +- Feature/action logs [`#61`](https://github.com/nocobase/nocobase/pull/61) +- Feature/destroy lock [`#60`](https://github.com/nocobase/nocobase/pull/60) +- fix: ignore some typescript error [`#59`](https://github.com/nocobase/nocobase/pull/59) +- feat: route permissions [`#58`](https://github.com/nocobase/nocobase/pull/58) +- Feature: add permission plugin api [`#57`](https://github.com/nocobase/nocobase/pull/57) +- fix: updatedBy foreignKey [`#56`](https://github.com/nocobase/nocobase/pull/56) +- feat: add permissions plugin [`#53`](https://github.com/nocobase/nocobase/pull/53) +- fix: updatedBy field in bulkUpdate hook [`#54`](https://github.com/nocobase/nocobase/pull/54) +- test: skip bug test cases for ci passing [`#52`](https://github.com/nocobase/nocobase/pull/52) +- fix: avoid bug when update other field [`#51`](https://github.com/nocobase/nocobase/pull/51) +- feat: date-only operators [`#50`](https://github.com/nocobase/nocobase/pull/50) +- Feature field for set default [`#49`](https://github.com/nocobase/nocobase/pull/49) +- Feature: custom operators for querying [`#48`](https://github.com/nocobase/nocobase/pull/48) +- fix: toInclude bug with nested associations [`#47`](https://github.com/nocobase/nocobase/pull/47) +- feat: make single file upload to attachment available [`#46`](https://github.com/nocobase/nocobase/pull/46) +- feature: add file manager base architecture [`#44`](https://github.com/nocobase/nocobase/pull/44) +- feat: add createdBy/updatedBy field config for table managed by collections [`#43`](https://github.com/nocobase/nocobase/pull/43) +- fix: use wrapped and logic for merging filters [`#42`](https://github.com/nocobase/nocobase/pull/42) +- fix: filterByFields should return same value when input == null (close 0) [`#41`](https://github.com/nocobase/nocobase/pull/41) +- fix: Symbol property could not be iterated in for-in [`#39`](https://github.com/nocobase/nocobase/pull/39) +- Feature/sort [`#38`](https://github.com/nocobase/nocobase/pull/38) +- refactor: change sort strategy from offset to targetId [`#37`](https://github.com/nocobase/nocobase/pull/37) +- Feature/sort [`#36`](https://github.com/nocobase/nocobase/pull/36) +- feat: add filter and transaction for destroy action [`#35`](https://github.com/nocobase/nocobase/pull/35) +- fix: field filter logic for create/update [`#34`](https://github.com/nocobase/nocobase/pull/34) +- Feature: action fields options for create/update [`#32`](https://github.com/nocobase/nocobase/pull/32) +- Fix: change strategy from add to set for updateAssociations [`#33`](https://github.com/nocobase/nocobase/pull/33) +- Test/ci [`#31`](https://github.com/nocobase/nocobase/pull/31) +- feat: improve collection hooks/fields/actions/views... [`#30`](https://github.com/nocobase/nocobase/pull/30) +- Fix/model update associations [`#29`](https://github.com/nocobase/nocobase/pull/29) +- fix: database test cases and table options [`#28`](https://github.com/nocobase/nocobase/pull/28) +- feat: add virtual attribute geter & setter support [`#27`](https://github.com/nocobase/nocobase/pull/27) +- feat: collection options & hooks [`#21`](https://github.com/nocobase/nocobase/pull/21) +- feat(users): add users module [`#26`](https://github.com/nocobase/nocobase/pull/26) +- feat: add sort action [`#22`](https://github.com/nocobase/nocobase/pull/22) +- Test/list [`#19`](https://github.com/nocobase/nocobase/pull/19) +- feat: pagination options [`#20`](https://github.com/nocobase/nocobase/pull/20) +- test: refactor test in database and add more [`#17`](https://github.com/nocobase/nocobase/pull/17) +- feat: actions & views [`#18`](https://github.com/nocobase/nocobase/pull/18) +- Test cases for database [`#16`](https://github.com/nocobase/nocobase/pull/16) +- Refactor: change global injection of test for actions package. [`#15`](https://github.com/nocobase/nocobase/pull/15) +- feat: improve plugins [`#14`](https://github.com/nocobase/nocobase/pull/14) +- Doc: add README.md for server. [`#12`](https://github.com/nocobase/nocobase/pull/12) +- fix: parseRequest & registerHandlers [`#10`](https://github.com/nocobase/nocobase/pull/10) +- fix #9 [`#11`](https://github.com/nocobase/nocobase/pull/11) +- feat: support register and call partial actions [`#7`](https://github.com/nocobase/nocobase/pull/7) +- ๅ‘ๅธƒๆ ธๅฟƒๆก†ๆžถ [`#6`](https://github.com/nocobase/nocobase/pull/6) + +### Fixed + +- fix #9 (#11) [`#9`](https://github.com/nocobase/nocobase/issues/9) [`#9`](https://github.com/nocobase/nocobase/issues/9) + +### Commits + +- chore: adjust parameters [`b95e2da`](https://github.com/nocobase/nocobase/commit/b95e2da129aa49b5d8fb3e31ba8975818f7053cb) +- first commit [`e5d30b3`](https://github.com/nocobase/nocobase/commit/e5d30b30ba4dd38de764b0e5044f836f04a03706) +- style: code formatting [`ce4a22f`](https://github.com/nocobase/nocobase/commit/ce4a22fbb9b1ba9b88db1dc86609e94944f9d904) diff --git a/examples/api-client/api.resource.ts b/examples/api-client/api.resource.ts index 657c5ebb0..f19c1e6e2 100644 --- a/examples/api-client/api.resource.ts +++ b/examples/api-client/api.resource.ts @@ -17,7 +17,7 @@ const api = new APIClient({ (async () => { const response = await api.resource('test').list(); - // ็ญ‰ไปทไบŽ + // ็ญ‰ไปทไบŽ // const response = await api.request({ // url: 'test:list', // }); diff --git a/examples/app/acl.ts b/examples/app/acl.ts index 25d14470b..e1d2361b7 100644 --- a/examples/app/acl.ts +++ b/examples/app/acl.ts @@ -32,7 +32,7 @@ app.acl.define({ role: 'admin', actions: { 'test:export': { - fields: ['a1', 'b1'] + fields: ['a1', 'b1'], }, }, }); diff --git a/examples/app/custom-command.ts b/examples/app/custom-command.ts index a448eb667..9a41f391f 100644 --- a/examples/app/custom-command.ts +++ b/examples/app/custom-command.ts @@ -36,4 +36,3 @@ if (require.main === module) { } export default app; - diff --git a/examples/app/middleware/resourcer.ts b/examples/app/middleware/resourcer.ts index b39fbf847..6d3c96968 100644 --- a/examples/app/middleware/resourcer.ts +++ b/examples/app/middleware/resourcer.ts @@ -37,7 +37,7 @@ app.resource({ ctx.body = ctx.body || []; ctx.body.push('test list'); await next(); - } + }, }, }); diff --git a/package.json b/package.json index 0ba49ffd6..2dc5993fc 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,10 @@ "postinstall": "nocobase postinstall", "lint": "eslint .", "clean": "nocobase clean", + "changelog": "yarn changelog:root && yarn changelog:zh-CN && yarn changelog:en-US", + "changelog:root": "auto-changelog -p -t keepachangelog", + "changelog:zh-CN": "auto-changelog -p -t keepachangelog -o docs/zh-CN/welcome/release/index.md", + "changelog:en-US": "auto-changelog -p -t keepachangelog -o docs/en-US/welcome/release/index.md", "version:alpha": "lerna version prerelease --preid alpha --force-publish=* --no-git-tag-version -m \"chore(versions): publish packages %s\"", "release:force": "lerna publish from-package --yes", "release": "lerna publish", @@ -40,6 +44,7 @@ "@commitlint/cli": "^16.1.0", "@commitlint/config-conventional": "^16.0.0", "@commitlint/prompt-cli": "^16.1.0", + "auto-changelog": "^2.4.0", "ghooks": "^2.0.4", "prettier": "^2.2.1", "pretty-format": "^24.0.0", diff --git a/packages/app/client/src/plugins/charts.ts b/packages/app/client/src/plugins/charts.ts index f2115a4f1..b9a59f19f 100644 --- a/packages/app/client/src/plugins/charts.ts +++ b/packages/app/client/src/plugins/charts.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-charts/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-charts/client'; diff --git a/packages/app/client/src/plugins/duplicator.ts b/packages/app/client/src/plugins/duplicator.ts index 40b55cc1a..c027d3ee9 100644 --- a/packages/app/client/src/plugins/duplicator.ts +++ b/packages/app/client/src/plugins/duplicator.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-duplicator/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-duplicator/client'; diff --git a/packages/app/client/src/plugins/iframe-block.ts b/packages/app/client/src/plugins/iframe-block.ts index efd6abd53..4dcda1080 100644 --- a/packages/app/client/src/plugins/iframe-block.ts +++ b/packages/app/client/src/plugins/iframe-block.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-iframe-block/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-iframe-block/client'; diff --git a/packages/app/client/src/plugins/import.ts b/packages/app/client/src/plugins/import.ts index b0fdcee94..63ab5ae5e 100644 --- a/packages/app/client/src/plugins/import.ts +++ b/packages/app/client/src/plugins/import.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-import/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-import/client'; diff --git a/packages/app/client/src/plugins/multi-app-manager.ts b/packages/app/client/src/plugins/multi-app-manager.ts index 2faddb857..bd4adb4d4 100644 --- a/packages/app/client/src/plugins/multi-app-manager.ts +++ b/packages/app/client/src/plugins/multi-app-manager.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-multi-app-manager/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-multi-app-manager/client'; diff --git a/packages/app/client/src/plugins/oidc.ts b/packages/app/client/src/plugins/oidc.ts index b0a541801..698b473fe 100644 --- a/packages/app/client/src/plugins/oidc.ts +++ b/packages/app/client/src/plugins/oidc.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-oidc/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-oidc/client'; diff --git a/packages/app/client/src/plugins/saml.ts b/packages/app/client/src/plugins/saml.ts index d4e22a332..e577bab48 100644 --- a/packages/app/client/src/plugins/saml.ts +++ b/packages/app/client/src/plugins/saml.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-saml/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-saml/client'; diff --git a/packages/app/client/src/plugins/sample-hello.ts b/packages/app/client/src/plugins/sample-hello.ts index 73f714dc4..c41dfbfc6 100644 --- a/packages/app/client/src/plugins/sample-hello.ts +++ b/packages/app/client/src/plugins/sample-hello.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-sample-hello/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-sample-hello/client'; diff --git a/packages/app/client/src/plugins/sequence-field.ts b/packages/app/client/src/plugins/sequence-field.ts index 2c05a6a75..cd2f06a6b 100644 --- a/packages/app/client/src/plugins/sequence-field.ts +++ b/packages/app/client/src/plugins/sequence-field.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-sequence-field/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-sequence-field/client'; diff --git a/packages/app/client/src/plugins/snapshot-field.ts b/packages/app/client/src/plugins/snapshot-field.ts index 2ec089416..79230855b 100644 --- a/packages/app/client/src/plugins/snapshot-field.ts +++ b/packages/app/client/src/plugins/snapshot-field.ts @@ -1 +1 @@ -export { default } from '@nocobase/plugin-snapshot-field/client'; \ No newline at end of file +export { default } from '@nocobase/plugin-snapshot-field/client'; diff --git a/packages/app/client/typings.d.ts b/packages/app/client/typings.d.ts index 06c8a5b8c..68377d2ef 100644 --- a/packages/app/client/typings.d.ts +++ b/packages/app/client/typings.d.ts @@ -2,9 +2,7 @@ declare module '*.css'; declare module '*.less'; declare module '*.png'; declare module '*.svg' { - export function ReactComponent( - props: React.SVGProps, - ): React.ReactElement; + export function ReactComponent(props: React.SVGProps): React.ReactElement; const url: string; export default url; } diff --git a/packages/app/server/src/config/cache.ts b/packages/app/server/src/config/cache.ts index 8fbb26e1a..251fbd097 100644 --- a/packages/app/server/src/config/cache.ts +++ b/packages/app/server/src/config/cache.ts @@ -1,5 +1,5 @@ import { createDefaultCacheConfig } from '@nocobase/cache'; -const cacheConfig = !!process.env.CACHE_CONFIG ? JSON.parse(process.env.CACHE_CONFIG) : createDefaultCacheConfig(); +const cacheConfig = process.env.CACHE_CONFIG ? JSON.parse(process.env.CACHE_CONFIG) : createDefaultCacheConfig(); export default cacheConfig; diff --git a/packages/app/server/src/config/logger.ts b/packages/app/server/src/config/logger.ts index 5d656c1de..c39c2b9a1 100644 --- a/packages/app/server/src/config/logger.ts +++ b/packages/app/server/src/config/logger.ts @@ -2,5 +2,5 @@ import { AppLoggerOptions } from '@nocobase/logger'; export default { transports: process.env.LOGGER_TRANSPORT || ['console', 'dailyRotateFile'], - level: process.env.LOGGER_LEVEL || (process.env.APP_ENV === 'development' ? 'debug' : 'info') + level: process.env.LOGGER_LEVEL || (process.env.APP_ENV === 'development' ? 'debug' : 'info'), } as AppLoggerOptions; diff --git a/packages/core/acl/src/allow-manager.ts b/packages/core/acl/src/allow-manager.ts index ddf514133..7828f455f 100644 --- a/packages/core/acl/src/allow-manager.ts +++ b/packages/core/acl/src/allow-manager.ts @@ -87,7 +87,7 @@ export class AllowManager { aclMiddleware() { return async (ctx, next) => { const { resourceName, actionName } = ctx.action; - let skip = await this.acl.allowManager.isAllowed(resourceName, actionName, ctx); + const skip = await this.acl.allowManager.isAllowed(resourceName, actionName, ctx); if (skip) { ctx.permission = { diff --git a/packages/core/acl/src/index.ts b/packages/core/acl/src/index.ts index 5ae743acd..0c9ac0ade 100644 --- a/packages/core/acl/src/index.ts +++ b/packages/core/acl/src/index.ts @@ -5,4 +5,3 @@ export * from './acl-resource'; export * from './acl-role'; export * from './no-permission-error'; export * from './skip-middleware'; - diff --git a/packages/core/actions/src/actions/move.ts b/packages/core/actions/src/actions/move.ts index 7631b57ad..595238d75 100644 --- a/packages/core/actions/src/actions/move.ts +++ b/packages/core/actions/src/actions/move.ts @@ -45,7 +45,7 @@ export class SortAbleCollection { field: SortField; scopeKey: string; - constructor(collection: Collection, fieldName: string = 'sort') { + constructor(collection: Collection, fieldName = 'sort') { this.collection = collection; this.field = collection.getField(fieldName); @@ -112,7 +112,7 @@ export class SortAbleCollection { targetSort = targetSort + 1; } - let scopeValue = this.scopeKey ? sourceInstance.get(this.scopeKey) : null; + const scopeValue = this.scopeKey ? sourceInstance.get(this.scopeKey) : null; let updateCondition; let change; diff --git a/packages/core/cache/src/__tests__/index.test.ts b/packages/core/cache/src/__tests__/index.test.ts index 9f2ea2389..9a0ade05e 100644 --- a/packages/core/cache/src/__tests__/index.test.ts +++ b/packages/core/cache/src/__tests__/index.test.ts @@ -20,8 +20,7 @@ describe('cache', () => { }); it('createCache-with-single-config', async () => { - let cacheConfigStr = - '{"store":"memory","ttl":1,"max":10}'; + let cacheConfigStr = '{"store":"memory","ttl":1,"max":10}'; let cacheConfig = JSON.parse(cacheConfigStr); let cache = createCache(cacheConfig); await cache.set('name', 'Emma'); @@ -31,8 +30,7 @@ describe('cache', () => { await sleep(1005); expect(await cache.get('name')).toBeUndefined(); - cacheConfigStr = - '[{"store":"memory","ttl":1,"max":10}]'; + cacheConfigStr = '[{"store":"memory","ttl":1,"max":10}]'; cacheConfig = JSON.parse(cacheConfigStr); cache = createCache(cacheConfig); await cache.set('name', 'Emma'); diff --git a/packages/core/cache/src/index.ts b/packages/core/cache/src/index.ts index ee8b4dc31..ef794fd47 100644 --- a/packages/core/cache/src/index.ts +++ b/packages/core/cache/src/index.ts @@ -50,7 +50,7 @@ export function createCache(cacheConfig: ICacheConfig | ICacheConfig[] = createD if (cacheConfig.length === 1) { return createCacheByICacheConfig(cacheConfig[0]); } else { - let caches = []; + const caches = []; for (const cacheConfigEle of cacheConfig) { caches.push(createCacheByICacheConfig(cacheConfigEle)); } diff --git a/packages/core/cli/templates/plugin/client.d.ts b/packages/core/cli/templates/plugin/client.d.ts index 765db9222..bd53a2f77 100755 --- a/packages/core/cli/templates/plugin/client.d.ts +++ b/packages/core/cli/templates/plugin/client.d.ts @@ -1,4 +1,3 @@ // @ts-nocheck export * from './lib/client'; export { default } from './lib/client'; - diff --git a/packages/core/cli/templates/plugin/client.js b/packages/core/cli/templates/plugin/client.js index 238820257..c83e7e450 100755 --- a/packages/core/cli/templates/plugin/client.js +++ b/packages/core/cli/templates/plugin/client.js @@ -1,30 +1,65 @@ -"use strict"; +'use strict'; -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== 'function') return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return { default: obj }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} -var _index = _interopRequireWildcard(require("./lib/client")); +var _index = _interopRequireWildcard(require('./lib/client')); -Object.defineProperty(exports, "__esModule", { - value: true +Object.defineProperty(exports, '__esModule', { + value: true, }); var _exportNames = {}; -Object.defineProperty(exports, "default", { +Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { return _index.default; - } + }, }); Object.keys(_index).forEach(function (key) { - if (key === "default" || key === "__esModule") return; + if (key === 'default' || key === '__esModule') return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _index[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _index[key]; - } + }, }); }); diff --git a/packages/core/cli/templates/plugin/server.d.ts b/packages/core/cli/templates/plugin/server.d.ts index e70edb928..4d922a91b 100755 --- a/packages/core/cli/templates/plugin/server.d.ts +++ b/packages/core/cli/templates/plugin/server.d.ts @@ -1,4 +1,3 @@ // @ts-nocheck export * from './lib/server'; export { default } from './lib/server'; - diff --git a/packages/core/cli/templates/plugin/server.js b/packages/core/cli/templates/plugin/server.js index d06a7eb92..4f16903a6 100755 --- a/packages/core/cli/templates/plugin/server.js +++ b/packages/core/cli/templates/plugin/server.js @@ -1,30 +1,65 @@ -"use strict"; +'use strict'; -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== 'function') return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return { default: obj }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} -var _index = _interopRequireWildcard(require("./lib/server")); +var _index = _interopRequireWildcard(require('./lib/server')); -Object.defineProperty(exports, "__esModule", { - value: true +Object.defineProperty(exports, '__esModule', { + value: true, }); var _exportNames = {}; -Object.defineProperty(exports, "default", { +Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { return _index.default; - } + }, }); Object.keys(_index).forEach(function (key) { - if (key === "default" || key === "__esModule") return; + if (key === 'default' || key === '__esModule') return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _index[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _index[key]; - } + }, }); }); diff --git a/packages/core/client/src/acl/Configuration/ConfigureCenter.tsx b/packages/core/client/src/acl/Configuration/ConfigureCenter.tsx index a27c49029..aa3d102c9 100644 --- a/packages/core/client/src/acl/Configuration/ConfigureCenter.tsx +++ b/packages/core/client/src/acl/Configuration/ConfigureCenter.tsx @@ -19,7 +19,7 @@ const getParentKeys = (tree, func, path = []) => { return []; }; const getChildrenKeys = (data = [], arr = []) => { - for (let item of data) { + for (const item of data) { arr.push(item.key); if (item.children && item.children.length) getChildrenKeys(item.children, arr); } diff --git a/packages/core/client/src/acl/Configuration/MenuConfigure.tsx b/packages/core/client/src/acl/Configuration/MenuConfigure.tsx index 6ef8fbf89..a313781f0 100644 --- a/packages/core/client/src/acl/Configuration/MenuConfigure.tsx +++ b/packages/core/client/src/acl/Configuration/MenuConfigure.tsx @@ -31,7 +31,7 @@ const getParentUids = (tree, func, path = []) => { return []; }; const getChildrenUids = (data = [], arr = []) => { - for (let item of data) { + for (const item of data) { arr.push(item.uid); if (item.children && item.children.length) getChildrenUids(item.children, arr); } @@ -116,8 +116,8 @@ export const MenuConfigure = () => { refresh(); message.success(t('Saved successfully')); }} - /> - {' '}{t('Accessible')} + />{' '} + {t('Accessible')} ), render: (_, schema) => { diff --git a/packages/core/client/src/acl/Configuration/RoleTable.tsx b/packages/core/client/src/acl/Configuration/RoleTable.tsx index 037c5366b..888998030 100644 --- a/packages/core/client/src/acl/Configuration/RoleTable.tsx +++ b/packages/core/client/src/acl/Configuration/RoleTable.tsx @@ -27,7 +27,10 @@ export const RoleTable = () => { return (
- +
); diff --git a/packages/core/client/src/acl/Configuration/index.tsx b/packages/core/client/src/acl/Configuration/index.tsx index e036b370f..456a310c1 100644 --- a/packages/core/client/src/acl/Configuration/index.tsx +++ b/packages/core/client/src/acl/Configuration/index.tsx @@ -3,4 +3,4 @@ export { RoleConfigure } from './RoleConfigure'; export { RolesResourcesActions } from './RolesResourcesActions'; export { RoleTable } from './RoleTable'; export { StrategyActions } from './StrategyActions'; -export { SettingsCenterConfigure,SettingCenterProvider } from './ConfigureCenter'; +export { SettingsCenterConfigure, SettingCenterProvider } from './ConfigureCenter'; diff --git a/packages/core/client/src/api-client/__tests__/APIClient.test.tsx b/packages/core/client/src/api-client/__tests__/APIClient.test.tsx index d9c912622..31bcea3c4 100644 --- a/packages/core/client/src/api-client/__tests__/APIClient.test.tsx +++ b/packages/core/client/src/api-client/__tests__/APIClient.test.tsx @@ -22,5 +22,5 @@ describe('APIClient', () => { const apiClient = new APIClient(instance); expect(apiClient.axios).toBe(instance); }); - }) + }); }); diff --git a/packages/core/client/src/api-client/demos/demo1.tsx b/packages/core/client/src/api-client/demos/demo1.tsx index 6c4f3bb8f..9aa232c73 100644 --- a/packages/core/client/src/api-client/demos/demo1.tsx +++ b/packages/core/client/src/api-client/demos/demo1.tsx @@ -10,9 +10,7 @@ mock.onGet('/users:get').reply(200, { data: { id: 1, name: 'John Smith' }, }); -const providers = [ - [APIClientProvider, { apiClient }] -]; +const providers = [[APIClientProvider, { apiClient }]]; export default compose(...providers)(() => { const { data } = useRequest({ diff --git a/packages/core/client/src/api-client/demos/demo2.tsx b/packages/core/client/src/api-client/demos/demo2.tsx index 0b21e1fc1..27f161965 100644 --- a/packages/core/client/src/api-client/demos/demo2.tsx +++ b/packages/core/client/src/api-client/demos/demo2.tsx @@ -10,9 +10,7 @@ mock.onGet('/users:get').reply(200, { data: { id: 1, name: 'John Smith' }, }); -const providers = [ - [APIClientProvider, { apiClient }] -]; +const providers = [[APIClientProvider, { apiClient }]]; export default compose(...providers)(() => { const { data } = useRequest({ diff --git a/packages/core/client/src/api-client/hooks/index.ts b/packages/core/client/src/api-client/hooks/index.ts index 8c26c77dd..078c89886 100644 --- a/packages/core/client/src/api-client/hooks/index.ts +++ b/packages/core/client/src/api-client/hooks/index.ts @@ -1,4 +1,3 @@ export * from './useAPIClient'; export * from './useRequest'; export * from './useResource'; - diff --git a/packages/core/client/src/application/demos/demo2/index.tsx b/packages/core/client/src/application/demos/demo2/index.tsx index 217f1597a..91688b295 100644 --- a/packages/core/client/src/application/demos/demo2/index.tsx +++ b/packages/core/client/src/application/demos/demo2/index.tsx @@ -21,7 +21,7 @@ import { SignupPage, SystemSettingsProvider, SystemSettingsShortcut, - useRequest + useRequest, } from '@nocobase/client'; import { Spin } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/application/demos/demo2/mock.ts b/packages/core/client/src/application/demos/demo2/mock.ts index 0abf9af3b..d918bd7a6 100644 --- a/packages/core/client/src/application/demos/demo2/mock.ts +++ b/packages/core/client/src/application/demos/demo2/mock.ts @@ -144,7 +144,7 @@ export default (apiClient: APIClient) => { const response = { data: { type: 'void', - name: uid(), + name: uid(), 'x-uid': uid(), 'x-component': 'Page', properties: { diff --git a/packages/core/client/src/application/index.tsx b/packages/core/client/src/application/index.tsx index a9b63148b..efc14f171 100644 --- a/packages/core/client/src/application/index.tsx +++ b/packages/core/client/src/application/index.tsx @@ -1,3 +1,2 @@ export * from './Application'; export * from './compose'; - diff --git a/packages/core/client/src/block-provider/GanttBlockProvider.tsx b/packages/core/client/src/block-provider/GanttBlockProvider.tsx index 905a82a88..f94e8d5ba 100644 --- a/packages/core/client/src/block-provider/GanttBlockProvider.tsx +++ b/packages/core/client/src/block-provider/GanttBlockProvider.tsx @@ -12,7 +12,7 @@ const formatData = ( fieldNames, tasks: any[] = [], projectId: any = undefined, - hideChildren: boolean = false, + hideChildren = false, checkPermassion?: Function, ) => { data.forEach((item: any) => { diff --git a/packages/core/client/src/block-provider/TableBlockProvider.tsx b/packages/core/client/src/block-provider/TableBlockProvider.tsx index 89cb6ed3b..9744bb8f2 100644 --- a/packages/core/client/src/block-provider/TableBlockProvider.tsx +++ b/packages/core/client/src/block-provider/TableBlockProvider.tsx @@ -187,7 +187,7 @@ export const useTableBlockProps = () => { ctx.service.refresh(); }, onChange({ current, pageSize }, filters, sorter) { - let sort = sorter.order + const sort = sorter.order ? sorter.order === `ascend` ? [sorter.field] : [`-${sorter.field}`] diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index 74b550996..7f2c78c11 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -86,7 +86,7 @@ function getFormValues(filterByTk, field, form, fieldNames, getField, resource) } console.log('form.values', form.values); return form.values; - let values = {}; + const values = {}; for (const key in form.values) { if (fieldNames.includes(key)) { const collectionField = getField(key); @@ -494,7 +494,7 @@ export const useCustomizeBulkEditActionProps = () => { if (!skipValidator) { await form.submit(); } - let values = cloneDeep(form.values); + const values = cloneDeep(form.values); actionField.data = field.data || {}; actionField.data.loading = true; for (const key in values) { @@ -668,7 +668,7 @@ export const useUpdateActionProps = () => { await form.submit(); } const fieldNames = fields.map((field) => field.name); - let values = getFormValues(filterByTk, field, form, fieldNames, getField, resource); + const values = getFormValues(filterByTk, field, form, fieldNames, getField, resource); actionField.data = field.data || {}; actionField.data.loading = true; try { diff --git a/packages/core/client/src/block-provider/index.tsx b/packages/core/client/src/block-provider/index.tsx index 3f401d863..fba7585e0 100644 --- a/packages/core/client/src/block-provider/index.tsx +++ b/packages/core/client/src/block-provider/index.tsx @@ -9,5 +9,5 @@ export * from './TableBlockProvider'; export * from './TableFieldProvider'; export * from './TableSelectorProvider'; export * from './FormFieldProvider'; -export * from './GanttBlockProvider' +export * from './GanttBlockProvider'; export * from './SharedFilterProvider'; diff --git a/packages/core/client/src/board/CardAdder.tsx b/packages/core/client/src/board/CardAdder.tsx index 96694f88f..b452d5ae0 100644 --- a/packages/core/client/src/board/CardAdder.tsx +++ b/packages/core/client/src/board/CardAdder.tsx @@ -3,22 +3,22 @@ import CardForm from './CardForm'; function CardAdder({ column, onConfirm }) { function confirmCard(card) { - onConfirm(column, card) - setAddingCard(false) + onConfirm(column, card); + setAddingCard(false); } - const [addingCard, setAddingCard] = useState(false) + const [addingCard, setAddingCard] = useState(false); return ( <> {addingCard ? ( setAddingCard(false)} /> ) : ( - )} - ) + ); } export default CardAdder; diff --git a/packages/core/client/src/board/ColumnForm.tsx b/packages/core/client/src/board/ColumnForm.tsx index 2b3b512ea..c17ba0254 100644 --- a/packages/core/client/src/board/ColumnForm.tsx +++ b/packages/core/client/src/board/ColumnForm.tsx @@ -3,25 +3,25 @@ import { when } from './utils'; function ColumnForm({ onConfirm, onCancel }) { // FIXME use hook - const inputColumnTitle = createRef() + const inputColumnTitle = createRef(); function addColumn(event) { - event.preventDefault() + event.preventDefault(); - when(inputColumnTitle.current.value)(onConfirm) + when(inputColumnTitle.current.value)(onConfirm); } return ( -
+
- - - +
- ) + ); } -export default ColumnForm +export default ColumnForm; diff --git a/packages/core/client/src/board/DefaultColumnHeader.tsx b/packages/core/client/src/board/DefaultColumnHeader.tsx index af1f13b55..358f90623 100644 --- a/packages/core/client/src/board/DefaultColumnHeader.tsx +++ b/packages/core/client/src/board/DefaultColumnHeader.tsx @@ -7,52 +7,58 @@ function ColumnTitle({ allowRenameColumn, onClick, children: title }) { ) : ( {title} - ) + ); } function useRenameMode(state) { - const [renameMode, setRenameMode] = useState(state) + const [renameMode, setRenameMode] = useState(state); function toggleRenameMode() { - setRenameMode(!renameMode) + setRenameMode(!renameMode); } - return [renameMode, toggleRenameMode] + return [renameMode, toggleRenameMode]; } -function DefaultColumnHeader({ children: column, allowRemoveColumn, onColumnRemove, allowRenameColumn, onColumnRename }) { - const [renameMode, toggleRenameMode] = useRenameMode(false) - const [titleInput, setTitleInput] = useState('') +function DefaultColumnHeader({ + children: column, + allowRemoveColumn, + onColumnRemove, + allowRenameColumn, + onColumnRename, +}) { + const [renameMode, toggleRenameMode] = useRenameMode(false); + const [titleInput, setTitleInput] = useState(''); function handleRenameColumn(event) { - event.preventDefault() + event.preventDefault(); - onColumnRename(column, titleInput) - toggleRenameMode() + onColumnRename(column, titleInput); + toggleRenameMode(); } function handleRenameMode() { - setTitleInput(column.title) - toggleRenameMode() + setTitleInput(column.title); + toggleRenameMode(); } return ( -
+
{renameMode ? (
setTitleInput(value)} autoFocus /> - - @@ -66,7 +72,7 @@ function DefaultColumnHeader({ children: column, allowRemoveColumn, onColumnRemo )}
- ) + ); } export default DefaultColumnHeader; diff --git a/packages/core/client/src/board/helpers.ts b/packages/core/client/src/board/helpers.ts index b39b25af2..8cc20c580 100755 --- a/packages/core/client/src/board/helpers.ts +++ b/packages/core/client/src/board/helpers.ts @@ -2,7 +2,7 @@ import { addInArrayAtPosition, changeElementOfPositionInArray, removeFromArrayAtPosition, - replaceElementOfArray + replaceElementOfArray, } from './utils'; function reorderCardsOnColumn(column, reorderCards) { diff --git a/packages/core/client/src/board/index.ts b/packages/core/client/src/board/index.ts index 8b3da9b8c..ae60d9afa 100644 --- a/packages/core/client/src/board/index.ts +++ b/packages/core/client/src/board/index.ts @@ -1,2 +1 @@ export { default as Board } from './Board'; - diff --git a/packages/core/client/src/board/services.ts b/packages/core/client/src/board/services.ts index b25ab83b9..3204971a9 100644 --- a/packages/core/client/src/board/services.ts +++ b/packages/core/client/src/board/services.ts @@ -1,41 +1,41 @@ function getCoordinates(event, board) { - if (event.destination === null) return {} + if (event.destination === null) return {}; - const columnSource = { fromPosition: event.source.index } - const columnDestination = { toPosition: event.destination.index } + const columnSource = { fromPosition: event.source.index }; + const columnDestination = { toPosition: event.destination.index }; if (isAColumnMove(event.type)) { - return { source: columnSource, destination: columnDestination } + return { source: columnSource, destination: columnDestination }; } return { source: { ...columnSource, fromColumnId: getColumn(board, event.source.droppableId).id }, destination: { ...columnDestination, toColumnId: getColumn(board, event.destination.droppableId).id }, - } + }; } function isAColumnMove(type) { - return type === 'BOARD' + return type === 'BOARD'; } function getCard(board, sourceCoordinate) { - const column = board.columns.find((column) => column.id === sourceCoordinate.fromColumnId) - return column.cards[sourceCoordinate.fromPosition] + const column = board.columns.find((column) => column.id === sourceCoordinate.fromColumnId); + return column.cards[sourceCoordinate.fromPosition]; } function getColumn(board, droppableId) { - return board.columns.find(({ id }) => String(id) === droppableId) + return board.columns.find(({ id }) => String(id) === droppableId); } function isMovingAColumnToAnotherPosition(coordinates) { - return coordinates.source.fromPosition !== coordinates.destination.toPosition + return coordinates.source.fromPosition !== coordinates.destination.toPosition; } function isMovingACardToAnotherPosition(coordinates) { return !( coordinates.source.fromPosition === coordinates.destination.toPosition && coordinates.source.fromColumnId === coordinates.destination.toColumnId - ) + ); } -export { getCard, getCoordinates, isAColumnMove, isMovingAColumnToAnotherPosition, isMovingACardToAnotherPosition } +export { getCard, getCoordinates, isAColumnMove, isMovingAColumnToAnotherPosition, isMovingACardToAnotherPosition }; diff --git a/packages/core/client/src/board/utils.ts b/packages/core/client/src/board/utils.ts index efd69c98c..a8ccaa1b2 100755 --- a/packages/core/client/src/board/utils.ts +++ b/packages/core/client/src/board/utils.ts @@ -1,48 +1,48 @@ function compose(...fns) { - return (arg) => fns.reduce((acc, fn) => fn(acc), arg) + return (arg) => fns.reduce((acc, fn) => fn(acc), arg); } function partialRight(fn, ...args) { - return (...leftArgs) => fn(...leftArgs, ...args) + return (...leftArgs) => fn(...leftArgs, ...args); } function addInArrayAtPosition(array, element, position) { - const arrayCopy = [...array] - arrayCopy.splice(position, 0, element) - return arrayCopy + const arrayCopy = [...array]; + arrayCopy.splice(position, 0, element); + return arrayCopy; } function removeFromArrayAtPosition(array, position) { - return array.reduce((acc, value, idx) => (idx === position ? acc : [...acc, value]), []) + return array.reduce((acc, value, idx) => (idx === position ? acc : [...acc, value]), []); } function changeElementOfPositionInArray(array, from, to) { - const removeFromArrayAtPositionFrom = partialRight(removeFromArrayAtPosition, from) - const addInArrayAtPositionTo = partialRight(addInArrayAtPosition, array[from], to) + const removeFromArrayAtPositionFrom = partialRight(removeFromArrayAtPosition, from); + const addInArrayAtPositionTo = partialRight(addInArrayAtPosition, array[from], to); - return compose(removeFromArrayAtPositionFrom, addInArrayAtPositionTo)(array) + return compose(removeFromArrayAtPositionFrom, addInArrayAtPositionTo)(array); } function identity(value) { - return value + return value; } function when(value, predicate = identity) { return function callback(callback) { - if (predicate(value)) return callback(value) - } + if (predicate(value)) return callback(value); + }; } function replaceElementOfArray(array) { return function (options) { - return array.map((element) => (options.when(element) ? options.for(element) : element)) - } + return array.map((element) => (options.when(element) ? options.for(element) : element)); + }; } function pickPropOut(object, prop) { return Object.keys(object).reduce((obj, key) => { - return key === prop ? obj : { ...obj, [key]: object[key] } - }, {}) + return key === prop ? obj : { ...obj, [key]: object[key] }; + }, {}); } export { @@ -53,4 +53,4 @@ export { replaceElementOfArray, partialRight, pickPropOut, -} +}; diff --git a/packages/core/client/src/board/withDroppable.tsx b/packages/core/client/src/board/withDroppable.tsx index fdf43f32b..6d038d816 100644 --- a/packages/core/client/src/board/withDroppable.tsx +++ b/packages/core/client/src/board/withDroppable.tsx @@ -1,5 +1,5 @@ -import React from 'react' -import { Droppable } from 'react-beautiful-dnd' +import React from 'react'; +import { Droppable } from 'react-beautiful-dnd'; function withDroppable(Component) { return function WrapperComponent({ children, ...droppableProps }) { @@ -12,8 +12,8 @@ function withDroppable(Component) { )} - ) - } + ); + }; } -export default withDroppable +export default withDroppable; diff --git a/packages/core/client/src/collection-manager/CollectionField.tsx b/packages/core/client/src/collection-manager/CollectionField.tsx index 123ec643f..d1a56a93b 100644 --- a/packages/core/client/src/collection-manager/CollectionField.tsx +++ b/packages/core/client/src/collection-manager/CollectionField.tsx @@ -100,9 +100,9 @@ export const InternalFallbackField = () => { // ๅฝ“ๅญ—ๆฎต่ขซๅˆ ้™คๆ—ถ๏ผŒๆ˜พ็คบไธ€ไธชๆ็คบๅ ไฝ็ฌฆ const DeletedField = () => { - const { t } = useTranslation() + const { t } = useTranslation(); return
{t('The field has bee deleted')}
; -} +}; export const CollectionField = connect((props) => { const fieldSchema = useFieldSchema(); diff --git a/packages/core/client/src/collection-manager/CollectionManagerSchemaComponentProvider.tsx b/packages/core/client/src/collection-manager/CollectionManagerSchemaComponentProvider.tsx index 7188bf544..8ce6ea2b9 100644 --- a/packages/core/client/src/collection-manager/CollectionManagerSchemaComponentProvider.tsx +++ b/packages/core/client/src/collection-manager/CollectionManagerSchemaComponentProvider.tsx @@ -5,7 +5,7 @@ import { CollectionFieldProvider, CollectionProvider, ResourceActionProvider, - useDataSourceFromRAC + useDataSourceFromRAC, } from './'; import * as hooks from './action-hooks'; import { DataSourceProvider, ds, SubFieldDataSourceProvider } from './sub-table'; diff --git a/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx b/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx index b072d7542..2adfa65ae 100644 --- a/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx +++ b/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx @@ -27,7 +27,7 @@ import { EditCategory, EditCategoryAction, SyncFieldsAction, - SyncFieldsActionCom + SyncFieldsActionCom, } from './Configuration'; import { CollectionCategroriesProvider } from './CollectionManagerProvider'; @@ -61,32 +61,32 @@ const schema2: ISchema = { export const CollectionManagerPane = () => { return ( // - + // ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx b/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx index c5bc64195..7ebab6601 100644 --- a/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx @@ -41,7 +41,7 @@ export const AddCategoryAction = (props) => { const { t } = useTranslation(); return ( -
setVisible(true)} title={t('Add category')}> +
setVisible(true)} title={t('Add category')}> {children || }
{ }; const useDefaultCollectionFields = (values) => { - let defaults = values.fields ? [...values.fields] : []; + const defaults = values.fields ? [...values.fields] : []; const { autoGenId = true, createdAt = true, createdBy = true, updatedAt = true, updatedBy = true } = values; if (autoGenId) { const pk = values.fields.find((f) => f.primaryKey); diff --git a/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx b/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx index 856ac657b..e9d91f532 100644 --- a/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx +++ b/packages/core/client/src/collection-manager/Configuration/CollectionFields.tsx @@ -359,18 +359,20 @@ export const CollectionFields = (props) => { ]; dataSource.push( - ...inherits.map((key) => { - const collection = getCollection(key); - if (!collection) { - return; - } - return { - key, - title: `${t('Inherited fields')} - ` + compile(collection?.title), - inherit: true, - fields: collection?.fields || [], - }; - }).filter(Boolean), + ...inherits + .map((key) => { + const collection = getCollection(key); + if (!collection) { + return; + } + return { + key, + title: `${t('Inherited fields')} - ` + compile(collection?.title), + inherit: true, + fields: collection?.fields || [], + }; + }) + .filter(Boolean), ); const resourceActionProps = { diff --git a/packages/core/client/src/collection-manager/Configuration/ConfigurationTabs.tsx b/packages/core/client/src/collection-manager/Configuration/ConfigurationTabs.tsx index a4b672fb0..b7dbdbeda 100644 --- a/packages/core/client/src/collection-manager/Configuration/ConfigurationTabs.tsx +++ b/packages/core/client/src/collection-manager/Configuration/ConfigurationTabs.tsx @@ -7,7 +7,7 @@ import { useDraggable, useDroppable, useSensor, - useSensors + useSensors, } from '@dnd-kit/core'; import { RecursionField, observer } from '@formily/react'; import { uid } from '@formily/shared'; diff --git a/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx b/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx index 5ed637c3c..9baec4257 100644 --- a/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx @@ -115,7 +115,11 @@ export const EditSubFieldAction = (props) => { > {t('Edit')} - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/ViewInheritedField.tsx b/packages/core/client/src/collection-manager/Configuration/ViewInheritedField.tsx index 1921c69a5..2fe170085 100644 --- a/packages/core/client/src/collection-manager/Configuration/ViewInheritedField.tsx +++ b/packages/core/client/src/collection-manager/Configuration/ViewInheritedField.tsx @@ -58,8 +58,6 @@ const getSchema = (schema: IField, record: any, compile, getContainer): ISchema }; }; - - export const ViewCollectionField = (props) => { const record = useRecord(); return ; diff --git a/packages/core/client/src/collection-manager/Configuration/components/CollectionTemplate.tsx b/packages/core/client/src/collection-manager/Configuration/components/CollectionTemplate.tsx index e4b618a9d..984c0c305 100644 --- a/packages/core/client/src/collection-manager/Configuration/components/CollectionTemplate.tsx +++ b/packages/core/client/src/collection-manager/Configuration/components/CollectionTemplate.tsx @@ -10,5 +10,5 @@ export const CollectionTemplate = observer((props: any) => { const compile = useCompile(); const schema = getTemplate(value); - return {compile(schema?.title||'{{t("General collection")}}')}; + return {compile(schema?.title || '{{t("General collection")}}')}; }); diff --git a/packages/core/client/src/collection-manager/Configuration/components/FieldSummary.tsx b/packages/core/client/src/collection-manager/Configuration/components/FieldSummary.tsx index 16c0d5991..846e00224 100644 --- a/packages/core/client/src/collection-manager/Configuration/components/FieldSummary.tsx +++ b/packages/core/client/src/collection-manager/Configuration/components/FieldSummary.tsx @@ -23,7 +23,9 @@ export const FieldSummary = observer((props: any) => { padding: 16px; `} > -
{t('Field interface')}: {compile(schema.title)}
+
+ {t('Field interface')}: {compile(schema.title)} +
{schema.description ? (
{ padding: 16px; `} > -
{t('Collection template')}: {compile(schema.title)}
+
+ {t('Collection template')}: {compile(schema.title)} +
{schema.description ? (
{ placeholder={'็•™็ฉบๆ—ถ๏ผŒ่‡ชๅŠจ็”Ÿๆˆ FK ๅญ—ๆฎต'} disabled={field.disabled} value={field.value} - options={getCollectionFields(collection.name).filter(field => field.type).map((field) => { - return { - label: field?.uiSchema?.title || field.name, - value: field.name, - }; - })} + options={getCollectionFields(collection.name) + .filter((field) => field.type) + .map((field) => { + return { + label: field?.uiSchema?.title || field.name, + value: field.name, + }; + })} />
); @@ -42,18 +44,19 @@ export const ThroughForeignKey = observer(() => { placeholder={'็•™็ฉบๆ—ถ๏ผŒ่‡ชๅŠจ็”Ÿๆˆ FK ๅญ—ๆฎต'} disabled={field.disabled} value={field.value} - options={getCollectionFields(form.values.through).filter(field => field.type).map((field) => { - return { - label: field?.uiSchema?.title || field.name, - value: field.name, - }; - })} + options={getCollectionFields(form.values.through) + .filter((field) => field.type) + .map((field) => { + return { + label: field?.uiSchema?.title || field.name, + value: field.name, + }; + })} />
); }); - export const TargetForeignKey = observer(() => { const field = useField(); const form = useForm(); @@ -65,12 +68,14 @@ export const TargetForeignKey = observer(() => { placeholder={'็•™็ฉบๆ—ถ๏ผŒ่‡ชๅŠจ็”Ÿๆˆ FK ๅญ—ๆฎต'} disabled={field.disabled} value={field.value} - options={getCollectionFields(form.values.target).filter(field => field.type).map((field) => { - return { - label: field?.uiSchema?.title || field.name, - value: field.name, - }; - })} + options={getCollectionFields(form.values.target) + .filter((field) => field.type) + .map((field) => { + return { + label: field?.uiSchema?.title || field.name, + value: field.name, + }; + })} />
); @@ -83,7 +88,11 @@ export const SourceCollection = observer(() => { const compile = useCompile(); return (
-
); }); diff --git a/packages/core/client/src/collection-manager/ResourceActionProvider.tsx b/packages/core/client/src/collection-manager/ResourceActionProvider.tsx index 079364e0b..b7507d6d1 100644 --- a/packages/core/client/src/collection-manager/ResourceActionProvider.tsx +++ b/packages/core/client/src/collection-manager/ResourceActionProvider.tsx @@ -20,7 +20,7 @@ interface ResourceActionProviderProps { const ResourceContext = createContext(null); const CollectionResourceActionProvider = (props) => { - let { collection, request, uid, dragSort } = props; + const { collection, request, uid, dragSort } = props; const api = useAPIClient(); const record = useRecord(); const actionName = request?.action; @@ -52,7 +52,7 @@ const CollectionResourceActionProvider = (props) => { }; const AssociationResourceActionProvider = (props) => { - let { collection, association, request, uid, dragSort } = props; + const { collection, association, request, uid, dragSort } = props; const api = useAPIClient(); const record = useRecord(); const resourceOf = record[association.sourceKey]; diff --git a/packages/core/client/src/collection-manager/demos/demo4.tsx b/packages/core/client/src/collection-manager/demos/demo4.tsx index 96007cb61..ba256c40e 100644 --- a/packages/core/client/src/collection-manager/demos/demo4.tsx +++ b/packages/core/client/src/collection-manager/demos/demo4.tsx @@ -3,7 +3,7 @@ import { AntdSchemaComponentProvider, CollectionManagerProvider, SchemaComponent, - SchemaComponentProvider + SchemaComponentProvider, } from '@nocobase/client'; import React from 'react'; diff --git a/packages/core/client/src/collection-manager/demos/demo5.tsx b/packages/core/client/src/collection-manager/demos/demo5.tsx index 5c8952c60..c9ef53633 100644 --- a/packages/core/client/src/collection-manager/demos/demo5.tsx +++ b/packages/core/client/src/collection-manager/demos/demo5.tsx @@ -18,7 +18,7 @@ import { SchemaComponentProvider, SchemaInitializer, SchemaInitializerProvider, - useCollectionManager + useCollectionManager, } from '@nocobase/client'; import cloneDeep from 'lodash/cloneDeep'; import React, { useContext } from 'react'; diff --git a/packages/core/client/src/collection-manager/hooks/useCollectionDataSource.ts b/packages/core/client/src/collection-manager/hooks/useCollectionDataSource.ts index e819ada99..bb940136c 100644 --- a/packages/core/client/src/collection-manager/hooks/useCollectionDataSource.ts +++ b/packages/core/client/src/collection-manager/hooks/useCollectionDataSource.ts @@ -1,7 +1,7 @@ import { action } from '@formily/reactive'; -import { useCollectionManager } from "."; -import { useCompile } from "../../schema-component"; +import { useCollectionManager } from '.'; +import { useCompile } from '../../schema-component'; export function useCollectionDataSource(filter?: Function) { return (field: any) => { @@ -9,10 +9,10 @@ export function useCollectionDataSource(filter?: Function) { const { collections = [] } = useCollectionManager(); action.bound((data: any) => { const filtered = typeof filter === 'function' ? data.filter(filter) : data; - field.dataSource = filtered.map(item => ({ + field.dataSource = filtered.map((item) => ({ label: compile(item.title), - value: item.name + value: item.name, })); })(collections); - } + }; } diff --git a/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts b/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts index 0c2f5b550..f84937696 100644 --- a/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts +++ b/packages/core/client/src/collection-manager/hooks/useCollectionManager.ts @@ -276,7 +276,7 @@ export const useCollectionManager = () => { getInterface(name: string) { return interfaces[name] ? clone(interfaces[name]) : null; }, - getTemplate(name: string = 'general') { + getTemplate(name = 'general') { return templates[name] ? clone(templates[name] || templates['general']) : null; }, getParentCollectionFields: (parentCollection, currentCollection) => { diff --git a/packages/core/client/src/collection-manager/interfaces/attachment.ts b/packages/core/client/src/collection-manager/interfaces/attachment.ts index e816022e4..af6adbd10 100644 --- a/packages/core/client/src/collection-manager/interfaces/attachment.ts +++ b/packages/core/client/src/collection-manager/interfaces/attachment.ts @@ -22,7 +22,7 @@ export const attachment: IField = { }, }, }, - availableTypes:['belongsToMany'], + availableTypes: ['belongsToMany'], schemaInitialize(schema: ISchema, { block }) { if (['Table', 'Kanban'].includes(block)) { schema['x-component-props'] = schema['x-component-props'] || {}; diff --git a/packages/core/client/src/collection-manager/interfaces/chinaRegion.ts b/packages/core/client/src/collection-manager/interfaces/chinaRegion.ts index 6f4ab2d8c..8ae4450b6 100644 --- a/packages/core/client/src/collection-manager/interfaces/chinaRegion.ts +++ b/packages/core/client/src/collection-manager/interfaces/chinaRegion.ts @@ -34,7 +34,7 @@ export const chinaRegion: IField = { }, }, }, - availableTypes:['belongsToMany'], + availableTypes: ['belongsToMany'], initialize: (values: any) => { if (!values.through) { values.through = `t_${uid()}`; diff --git a/packages/core/client/src/collection-manager/interfaces/components/index.tsx b/packages/core/client/src/collection-manager/interfaces/components/index.tsx index b9aafda8d..9096e115a 100644 --- a/packages/core/client/src/collection-manager/interfaces/components/index.tsx +++ b/packages/core/client/src/collection-manager/interfaces/components/index.tsx @@ -2,33 +2,26 @@ import { Switch } from 'antd'; import React from 'react'; export const TargetKey = () => { - return ( -
- Target key -
- ); + return
Target key
; }; export const ThroughCollection = () => { return (
- Through collection + Through collection{' '} +
); }; export const SourceKey = () => { - return ( -
- Source key -
- ); + return
Source key
; }; export const ForeignKey = () => { return (
- Foreign key + Foreign key
); }; diff --git a/packages/core/client/src/collection-manager/interfaces/createdAt.ts b/packages/core/client/src/collection-manager/interfaces/createdAt.ts index 12b971b8b..70c2d5e88 100644 --- a/packages/core/client/src/collection-manager/interfaces/createdAt.ts +++ b/packages/core/client/src/collection-manager/interfaces/createdAt.ts @@ -20,7 +20,7 @@ export const createdAt: IField = { 'x-read-pretty': true, }, }, - availableTypes:['date'], + availableTypes: ['date'], properties: { ...defaultProps, ...dateTimeProps, diff --git a/packages/core/client/src/collection-manager/interfaces/createdBy.ts b/packages/core/client/src/collection-manager/interfaces/createdBy.ts index 9fc357ab9..e329a90f7 100644 --- a/packages/core/client/src/collection-manager/interfaces/createdBy.ts +++ b/packages/core/client/src/collection-manager/interfaces/createdBy.ts @@ -28,7 +28,7 @@ export const createdBy: IField = { 'x-read-pretty': true, }, }, - availableTypes:['belongsTo'], + availableTypes: ['belongsTo'], properties: { ...defaultProps, }, diff --git a/packages/core/client/src/collection-manager/interfaces/datetime.ts b/packages/core/client/src/collection-manager/interfaces/datetime.ts index 52ced3434..d6fc31c06 100644 --- a/packages/core/client/src/collection-manager/interfaces/datetime.ts +++ b/packages/core/client/src/collection-manager/interfaces/datetime.ts @@ -20,7 +20,7 @@ export const datetime: IField = { }, }, }, - availableTypes:['date'], + availableTypes: ['date'], hasDefaultValue: true, properties: { ...defaultProps, diff --git a/packages/core/client/src/collection-manager/interfaces/icon.ts b/packages/core/client/src/collection-manager/interfaces/icon.ts index 9833ed793..57efe0b38 100644 --- a/packages/core/client/src/collection-manager/interfaces/icon.ts +++ b/packages/core/client/src/collection-manager/interfaces/icon.ts @@ -16,7 +16,7 @@ export const icon: IField = { 'x-component': 'IconPicker', }, }, - availableTypes:['string'], + availableTypes: ['string'], hasDefaultValue: true, properties: { ...defaultProps, diff --git a/packages/core/client/src/collection-manager/interfaces/id.ts b/packages/core/client/src/collection-manager/interfaces/id.ts index 1d1beaa5e..5ed3f9849 100644 --- a/packages/core/client/src/collection-manager/interfaces/id.ts +++ b/packages/core/client/src/collection-manager/interfaces/id.ts @@ -21,7 +21,7 @@ export const id: IField = { 'x-read-pretty': true, }, }, - availableTypes:['bigInt','integer','string'], + availableTypes: ['bigInt', 'integer', 'string'], properties: { 'uiSchema.title': { type: 'string', diff --git a/packages/core/client/src/collection-manager/interfaces/index.ts b/packages/core/client/src/collection-manager/interfaces/index.ts index cccb4bdd3..9679acf52 100644 --- a/packages/core/client/src/collection-manager/interfaces/index.ts +++ b/packages/core/client/src/collection-manager/interfaces/index.ts @@ -31,4 +31,3 @@ export * from './time'; export * from './updatedAt'; export * from './updatedBy'; export * from './url'; - diff --git a/packages/core/client/src/collection-manager/interfaces/input.ts b/packages/core/client/src/collection-manager/interfaces/input.ts index b1f76c86a..c309ead56 100644 --- a/packages/core/client/src/collection-manager/interfaces/input.ts +++ b/packages/core/client/src/collection-manager/interfaces/input.ts @@ -18,7 +18,7 @@ export const input: IField = { 'x-component': 'Input', }, }, - availableTypes:['string'], + availableTypes: ['string'], hasDefaultValue: true, properties: { ...defaultProps, @@ -42,12 +42,14 @@ export const input: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': `{{(field) => { const targetValue = field.query('.min').value(); field.selfErrors = - !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t('Max length must greater than min length')}' : '' + !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t( + 'Max length must greater than min length', + )}' : '' }}}`, }, min: { @@ -57,13 +59,15 @@ export const input: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': { dependencies: ['.max'], fulfill: { state: { - selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t('Min length must less than max length')}' : ''}}`, + selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t( + 'Min length must less than max length', + )}' : ''}}`, }, }, }, @@ -75,7 +79,7 @@ export const input: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, }, format: { @@ -86,46 +90,60 @@ export const input: IField = { 'x-component-props': { allowClear: true, }, - enum: [{ - label: '{{ t("url") }}', - value: 'url', - }, { - label: '{{ t("email") }}', - value: 'email', - }, { - label: '{{ t("ipv6") }}', - value: 'ipv6', - }, { - label: '{{ t("ipv4") }}', - value: 'ipv4', - }, { - label: '{{ t("number") }}', - value: 'number', - }, { - label: '{{ t("integer") }}', - value: 'integer', - }, { - label: '{{ t("idcard") }}', - value: 'idcard', - }, { - label: '{{ t("qq") }}', - value: 'qq', - }, { - label: '{{ t("phone") }}', - value: 'phone', - }, { - label: '{{ t("money") }}', - value: 'money', - }, { - label: '{{ t("zh") }}', - value: 'zh', - }, { - label: '{{ t("date") }}', - value: 'date', - }, { - label: '{{ t("zip") }}', - value: 'zip', - }] + enum: [ + { + label: '{{ t("url") }}', + value: 'url', + }, + { + label: '{{ t("email") }}', + value: 'email', + }, + { + label: '{{ t("ipv6") }}', + value: 'ipv6', + }, + { + label: '{{ t("ipv4") }}', + value: 'ipv4', + }, + { + label: '{{ t("number") }}', + value: 'number', + }, + { + label: '{{ t("integer") }}', + value: 'integer', + }, + { + label: '{{ t("idcard") }}', + value: 'idcard', + }, + { + label: '{{ t("qq") }}', + value: 'qq', + }, + { + label: '{{ t("phone") }}', + value: 'phone', + }, + { + label: '{{ t("money") }}', + value: 'money', + }, + { + label: '{{ t("zh") }}', + value: 'zh', + }, + { + label: '{{ t("date") }}', + value: 'date', + }, + { + label: '{{ t("zip") }}', + value: 'zip', + }, + ], }, pattern: { type: 'string', @@ -135,8 +153,8 @@ export const input: IField = { 'x-component-props': { prefix: '/', suffix: '/', - } + }, }, }; - } + }, }; diff --git a/packages/core/client/src/collection-manager/interfaces/integer.ts b/packages/core/client/src/collection-manager/interfaces/integer.ts index 3d78e9a48..5267d6ec6 100644 --- a/packages/core/client/src/collection-manager/interfaces/integer.ts +++ b/packages/core/client/src/collection-manager/interfaces/integer.ts @@ -5,7 +5,7 @@ import { IField } from './types'; registerValidateFormats({ odd: /^-?\d*[13579]$/, - even: /^-?\d*[02468]$/ + even: /^-?\d*[02468]$/, }); export const integer: IField = { @@ -29,7 +29,7 @@ export const integer: IField = { 'x-validator': 'integer', }, }, - availableTypes:['bigInt','integer'], + availableTypes: ['bigInt', 'integer'], hasDefaultValue: true, properties: { ...defaultProps, @@ -46,12 +46,14 @@ export const integer: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': `{{(field) => { const targetValue = field.query('.minimum').value(); field.selfErrors = - !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t('Maximum must greater than minimum')}' : '' + !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t( + 'Maximum must greater than minimum', + )}' : '' }}}`, }, minimum: { @@ -60,13 +62,15 @@ export const integer: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': { dependencies: ['.maximum'], fulfill: { state: { - selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t('Minimum must less than maximum')}' : ''}}`, + selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t( + 'Minimum must less than maximum', + )}' : ''}}`, }, }, }, @@ -79,13 +83,16 @@ export const integer: IField = { 'x-component-props': { allowClear: true, }, - enum: [{ - label: '{{ t("Odd") }}', - value: 'odd', - }, { - label: '{{ t("Even") }}', - value: 'even', - }] + enum: [ + { + label: '{{ t("Odd") }}', + value: 'odd', + }, + { + label: '{{ t("Even") }}', + value: 'even', + }, + ], }, pattern: { type: 'string', @@ -95,8 +102,8 @@ export const integer: IField = { 'x-component-props': { prefix: '/', suffix: '/', - } + }, }, }; - } + }, }; diff --git a/packages/core/client/src/collection-manager/interfaces/json.ts b/packages/core/client/src/collection-manager/interfaces/json.ts index bcb9d6907..1a197e8af 100644 --- a/packages/core/client/src/collection-manager/interfaces/json.ts +++ b/packages/core/client/src/collection-manager/interfaces/json.ts @@ -10,10 +10,10 @@ registerValidateRules({ } catch (error) { return { type: 'error', - message: error.message + message: error.message, }; } - } + }, }); export const json: IField = { @@ -36,14 +36,13 @@ export const json: IField = { // maxRows: 20, }, }, - default: null + default: null, }, }, - availableTypes:['json','array'], + availableTypes: ['json', 'array'], hasDefaultValue: true, properties: { ...defaultProps, }, - filterable: { - } + filterable: {}, }; diff --git a/packages/core/client/src/collection-manager/interfaces/m2o.tsx b/packages/core/client/src/collection-manager/interfaces/m2o.tsx index ac4596aa3..d4319ad9c 100644 --- a/packages/core/client/src/collection-manager/interfaces/m2o.tsx +++ b/packages/core/client/src/collection-manager/interfaces/m2o.tsx @@ -5,7 +5,7 @@ import { recordPickerSelector, recordPickerViewer, relationshipType, - reverseFieldProperties + reverseFieldProperties, } from './properties'; import { IField } from './types'; @@ -50,7 +50,7 @@ export const m2o: IField = { }, }, }, - availableTypes:['belongsTo'], + availableTypes: ['belongsTo'], schemaInitialize(schema: ISchema, { block, readPretty, targetCollection }) { if (targetCollection?.titleField && schema['x-component-props']) { schema['x-component-props'].fieldNames = schema['x-component-props'].fieldNames || { value: 'id' }; diff --git a/packages/core/client/src/collection-manager/interfaces/markdown.ts b/packages/core/client/src/collection-manager/interfaces/markdown.ts index 312b3caf5..43bf92a9f 100644 --- a/packages/core/client/src/collection-manager/interfaces/markdown.ts +++ b/packages/core/client/src/collection-manager/interfaces/markdown.ts @@ -1,7 +1,7 @@ import { ISchema } from '@formily/react'; import { defaultProps } from './properties'; import { IField } from './types'; -import { i18n } from '../../i18n' +import { i18n } from '../../i18n'; export const markdown: IField = { name: 'markdown', @@ -17,7 +17,7 @@ export const markdown: IField = { 'x-component': 'Markdown', }, }, - availableTypes:['text'], + availableTypes: ['text'], hasDefaultValue: true, properties: { ...defaultProps, @@ -37,12 +37,14 @@ export const markdown: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': `{{(field) => { const targetValue = field.query('.min').value(); field.selfErrors = - !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t('Max length must greater than min length')}' : '' + !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t( + 'Max length must greater than min length', + )}' : '' }}}`, }, min: { @@ -52,17 +54,19 @@ export const markdown: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': { dependencies: ['.max'], fulfill: { state: { - selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t('Min length must less than max length')}' : ''}}`, + selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t( + 'Min length must less than max length', + )}' : ''}}`, }, }, }, }, }; - } + }, }; diff --git a/packages/core/client/src/collection-manager/interfaces/number.ts b/packages/core/client/src/collection-manager/interfaces/number.ts index d0b8b47a5..73d61a98f 100644 --- a/packages/core/client/src/collection-manager/interfaces/number.ts +++ b/packages/core/client/src/collection-manager/interfaces/number.ts @@ -22,7 +22,7 @@ export const number: IField = { }, }, }, - availableTypes:['double'], + availableTypes: ['double'], hasDefaultValue: true, properties: { ...defaultProps, @@ -56,7 +56,9 @@ export const number: IField = { 'x-reactions': `{{(field) => { const targetValue = field.query('.minimum').value(); field.selfErrors = - !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t('Maximum must greater than minimum')}' : '' + !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t( + 'Maximum must greater than minimum', + )}' : '' }}}`, }, minimum: { @@ -68,7 +70,9 @@ export const number: IField = { dependencies: ['.maximum'], fulfill: { state: { - selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t('Minimum must less than maximum')}' : ''}}`, + selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t( + 'Minimum must less than maximum', + )}' : ''}}`, }, }, }, @@ -81,16 +85,20 @@ export const number: IField = { 'x-component-props': { allowClear: true, }, - enum: [{ - label: '{{ t("Integer") }}', - value: 'integer', - }, { - label: '{{ t("Odd") }}', - value: 'odd', - }, { - label: '{{ t("Even") }}', - value: 'even', - }] + enum: [ + { + label: '{{ t("Integer") }}', + value: 'integer', + }, + { + label: '{{ t("Odd") }}', + value: 'odd', + }, + { + label: '{{ t("Even") }}', + value: 'even', + }, + ], }, pattern: { type: 'string', @@ -100,8 +108,8 @@ export const number: IField = { 'x-component-props': { prefix: '/', suffix: '/', - } + }, }, }; - } + }, }; diff --git a/packages/core/client/src/collection-manager/interfaces/password.ts b/packages/core/client/src/collection-manager/interfaces/password.ts index 16e9a0b18..79c6d354c 100644 --- a/packages/core/client/src/collection-manager/interfaces/password.ts +++ b/packages/core/client/src/collection-manager/interfaces/password.ts @@ -18,7 +18,7 @@ export const password: IField = { 'x-component': 'Password', }, }, - availableTypes:['password'], + availableTypes: ['password'], hasDefaultValue: true, properties: { ...defaultProps, @@ -33,12 +33,14 @@ export const password: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': `{{(field) => { const targetValue = field.query('.min').value(); field.selfErrors = - !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t('Max length must greater than min length')}' : '' + !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t( + 'Max length must greater than min length', + )}' : '' }}}`, }, min: { @@ -48,17 +50,19 @@ export const password: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': { dependencies: ['.max'], fulfill: { state: { - selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t('Min length must less than max length')}' : ''}}`, + selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t( + 'Min length must less than max length', + )}' : ''}}`, }, }, }, }, }; - } + }, }; diff --git a/packages/core/client/src/collection-manager/interfaces/phone.ts b/packages/core/client/src/collection-manager/interfaces/phone.ts index 491c49085..4a6ec90f2 100644 --- a/packages/core/client/src/collection-manager/interfaces/phone.ts +++ b/packages/core/client/src/collection-manager/interfaces/phone.ts @@ -16,7 +16,7 @@ export const phone: IField = { // title, 'x-component': 'Input', 'x-component-props': { - type: 'tel' + type: 'tel', }, // 'x-validator': 'phone', }, diff --git a/packages/core/client/src/collection-manager/interfaces/richText.ts b/packages/core/client/src/collection-manager/interfaces/richText.ts index 2f32ff1c8..9d7d622ef 100644 --- a/packages/core/client/src/collection-manager/interfaces/richText.ts +++ b/packages/core/client/src/collection-manager/interfaces/richText.ts @@ -38,12 +38,14 @@ export const richText: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': `{{(field) => { const targetValue = field.query('.min').value(); field.selfErrors = - !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t('Max length must greater than min length')}' : '' + !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t( + 'Max length must greater than min length', + )}' : '' }}}`, }, min: { @@ -53,17 +55,19 @@ export const richText: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': { dependencies: ['.max'], fulfill: { state: { - selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t('Min length must less than max length')}' : ''}}`, + selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t( + 'Min length must less than max length', + )}' : ''}}`, }, }, }, }, }; - } + }, }; diff --git a/packages/core/client/src/collection-manager/interfaces/textarea.ts b/packages/core/client/src/collection-manager/interfaces/textarea.ts index cf50e810c..60bcfd756 100644 --- a/packages/core/client/src/collection-manager/interfaces/textarea.ts +++ b/packages/core/client/src/collection-manager/interfaces/textarea.ts @@ -38,12 +38,14 @@ export const textarea: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': `{{(field) => { const targetValue = field.query('.min').value(); field.selfErrors = - !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t('Max length must greater than min length')}' : '' + !!targetValue && !!field.value && targetValue > field.value ? '${i18n.t( + 'Max length must greater than min length', + )}' : '' }}}`, }, min: { @@ -53,17 +55,19 @@ export const textarea: IField = { 'x-decorator': 'FormItem', 'x-component': 'InputNumber', 'x-component-props': { - precision: 0 + precision: 0, }, 'x-reactions': { dependencies: ['.max'], fulfill: { state: { - selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t('Min length must less than max length')}' : ''}}`, + selfErrors: `{{!!$deps[0] && !!$self.value && $deps[0] < $self.value ? '${i18n.t( + 'Min length must less than max length', + )}' : ''}}`, }, }, }, }, }; - } + }, }; diff --git a/packages/core/client/src/collection-manager/interfaces/types.ts b/packages/core/client/src/collection-manager/interfaces/types.ts index f0d8664af..48245011e 100644 --- a/packages/core/client/src/collection-manager/interfaces/types.ts +++ b/packages/core/client/src/collection-manager/interfaces/types.ts @@ -9,6 +9,6 @@ interface IDefault { export interface IField extends ISchema { default?: IDefault; operators?: any[]; - filterable?: any, + filterable?: any; [key: string]: any; } diff --git a/packages/core/client/src/collection-manager/sub-table.tsx b/packages/core/client/src/collection-manager/sub-table.tsx index 32394c7be..f69ed28c4 100644 --- a/packages/core/client/src/collection-manager/sub-table.tsx +++ b/packages/core/client/src/collection-manager/sub-table.tsx @@ -8,7 +8,7 @@ import { useCollectionManager, useRecord, useRecordIndex, - useRequest + useRequest, } from '../'; import { useAPIClient } from '../api-client'; diff --git a/packages/core/client/src/collection-manager/templates/calendar.tsx b/packages/core/client/src/collection-manager/templates/calendar.tsx index 4ee7cf70d..5a51c42bf 100644 --- a/packages/core/client/src/collection-manager/templates/calendar.tsx +++ b/packages/core/client/src/collection-manager/templates/calendar.tsx @@ -51,5 +51,5 @@ export const calendar: ICollectionTemplate = { availableFieldInterfaces: { include: [], }, - configurableProperties: getConfigurableProperties('title', 'name', 'inherits','category'), + configurableProperties: getConfigurableProperties('title', 'name', 'inherits', 'category'), }; diff --git a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx index d62cf65df..b34ae66a4 100644 --- a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx +++ b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx @@ -21,7 +21,7 @@ const getInterfaceOptions = (data, type) => { return interfaceOptions.filter((v) => v.children.length > 0); }; const PreviewCom = (props) => { - const { databaseView, viewName,sources, schema } = props; + const { databaseView, viewName, sources, schema } = props; const { data: fields } = useContext(ResourceActionContext); const api = useAPIClient(); const { t } = useTranslation(); @@ -175,7 +175,7 @@ const PreviewCom = (props) => { const item = dataSource[index]; return ( handleFieldChange({ ...item, uiSchema: { ...item?.uiSchema, title: e.target.value } }, index) } diff --git a/packages/core/client/src/collection-manager/templates/expression.tsx b/packages/core/client/src/collection-manager/templates/expression.tsx index ff3720ec3..1bd9adc5a 100644 --- a/packages/core/client/src/collection-manager/templates/expression.tsx +++ b/packages/core/client/src/collection-manager/templates/expression.tsx @@ -35,9 +35,9 @@ export const expression: ICollectionTemplate = { title: '{{t("Collection")}}', 'x-component': 'CollectionSelect', 'x-component-props': { - multiple: true + multiple: true, }, - } + }, }, { name: 'expression', @@ -47,12 +47,12 @@ export const expression: ICollectionTemplate = { type: 'string', title: '{{t("Expression")}}', 'x-component': 'DynamicExpression', - } - } + }, + }, ], }, availableFieldInterfaces: { include: [], }, - configurableProperties: getConfigurableProperties('title', 'name', 'inherits','category'), + configurableProperties: getConfigurableProperties('title', 'name', 'inherits', 'category'), }; diff --git a/packages/core/client/src/collection-manager/templates/index.tsx b/packages/core/client/src/collection-manager/templates/index.tsx index ea6d12f10..2b4b8524c 100644 --- a/packages/core/client/src/collection-manager/templates/index.tsx +++ b/packages/core/client/src/collection-manager/templates/index.tsx @@ -3,4 +3,3 @@ export * from './general'; export * from './tree'; export * from './expression'; export * from './view'; - diff --git a/packages/core/client/src/document-title/index.tsx b/packages/core/client/src/document-title/index.tsx index c585e5821..0d780b858 100644 --- a/packages/core/client/src/document-title/index.tsx +++ b/packages/core/client/src/document-title/index.tsx @@ -35,11 +35,7 @@ export const DocumentTitleProvider: React.FC<{ addonBefore?: string; addonAfter? export const RemoteDocumentTitleProvider: React.FC = (props) => { const ctx = useSystemSettings(); - return ( - - {props.children} - - ); + return {props.children}; }; export const useDocumentTitle = () => { diff --git a/packages/core/client/src/filter-provider/index.ts b/packages/core/client/src/filter-provider/index.ts index d5ee52fc4..a564f40bb 100644 --- a/packages/core/client/src/filter-provider/index.ts +++ b/packages/core/client/src/filter-provider/index.ts @@ -1,3 +1,2 @@ export * from './FilterProvider'; export * from './utils'; - diff --git a/packages/core/client/src/formula/Expression.tsx b/packages/core/client/src/formula/Expression.tsx index c04316a43..3eb424466 100644 --- a/packages/core/client/src/formula/Expression.tsx +++ b/packages/core/client/src/formula/Expression.tsx @@ -6,7 +6,7 @@ import React, { useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; function pasteHtml(html, selectPastedContent = false) { - var sel, range; + let sel, range; if (window.getSelection) { // IE9 and non-IE sel = window.getSelection(); @@ -17,15 +17,15 @@ function pasteHtml(html, selectPastedContent = false) { // Range.createContextualFragment() would be useful here but is // only relatively recently standardized and is not supported in // some browsers (IE9, for one) - var el = document.createElement('div'); + const el = document.createElement('div'); el.innerHTML = html; - var frag = document.createDocumentFragment(), + let frag = document.createDocumentFragment(), node, lastNode; while ((node = el.firstChild)) { lastNode = frag.appendChild(node); } - var firstNode = frag.firstChild; + const firstNode = frag.firstChild; range.insertNode(frag); // Preserve the selection diff --git a/packages/core/client/src/index.tsx b/packages/core/client/src/index.tsx index 1e99a9427..3a92d2c1b 100644 --- a/packages/core/client/src/index.tsx +++ b/packages/core/client/src/index.tsx @@ -27,4 +27,3 @@ export * from './schema-templates'; export * from './settings-form'; export * from './system-settings'; export * from './user'; - diff --git a/packages/core/client/src/plugin-manager/index.ts b/packages/core/client/src/plugin-manager/index.ts index 74f96aa39..808e509c7 100644 --- a/packages/core/client/src/plugin-manager/index.ts +++ b/packages/core/client/src/plugin-manager/index.ts @@ -2,4 +2,3 @@ export * from './context'; export * from './PinnedPluginListProvider'; export * from './PluginManager'; export * from './PluginManagerProvider'; - diff --git a/packages/core/client/src/route-switch/antd/index.ts b/packages/core/client/src/route-switch/antd/index.ts index 8c8df6eb7..82fe22c3c 100644 --- a/packages/core/client/src/route-switch/antd/index.ts +++ b/packages/core/client/src/route-switch/antd/index.ts @@ -1,4 +1,3 @@ export * from './admin-layout'; export * from './auth-layout'; export * from './route-schema-component'; - diff --git a/packages/core/client/src/route-switch/index.tsx b/packages/core/client/src/route-switch/index.tsx index c5345bf3f..2ce865c09 100644 --- a/packages/core/client/src/route-switch/index.tsx +++ b/packages/core/client/src/route-switch/index.tsx @@ -4,4 +4,3 @@ export * from './hooks'; export * from './RouteSwitch'; export * from './RouteSwitchProvider'; export * from './types'; - diff --git a/packages/core/client/src/schema-component/antd/AntdSchemaComponentProvider.tsx b/packages/core/client/src/schema-component/antd/AntdSchemaComponentProvider.tsx index 5f4ded8f1..da6af96dc 100644 --- a/packages/core/client/src/schema-component/antd/AntdSchemaComponentProvider.tsx +++ b/packages/core/client/src/schema-component/antd/AntdSchemaComponentProvider.tsx @@ -7,5 +7,12 @@ import { requestChartData } from './g2plot/requestChartData'; export const AntdSchemaComponentProvider = (props) => { const { children } = props; - return {children}; + return ( + + {children} + + ); }; diff --git a/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx index 44703bcb7..69095b428 100644 --- a/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx @@ -6,7 +6,7 @@ import { Form, SchemaComponent, SchemaComponentProvider, - useActionContext + useActionContext, } from '@nocobase/client'; import React, { useState } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/action/demos/demo5.tsx b/packages/core/client/src/schema-component/antd/action/demos/demo5.tsx index c30457556..98660d24a 100644 --- a/packages/core/client/src/schema-component/antd/action/demos/demo5.tsx +++ b/packages/core/client/src/schema-component/antd/action/demos/demo5.tsx @@ -8,7 +8,7 @@ import { FormLayout, Input, NumberPicker, - Submit + Submit, } from '@formily/antd'; import { Select } from 'antd'; import { createForm, Field, onFieldValueChange } from '@formily/core'; @@ -62,8 +62,10 @@ function TypeSelect(props) { return ( ); @@ -163,7 +165,7 @@ const schema = { type: { type: 'string', 'x-decorator': 'FormItem', - 'x-component': TypeSelect + 'x-component': TypeSelect, }, }, }, @@ -176,7 +178,7 @@ const schema = { properties: { options: { type: 'object', - 'x-component': 'ViewOptions' + 'x-component': 'ViewOptions', }, }, }, diff --git a/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx b/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx index d6e5ac3a3..f5453684e 100644 --- a/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx +++ b/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx @@ -6,7 +6,7 @@ import { SchemaComponent, SchemaComponentProvider, SchemaInitializer, - SchemaInitializerProvider + SchemaInitializerProvider, } from '@nocobase/client'; import React from 'react'; @@ -16,7 +16,7 @@ export const AddActionButton = (props: any) => { { > ๅˆ ้™ค - +
); }; diff --git a/packages/core/client/src/schema-component/antd/block-item/index.tsx b/packages/core/client/src/schema-component/antd/block-item/index.tsx index 145fc7d91..19cf83478 100644 --- a/packages/core/client/src/schema-component/antd/block-item/index.tsx +++ b/packages/core/client/src/schema-component/antd/block-item/index.tsx @@ -1,3 +1,2 @@ export * from './BlockItem'; export * from './TestDesigner'; - diff --git a/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx b/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx index b40c66ccb..d5a772b1c 100644 --- a/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx +++ b/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx @@ -69,7 +69,7 @@ const messages: any = { showMore: (count) => i18n.t('{{count}} more items', { count }), }; -const useEvents = (dataSource: any, fieldNames: any, date: Date, view: typeof Weeks[number]) => { +const useEvents = (dataSource: any, fieldNames: any, date: Date, view: (typeof Weeks)[number]) => { const { t } = useTranslation(); return useMemo(() => { if (!Array.isArray(dataSource)) return []; @@ -118,7 +118,7 @@ const useEvents = (dataSource: any, fieldNames: any, date: Date, view: typeof We }; if (cron === 'every_week') { - let nextStart = start + const nextStart = start .clone() .year(startDate.year()) .month(startDate.month()) @@ -193,7 +193,7 @@ const CalendarRecordViewer = (props) => { export const Calendar: any = observer((props: any) => { const { dataSource, fieldNames, showLunar, fixedBlock } = useProps(props); const [date, setDate] = useState(new Date()); - const [view, setView] = useState('month'); + const [view, setView] = useState<(typeof Weeks)[number]>('month'); const events = useEvents(dataSource, fieldNames, date, view); const [visible, setVisible] = useState(false); const [record, setRecord] = useState({}); diff --git a/packages/core/client/src/schema-component/antd/calendar/context.ts b/packages/core/client/src/schema-component/antd/calendar/context.ts index ed0fd6835..ed64e7fc8 100644 --- a/packages/core/client/src/schema-component/antd/calendar/context.ts +++ b/packages/core/client/src/schema-component/antd/calendar/context.ts @@ -7,4 +7,4 @@ export const DeleteEventContext = createContext(null); export const useDeleteEvent = () => { return useContext(DeleteEventContext); -} +}; diff --git a/packages/core/client/src/schema-component/antd/calendar/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/calendar/demos/demo1.tsx index dd55494fd..c8ed69810 100644 --- a/packages/core/client/src/schema-component/antd/calendar/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/calendar/demos/demo1.tsx @@ -5,7 +5,7 @@ import { AntdSchemaComponentProvider, SchemaComponent, SchemaComponentProvider, - SchemaInitializerProvider + SchemaInitializerProvider, } from '@nocobase/client'; import React from 'react'; import defaultValues from './defaultValues'; diff --git a/packages/core/client/src/schema-component/antd/calendar/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/calendar/demos/demo2.tsx index 3f8acbc67..df706caa5 100644 --- a/packages/core/client/src/schema-component/antd/calendar/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/calendar/demos/demo2.tsx @@ -6,7 +6,7 @@ import { BlockSchemaComponentProvider, CollectionManagerProvider, SchemaComponent, - SchemaComponentProvider + SchemaComponentProvider, } from '@nocobase/client'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/calendar/utils.ts b/packages/core/client/src/schema-component/antd/calendar/utils.ts index 5fd2ea9a0..6faa66b08 100644 --- a/packages/core/client/src/schema-component/antd/calendar/utils.ts +++ b/packages/core/client/src/schema-component/antd/calendar/utils.ts @@ -21,5 +21,5 @@ export const getLunarDay = (date: moment.MomentInput) => { }; export const formatDate = (date: moment.Moment) => { - return date.format('YYYY-MM-DDTHH:mm:ss.SSSZ') -} + return date.format('YYYY-MM-DDTHH:mm:ss.SSSZ'); +}; diff --git a/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx index e7fbbfb61..ac7bf6e12 100644 --- a/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx @@ -8,7 +8,7 @@ import { Cascader, SchemaComponent, SchemaComponentProvider, - useAPIClient + useAPIClient, } from '@nocobase/client'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx b/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx index f974d0d8f..d02dac90a 100644 --- a/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx +++ b/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx @@ -1,54 +1,55 @@ -import { connect, mapReadPretty, observer } from "@formily/react"; -import { Select, SelectProps, Tag } from "antd"; -import React from "react"; -import { useTranslation } from "react-i18next"; -import { useCollectionManager } from "../../../collection-manager/hooks"; -import { useCompile } from "../../hooks"; +import { connect, mapReadPretty, observer } from '@formily/react'; +import { Select, SelectProps, Tag } from 'antd'; +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import { useCollectionManager } from '../../../collection-manager/hooks'; +import { useCompile } from '../../hooks'; export type CollectionSelectProps = SelectProps & { - filter?: (item: any, index: number, array: any[]) => boolean + filter?: (item: any, index: number, array: any[]) => boolean; }; function useOptions({ filter }: CollectionSelectProps) { const compile = useCompile(); const { collections = [] } = useCollectionManager(); const filtered = typeof filter === 'function' ? collections.filter(filter) : collections; - return filtered.filter(item => !item.hidden).map(item => ({ - label: compile(item.title), - value: item.name, - color: item.category?.color, - })); + return filtered + .filter((item) => !item.hidden) + .map((item) => ({ + label: compile(item.title), + value: item.name, + color: item.category?.color, + })); } -export const CollectionSelect = connect((props: CollectionSelectProps) => { - const { filter, ...others } = props; - const options = useOptions(props); - const { t } = useTranslation(); +export const CollectionSelect = connect( + (props: CollectionSelectProps) => { + const { filter, ...others } = props; + const options = useOptions(props); + const { t } = useTranslation(); - return ( - ; + }, + mapReadPretty( + observer((props: CollectionSelectProps) => { + const { mode } = props; + const compile = useCompile(); + const options = useOptions(props).filter((option) => { + if (mode === 'multiple') { + return (props.value ?? []).includes(option.value); + } + return props.value === option.value; + }); - return ( -
- {options.map((option) => ( - - {compile(option.label)} - - ))} -
- ); -}))); + return ( +
+ {options.map((option) => ( + + {compile(option.label)} + + ))} +
+ ); + }), + ), +); diff --git a/packages/core/client/src/schema-component/antd/cron/Cron.tsx b/packages/core/client/src/schema-component/antd/cron/Cron.tsx index 55cd5738b..81f8b3698 100644 --- a/packages/core/client/src/schema-component/antd/cron/Cron.tsx +++ b/packages/core/client/src/schema-component/antd/cron/Cron.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { connect, mapReadPretty } from '@formily/react'; import cronstrue from 'cronstrue'; -import React, { useMemo } from 'react'; +import React, { useMemo } from 'react'; import { Cron as ReactCron, CronProps } from 'react-js-cron'; import { useAPIClient } from '../../../api-client'; import 'react-js-cron/dist/styles.css'; @@ -44,17 +44,13 @@ const ReadPretty = (props) => { return cronstrue.toString(props.value, { locale, use24HourTimeFormat: true, - }) + }); } catch { - console.error(`The '${props.value}' is not a valid cron expression`) - return props.value + console.error(`The '${props.value}' is not a valid cron expression`); + return props.value; } - }, [props.value]) - return props.value ? ( - - {value} - - ) : null; + }, [props.value]); + return props.value ? {value} : null; }; export const Cron = connect(Input, mapReadPretty(ReadPretty)) as unknown as typeof Input & { diff --git a/packages/core/client/src/schema-component/antd/cron/CronSet.tsx b/packages/core/client/src/schema-component/antd/cron/CronSet.tsx index e4870686d..73075c6de 100644 --- a/packages/core/client/src/schema-component/antd/cron/CronSet.tsx +++ b/packages/core/client/src/schema-component/antd/cron/CronSet.tsx @@ -64,7 +64,14 @@ const CronSetInternal = (props: CronSetProps) => { return (
- {isCustomize ? onCronChange(v, true)} allowedDropdowns={['period', 'week-days', 'months', 'month-days']} allowedPeriods={['year', 'month', 'week', 'day', ]} /> : null} + {isCustomize ? ( + onCronChange(v, true)} + allowedDropdowns={['period', 'week-days', 'months', 'month-days']} + allowedPeriods={['year', 'month', 'week', 'day']} + /> + ) : null}
); }; @@ -84,7 +91,11 @@ const ReadPretty = (props: CronSetProps) => { return value && options?.find((o) => o.value === value)?.label; }, [options, value]); - return {value && (label ? compile(label) : )}; + return ( + + {value && (label ? compile(label) : )} + + ); }; export const CronSet = connect(CronSetInternal, mapReadPretty(ReadPretty)); diff --git a/packages/core/client/src/schema-component/antd/cron/locale/zh-CN.ts b/packages/core/client/src/schema-component/antd/cron/locale/zh-CN.ts index 96c338dbc..06adaee31 100644 --- a/packages/core/client/src/schema-component/antd/cron/locale/zh-CN.ts +++ b/packages/core/client/src/schema-component/antd/cron/locale/zh-CN.ts @@ -76,4 +76,4 @@ export default { 'ๅไธ€ๆœˆ', 'ๅไบŒๆœˆ', ], -} +}; diff --git a/packages/core/client/src/schema-component/antd/date-picker/DatePicker.tsx b/packages/core/client/src/schema-component/antd/date-picker/DatePicker.tsx index b3bf0dfbd..8e6280178 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/DatePicker.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/DatePicker.tsx @@ -2,7 +2,7 @@ import { connect, mapProps, mapReadPretty } from '@formily/react'; import { DatePicker as AntdDatePicker } from 'antd'; import type { DatePickerProps as AntdDatePickerProps, - RangePickerProps as AntdRangePickerProps + RangePickerProps as AntdRangePickerProps, } from 'antd/lib/date-picker'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx index 6b100dfbe..3ecebd3b5 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx @@ -3,7 +3,7 @@ import { isArr } from '@formily/shared'; import { getDefaultFormat, str2moment } from '@nocobase/utils/client'; import type { DatePickerProps as AntdDatePickerProps, - RangePickerProps as AntdRangePickerProps + RangePickerProps as AntdRangePickerProps, } from 'antd/lib/date-picker'; import cls from 'classnames'; import moment from 'moment'; diff --git a/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx b/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx index d35f67c7f..751292aff 100644 --- a/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx +++ b/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx @@ -1,8 +1,4 @@ -import { - AntdSchemaComponentProvider, - FilterAction, SchemaComponent, - SchemaComponentProvider -} from '@nocobase/client'; +import { AntdSchemaComponentProvider, FilterAction, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; import React from 'react'; const schema: any = { diff --git a/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx index 54a250215..c2db39fcb 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx @@ -7,7 +7,7 @@ import { CollectionManagerProvider, SchemaComponent, SchemaComponentProvider, - useFormBlockContext + useFormBlockContext, } from '@nocobase/client'; import React from 'react'; import collections from './collections'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx index 205032654..48dba7f66 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx @@ -9,7 +9,7 @@ import { SchemaComponent, SchemaComponentProvider, useFilterByTk, - useFormBlockContext + useFormBlockContext, } from '@nocobase/client'; import React from 'react'; import collections from './collections'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx index bed4cc87b..784b9ce9c 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx @@ -7,7 +7,7 @@ import { CollectionManagerProvider, RecordProvider, SchemaComponent, - SchemaComponentProvider + SchemaComponentProvider, } from '@nocobase/client'; import React from 'react'; import collections from './collections'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/index.ts b/packages/core/client/src/schema-component/antd/form-v2/index.ts index 612407210..7b0aef196 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/index.ts +++ b/packages/core/client/src/schema-component/antd/form-v2/index.ts @@ -8,4 +8,3 @@ FormV2.ReadPrettyDesigner = ReadPrettyFormDesigner; export * from './FormField'; export { FormV2, DetailsDesigner }; - diff --git a/packages/core/client/src/schema-component/antd/form-v2/utils.tsx b/packages/core/client/src/schema-component/antd/form-v2/utils.tsx index 67df5a7f2..3a3c9bd7b 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/utils.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/utils.tsx @@ -61,8 +61,7 @@ export const linkageMergeAction = ({ operator, value }, field, condition, values try { const result = evaluate(value.result || value.value, { ...scope, now: () => new Date().toString() }); valueResult.push(result); - } catch (error) { - } + } catch (error) {} } else if (value?.mode === 'constant') { valueResult.push(value?.value || value); } else { diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx index e41c45d2f..c7494e0d4 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx @@ -6,7 +6,7 @@ import { Form, SchemaComponent, SchemaComponentProvider, - useAPIClient + useAPIClient, } from '@nocobase/client'; import { Card, Space } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx index c8bb72fdd..717c5e1c3 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx @@ -6,7 +6,7 @@ import { SchemaComponentProvider, useActionContext, useCloseAction, - useRequest + useRequest, } from '@nocobase/client'; import { Button } from 'antd'; import React, { useEffect, useState } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/g2plot/G2PlotDesigner.tsx b/packages/core/client/src/schema-component/antd/g2plot/G2PlotDesigner.tsx index aec0ee646..9ccefaca8 100644 --- a/packages/core/client/src/schema-component/antd/g2plot/G2PlotDesigner.tsx +++ b/packages/core/client/src/schema-component/antd/g2plot/G2PlotDesigner.tsx @@ -78,7 +78,7 @@ export const G2PlotDesigner = () => { if (typeof fn === 'function') { const result = fn.bind({ api })(); if (result?.then) { - result.then(data => { + result.then((data) => { if (Array.isArray(data)) { field.componentProps.config.data = data; } diff --git a/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx b/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx index 98707f68b..df69c8148 100644 --- a/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx @@ -61,7 +61,7 @@ export const GanttDesigner = () => { /> { dn.refresh(); }} /> - = ({ const getCalendarValuesForWeek = () => { const topValues: ReactChild[] = []; const bottomValues: ReactChild[] = []; - let weeksCount: number = 1; + let weeksCount = 1; const topDefaultHeight = headerHeight * 0.5; const dates = dateSetup.dates; for (let i = dates.length - 1; i >= 0; i--) { diff --git a/packages/core/client/src/schema-component/antd/gantt/components/calendar/top-part-of-calendar.tsx b/packages/core/client/src/schema-component/antd/gantt/components/calendar/top-part-of-calendar.tsx index 56237afe1..cf4cf82a8 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/calendar/top-part-of-calendar.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/calendar/top-part-of-calendar.tsx @@ -1,8 +1,7 @@ -import React from "react"; +import React from 'react'; import { cx } from '@emotion/css'; import { calendarTopTick, calendarTopText } from './style'; - type TopPartOfCalendarProps = { value: string; x1Line: number; @@ -22,20 +21,8 @@ export const TopPartOfCalendar: React.FC = ({ }) => { return ( - - + + {value} diff --git a/packages/core/client/src/schema-component/antd/gantt/components/gantt/style.tsx b/packages/core/client/src/schema-component/antd/gantt/components/gantt/style.tsx index cb74f8b5b..3e6c37955 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/gantt/style.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/gantt/style.tsx @@ -5,7 +5,7 @@ export const ganttVerticalContainer = css` font-size: 0; margin: 0; padding: 0; - width:100%; + width: 100%; border-left: 2px solid #f4f2f2; `; diff --git a/packages/core/client/src/schema-component/antd/gantt/components/grid/grid.tsx b/packages/core/client/src/schema-component/antd/gantt/components/grid/grid.tsx index 488cfa3fe..63ab7049c 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/grid/grid.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/grid/grid.tsx @@ -1,8 +1,8 @@ -import React from "react"; -import { GridBody, GridBodyProps } from "./grid-body"; +import React from 'react'; +import { GridBody, GridBodyProps } from './grid-body'; export type GridProps = GridBodyProps; -export const Grid: React.FC = props => { +export const Grid: React.FC = (props) => { return ( diff --git a/packages/core/client/src/schema-component/antd/gantt/components/grid/style.tsx b/packages/core/client/src/schema-component/antd/gantt/components/grid/style.tsx index 908cdf291..41be8a085 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/grid/style.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/grid/style.tsx @@ -10,7 +10,7 @@ export const gridHeightRow = css` export const gridRowLine = css` stroke: #f0f0f0; - stroke-width:0; + stroke-width: 0; border-bottom: 1px solid #f0f0f0; `; diff --git a/packages/core/client/src/schema-component/antd/gantt/components/other/arrow.tsx b/packages/core/client/src/schema-component/antd/gantt/components/other/arrow.tsx index 52e8f28b4..e21fb10e3 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/other/arrow.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/other/arrow.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import { BarTask } from "../../types/bar-task"; +import React from 'react'; +import { BarTask } from '../../types/bar-task'; type ArrowProps = { taskFrom: BarTask; @@ -9,32 +9,13 @@ type ArrowProps = { arrowIndent: number; rtl: boolean; }; -export const Arrow: React.FC = ({ - taskFrom, - taskTo, - rowHeight, - taskHeight, - arrowIndent, - rtl, -}) => { +export const Arrow: React.FC = ({ taskFrom, taskTo, rowHeight, taskHeight, arrowIndent, rtl }) => { let path: string; let trianglePoints: string; if (rtl) { - [path, trianglePoints] = drownPathAndTriangleRTL( - taskFrom, - taskTo, - rowHeight, - taskHeight, - arrowIndent - ); + [path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent); } else { - [path, trianglePoints] = drownPathAndTriangle( - taskFrom, - taskTo, - rowHeight, - taskHeight, - arrowIndent - ); + [path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent); } return ( @@ -50,17 +31,14 @@ const drownPathAndTriangle = ( taskTo: BarTask, rowHeight: number, taskHeight: number, - arrowIndent: number + arrowIndent: number, ) => { const indexCompare = taskFrom.index > taskTo.index ? -1 : 1; const taskToEndPosition = taskTo.y + taskHeight / 2; const taskFromEndPosition = taskFrom.x2 + arrowIndent * 2; - const taskFromHorizontalOffsetValue = - taskFromEndPosition < taskTo.x1 ? "" : `H ${taskTo.x1 - arrowIndent}`; + const taskFromHorizontalOffsetValue = taskFromEndPosition < taskTo.x1 ? '' : `H ${taskTo.x1 - arrowIndent}`; const taskToHorizontalOffsetValue = - taskFromEndPosition > taskTo.x1 - ? arrowIndent - : taskTo.x1 - taskFrom.x2 - arrowIndent; + taskFromEndPosition > taskTo.x1 ? arrowIndent : taskTo.x1 - taskFrom.x2 - arrowIndent; const path = `M ${taskFrom.x2} ${taskFrom.y + taskHeight / 2} h ${arrowIndent} @@ -80,17 +58,14 @@ const drownPathAndTriangleRTL = ( taskTo: BarTask, rowHeight: number, taskHeight: number, - arrowIndent: number + arrowIndent: number, ) => { const indexCompare = taskFrom.index > taskTo.index ? -1 : 1; const taskToEndPosition = taskTo.y + taskHeight / 2; const taskFromEndPosition = taskFrom.x1 - arrowIndent * 2; - const taskFromHorizontalOffsetValue = - taskFromEndPosition > taskTo.x2 ? "" : `H ${taskTo.x2 + arrowIndent}`; + const taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? '' : `H ${taskTo.x2 + arrowIndent}`; const taskToHorizontalOffsetValue = - taskFromEndPosition < taskTo.x2 - ? -arrowIndent - : taskTo.x2 - taskFrom.x1 + arrowIndent; + taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent; const path = `M ${taskFrom.x1} ${taskFrom.y + taskHeight / 2} h ${-arrowIndent} diff --git a/packages/core/client/src/schema-component/antd/gantt/components/other/horizontal-scroll.tsx b/packages/core/client/src/schema-component/antd/gantt/components/other/horizontal-scroll.tsx index 9f9abb881..a6f75bc6e 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/other/horizontal-scroll.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/other/horizontal-scroll.tsx @@ -1,6 +1,6 @@ -import React, { SyntheticEvent, useRef, useEffect } from "react"; +import React, { SyntheticEvent, useRef, useEffect } from 'react'; import { cx } from '@emotion/css'; -import {scrollWrapper,horizontalScroll} from './style' +import { scrollWrapper, horizontalScroll } from './style'; export const HorizontalScroll: React.FC<{ scroll: number; @@ -21,15 +21,13 @@ export const HorizontalScroll: React.FC<{
-
+
); }; diff --git a/packages/core/client/src/schema-component/antd/gantt/components/other/style.tsx b/packages/core/client/src/schema-component/antd/gantt/components/other/style.tsx index 6a995f11a..1b330aa08 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/other/style.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/other/style.tsx @@ -18,7 +18,7 @@ export const scrollWrapper = css` } &::-webkit-scrollbar-thumb { border: 5px solid transparent; - background: #5c5858cc; + background: #5c5858cc; border-radius: 10px; background-clip: padding-box; } diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-display.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-display.tsx index a43e5b6d5..3e3ce858f 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-display.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-display.tsx @@ -1,5 +1,5 @@ import { cx } from '@emotion/css'; -import React from "react"; +import React from 'react'; import { barBackground } from './style'; type BarDisplayProps = { diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-small.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-small.tsx index 2cf3ac0dc..863bf26f6 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-small.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar-small.tsx @@ -1,12 +1,11 @@ -import React from "react"; +import React from 'react'; import { cx } from '@emotion/css'; -import { getProgressPoint } from "../../../helpers/bar-helper"; -import { BarDisplay } from "./bar-display"; -import { BarProgressHandle } from "./bar-progress-handle"; -import { TaskItemProps } from "../task-item"; +import { getProgressPoint } from '../../../helpers/bar-helper'; +import { BarDisplay } from './bar-display'; +import { BarProgressHandle } from './bar-progress-handle'; +import { TaskItemProps } from '../task-item'; import { barWrapper } from './style'; - export const BarSmall: React.FC = ({ task, isProgressChangeable, @@ -14,11 +13,7 @@ export const BarSmall: React.FC = ({ onEventStart, isSelected, }) => { - const progressPoint = getProgressPoint( - task.progressWidth + task.x1+10, - task.y, - task.height - ); + const progressPoint = getProgressPoint(task.progressWidth + task.x1 + 10, task.y, task.height); return ( = ({ barCornerRadius={task.barCornerRadius} styles={task.styles} isSelected={isSelected} - onMouseDown={e => { - isDateChangeable && onEventStart("move", task, e); + onMouseDown={(e) => { + isDateChangeable && onEventStart('move', task, e); }} /> {isProgressChangeable && ( { - onEventStart("progress", task, e); + onMouseDown={(e) => { + onEventStart('progress', task, e); }} /> )} diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar.tsx index f3255c03a..b6b6b7a33 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/bar.tsx @@ -1,13 +1,12 @@ import { cx } from '@emotion/css'; -import React from "react"; -import { getProgressPoint } from "../../../helpers/bar-helper"; -import { TaskItemProps } from "../task-item"; -import { BarDateHandle } from "./bar-date-handle"; -import { BarDisplay } from "./bar-display"; -import { BarProgressHandle } from "./bar-progress-handle"; +import React from 'react'; +import { getProgressPoint } from '../../../helpers/bar-helper'; +import { TaskItemProps } from '../task-item'; +import { BarDateHandle } from './bar-date-handle'; +import { BarDisplay } from './bar-display'; +import { BarProgressHandle } from './bar-progress-handle'; import { barWrapper } from './style'; - export const Bar: React.FC = ({ task, isProgressChangeable, @@ -16,11 +15,7 @@ export const Bar: React.FC = ({ onEventStart, isSelected, }) => { - const progressPoint = getProgressPoint( - +!rtl * task.progressWidth + task.progressX, - task.y, - task.height - ); + const progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height); const handleHeight = task.height - 2; return ( @@ -35,8 +30,8 @@ export const Bar: React.FC = ({ barCornerRadius={task.barCornerRadius} styles={task.styles} isSelected={isSelected} - onMouseDown={e => { - isDateChangeable && onEventStart("move", task, e); + onMouseDown={(e) => { + isDateChangeable && onEventStart('move', task, e); }} /> @@ -49,8 +44,8 @@ export const Bar: React.FC = ({ width={task.handleWidth} height={handleHeight} barCornerRadius={task.barCornerRadius} - onMouseDown={e => { - onEventStart("start", task, e); + onMouseDown={(e) => { + onEventStart('start', task, e); }} /> {/* right */} @@ -60,8 +55,8 @@ export const Bar: React.FC = ({ width={task.handleWidth} height={handleHeight} barCornerRadius={task.barCornerRadius} - onMouseDown={e => { - onEventStart("end", task, e); + onMouseDown={(e) => { + onEventStart('end', task, e); }} /> @@ -69,8 +64,8 @@ export const Bar: React.FC = ({ {isProgressChangeable && ( { - onEventStart("progress", task, e); + onMouseDown={(e) => { + onEventStart('progress', task, e); }} /> )} diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/style.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/style.tsx index da5335ad5..60b9e524a 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/style.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/bar/style.tsx @@ -3,7 +3,7 @@ import { css } from '@emotion/css'; export const barWrapper = css` cursor: pointer; outline: none; - .barHandle{ + .barHandle { fill: #ddd; cursor: ew-resize; opacity: 0; @@ -15,9 +15,8 @@ export const barWrapper = css` } `; - export const barBackground = css` user-select: none; stroke-width: 0; - opacity: .6; + opacity: 0.6; `; diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/milestone.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/milestone.tsx index 07a8f9381..5c24c40dc 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/milestone.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/milestone.tsx @@ -1,20 +1,13 @@ -import React from "react"; +import React from 'react'; import { cx } from '@emotion/css'; -import { TaskItemProps } from "../task-item"; -import { milestoneWrapper,milestoneBackground } from './style'; +import { TaskItemProps } from '../task-item'; +import { milestoneWrapper, milestoneBackground } from './style'; -export const Milestone: React.FC = ({ - task, - isDateChangeable, - onEventStart, - isSelected, -}) => { +export const Milestone: React.FC = ({ task, isDateChangeable, onEventStart, isSelected }) => { const transform = `rotate(45 ${task.x1 + task.height * 0.356} ${task.y + task.height * 0.85})`; const getBarColor = () => { - return isSelected - ? task.styles.backgroundSelectedColor - : task.styles.backgroundColor; + return isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor; }; return ( @@ -29,8 +22,8 @@ export const Milestone: React.FC = ({ ry={task.barCornerRadius} transform={transform} className={cx(milestoneBackground)} - onMouseDown={e => { - isDateChangeable && onEventStart("move", task, e); + onMouseDown={(e) => { + isDateChangeable && onEventStart('move', task, e); }} /> diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/style.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/style.tsx index 04d2a6891..87aabb5f5 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/style.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/milestone/style.tsx @@ -1,11 +1,10 @@ - import { css } from '@emotion/css'; -export const milestoneWrapper =css` +export const milestoneWrapper = css` cursor: pointer; outline: none; -` +`; -export const milestoneBackground =css` +export const milestoneBackground = css` user-select: none; -` +`; diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/project/style.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/project/style.tsx index 44bb420e2..3d1fb2c14 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/project/style.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/project/style.tsx @@ -1,16 +1,15 @@ - import { css } from '@emotion/css'; -export const projectWrapper =css ` +export const projectWrapper = css` cursor: pointer; outline: none; -` +`; -export const projectBackground =css` +export const projectBackground = css` user-select: none; opacity: 0.6; -` +`; -export const projectTop =css` +export const projectTop = css` user-select: none; -` +`; diff --git a/packages/core/client/src/schema-component/antd/gantt/components/task-item/style.tsx b/packages/core/client/src/schema-component/antd/gantt/components/task-item/style.tsx index 8dda01f50..052294204 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/task-item/style.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/task-item/style.tsx @@ -1,7 +1,6 @@ - import { css } from '@emotion/css'; -export const barLabel =css` +export const barLabel = css` fill: #fff; text-anchor: middle; font-weight: 400; @@ -12,8 +11,8 @@ export const barLabel =css` -ms-user-select: none; user-select: none; pointer-events: none; -` -export const projectLabel =css` +`; +export const projectLabel = css` fill: #130d0d; font-weight: 500; font-size: 0.9em; @@ -24,8 +23,8 @@ export const projectLabel =css` -ms-user-select: none; user-select: none; pointer-events: none; -` -export const barLabelOutside =css` +`; +export const barLabelOutside = css` fill: #555; text-anchor: start; -webkit-touch-callout: none; @@ -34,4 +33,4 @@ export const barLabelOutside =css` -ms-user-select: none; user-select: none; pointer-events: none; -` +`; diff --git a/packages/core/client/src/schema-component/antd/gantt/context.ts b/packages/core/client/src/schema-component/antd/gantt/context.ts index 10b2f3277..4d7df9521 100644 --- a/packages/core/client/src/schema-component/antd/gantt/context.ts +++ b/packages/core/client/src/schema-component/antd/gantt/context.ts @@ -3,4 +3,3 @@ import { createContext, useContext } from 'react'; // export const GanttToolbarContext = createContext(null); export const CalendarContext = createContext(null); export const DeleteEventContext = createContext(null); - diff --git a/packages/core/client/src/schema-component/antd/gantt/helpers/bar-helper.ts b/packages/core/client/src/schema-component/antd/gantt/helpers/bar-helper.ts index 653236de9..43b07dc33 100644 --- a/packages/core/client/src/schema-component/antd/gantt/helpers/bar-helper.ts +++ b/packages/core/client/src/schema-component/antd/gantt/helpers/bar-helper.ts @@ -167,7 +167,7 @@ const convertToBar = ( const [progressWidth, progressX] = progressWithByParams(x1, x2, task.progress, rtl); const y = task.type === 'project' - ? taskYCoordinate(index, rowHeight, taskHeight) +8 + ? taskYCoordinate(index, rowHeight, taskHeight) + 8 : taskYCoordinate(index, rowHeight, taskHeight); const hideChildren = task.type === 'project' ? task.hideChildren : undefined; diff --git a/packages/core/client/src/schema-component/antd/gantt/helpers/date-helper.ts b/packages/core/client/src/schema-component/antd/gantt/helpers/date-helper.ts index 6602ffa2d..8b478d3aa 100644 --- a/packages/core/client/src/schema-component/antd/gantt/helpers/date-helper.ts +++ b/packages/core/client/src/schema-component/antd/gantt/helpers/date-helper.ts @@ -55,7 +55,7 @@ export const startOfDate = (date: Date, scale: DateHelperScales) => { export const ganttDateRange = (tasks: Task[], viewMode: ViewMode, preStepsCount: number) => { let newStartDate: Date = tasks[0]?.start || new Date(); - let newEndDate: Date = tasks[0]?.start || new Date() ; + let newEndDate: Date = tasks[0]?.start || new Date(); for (const task of tasks) { if (task.start < newStartDate) { newStartDate = task.start; diff --git a/packages/core/client/src/schema-component/antd/gantt/helpers/other-helper.ts b/packages/core/client/src/schema-component/antd/gantt/helpers/other-helper.ts index 420f8c9c8..5f475549d 100644 --- a/packages/core/client/src/schema-component/antd/gantt/helpers/other-helper.ts +++ b/packages/core/client/src/schema-component/antd/gantt/helpers/other-helper.ts @@ -36,7 +36,7 @@ function getChildren(taskList: Task[], task: Task) { } else { tasks = taskList.filter((t) => t.project && t.project === task.id); } - var taskChildren: Task[] = []; + const taskChildren: Task[] = []; tasks.forEach((t) => { taskChildren.push(...getChildren(taskList, t)); }); diff --git a/packages/core/client/src/schema-component/antd/gantt/index.ts b/packages/core/client/src/schema-component/antd/gantt/index.ts index 01b30a830..ef34ff792 100644 --- a/packages/core/client/src/schema-component/antd/gantt/index.ts +++ b/packages/core/client/src/schema-component/antd/gantt/index.ts @@ -2,7 +2,7 @@ import { ActionBar } from '../action'; import { Gantt } from './components/gantt/gantt'; import { GanttDesigner } from './Gantt.Designer'; import { ViewMode } from './types/public-types'; -import {Event} from './components/gantt/Event'; +import { Event } from './components/gantt/Event'; Gantt.ActionBar = ActionBar; diff --git a/packages/core/client/src/schema-component/antd/gantt/test/date-helper.test.tsx b/packages/core/client/src/schema-component/antd/gantt/test/date-helper.test.tsx index c90f239d7..4742c3680 100644 --- a/packages/core/client/src/schema-component/antd/gantt/test/date-helper.test.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/test/date-helper.test.tsx @@ -1,15 +1,9 @@ -import { - seedDates, - addToDate, - getWeekNumberISO8601, -} from "../helpers/date-helper"; -import { ViewMode } from "../types/public-types"; +import { seedDates, addToDate, getWeekNumberISO8601 } from '../helpers/date-helper'; +import { ViewMode } from '../types/public-types'; -describe("seed date", () => { - test("daily", () => { - expect( - seedDates(new Date(2020, 5, 28), new Date(2020, 6, 2), ViewMode.Day) - ).toEqual([ +describe('seed date', () => { + test('daily', () => { + expect(seedDates(new Date(2020, 5, 28), new Date(2020, 6, 2), ViewMode.Day)).toEqual([ new Date(2020, 5, 28), new Date(2020, 5, 29), new Date(2020, 5, 30), @@ -18,10 +12,8 @@ describe("seed date", () => { ]); }); - test("weekly", () => { - expect( - seedDates(new Date(2020, 5, 28), new Date(2020, 6, 19), ViewMode.Week) - ).toEqual([ + test('weekly', () => { + expect(seedDates(new Date(2020, 5, 28), new Date(2020, 6, 19), ViewMode.Week)).toEqual([ new Date(2020, 5, 28), new Date(2020, 6, 5), new Date(2020, 6, 12), @@ -29,20 +21,15 @@ describe("seed date", () => { ]); }); - test("monthly", () => { - expect( - seedDates(new Date(2020, 5, 28), new Date(2020, 6, 19), ViewMode.Month) - ).toEqual([new Date(2020, 5, 28), new Date(2020, 6, 28)]); + test('monthly', () => { + expect(seedDates(new Date(2020, 5, 28), new Date(2020, 6, 19), ViewMode.Month)).toEqual([ + new Date(2020, 5, 28), + new Date(2020, 6, 28), + ]); }); - test("quarterly", () => { - expect( - seedDates( - new Date(2020, 5, 28), - new Date(2020, 5, 29), - ViewMode.QuarterDay - ) - ).toEqual([ + test('quarterly', () => { + expect(seedDates(new Date(2020, 5, 28), new Date(2020, 5, 29), ViewMode.QuarterDay)).toEqual([ new Date(2020, 5, 28, 0, 0), new Date(2020, 5, 28, 6, 0), new Date(2020, 5, 28, 12, 0), @@ -52,22 +39,18 @@ describe("seed date", () => { }); }); -describe("add to date", () => { - test("add month", () => { - expect(addToDate(new Date(2020, 0, 1), 40, "month")).toEqual( - new Date(2023, 4, 1) - ); +describe('add to date', () => { + test('add month', () => { + expect(addToDate(new Date(2020, 0, 1), 40, 'month')).toEqual(new Date(2023, 4, 1)); }); - test("add day", () => { - expect(addToDate(new Date(2020, 0, 1), 40, "day")).toEqual( - new Date(2020, 1, 10) - ); + test('add day', () => { + expect(addToDate(new Date(2020, 0, 1), 40, 'day')).toEqual(new Date(2020, 1, 10)); }); }); -test("get week number", () => { - expect(getWeekNumberISO8601(new Date(2019, 11, 31))).toEqual("01"); - expect(getWeekNumberISO8601(new Date(2021, 0, 1))).toEqual("53"); - expect(getWeekNumberISO8601(new Date(2020, 6, 20))).toEqual("30"); +test('get week number', () => { + expect(getWeekNumberISO8601(new Date(2019, 11, 31))).toEqual('01'); + expect(getWeekNumberISO8601(new Date(2021, 0, 1))).toEqual('53'); + expect(getWeekNumberISO8601(new Date(2020, 6, 20))).toEqual('30'); }); diff --git a/packages/core/client/src/schema-component/antd/gantt/test/gant.test.tsx b/packages/core/client/src/schema-component/antd/gantt/test/gant.test.tsx index 75b2e2142..19ff84f28 100644 --- a/packages/core/client/src/schema-component/antd/gantt/test/gant.test.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/test/gant.test.tsx @@ -1,10 +1,10 @@ -import React from "react"; -import { createRoot } from "react-dom/client"; -import { Gantt } from "../index"; +import React from 'react'; +import { createRoot } from 'react-dom/client'; +import { Gantt } from '../index'; -describe("gantt", () => { - it("renders without crashing", () => { - const div = document.createElement("div"); +describe('gantt', () => { + it('renders without crashing', () => { + const div = document.createElement('div'); const root = createRoot(div); root.render( { { start: new Date(2020, 0, 1), end: new Date(2020, 2, 2), - name: "Redesign website", - id: "Task 0", + name: 'Redesign website', + id: 'Task 0', progress: 45, - type: "task", + type: 'task', }, ]} - /> + />, ); }); }); diff --git a/packages/core/client/src/schema-component/antd/gantt/types/bar-task.ts b/packages/core/client/src/schema-component/antd/gantt/types/bar-task.ts index 126079d4c..c3689ebbf 100644 --- a/packages/core/client/src/schema-component/antd/gantt/types/bar-task.ts +++ b/packages/core/client/src/schema-component/antd/gantt/types/bar-task.ts @@ -1,4 +1,4 @@ -import { Task, TaskType } from "./public-types"; +import { Task, TaskType } from './public-types'; export interface BarTask extends Task { index: number; @@ -21,4 +21,4 @@ export interface BarTask extends Task { }; } -export type TaskTypeInternal = TaskType | "smalltask"; +export type TaskTypeInternal = TaskType | 'smalltask'; diff --git a/packages/core/client/src/schema-component/antd/gantt/types/date-setup.ts b/packages/core/client/src/schema-component/antd/gantt/types/date-setup.ts index 81115ece0..663053010 100644 --- a/packages/core/client/src/schema-component/antd/gantt/types/date-setup.ts +++ b/packages/core/client/src/schema-component/antd/gantt/types/date-setup.ts @@ -1,4 +1,4 @@ -import { ViewMode } from "./public-types"; +import { ViewMode } from './public-types'; export interface DateSetup { dates: Date[]; diff --git a/packages/core/client/src/schema-component/antd/gantt/types/gantt-task-actions.ts b/packages/core/client/src/schema-component/antd/gantt/types/gantt-task-actions.ts index 01e1292cb..8d4a202b7 100644 --- a/packages/core/client/src/schema-component/antd/gantt/types/gantt-task-actions.ts +++ b/packages/core/client/src/schema-component/antd/gantt/types/gantt-task-actions.ts @@ -1,14 +1,14 @@ -import { BarTask } from "./bar-task"; +import { BarTask } from './bar-task'; -export type BarMoveAction = "progress" | "end" | "start" | "move"; +export type BarMoveAction = 'progress' | 'end' | 'start' | 'move'; export type GanttContentMoveAction = - | "mouseenter" - | "mouseleave" - | "delete" - | "dblclick" - | "click" - | "select" - | "" + | 'mouseenter' + | 'mouseleave' + | 'delete' + | 'dblclick' + | 'click' + | 'select' + | '' | BarMoveAction; export type GanttEvent = { diff --git a/packages/core/client/src/schema-component/antd/gantt/types/public-types.ts b/packages/core/client/src/schema-component/antd/gantt/types/public-types.ts index 9ae7a29df..845387443 100644 --- a/packages/core/client/src/schema-component/antd/gantt/types/public-types.ts +++ b/packages/core/client/src/schema-component/antd/gantt/types/public-types.ts @@ -1,15 +1,15 @@ export enum ViewMode { - Hour = "hour", - QuarterDay = "quarterDay", - HalfDay = "halfDay", - Day = "day", + Hour = 'hour', + QuarterDay = 'quarterDay', + HalfDay = 'halfDay', + Day = 'day', /** ISO-8601 week */ - Week = "week", - Month = "month", - QuarterYear = "quarterYear", - Year = "year", + Week = 'week', + Month = 'month', + QuarterYear = 'quarterYear', + Year = 'year', } -export type TaskType = "task" | "milestone" | "project"; +export type TaskType = 'task' | 'milestone' | 'project'; export interface Task { id: string; type: TaskType; @@ -53,17 +53,11 @@ export interface EventOption { /** * Invokes on end and start time change. Chart undoes operation if method return false or error. */ - onDateChange?: ( - task: Task, - children: Task[] - ) => void | boolean | Promise | Promise; + onDateChange?: (task: Task, children: Task[]) => void | boolean | Promise | Promise; /** * Invokes on progress change. Chart undoes operation if method return false or error. */ - onProgressChange?: ( - task: Task, - children: Task[] - ) => void | boolean | Promise | Promise; + onProgressChange?: (task: Task, children: Task[]) => void | boolean | Promise | Promise; /** * Invokes on delete selected task. Chart undoes operation if method return false or error. */ diff --git a/packages/core/client/src/schema-component/antd/grid/Grid.tsx b/packages/core/client/src/schema-component/antd/grid/Grid.tsx index 31d2e2593..af2afd3e1 100644 --- a/packages/core/client/src/schema-component/antd/grid/Grid.tsx +++ b/packages/core/client/src/schema-component/antd/grid/Grid.tsx @@ -105,8 +105,14 @@ const ColDivider = (props) => { prevSchema['x-component-props'] = prevSchema['x-component-props'] || {}; nextSchema['x-component-props'] = nextSchema['x-component-props'] || {}; const dividerWidth = (el.clientWidth * (props.cols.length + 1)) / props.cols.length; - const preWidth = ((100 * (prev.getBoundingClientRect().width + dividerWidth)) / el.parentElement.clientWidth).toFixed(2); - const nextWidth = ((100 * (next.getBoundingClientRect().width + dividerWidth)) / el.parentElement.clientWidth).toFixed(2); + const preWidth = ( + (100 * (prev.getBoundingClientRect().width + dividerWidth)) / + el.parentElement.clientWidth + ).toFixed(2); + const nextWidth = ( + (100 * (next.getBoundingClientRect().width + dividerWidth)) / + el.parentElement.clientWidth + ).toFixed(2); prevSchema['x-component-props']['width'] = preWidth; nextSchema['x-component-props']['width'] = nextWidth; diff --git a/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx index 32775003a..179f9825b 100644 --- a/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx @@ -8,7 +8,7 @@ import { Markdown, SchemaComponent, SchemaComponentProvider, - SchemaInitializerProvider + SchemaInitializerProvider, } from '@nocobase/client'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx index 055c1bd98..5a450685b 100644 --- a/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx @@ -1,12 +1,13 @@ import { ISchema } from '@formily/react'; import { uid } from '@formily/shared'; import { - CardItem, Grid, + CardItem, + Grid, Markdown, SchemaComponent, SchemaComponentProvider, SchemaInitializer, - SchemaInitializerProvider + SchemaInitializerProvider, } from '@nocobase/client'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/grid/index.tsx b/packages/core/client/src/schema-component/antd/grid/index.tsx index 17fa0f85f..d50807e89 100644 --- a/packages/core/client/src/schema-component/antd/grid/index.tsx +++ b/packages/core/client/src/schema-component/antd/grid/index.tsx @@ -1,3 +1,2 @@ export * from './Block'; export * from './Grid'; - diff --git a/packages/core/client/src/schema-component/antd/index.ts b/packages/core/client/src/schema-component/antd/index.ts index e9ecf2197..2bd743262 100644 --- a/packages/core/client/src/schema-component/antd/index.ts +++ b/packages/core/client/src/schema-component/antd/index.ts @@ -40,5 +40,5 @@ export * from './time-picker'; export * from './tree-select'; export * from './upload'; export * from './variable'; -export * from './gantt' +export * from './gantt'; import './index.less'; diff --git a/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx b/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx index 7a5004592..03ec36ead 100644 --- a/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx +++ b/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx @@ -9,7 +9,7 @@ export const InputNumber = connect((props) => { const handleChange = (v) => { onChange(parseFloat(v)); }; - return ; + return ; }, mapReadPretty(ReadPretty)); export default InputNumber; diff --git a/packages/core/client/src/schema-component/antd/input/Input.tsx b/packages/core/client/src/schema-component/antd/input/Input.tsx index 47d0b93f7..0827a2725 100644 --- a/packages/core/client/src/schema-component/antd/input/Input.tsx +++ b/packages/core/client/src/schema-component/antd/input/Input.tsx @@ -12,31 +12,34 @@ type ComposedInput = React.FC & { JSON: React.FC; }; -export const Input: ComposedInput = Object.assign(connect( - AntdInput, - mapProps((props, field) => { - return { - ...props, - suffix: {field?.['loading'] || field?.['validating'] ? : props.suffix}, - }; - }), - mapReadPretty(ReadPretty.Input), -), { - TextArea: connect( - AntdInput.TextArea, +export const Input: ComposedInput = Object.assign( + connect( + AntdInput, mapProps((props, field) => { return { - autoSize: { - maxRows: 10, - minRows: 3, - }, ...props, + suffix: {field?.['loading'] || field?.['validating'] ? : props.suffix}, }; }), - mapReadPretty(ReadPretty.TextArea), + mapReadPretty(ReadPretty.Input), ), - URL: connect(AntdInput, mapReadPretty(ReadPretty.URL)), - JSON: connect(Json, mapReadPretty(ReadPretty.JSON)) -}); + { + TextArea: connect( + AntdInput.TextArea, + mapProps((props, field) => { + return { + autoSize: { + maxRows: 10, + minRows: 3, + }, + ...props, + }; + }), + mapReadPretty(ReadPretty.TextArea), + ), + URL: connect(AntdInput, mapReadPretty(ReadPretty.URL)), + JSON: connect(Json, mapReadPretty(ReadPretty.JSON)), + }, +); export default Input; diff --git a/packages/core/client/src/schema-component/antd/input/Json.tsx b/packages/core/client/src/schema-component/antd/input/Json.tsx index 2c395d56c..38561ce1c 100644 --- a/packages/core/client/src/schema-component/antd/input/Json.tsx +++ b/packages/core/client/src/schema-component/antd/input/Json.tsx @@ -4,28 +4,30 @@ import { useField } from '@formily/react'; import { Input } from 'antd'; import { TextAreaProps } from 'antd/lib/input'; -export type JSONTextAreaProps = TextAreaProps & { value?: string, space?: number }; +export type JSONTextAreaProps = TextAreaProps & { value?: string; space?: number }; -export const Json = React.forwardRef(({ value, onChange, space = 2, ...props }: JSONTextAreaProps, ref: Ref) => { - const field = useField(); - return ( - { - try { - const v = ev.target.value.trim() !== '' ? JSON.parse(ev.target.value) : null; - field.setFeedback({}); - onChange?.(v); - } catch (err) { - field.setFeedback({ - type: 'error', - code: 'JSONSyntaxError', - messages: [err.message], - }); - } - }} - /> - ); -}); +export const Json = React.forwardRef( + ({ value, onChange, space = 2, ...props }: JSONTextAreaProps, ref: Ref) => { + const field = useField(); + return ( + { + try { + const v = ev.target.value.trim() !== '' ? JSON.parse(ev.target.value) : null; + field.setFeedback({}); + onChange?.(v); + } catch (err) { + field.setFeedback({ + type: 'error', + code: 'JSONSyntaxError', + messages: [err.message], + }); + } + }} + /> + ); + }, +); diff --git a/packages/core/client/src/schema-component/antd/input/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/input/demos/demo2.tsx index f8f555bf5..694398cda 100644 --- a/packages/core/client/src/schema-component/antd/input/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/input/demos/demo2.tsx @@ -42,8 +42,8 @@ const schema = { 'x-component-props': { ellipsis: true, style: { - width: '100px' - } + width: '100px', + }, }, }, read3: { diff --git a/packages/core/client/src/schema-component/antd/input/demos/demo4.tsx b/packages/core/client/src/schema-component/antd/input/demos/demo4.tsx index 5ad45413c..d66121098 100644 --- a/packages/core/client/src/schema-component/antd/input/demos/demo4.tsx +++ b/packages/core/client/src/schema-component/antd/input/demos/demo4.tsx @@ -1,41 +1,41 @@ /** * title: URL */ - import { FormItem } from '@formily/antd'; - import { Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; - import React from 'react'; +import { FormItem } from '@formily/antd'; +import { Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import React from 'react'; - const schema = { - type: 'object', - properties: { - input: { - type: 'object', - title: `Editable`, - 'x-decorator': 'FormItem', - 'x-component': 'Input.JSON', - 'x-reactions': { - target: 'read', - fulfill: { - state: { - value: '{{$self.value}}', - }, - }, - }, - }, - read: { - type: 'string', - title: `Read pretty`, - 'x-read-pretty': true, - 'x-decorator': 'FormItem', - 'x-component': 'Input.JSON', - }, - }, - }; +const schema = { + type: 'object', + properties: { + input: { + type: 'object', + title: `Editable`, + 'x-decorator': 'FormItem', + 'x-component': 'Input.JSON', + 'x-reactions': { + target: 'read', + fulfill: { + state: { + value: '{{$self.value}}', + }, + }, + }, + }, + read: { + type: 'string', + title: `Read pretty`, + 'x-read-pretty': true, + 'x-decorator': 'FormItem', + 'x-component': 'Input.JSON', + }, + }, +}; - export default () => { - return ( - - - - ); - }; +export default () => { + return ( + + + + ); +}; diff --git a/packages/core/client/src/schema-component/antd/kanban/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/kanban/demos/demo1.tsx index 03afdc204..d610dbc04 100644 --- a/packages/core/client/src/schema-component/antd/kanban/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/kanban/demos/demo1.tsx @@ -6,7 +6,7 @@ import { BlockSchemaComponentProvider, CollectionManagerProvider, SchemaComponent, - SchemaComponentProvider + SchemaComponentProvider, } from '@nocobase/client'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx b/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx index 64115e6aa..506d7d877 100644 --- a/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx +++ b/packages/core/client/src/schema-component/antd/markdown/Markdown.tsx @@ -23,7 +23,7 @@ export const Markdown: any = connect( mapReadPretty((props) => { const { html, loading } = useParseMarkdown(props.value); const text = convertToText(html); - let value =
; + const value =
; if (loading) { return ; } diff --git a/packages/core/client/src/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.ts b/packages/core/client/src/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.ts index c21b307d1..d25174d25 100644 --- a/packages/core/client/src/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.ts +++ b/packages/core/client/src/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.ts @@ -18,13 +18,13 @@ export default function mermaidPlugin(md: MarkdownIt, options: any) { } // Store reference to original renderer. - let defaultFenceRenderer = md.renderer.rules.fence; + const defaultFenceRenderer = md.renderer.rules.fence; // Render custom code types as SVGs, letting the fence parser do all the heavy lifting. function customFenceRenderer(tokens: any[], idx: number, options: any, env: any, slf: any) { - let token = tokens[idx]; - let info = token.info.trim(); - let langName = info ? getLangName(info) : ''; + const token = tokens[idx]; + const info = token.info.trim(); + const langName = info ? getLangName(info) : ''; if (['mermaid', '{mermaid}'].indexOf(langName) === -1) { if (defaultFenceRenderer !== undefined) { @@ -34,8 +34,8 @@ export default function mermaidPlugin(md: MarkdownIt, options: any) { return ''; } - let imageHTML: string = ''; - let imageAttrs: string[][] = []; + let imageHTML = ''; + const imageAttrs: string[][] = []; // Create element to render into const element = document.createElement('div'); @@ -49,7 +49,7 @@ export default function mermaidPlugin(md: MarkdownIt, options: any) { token.content, (html: string) => { // We need to forcibly extract the max-width/height attributes to set on img tag - let svg = document.getElementById(container_id); + const svg = document.getElementById(container_id); if (svg !== null) { imageAttrs.push(['style', `max-width:${svg.style.maxWidth};max-height:${svg.style.maxHeight}`]); } diff --git a/packages/core/client/src/schema-component/antd/menu/Menu.tsx b/packages/core/client/src/schema-component/antd/menu/Menu.tsx index 3ea1270fe..d24eb89ef 100644 --- a/packages/core/client/src/schema-component/antd/menu/Menu.tsx +++ b/packages/core/client/src/schema-component/antd/menu/Menu.tsx @@ -137,7 +137,7 @@ const useSideMenuRef = () => { const MenuItemDesignerContext = createContext(null); export const Menu: ComposedMenu = observer((props) => { - let { + const { onSelect, mode, selectedUid, diff --git a/packages/core/client/src/schema-component/antd/menu/index.ts b/packages/core/client/src/schema-component/antd/menu/index.ts index 5ba6f22ae..9036e23db 100644 --- a/packages/core/client/src/schema-component/antd/menu/index.ts +++ b/packages/core/client/src/schema-component/antd/menu/index.ts @@ -1,4 +1,3 @@ export * from './Menu'; export * from './MenuItemInitializers'; export * from './util'; - diff --git a/packages/core/client/src/schema-component/antd/menu/util.ts b/packages/core/client/src/schema-component/antd/menu/util.ts index 91d1f13ad..72156c018 100644 --- a/packages/core/client/src/schema-component/antd/menu/util.ts +++ b/packages/core/client/src/schema-component/antd/menu/util.ts @@ -28,7 +28,7 @@ export function findMenuItem(schema: Schema) { if (ss) { return ss; } - }; + } return null; } diff --git a/packages/core/client/src/schema-component/antd/page/Page.tsx b/packages/core/client/src/schema-component/antd/page/Page.tsx index 923f4088d..2295cb2b6 100644 --- a/packages/core/client/src/schema-component/antd/page/Page.tsx +++ b/packages/core/client/src/schema-component/antd/page/Page.tsx @@ -265,7 +265,7 @@ export const Page = (props) => { /> )}
-
+
{loading ? ( diff --git a/packages/core/client/src/schema-component/antd/password/Password.tsx b/packages/core/client/src/schema-component/antd/password/Password.tsx index 8a4e60a80..1ea6ac1ca 100644 --- a/packages/core/client/src/schema-component/antd/password/Password.tsx +++ b/packages/core/client/src/schema-component/antd/password/Password.tsx @@ -1,4 +1,4 @@ -import { connect, mapReadPretty,mapProps } from '@formily/react'; +import { connect, mapReadPretty, mapProps } from '@formily/react'; import { isValid } from '@formily/shared'; import { Input } from 'antd'; import { PasswordProps } from 'antd/lib/input'; diff --git a/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx index b6c3710c9..19cf73dbd 100644 --- a/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx @@ -1,45 +1,44 @@ /** * title: Check strength */ - import { FormItem } from '@formily/antd'; - import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; - import React from 'react'; - - const schema = { - type: 'object', - properties: { - input: { - type: 'boolean', - title: `Editable`, - 'x-decorator': 'FormItem', - 'x-component': 'Password', - 'x-component-props': { +import { FormItem } from '@formily/antd'; +import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import React from 'react'; + +const schema = { + type: 'object', + properties: { + input: { + type: 'boolean', + title: `Editable`, + 'x-decorator': 'FormItem', + 'x-component': 'Password', + 'x-component-props': { checkStrength: true, - }, - 'x-reactions': { - target: 'read', - fulfill: { - state: { - value: '{{$self.value}}', - }, - }, - }, - }, - read: { - type: 'boolean', - title: `Read pretty`, - 'x-read-pretty': true, - 'x-decorator': 'FormItem', - 'x-component': 'Password', - }, - }, - }; - - export default () => { - return ( - - - - ); - }; - \ No newline at end of file + }, + 'x-reactions': { + target: 'read', + fulfill: { + state: { + value: '{{$self.value}}', + }, + }, + }, + }, + read: { + type: 'boolean', + title: `Read pretty`, + 'x-read-pretty': true, + 'x-decorator': 'FormItem', + 'x-component': 'Password', + }, + }, +}; + +export default () => { + return ( + + + + ); +}; diff --git a/packages/core/client/src/schema-component/antd/percent/Percent.tsx b/packages/core/client/src/schema-component/antd/percent/Percent.tsx index 96eaaf590..fddd09b31 100644 --- a/packages/core/client/src/schema-component/antd/percent/Percent.tsx +++ b/packages/core/client/src/schema-component/antd/percent/Percent.tsx @@ -1,4 +1,4 @@ -import { connect, mapReadPretty,mapProps } from '@formily/react'; +import { connect, mapReadPretty, mapProps } from '@formily/react'; import { InputNumber } from 'antd'; import React from 'react'; import { ReadPretty } from '../input-number/ReadPretty'; @@ -9,9 +9,9 @@ export const Percent = connect( const { value, onChange } = props; return ( - { if (onChange) { @@ -22,6 +22,6 @@ export const Percent = connect( ); }, mapReadPretty((props) => { - return (); + return ; }), ); diff --git a/packages/core/client/src/schema-component/antd/percent/index.ts b/packages/core/client/src/schema-component/antd/percent/index.ts index c3d9f84ac..819cecaa7 100644 --- a/packages/core/client/src/schema-component/antd/percent/index.ts +++ b/packages/core/client/src/schema-component/antd/percent/index.ts @@ -1 +1 @@ -export * from './Percent'; \ No newline at end of file +export * from './Percent'; diff --git a/packages/core/client/src/schema-component/antd/radio/Radio.tsx b/packages/core/client/src/schema-component/antd/radio/Radio.tsx index bbcad25e3..3676d8951 100644 --- a/packages/core/client/src/schema-component/antd/radio/Radio.tsx +++ b/packages/core/client/src/schema-component/antd/radio/Radio.tsx @@ -11,22 +11,18 @@ type ComposedRadio = React.FC & { export const Radio: ComposedRadio = connect( AntdRadio, - mapProps( - { - value: 'checked', - onInput: 'onChange', - }, - ), + mapProps({ + value: 'checked', + onInput: 'onChange', + }), ); Radio.__ANT_RADIO = true; Radio.Group = connect( AntdRadio.Group, - mapProps( - { - dataSource: 'options', - }, - ), + mapProps({ + dataSource: 'options', + }), mapReadPretty((props) => { if (!isValid(props.value)) { return
; diff --git a/packages/core/client/src/schema-component/antd/record-picker/InputRecordPicker.tsx b/packages/core/client/src/schema-component/antd/record-picker/InputRecordPicker.tsx index a028107ec..a53733f8d 100644 --- a/packages/core/client/src/schema-component/antd/record-picker/InputRecordPicker.tsx +++ b/packages/core/client/src/schema-component/antd/record-picker/InputRecordPicker.tsx @@ -18,7 +18,7 @@ import { getLabelFormatValue, useLabelUiSchema } from './util'; export const RecordPickerContext = createContext(null); function flatData(data) { - let newArr = []; + const newArr = []; for (let i = 0; i < data.length; i++) { const children = data[i]['children']; if (Array.isArray(children)) { diff --git a/packages/core/client/src/schema-component/antd/record-picker/RecordPicker.tsx b/packages/core/client/src/schema-component/antd/record-picker/RecordPicker.tsx index 56876c849..5b72ee26a 100644 --- a/packages/core/client/src/schema-component/antd/record-picker/RecordPicker.tsx +++ b/packages/core/client/src/schema-component/antd/record-picker/RecordPicker.tsx @@ -2,7 +2,4 @@ import { connect, mapReadPretty } from '@formily/react'; import { InputRecordPicker } from './InputRecordPicker'; import { ReadPrettyRecordPicker } from './ReadPrettyRecordPicker'; -export const RecordPicker: any = connect( - InputRecordPicker, - mapReadPretty(ReadPrettyRecordPicker), -); +export const RecordPicker: any = connect(InputRecordPicker, mapReadPretty(ReadPrettyRecordPicker)); diff --git a/packages/core/client/src/schema-component/antd/record-picker/useFieldNames.ts b/packages/core/client/src/schema-component/antd/record-picker/useFieldNames.ts index a62997a77..d4fb39e33 100644 --- a/packages/core/client/src/schema-component/antd/record-picker/useFieldNames.ts +++ b/packages/core/client/src/schema-component/antd/record-picker/useFieldNames.ts @@ -1,9 +1,10 @@ -import { useFieldSchema } from "@formily/react"; +import { useFieldSchema } from '@formily/react'; export const useFieldNames = (props) => { const fieldSchema = useFieldSchema(); - const fieldNames = fieldSchema['x-component-props']?.['field']?.['uiSchema']?.['x-component-props']?.['fieldNames'] - || fieldSchema?.['x-component-props']?.['fieldNames'] - || props.fieldNames; + const fieldNames = + fieldSchema['x-component-props']?.['field']?.['uiSchema']?.['x-component-props']?.['fieldNames'] || + fieldSchema?.['x-component-props']?.['fieldNames'] || + props.fieldNames; return { label: 'label', value: 'value', ...fieldNames }; }; diff --git a/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx b/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx index df6b2932d..5e43fa0df 100644 --- a/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx +++ b/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx @@ -156,7 +156,7 @@ const InternalRemoteSelect = connect( const getOptionsByFieldNames = useCallback( (item) => { return Object.keys(fieldNames).reduce((obj, key) => { - let value = item[fieldNames[key]]; + const value = item[fieldNames[key]]; if (value) { // support hidden, disabled, etc. obj[['label', 'value', 'options'].includes(key) ? fieldNames[key] : key] = diff --git a/packages/core/client/src/schema-component/antd/remote-select/shared.ts b/packages/core/client/src/schema-component/antd/remote-select/shared.ts index 9c2915783..b5f0707a3 100644 --- a/packages/core/client/src/schema-component/antd/remote-select/shared.ts +++ b/packages/core/client/src/schema-component/antd/remote-select/shared.ts @@ -2,6 +2,6 @@ import { castArray } from 'lodash'; export const getValues = (values, fieldNames) => { return castArray(values) - .filter(item => item != null) + .filter((item) => item != null) .map((val) => (typeof val === 'object' ? val[fieldNames.value] : val)); }; diff --git a/packages/core/client/src/schema-component/antd/select/index.ts b/packages/core/client/src/schema-component/antd/select/index.ts index 87bb69dd4..a89fd9b91 100644 --- a/packages/core/client/src/schema-component/antd/select/index.ts +++ b/packages/core/client/src/schema-component/antd/select/index.ts @@ -1,2 +1,2 @@ export * from './Select'; -export * from './shared' +export * from './shared'; diff --git a/packages/core/client/src/schema-component/antd/select/shared.ts b/packages/core/client/src/schema-component/antd/select/shared.ts index 01ab723d9..a6fd653fb 100644 --- a/packages/core/client/src/schema-component/antd/select/shared.ts +++ b/packages/core/client/src/schema-component/antd/select/shared.ts @@ -7,15 +7,13 @@ export const defaultFieldNames = { options: 'children', }; - - export const getCurrentOptions = (values, dataSource, fieldNames) => { function flatData(data) { - let newArr = []; + const newArr = []; for (let i = 0; i < data.length; i++) { const children = data[i][fieldNames.options]; if (Array.isArray(children)) { - newArr.push(...flatData(children)) + newArr.push(...flatData(children)); } newArr.push({ ...data[i] }); } @@ -26,8 +24,8 @@ export const getCurrentOptions = (values, dataSource, fieldNames) => { .filter((item) => item != null) .map((val) => (typeof val === 'object' ? val[fieldNames.value] : val)); const findOptions = (options: any[]) => { - if (!options) return [] - let current = []; + if (!options) return []; + const current = []; for (const value of values) { const option = options.find((v) => v[fieldNames.value] === value) || { value: value, label: value }; current.push(option); diff --git a/packages/core/client/src/schema-component/antd/space/index.tsx b/packages/core/client/src/schema-component/antd/space/index.tsx index f8177ead3..f0c4b9dd7 100644 --- a/packages/core/client/src/schema-component/antd/space/index.tsx +++ b/packages/core/client/src/schema-component/antd/space/index.tsx @@ -5,7 +5,7 @@ import React from 'react'; export const Space: React.FC = (props) => { let { split } = props; if (split === '|') { - split = ; + split = ; } const layout = useFormLayout(); return React.createElement(AntdSpace, { diff --git a/packages/core/client/src/schema-component/antd/table-v2/TableField.tsx b/packages/core/client/src/schema-component/antd/table-v2/TableField.tsx index b34069fe6..89097f65c 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/TableField.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/TableField.tsx @@ -33,5 +33,9 @@ TableField.ActionBar = observer((props) => { if (form.readPretty) { return null; } - return
; + return ( +
+ +
+ ); }); diff --git a/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx index 937318295..3d97d72ef 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx @@ -9,7 +9,7 @@ import { SchemaComponent, SchemaComponentProvider, useFormBlockContext, - useTableBlockContext + useTableBlockContext, } from '@nocobase/client'; import MockAdapter from 'axios-mock-adapter'; import { range } from 'lodash'; diff --git a/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx index 0bcbc9719..6b5fa6e43 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx @@ -7,7 +7,7 @@ import { CollectionManagerProvider, RecordProvider, SchemaComponent, - SchemaComponentProvider + SchemaComponentProvider, } from '@nocobase/client'; import React from 'react'; import collections from './collections'; diff --git a/packages/core/client/src/schema-component/antd/table-v2/utils.ts b/packages/core/client/src/schema-component/antd/table-v2/utils.ts index 31599cfd3..6c45ae196 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/utils.ts +++ b/packages/core/client/src/schema-component/antd/table-v2/utils.ts @@ -21,7 +21,7 @@ export function extractIndex(str) { export function getIdsWithChildren(nodes) { const ids = []; if (nodes) { - for (let node of nodes) { + for (const node of nodes) { if (node.children && node.children.length > 0) { ids.push(node.id); ids.push(...getIdsWithChildren(node.children)); diff --git a/packages/core/client/src/schema-component/antd/table/Table.Column.Decorator.tsx b/packages/core/client/src/schema-component/antd/table/Table.Column.Decorator.tsx index 8f527e939..7a413ef96 100644 --- a/packages/core/client/src/schema-component/antd/table/Table.Column.Decorator.tsx +++ b/packages/core/client/src/schema-component/antd/table/Table.Column.Decorator.tsx @@ -39,7 +39,7 @@ export const TableColumnDecorator = (props) => { }, [uiSchema?.title]); return ( - + {/* */} {field.title || compile(uiSchema?.title)} {/*
{ }} /> - + { - return ( - - - - ); - }; - \ No newline at end of file + +const schema = { + type: 'object', + properties: { + input: { + type: 'string', + title: `Editable`, + 'x-decorator': 'FormItem', + 'x-component': 'TimePicker.RangePicker', + 'x-reactions': { + target: 'read', + fulfill: { + state: { + value: '{{$self.value}}', + }, + }, + }, + }, + read: { + type: 'string', + title: `Read pretty`, + 'x-read-pretty': true, + 'x-decorator': 'FormItem', + 'x-component': 'TimePicker.RangePicker', + }, + }, +}; + +export default () => { + return ( + + + + ); +}; diff --git a/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx index 02430b0ed..f5841591d 100644 --- a/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx @@ -140,7 +140,7 @@ ReadPretty.Upload = (props) => { return (field.value || []).map((item) => (
{item.url ? ( - + {item.name} ) : ( diff --git a/packages/core/client/src/schema-component/antd/upload/shared.ts b/packages/core/client/src/schema-component/antd/upload/shared.ts index a787bcc2d..34aa53abf 100644 --- a/packages/core/client/src/schema-component/antd/upload/shared.ts +++ b/packages/core/client/src/schema-component/antd/upload/shared.ts @@ -10,7 +10,7 @@ import { UPLOAD_PLACEHOLDER } from './placeholder'; import type { IUploadProps, UploadProps } from './type'; export const isImage = (extName: string) => { - var reg = /\.(png|jpg|gif|jpeg|webp)$/; + const reg = /\.(png|jpg|gif|jpeg|webp)$/; return reg.test(extName); }; diff --git a/packages/core/client/src/schema-component/antd/variable/Input.tsx b/packages/core/client/src/schema-component/antd/variable/Input.tsx index 3bdeaca90..819d7f2d8 100644 --- a/packages/core/client/src/schema-component/antd/variable/Input.tsx +++ b/packages/core/client/src/schema-component/antd/variable/Input.tsx @@ -96,14 +96,12 @@ const ConstantTypes = { }, }; - - function getTypedConstantOption(type) { return { value: '', label: '{{t("Constant")}}', children: Object.values(ConstantTypes), - component: ConstantTypes[type]?.component + component: ConstantTypes[type]?.component, }; } @@ -126,21 +124,17 @@ export function Input(props) { const { component: ConstantComponent, ...constantOption }: VariableOptions & { component?: React.FC } = children ? { - value: '', - label: '{{t("Constant")}}' - } - : (useTypedConstant - ? getTypedConstantOption(type) - : { + value: '', + label: '{{t("Constant")}}', + } + : useTypedConstant + ? getTypedConstantOption(type) + : { value: '', label: '{{t("Null")}}', - component: ConstantTypes.null.component - } - ); - const options: VariableOptions[] = compile([ - constantOption, - ...varialbeOptions, - ]); + component: ConstantTypes.null.component, + }; + const options: VariableOptions[] = compile([constantOption, ...varialbeOptions]); function onSwitch(next) { if (next[0] === '') { diff --git a/packages/core/client/src/schema-component/antd/variable/JSONInput.tsx b/packages/core/client/src/schema-component/antd/variable/JSONInput.tsx index 7d40fc679..175ec81b0 100644 --- a/packages/core/client/src/schema-component/antd/variable/JSONInput.tsx +++ b/packages/core/client/src/schema-component/antd/variable/JSONInput.tsx @@ -1,27 +1,27 @@ import React, { useRef } from 'react'; import { Button } from 'antd'; -import { css } from "@emotion/css"; +import { css } from '@emotion/css'; -import { Input } from "../input"; +import { Input } from '../input'; import { useTranslation } from 'react-i18next'; import { VariableSelect } from './VariableSelect'; - - // NOTE: https://stackoverflow.com/questions/23892547/what-is-the-best-way-to-trigger-onchange-event-in-react-js/46012210#46012210 function setNativeInputValue(input, value) { const nativeInputValueSetter = Object.getOwnPropertyDescriptor(input.constructor.prototype, 'value')?.set; nativeInputValueSetter?.call(input, value); - input.dispatchEvent(new Event('input', { - bubbles: true, - })); + input.dispatchEvent( + new Event('input', { + bubbles: true, + }), + ); } export function JSONInput(props) { const inputRef = useRef(null); const { value, space = 2, scope } = props; const { t } = useTranslation(); - const options = typeof scope === 'function' ? scope() : (scope ?? []); + const options = typeof scope === 'function' ? scope() : scope ?? []; function onFormat() { if (!inputRef.current) { @@ -46,26 +46,29 @@ export function JSONInput(props) { const variable = `{{${selected.join('.')}}}`; const { textArea } = inputRef.current.resizableTextArea; - const nextValue = textArea.value.slice(0, textArea.selectionStart) + variable + textArea.value.slice(textArea.selectionEnd); + const nextValue = + textArea.value.slice(0, textArea.selectionStart) + variable + textArea.value.slice(textArea.selectionEnd); const nextPos = [textArea.selectionStart, textArea.selectionStart + variable.length]; setNativeInputValue(textArea, nextValue); textArea.setSelectionRange(...nextPos); textArea.focus(); } return ( -
+
- {!disabled - ? - : null - } + {!disabled ? : null} ); } @@ -392,7 +397,7 @@ TextArea.ReadPretty = (props) => { .ant-tag { display: inline; line-height: 19px; - margin: 0 .25em; + margin: 0 0.25em; padding: 2px 7px; border-radius: 10px; } @@ -405,4 +410,4 @@ TextArea.ReadPretty = (props) => { {content} ); -} +}; diff --git a/packages/core/client/src/schema-component/antd/variable/Variable.tsx b/packages/core/client/src/schema-component/antd/variable/Variable.tsx index 5eecfdc7c..fd855850a 100644 --- a/packages/core/client/src/schema-component/antd/variable/Variable.tsx +++ b/packages/core/client/src/schema-component/antd/variable/Variable.tsx @@ -1,10 +1,8 @@ import { connect, mapReadPretty } from '@formily/react'; -import { Input } from "./Input"; -import { TextArea } from "./TextArea"; -import { JSONInput } from "./JSONInput"; - - +import { Input } from './Input'; +import { TextArea } from './TextArea'; +import { JSONInput } from './JSONInput'; export function Variable() { return null; diff --git a/packages/core/client/src/schema-component/antd/variable/VariableSelect.tsx b/packages/core/client/src/schema-component/antd/variable/VariableSelect.tsx index 46cc5edab..3ebbbf48f 100644 --- a/packages/core/client/src/schema-component/antd/variable/VariableSelect.tsx +++ b/packages/core/client/src/schema-component/antd/variable/VariableSelect.tsx @@ -1,7 +1,7 @@ -import { css, cx } from "@emotion/css"; -import { Button, Cascader } from "antd"; -import React, { useEffect, useState } from "react"; -import { useTranslation } from "react-i18next"; +import { css, cx } from '@emotion/css'; +import { Button, Cascader } from 'antd'; +import React, { useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; export function VariableSelect(props) { const { options, onInsert } = props; @@ -13,26 +13,33 @@ export function VariableSelect(props) { }, [options]); return ( - - ) - : null; + .then((values) => { + form.setValuesIn(`patterns.${index}`, { type, options: { ...values } }); + }); + }} + > + {t('Configure')} + + ) : null; } export const sequence: IField = { @@ -274,8 +274,7 @@ export const sequence: IField = { uiSchema: { type: 'string', 'x-component': 'Input', - 'x-component-props': { - }, + 'x-component-props': {}, }, }, hasDefaultValue: false, @@ -321,7 +320,7 @@ export const sequence: IField = { name: 'type', required: true, 'x-decorator': 'FormItem', - 'x-component': RuleTypeSelect + 'x-component': RuleTypeSelect, }, }, }, @@ -333,9 +332,9 @@ export const sequence: IField = { options: { type: 'object', name: 'options', - 'x-component': RuleOptions - } - } + 'x-component': RuleOptions, + }, + }, }, operations: { type: 'void', @@ -345,13 +344,13 @@ export const sequence: IField = { dataIndex: 'operations', fixed: 'right', className: css` - > *:not(:last-child){ - margin-right: .5em; + > *:not(:last-child) { + margin-right: 0.5em; } - button{ + button { padding: 0; } - ` + `, }, properties: { config: { @@ -359,28 +358,28 @@ export const sequence: IField = { properties: { options: { type: 'object', - 'x-component': RuleConfigForm - } - } + 'x-component': RuleConfigForm, + }, + }, }, remove: { type: 'void', 'x-component': 'ArrayTable.Remove', - } - } - } - } + }, + }, + }, + }, }, properties: { add: { type: 'void', 'x-component': 'ArrayTable.Addition', 'x-component-props': { - defaultValue: { type: 'integer', options: { digits: 1, start: 0 } } + defaultValue: { type: 'integer', options: { digits: 1, start: 0 } }, }, title: `{{t("Add rule", { ns: "${NAMESPACE}" })}}`, - } - } + }, + }, }, inputable: { type: 'boolean', @@ -402,9 +401,9 @@ export const sequence: IField = { }, }, }, - } + }, }, filterable: { operators: interfacesProperties.operators.string, - } + }, }; diff --git a/packages/plugins/sequence-field/src/server/__tests__/sequence-field.test.ts b/packages/plugins/sequence-field/src/server/__tests__/sequence-field.test.ts index 0c7466f84..b1e59513f 100644 --- a/packages/plugins/sequence-field/src/server/__tests__/sequence-field.test.ts +++ b/packages/plugins/sequence-field/src/server/__tests__/sequence-field.test.ts @@ -17,8 +17,8 @@ describe('sequence field', () => { await db.sync({ force: true, alter: { - drop: true - } + drop: true, + }, }); await app.load(); await app.start(); @@ -65,10 +65,8 @@ describe('sequence field', () => { { type: 'sequence', name: 'name', - patterns: [ - { type: 'string', options: { value: 'abc' } } - ] - } + patterns: [{ type: 'string', options: { value: 'abc' } }], + }, ], }); await db.sync(); @@ -102,10 +100,10 @@ describe('sequence field', () => { patterns: [ { type: 'integer', - options: { key: 1 } - } - ] - } + options: { key: 1 }, + }, + ], + }, ], }); await db.sync(); @@ -130,11 +128,11 @@ describe('sequence field', () => { type: 'integer', options: { start: 9, - key: 1 - } - } - ] - } + key: 1, + }, + }, + ], + }, ], }); await db.sync(); @@ -157,18 +155,16 @@ describe('sequence field', () => { patterns: [ { type: 'integer', - options: { key: 1 } - } - ] - } + options: { key: 1 }, + }, + ], + }, ], }); await db.sync(); const field = collection.getField('name'); const SeqRepo = db.getRepository('sequences'); - await SeqRepo.create({ - - }); + await SeqRepo.create({}); const TestModel = db.getModel('tests'); const item1 = await TestModel.create(); @@ -188,11 +184,11 @@ describe('sequence field', () => { options: { digits: 2, start: 9, - key: 1 - } - } - ] - } + key: 1, + }, + }, + ], + }, ], }); await db.sync(); @@ -217,11 +213,11 @@ describe('sequence field', () => { type: 'integer', options: { cycle: '0 0 0 * * *', - key: 1 - } - } - ] - } + key: 1, + }, + }, + ], + }, ], }); await db.sync(); @@ -232,13 +228,13 @@ describe('sequence field', () => { const TestModel = db.getModel('tests'); const item1 = await TestModel.create({ id: 1, - createdAt: yesterday + createdAt: yesterday, }); expect(item1.get('name')).toBe('0'); const item2 = await TestModel.create({ id: 2, - createdAt: yesterday + createdAt: yesterday, }); expect(item2.get('name')).toBe('1'); @@ -265,9 +261,9 @@ describe('sequence field', () => { patterns: [ { type: 'integer', - options: { key: 1 } - } - ] + options: { key: 1 }, + }, + ], }); await db.sync(); @@ -285,10 +281,10 @@ describe('sequence field', () => { patterns: [ { type: 'integer', - options: { key: 1 } - } - ] - } + options: { key: 1 }, + }, + ], + }, ], }); await db.sync(); @@ -313,14 +309,14 @@ describe('sequence field', () => { patterns: [ { type: 'integer', - options: { key: 1 } + options: { key: 1 }, }, { type: 'integer', - options: { key: 2 } - } - ] - } + options: { key: 2 }, + }, + ], + }, ], }); await db.sync(); @@ -342,10 +338,8 @@ describe('sequence field', () => { { type: 'sequence', name: 'name', - patterns: [ - { type: 'date' } - ] - } + patterns: [{ type: 'date' }], + }, ], }); await db.sync(); @@ -365,14 +359,12 @@ describe('sequence field', () => { { type: 'sequence', name: 'name', - patterns: [ - { type: 'date', options: { field: 'date' } } - ] + patterns: [{ type: 'date', options: { field: 'date' } }], }, { type: 'date', - name: 'date' - } + name: 'date', + }, ], }); await db.sync(); @@ -382,7 +374,7 @@ describe('sequence field', () => { const TestModel = db.getModel('tests'); const item1 = await TestModel.create({ - date + date, }); expect(item1.get('name')).toBe(YYYYMMDD); }); @@ -394,10 +386,8 @@ describe('sequence field', () => { { type: 'sequence', name: 'name', - patterns: [ - { type: 'date', options: { format: 'YYYY-MM-DD' } } - ] - } + patterns: [{ type: 'date', options: { format: 'YYYY-MM-DD' } }], + }, ], }); await db.sync(); @@ -422,9 +412,9 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'A' } }, { type: 'date' }, - { type: 'integer', options: { key: 1 } } - ] - } + { type: 'integer', options: { key: 1 } }, + ], + }, ], }); await db.sync(); @@ -450,9 +440,9 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'A' } }, { type: 'date' }, - { type: 'integer', options: { key: 1 } } - ] - } + { type: 'integer', options: { key: 1 } }, + ], + }, ], }); await db.sync(); @@ -470,8 +460,8 @@ describe('sequence field', () => { { type: 'string', options: { value: 'A' } }, { type: 'date' }, // change options but no difference with default with new key - { type: 'integer', options: { digits: 1, key: 2 } } - ] + { type: 'integer', options: { digits: 1, key: 2 } }, + ], }) as SequenceField; const item2 = await TestModel.create(); @@ -483,8 +473,8 @@ describe('sequence field', () => { { type: 'string', options: { value: 'A' } }, { type: 'date' }, // change options but no difference with default with key - { type: 'integer', options: { digits: 1, key: f2.options.patterns[2].options.key } } - ] + { type: 'integer', options: { digits: 1, key: f2.options.patterns[2].options.key } }, + ], }); const item3 = await TestModel.create(); @@ -495,8 +485,8 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'A' } }, { type: 'date' }, - { type: 'integer', options: { digits: 2, key: 3 } } - ] + { type: 'integer', options: { digits: 2, key: 3 } }, + ], }); const item4 = await TestModel.create(); @@ -507,8 +497,8 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'a' } }, { type: 'date' }, - { type: 'integer', options: { digits: 2, key: f4.options.patterns[2].options.key } } - ] + { type: 'integer', options: { digits: 2, key: f4.options.patterns[2].options.key } }, + ], }); const item5 = await TestModel.create(); @@ -516,10 +506,7 @@ describe('sequence field', () => { testsCollection.setField('name', { type: 'sequence', - patterns: [ - { type: 'date' }, - { type: 'integer', options: { digits: 2, key: 4 } } - ] + patterns: [{ type: 'date' }, { type: 'integer', options: { digits: 2, key: 4 } }], }); const item6 = await TestModel.create(); @@ -538,18 +525,18 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'A' } }, { type: 'date' }, - { type: 'integer', options: { digits: 2, cycle: '0 0 * * *', key: 1 } } - ] + { type: 'integer', options: { digits: 2, cycle: '0 0 * * *', key: 1 } }, + ], }, { type: 'sequence', name: 'code', patterns: [ { type: 'string', options: { value: 'C' } }, - { type: 'integer', options: { digits: 4, key: 1 }} - ] - } - ] + { type: 'integer', options: { digits: 4, key: 1 } }, + ], + }, + ], }); await db.sync(); @@ -573,7 +560,7 @@ describe('sequence field', () => { { type: 'date' }, { type: 'integer', options: { digits: 1, key: 1 } }, { type: 'string', options: { value: 'a' } }, - ] + ], }); const item3 = await TestModel.create(); @@ -593,10 +580,10 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'A' } }, { type: 'date' }, - { type: 'integer', options: { key: 1 } } + { type: 'integer', options: { key: 1 } }, ], - inputable: false - } + inputable: false, + }, ], }); await db.sync(); @@ -620,11 +607,11 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'A' } }, { type: 'date' }, - { type: 'integer', options: { key: 1 } } + { type: 'integer', options: { key: 1 } }, ], inputable: true, - match: false - } + match: false, + }, ], }); await db.sync(); @@ -648,11 +635,11 @@ describe('sequence field', () => { patterns: [ { type: 'string', options: { value: 'A' } }, { type: 'date' }, - { type: 'integer', options: { key: 1 } } + { type: 'integer', options: { key: 1 } }, ], inputable: true, - match: true - } + match: true, + }, ], }); await db.sync(); @@ -671,12 +658,10 @@ describe('sequence field', () => { { type: 'sequence', name: 'name', - patterns: [ - { type: 'integer', options: { key: 1 } } - ], + patterns: [{ type: 'integer', options: { key: 1 } }], inputable: true, - match: true - } + match: true, + }, ], }); await db.sync(); @@ -699,12 +684,10 @@ describe('sequence field', () => { { type: 'sequence', name: 'name', - patterns: [ - { type: 'integer', options: { key: 1 } } - ], + patterns: [{ type: 'integer', options: { key: 1 } }], inputable: true, - match: true - } + match: true, + }, ], }); await db.sync(); @@ -727,12 +710,10 @@ describe('sequence field', () => { { type: 'sequence', name: 'name', - patterns: [ - { type: 'integer', options: { key: 1, cycle: '0 0 0 * * *' } } - ], + patterns: [{ type: 'integer', options: { key: 1, cycle: '0 0 0 * * *' } }], inputable: true, - match: true - } + match: true, + }, ], }); await db.sync(); @@ -763,40 +744,37 @@ describe('sequence field', () => { { type: 'sequence', name: 'seq', - patterns: [ - { type: 'date' }, - { type: 'integer', options: { key: 1 } } - ] - } - ] + patterns: [{ type: 'date' }, { type: 'integer', options: { key: 1 } }], + }, + ], }); const postsCollection = db.collection({ name: 'posts', fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'belongsToMany', name: 'tags', - through: 'posts_tags' - } - ] + through: 'posts_tags', + }, + ], }); const tagsCollection = db.collection({ name: 'tags', fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'belongsToMany', name: 'posts', - through: 'posts_tags' - } - ] + through: 'posts_tags', + }, + ], }); await db.sync(); @@ -806,30 +784,26 @@ describe('sequence field', () => { const tagsRepo = db.getRepository('tags'); const tags = await tagsRepo.create({ - values: [ - { title: 't1' }, - { title: 't2' }, - { title: 't3' }, - ] + values: [{ title: 't1' }, { title: 't2' }, { title: 't3' }], }); const postsTagsRepo = db.getRepository('posts_tags'); const postTag = await postsTagsRepo.create({ values: { postId: 1, - tagId: 1 - } + tagId: 1, + }, }); const postsRepo = db.getRepository('posts'); await postsRepo.create({ values: { title: 'p1', - tags - } + tags, + }, }); const postsTags = await postsTagsRepo.find({ - order: [['seq', 'ASC']] + order: [['seq', 'ASC']], }); expect(postsTags[0].seq).toBe(`${dateStr}0`); diff --git a/packages/plugins/sequence-field/src/server/fields/sequence-field.ts b/packages/plugins/sequence-field/src/server/fields/sequence-field.ts index f4a792ab6..45065a4b7 100644 --- a/packages/plugins/sequence-field/src/server/fields/sequence-field.ts +++ b/packages/plugins/sequence-field/src/server/fields/sequence-field.ts @@ -68,18 +68,20 @@ sequencePatterns.register('integer', { const recordTime = instance.get('createdAt') ?? new Date(); const { digits = 1, start = 0, base = 10, cycle, key } = options; const { repository: SeqRepo, model: SeqModel } = this.database.getCollection('sequences'); - const lastSeq = (await SeqRepo.findOne({ - filter: { + const lastSeq = + (await SeqRepo.findOne({ + filter: { + collection: this.collection.name, + field: this.name, + key, + }, + transaction, + })) || + SeqModel.build({ collection: this.collection.name, field: this.name, key, - }, - transaction, - })) || SeqModel.build({ - collection: this.collection.name, - field: this.name, - key, - }); + }); let next = start; if (lastSeq.get('current') != null) { @@ -123,18 +125,20 @@ sequencePatterns.register('integer', { const { digits = 1, start = 0, base = 10, cycle, key } = options; const { repository: SeqRepo, model: SeqModel } = this.database.getCollection('sequences'); - const lastSeq = (await SeqRepo.findOne({ - filter: { + const lastSeq = + (await SeqRepo.findOne({ + filter: { + collection: this.collection.name, + field: this.name, + key, + }, + transaction, + })) || + SeqModel.build({ collection: this.collection.name, field: this.name, key, - }, - transaction, - })) || SeqModel.build({ - collection: this.collection.name, - field: this.name, - key, - }); + }); instances.forEach((instance, i) => { const recordTime = instance.get('createdAt') ?? new Date(); @@ -364,11 +368,17 @@ export class SequenceField extends Field { options.skipIndividualHooks.add(`${this.collection.name}.beforeCreate.${this.name}`); const { name, patterns, inputable } = this.options; - const array = Array(patterns.length).fill(null).map(() => Array(instances.length)); + const array = Array(patterns.length) + .fill(null) + .map(() => Array(instances.length)); - await patterns.reduce((promise, p, i) => promise.then(() => - sequencePatterns.get(p.type).batchGenerate.call(this, instances, array[i], p.options ?? {}, options)), - Promise.resolve()); + await patterns.reduce( + (promise, p, i) => + promise.then(() => + sequencePatterns.get(p.type).batchGenerate.call(this, instances, array[i], p.options ?? {}, options), + ), + Promise.resolve(), + ); instances.forEach((instance, i) => { const value = instance.get(name); @@ -380,7 +390,7 @@ export class SequenceField extends Field { cleanHook = (_, options) => { options.skipIndividualHooks.delete(`${this.collection.name}.beforeCreate.${this.name}`); - } + }; match(value) { return typeof value === 'string' ? value.match(this.matcher) : null; diff --git a/packages/plugins/sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts b/packages/plugins/sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts index c2aadafd0..0c3f9b0c3 100644 --- a/packages/plugins/sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts +++ b/packages/plugins/sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts @@ -17,9 +17,9 @@ export default class extends Migration { await db.sequelize.transaction(async (transaction) => { const seqPlugin = await pluginRepo.findOne({ filter: { - name: 'sequence-field' + name: 'sequence-field', }, - transaction + transaction, }); if (!seqPlugin) { await pluginRepo.create({ @@ -29,35 +29,39 @@ export default class extends Migration { enabled: true, installed: true, builtIn: true, - } + }, }); } const fields = await fieldRepo.find({ filter: { - type: 'sequence' - } + type: 'sequence', + }, }); - await fields.reduce((promise, field) => promise.then(async () => { - const options = field.get('options'); - const fieldName = field.get('name'); - const collectionName = field.get('collectionName'); - // NOTE: cannot use .update because no changes are made, only for forcing to trigger beforeSave hook. - field.set('patterns', options.patterns); - await field.save({ transaction }); + await fields.reduce( + (promise, field) => + promise.then(async () => { + const options = field.get('options'); + const fieldName = field.get('name'); + const collectionName = field.get('collectionName'); + // NOTE: cannot use .update because no changes are made, only for forcing to trigger beforeSave hook. + field.set('patterns', options.patterns); + await field.save({ transaction }); - const repo = db.getRepository(collectionName); - const item = await repo.findOne({ - sort: ['-createdAt'], - transaction - }); - if (!item) { - return; - } - const collection = db.getCollection(collectionName); - const memField = collection.getField(fieldName); - await memField.update(item, { transaction }); - }), Promise.resolve()); + const repo = db.getRepository(collectionName); + const item = await repo.findOne({ + sort: ['-createdAt'], + transaction, + }); + if (!item) { + return; + } + const collection = db.getCollection(collectionName); + const memField = collection.getField(fieldName); + await memField.update(item, { transaction }); + }), + Promise.resolve(), + ); }); } diff --git a/packages/plugins/snapshot-field/src/client/index.tsx b/packages/plugins/snapshot-field/src/client/index.tsx index 96e527bb0..859a29af8 100644 --- a/packages/plugins/snapshot-field/src/client/index.tsx +++ b/packages/plugins/snapshot-field/src/client/index.tsx @@ -3,7 +3,7 @@ import { CollectionManagerProvider, registerField, SchemaComponentOptions, - SchemaInitializerProvider + SchemaInitializerProvider, } from '@nocobase/client'; import React, { useEffect } from 'react'; import { AppendsTreeSelect } from './components/AppendsTreeSelect'; diff --git a/packages/plugins/snapshot-field/src/client/locale/index.ts b/packages/plugins/snapshot-field/src/client/locale/index.ts index 0ff793a4d..87cd97316 100644 --- a/packages/plugins/snapshot-field/src/client/locale/index.ts +++ b/packages/plugins/snapshot-field/src/client/locale/index.ts @@ -1,7 +1,6 @@ import { i18n } from '@nocobase/client'; import { useTranslation } from 'react-i18next'; - export const NAMESPACE = 'snapshot-field'; // i18n.addResources('zh-CN', NAMESPACE, zhCN); diff --git a/packages/plugins/snapshot-field/src/client/locale/pt-BR.ts b/packages/plugins/snapshot-field/src/client/locale/pt-BR.ts index 3b26e258c..8330bc7f5 100644 --- a/packages/plugins/snapshot-field/src/client/locale/pt-BR.ts +++ b/packages/plugins/snapshot-field/src/client/locale/pt-BR.ts @@ -5,8 +5,9 @@ export default { 'Add block': 'Adicionar bloco', 'Allow linking to multiple records': 'Permitir vinculaรงรฃo a vรกrios registros', 'When adding a new record, create a snapshot for its relational record and save in the current record. The snapshot is not updated when the record is subsequently updated.': - 'Ao adicionar um novo registro, crie uma imagem instantรขnea para o registro relacionado e salve no registro atual. A imagem instantรขnea nรฃo รฉ atualizada quando o registro รฉ posteriormente atualizado.', + 'Ao adicionar um novo registro, crie uma imagem instantรขnea para o registro relacionado e salve no registro atual. A imagem instantรขnea nรฃo รฉ atualizada quando o registro รฉ posteriormente atualizado.', 'The association field to snapshot': 'O campo de associaรงรฃo para criar imagem instantรขnea', - "Snapshot the snapshot's association fields": "Criar imagem instantรขnea para os campos de associaรงรฃo da imagem instantรขnea", + "Snapshot the snapshot's association fields": + 'Criar imagem instantรขnea para os campos de associaรงรฃo da imagem instantรขnea', 'Please select': 'Por favor, selecione', }; diff --git a/packages/plugins/snapshot-field/src/server/fields/snapshot-field.ts b/packages/plugins/snapshot-field/src/server/fields/snapshot-field.ts index f9143ea2e..404fa97e9 100644 --- a/packages/plugins/snapshot-field/src/server/fields/snapshot-field.ts +++ b/packages/plugins/snapshot-field/src/server/fields/snapshot-field.ts @@ -31,12 +31,15 @@ export class SnapshotField extends Field { data = data.toJSON(); } - await model.update({ - [name]: { - collectionName, - data, + await model.update( + { + [name]: { + collectionName, + data, + }, }, - }, { transaction }); + { transaction }, + ); }; bind() { diff --git a/packages/plugins/ui-schema-storage/src/__tests__/action.test.ts b/packages/plugins/ui-schema-storage/src/__tests__/action.test.ts index 40138c05f..7c0ab870a 100644 --- a/packages/plugins/ui-schema-storage/src/__tests__/action.test.ts +++ b/packages/plugins/ui-schema-storage/src/__tests__/action.test.ts @@ -286,7 +286,7 @@ describe('action test', () => { }, }); - let response = await app.agent().resource('uiSchemas').insertAdjacent({ + const response = await app.agent().resource('uiSchemas').insertAdjacent({ resourceIndex: 'A', position: 'afterEnd', values: schema, diff --git a/packages/plugins/ui-schema-storage/src/__tests__/ui-schema-repository-with-cache.test.ts b/packages/plugins/ui-schema-storage/src/__tests__/ui-schema-repository-with-cache.test.ts index 86b44cc97..f56335867 100644 --- a/packages/plugins/ui-schema-storage/src/__tests__/ui-schema-repository-with-cache.test.ts +++ b/packages/plugins/ui-schema-storage/src/__tests__/ui-schema-repository-with-cache.test.ts @@ -289,10 +289,10 @@ describe('ui_schema repository with cache', () => { await repository.insert(schema); - let sResult = await repository.getJsonSchema(xUid, { readFromCache: true } as GetJsonSchemaOptions); + const sResult = await repository.getJsonSchema(xUid, { readFromCache: true } as GetJsonSchemaOptions); expect(await cache.get(`s_${xUid}`)).toMatchObject(sResult); - let pResult = (await repository.getProperties(xUid, { readFromCache: true } as GetPropertiesOptions)) as any; + const pResult = (await repository.getProperties(xUid, { readFromCache: true } as GetPropertiesOptions)) as any; expect(await cache.get(`p_${xUid}`)).toMatchObject(pResult); expect(sResult.title).toEqual(schema.title); diff --git a/packages/plugins/ui-schema-storage/src/index.ts b/packages/plugins/ui-schema-storage/src/index.ts index 292dff1a7..440ab4d53 100644 --- a/packages/plugins/ui-schema-storage/src/index.ts +++ b/packages/plugins/ui-schema-storage/src/index.ts @@ -1,4 +1,3 @@ export * from './repository'; export * from './server'; export { default } from './server'; - diff --git a/packages/plugins/ui-schema-storage/src/repository.ts b/packages/plugins/ui-schema-storage/src/repository.ts index 68bc02e17..6def19515 100644 --- a/packages/plugins/ui-schema-storage/src/repository.ts +++ b/packages/plugins/ui-schema-storage/src/repository.ts @@ -530,7 +530,7 @@ export class UiSchemaRepository extends Repository { @transaction() async remove(uid: string, options?: Transactionable & removeParentOptions) { - let { transaction } = options; + const { transaction } = options; await this.clearXUidPathCache(uid, transaction); if (options?.removeParentsIfNoChildren) { diff --git a/packages/plugins/users/src/actions/users.ts b/packages/plugins/users/src/actions/users.ts index 22e54ed73..6990bbdbc 100644 --- a/packages/plugins/users/src/actions/users.ts +++ b/packages/plugins/users/src/actions/users.ts @@ -21,7 +21,7 @@ export async function signin(ctx: Context, next: Next) { branches[name] = authenticator; } - return branch(branches, context => context.action.params.authenticator ?? 'password')(ctx, () => { + return branch(branches, (context) => context.action.params.authenticator ?? 'password')(ctx, () => { const user = ctx.state.currentUser.toJSON(); const token = jwtService.sign({ userId: user.id }); ctx.body = { @@ -60,7 +60,10 @@ export async function lostpassword(ctx: Context, next: Next) { }, }); if (!user) { - ctx.throw(404, { code: 'InvalidUserData', message: ctx.t('The email is incorrect, please re-enter', { ns: namespace }) }); + ctx.throw(404, { + code: 'InvalidUserData', + message: ctx.t('The email is incorrect, please re-enter', { ns: namespace }), + }); } user.resetToken = crypto.randomBytes(20).toString('hex'); await user.save(); @@ -114,7 +117,7 @@ export async function updateProfile(ctx: Context, next: Next) { const UserRepo = ctx.db.getRepository('users'); const result = await UserRepo.update({ filterByTk: currentUser.id, - values + values, }); ctx.body = result; await next(); diff --git a/packages/plugins/users/src/authenticators/index.ts b/packages/plugins/users/src/authenticators/index.ts index 4a5a9d34c..cb18b3cf0 100644 --- a/packages/plugins/users/src/authenticators/index.ts +++ b/packages/plugins/users/src/authenticators/index.ts @@ -6,17 +6,19 @@ import { HandlerType } from '@nocobase/resourcer'; import Plugin from '..'; interface Authenticators { - [key: string]: HandlerType -}; + [key: string]: HandlerType; +} -export default function(plugin: Plugin, more: Authenticators = {}) { +export default function (plugin: Plugin, more: Authenticators = {}) { const { authenticators } = plugin; - const natives = [ - 'password' - ].reduce((result, key) => Object.assign(result, { - [key]: requireModule(path.isAbsolute(key) ? key : path.join(__dirname, key)) as HandlerType - }), {}); + const natives = ['password'].reduce( + (result, key) => + Object.assign(result, { + [key]: requireModule(path.isAbsolute(key) ? key : path.join(__dirname, key)) as HandlerType, + }), + {}, + ); for (const [name, authenticator] of Object.entries({ ...more, ...natives })) { authenticators.register(name, authenticator); diff --git a/packages/plugins/users/src/authenticators/password.ts b/packages/plugins/users/src/authenticators/password.ts index a8d3a599b..f64783578 100644 --- a/packages/plugins/users/src/authenticators/password.ts +++ b/packages/plugins/users/src/authenticators/password.ts @@ -2,11 +2,14 @@ import { PasswordField } from '@nocobase/database'; import { Context, Next } from '@nocobase/actions'; import { namespace } from '..'; -export default async function(ctx: Context, next: Next) { +export default async function (ctx: Context, next: Next) { const { uniqueField = 'email', values } = ctx.action.params; if (!values[uniqueField]) { - return ctx.throw(400, { code: 'InvalidUserData', message: ctx.t('Please fill in your email address', { ns: namespace }) }); + return ctx.throw(400, { + code: 'InvalidUserData', + message: ctx.t('Please fill in your email address', { ns: namespace }), + }); } const User = ctx.db.getCollection('users'); const user = await User.model.findOne({ diff --git a/packages/plugins/users/src/locale/en-US.ts b/packages/plugins/users/src/locale/en-US.ts index 665bd8e77..8da957a8b 100644 --- a/packages/plugins/users/src/locale/en-US.ts +++ b/packages/plugins/users/src/locale/en-US.ts @@ -1,8 +1,10 @@ export default { - "The email is incorrect, please re-enter": "The email is incorrect, please re-enter", - "Please fill in your email address": "Please fill in your email address", - "The password is incorrect, please re-enter": "The password is incorrect, please re-enter", - "Not a valid cellphone number, please re-enter": "Not a valid cellphone number, please re-enter", - "The phone number has been registered, please login directly": "The phone number has been registered, please login directly", - "The phone number is not registered, please register first": "The phone number is not registered, please register first" + 'The email is incorrect, please re-enter': 'The email is incorrect, please re-enter', + 'Please fill in your email address': 'Please fill in your email address', + 'The password is incorrect, please re-enter': 'The password is incorrect, please re-enter', + 'Not a valid cellphone number, please re-enter': 'Not a valid cellphone number, please re-enter', + 'The phone number has been registered, please login directly': + 'The phone number has been registered, please login directly', + 'The phone number is not registered, please register first': + 'The phone number is not registered, please register first', }; diff --git a/packages/plugins/users/src/locale/pt-BR.ts b/packages/plugins/users/src/locale/pt-BR.ts index 80a959b85..d6b5f77ec 100644 --- a/packages/plugins/users/src/locale/pt-BR.ts +++ b/packages/plugins/users/src/locale/pt-BR.ts @@ -1,8 +1,10 @@ export default { - "The email is incorrect, please re-enter": "O e-mail estรก incorreto, por favor, digite novamente", - "Please fill in your email address": "Por favor, preencha o seu endereรงo de e-mail", - "The password is incorrect, please re-enter": "A senha estรก incorreta, por favor, digite novamente", - "Not a valid cellphone number, please re-enter": "Nรบmero de celular invรกlido, por favor, digite novamente", - "The phone number has been registered, please login directly": "O nรบmero de celular jรก estรก registrado, por favor, faรงa login diretamente", - "The phone number is not registered, please register first": "O nรบmero de celular nรฃo estรก registrado, por favor, registre-se primeiro" + 'The email is incorrect, please re-enter': 'O e-mail estรก incorreto, por favor, digite novamente', + 'Please fill in your email address': 'Por favor, preencha o seu endereรงo de e-mail', + 'The password is incorrect, please re-enter': 'A senha estรก incorreta, por favor, digite novamente', + 'Not a valid cellphone number, please re-enter': 'Nรบmero de celular invรกlido, por favor, digite novamente', + 'The phone number has been registered, please login directly': + 'O nรบmero de celular jรก estรก registrado, por favor, faรงa login diretamente', + 'The phone number is not registered, please register first': + 'O nรบmero de celular nรฃo estรก registrado, por favor, registre-se primeiro', }; diff --git a/packages/plugins/users/src/server.ts b/packages/plugins/users/src/server.ts index a1ccdbfb6..41ad97154 100644 --- a/packages/plugins/users/src/server.ts +++ b/packages/plugins/users/src/server.ts @@ -56,7 +56,7 @@ export default class UsersPlugin extends Plugin { }); this.db.on('afterDefineCollection', (collection: Collection) => { - let { createdBy, updatedBy } = collection.options; + const { createdBy, updatedBy } = collection.options; if (createdBy === true) { collection.setField('createdById', { type: 'context', diff --git a/packages/plugins/verification/src/client/ProviderOptions.tsx b/packages/plugins/verification/src/client/ProviderOptions.tsx index 67a74ecf2..74e6d8607 100644 --- a/packages/plugins/verification/src/client/ProviderOptions.tsx +++ b/packages/plugins/verification/src/client/ProviderOptions.tsx @@ -5,7 +5,6 @@ import { observer, RecursionField, Schema, useField, useForm } from '@formily/re import providerTypes from './providerTypes'; - export default observer((props) => { const form = useForm(); const field = useField(); diff --git a/packages/plugins/verification/src/client/VerificationProviders.tsx b/packages/plugins/verification/src/client/VerificationProviders.tsx index 18f730780..7c3690efa 100644 --- a/packages/plugins/verification/src/client/VerificationProviders.tsx +++ b/packages/plugins/verification/src/client/VerificationProviders.tsx @@ -1,9 +1,9 @@ -import { SchemaComponent } from "@nocobase/client"; -import React from "react"; +import { SchemaComponent } from '@nocobase/client'; +import React from 'react'; import { Card } from 'antd'; -import providers from "./schemas/providers"; -import ProviderOptions from "./ProviderOptions"; +import providers from './schemas/providers'; +import ProviderOptions from './ProviderOptions'; export function VerificationProviders() { return ( @@ -11,9 +11,9 @@ export function VerificationProviders() { ); -}; +} diff --git a/packages/plugins/verification/src/client/index.tsx b/packages/plugins/verification/src/client/index.tsx index b59c4e067..df0a83951 100644 --- a/packages/plugins/verification/src/client/index.tsx +++ b/packages/plugins/verification/src/client/index.tsx @@ -8,7 +8,7 @@ import { VerificationProviders } from './VerificationProviders'; export { default as verificationProviderTypes } from './providerTypes'; -export default function(props) { +export default function (props) { const ctx = useContext(PluginManagerContext); return ( ); -}; - - +} diff --git a/packages/plugins/verification/src/client/locale/index.ts b/packages/plugins/verification/src/client/locale/index.ts index f12acde31..7a79087b8 100644 --- a/packages/plugins/verification/src/client/locale/index.ts +++ b/packages/plugins/verification/src/client/locale/index.ts @@ -1,7 +1,6 @@ import { i18n } from '@nocobase/client'; import { useTranslation } from 'react-i18next'; - export const NAMESPACE = 'verification'; // i18n.addResources('zh-CN', NAMESPACE, zhCN); diff --git a/packages/plugins/verification/src/client/locale/pt-BR.ts b/packages/plugins/verification/src/client/locale/pt-BR.ts index 92ed55a58..29c6b4f96 100644 --- a/packages/plugins/verification/src/client/locale/pt-BR.ts +++ b/packages/plugins/verification/src/client/locale/pt-BR.ts @@ -1,20 +1,20 @@ export default { - 'Verification': 'Verificaรงรฃo', + Verification: 'Verificaรงรฃo', 'Verification providers': 'Provedores de verificaรงรฃo', 'Provider type': 'Tipo de provedor', - + // aliyun sms 'Aliyun SMS': 'Serviรงo de Mensagem de Texto Aliyun', 'Access Key ID': 'ID da chave de acesso', 'Access Key Secret': 'Chave secreta de acesso', - 'Endpoint': 'Ponto de extremidade', - 'Sign': 'Assinatura', + Endpoint: 'Ponto de extremidade', + Sign: 'Assinatura', 'Template code': 'Cรณdigo do modelo', - + 'Secret Id': 'ID secreto', 'Secret Key': 'Chave secreta', - 'Region': 'Regiรฃo', + Region: 'Regiรฃo', 'Sign name': 'Conteรบdo de assinatura de SMS', 'Sms sdk app id': 'ID do aplicativo de SMS', - 'Template Id': 'ID do modelo de SMS' + 'Template Id': 'ID do modelo de SMS', }; diff --git a/packages/plugins/verification/src/client/locale/zh-CN.ts b/packages/plugins/verification/src/client/locale/zh-CN.ts index d5d8dcaac..814ba398a 100644 --- a/packages/plugins/verification/src/client/locale/zh-CN.ts +++ b/packages/plugins/verification/src/client/locale/zh-CN.ts @@ -1,5 +1,5 @@ export default { - 'Verification': '้ชŒ่ฏ็ ', + Verification: '้ชŒ่ฏ็ ', 'Verification providers': '้ชŒ่ฏ็ ๆไพ›ๅ•†', 'Provider type': 'ๆไพ›ๅ•†็ฑปๅž‹', @@ -7,14 +7,14 @@ export default { 'Aliyun SMS': '้˜ฟ้‡Œไบ‘็ŸญไฟกๆœๅŠก', 'Access Key ID': 'Access Key ID', 'Access Key Secret': 'Access Key Secret', - 'Endpoint': 'ๆŽฅๅ…ฅ็‚น', - 'Sign': '็ญพๅ', + Endpoint: 'ๆŽฅๅ…ฅ็‚น', + Sign: '็ญพๅ', 'Template code': 'ๆจกๆฟไปฃ็ ', 'Secret Id': 'Secret Id', 'Secret Key': 'Secret Key', - 'Region': 'ๅœฐๅŸŸ', + Region: 'ๅœฐๅŸŸ', 'Sign name': '็Ÿญไฟก็ญพๅๅ†…ๅฎน', 'Sms sdk app id': '็Ÿญไฟกๅบ”็”จ ID', - 'Template Id': '็Ÿญไฟกๆจกๆฟ ID' + 'Template Id': '็Ÿญไฟกๆจกๆฟ ID', }; diff --git a/packages/plugins/verification/src/client/providerTypes/index.ts b/packages/plugins/verification/src/client/providerTypes/index.ts index c9fdafaca..bfd73ca57 100644 --- a/packages/plugins/verification/src/client/providerTypes/index.ts +++ b/packages/plugins/verification/src/client/providerTypes/index.ts @@ -1,5 +1,5 @@ import { ISchema } from '@formily/react'; -import { Registry } from "@nocobase/utils/client"; +import { Registry } from '@nocobase/utils/client'; import SMSAliyun from './sms-aliyun'; import SMSTencent from './sms-tencent'; diff --git a/packages/plugins/verification/src/client/providerTypes/sms-aliyun.ts b/packages/plugins/verification/src/client/providerTypes/sms-aliyun.ts index 4d29c546c..4bd65067c 100644 --- a/packages/plugins/verification/src/client/providerTypes/sms-aliyun.ts +++ b/packages/plugins/verification/src/client/providerTypes/sms-aliyun.ts @@ -34,6 +34,6 @@ export default { type: 'string', 'x-decorator': 'FormItem', 'x-component': 'Input', - } - } + }, + }, } as ISchema; diff --git a/packages/plugins/verification/src/client/providerTypes/sms-tencent.ts b/packages/plugins/verification/src/client/providerTypes/sms-tencent.ts index 139da826e..4e9868780 100644 --- a/packages/plugins/verification/src/client/providerTypes/sms-tencent.ts +++ b/packages/plugins/verification/src/client/providerTypes/sms-tencent.ts @@ -47,6 +47,6 @@ export default { type: 'string', 'x-decorator': 'FormItem', 'x-component': 'Input', - } - } + }, + }, } as ISchema; diff --git a/packages/plugins/verification/src/client/schemas/providers.ts b/packages/plugins/verification/src/client/schemas/providers.ts index 4de319101..6fe8953b5 100644 --- a/packages/plugins/verification/src/client/schemas/providers.ts +++ b/packages/plugins/verification/src/client/schemas/providers.ts @@ -14,7 +14,7 @@ const collection = { type: 'string', 'x-component': 'Input', required: true, - } + }, }, { type: 'string', @@ -25,7 +25,7 @@ const collection = { type: 'string', 'x-component': 'Input', required: true, - } + }, }, { type: 'string', @@ -50,9 +50,9 @@ const collection = { title: '{{t("Default")}}', type: 'boolean', 'x-component': 'Checkbox', - } - } - ] + }, + }, + ], }; export default { @@ -129,7 +129,8 @@ export default { id: { 'x-component': 'CollectionField', 'x-decorator': 'FormItem', - description: '{{t("Identifier for program usage. Support letters, numbers and underscores, must start with an letter.")}}', + description: + '{{t("Identifier for program usage. Support letters, numbers and underscores, must start with an letter.")}}', }, title: { 'x-component': 'CollectionField', @@ -231,8 +232,8 @@ export default { type: 'boolean', 'x-component': 'CollectionField', 'x-read-pretty': true, - } - } + }, + }, }, actions: { type: 'void', diff --git a/packages/plugins/verification/src/server/__tests__/Plugin.test.ts b/packages/plugins/verification/src/server/__tests__/Plugin.test.ts index d27ea159c..f99f7675d 100644 --- a/packages/plugins/verification/src/server/__tests__/Plugin.test.ts +++ b/packages/plugins/verification/src/server/__tests__/Plugin.test.ts @@ -5,8 +5,6 @@ import Plugin, { Provider } from '..'; import { getApp, sleep } from '.'; - - describe('verification > Plugin', () => { let app: MockServer; let agent; @@ -32,7 +30,7 @@ describe('verification > Plugin', () => { provider = await VerificationProviderModel.create({ id: 'fake1', type: 'fake', - default: true + default: true, }); }); @@ -44,21 +42,21 @@ describe('verification > Plugin', () => { getReceiver(ctx) { return ctx.action.params.values.phone; }, - expiresIn: 2 + expiresIn: 2, }); }); it('submit in time', async () => { const res1 = await agent.resource('authors').create({ - values: { phone: '1' } + values: { phone: '1' }, }); expect(res1.status).toBe(400); const res2 = await agent.resource('verifications').create({ values: { type: 'authors:create', - phone: '1' - } + phone: '1', + }, }); expect(res2.status).toBe(200); expect(res2.body.data.id).toBeDefined(); @@ -69,14 +67,14 @@ describe('verification > Plugin', () => { const res3 = await agent.resource('verifications').create({ values: { type: 'authors:create', - phone: '1' - } + phone: '1', + }, }); expect(res3.status).toBe(429); const verification = await VerificationModel.findByPk(res2.body.data.id); const res4 = await agent.resource('authors').create({ - values: { phone: '1', code: verification.get('content') } + values: { phone: '1', code: verification.get('content') }, }); expect(res4.status).toBe(200); }); @@ -85,15 +83,15 @@ describe('verification > Plugin', () => { const res1 = await agent.resource('verifications').create({ values: { type: 'authors:create', - phone: '1' - } + phone: '1', + }, }); await sleep(2000); const verification = await VerificationModel.findByPk(res1.body.data.id); const res2 = await agent.resource('authors').create({ - values: { phone: '1', code: verification.get('content') } + values: { phone: '1', code: verification.get('content') }, }); expect(res2.status).toBe(400); }); @@ -106,13 +104,13 @@ describe('verification > Plugin', () => { getReceiver(ctx) { return ctx.action.params.values.phone; }, - expiresIn: 2 + expiresIn: 2, }); }); it('will not intercept', async () => { const res1 = await agent.resource('authors').create({ - values: { phone: '1' } + values: { phone: '1' }, }); expect(res1.status).toBe(200); }); @@ -121,7 +119,7 @@ describe('verification > Plugin', () => { app.resourcer.registerActionHandler('authors:create', plugin.intercept); const res1 = await agent.resource('authors').create({ - values: { phone: '1' } + values: { phone: '1' }, }); expect(res1.status).toBe(400); }); @@ -133,7 +131,7 @@ describe('verification > Plugin', () => { getReceiver(ctx) { return ctx.action.params.values.phone; }, - validate: Boolean + validate: Boolean, }); }); @@ -141,8 +139,8 @@ describe('verification > Plugin', () => { const res1 = await agent.resource('verifications').create({ values: { type: 'authors:create', - phone: '1' - } + phone: '1', + }, }); expect(res1.status).toBe(200); }); @@ -151,8 +149,8 @@ describe('verification > Plugin', () => { const res1 = await agent.resource('verifications').create({ values: { type: 'authors:create', - phone: '' - } + phone: '', + }, }); expect(res1.status).toBe(400); }); diff --git a/packages/plugins/verification/src/server/__tests__/collections/authors.ts b/packages/plugins/verification/src/server/__tests__/collections/authors.ts index 9f8f94ca4..ab6dbdb8f 100644 --- a/packages/plugins/verification/src/server/__tests__/collections/authors.ts +++ b/packages/plugins/verification/src/server/__tests__/collections/authors.ts @@ -9,7 +9,7 @@ export default { }, { type: 'string', - name: 'phone' - } - ] + name: 'phone', + }, + ], } as CollectionOptions; diff --git a/packages/plugins/verification/src/server/__tests__/index.ts b/packages/plugins/verification/src/server/__tests__/index.ts index a5f994c12..cb90630f7 100644 --- a/packages/plugins/verification/src/server/__tests__/index.ts +++ b/packages/plugins/verification/src/server/__tests__/index.ts @@ -5,7 +5,7 @@ import { ApplicationOptions } from '@nocobase/server'; import Plugin from '..'; export function sleep(ms: number) { - return new Promise(resolve => { + return new Promise((resolve) => { setTimeout(resolve, ms); }); } @@ -22,7 +22,7 @@ export async function getApp({ manual, ...options }: MockAppOptions = {}): Promi await app.load(); await app.db.import({ - directory: path.resolve(__dirname, './collections') + directory: path.resolve(__dirname, './collections'), }); try { diff --git a/packages/plugins/verification/src/server/actions/index.ts b/packages/plugins/verification/src/server/actions/index.ts index 37a3e4a70..62567dd8a 100644 --- a/packages/plugins/verification/src/server/actions/index.ts +++ b/packages/plugins/verification/src/server/actions/index.ts @@ -1,14 +1,17 @@ import * as verifications from './verifications'; function make(name, mod) { - return Object.keys(mod).reduce((result, key) => ({ - ...result, - [`${name}:${key}`]: mod[key] - }), {}) + return Object.keys(mod).reduce( + (result, key) => ({ + ...result, + [`${name}:${key}`]: mod[key], + }), + {}, + ); } export default function ({ app }) { app.actions({ - ...make('verifications', verifications) + ...make('verifications', verifications), }); } diff --git a/packages/plugins/verification/src/server/actions/verifications.ts b/packages/plugins/verification/src/server/actions/verifications.ts index d553c9f8b..a5e5fae41 100644 --- a/packages/plugins/verification/src/server/actions/verifications.ts +++ b/packages/plugins/verification/src/server/actions/verifications.ts @@ -19,7 +19,7 @@ export async function create(context: Context, next: Next) { return context.throw(400, 'Invalid action type'); } - const providerItem = await plugin.getDefault() + const providerItem = await plugin.getDefault(); if (!providerItem) { console.error(`[verification] no provider for action (${values.type}) provided`); return context.throw(500); @@ -27,7 +27,10 @@ export async function create(context: Context, next: Next) { const receiver = interceptor.getReceiver(context); if (!receiver) { - return context.throw(400, { code: 'InvalidReceiver', message: context.t('Not a valid cellphone number, please re-enter', { ns: namespace }) }); + return context.throw(400, { + code: 'InvalidReceiver', + message: context.t('Not a valid cellphone number, please re-enter', { ns: namespace }), + }); } const VerificationModel = context.db.getModel('verifications'); const record = await VerificationModel.findOne({ @@ -36,17 +39,20 @@ export async function create(context: Context, next: Next) { receiver, status: CODE_STATUS_UNUSED, expiresAt: { - [Op.gt]: new Date() - } - } + [Op.gt]: new Date(), + }, + }, }); if (record) { const seconds = moment(record.get('expiresAt')).diff(moment(), 'seconds'); // return context.throw(429, { code: 'RateLimit', message: context.t('Please don\'t retry in {{time}}', { time: moment().locale('zh').to(record.get('expiresAt')) }) }); - return context.throw(429, { code: 'RateLimit', message: context.t('Please don\'t retry in {{time}} seconds', { time: seconds, ns: namespace }) }); + return context.throw(429, { + code: 'RateLimit', + message: context.t("Please don't retry in {{time}} seconds", { time: seconds, ns: namespace }), + }); } - const code = ((await asyncRandomInt(999999))).toString(10).padStart(6, '0'); + const code = (await asyncRandomInt(999999)).toString(10).padStart(6, '0'); if (interceptor.validate) { try { await interceptor.validate(context, receiver); @@ -65,12 +71,18 @@ export async function create(context: Context, next: Next) { switch (error.name) { case 'InvalidReceiver': // TODO: message should consider email and other providers, maybe use "receiver" - return context.throw(400, { code: 'InvalidReceiver', message: context.t('Not a valid cellphone number, please re-enter', { ns: namespace }) }); + return context.throw(400, { + code: 'InvalidReceiver', + message: context.t('Not a valid cellphone number, please re-enter', { ns: namespace }), + }); case 'RateLimit': return context.throw(429, context.t('You are trying so frequently, please slow down', { ns: namespace })); default: console.error(error); - return context.throw(500, context.t('Verification send failed, please try later or contact to administrator', { ns: namespace })); + return context.throw( + 500, + context.t('Verification send failed, please try later or contact to administrator', { ns: namespace }), + ); } } @@ -81,20 +93,23 @@ export async function create(context: Context, next: Next) { content: code, expiresAt: Date.now() + (interceptor.expiresIn ?? 60) * 1000, status: CODE_STATUS_UNUSED, - providerId: providerItem.get('id') + providerId: providerItem.get('id'), }; - context.action.mergeParams({ - values: data - }, { - values: 'overwrite' - }); + context.action.mergeParams( + { + values: data, + }, + { + values: 'overwrite', + }, + ); await actions.create(context, async () => { const { body: result } = context; context.body = { id: result.id, - expiresAt: result.expiresAt + expiresAt: result.expiresAt, }; return next(); diff --git a/packages/plugins/verification/src/server/providers/index.ts b/packages/plugins/verification/src/server/providers/index.ts index a820b3bde..bbbbe9218 100644 --- a/packages/plugins/verification/src/server/providers/index.ts +++ b/packages/plugins/verification/src/server/providers/index.ts @@ -5,27 +5,26 @@ import { requireModule } from '@nocobase/utils'; import Plugin from '../Plugin'; import { PROVIDER_TYPE_SMS_ALIYUN, PROVIDER_TYPE_SMS_TENCENT } from '../constants'; - - export class Provider { - constructor(protected plugin: Plugin, protected options) { } + constructor(protected plugin: Plugin, protected options) {} - async send(receiver: string, data: { [key: string]: any }): Promise { } + async send(receiver: string, data: { [key: string]: any }): Promise {} } interface Providers { - [key: string]: typeof Provider + [key: string]: typeof Provider; } export default function (plugin: Plugin, more: Providers = {}) { const { providers } = plugin; - const natives = [ - PROVIDER_TYPE_SMS_ALIYUN, - PROVIDER_TYPE_SMS_TENCENT - ].reduce((result, key) => Object.assign(result, { - [key]: requireModule(path.isAbsolute(key) ? key : path.join(__dirname, key)) as typeof Provider - }), {} as Providers); + const natives = [PROVIDER_TYPE_SMS_ALIYUN, PROVIDER_TYPE_SMS_TENCENT].reduce( + (result, key) => + Object.assign(result, { + [key]: requireModule(path.isAbsolute(key) ? key : path.join(__dirname, key)) as typeof Provider, + }), + {} as Providers, + ); for (const [name, provider] of Object.entries({ ...more, ...natives })) { providers.register(name, provider); diff --git a/packages/plugins/verification/src/server/providers/sms-aliyun.ts b/packages/plugins/verification/src/server/providers/sms-aliyun.ts index 4ed440dfb..949cc1b29 100644 --- a/packages/plugins/verification/src/server/providers/sms-aliyun.ts +++ b/packages/plugins/verification/src/server/providers/sms-aliyun.ts @@ -4,7 +4,6 @@ import { RuntimeOptions } from '@alicloud/tea-util'; import { Provider } from '.'; - export default class extends Provider { client: DysmsApi; @@ -13,7 +12,7 @@ export default class extends Provider { const { accessKeyId, accessKeySecret, endpoint } = this.options; - let config = new OpenApi.Config({ + const config = new OpenApi.Config({ // ๆ‚จ็š„ AccessKey ID accessKeyId: accessKeyId, // ๆ‚จ็š„ AccessKey Secret @@ -22,7 +21,7 @@ export default class extends Provider { // ่ฎฟ้—ฎ็š„ๅŸŸๅ config.endpoint = endpoint; - this.client = new DysmsApi(config); + this.client = new DysmsApi(config); } async send(phoneNumbers, data = {}) { @@ -30,12 +29,12 @@ export default class extends Provider { phoneNumbers, signName: this.options.sign, templateCode: this.options.template, - templateParam: JSON.stringify(data) + templateParam: JSON.stringify(data), }); try { const { body } = await this.client.sendSmsWithOptions(request, new RuntimeOptions({})); - let err = new Error(body.message); + const err = new Error(body.message); switch (body.code) { case 'OK': break; diff --git a/packages/plugins/verification/src/server/providers/sms-tencent.ts b/packages/plugins/verification/src/server/providers/sms-tencent.ts index dfdb40d6a..75ef9fa7b 100644 --- a/packages/plugins/verification/src/server/providers/sms-tencent.ts +++ b/packages/plugins/verification/src/server/providers/sms-tencent.ts @@ -1,5 +1,5 @@ import { Provider } from '.'; -import * as tencentcloud from "tencentcloud-sdk-nodejs" +import * as tencentcloud from 'tencentcloud-sdk-nodejs'; // ๅฏผๅ…ฅๅฏนๅบ”ไบงๅ“ๆจกๅ—็š„client modelsใ€‚ const smsClient = tencentcloud.sms.v20210111.Client; @@ -12,46 +12,44 @@ export default class extends Provider { const { secretId, secretKey, region, endpoint } = this.options; - /* ๅฎžไพ‹ๅŒ–่ฆ่ฏทๆฑ‚ไบงๅ“(ไปฅsmsไธบไพ‹)็š„clientๅฏน่ฑก */ this.client = new smsClient({ credential: { secretId, - secretKey + secretKey, }, region, profile: { httpProfile: { - endpoint + endpoint, }, }, - }) + }); } - async send(phoneNumbers, data: { code: string }) { - const { SignName, TemplateId, SmsSdkAppId } = this.options + const { SignName, TemplateId, SmsSdkAppId } = this.options; const result = await this.client.SendSms({ PhoneNumberSet: [phoneNumbers], SignName, TemplateId, SmsSdkAppId, - TemplateParamSet: [data.code] - }) + TemplateParamSet: [data.code], + }); - const errCode = result.SendStatusSet[0].Code - const error = new Error(`${errCode}:${result.SendStatusSet[0].Message}`) + const errCode = result.SendStatusSet[0].Code; + const error = new Error(`${errCode}:${result.SendStatusSet[0].Message}`); switch (errCode) { case 'Ok': - return result.RequestId + return result.RequestId; case 'InvalidParameterValue.IncorrectPhoneNumber': - error.name = 'InvalidReceiver' + error.name = 'InvalidReceiver'; case 'LimitExceeded.DeliveryFrequencyLimit': case 'LimitExceeded.PhoneNumberDailyLimit': case 'LimitExceeded.PhoneNumberThirtySecondLimit': case 'LimitExceeded.PhoneNumberOneHourLimit': - error.name = 'RateLimit' + error.name = 'RateLimit'; } - throw error + throw error; } } diff --git a/packages/plugins/workflow/src/client/AddButton.tsx b/packages/plugins/workflow/src/client/AddButton.tsx index 6fa75ce58..89b18918e 100644 --- a/packages/plugins/workflow/src/client/AddButton.tsx +++ b/packages/plugins/workflow/src/client/AddButton.tsx @@ -2,20 +2,16 @@ import React from 'react'; import { cx } from '@emotion/css'; import { Dropdown, Menu, Button } from 'antd'; import { PlusOutlined } from '@ant-design/icons'; -import { - useAPIClient, - useCompile -} from '@nocobase/client'; +import { useAPIClient, useCompile } from '@nocobase/client'; import { useFlowContext } from './FlowContext'; import { Instruction, instructions } from './nodes'; import { addButtonClass } from './style'; import { NAMESPACE } from './locale'; - interface AddButtonProps { upstream; branchIndex?: number | null; -}; +} export function AddButton({ upstream, branchIndex = null }: AddButtonProps) { const compile = useCompile(); @@ -32,24 +28,26 @@ export function AddButton({ upstream, branchIndex = null }: AddButtonProps) { const [optionKey] = keyPath; const instruction = instructions.get(type); if (optionKey) { - const { value } = instruction.options?.find(item => item.key === optionKey) ?? {}; + const { value } = instruction.options?.find((item) => item.key === optionKey) ?? {}; Object.assign(config, value); } - const { data: { data: node } } = await resource.create!({ + const { + data: { data: node }, + } = await resource.create!({ values: { type, upstreamId: upstream?.id ?? null, branchIndex, title: compile(instruction.title), - config - } + config, + }, }); refresh(); } - const instructionList = (Array.from(instructions.getValues()) as Instruction[]); + const instructionList = Array.from(instructions.getValues()) as Instruction[]; const groups = [ { key: 'control', label: `{{t("Control", { ns: "${NAMESPACE}" })}}` }, @@ -57,22 +55,24 @@ export function AddButton({ upstream, branchIndex = null }: AddButtonProps) { { key: 'manual', label: `{{t("Manual", { ns: "${NAMESPACE}" })}}` }, { key: 'extended', label: `{{t("Extended types", { ns: "${NAMESPACE}" })}}` }, ] - .filter(group => instructionList.filter(item => item.group === group.key).length) - .map(group => { - const groupInstructions = instructionList.filter(item => item.group === group.key); + .filter((group) => instructionList.filter((item) => item.group === group.key).length) + .map((group) => { + const groupInstructions = instructionList.filter((item) => item.group === group.key); return { ...group, type: 'group', - children: groupInstructions.map(item => ({ + children: groupInstructions.map((item) => ({ key: item.type, label: item.title, type: item.options ? 'subMenu' : null, - children: item.options ? item.options.map(option => ({ - key: option.key, - label: option.label, - })) : null - })) + children: item.options + ? item.options.map((option) => ({ + key: option.key, + label: option.label, + })) + : null, + })), }; }); @@ -80,11 +80,11 @@ export function AddButton({ upstream, branchIndex = null }: AddButtonProps) {
onCreate(ev)} items={compile(groups)} />} + overlay={ onCreate(ev)} items={compile(groups)} />} disabled={workflow.executed} >
); -}; +} diff --git a/packages/plugins/workflow/src/client/Branch.tsx b/packages/plugins/workflow/src/client/Branch.tsx index 3f9f4b6c1..9d435effe 100644 --- a/packages/plugins/workflow/src/client/Branch.tsx +++ b/packages/plugins/workflow/src/client/Branch.tsx @@ -1,19 +1,19 @@ -import React from "react"; +import React from 'react'; import { cx } from '@emotion/css'; -import { branchClass } from "./style"; -import { AddButton } from "./AddButton"; +import { branchClass } from './style'; +import { AddButton } from './AddButton'; import { Node } from './nodes'; export function Branch({ from = null, entry = null, branchIndex = null, - controller = null + controller = null, }: { from?: any; entry?: any; branchIndex?: number | null; - controller?: any + controller?: any; }) { const list: any[] = []; for (let node = entry; node; node = node.downstream) { @@ -26,7 +26,9 @@ export function Branch({ {controller}
- {list.map(item => )} + {list.map((item) => ( + + ))}
); diff --git a/packages/plugins/workflow/src/client/ExecutionCanvas.tsx b/packages/plugins/workflow/src/client/ExecutionCanvas.tsx index 10bafeeeb..a517f5b66 100644 --- a/packages/plugins/workflow/src/client/ExecutionCanvas.tsx +++ b/packages/plugins/workflow/src/client/ExecutionCanvas.tsx @@ -3,11 +3,7 @@ import { Tag, Breadcrumb } from 'antd'; import { cx } from '@emotion/css'; import { Link } from 'react-router-dom'; -import { - useCompile, - useDocumentTitle, - useResourceActionContext, -} from '@nocobase/client'; +import { useCompile, useDocumentTitle, useResourceActionContext } from '@nocobase/client'; import { str2moment } from '@nocobase/utils/client'; import { FlowContext } from './FlowContext'; @@ -18,15 +14,12 @@ import { ExecutionStatusOptionsMap } from './constants'; import { lang } from './locale'; import { linkNodes } from './utils'; - - - function attachJobs(nodes, jobs: any[] = []): void { const nodesMap = new Map(); - nodes.forEach(item => nodesMap.set(item.id, item)); + nodes.forEach((item) => nodesMap.set(item.id, item)); const jobsMap = new Map(); - jobs.forEach(item => jobsMap.set(item.nodeId, item)); - for (let node of nodesMap.values()) { + jobs.forEach((item) => jobsMap.set(item.nodeId, item)); + for (const node of nodesMap.values()) { if (jobsMap.has(node.id)) { node.job = jobsMap.get(node.id); } @@ -44,31 +37,29 @@ export function ExecutionCanvas() { if (!data?.data) { if (loading) { - return
{lang('Loading')}
+ return
{lang('Loading')}
; } else { return
{lang('Load failed')}
; } } - const { - jobs = [], - workflow: { nodes = [], revisions = [], ...workflow } = {}, - ...execution - } = data?.data ?? {}; + const { jobs = [], workflow: { nodes = [], revisions = [], ...workflow } = {}, ...execution } = data?.data ?? {}; linkNodes(nodes); attachJobs(nodes, jobs); - const entry = nodes.find(item => !item.upstream); + const entry = nodes.find((item) => !item.upstream); const statusOption = ExecutionStatusOptionsMap[execution.status]; return ( - +
diff --git a/packages/plugins/workflow/src/client/ExecutionLink.tsx b/packages/plugins/workflow/src/client/ExecutionLink.tsx index bbbd93a5e..906e6ae23 100644 --- a/packages/plugins/workflow/src/client/ExecutionLink.tsx +++ b/packages/plugins/workflow/src/client/ExecutionLink.tsx @@ -4,12 +4,13 @@ import { Link } from 'react-router-dom'; import { useActionContext, useRecord } from '@nocobase/client'; - export const ExecutionLink = () => { const { t } = useTranslation(); const { id } = useRecord(); const { setVisible } = useActionContext(); return ( - setVisible(false)}>{t('View')} + setVisible(false)}> + {t('View')} + ); -} +}; diff --git a/packages/plugins/workflow/src/client/ExecutionPage.tsx b/packages/plugins/workflow/src/client/ExecutionPage.tsx index 46529848d..b1f5e0f34 100644 --- a/packages/plugins/workflow/src/client/ExecutionPage.tsx +++ b/packages/plugins/workflow/src/client/ExecutionPage.tsx @@ -5,8 +5,6 @@ import { SchemaComponent } from '@nocobase/client'; import { workflowPageClass } from './style'; import { ExecutionCanvas } from './ExecutionCanvas'; - - export const ExecutionPage = () => { const { params } = useRouteMatch(); @@ -34,7 +32,7 @@ export const ExecutionPage = () => { }, }, }, - 'x-component': 'ExecutionCanvas' + 'x-component': 'ExecutionCanvas', }, }, }} diff --git a/packages/plugins/workflow/src/client/ExecutionResourceProvider.tsx b/packages/plugins/workflow/src/client/ExecutionResourceProvider.tsx index 2894f4d22..5bf24ad5b 100644 --- a/packages/plugins/workflow/src/client/ExecutionResourceProvider.tsx +++ b/packages/plugins/workflow/src/client/ExecutionResourceProvider.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import { ResourceActionProvider, useRecord } from "@nocobase/client"; +import React from 'react'; +import { ResourceActionProvider, useRecord } from '@nocobase/client'; export const ExecutionResourceProvider = ({ request, filter = {}, ...others }) => { const workflow = useRecord(); @@ -10,14 +10,12 @@ export const ExecutionResourceProvider = ({ request, filter = {}, ...others }) = params: { ...request?.params, filter: { - ...(request?.params?.filter), + ...request?.params?.filter, key: workflow.key, - } - } - } + }, + }, + }, }; - return ( - - ); -} + return ; +}; diff --git a/packages/plugins/workflow/src/client/FlowContext.ts b/packages/plugins/workflow/src/client/FlowContext.ts index f25428d69..0c4eb3cd5 100644 --- a/packages/plugins/workflow/src/client/FlowContext.ts +++ b/packages/plugins/workflow/src/client/FlowContext.ts @@ -1,5 +1,4 @@ -import React, { useContext } from "react"; - +import React, { useContext } from 'react'; export const FlowContext = React.createContext({}); diff --git a/packages/plugins/workflow/src/client/WorkflowCanvas.tsx b/packages/plugins/workflow/src/client/WorkflowCanvas.tsx index fa9ab84af..f405c3ee4 100644 --- a/packages/plugins/workflow/src/client/WorkflowCanvas.tsx +++ b/packages/plugins/workflow/src/client/WorkflowCanvas.tsx @@ -12,7 +12,7 @@ import { SchemaComponent, useDocumentTitle, useResourceActionContext, - useResourceContext + useResourceContext, } from '@nocobase/client'; import { FlowContext, useFlowContext } from './FlowContext'; @@ -24,8 +24,6 @@ import { ExecutionLink } from './ExecutionLink'; import { lang } from './locale'; import { linkNodes } from './utils'; - - function ExecutionResourceProvider({ request, filter = {}, ...others }) { const { workflow } = useFlowContext(); const props = { @@ -35,20 +33,16 @@ function ExecutionResourceProvider({ request, filter = {}, ...others }) { params: { ...request?.params, filter: { - ...(request?.params?.filter), + ...request?.params?.filter, key: workflow.key, - } - } - } + }, + }, + }, }; - return ( - - ); + return ; } - - export function WorkflowCanvas() { const history = useHistory(); const { t } = useTranslation(); @@ -69,7 +63,7 @@ export function WorkflowCanvas() { linkNodes(nodes); - const entry = nodes.find(item => !item.upstream); + const entry = nodes.find((item) => !item.upstream); function onSwitchVersion({ key }) { if (key != workflow.id) { @@ -81,18 +75,20 @@ export function WorkflowCanvas() { await resource.update({ filterByTk: workflow.id, values: { - enabled: value - } + enabled: value, + }, }); refresh(); } async function onRevision() { - const { data: { data: revision } } = await resource.revision({ + const { + data: { data: revision }, + } = await resource.revision({ filterByTk: workflow.id, filter: { - key: workflow.key - } + key: workflow.key, + }, }); message.success(t('Operation succeeded')); @@ -111,21 +107,23 @@ export function WorkflowCanvas() { } } - const revisionable = workflow.executed && !revisions.find(item => !item.executed && new Date(item.createdAt) > new Date(workflow.createdAt)); + const revisionable = + workflow.executed && + !revisions.find((item) => !item.executed && new Date(item.createdAt) > new Date(workflow.createdAt)); return ( - +
- - {lang('Workflow')} - + {lang('Workflow')} {workflow.title} @@ -141,20 +139,24 @@ export function WorkflowCanvas() { onClick={onSwitchVersion} defaultSelectedKeys={[`${workflow.id}`]} className={cx(workflowVersionDropdownClass)} - items={revisions.sort((a, b) => b.id - a.id).map((item, index) => ({ - key: `${item.id}`, - icon: item.current ? : null, - label: ( - - {`#${item.id}`} - - - ) - }))} + items={revisions + .sort((a, b) => b.id - a.id) + .map((item, index) => ({ + key: `${item.id}`, + icon: item.current ? : null, + label: ( + + {`#${item.id}`} + + + ), + }))} /> } > @@ -189,7 +191,7 @@ export function WorkflowCanvas() { schema={executionSchema} components={{ ExecutionResourceProvider, - ExecutionLink + ExecutionLink, }} /> diff --git a/packages/plugins/workflow/src/client/WorkflowLink.tsx b/packages/plugins/workflow/src/client/WorkflowLink.tsx index 2584b9593..2610a7dc0 100644 --- a/packages/plugins/workflow/src/client/WorkflowLink.tsx +++ b/packages/plugins/workflow/src/client/WorkflowLink.tsx @@ -4,12 +4,13 @@ import { Link } from 'react-router-dom'; import { useActionContext, useRecord } from '@nocobase/client'; - export const WorkflowLink = () => { const { t } = useTranslation(); const { id } = useRecord(); const { setVisible } = useActionContext(); return ( - setVisible(false)}>{t('View')} + setVisible(false)}> + {t('View')} + ); -} +}; diff --git a/packages/plugins/workflow/src/client/WorkflowPage.tsx b/packages/plugins/workflow/src/client/WorkflowPage.tsx index 50f2ba90e..8ee788f1b 100644 --- a/packages/plugins/workflow/src/client/WorkflowPage.tsx +++ b/packages/plugins/workflow/src/client/WorkflowPage.tsx @@ -5,8 +5,6 @@ import { SchemaComponent } from '@nocobase/client'; import { workflowPageClass } from './style'; import { WorkflowCanvas } from './WorkflowCanvas'; - - export const WorkflowPage = () => { const { params } = useRouteMatch(); @@ -30,11 +28,18 @@ export const WorkflowPage = () => { action: 'get', params: { filter: params, - appends: ['nodes', 'revisions.id', 'revisions.createdAt', 'revisions.current', 'revisions.executed', 'revisions.enabled'], + appends: [ + 'nodes', + 'revisions.id', + 'revisions.createdAt', + 'revisions.current', + 'revisions.executed', + 'revisions.enabled', + ], }, }, }, - 'x-component': 'WorkflowCanvas' + 'x-component': 'WorkflowCanvas', }, }, }} diff --git a/packages/plugins/workflow/src/client/WorkflowProvider.tsx b/packages/plugins/workflow/src/client/WorkflowProvider.tsx index 99f91e9b5..f5474b0e9 100644 --- a/packages/plugins/workflow/src/client/WorkflowProvider.tsx +++ b/packages/plugins/workflow/src/client/WorkflowProvider.tsx @@ -1,6 +1,15 @@ import React, { useContext } from 'react'; import { Card } from 'antd'; -import { CollectionManagerContext, PluginManagerContext, RouteSwitchContext, SchemaComponent, SchemaComponentOptions, SettingsCenterProvider, registerField, useCollectionDataSource } from '@nocobase/client'; +import { + CollectionManagerContext, + PluginManagerContext, + RouteSwitchContext, + SchemaComponent, + SchemaComponentOptions, + SettingsCenterProvider, + registerField, + useCollectionDataSource, +} from '@nocobase/client'; import { WorkflowPage } from './WorkflowPage'; import { ExecutionPage } from './ExecutionPage'; @@ -17,8 +26,6 @@ import { WorkflowTodoBlockInitializer } from './nodes/manual/WorkflowTodoBlockIn import { DynamicExpression } from './components/DynamicExpression'; import expressionField from './interfaces/expression'; - - // registerField(expressionField.group, 'expression', expressionField); export const WorkflowContext = React.createContext({}); @@ -36,12 +43,12 @@ function WorkflowPane() { WorkflowLink, ExecutionResourceProvider, ExecutionLink, - OpenDrawer + OpenDrawer, }} /> ); -}; +} export const WorkflowProvider = (props) => { const pmCtx = useContext(PluginManagerContext); @@ -84,15 +91,17 @@ export const WorkflowProvider = (props) => { }, }} > - + { ...cmCtx, interfaces: { ...cmCtx.interfaces, - expression: expressionField - } + expression: expressionField, + }, }} > - - {props.children} - + {props.children} diff --git a/packages/plugins/workflow/src/client/WorkflowShortcut.tsx b/packages/plugins/workflow/src/client/WorkflowShortcut.tsx index 9cf1ba5d9..83e3447c9 100644 --- a/packages/plugins/workflow/src/client/WorkflowShortcut.tsx +++ b/packages/plugins/workflow/src/client/WorkflowShortcut.tsx @@ -6,8 +6,6 @@ import { PluginManager } from '@nocobase/client'; import { lang } from './locale'; - - export const WorkflowShortcut = () => { const history = useHistory(); return ( diff --git a/packages/plugins/workflow/src/client/components/CollectionBlockInitializer.tsx b/packages/plugins/workflow/src/client/components/CollectionBlockInitializer.tsx index 14fa7aa0f..acdbcf860 100644 --- a/packages/plugins/workflow/src/client/components/CollectionBlockInitializer.tsx +++ b/packages/plugins/workflow/src/client/components/CollectionBlockInitializer.tsx @@ -2,8 +2,6 @@ import React from 'react'; import { SchemaInitializer, useCollectionManager } from '@nocobase/client'; - - export function CollectionBlockInitializer({ insert, collection, dataSource, ...props }) { const { getCollection } = useCollectionManager(); const resovledCollection = getCollection(collection); @@ -17,7 +15,7 @@ export function CollectionBlockInitializer({ insert, collection, dataSource, ... title: resovledCollection.title, 'x-decorator': 'CollectionProvider', 'x-decorator-props': { - collection + collection, }, 'x-component': 'CardItem', 'x-component-props': { @@ -25,20 +23,20 @@ export function CollectionBlockInitializer({ insert, collection, dataSource, ... }, 'x-designer': 'SimpleDesigner', 'x-designer-props': { - type: 'record' + type: 'record', }, properties: { grid: { type: 'void', 'x-decorator': 'Form', 'x-decorator-props': { - useValues: '{{ useFlowRecordFromBlock }}' + useValues: '{{ useFlowRecordFromBlock }}', }, 'x-component': 'Grid', 'x-initializer': 'CollectionFieldInitializers', - 'x-context-datasource': dataSource - } - } + 'x-context-datasource': dataSource, + }, + }, }); }} /> diff --git a/packages/plugins/workflow/src/client/components/CollectionFieldInitializers.tsx b/packages/plugins/workflow/src/client/components/CollectionFieldInitializers.tsx index 34f6a2667..f4cb93823 100644 --- a/packages/plugins/workflow/src/client/components/CollectionFieldInitializers.tsx +++ b/packages/plugins/workflow/src/client/components/CollectionFieldInitializers.tsx @@ -2,8 +2,6 @@ import React from 'react'; import { cloneDeep } from 'lodash'; import { SchemaInitializer, useCollection, InitializerWithSwitch, gridRowColWrap } from '@nocobase/client'; - - function CollectionFieldInitializer({ field, ...props }) { const uiSchema = cloneDeep(field.uiSchema); delete uiSchema['x-uid']; @@ -28,21 +26,14 @@ function CollectionFieldInitializer({ field, ...props }) { export function CollectionFieldInitializers(props) { const { fields } = useCollection(); const items = fields - .filter(field => !['belongsTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type) && field.uiSchema) - .map(field => ({ - key: field.name, - type: 'item', - title: field.uiSchema.title, - component: CollectionFieldInitializer, - field - })); + .filter((field) => !['belongsTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type) && field.uiSchema) + .map((field) => ({ + key: field.name, + type: 'item', + title: field.uiSchema.title, + component: CollectionFieldInitializer, + field, + })); - return ( - - ) + return ; } diff --git a/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx b/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx index 695f4df93..992950fec 100644 --- a/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx +++ b/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx @@ -1,13 +1,20 @@ -import React from "react"; -import { observer, useForm, useField } from "@formily/react"; -import { Input, Button, Dropdown, Menu, Form } from "antd"; +import React from 'react'; +import { observer, useForm, useField } from '@formily/react'; +import { Input, Button, Dropdown, Menu, Form } from 'antd'; import { PlusOutlined, CloseCircleOutlined } from '@ant-design/icons'; -import { useTranslation } from "react-i18next"; -import { css } from "@emotion/css"; +import { useTranslation } from 'react-i18next'; +import { css } from '@emotion/css'; -import { CollectionField, CollectionProvider, SchemaComponent, Variable, useCollectionManager, useCompile } from "@nocobase/client"; -import { lang } from "../locale"; -import { useWorkflowVariableOptions } from "../variable"; +import { + CollectionField, + CollectionProvider, + SchemaComponent, + Variable, + useCollectionManager, + useCompile, +} from '@nocobase/client'; +import { lang } from '../locale'; +import { useWorkflowVariableOptions } from '../variable'; function AssociationInput(props) { const { getCollectionFields } = useCollectionManager(); @@ -15,16 +22,14 @@ function AssociationInput(props) { const fieldName = path.segments[path.segments.length - 1] as string; const { values: config } = useForm(); const fields = getCollectionFields(config?.collection); - const { type } = fields.find(item => item.name === fieldName); + const { type } = fields.find((item) => item.name === fieldName); const value = Array.isArray(props.value) ? props.value.join(',') : props.value; function onChange(ev) { const trimed = ev.target.value.trim(); props.onChange(['belongsTo', 'hasOne'].includes(type) ? trimed : trimed.split(/[,\s]+/)); } - return ( - - ); + return ; } // NOTE: observer for watching useProps @@ -35,109 +40,111 @@ export default observer(({ value, disabled, onChange }: any) => { const { getCollection, getCollectionFields } = useCollectionManager(); const { values: config } = useForm(); const collectionName = config?.collection; - const fields = getCollectionFields(collectionName) - .filter(field => ( - !field.hidden - && (field.uiSchema ? !field.uiSchema['x-read-pretty'] : false) + const fields = getCollectionFields(collectionName).filter( + (field) => + !field.hidden && + (field.uiSchema ? !field.uiSchema['x-read-pretty'] : false) && // TODO: should use some field option but not type to control this - && (!['formula'].includes(field.type)) - )); + !['formula'].includes(field.type), + ); - const unassignedFields = fields.filter(field => !(field.name in value)); + const unassignedFields = fields.filter((field) => !(field.name in value)); const scope = useWorkflowVariableOptions(); const mergedDisabled = disabled || form.disabled; return ( -
.ant-formily-item{ - flex-direction: column; + > .ant-formily-item { + flex-direction: column; - > .ant-formily-item-label{ - line-height: 32px; + > .ant-formily-item-label { + line-height: 32px; + } } - } - `}> - {fields.length - ? ( - - {fields - .filter(field => field.name in value) - .map(field => { - // constant for associations to use Input, others to use CollectionField - // dynamic values only support belongsTo/hasOne association, other association type should disable - const ConstantCompoent = ['belongsTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type) - ? AssociationInput - : CollectionField; - // TODO: try to use to replace this map - return ( - + {fields.length ? ( + + {fields + .filter((field) => field.name in value) + .map((field) => { + // constant for associations to use Input, others to use CollectionField + // dynamic values only support belongsTo/hasOne association, other association type should disable + const ConstantCompoent = ['belongsTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type) + ? AssociationInput + : CollectionField; + // TODO: try to use to replace this map + return ( + - { - onChange({ ...value, [field.name]: next }); + `} + > + { + onChange({ ...value, [field.name]: next }); + }} + > + - - - {!mergedDisabled - ? ( - - - ) - : null - } - - ) - :

{lang('Please select collection first')}

- } + /> + + {!mergedDisabled ? ( + + + ) : null} +
+ ) : ( +

{lang('Please select collection first')}

+ )}
); }); diff --git a/packages/plugins/workflow/src/client/components/Duration.tsx b/packages/plugins/workflow/src/client/components/Duration.tsx index 972b7e952..31cd7a455 100644 --- a/packages/plugins/workflow/src/client/components/Duration.tsx +++ b/packages/plugins/workflow/src/client/components/Duration.tsx @@ -1,7 +1,7 @@ -import React from "react"; -import { InputNumber, Select } from "antd"; -import { css } from "@emotion/css"; -import { lang } from "../locale"; +import React from 'react'; +import { InputNumber, Select } from 'antd'; +import { css } from '@emotion/css'; +import { lang } from '../locale'; const UnitOptions = [ { value: 1_000, label: 'Seconds' }, @@ -12,7 +12,9 @@ const UnitOptions = [ ]; function getNumberOption(v) { - return UnitOptions.slice().reverse().find(item => !(v % item.value)); + return UnitOptions.slice() + .reverse() + .find((item) => !(v % item.value)); } export default function ({ value = 60000, onChange }) { @@ -20,14 +22,18 @@ export default function ({ value = 60000, onChange }) { const quantity = Math.round(value / option.value); return ( -
- onChange(Math.round(v * option.value))}/> - onChange(Math.round(quantity * unit))}> + {UnitOptions.map((item) => ( + + {lang(item.label)} + ))}
diff --git a/packages/plugins/workflow/src/client/components/DynamicExpression.tsx b/packages/plugins/workflow/src/client/components/DynamicExpression.tsx index 1d68e1ac1..ff7b78f8a 100644 --- a/packages/plugins/workflow/src/client/components/DynamicExpression.tsx +++ b/packages/plugins/workflow/src/client/components/DynamicExpression.tsx @@ -1,15 +1,13 @@ -import React, { useState, useMemo } from "react"; +import React, { useState, useMemo } from 'react'; import { onFieldInputValueChange, onFormInitialValuesChange } from '@formily/core'; import { useForm, observer, connect, mapReadPretty, useFormEffects } from '@formily/react'; import { Tag } from 'antd'; import { useTranslation } from 'react-i18next'; -import { useRecord, Variable } from "@nocobase/client"; - -import { NAMESPACE } from "../locale"; -import { useCollectionFieldOptions } from "../variable"; - +import { useRecord, Variable } from '@nocobase/client'; +import { NAMESPACE } from '../locale'; +import { useCollectionFieldOptions } from '../variable'; const InternalExpression = observer((props: any) => { const { onChange } = props; @@ -17,7 +15,7 @@ const InternalExpression = observer((props: any) => { const [collection, setCollection] = useState(values?.sourceCollection); useFormEffects(() => { - onFormInitialValuesChange(form => { + onFormInitialValuesChange((form) => { setCollection(form.values.sourceCollection); }); onFieldInputValueChange('sourceCollection', (f) => { @@ -28,21 +26,21 @@ const InternalExpression = observer((props: any) => { const options = useCollectionFieldOptions({ collection }); - return ( - - ); + return ; }); function Result(props) { const { t } = useTranslation(); const values = useRecord(); - const options = useMemo(() => useCollectionFieldOptions({ collection: values.sourceCollection }), [values.sourceCollection, values.sourceCollection]); - return props.value - ? - : {t('Unconfigured', { ns: NAMESPACE })}; + const options = useMemo( + () => useCollectionFieldOptions({ collection: values.sourceCollection }), + [values.sourceCollection, values.sourceCollection], + ); + return props.value ? ( + + ) : ( + {t('Unconfigured', { ns: NAMESPACE })} + ); } export const DynamicExpression = connect(InternalExpression, mapReadPretty(Result)); diff --git a/packages/plugins/workflow/src/client/components/FieldsSelect.tsx b/packages/plugins/workflow/src/client/components/FieldsSelect.tsx index 29ccb5c38..8cc5f0000 100644 --- a/packages/plugins/workflow/src/client/components/FieldsSelect.tsx +++ b/packages/plugins/workflow/src/client/components/FieldsSelect.tsx @@ -2,12 +2,7 @@ import React from 'react'; import { Select } from 'antd'; import { observer, useForm } from '@formily/react'; -import { - useCollectionManager, - useCompile -} from '@nocobase/client'; - - +import { useCollectionManager, useCompile } from '@nocobase/client'; export const FieldsSelect = observer((props: any) => { const { filter = () => true, ...others } = props; @@ -20,13 +15,10 @@ export const FieldsSelect = observer((props: any) => { onChange({ operands, calculator: v })} + onChange={(v) => onChange({ operands, calculator: v })} placeholder={lang('Calculator')} > - {calculatorGroups.filter(group => Boolean(getGroupCalculators(group.value).length)).map(group => ( - - {getGroupCalculators(group.value).map(([value, { name }]) => ( - {compile(name)} - ))} - - ))} + {calculatorGroups + .filter((group) => Boolean(getGroupCalculators(group.value).length)) + .map((group) => ( + + {getGroupCalculators(group.value).map(([value, { name }]) => ( + + {compile(name)} + + ))} + + ))} onChange({ calculator, operands: [operands[0], v] }))} + onChange={(v) => onChange({ calculator, operands: [operands[0], v] })} scope={options} useTypedConstant /> @@ -180,7 +186,6 @@ export function Calculation({ calculator, operands = [], onChange }) { ); } - function CalculationItem({ value, onChange, onRemove }) { if (!value) { return null; @@ -189,20 +194,18 @@ function CalculationItem({ value, onChange, onRemove }) { const { calculator, operands = [] } = value; return ( -
- {value.group - ? ( - onChange({ ...value, group })} - /> - ) - : - } +
+ {value.group ? ( + onChange({ ...value, group })} /> + ) : ( + + )}
); @@ -215,14 +218,14 @@ function CalculationGroup({ value, onChange }) { function onAddSingle() { onChange({ ...value, - calculations: [...calculations, { not: false, calculator: 'equal' }] + calculations: [...calculations, { not: false, calculator: 'equal' }], }); } function onAddGroup() { onChange({ ...value, - calculations: [...calculations, { not: false, group: { type: 'and', calculations: [] } }] + calculations: [...calculations, { not: false, group: { type: 'and', calculations: [] } }], }); } @@ -238,30 +241,37 @@ function CalculationGroup({ value, onChange }) { } return ( -
-
+
+
{'Meet '} - onChange({ ...value, type: t })}> All Any @@ -278,28 +288,30 @@ function CalculationGroup({ value, onChange }) { /> ))}
-
- - + `} + > + +
); } function CalculationConfig({ value, onChange }) { - const rule = value && Object.keys(value).length - ? value - : { group: { type: 'and', calculations: [] } }; - return ( - onChange({ ...rule, group })} /> - ); + const rule = value && Object.keys(value).length ? value : { group: { type: 'and', calculations: [] } }; + return onChange({ ...rule, group })} />; } export default { @@ -318,12 +330,12 @@ export default { enum: [ { value: true, - label: `{{t('Continue when "Yes"', { ns: "${NAMESPACE}" })}}` + label: `{{t('Continue when "Yes"', { ns: "${NAMESPACE}" })}}`, }, { value: false, - label: `{{t('Branch into "Yes" and "No"', { ns: "${NAMESPACE}" })}}` - } + label: `{{t('Branch into "Yes" and "No"', { ns: "${NAMESPACE}" })}}`, + }, ], }, engine: { @@ -334,7 +346,7 @@ export default { 'x-component-props': { options: [ ['basic', { label: `{{t("Basic", { ns: "${NAMESPACE}" })}}` }], - ...Array.from(evaluators.getEntities()) + ...Array.from(evaluators.getEntities()), ].reduce((result: RadioWithTooltipOption[], [value, options]: any) => result.concat({ value, ...options }), []), }, required: true, @@ -349,11 +361,11 @@ export default { dependencies: ['engine'], fulfill: { state: { - visible: '{{$deps[0] === "basic"}}' - } - } + visible: '{{$deps[0] === "basic"}}', + }, + }, }, - required: true + required: true, }, expression: { type: 'string', @@ -361,7 +373,7 @@ export default { 'x-decorator': 'FormItem', 'x-component': 'Variable.TextArea', 'x-component-props': { - scope: '{{useWorkflowVariableOptions}}' + scope: '{{useWorkflowVariableOptions}}', }, ['x-validator'](value, rules, { form }) { const { values } = form; @@ -378,43 +390,55 @@ export default { dependencies: ['engine'], fulfill: { state: { - visible: '{{$deps[0] !== "basic"}}' + visible: '{{$deps[0] !== "basic"}}', }, schema: { description: '{{renderEngineReference($deps[0])}}', - } - } + }, + }, }, - required: true - } - }, - view: { - + required: true, + }, }, + view: {}, options: [ - { label: `{{t('Continue when "Yes"', { ns: "${NAMESPACE}" })}}`, key: 'rejectOnFalse', value: { rejectOnFalse: true } }, - { label: `{{t('Branch into "Yes" and "No"', { ns: "${NAMESPACE}" })}}`, key: 'branch', value: { rejectOnFalse: false } } + { + label: `{{t('Continue when "Yes"', { ns: "${NAMESPACE}" })}}`, + key: 'rejectOnFalse', + value: { rejectOnFalse: true }, + }, + { + label: `{{t('Branch into "Yes" and "No"', { ns: "${NAMESPACE}" })}}`, + key: 'branch', + value: { rejectOnFalse: false }, + }, ], render(data) { const { t } = useTranslation(); const { nodes } = useFlowContext(); - const { id, config: { rejectOnFalse } } = data; - const trueEntry = nodes.find(item => item.upstreamId === id && item.branchIndex === 1); - const falseEntry = nodes.find(item => item.upstreamId === id && item.branchIndex === 0); + const { + id, + config: { rejectOnFalse }, + } = data; + const trueEntry = nodes.find((item) => item.upstreamId === id && item.branchIndex === 1); + const falseEntry = nodes.find((item) => item.upstreamId === id && item.branchIndex === 0); return ( {rejectOnFalse ? null : (
* > .workflow-branch-lines{ - > button{ - display: none; + className={cx( + branchBlockClass, + css` + > * > .workflow-branch-lines { + > button { + display: none; + } } - } - `)} + `, + )} > - +
span{ + > span { position: absolute; top: calc(1.5em - 1px); line-height: 1em; @@ -433,20 +457,32 @@ export default { } `} > - {t('No')} - {t('Yes')} + + {t('No')} + + + {t('Yes')} +
)}
- ) + ); }, scope: { renderEngineReference, - useWorkflowVariableOptions + useWorkflowVariableOptions, }, components: { CalculationConfig, - RadioWithTooltip - } + RadioWithTooltip, + }, }; diff --git a/packages/plugins/workflow/src/client/nodes/create.tsx b/packages/plugins/workflow/src/client/nodes/create.tsx index ea9e7d574..68b476259 100644 --- a/packages/plugins/workflow/src/client/nodes/create.tsx +++ b/packages/plugins/workflow/src/client/nodes/create.tsx @@ -8,8 +8,6 @@ import { CollectionFieldInitializers } from '../components/CollectionFieldInitia import { useCollectionFieldOptions } from '../variable'; import { FieldsSelect } from '../components/FieldsSelect'; - - export default { title: `{{t("Create record", { ns: "${NAMESPACE}" })}}`, type: 'create', @@ -30,22 +28,24 @@ export default { type: 'object', properties: { values, - appends - } - } - }, - view: { - + appends, + }, + }, }, + view: {}, scope: { - useCollectionDataSource + useCollectionDataSource, }, components: { CollectionFieldset, - FieldsSelect + FieldsSelect, }, getOptions(config, types) { - return useCollectionFieldOptions({ collection: config.collection, types, depth: config.params?.appends?.length ? 1 : 0 }); + return useCollectionFieldOptions({ + collection: config.collection, + types, + depth: config.params?.appends?.length ? 1 : 0, + }); }, useInitializers(node): SchemaInitializerItemOptions | null { if (!node.config.collection) { @@ -57,10 +57,10 @@ export default { title: node.title ?? `#${node.id}`, component: CollectionBlockInitializer, collection: node.config.collection, - dataSource: `{{$jobsMapByNodeId.${node.id}}}` + dataSource: `{{$jobsMapByNodeId.${node.id}}}`, }; }, initializers: { - CollectionFieldInitializers - } + CollectionFieldInitializers, + }, }; diff --git a/packages/plugins/workflow/src/client/nodes/delay.tsx b/packages/plugins/workflow/src/client/nodes/delay.tsx index 9d1aef993..5350db741 100644 --- a/packages/plugins/workflow/src/client/nodes/delay.tsx +++ b/packages/plugins/workflow/src/client/nodes/delay.tsx @@ -1,6 +1,6 @@ -import Duration from "../components/Duration"; -import { JOB_STATUS } from "../constants"; -import { NAMESPACE } from "../locale"; +import Duration from '../components/Duration'; +import { JOB_STATUS } from '../constants'; +import { NAMESPACE } from '../locale'; export default { title: `{{t("Delay", { ns: "${NAMESPACE}" })}}`, @@ -13,7 +13,7 @@ export default { 'x-decorator': 'FormItem', 'x-component': 'Duration', default: 60000, - required: true + required: true, }, endStatus: { type: 'number', @@ -25,15 +25,12 @@ export default { { label: `{{t("Fail and exit", { ns: "${NAMESPACE}" })}}`, value: JOB_STATUS.FAILED }, ], required: true, - default: JOB_STATUS.RESOLVED - } - }, - view: { - - }, - scope: { + default: JOB_STATUS.RESOLVED, + }, }, + view: {}, + scope: {}, components: { - Duration - } + Duration, + }, }; diff --git a/packages/plugins/workflow/src/client/nodes/destroy.tsx b/packages/plugins/workflow/src/client/nodes/destroy.tsx index 0b88190ba..5335929de 100644 --- a/packages/plugins/workflow/src/client/nodes/destroy.tsx +++ b/packages/plugins/workflow/src/client/nodes/destroy.tsx @@ -19,17 +19,15 @@ export default { ['x-validator'](value) { return isValidFilter(value) ? '' : `{{t("Please add at least one condition", { ns: "${NAMESPACE}" })}}`; }, - } - } - } - }, - view: { - + }, + }, + }, }, + view: {}, scope: { - useCollectionDataSource + useCollectionDataSource, }, components: { - FilterDynamicComponent - } + FilterDynamicComponent, + }, }; diff --git a/packages/plugins/workflow/src/client/nodes/index.tsx b/packages/plugins/workflow/src/client/nodes/index.tsx index 7e5c9df02..272a0b281 100644 --- a/packages/plugins/workflow/src/client/nodes/index.tsx +++ b/packages/plugins/workflow/src/client/nodes/index.tsx @@ -1,8 +1,5 @@ import React, { useState, useContext } from 'react'; -import { - CloseOutlined, - DeleteOutlined, -} from '@ant-design/icons'; +import { CloseOutlined, DeleteOutlined } from '@ant-design/icons'; import { css, cx } from '@emotion/css'; import { ISchema, useForm } from '@formily/react'; import { Button, message, Modal, Tag, Alert, Input } from 'antd'; @@ -10,7 +7,16 @@ import { useTranslation } from 'react-i18next'; import parse from 'json-templates'; import { Registry } from '@nocobase/utils/client'; -import { ActionContext, SchemaComponent, SchemaInitializerItemOptions, useActionContext, useAPIClient, useCompile, useRequest, useResourceActionContext } from '@nocobase/client'; +import { + ActionContext, + SchemaComponent, + SchemaInitializerItemOptions, + useActionContext, + useAPIClient, + useCompile, + useRequest, + useResourceActionContext, +} from '@nocobase/client'; import { nodeBlockClass, nodeCardClass, nodeClass, nodeMetaClass, nodeTitleClass } from '../style'; import { AddButton } from '../AddButton'; @@ -29,7 +35,7 @@ import update from './update'; import destroy from './destroy'; import { JobStatusOptions, JobStatusOptionsMap } from '../constants'; import { lang, NAMESPACE } from '../locale'; -import request from "./request"; +import request from './request'; import { VariableOptions } from '../variable'; export interface Instruction { @@ -46,7 +52,7 @@ export interface Instruction { getOptions?(config, types?): VariableOptions; useInitializers?(node): SchemaInitializerItemOptions | null; initializers?: { [key: string]: any }; -}; +} export const instructions = new Registry(); @@ -80,14 +86,14 @@ function useUpdateAction() { await api.resource('flow_nodes', data.id).update?.({ filterByTk: data.id, values: { - config: form.values - } + config: form.values, + }, }); ctx.setVisible(false); refresh(); }, }; -}; +} export const NodeContext = React.createContext({}); @@ -113,35 +119,31 @@ export function Node({ data }) { return (
- {instruction.render - ? instruction.render(data) - : - } - {!instruction.endding - ? - : ( -
} + {!instruction.endding ? ( + + ) : ( +
- -
- ) - } + .anticon { + font-size: 1.5em; + line-height: 100%; + } + `} + > + +
+ )}
); @@ -160,30 +162,35 @@ export function RemoveButton() { async function onRemove() { async function onOk() { await resource.destroy?.({ - filterByTk: current.id + filterByTk: current.id, }); refresh(); } - const usingNodes = nodes.filter(node => { + const usingNodes = nodes.filter((node) => { if (node === current) { return false; } const template = parse(node.config); - const refs = template.parameters.filter(({ key }) => key.startsWith(`$jobsMapByNodeId.${current.id}.`) || key === `$jobsMapByNodeId.${current.id}`); + const refs = template.parameters.filter( + ({ key }) => key.startsWith(`$jobsMapByNodeId.${current.id}.`) || key === `$jobsMapByNodeId.${current.id}`, + ); return refs.length; }); if (usingNodes.length) { Modal.error({ title: lang('Can not delete'), - content: lang('The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.', { nodes: usingNodes.map(item => `#${item.id}`).join(', ') }), + content: lang( + 'The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.', + { nodes: usingNodes.map((item) => `#${item.id}`).join(', ') }, + ), }); return; } - const hasBranches = !nodes.find(item => item.upstream === current && item.branchIndex != null); + const hasBranches = !nodes.find((item) => item.upstream === current && item.branchIndex != null); const message = hasBranches ? t('Are you sure you want to delete it?') : lang('This node contains branches, deleting will also be preformed to them, are you sure?'); @@ -191,13 +198,11 @@ export function RemoveButton() { Modal.confirm({ title: t('Delete'), content: message, - onOk + onOk, }); } - return workflow.executed - ? null - : ( + return workflow.executed ? null : (
- ) - : null + `} + > +
+ ) : null } /> ))} @@ -104,9 +105,12 @@ export default { height: 2em; `} > - +
- ) + ); }, components: { - RadioWithTooltip - } + RadioWithTooltip, + }, }; diff --git a/packages/plugins/workflow/src/client/nodes/query.tsx b/packages/plugins/workflow/src/client/nodes/query.tsx index 083cd8773..5d045c8d8 100644 --- a/packages/plugins/workflow/src/client/nodes/query.tsx +++ b/packages/plugins/workflow/src/client/nodes/query.tsx @@ -8,8 +8,6 @@ import { FilterDynamicComponent } from '../components/FilterDynamicComponent'; import { useCollectionFieldOptions } from '../variable'; import { FieldsSelect } from '../components/FieldsSelect'; - - export default { title: `{{t("Query record", { ns: "${NAMESPACE}" })}}`, type: 'query', @@ -29,28 +27,30 @@ export default { type: 'object', properties: { filter, - appends - } + appends, + }, }, failOnEmpty: { type: 'boolean', title: `{{t("Fail on no data", { ns: "${NAMESPACE}" })}}`, 'x-decorator': 'FormItem', 'x-component': 'Checkbox', - } - }, - view: { - + }, }, + view: {}, scope: { - useCollectionDataSource + useCollectionDataSource, }, components: { FilterDynamicComponent, - FieldsSelect + FieldsSelect, }, getOptions(config, types) { - return useCollectionFieldOptions({ collection: config.collection, types, depth: config.params?.appends?.length ? 1 : 0 }); + return useCollectionFieldOptions({ + collection: config.collection, + types, + depth: config.params?.appends?.length ? 1 : 0, + }); }, useInitializers(node): SchemaInitializerItemOptions | null { if (!node.config.collection) { @@ -62,10 +62,10 @@ export default { title: node.title ?? `#${node.id}`, component: CollectionBlockInitializer, collection: node.config.collection, - dataSource: `{{$jobsMapByNodeId.${node.id}}}` + dataSource: `{{$jobsMapByNodeId.${node.id}}}`, }; }, initializers: { - CollectionFieldInitializers - } + CollectionFieldInitializers, + }, }; diff --git a/packages/plugins/workflow/src/client/nodes/request.tsx b/packages/plugins/workflow/src/client/nodes/request.tsx index 1150ee1a5..f11e95b7b 100644 --- a/packages/plugins/workflow/src/client/nodes/request.tsx +++ b/packages/plugins/workflow/src/client/nodes/request.tsx @@ -4,8 +4,6 @@ import { cx, css } from '@emotion/css'; import { NAMESPACE } from '../locale'; import { useWorkflowVariableOptions } from '../variable'; - - export default { title: `{{t("HTTP request", { ns: "${NAMESPACE}" })}}`, type: 'request', @@ -28,19 +26,18 @@ export default { { label: 'PATCH', value: 'PATCH' }, { label: 'DELETE', value: 'DELETE' }, ], - default: 'POST' + default: 'POST', }, url: { type: 'string', required: true, title: `{{t("URL", { ns: "${NAMESPACE}" })}}`, 'x-decorator': 'FormItem', - 'x-decorator-props': { - }, + 'x-decorator-props': {}, 'x-component': 'Input', 'x-component-props': { placeholder: 'https://www.nocobase.com', - className: 'full-width' + className: 'full-width', }, }, headers: { @@ -71,7 +68,7 @@ export default { 'x-component-props': { scope: useWorkflowVariableOptions, useTypedConstant: true, - } + }, }, remove: { type: 'void', @@ -117,7 +114,7 @@ export default { 'x-component-props': { scope: useWorkflowVariableOptions, useTypedConstant: true, - } + }, }, remove: { type: 'void', @@ -148,10 +145,13 @@ export default { minRows: 10, }, placeholder: `{{t("Input request data", { ns: "${NAMESPACE}" })}}`, - className: cx('full-width', css` - font-size: 90%; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - `) + className: cx( + 'full-width', + css` + font-size: 90%; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + `, + ), }, description: `{{t("Only support standard JSON data", { ns: "${NAMESPACE}" })}}`, }, @@ -173,7 +173,7 @@ export default { title: `{{t("Ignore fail request and continue workflow", { ns: "${NAMESPACE}" })}}`, 'x-decorator': 'FormItem', 'x-component': 'Checkbox', - } + }, }, view: {}, scope: {}, diff --git a/packages/plugins/workflow/src/client/nodes/update.tsx b/packages/plugins/workflow/src/client/nodes/update.tsx index 89f4f01cd..bfb1c914b 100644 --- a/packages/plugins/workflow/src/client/nodes/update.tsx +++ b/packages/plugins/workflow/src/client/nodes/update.tsx @@ -7,8 +7,6 @@ import { isValidFilter } from '../utils'; import { NAMESPACE } from '../locale'; import { collection, filter, values } from '../schemas/collection'; - - export default { title: `{{t("Update record", { ns: "${NAMESPACE}" })}}`, type: 'update', @@ -25,18 +23,16 @@ export default { return isValidFilter(value) ? '' : `{{t("Please add at least one condition", { ns: "${NAMESPACE}" })}}`; }, }, - values - } - } - }, - view: { - + values, + }, + }, }, + view: {}, scope: { - useCollectionDataSource + useCollectionDataSource, }, components: { FilterDynamicComponent, - CollectionFieldset - } + CollectionFieldset, + }, }; diff --git a/packages/plugins/workflow/src/client/schemas/collection.ts b/packages/plugins/workflow/src/client/schemas/collection.ts index fd5f17743..26dfe4d31 100644 --- a/packages/plugins/workflow/src/client/schemas/collection.ts +++ b/packages/plugins/workflow/src/client/schemas/collection.ts @@ -1,7 +1,7 @@ -import { css } from "@emotion/css"; -import { useForm } from "@formily/react"; -import { useCollectionFilterOptions } from "@nocobase/client"; -import { NAMESPACE } from "../locale"; +import { css } from '@emotion/css'; +import { useForm } from '@formily/react'; +import { useCollectionFilterOptions } from '@nocobase/client'; +import { NAMESPACE } from '../locale'; export const collection = { type: 'string', @@ -11,8 +11,8 @@ export const collection = { 'x-decorator': 'FormItem', 'x-component': 'Select', 'x-component-props': { - placeholder: '{{t("Select collection")}}' - } + placeholder: '{{t("Select collection")}}', + }, }; export const values = { @@ -23,7 +23,7 @@ export const values = { labelAlign: 'left', className: css` flex-direction: column; - ` + `, }, 'x-component': 'CollectionFieldset', description: `{{t("Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.", { ns: "${NAMESPACE}" })}}`, @@ -43,11 +43,11 @@ export const filter = { className: css` position: relative; width: 100%; - ` + `, }; }, - dynamicComponent: 'FilterDynamicComponent' - } + dynamicComponent: 'FilterDynamicComponent', + }, }; export const appends = { @@ -61,7 +61,7 @@ export const appends = { placeholder: '{{t("Select Field")}}', filter(field) { return ['linkTo', 'belongsTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type); - } + }, }, 'x-reactions': [ { @@ -70,7 +70,7 @@ export const appends = { state: { visible: '{{!!$deps[0]}}', }, - } + }, }, - ] + ], }; diff --git a/packages/plugins/workflow/src/client/schemas/executions.tsx b/packages/plugins/workflow/src/client/schemas/executions.tsx index 681ad35d5..1cc4130e1 100644 --- a/packages/plugins/workflow/src/client/schemas/executions.tsx +++ b/packages/plugins/workflow/src/client/schemas/executions.tsx @@ -30,8 +30,13 @@ export const executionCollection = { title: `{{t("Version", { ns: "${NAMESPACE}" })}}`, ['x-component']({ value }) { const { setVisible } = useActionContext(); - return setVisible(false)}>{`#${value}`}; - } + return ( + setVisible(false)} + >{`#${value}`} + ); + }, } as ISchema, }, { @@ -45,7 +50,7 @@ export const executionCollection = { 'x-decorator': 'FormItem', enum: ExecutionStatusOptions, } as ISchema, - } + }, ], }; @@ -68,7 +73,7 @@ export const executionSchema = { appends: ['workflow.id', 'workflow.title'], pageSize: 20, sort: ['-createdAt'], - filter: {} + filter: {}, }, }, }, @@ -86,7 +91,7 @@ export const executionSchema = { // type: 'object', // 'x-component': 'Filter', // } - } + }, }, table: { type: 'void', @@ -105,11 +110,11 @@ export const executionSchema = { type: 'datetime', 'x-component': 'CollectionField', 'x-component-props': { - showTime: true + showTime: true, }, 'x-read-pretty': true, }, - } + }, }, workflowId: { type: 'void', @@ -121,7 +126,7 @@ export const executionSchema = { 'x-component': 'CollectionField', 'x-read-pretty': true, }, - } + }, }, status: { type: 'void', @@ -133,7 +138,7 @@ export const executionSchema = { 'x-component': 'CollectionField', 'x-read-pretty': true, }, - } + }, }, actions: { type: 'void', @@ -150,15 +155,15 @@ export const executionSchema = { config: { type: 'void', title: `{{t("Details", { ns: "${NAMESPACE}" })}}`, - 'x-component': 'ExecutionLink' + 'x-component': 'ExecutionLink', }, - } - } - } - } - } - } - } - } - } + }, + }, + }, + }, + }, + }, + }, + }, + }, }; diff --git a/packages/plugins/workflow/src/client/schemas/workflows.ts b/packages/plugins/workflow/src/client/schemas/workflows.ts index 7eebf1889..11a5dbc2b 100644 --- a/packages/plugins/workflow/src/client/schemas/workflows.ts +++ b/packages/plugins/workflow/src/client/schemas/workflows.ts @@ -6,8 +6,6 @@ import { NAMESPACE } from '../locale'; import { triggers } from '../triggers'; import { executionSchema } from './executions'; - - const collection = { name: 'workflows', fields: [ @@ -34,7 +32,7 @@ const collection = { enum: Array.from(triggers.getEntities()).map(([value, { title }]) => ({ value, label: title, - color: 'gold' + color: 'gold', })), required: true, } as ISchema, @@ -62,8 +60,8 @@ const collection = { ], 'x-component': 'Radio.Group', 'x-decorator': 'FormItem', - default: false - } as ISchema + default: false, + } as ISchema, }, { type: 'number', @@ -74,7 +72,7 @@ const collection = { type: 'number', 'x-component': 'InputNumber', 'x-decorator': 'FormItem', - } as ISchema + } as ISchema, }, ], }; @@ -94,7 +92,7 @@ export const workflowSchema: ISchema = { params: { pageSize: 20, filter: { - current: true + current: true, }, sort: ['-createdAt'], except: ['config'], @@ -141,8 +139,8 @@ export const workflowSchema: ISchema = { 'x-decorator': 'Form', 'x-decorator-props': { initialValue: { - current: true - } + current: true, + }, }, title: '{{t("Add new")}}', properties: { @@ -183,7 +181,7 @@ export const workflowSchema: ISchema = { }, }, }, - } + }, }, table: { type: 'void', @@ -206,7 +204,7 @@ export const workflowSchema: ISchema = { 'x-component': 'CollectionField', 'x-read-pretty': true, }, - } + }, }, type: { type: 'void', @@ -218,7 +216,7 @@ export const workflowSchema: ISchema = { 'x-component': 'CollectionField', 'x-read-pretty': true, }, - } + }, }, enabled: { type: 'void', @@ -229,9 +227,9 @@ export const workflowSchema: ISchema = { type: 'boolean', 'x-component': 'CollectionField', 'x-read-pretty': true, - default: false + default: false, }, - } + }, }, allExecuted: { type: 'void', @@ -247,10 +245,10 @@ export const workflowSchema: ISchema = { 'x-component': 'CollectionField', 'x-read-pretty': true, properties: { - drawer: executionSchema - } + drawer: executionSchema, + }, }, - } + }, }, actions: { type: 'void', @@ -266,7 +264,7 @@ export const workflowSchema: ISchema = { properties: { config: { type: 'void', - 'x-component': 'WorkflowLink' + 'x-component': 'WorkflowLink', }, update: { type: 'void', @@ -339,9 +337,9 @@ export const workflowSchema: ISchema = { refresh(); }, }; - } - } - } + }, + }, + }, // delete: { // type: 'void', // title: '{{ t("Delete") }}', @@ -354,13 +352,13 @@ export const workflowSchema: ISchema = { // useAction: '{{ cm.useDestroyActionAndRefreshCM }}', // }, // }, - } - } - } - } - } - } - } - } - } + }, + }, + }, + }, + }, + }, + }, + }, + }, }; diff --git a/packages/plugins/workflow/src/client/style.tsx b/packages/plugins/workflow/src/client/style.tsx index 9092069d6..7f2ad267e 100644 --- a/packages/plugins/workflow/src/client/style.tsx +++ b/packages/plugins/workflow/src/client/style.tsx @@ -1,33 +1,33 @@ import { css } from '@emotion/css'; export const workflowPageClass = css` - .workflow-toolbar{ + .workflow-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; background: #fff; - header{ + header { display: flex; align-items: center; min-height: 2rem; } - aside{ + aside { display: flex; align-items: center; - gap: .5em; + gap: 0.5em; } - .workflow-versions{ - label{ - margin-right: .5em; + .workflow-versions { + label { + margin-right: 0.5em; } } } - .workflow-canvas{ + .workflow-canvas { width: min-content; min-width: 100%; display: flex; @@ -35,39 +35,39 @@ export const workflowPageClass = css` align-items: center; padding: 2em; - .end{ + .end { cursor: default; - &:hover{ - box-shadow: 0 .25em .5em rgba(0, 0, 0, .1); + &:hover { + box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1); } } } `; export const workflowVersionDropdownClass = css` - .ant-dropdown-menu-item{ - .ant-dropdown-menu-title-content{ + .ant-dropdown-menu-item { + .ant-dropdown-menu-title-content { text-align: right; - time{ + time { margin-left: 0.5rem; color: #999; font-size: 80%; } - strong{ + strong { font-weight: normal; } - > .enabled{ - strong{ + > .enabled { + strong { font-weight: bold; } } - > .unexecuted{ - strong{ + > .unexecuted { + strong { font-style: italic; } } @@ -79,12 +79,12 @@ export const branchBlockClass = css` display: flex; position: relative; - :before{ - content: ""; + :before { + content: ''; position: absolute; top: 0; bottom: 0; - left: calc(50% - .5px); + left: calc(50% - 0.5px); width: 1px; background-color: #f0f2f5; } @@ -97,12 +97,12 @@ export const branchClass = css` position: relative; padding: 0 2em; - .workflow-node-list{ + .workflow-node-list { flex-grow: 1; min-width: 20em; } - .workflow-branch-lines{ + .workflow-branch-lines { position: absolute; top: 0; bottom: 0; @@ -110,37 +110,41 @@ export const branchClass = css` background-color: #ddd; } - :before,:after{ - content: ""; + :before, + :after { + content: ''; position: absolute; height: 1px; background-color: #ddd; } - :before{ + :before { top: 0; } - :after{ + :after { bottom: 0; } - :not(:first-child):not(:last-child){ - :before,:after{ + :not(:first-child):not(:last-child) { + :before, + :after { left: 0; width: 100%; } } - :last-child:not(:first-child){ - :before,:after{ + :last-child:not(:first-child) { + :before, + :after { right: 50%; width: 50%; } } - :first-child:not(:last-child){ - :before,:after{ + :first-child:not(:last-child) { + :before, + :after { left: 50%; width: 50%; } @@ -168,28 +172,28 @@ export const nodeCardClass = css` width: 20em; background: #fff; padding: 1em; - box-shadow: 0 .25em .5em rgba(0, 0, 0, .1); - border-radius: .5em; + box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1); + border-radius: 0.5em; cursor: pointer; - transition: box-shadow .3s ease; + transition: box-shadow 0.3s ease; - &.configuring{ - box-shadow: 0 .25em 1em rgba(0, 100, 200, .25); + &.configuring { + box-shadow: 0 0.25em 1em rgba(0, 100, 200, 0.25); } .workflow-node-remove-button, - .workflow-node-job-button{ + .workflow-node-job-button { position: absolute; } - .workflow-node-remove-button{ - right: .5em; - top: .5em; + .workflow-node-remove-button { + right: 0.5em; + top: 0.5em; color: #999; opacity: 0; - transition: opacity .3s ease; + transition: opacity 0.3s ease; - &[disabled]{ + &[disabled] { display: none; } @@ -198,7 +202,7 @@ export const nodeCardClass = css` } } - .workflow-node-job-button{ + .workflow-node-job-button { display: flex; top: 1em; right: 1em; @@ -210,38 +214,38 @@ export const nodeCardClass = css` font-size: 0.8em; color: #fff; - &[type="button"]{ + &[type='button'] { border: none; } } - .ant-input{ + .ant-input { font-weight: bold; - &:not(:focus){ - transition: background-color .3s ease, border-color .3s ease; + &:not(:focus) { + transition: background-color 0.3s ease, border-color 0.3s ease; border-color: #f7f7f7; background-color: #f7f7f7; - &:not(:disabled):hover{ + &:not(:disabled):hover { border-color: #eee; background-color: #eee; } - &:disabled:hover{ + &:disabled:hover { border-color: #f7f7f7; } } } - .workflow-node-config-button{ + .workflow-node-config-button { padding: 0; } - &:hover{ - box-shadow: 0 .25em .5em rgba(0, 0, 0, .25); + &:hover { + box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.25); - .workflow-node-remove-button{ + .workflow-node-remove-button { opacity: 1; } } @@ -252,13 +256,13 @@ export const nodeHeaderClass = css` `; export const nodeMetaClass = css` - margin-bottom: .5em; + margin-bottom: 0.5em; - .workflow-node-id{ + .workflow-node-id { color: #999; - &:before{ - content: "#" + &:before { + content: '#'; } } `; @@ -267,7 +271,7 @@ export const nodeTitleClass = css` display: flex; align-items: center; font-weight: normal; - .workflow-node-id{ + .workflow-node-id { color: #999; } `; @@ -282,8 +286,8 @@ export const addButtonClass = css` flex-shrink: 0; padding: 2em 0; - > .ant-btn{ - &:disabled{ + > .ant-btn { + &:disabled { visibility: hidden; } } diff --git a/packages/plugins/workflow/src/client/triggers/collection.tsx b/packages/plugins/workflow/src/client/triggers/collection.tsx index d383a0452..23143b2fd 100644 --- a/packages/plugins/workflow/src/client/triggers/collection.tsx +++ b/packages/plugins/workflow/src/client/triggers/collection.tsx @@ -1,8 +1,4 @@ - -import { - SchemaInitializerItemOptions, - useCollectionDataSource, -} from '@nocobase/client'; +import { SchemaInitializerItemOptions, useCollectionDataSource } from '@nocobase/client'; import { appends, collection, filter } from '../schemas/collection'; import { useCollectionFieldOptions } from '../variable'; @@ -38,20 +34,20 @@ export default { effects: ['onFieldValueChange'], fulfill: { state: { - value: [] - } - } + value: [], + }, + }, }, { target: 'condition', effects: ['onFieldValueChange'], fulfill: { state: { - value: null - } - } - } - ] + value: null, + }, + }, + }, + ], }, mode: { type: 'number', @@ -60,7 +56,7 @@ export default { 'x-component': 'Select', 'x-component-props': { options: collectionModeOptions, - placeholder: `{{t("Trigger on", { ns: "${NAMESPACE}" })}}` + placeholder: `{{t("Trigger on", { ns: "${NAMESPACE}" })}}`, }, required: true, 'x-reactions': [ @@ -70,9 +66,9 @@ export default { state: { visible: '{{!!$deps[0]}}', }, - } + }, }, - ] + ], }, changed: { type: 'array', @@ -85,11 +81,11 @@ export default { placeholder: '{{t("Select Field")}}', filter(field) { return ( - !field.hidden - && (field.uiSchema ? !field.uiSchema['x-read-pretty'] : true) - && !['linkTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type) + !field.hidden && + (field.uiSchema ? !field.uiSchema['x-read-pretty'] : true) && + !['linkTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.type) ); - } + }, }, 'x-reactions': [ { @@ -98,9 +94,9 @@ export default { state: { visible: `{{!!$deps[0] && ($deps[1] & ${COLLECTION_TRIGGER_MODE.UPDATED})}}`, }, - } + }, }, - ] + ], }, condition: { ...filter, @@ -112,9 +108,9 @@ export default { state: { visible: '{{!!$deps[0]}}', }, - } + }, }, - ] + ], }, appends: { ...appends, @@ -126,16 +122,16 @@ export default { state: { visible: `{{!($deps[0] & ${COLLECTION_TRIGGER_MODE.DELETED})}}`, }, - } + }, }, - ] + ], }, }, scope: { - useCollectionDataSource + useCollectionDataSource, }, components: { - FieldsSelect + FieldsSelect, }, getOptions(config, types) { const { t } = useWorkflowTranslation(); @@ -146,9 +142,9 @@ export default { type: 'hasOne', target: config.collection, uiSchema: { - title: t('Trigger data') - } - } + title: t('Trigger data'), + }, + }, ]; const options = useCollectionFieldOptions({ fields: rootFields, types, depth: config.appends?.length ? 2 : 1 }); return options; @@ -164,10 +160,10 @@ export default { title: `{{t("Trigger data", { ns: "${NAMESPACE}" })}}`, component: CollectionBlockInitializer, collection: config.collection, - dataSource: '{{$context.data}}' + dataSource: '{{$context.data}}', }; }, initializers: { - CollectionFieldInitializers - } + CollectionFieldInitializers, + }, }; diff --git a/packages/plugins/workflow/src/client/triggers/index.tsx b/packages/plugins/workflow/src/client/triggers/index.tsx index 71186926a..116694de2 100644 --- a/packages/plugins/workflow/src/client/triggers/index.tsx +++ b/packages/plugins/workflow/src/client/triggers/index.tsx @@ -1,20 +1,28 @@ -import React, { useState, useEffect } from "react"; -import { css, cx } from "@emotion/css"; -import { ISchema, useForm } from "@formily/react"; -import { Registry } from "@nocobase/utils/client"; -import { message, Tag, Alert, Button, Input } from "antd"; -import { useTranslation } from "react-i18next"; +import React, { useState, useEffect } from 'react'; +import { css, cx } from '@emotion/css'; +import { ISchema, useForm } from '@formily/react'; +import { Registry } from '@nocobase/utils/client'; +import { message, Tag, Alert, Button, Input } from 'antd'; +import { useTranslation } from 'react-i18next'; import { InfoOutlined } from '@ant-design/icons'; -import { ActionContext, SchemaComponent, SchemaInitializerItemOptions, useActionContext, useAPIClient, useCompile, useRequest, useResourceActionContext } from '@nocobase/client'; +import { + ActionContext, + SchemaComponent, + SchemaInitializerItemOptions, + useActionContext, + useAPIClient, + useCompile, + useRequest, + useResourceActionContext, +} from '@nocobase/client'; -import { nodeCardClass, nodeMetaClass, nodeTitleClass } from "../style"; -import { useFlowContext } from "../FlowContext"; +import { nodeCardClass, nodeMetaClass, nodeTitleClass } from '../style'; +import { useFlowContext } from '../FlowContext'; import collection from './collection'; -import schedule from "./schedule/"; -import { lang, NAMESPACE } from "../locale"; -import { VariableOptions } from "../variable"; - +import schedule from './schedule/'; +import { lang, NAMESPACE } from '../locale'; +import { VariableOptions } from '../variable'; function useUpdateConfigAction() { const form = useForm(); @@ -32,14 +40,14 @@ function useUpdateConfigAction() { await api.resource('workflows').update?.({ filterByTk: workflow.id, values: { - config: form.values - } + config: form.values, + }, }); ctx.setVisible(false); refresh(); }, }; -}; +} export interface Trigger { title: string; @@ -53,7 +61,7 @@ export interface Trigger { render?(props): React.ReactNode; useInitializers?(config): SchemaInitializerItemOptions | null; initializers?: any; -}; +} export const triggers = new Registry(); @@ -79,14 +87,14 @@ function TriggerExecution() { title: , shape: 'circle', className: 'workflow-node-job-button', - type: 'primary' + type: 'primary', }, properties: { [execution.id]: { type: 'void', 'x-decorator': 'Form', 'x-decorator-props': { - initialValue: execution + initialValue: execution, }, 'x-component': 'Action.Modal', title: ( @@ -103,7 +111,7 @@ function TriggerExecution() { 'x-decorator': 'FormItem', 'x-component': 'DatePicker', 'x-component-props': { - showTime: true + showTime: true, }, 'x-read-pretty': true, }, @@ -116,13 +124,13 @@ function TriggerExecution() { className: css` padding: 1em; background-color: #eee; - ` + `, }, 'x-read-pretty': true, - } - } - } - } + }, + }, + }, + }, }} /> ); @@ -155,8 +163,8 @@ export const TriggerConfig = () => { await api.resource('workflows').update?.({ filterByTk: workflow.id, values: { - title: t - } + title: t, + }, }); refresh(); } @@ -201,7 +209,7 @@ export const TriggerConfig = () => { 'x-component': Button, 'x-component-props': { type: 'link', - className: 'workflow-node-config-button' + className: 'workflow-node-config-button', }, }, drawer: { @@ -212,68 +220,74 @@ export const TriggerConfig = () => { 'x-decorator-props': { disabled: workflow.executed, useValues(options) { - return useRequest(() => Promise.resolve({ - data: config, - }), options); + return useRequest( + () => + Promise.resolve({ + data: config, + }), + options, + ); }, }, properties: { - ...(executed ? { - alert: { - 'x-component': Alert, - 'x-component-props': { - type: 'warning', - showIcon: true, - message: `{{t("Trigger in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`, - className: css` - width: 100%; - font-size: 85%; - margin-bottom: 2em; - ` - }, - } - } : {}), + ...(executed + ? { + alert: { + 'x-component': Alert, + 'x-component-props': { + type: 'warning', + showIcon: true, + message: `{{t("Trigger in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`, + className: css` + width: 100%; + font-size: 85%; + margin-bottom: 2em; + `, + }, + }, + } + : {}), fieldset: { type: 'void', 'x-component': 'fieldset', 'x-component-props': { className: css` - .ant-select:not(.full-width){ + .ant-select:not(.full-width) { width: auto; min-width: 6em; } - ` + `, }, - properties: fieldset + properties: fieldset, }, actions: { ...(executed - ? {} - : { - type: 'void', - 'x-component': 'Action.Drawer.Footer', - properties: { - cancel: { - title: '{{t("Cancel")}}', - 'x-component': 'Action', - 'x-component-props': { - useAction: '{{ cm.useCancelAction }}', + ? {} + : { + type: 'void', + 'x-component': 'Action.Drawer.Footer', + properties: { + cancel: { + title: '{{t("Cancel")}}', + 'x-component': 'Action', + 'x-component-props': { + useAction: '{{ cm.useCancelAction }}', + }, + }, + submit: { + title: '{{t("Submit")}}', + 'x-component': 'Action', + 'x-component-props': { + type: 'primary', + useAction: useUpdateConfigAction, + }, + }, }, - }, - submit: { - title: '{{t("Submit")}}', - 'x-component': 'Action', - 'x-component-props': { - type: 'primary', - useAction: useUpdateConfigAction - } - } - } - }) - } - } - } - } + }), + }, + }, + }, + }, }} scope={scope} components={components} @@ -281,7 +295,7 @@ export const TriggerConfig = () => {
); -} +}; export function useTrigger() { const { workflow } = useFlowContext(); diff --git a/packages/plugins/workflow/src/client/triggers/schedule/DateFieldsSelect.tsx b/packages/plugins/workflow/src/client/triggers/schedule/DateFieldsSelect.tsx index 7e9df7efc..22ff18cc4 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/DateFieldsSelect.tsx +++ b/packages/plugins/workflow/src/client/triggers/schedule/DateFieldsSelect.tsx @@ -1,9 +1,9 @@ -import React from "react"; -import { observer, useForm } from "@formily/react"; -import { Select } from "antd"; -import { useTranslation } from "react-i18next"; +import React from 'react'; +import { observer, useForm } from '@formily/react'; +import { Select } from 'antd'; +import { useTranslation } from 'react-i18next'; -import { useCollectionManager, useCompile } from "@nocobase/client"; +import { useCollectionManager, useCompile } from '@nocobase/client'; export const DateFieldsSelect: React.FC = observer((props) => { const { t } = useTranslation(); @@ -13,17 +13,13 @@ export const DateFieldsSelect: React.FC = observer((props) => { const fields = getCollectionFields(values?.collection); return ( - {fields - .filter(field => ( - !field.hidden - && (field.uiSchema ? field.type === 'date' : false) - )) - .map(field => ( - {compile(field.uiSchema?.title)} + .filter((field) => !field.hidden && (field.uiSchema ? field.type === 'date' : false)) + .map((field) => ( + + {compile(field.uiSchema?.title)} + ))} ); diff --git a/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx b/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx index 9b41bf2a1..7cea0dc37 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx +++ b/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx @@ -1,38 +1,41 @@ -import { css } from "@emotion/css"; -import { DatePicker, Select } from "antd"; -import moment from "moment"; -import React, { useState } from "react"; -import { useWorkflowTranslation } from "../../locale"; - -import { OnField } from "./OnField"; - +import { css } from '@emotion/css'; +import { DatePicker, Select } from 'antd'; +import moment from 'moment'; +import React, { useState } from 'react'; +import { useWorkflowTranslation } from '../../locale'; +import { OnField } from './OnField'; export function EndsByField({ value, onChange }) { const { t } = useWorkflowTranslation(); - const type = value != null ? typeof value === 'object' && !(value instanceof Date) ? 'field' : 'date' : null; + const type = value != null ? (typeof value === 'object' && !(value instanceof Date) ? 'field' : 'date') : null; return ( -
- { + onChange(t ? (t === 'field' ? {} : new Date()) : null); + }} + > {t('No end')} {t('By field')} {t('By custom date')} - {type === 'field' - ? - : null - } - {type === 'date' - ? { - onChange(v ? v.toDate() : null); - }} /> - : null - } + {type === 'field' ? : null} + {type === 'date' ? ( + { + onChange(v ? v.toDate() : null); + }} + /> + ) : null}
); } diff --git a/packages/plugins/workflow/src/client/triggers/schedule/OnField.tsx b/packages/plugins/workflow/src/client/triggers/schedule/OnField.tsx index 7c1e6f5e6..8483cc180 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/OnField.tsx +++ b/packages/plugins/workflow/src/client/triggers/schedule/OnField.tsx @@ -1,12 +1,10 @@ -import React, { useState } from "react"; -import { css } from "@emotion/css"; -import { InputNumber, Select } from "antd"; -import { useTranslation } from "react-i18next"; - -import { DateFieldsSelect } from "./DateFieldsSelect"; -import { useWorkflowTranslation } from "../../locale"; - +import React, { useState } from 'react'; +import { css } from '@emotion/css'; +import { InputNumber, Select } from 'antd'; +import { useTranslation } from 'react-i18next'; +import { DateFieldsSelect } from './DateFieldsSelect'; +import { useWorkflowTranslation } from '../../locale'; export function OnField({ value, onChange }) { const { t } = useTranslation(); @@ -14,36 +12,40 @@ export function OnField({ value, onChange }) { const [dir, setDir] = useState(value.offset ? value.offset / Math.abs(value.offset) : 0); return ( -
- onChange({ ...value, field })} /> - {value.field - ? ( - { setDir(v); onChange({ ...value, offset: Math.abs(value.offset) * v }); - }}> - {localT('Exactly at')} - {t('Before')} - {t('After')} + }} + > + {localT('Exactly at')} + {t('Before')} + {t('After')} + + ) : null} + {dir ? ( + <> + onChange({ ...value, offset: (v ?? 0) * dir })} + /> + - ) - : null} - {dir - ? ( - <> - onChange({ ...value, offset: (v ?? 0) * dir })}/> - - - ) - : null} + + ) : null}
); } diff --git a/packages/plugins/workflow/src/client/triggers/schedule/RepeatField.tsx b/packages/plugins/workflow/src/client/triggers/schedule/RepeatField.tsx index fa9cbef09..fb1223bb9 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/RepeatField.tsx +++ b/packages/plugins/workflow/src/client/triggers/schedule/RepeatField.tsx @@ -1,17 +1,15 @@ -import { css } from "@emotion/css"; -import { InputNumber, Select } from "antd"; -import React from "react"; -import { useTranslation } from "react-i18next"; +import { css } from '@emotion/css'; +import { InputNumber, Select } from 'antd'; +import React from 'react'; +import { useTranslation } from 'react-i18next'; import { Cron } from 'react-js-cron'; -import { useWorkflowTranslation } from "../../locale"; +import { useWorkflowTranslation } from '../../locale'; import CronZhCN from './locale/Cron.zh-CN'; - const languages = { 'zh-CN': CronZhCN, }; - const RepeatOptions = [ { value: 'none', text: 'No repeat' }, { value: 60_000, text: 'By minute', unitText: 'Minutes' }, @@ -19,12 +17,12 @@ const RepeatOptions = [ { value: 86400_000, text: 'By day', unitText: 'Days' }, { value: 604800_000, text: 'By week', unitText: 'Weeks' }, // { value: 18144_000_000, text: 'By 30 days' }, - { value: 'cron', text: 'Advanced' } + { value: 'cron', text: 'Advanced' }, ]; function getNumberOption(v) { - const opts = RepeatOptions.filter(option => typeof option.value === 'number').reverse() as any[]; - return opts.find(item => !(v % item.value)); + const opts = RepeatOptions.filter((option) => typeof option.value === 'number').reverse() as any[]; + return opts.find((item) => !(v % item.value)); } function getRepeatTypeValue(v) { @@ -40,7 +38,6 @@ function getRepeatTypeValue(v) { return 'none'; } - function CommonRepeatField({ value, onChange }) { const { t } = useWorkflowTranslation(); const option = getNumberOption(value); @@ -48,7 +45,7 @@ function CommonRepeatField({ value, onChange }) { return ( onChange(v * option.value)} + onChange={(v) => onChange(v * option.value)} min={1} addonBefore={t('Every')} addonAfter={t(option.unitText)} @@ -74,55 +71,47 @@ export function RepeatField({ value = null, onChange }) { const locale = languages[localStorage.getItem('NOCOBASE_LOCALE') || 'en-US']; return ( -
span{ - margin: 0 .5em 0 0; - } + > span { + margin: 0 0.5em 0 0; + } - > .react-js-cron-select{ - margin: 0 .5em 0 0; + > .react-js-cron-select { + margin: 0 0.5em 0 0; + } } } - } - `}> - + {RepeatOptions.map((item) => ( + {t(item.text)} ))} - {typeof typeValue === 'number' - ? - : null} - {typeValue === 'cron' - ? ( - onChange(`0 ${v}`)} - clearButton={false} - locale={locale} - /> - ) - : null} + {typeof typeValue === 'number' ? : null} + {typeValue === 'cron' ? ( + onChange(`0 ${v}`)} + clearButton={false} + locale={locale} + /> + ) : null}
); } diff --git a/packages/plugins/workflow/src/client/triggers/schedule/ScheduleConfig.tsx b/packages/plugins/workflow/src/client/triggers/schedule/ScheduleConfig.tsx index da4802688..e3eeea2ae 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/ScheduleConfig.tsx +++ b/packages/plugins/workflow/src/client/triggers/schedule/ScheduleConfig.tsx @@ -20,9 +20,9 @@ const ModeFieldsets = { 'x-decorator': 'FormItem', 'x-component': 'DatePicker', 'x-component-props': { - showTime: true + showTime: true, }, - required: true + required: true, }, repeat: { type: 'string', @@ -36,7 +36,7 @@ const ModeFieldsets = { state: { visible: '{{!!$self.value}}', }, - } + }, }, { target: 'limit', @@ -44,9 +44,9 @@ const ModeFieldsets = { state: { visible: '{{!!$self.value}}', }, - } - } - ] + }, + }, + ], }, endsOn: { type: 'datetime', @@ -54,8 +54,8 @@ const ModeFieldsets = { 'x-decorator': 'FormItem', 'x-component': 'DatePicker', 'x-component-props': { - showTime: true - } + showTime: true, + }, }, limit: { type: 'number', @@ -64,9 +64,9 @@ const ModeFieldsets = { 'x-component': 'InputNumber', 'x-component-props': { placeholder: `{{t("No limit", { ns: "${NAMESPACE}" })}}`, - min: 0 - } - } + min: 0, + }, + }, }, [SCHEDULE_MODE.COLLECTION_FIELD]: { collection: { @@ -80,9 +80,9 @@ const ModeFieldsets = { state: { visible: '{{!!$self.value}}', }, - } - } - ] + }, + }, + ], }, startsOn: { type: 'object', @@ -96,10 +96,10 @@ const ModeFieldsets = { state: { visible: '{{!!$self.value}}', }, - } - } + }, + }, ], - required: true + required: true, }, repeat: { type: 'string', @@ -113,7 +113,7 @@ const ModeFieldsets = { state: { visible: '{{!!$self.value}}', }, - } + }, }, { target: 'limit', @@ -121,15 +121,15 @@ const ModeFieldsets = { state: { visible: '{{!!$self.value}}', }, - } - } - ] + }, + }, + ], }, endsOn: { type: 'object', title: `{{t("Ends on", { ns: "${NAMESPACE}" })}}`, 'x-decorator': 'FormItem', - 'x-component': 'EndsByField' + 'x-component': 'EndsByField', }, limit: { type: 'number', @@ -138,15 +138,18 @@ const ModeFieldsets = { 'x-component': 'InputNumber', 'x-component-props': { placeholder: `{{t("No limit", { ns: "${NAMESPACE}" })}}`, - min: 0 - } - } - } + min: 0, + }, + }, + }, }; const scheduleModeOptions = [ { value: SCHEDULE_MODE.STATIC, label: `{{t("Based on certain date", { ns: "${NAMESPACE}" })}}` }, - { value: SCHEDULE_MODE.COLLECTION_FIELD, label: `{{t("Based on date field of collection", { ns: "${NAMESPACE}" })}}` }, + { + value: SCHEDULE_MODE.COLLECTION_FIELD, + label: `{{t("Based on date field of collection", { ns: "${NAMESPACE}" })}}`, + }, ]; export const ScheduleConfig = () => { @@ -173,10 +176,10 @@ export const ScheduleConfig = () => { 'x-decorator': 'FormItem', 'x-component': 'Radio.Group', 'x-component-props': { - options: scheduleModeOptions + options: scheduleModeOptions, }, required: true, - default: SCHEDULE_MODE.STATIC + default: SCHEDULE_MODE.STATIC, }} /> { 'x-component': 'fieldset', 'x-component-props': { className: css` - .ant-input-number{ + .ant-input-number { width: 4em; } - .ant-picker{ + .ant-picker { width: auto; } - ` + `, }, - properties: ModeFieldsets[mode] - } - } + properties: ModeFieldsets[mode], + }, + }, }} components={{ OnField, RepeatField, - EndsByField + EndsByField, }} /> diff --git a/packages/plugins/workflow/src/client/triggers/schedule/constants.ts b/packages/plugins/workflow/src/client/triggers/schedule/constants.ts index 1fb952059..855fbb21a 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/constants.ts +++ b/packages/plugins/workflow/src/client/triggers/schedule/constants.ts @@ -1,4 +1,4 @@ export const SCHEDULE_MODE = { STATIC: 0, - COLLECTION_FIELD: 1 + COLLECTION_FIELD: 1, }; diff --git a/packages/plugins/workflow/src/client/triggers/schedule/index.tsx b/packages/plugins/workflow/src/client/triggers/schedule/index.tsx index a13554b6b..167b65d05 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/index.tsx +++ b/packages/plugins/workflow/src/client/triggers/schedule/index.tsx @@ -9,8 +9,6 @@ import { useCollectionFieldOptions } from '../../variable'; import { appends } from '../../schemas/collection'; import { FieldsSelect } from '../../components/FieldsSelect'; - - export default { title: `{{t("Schedule event", { ns: "${NAMESPACE}" })}}`, type: 'schedule', @@ -18,8 +16,7 @@ export default { config: { type: 'void', 'x-component': 'ScheduleConfig', - 'x-component-props': { - } + 'x-component-props': {}, }, appends: { ...appends, @@ -30,17 +27,17 @@ export default { state: { visible: `{{$deps[0] === ${SCHEDULE_MODE.COLLECTION_FIELD} && $deps[1]}}`, }, - } + }, }, - ] + ], }, }, scope: { - useCollectionDataSource + useCollectionDataSource, }, components: { ScheduleConfig, - FieldsSelect + FieldsSelect, }, getOptions(config, types) { const { t } = useWorkflowTranslation(); @@ -56,7 +53,7 @@ export default { key: 'data', value: 'data', label: t('Trigger data'), - children: fieldOptions + children: fieldOptions, }); } } @@ -72,10 +69,10 @@ export default { title: `{{t("Trigger data", { ns: "${NAMESPACE}" })}}`, component: CollectionBlockInitializer, collection: config.collection, - dataSource: '{{$context.data}}' + dataSource: '{{$context.data}}', }; }, initializers: { - CollectionFieldInitializers - } + CollectionFieldInitializers, + }, }; diff --git a/packages/plugins/workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts b/packages/plugins/workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts index 96c338dbc..06adaee31 100644 --- a/packages/plugins/workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts +++ b/packages/plugins/workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts @@ -76,4 +76,4 @@ export default { 'ๅไธ€ๆœˆ', 'ๅไบŒๆœˆ', ], -} +}; diff --git a/packages/plugins/workflow/src/client/utils.ts b/packages/plugins/workflow/src/client/utils.ts index 4658f9868..80b71c321 100644 --- a/packages/plugins/workflow/src/client/utils.ts +++ b/packages/plugins/workflow/src/client/utils.ts @@ -1,7 +1,7 @@ export function linkNodes(nodes): void { const nodesMap = new Map(); - nodes.forEach(item => nodesMap.set(item.id, item)); - for (let node of nodesMap.values()) { + nodes.forEach((item) => nodesMap.set(item.id, item)); + for (const node of nodesMap.values()) { if (node.upstreamId) { node.upstream = nodesMap.get(node.upstreamId); } @@ -18,7 +18,7 @@ export function isValidFilter(condition) { return false; } - return group.some(item => { + return group.some((item) => { if (item.$and || item.$or) { return isValidFilter(item); } diff --git a/packages/plugins/workflow/src/client/variable.tsx b/packages/plugins/workflow/src/client/variable.tsx index 12ba6c04e..be1fceec5 100644 --- a/packages/plugins/workflow/src/client/variable.tsx +++ b/packages/plugins/workflow/src/client/variable.tsx @@ -50,22 +50,36 @@ const VariableTypes = [ value: '$system', options(types) { return [ - ...(!types || types.includes('date') ? [ - { - key: 'now', - value: 'now', - label: `{{t("System time")}}`, - } - ] : []) + ...(!types || types.includes('date') + ? [ + { + key: 'now', + value: 'now', + label: `{{t("System time")}}`, + }, + ] + : []), ]; - } + }, }, ]; export const BaseTypeSets = { boolean: new Set(['checkbox']), number: new Set(['number', 'percent']), - string: new Set(['input', 'password', 'email', 'phone', 'select', 'radioGroup', 'text', 'markdown', 'richText', 'expression', 'time']), + string: new Set([ + 'input', + 'password', + 'email', + 'phone', + 'select', + 'radioGroup', + 'text', + 'markdown', + 'richText', + 'expression', + 'time', + ]), date: new Set(['date', 'createdAt', 'updatedAt']), }; @@ -73,7 +87,7 @@ export const BaseTypeSets = { // { type: 'reference', options: { collection: 'attachments', multiple: false } } // { type: 'reference', options: { collection: 'myExpressions', entity: false } } -function matchFieldType(field, type): Boolean { +function matchFieldType(field, type): boolean { const inputType = typeof type; if (inputType === 'string') { return Boolean(BaseTypeSets[type]?.has(field.interface)); @@ -81,11 +95,13 @@ function matchFieldType(field, type): Boolean { if (inputType === 'object' && type.type === 'reference') { if (isAssociationField(field)) { - return type.options?.entity && (field.collectionName === type.options?.collection || type.options?.collection === '*'); + return ( + type.options?.entity && (field.collectionName === type.options?.collection || type.options?.collection === '*') + ); } else if (field.isForeignKey) { return ( (field.collectionName === type.options?.collection && field.name === 'id') || - (field.target === type.options?.collection) + field.target === type.options?.collection ); } else { return false; @@ -108,7 +124,11 @@ export function filterTypedFields(fields, types, depth = 1) { return fields; } return fields.filter((field) => { - if (isAssociationField(field) && depth && filterTypedFields(useNormalizedFields(field.target), types, depth - 1).length) { + if ( + isAssociationField(field) && + depth && + filterTypedFields(useNormalizedFields(field.target), types, depth - 1).length + ) { return true; } return types.some((type) => matchFieldType(field, type)); @@ -140,7 +160,7 @@ function useNormalizedFields(collectionName) { const { fields } = collection; const foreignKeyFields: any[] = []; const otherFields: any[] = []; - fields.forEach(field => { + fields.forEach((field) => { if (field.isForeignKey) { foreignKeyFields.push(field); } else { @@ -150,7 +170,7 @@ function useNormalizedFields(collectionName) { for (let i = otherFields.length - 1; i >= 0; i--) { const field = otherFields[i]; if (field.type === 'belongsTo') { - const foreignKeyField = foreignKeyFields.find(f => f.name === field.foreignKey); + const foreignKeyField = foreignKeyFields.find((f) => f.name === field.foreignKey); if (foreignKeyField) { otherFields.splice(i, 0, { ...field, @@ -158,7 +178,7 @@ function useNormalizedFields(collectionName) { uiSchema: { ...field.uiSchema, title: field.uiSchema?.title ? `${compile(field.uiSchema?.title)} ID` : foreignKeyField.name, - } + }, }); } else { otherFields.splice(i, 0, { @@ -170,24 +190,25 @@ function useNormalizedFields(collectionName) { uiSchema: { ...field.uiSchema, title: field.uiSchema?.title ? `${compile(field.uiSchema?.title)} ID` : field.name, - } + }, }); } } else if (field.type === 'context' && field.collectionName === 'users') { - const belongsToField = otherFields.find(f => f.type === 'belongsTo' && f.target === 'users' && f.foreignKey === field.name) ?? {}; + const belongsToField = + otherFields.find((f) => f.type === 'belongsTo' && f.target === 'users' && f.foreignKey === field.name) ?? {}; otherFields.splice(i, 0, { ...field, type: field.dataType, interface: belongsToField.interface, uiSchema: { ...belongsToField.uiSchema, - title: belongsToField.uiSchema?.title ? `${compile(belongsToField.uiSchema?.title)} ID` : field.name - } + title: belongsToField.uiSchema?.title ? `${compile(belongsToField.uiSchema?.title)} ID` : field.name, + }, }); } } - return otherFields.filter(field => field.interface && !field.hidden); + return otherFields.filter((field) => field.interface && !field.hidden); } export function useCollectionFieldOptions(options): VariableOption[] { @@ -195,16 +216,17 @@ export function useCollectionFieldOptions(options): VariableOption[] { const compile = useCompile(); const normalizedFields = fields ?? useNormalizedFields(collection); const result: VariableOption[] = filterTypedFields(normalizedFields, types, depth) - .filter(field => !isAssociationField(field) || depth) - .map(field => { + .filter((field) => !isAssociationField(field) || depth) + .map((field) => { const label = compile(field.uiSchema?.title || field.name); return { label, key: field.name, value: field.name, - children: isAssociationField(field) && depth - ? useCollectionFieldOptions({ collection: field.target, types, depth: depth - 1 }) - : null + children: + isAssociationField(field) && depth + ? useCollectionFieldOptions({ collection: field.target, types, depth: depth - 1 }) + : null, }; }); diff --git a/packages/plugins/workflow/src/server/Plugin.ts b/packages/plugins/workflow/src/server/Plugin.ts index fee87e3cf..78427f454 100644 --- a/packages/plugins/workflow/src/server/Plugin.ts +++ b/packages/plugins/workflow/src/server/Plugin.ts @@ -46,7 +46,7 @@ export default class WorkflowPlugin extends Plugin { new winston.transports.File({ filename: getLoggerFilePath('workflows', date, `${workflowId}.log`), level: getLoggerLevel(), - }) + }), ], } as LoggerOptions); @@ -115,7 +115,7 @@ export default class WorkflowPlugin extends Plugin { updateAgeOnGet: true, dispose(logger) { (logger).end(); - } + }, }); this.app.acl.registerSnippet({ @@ -201,7 +201,9 @@ export default class WorkflowPlugin extends Plugin { this.events.push([workflow, context, options]); - this.getLogger(workflow.id).debug(`new event triggered, now events: ${this.events.length}`, { data: workflow.config }); + this.getLogger(workflow.id).debug(`new event triggered, now events: ${this.events.length}`, { + data: workflow.config, + }); if (this.events.length > 1) { return; @@ -228,20 +230,25 @@ export default class WorkflowPlugin extends Plugin { }); if (existed) { - this.getLogger(workflow.id).warn(`workflow ${workflow.id} has already been triggered in same execution (${options.context.executionId}), and newly triggering will be skipped.`); + this.getLogger(workflow.id).warn( + `workflow ${workflow.id} has already been triggered in same execution (${options.context.executionId}), and newly triggering will be skipped.`, + ); valid = false; } } if (valid) { - const execution = await this.db.sequelize.transaction(async transaction => { - const execution = await workflow.createExecution({ - context, - key: workflow.key, - status: EXECUTION_STATUS.QUEUEING, - useTransaction: workflow.useTransaction, - }, { transaction }); + const execution = await this.db.sequelize.transaction(async (transaction) => { + const execution = await workflow.createExecution( + { + context, + key: workflow.key, + status: EXECUTION_STATUS.QUEUEING, + useTransaction: workflow.useTransaction, + }, + { transaction }, + ); const executed = await workflow.countExecutions({ transaction }); @@ -272,7 +279,9 @@ export default class WorkflowPlugin extends Plugin { return execution; }); - this.getLogger(workflow.id).debug(`execution of workflow ${workflow.id} created as ${execution.id}`, { data: execution.context }); + this.getLogger(workflow.id).debug(`execution of workflow ${workflow.id} created as ${execution.id}`, { + data: execution.context, + }); // NOTE: cache first execution for most cases if (!this.executing && !this.pending.length) { @@ -308,7 +317,7 @@ export default class WorkflowPlugin extends Plugin { } else { const execution = (await this.db.getRepository('executions').findOne({ filter: { - status: EXECUTION_STATUS.QUEUEING + status: EXECUTION_STATUS.QUEUEING, }, sort: 'createdAt', })) as ExecutionModel; @@ -334,7 +343,9 @@ export default class WorkflowPlugin extends Plugin { try { await (job ? processor.resume(job) : processor.start()); - this.getLogger(execution.workflowId).info(`execution (${execution.id}) finished with status: ${execution.status}`); + this.getLogger(execution.workflowId).info( + `execution (${execution.id}) finished with status: ${execution.status}`, + ); } catch (err) { this.getLogger(execution.workflowId).error(`execution (${execution.id}) error: ${err.message}`, err); } diff --git a/packages/plugins/workflow/src/server/Processor.ts b/packages/plugins/workflow/src/server/Processor.ts index 40684515d..228376709 100644 --- a/packages/plugins/workflow/src/server/Processor.ts +++ b/packages/plugins/workflow/src/server/Processor.ts @@ -1,7 +1,7 @@ import { Transaction, Transactionable } from 'sequelize'; import parse from 'json-templates'; -import { Model } from "@nocobase/database"; +import { Model } from '@nocobase/database'; import { appendArrayColumn } from '@nocobase/evaluators'; import Plugin from '.'; @@ -11,14 +11,10 @@ import FlowNodeModel from './models/FlowNode'; import { EXECUTION_STATUS, JOB_STATUS } from './constants'; import { Logger } from '@nocobase/logger'; - - export interface ProcessorOptions extends Transactionable { - plugin: Plugin + plugin: Plugin; } - - export default class Processor { static StatusMap = { [JOB_STATUS.PENDING]: EXECUTION_STATUS.STARTED, @@ -111,7 +107,7 @@ export default class Processor { } await this.prepare(); if (this.nodes.length) { - const head = this.nodes.find(item => !item.upstream); + const head = this.nodes.find((item) => !item.upstream); await this.run(head, { result: execution.context }); } else { await this.exit(null); @@ -149,11 +145,15 @@ export default class Processor { } } catch (err) { // for uncaught error, set to error - this.logger.error(`execution (${this.execution.id}) run instruction [${node.type}] for node (${node.id}) failed: `, { error: err }); + this.logger.error( + `execution (${this.execution.id}) run instruction [${node.type}] for node (${node.id}) failed: `, + { error: err }, + ); job = { - result: err instanceof Error - ? { message: err.message, stack: process.env.NODE_ENV === 'production' ? [] : err.stack } - : err, + result: + err instanceof Error + ? { message: err.message, stack: process.env.NODE_ENV === 'production' ? [] : err.stack } + : err, status: JOB_STATUS.ERROR, }; // if previous job is from resuming @@ -169,7 +169,9 @@ export default class Processor { } const savedJob = await this.saveJob(job); - this.logger.info(`execution (${this.execution.id}) run instruction [${node.type}] for node (${node.id}) finished as status: ${savedJob.status}`); + this.logger.info( + `execution (${this.execution.id}) run instruction [${node.type}] for node (${node.id}) finished as status: ${savedJob.status}`, + ); this.logger.debug(`result of node`, { data: savedJob.result }); if (savedJob.status === JOB_STATUS.RESOLVED && node.downstream) { @@ -219,7 +221,9 @@ export default class Processor { } async exit(job: JobModel | null) { - const status = job ? (this.constructor).StatusMap[job.status] ?? Math.sign(job.status) : EXECUTION_STATUS.RESOLVED; + const status = job + ? (this.constructor).StatusMap[job.status] ?? Math.sign(job.status) + : EXECUTION_STATUS.RESOLVED; this.logger.info(`execution (${this.execution.id}) all nodes finished, finishing execution...`); await this.execution.update({ status }, { transaction: this.transaction }); return null; @@ -236,15 +240,18 @@ export default class Processor { [job] = await model.update(payload, { where: { id: payload.id }, returning: true, - transaction: this.transaction + transaction: this.transaction, }); } else { - job = await model.create({ - ...payload, - executionId: this.execution.id, - }, { - transaction: this.transaction - }); + job = await model.create( + { + ...payload, + executionId: this.execution.id, + }, + { + transaction: this.transaction, + }, + ); } this.jobsMap.set(job.id, job); this.jobsMapByNodeId[job.nodeId] = job.result; @@ -254,7 +261,7 @@ export default class Processor { getBranches(node: FlowNodeModel): FlowNodeModel[] { return this.nodes - .filter(item => item.upstream === node && item.branchIndex !== null) + .filter((item) => item.upstream === node && item.branchIndex !== null) .sort((a, b) => Number(a.branchIndex) - Number(b.branchIndex)); } @@ -297,16 +304,16 @@ export default class Processor { const systemFns = {}; const scope = { execution: this.execution, - node + node, }; - for (let [name, fn] of this.options.plugin.functions.getEntities()) { + for (const [name, fn] of this.options.plugin.functions.getEntities()) { systemFns[name] = fn.bind(scope); } return { $context: this.execution.context, $jobsMapByNodeId: this.jobsMapByNodeId, - $system: systemFns + $system: systemFns, }; } diff --git a/packages/plugins/workflow/src/server/__tests__/Plugin.test.ts b/packages/plugins/workflow/src/server/__tests__/Plugin.test.ts index 60e62f864..e39edce62 100644 --- a/packages/plugins/workflow/src/server/__tests__/Plugin.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/Plugin.test.ts @@ -3,8 +3,6 @@ import Database from '@nocobase/database'; import { getApp, sleep } from '.'; import { EXECUTION_STATUS } from '../constants'; - - describe('workflow > Plugin', () => { let app: MockServer; let db: Database; @@ -27,8 +25,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); expect(workflow.current).toBe(true); @@ -39,8 +37,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); expect(workflow.current).toBe(true); @@ -54,8 +52,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); expect(workflow.current).toBe(true); @@ -83,8 +81,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); expect(workflow.current).toBe(true); @@ -112,8 +110,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -124,7 +122,7 @@ describe('workflow > Plugin', () => { expect(c1).toBe(1); await workflow.update({ - enabled: false + enabled: false, }); expect(workflow.current).toBe(true); @@ -136,7 +134,7 @@ describe('workflow > Plugin', () => { expect(c2).toBe(1); await workflow.update({ - enabled: true + enabled: true, }); expect(workflow.current).toBe(true); @@ -154,8 +152,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -168,8 +166,8 @@ describe('workflow > Plugin', () => { await workflow.update({ config: { mode: 1, - collection: 'tags' - } + collection: 'tags', + }, }); const p2 = await PostRepo.create({ values: { title: 't2' } }); @@ -188,8 +186,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const n1 = await workflow.createNode({ @@ -198,13 +196,13 @@ describe('workflow > Plugin', () => { collection: 'posts', params: { filter: { - id: '{{$context.data.id}}' + id: '{{$context.data.id}}', }, values: { - title: 't2' - } - } - } + title: 't2', + }, + }, + }, }); await PostRepo.create({ values: { title: 't1' } }); @@ -238,8 +236,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const n1 = await workflow.createNode({ @@ -248,10 +246,10 @@ describe('workflow > Plugin', () => { collection: 'posts', params: { values: { - title: 't2' - } - } - } + title: 't2', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -284,8 +282,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const w2 = await WorkflowModel.create({ @@ -293,8 +291,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const w3 = await WorkflowModel.create({ @@ -302,8 +300,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -326,8 +324,8 @@ describe('workflow > Plugin', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); await app.stop(); @@ -342,8 +340,8 @@ describe('workflow > Plugin', () => { key: w1.key, useTransaction: w1.useTransaction, context: { - data: p1.get() - } + data: p1.get(), + }, }); await app.start(); diff --git a/packages/plugins/workflow/src/server/__tests__/Processor.test.ts b/packages/plugins/workflow/src/server/__tests__/Processor.test.ts index 42c460078..e9c6724b3 100644 --- a/packages/plugins/workflow/src/server/__tests__/Processor.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/Processor.test.ts @@ -3,8 +3,6 @@ import { Application } from '@nocobase/server'; import { getApp, sleep } from '.'; import { BRANCH_INDEX, EXECUTION_STATUS, JOB_STATUS } from '../constants'; - - describe('workflow > Processor', () => { let app: Application; let db: Database; @@ -26,8 +24,8 @@ describe('workflow > Processor', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -46,7 +44,7 @@ describe('workflow > Processor', () => { it('execute resolved workflow', async () => { await workflow.createNode({ - type: 'echo' + type: 'echo', }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -64,7 +62,7 @@ describe('workflow > Processor', () => { it('workflow with single simple node', async () => { await workflow.createNode({ - type: 'echo' + type: 'echo', }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -85,13 +83,13 @@ describe('workflow > Processor', () => { it('workflow with multiple simple nodes', async () => { const n1 = await workflow.createNode({ title: 'echo 1', - type: 'echo' + type: 'echo', }); const n2 = await workflow.createNode({ title: 'echo 2', type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); @@ -113,7 +111,7 @@ describe('workflow > Processor', () => { it('workflow with error node', async () => { await workflow.createNode({ - type: 'error' + type: 'error', }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -132,7 +130,7 @@ describe('workflow > Processor', () => { it('workflow with customized success node', async () => { await workflow.createNode({ - type: 'customizedSuccess' + type: 'customizedSuccess', }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -150,7 +148,7 @@ describe('workflow > Processor', () => { it('workflow with customized error node', async () => { await workflow.createNode({ - type: 'customizedError' + type: 'customizedError', }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -175,7 +173,7 @@ describe('workflow > Processor', () => { const n2 = await workflow.createNode({ type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); @@ -192,7 +190,7 @@ describe('workflow > Processor', () => { pending.set({ status: JOB_STATUS.RESOLVED, - result: 123 + result: 123, }); pending.execution = execution; await plugin.resume(pending); @@ -215,7 +213,7 @@ describe('workflow > Processor', () => { }); const n2 = await workflow.createNode({ type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); @@ -254,13 +252,13 @@ describe('workflow > Processor', () => { const n2 = await workflow.createNode({ type: 'echo', branchIndex: BRANCH_INDEX.ON_TRUE, - upstreamId: n1.id + upstreamId: n1.id, }); await workflow.createNode({ type: 'echo', branchIndex: BRANCH_INDEX.ON_FALSE, - upstreamId: n1.id + upstreamId: n1.id, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -286,12 +284,12 @@ describe('workflow > Processor', () => { const n2 = await workflow.createNode({ type: 'manual', branchIndex: BRANCH_INDEX.ON_TRUE, - upstreamId: n1.id + upstreamId: n1.id, }); const n3 = await workflow.createNode({ type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n3); @@ -306,7 +304,7 @@ describe('workflow > Processor', () => { const [pending] = await execution.getJobs({ where: { nodeId: n2.id } }); pending.set({ status: JOB_STATUS.RESOLVED, - result: 123 + result: 123, }); pending.execution = execution; await plugin.resume(pending); @@ -326,12 +324,12 @@ describe('workflow > Processor', () => { const n2 = await workflow.createNode({ type: 'prompt->error', branchIndex: BRANCH_INDEX.ON_TRUE, - upstreamId: n1.id + upstreamId: n1.id, }); const n3 = await workflow.createNode({ type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n3); @@ -360,32 +358,32 @@ describe('workflow > Processor', () => { describe('branch: mixed', () => { it('condition branches contains parallel', async () => { const n1 = await workflow.createNode({ - type: 'condition' + type: 'condition', }); const n2 = await workflow.createNode({ type: 'parallel', branchIndex: BRANCH_INDEX.ON_TRUE, - upstreamId: n1.id + upstreamId: n1.id, }); const n3 = await workflow.createNode({ type: 'manual', upstreamId: n2.id, - branchIndex: 0 + branchIndex: 0, }); const n4 = await workflow.createNode({ title: 'parallel echo', type: 'echo', upstreamId: n2.id, - branchIndex: 1 + branchIndex: 1, }); const n5 = await workflow.createNode({ title: 'last echo', type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n5); @@ -400,10 +398,10 @@ describe('workflow > Processor', () => { const pendingJobs = await execution.getJobs(); expect(pendingJobs.length).toBe(4); - const pending = pendingJobs.find(item => item.nodeId === n3.id ); + const pending = pendingJobs.find((item) => item.nodeId === n3.id); pending.set({ status: JOB_STATUS.RESOLVED, - result: 123 + result: 123, }); pending.execution = execution; await plugin.resume(pending); @@ -417,32 +415,32 @@ describe('workflow > Processor', () => { it('parallel branches contains condition', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ type: 'manual', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'condition', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const n4 = await workflow.createNode({ title: 'condition echo', type: 'echo', upstreamId: n3.id, - branchIndex: BRANCH_INDEX.ON_TRUE + branchIndex: BRANCH_INDEX.ON_TRUE, }); const n5 = await workflow.createNode({ title: 'last echo', type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n5); @@ -457,10 +455,10 @@ describe('workflow > Processor', () => { const pendingJobs = await e1.getJobs(); expect(pendingJobs.length).toBe(4); - const pending = pendingJobs.find(item => item.nodeId === n2.id ); + const pending = pendingJobs.find((item) => item.nodeId === n2.id); pending.set({ status: JOB_STATUS.RESOLVED, - result: 123 + result: 123, }); pending.execution = e1; await plugin.resume(pending); diff --git a/packages/plugins/workflow/src/server/__tests__/actions/workflows.test.ts b/packages/plugins/workflow/src/server/__tests__/actions/workflows.test.ts index aca189d93..5ff428ccd 100644 --- a/packages/plugins/workflow/src/server/__tests__/actions/workflows.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/actions/workflows.test.ts @@ -2,8 +2,6 @@ import { MockServer } from '@nocobase/test'; import Database from '@nocobase/database'; import { getApp, sleep } from '..'; - - describe('workflow > actions > workflows', () => { let app: MockServer; let agent; @@ -33,8 +31,8 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const { status } = await agent.resource('workflows').update({ @@ -42,9 +40,9 @@ describe('workflow > actions > workflows', () => { values: { config: { mode: 1, - collection: 'tags' - } - } + collection: 'tags', + }, + }, }); expect(status).toBe(200); @@ -56,8 +54,8 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -72,9 +70,9 @@ describe('workflow > actions > workflows', () => { values: { config: { mode: 1, - collection: 'tags' - } - } + collection: 'tags', + }, + }, }); expect(status).toBe(400); }); @@ -85,8 +83,8 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -100,8 +98,8 @@ describe('workflow > actions > workflows', () => { filterByTk: workflow.id, values: { enabled: false, - key: workflow.key - } + key: workflow.key, + }, }); expect(status).toBe(200); @@ -121,8 +119,8 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const n1 = await workflow.createNode({ @@ -131,13 +129,13 @@ describe('workflow > actions > workflows', () => { collection: 'posts', params: { filter: { - id: '{{$context.data.id}}' + id: '{{$context.data.id}}', }, values: { - title: 't2' - } - } - } + title: 't2', + }, + }, + }, }); await PostRepo.create({ values: { title: 't1' } }); @@ -159,7 +157,7 @@ describe('workflow > actions > workflows', () => { const n2 = await w2.createNode(n1Data); await agent.resource(`workflows`).destroy({ - filterByTk: w2.id + filterByTk: w2.id, }); await PostRepo.create({ values: { title: 't1' } }); @@ -189,8 +187,8 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -200,8 +198,8 @@ describe('workflow > actions > workflows', () => { const { body, status } = await agent.resource(`workflows`).revision({ filterByTk: w1.id, filter: { - key: w1.key - } + key: w1.key, + }, }); expect(status).toBe(200); @@ -213,21 +211,24 @@ describe('workflow > actions > workflows', () => { expect(w2.executed).toBe(0); expect(w2.allExecuted).toBe(1); - await WorkflowModel.update({ - enabled: true - }, { - where: { - id: w2.id + await WorkflowModel.update( + { + enabled: true, }, - individualHooks: true - }); + { + where: { + id: w2.id, + }, + individualHooks: true, + }, + ); const p2 = await PostRepo.create({ values: { title: 't2' } }); await sleep(500); const [w1next, w2next] = await WorkflowModel.findAll({ - order: [['id', 'ASC']] + order: [['id', 'ASC']], }); expect(w1next.enabled).toBe(false); @@ -251,49 +252,47 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const n1 = await w1.createNode({ - type: 'echo' + type: 'echo', }); const n2 = await w1.createNode({ type: 'calculation', config: { engine: 'math.js', - expression: `{{$jobsMapByNodeId.${n1.id}.data.read}} + {{$jobsMapByNodeId.${n1.id}.data.read}}` + expression: `{{$jobsMapByNodeId.${n1.id}.data.read}} + {{$jobsMapByNodeId.${n1.id}.data.read}}`, }, - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); const { body } = await agent.resource(`workflows`).revision({ filterByTk: w1.id, filter: { - key: w1.key - } + key: w1.key, + }, }); const w2 = await WorkflowModel.findByPk(body.data.id, { - include: [ - 'nodes' - ] + include: ['nodes'], }); - const n1_2 = w2.nodes.find(n => !n.upstreamId); - const n2_2 = w2.nodes.find(n => !n.downstreamId); + const n1_2 = w2.nodes.find((n) => !n.upstreamId); + const n2_2 = w2.nodes.find((n) => !n.downstreamId); expect(n1_2.type).toBe('echo'); expect(n2_2.type).toBe('calculation'); expect(n2_2.config).toMatchObject({ engine: 'math.js', - expression: `{{$jobsMapByNodeId.${n1_2.id}.data.read}} + {{$jobsMapByNodeId.${n1_2.id}.data.read}}` + expression: `{{$jobsMapByNodeId.${n1_2.id}.data.read}} + {{$jobsMapByNodeId.${n1_2.id}.data.read}}`, }); await w2.update({ enabled: true }); await PostRepo.create({ - values: { title: 't1', read: 1 } + values: { title: 't1', read: 1 }, }); await sleep(500); @@ -309,8 +308,8 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const n2 = await w1.createNode({ @@ -323,22 +322,22 @@ describe('workflow > actions > workflows', () => { type: '$jobsMapByNodeId', options: { nodeId: 0, - path: 'data.read' - } + path: 'data.read', + }, }, { - value: `{{$jobsMapByNodeId.0.data.read}}` - } - ] - } + value: `{{$jobsMapByNodeId.0.data.read}}`, + }, + ], + }, }, }); const { status } = await agent.resource(`workflows`).revision({ filterByTk: w1.id, filter: { - key: w1.key - } + key: w1.key, + }, }); expect(status).toBe(400); @@ -350,8 +349,8 @@ describe('workflow > actions > workflows', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -371,30 +370,36 @@ describe('workflow > actions > workflows', () => { expect(w2.allExecuted).toBe(0); // stop w1 - await WorkflowModel.update({ - enabled: false - }, { - where: { - id: w1.id + await WorkflowModel.update( + { + enabled: false, }, - individualHooks: true - }); + { + where: { + id: w1.id, + }, + individualHooks: true, + }, + ); - await WorkflowModel.update({ - enabled: true - }, { - where: { - id: w2.id + await WorkflowModel.update( + { + enabled: true, }, - individualHooks: true - }); + { + where: { + id: w2.id, + }, + individualHooks: true, + }, + ); const p2 = await PostRepo.create({ values: { title: 't2' } }); await sleep(500); const [w1next, w2next] = await WorkflowModel.findAll({ - order: [['id', 'ASC']] + order: [['id', 'ASC']], }); expect(w1next.enabled).toBe(false); diff --git a/packages/plugins/workflow/src/server/__tests__/collections/categories.ts b/packages/plugins/workflow/src/server/__tests__/collections/categories.ts index 6e9fc09d9..f3c304d83 100644 --- a/packages/plugins/workflow/src/server/__tests__/collections/categories.ts +++ b/packages/plugins/workflow/src/server/__tests__/collections/categories.ts @@ -9,15 +9,15 @@ export default { }, { type: 'string', - name: 'engine' + name: 'engine', }, { type: 'string', - name: 'collection' + name: 'collection', }, { type: 'text', - name: 'expression' - } + name: 'expression', + }, ], } as CollectionOptions; diff --git a/packages/plugins/workflow/src/server/__tests__/collections/comments.ts b/packages/plugins/workflow/src/server/__tests__/collections/comments.ts index 9a063b11c..a56fd5ef3 100644 --- a/packages/plugins/workflow/src/server/__tests__/collections/comments.ts +++ b/packages/plugins/workflow/src/server/__tests__/collections/comments.ts @@ -10,11 +10,11 @@ export default { { type: 'integer', name: 'status', - defaultValue: 0 + defaultValue: 0, }, { type: 'hasMany', name: 'replies', - } + }, ], } as CollectionOptions; diff --git a/packages/plugins/workflow/src/server/__tests__/collections/posts.ts b/packages/plugins/workflow/src/server/__tests__/collections/posts.ts index 4f1862bdc..60135ce1f 100644 --- a/packages/plugins/workflow/src/server/__tests__/collections/posts.ts +++ b/packages/plugins/workflow/src/server/__tests__/collections/posts.ts @@ -10,33 +10,33 @@ export default { { type: 'boolean', name: 'published', - defaultValue: false + defaultValue: false, }, { type: 'integer', name: 'read', - defaultValue: 0 + defaultValue: 0, }, { type: 'belongsTo', - name: 'category' + name: 'category', }, { type: 'hasMany', - name: 'comments' + name: 'comments', }, { type: 'belongsToMany', - name: 'tags' + name: 'tags', }, { type: 'integer', name: 'read', - defaultValue: 0 + defaultValue: 0, }, { type: 'expression', - name: 'dexp' - } - ] + name: 'dexp', + }, + ], } as CollectionOptions; diff --git a/packages/plugins/workflow/src/server/__tests__/collections/replies.ts b/packages/plugins/workflow/src/server/__tests__/collections/replies.ts index cc634546f..46c877e44 100644 --- a/packages/plugins/workflow/src/server/__tests__/collections/replies.ts +++ b/packages/plugins/workflow/src/server/__tests__/collections/replies.ts @@ -4,6 +4,6 @@ export default { { type: 'string', name: 'content', - } - ] -} + }, + ], +}; diff --git a/packages/plugins/workflow/src/server/__tests__/collections/tags.ts b/packages/plugins/workflow/src/server/__tests__/collections/tags.ts index d6017b60d..433688e1b 100644 --- a/packages/plugins/workflow/src/server/__tests__/collections/tags.ts +++ b/packages/plugins/workflow/src/server/__tests__/collections/tags.ts @@ -9,7 +9,7 @@ export default { }, { type: 'string', - name: 'name' - } + name: 'name', + }, ], } as CollectionOptions; diff --git a/packages/plugins/workflow/src/server/__tests__/index.ts b/packages/plugins/workflow/src/server/__tests__/index.ts index a73d3bc8d..db174c298 100644 --- a/packages/plugins/workflow/src/server/__tests__/index.ts +++ b/packages/plugins/workflow/src/server/__tests__/index.ts @@ -9,7 +9,7 @@ import { JOB_STATUS } from '../constants'; import FlowNodeModel from '../models/FlowNode'; export function sleep(ms: number) { - return new Promise(resolve => { + return new Promise((resolve) => { setTimeout(resolve, ms); }); } @@ -28,53 +28,53 @@ export async function getApp({ manual, ...options }: MockAppOptions = {}): Promi run({ config = {} }: FlowNodeModel, { result }, processor) { return { status: JOB_STATUS.RESOLVED, - result: config.path == null ? result : get(result, config.path) + result: config.path == null ? result : get(result, config.path), }; - } + }, }, error: { run(node, input, processor) { throw new Error('definite error'); - } + }, }, 'prompt->error': { run(node, input, processor) { return { - status: JOB_STATUS.PENDING + status: JOB_STATUS.PENDING, }; }, resume(node, input, processor) { throw new Error('input failed'); - } + }, }, customizedSuccess: { run(node, input, processor) { return { - status: 100 - } - } + status: 100, + }; + }, }, customizedError: { run(node, input, processor) { return { - status: -100 - } - } + status: -100, + }; + }, }, }, functions: { - no1: () => 1 - } + no1: () => 1, + }, }); await app.load(); await app.db.import({ - directory: path.resolve(__dirname, './collections') + directory: path.resolve(__dirname, './collections'), }); try { diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/calculation.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/calculation.test.ts index 3457eefa7..063c5c88b 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/calculation.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/calculation.test.ts @@ -3,8 +3,6 @@ import Database from '@nocobase/database'; import { getApp, sleep } from '..'; import { JOB_STATUS } from '../../constants'; - - describe('workflow > instructions > calculation', () => { let app: Application; let db: Database; @@ -27,8 +25,8 @@ describe('workflow > instructions > calculation', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -40,8 +38,8 @@ describe('workflow > instructions > calculation', () => { type: 'calculation', config: { engine: 'math.js', - expression: '1 1' - } + expression: '1 1', + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -59,8 +57,8 @@ describe('workflow > instructions > calculation', () => { type: 'calculation', config: { engine: 'math.js', - expression: ' 1 + 1 ' - } + expression: ' 1 + 1 ', + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -78,7 +76,7 @@ describe('workflow > instructions > calculation', () => { config: { engine: 'math.js', expression: '{{$context.data.read}} + 1', - } + }, }); const post = await PostRepo.create({ values: { title: 't1', read: 1 } }); @@ -92,7 +90,7 @@ describe('workflow > instructions > calculation', () => { it('$jobsMapByNodeId', async () => { const n1 = await workflow.createNode({ - type: 'echo' + type: 'echo', }); const n2 = await workflow.createNode({ @@ -101,7 +99,7 @@ describe('workflow > instructions > calculation', () => { engine: 'math.js', expression: `{{$jobsMapByNodeId.${n1.id}.data.read}} + 1`, }, - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); @@ -111,7 +109,7 @@ describe('workflow > instructions > calculation', () => { await sleep(500); const [execution] = await workflow.getExecutions(); - const [n1Job, n2Job] = await execution.getJobs({ order: [['id', 'ASC']]}); + const [n1Job, n2Job] = await execution.getJobs({ order: [['id', 'ASC']] }); expect(n2Job.result).toBe(1); }); @@ -121,7 +119,7 @@ describe('workflow > instructions > calculation', () => { config: { engine: 'math.js', expression: '1 + {{$system.no1}}', - } + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -141,7 +139,7 @@ describe('workflow > instructions > calculation', () => { config: { engine: 'formula.js', expression: `CONCATENATE('a', '{{$context.data.title}}')`, - } + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -159,7 +157,7 @@ describe('workflow > instructions > calculation', () => { config: { engine: 'formula.js', expression: `CONCATENATE('a', {{$context.data.title}})`, - } + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -179,7 +177,7 @@ describe('workflow > instructions > calculation', () => { config: { dynamic: '{{$context.data.category}}', scope: '{{$context.data}}', - } + }, }); const post = await PostRepo.create({ @@ -188,8 +186,8 @@ describe('workflow > instructions > calculation', () => { category: { engine: 'math.js', expression: '1 + {{read}}', - } - } + }, + }, }); await sleep(500); @@ -206,12 +204,10 @@ describe('workflow > instructions > calculation', () => { collection: 'categories', params: { filter: { - $and: [ - { id: '{{$context.data.categoryId}}' }, - ] - } - } - } + $and: [{ id: '{{$context.data.categoryId}}' }], + }, + }, + }, }); const n2 = await workflow.createNode({ @@ -220,7 +216,7 @@ describe('workflow > instructions > calculation', () => { dynamic: `{{$jobsMapByNodeId.${n1.id}}}`, scope: '{{$context.data}}', }, - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); @@ -230,14 +226,14 @@ describe('workflow > instructions > calculation', () => { title: 'c1', engine: 'math.js', expression: '1 + {{read}}', - } + }, }); const post = await PostRepo.create({ values: { title: 't1', - categoryId: category.id - } + categoryId: category.id, + }, }); await sleep(500); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/condition.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/condition.test.ts index b6576eef4..8b6680731 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/condition.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/condition.test.ts @@ -3,8 +3,6 @@ import Database from '@nocobase/database'; import { getApp, sleep } from '..'; import { EXECUTION_STATUS, BRANCH_INDEX } from '../../constants'; - - describe('workflow > instructions > condition', () => { let app: Application; let db: Database; @@ -25,41 +23,38 @@ describe('workflow > instructions > condition', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); afterEach(() => db.close()); - describe('config.rejectOnFalse', () => { - - }); + describe('config.rejectOnFalse', () => {}); describe('single calculation', () => { it('calculation to true downstream', async () => { - const n1 = await workflow.createNode({ title: 'condition', type: 'condition', config: { engine: 'math.js', - expression: '1 == 1' - } + expression: '1 == 1', + }, }); const n2 = await workflow.createNode({ title: 'true to echo', type: 'echo', branchIndex: BRANCH_INDEX.ON_TRUE, - upstreamId: n1.id + upstreamId: n1.id, }); const n3 = await workflow.createNode({ title: 'false to echo', type: 'echo', branchIndex: BRANCH_INDEX.ON_FALSE, - upstreamId: n1.id + upstreamId: n1.id, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -81,22 +76,22 @@ describe('workflow > instructions > condition', () => { config: { engine: 'math.js', // false - expression: '0 == 1' - } + expression: '0 == 1', + }, }); await workflow.createNode({ title: 'true to echo', type: 'echo', branchIndex: BRANCH_INDEX.ON_TRUE, - upstreamId: n1.id + upstreamId: n1.id, }); await workflow.createNode({ title: 'false to echo', type: 'echo', branchIndex: BRANCH_INDEX.ON_FALSE, - upstreamId: n1.id + upstreamId: n1.id, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -122,11 +117,11 @@ describe('workflow > instructions > condition', () => { type: 'and', calculations: [ { calculator: 'equal', operands: [1, 1] }, - { calculator: 'equal', operands: [1, 1] } - ] - } - } - } + { calculator: 'equal', operands: [1, 1] }, + ], + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -147,11 +142,11 @@ describe('workflow > instructions > condition', () => { type: 'and', calculations: [ { calculator: 'equal', operands: [1, 1] }, - { calculator: 'equal', operands: [0, 1] } - ] - } - } - } + { calculator: 'equal', operands: [0, 1] }, + ], + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -172,11 +167,11 @@ describe('workflow > instructions > condition', () => { type: 'or', calculations: [ { calculator: 'equal', operands: [1, 1] }, - { calculator: 'equal', operands: [0, 1] } - ] - } - } - } + { calculator: 'equal', operands: [0, 1] }, + ], + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -197,11 +192,11 @@ describe('workflow > instructions > condition', () => { type: 'and', calculations: [ { calculator: 'equal', operands: [0, 1] }, - { calculator: 'equal', operands: [0, 1] } - ] - } - } - } + { calculator: 'equal', operands: [0, 1] }, + ], + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -227,14 +222,14 @@ describe('workflow > instructions > condition', () => { type: 'or', calculations: [ { calculator: 'equal', operands: [0, 1] }, - { calculator: 'equal', operands: [0, 1] } - ] - } - } - ] - } - } - } + { calculator: 'equal', operands: [0, 1] }, + ], + }, + }, + ], + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -255,9 +250,9 @@ describe('workflow > instructions > condition', () => { config: { calculation: { calculator: 'equal', - operands: [1, '{{$context.data.read}}'] - } - } + operands: [1, '{{$context.data.read}}'], + }, + }, }); const post = await PostRepo.create({ values: { read: 1 } }); @@ -279,9 +274,9 @@ describe('workflow > instructions > condition', () => { engine: 'basic', calculation: { calculator: 'equal', - operands: [1, '{{$context.data.read}}'] - } - } + operands: [1, '{{$context.data.read}}'], + }, + }, }); const post = await PostRepo.create({ values: { read: 1 } }); @@ -301,8 +296,8 @@ describe('workflow > instructions > condition', () => { type: 'condition', config: { engine: 'math.js', - expression: '1 == 1' - } + expression: '1 == 1', + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -322,8 +317,8 @@ describe('workflow > instructions > condition', () => { type: 'condition', config: { engine: 'formula.js', - expression: '1 == 1' - } + expression: '1 == 1', + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/create.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/create.test.ts index 428e2ef6c..53f6b4e1b 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/create.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/create.test.ts @@ -2,8 +2,6 @@ import { Application } from '@nocobase/server'; import Database from '@nocobase/database'; import { getApp, sleep } from '..'; - - describe('workflow > instructions > create', () => { let app: Application; let db: Database; @@ -26,8 +24,8 @@ describe('workflow > instructions > create', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -41,10 +39,10 @@ describe('workflow > instructions > create', () => { collection: 'comments', params: { values: { - postId: '{{$context.data.id}}' - } - } - } + postId: '{{$context.data.id}}', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -65,11 +63,11 @@ describe('workflow > instructions > create', () => { collection: 'comments', params: { values: { - replies: replies.map(item => item.id) + replies: replies.map((item) => item.id), }, - appends: ['replies'] - } - } + appends: ['replies'], + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -88,11 +86,11 @@ describe('workflow > instructions > create', () => { collection: 'comments', params: { values: { - postId: '{{$context.data.id}}' + postId: '{{$context.data.id}}', }, appends: ['post'], - } - } + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -111,11 +109,11 @@ describe('workflow > instructions > create', () => { collection: 'tags', params: { values: { - posts: ['{{$context.data.id}}'] + posts: ['{{$context.data.id}}'], }, appends: ['posts'], - } - } + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/delay.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/delay.test.ts index eb81293da..a46d018c2 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/delay.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/delay.test.ts @@ -62,8 +62,8 @@ describe('workflow > instructions > delay', () => { type: 'delay', config: { duration: 2000, - endStatus: JOB_STATUS.FAILED - } + endStatus: JOB_STATUS.FAILED, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/destroy.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/destroy.test.ts index d210652e6..5a32d3df7 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/destroy.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/destroy.test.ts @@ -2,8 +2,6 @@ import { Application } from '@nocobase/server'; import Database from '@nocobase/database'; import { getApp, sleep } from '..'; - - describe('workflow > instructions > destroy', () => { let app: Application; let db: Database; @@ -24,8 +22,8 @@ describe('workflow > instructions > destroy', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -39,10 +37,10 @@ describe('workflow > instructions > destroy', () => { collection: 'posts', params: { filter: { - id: '{{$context.data.id}}' - } - } - } + id: '{{$context.data.id}}', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/manual.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/manual.test.ts index 01932cc10..de9f40960 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/manual.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/manual.test.ts @@ -4,8 +4,6 @@ import { MockServer } from '@nocobase/test'; import { getApp, sleep } from '..'; import { EXECUTION_STATUS, JOB_STATUS } from '../../constants'; - - // NOTE: skipped because time is not stable on github ci, but should work in local describe('workflow > instructions > manual', () => { let app: MockServer; @@ -21,9 +19,7 @@ describe('workflow > instructions > manual', () => { beforeEach(async () => { app = await getApp({ - plugins: [ - 'users' - ] + plugins: ['users'], }); agent = app.agent(); db = app.db; @@ -34,21 +30,26 @@ describe('workflow > instructions > manual', () => { users = await UserModel.bulkCreate([ { id: 1, nickname: 'a' }, - { id: 2, nickname: 'b' } + { id: 2, nickname: 'b' }, ]); const userPlugin = app.getPlugin('users') as UserPlugin; - userAgents = users.map((user) => app.agent().auth(userPlugin.jwtService.sign({ - userId: user.id, - }), { type: 'bearer' })); + userAgents = users.map((user) => + app.agent().auth( + userPlugin.jwtService.sign({ + userId: user.id, + }), + { type: 'bearer' }, + ), + ); workflow = await WorkflowModel.create({ enabled: true, type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -62,10 +63,10 @@ describe('workflow > instructions > manual', () => { assignees: [users[0].id], forms: { f1: { - actions: [JOB_STATUS.RESOLVED] - } - } - } + actions: [JOB_STATUS.RESOLVED], + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -85,7 +86,7 @@ describe('workflow > instructions > manual', () => { const res1 = await agent.resource('users_jobs').submit({ filterByTk: usersJobs[0].id, - values: { status: JOB_STATUS.RESOLVED } + values: { status: JOB_STATUS.RESOLVED }, }); expect(res1.status).toBe(401); @@ -93,8 +94,8 @@ describe('workflow > instructions > manual', () => { filterByTk: usersJobs[0].id, values: { status: JOB_STATUS.RESOLVED, - result: { f1: {} } - } + result: { f1: {} }, + }, }); expect(res2.status).toBe(403); @@ -102,8 +103,8 @@ describe('workflow > instructions > manual', () => { filterByTk: usersJobs[0].id, values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res3.status).toBe(202); @@ -122,8 +123,8 @@ describe('workflow > instructions > manual', () => { filterByTk: usersJobs[0].id, values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 2 } } - } + result: { f1: { a: 2 } }, + }, }); expect(res4.status).toBe(400); }); @@ -134,9 +135,9 @@ describe('workflow > instructions > manual', () => { config: { assignees: [users[0].id, users[1].id], forms: { - f1: { actions: [JOB_STATUS.RESOLVED] } - } - } + f1: { actions: [JOB_STATUS.RESOLVED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -151,11 +152,11 @@ describe('workflow > instructions > manual', () => { const usersJobs = await j1.getUsersJobs(); const res1 = await userAgents[1].resource('users_jobs').submit({ - filterByTk: usersJobs.find(item => item.userId === users[1].id).id, + filterByTk: usersJobs.find((item) => item.userId === users[1].id).id, values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res1.status).toBe(202); @@ -166,11 +167,11 @@ describe('workflow > instructions > manual', () => { expect(j2.result).toEqual({ f1: { a: 1 } }); const res2 = await userAgents[0].resource('users_jobs').submit({ - filterByTk: usersJobs.find(item => item.userId === users[0].id).id, + filterByTk: usersJobs.find((item) => item.userId === users[0].id).id, values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res2.status).toBe(400); }); @@ -181,9 +182,9 @@ describe('workflow > instructions > manual', () => { config: { assignees: [users[0].id], forms: { - f1: { actions: [JOB_STATUS.RESOLVED] } - } - } + f1: { actions: [JOB_STATUS.RESOLVED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -200,8 +201,8 @@ describe('workflow > instructions > manual', () => { filterByTk: usersJobs[0].get('id'), values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res.status).toBe(202); @@ -223,9 +224,9 @@ describe('workflow > instructions > manual', () => { assignees: [users[0].id, users[1].id], mode: 1, forms: { - f1: { actions: [JOB_STATUS.RESOLVED] } - } - } + f1: { actions: [JOB_STATUS.RESOLVED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -234,7 +235,7 @@ describe('workflow > instructions > manual', () => { const UserJobModel = db.getModel('users_jobs'); const pendingJobs = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(pendingJobs.length).toBe(2); @@ -242,8 +243,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[0].get('id'), values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res1.status).toBe(202); @@ -255,7 +256,7 @@ describe('workflow > instructions > manual', () => { expect(j1.status).toBe(JOB_STATUS.PENDING); expect(j1.result).toBe(0.5); const usersJobs1 = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(usersJobs1.length).toBe(2); @@ -263,8 +264,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[1].get('id'), values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 2 } } - } + result: { f1: { a: 2 } }, + }, }); expect(res2.status).toBe(202); @@ -284,9 +285,9 @@ describe('workflow > instructions > manual', () => { assignees: [users[0].id, users[1].id], mode: 1, forms: { - f1: { actions: [JOB_STATUS.REJECTED] } - } - } + f1: { actions: [JOB_STATUS.REJECTED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -295,7 +296,7 @@ describe('workflow > instructions > manual', () => { const UserJobModel = db.getModel('users_jobs'); const pendingJobs = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(pendingJobs.length).toBe(2); @@ -303,8 +304,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[0].get('id'), values: { status: JOB_STATUS.REJECTED, - result: { f1: { a: 0 } } - } + result: { f1: { a: 0 } }, + }, }); expect(res1.status).toBe(202); @@ -316,7 +317,7 @@ describe('workflow > instructions > manual', () => { expect(j1.status).toBe(JOB_STATUS.REJECTED); expect(j1.result).toBe(0.5); const usersJobs1 = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(usersJobs1.length).toBe(2); @@ -324,8 +325,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[1].get('id'), values: { status: JOB_STATUS.REJECTED, - result: { f1: { a: 0 } } - } + result: { f1: { a: 0 } }, + }, }); expect(res2.status).toBe(400); }); @@ -337,9 +338,9 @@ describe('workflow > instructions > manual', () => { assignees: [users[0].id, users[1].id], mode: 1, forms: { - f1: { actions: [JOB_STATUS.RESOLVED, JOB_STATUS.REJECTED] } - } - } + f1: { actions: [JOB_STATUS.RESOLVED, JOB_STATUS.REJECTED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -348,7 +349,7 @@ describe('workflow > instructions > manual', () => { const UserJobModel = db.getModel('users_jobs'); const pendingJobs = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(pendingJobs.length).toBe(2); @@ -356,8 +357,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[0].get('id'), values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res1.status).toBe(202); @@ -369,7 +370,7 @@ describe('workflow > instructions > manual', () => { expect(j1.status).toBe(JOB_STATUS.PENDING); expect(j1.result).toBe(0.5); const usersJobs1 = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(usersJobs1.length).toBe(2); @@ -377,8 +378,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[1].get('id'), values: { status: JOB_STATUS.REJECTED, - result: { f1: { a: 0 } } - } + result: { f1: { a: 0 } }, + }, }); expect(res2.status).toBe(202); @@ -400,9 +401,9 @@ describe('workflow > instructions > manual', () => { assignees: [users[0].id, users[1].id], mode: -1, forms: { - f1: { actions: [JOB_STATUS.RESOLVED, JOB_STATUS.REJECTED] } - } - } + f1: { actions: [JOB_STATUS.RESOLVED, JOB_STATUS.REJECTED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -411,7 +412,7 @@ describe('workflow > instructions > manual', () => { const UserJobModel = db.getModel('users_jobs'); const pendingJobs = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(pendingJobs.length).toBe(2); @@ -419,8 +420,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[0].get('id'), values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res1.status).toBe(202); @@ -436,8 +437,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[1].get('id'), values: { status: JOB_STATUS.REJECTED, - result: { f1: { a: 0 } } - } + result: { f1: { a: 0 } }, + }, }); expect(res2.status).toBe(400); }); @@ -449,9 +450,9 @@ describe('workflow > instructions > manual', () => { assignees: [users[0].id, users[1].id], mode: -1, forms: { - f1: { actions: [JOB_STATUS.RESOLVED, JOB_STATUS.REJECTED] } - } - } + f1: { actions: [JOB_STATUS.RESOLVED, JOB_STATUS.REJECTED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -460,7 +461,7 @@ describe('workflow > instructions > manual', () => { const UserJobModel = db.getModel('users_jobs'); const pendingJobs = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(pendingJobs.length).toBe(2); @@ -468,8 +469,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[0].get('id'), values: { status: JOB_STATUS.REJECTED, - result: { f1: { a: 0 } } - } + result: { f1: { a: 0 } }, + }, }); expect(res1.status).toBe(202); @@ -485,8 +486,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[1].get('id'), values: { status: JOB_STATUS.RESOLVED, - result: { f1: { a: 1 } } - } + result: { f1: { a: 1 } }, + }, }); expect(res2.status).toBe(202); @@ -506,9 +507,9 @@ describe('workflow > instructions > manual', () => { assignees: [users[0].id, users[1].id], mode: -1, forms: { - f1: { actions: [JOB_STATUS.REJECTED] } - } - } + f1: { actions: [JOB_STATUS.REJECTED] }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -517,7 +518,7 @@ describe('workflow > instructions > manual', () => { const UserJobModel = db.getModel('users_jobs'); const pendingJobs = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(pendingJobs.length).toBe(2); @@ -525,8 +526,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[0].get('id'), values: { status: JOB_STATUS.REJECTED, - result: { f1: { a: 0 } } - } + result: { f1: { a: 0 } }, + }, }); expect(res1.status).toBe(202); @@ -542,8 +543,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[1].get('id'), values: { status: JOB_STATUS.REJECTED, - result: { f1: { a: 0 } } - } + result: { f1: { a: 0 } }, + }, }); expect(res2.status).toBe(202); @@ -557,13 +558,9 @@ describe('workflow > instructions > manual', () => { }); }); - describe('mode: (0,1) (multiple record, all to percent)', () => { + describe('mode: (0,1) (multiple record, all to percent)', () => {}); - }); - - describe('mode: (-1,0) (multiple record, any to percent)', () => { - - }); + describe('mode: (-1,0) (multiple record, any to percent)', () => {}); describe('use result of submitted form in manual node', () => { it('result should be available and correct', async () => { @@ -572,18 +569,18 @@ describe('workflow > instructions > manual', () => { config: { assignees: [users[0].id, users[1].id], forms: { - f1: {actions: [JOB_STATUS.RESOLVED] } - } - } + f1: { actions: [JOB_STATUS.RESOLVED] }, + }, + }, }); const n2 = await workflow.createNode({ type: 'calculation', config: { engine: 'math.js', - expression: `{{$jobsMapByNodeId.${n1.id}.f1.number}} + 1` + expression: `{{$jobsMapByNodeId.${n1.id}.f1.number}} + 1`, }, - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); @@ -594,7 +591,7 @@ describe('workflow > instructions > manual', () => { const UserJobModel = db.getModel('users_jobs'); const pendingJobs = await UserJobModel.findAll({ - order: [[ 'userId', 'ASC' ]] + order: [['userId', 'ASC']], }); expect(pendingJobs.length).toBe(2); @@ -602,8 +599,8 @@ describe('workflow > instructions > manual', () => { filterByTk: pendingJobs[0].get('id'), values: { status: JOB_STATUS.RESOLVED, - result: { f1: { number: 1 } } - } + result: { f1: { number: 1 } }, + }, }); expect(res1.status).toBe(202); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/parallel.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/parallel.test.ts index bd019cafa..3075825f7 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/parallel.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/parallel.test.ts @@ -3,8 +3,6 @@ import { Application } from '@nocobase/server'; import { getApp, sleep } from '..'; import { EXECUTION_STATUS, JOB_STATUS } from '../../constants'; - - describe('workflow > instructions > parallel', () => { let app: Application; let db: Database; @@ -26,8 +24,8 @@ describe('workflow > instructions > parallel', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -36,17 +34,17 @@ describe('workflow > instructions > parallel', () => { describe('single all', () => { it('all resolved', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -61,17 +59,17 @@ describe('workflow > instructions > parallel', () => { it('some rejected', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -86,19 +84,19 @@ describe('workflow > instructions > parallel', () => { it('first branch rejected', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -117,18 +115,18 @@ describe('workflow > instructions > parallel', () => { const n1 = await workflow.createNode({ type: 'parallel', config: { - mode: 'any' - } + mode: 'any', + }, }); const n2 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -145,18 +143,18 @@ describe('workflow > instructions > parallel', () => { const n1 = await workflow.createNode({ type: 'parallel', config: { - mode: 'any' - } + mode: 'any', + }, }); const n2 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -173,18 +171,18 @@ describe('workflow > instructions > parallel', () => { const n1 = await workflow.createNode({ type: 'parallel', config: { - mode: 'any' - } + mode: 'any', + }, }); const n2 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -203,18 +201,18 @@ describe('workflow > instructions > parallel', () => { const n1 = await workflow.createNode({ type: 'parallel', config: { - mode: 'race' - } + mode: 'race', + }, }); const n2 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -231,18 +229,18 @@ describe('workflow > instructions > parallel', () => { const n1 = await workflow.createNode({ type: 'parallel', config: { - mode: 'race' - } + mode: 'race', + }, }); const n2 = await workflow.createNode({ type: 'error', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -259,20 +257,20 @@ describe('workflow > instructions > parallel', () => { describe('branch and join', () => { it('link to single branch', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ title: 'echo1', type: 'echo', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ title: 'echo2', type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n3); @@ -289,27 +287,27 @@ describe('workflow > instructions > parallel', () => { it('link to multipe branches', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ title: 'echo1', type: 'echo', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ title: 'echo2', type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const n4 = await workflow.createNode({ title: 'echo on end', type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n4); @@ -326,21 +324,21 @@ describe('workflow > instructions > parallel', () => { it('random branch index', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ title: 'echo1', type: 'echo', upstreamId: n1.id, - branchIndex: 3 + branchIndex: 3, }); const n3 = await workflow.createNode({ title: 'echo2', type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -355,27 +353,27 @@ describe('workflow > instructions > parallel', () => { it('downstream has manual node', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ title: 'manual', type: 'manual', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ title: 'echo', type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const n4 = await workflow.createNode({ title: 'echo on end', type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n4); @@ -390,7 +388,7 @@ describe('workflow > instructions > parallel', () => { const [pending] = await e1.getJobs({ where: { nodeId: n2.id } }); pending.set({ status: JOB_STATUS.RESOLVED, - result: 123 + result: 123, }); pending.execution = e1; plugin.resume(pending); @@ -407,30 +405,30 @@ describe('workflow > instructions > parallel', () => { describe('nested', () => { it('nested 2 levels', async () => { const n1 = await workflow.createNode({ - type: 'parallel' + type: 'parallel', }); const n2 = await workflow.createNode({ type: 'parallel', upstreamId: n1.id, - branchIndex: 0 + branchIndex: 0, }); const n3 = await workflow.createNode({ type: 'echo', upstreamId: n1.id, - branchIndex: 1 + branchIndex: 1, }); const n4 = await workflow.createNode({ type: 'echo', upstreamId: n2.id, - branchIndex: 0 + branchIndex: 0, }); const n5 = await workflow.createNode({ type: 'echo', - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n5); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/query.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/query.test.ts index 0be76d8c3..97ad5d60c 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/query.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/query.test.ts @@ -3,8 +3,6 @@ import Database from '@nocobase/database'; import { getApp, sleep } from '..'; import { EXECUTION_STATUS, JOB_STATUS } from '../../constants'; - - describe('workflow > instructions > query', () => { let app: Application; let db: Database; @@ -31,8 +29,8 @@ describe('workflow > instructions > query', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -43,8 +41,8 @@ describe('workflow > instructions > query', () => { const n1 = await workflow.createNode({ type: 'query', config: { - collection: 'posts' - } + collection: 'posts', + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -63,10 +61,10 @@ describe('workflow > instructions > query', () => { collection: 'posts', params: { filter: { - title: 't1' - } - } - } + title: 't1', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -85,10 +83,10 @@ describe('workflow > instructions > query', () => { collection: 'posts', params: { filter: { - title: 't2' - } - } - } + title: 't2', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -107,10 +105,10 @@ describe('workflow > instructions > query', () => { collection: 'posts', params: { filter: { - title: '{{$context.data.title}}' - } - } - } + title: '{{$context.data.title}}', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -124,7 +122,7 @@ describe('workflow > instructions > query', () => { it('params.filter: value from job of node', async () => { const n1 = await workflow.createNode({ - type: 'echo' + type: 'echo', }); const n2 = await workflow.createNode({ type: 'query', @@ -132,11 +130,11 @@ describe('workflow > instructions > query', () => { collection: 'posts', params: { filter: { - title: `{{$jobsMapByNodeId.${n1.id}.data.title}}` - } - } + title: `{{$jobsMapByNodeId.${n1.id}.data.title}}`, + }, + }, }, - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); @@ -156,15 +154,15 @@ describe('workflow > instructions > query', () => { collection: 'tags', params: { filter: { - 'posts.id': `{{$context.data.id}}` - } - } - } + 'posts.id': `{{$context.data.id}}`, + }, + }, + }, }); const tag = await TagModel.create({ name: 'tag1' }); const post = await PostRepo.create({ - values: { title: 't1', tags: [tag.id] } + values: { title: 't1', tags: [tag.id] }, }); await sleep(500); @@ -180,14 +178,14 @@ describe('workflow > instructions > query', () => { config: { collection: 'posts', params: { - appends: ['comments'] - } - } + appends: ['comments'], + }, + }, }); const comment = await CommentRepo.create({}); const post = await PostRepo.create({ - values: { title: 't1', comments: [comment.id] } + values: { title: 't1', comments: [comment.id] }, }); await sleep(500); @@ -204,14 +202,14 @@ describe('workflow > instructions > query', () => { config: { collection: 'tags', params: { - appends: ['posts'] - } - } + appends: ['posts'], + }, + }, }); const tag = await TagModel.create({ name: 'tag1' }); const post = await PostRepo.create({ - values: { title: 't1', tags: [tag.id] } + values: { title: 't1', tags: [tag.id] }, }); await sleep(500); @@ -228,9 +226,9 @@ describe('workflow > instructions > query', () => { config: { collection: 'posts', params: { - sort: 'id' - } - } + sort: 'id', + }, + }, }); const p1 = await PostRepo.create({ values: { title: 't1' } }); @@ -255,8 +253,8 @@ describe('workflow > instructions > query', () => { type: 'query', config: { collection: 'posts', - multiple: true - } + multiple: true, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -277,10 +275,10 @@ describe('workflow > instructions > query', () => { multiple: true, params: { filter: { - title: 't1' - } - } - } + title: 't1', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -301,10 +299,10 @@ describe('workflow > instructions > query', () => { multiple: true, params: { filter: { - title: 't2' - } - } - } + title: 't2', + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -323,8 +321,8 @@ describe('workflow > instructions > query', () => { type: 'query', config: { collection: 'categories', - failOnEmpty: true - } + failOnEmpty: true, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -344,8 +342,8 @@ describe('workflow > instructions > query', () => { config: { collection: 'categories', multiple: true, - failOnEmpty: true - } + failOnEmpty: true, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/request.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/request.test.ts index 243684175..4cfe51953 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/request.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/request.test.ts @@ -32,7 +32,7 @@ describe('workflow > instructions > request', () => { ctx.withoutDataWrapping = true; ctx.body = { meta: { title: ctx.query.title }, - data: { title: ctx.request.body.title } + data: { title: ctx.request.body.title }, }; } next(); @@ -71,9 +71,9 @@ describe('workflow > instructions > request', () => { await sleep(500); - let [execution] = await workflow.getExecutions(); + const [execution] = await workflow.getExecutions(); expect(execution.status).toEqual(EXECUTION_STATUS.RESOLVED); - let [job] = await execution.getJobs(); + const [job] = await execution.getJobs(); expect(job.status).toEqual(JOB_STATUS.RESOLVED); }); @@ -91,15 +91,15 @@ describe('workflow > instructions > request', () => { await sleep(1000); - let [execution] = await workflow.getExecutions(); - let [job] = await execution.getJobs(); + const [execution] = await workflow.getExecutions(); + const [job] = await execution.getJobs(); expect(job.status).toEqual(JOB_STATUS.FAILED); expect(job.result).toMatchObject({ code: 'ECONNABORTED', name: 'AxiosError', status: null, - message: 'timeout of 250ms exceeded' + message: 'timeout of 250ms exceeded', }); }); @@ -118,14 +118,14 @@ describe('workflow > instructions > request', () => { await sleep(1000); - let [execution] = await workflow.getExecutions(); - let [job] = await execution.getJobs(); + const [execution] = await workflow.getExecutions(); + const [job] = await execution.getJobs(); expect(job.status).toEqual(JOB_STATUS.RESOLVED); expect(job.result).toMatchObject({ code: 'ECONNABORTED', name: 'AxiosError', status: null, - message: 'timeout of 250ms exceeded' + message: 'timeout of 250ms exceeded', }); }); @@ -143,8 +143,8 @@ describe('workflow > instructions > request', () => { await sleep(500); - let [execution] = await workflow.getExecutions(); - let [job] = await execution.getJobs(); + const [execution] = await workflow.getExecutions(); + const [job] = await execution.getJobs(); expect(job.status).toEqual(JOB_STATUS.FAILED); expect(job.result.status).toBe(400); }); @@ -164,8 +164,8 @@ describe('workflow > instructions > request', () => { await sleep(500); - let [execution] = await workflow.getExecutions(); - let [job] = await execution.getJobs(); + const [execution] = await workflow.getExecutions(); + const [job] = await execution.getJobs(); expect(job.status).toEqual(JOB_STATUS.RESOLVED); expect(job.result.status).toBe(400); }); @@ -184,8 +184,8 @@ describe('workflow > instructions > request', () => { await sleep(500); - let [execution] = await workflow.getExecutions(); - let [job] = await execution.getJobs(); + const [execution] = await workflow.getExecutions(); + const [job] = await execution.getJobs(); expect(job.status).toEqual(JOB_STATUS.RESOLVED); expect(job.result.data).toEqual({ title: 't1' }); }); @@ -203,13 +203,13 @@ describe('workflow > instructions > request', () => { const title = 't1\n\nline 2'; await PostRepo.create({ - values: { title } + values: { title }, }); await sleep(500); - let [execution] = await workflow.getExecutions(); - let [job] = await execution.getJobs(); + const [execution] = await workflow.getExecutions(); + const [job] = await execution.getJobs(); expect(job.status).toEqual(JOB_STATUS.RESOLVED); expect(job.result.data).toEqual({ title }); }); diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/update.test.ts b/packages/plugins/workflow/src/server/__tests__/instructions/update.test.ts index c6c5caa56..2a80d6212 100644 --- a/packages/plugins/workflow/src/server/__tests__/instructions/update.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/instructions/update.test.ts @@ -3,8 +3,6 @@ import Database from '@nocobase/database'; import { getApp, sleep } from '..'; import DefinedWorkflowModel from '../../models/Workflow'; - - describe('workflow > instructions > update', () => { let app: Application; let db: Database; @@ -25,8 +23,8 @@ describe('workflow > instructions > update', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); }); @@ -40,13 +38,13 @@ describe('workflow > instructions > update', () => { collection: 'posts', params: { filter: { - id: '{{$context.data.id}}' + id: '{{$context.data.id}}', }, values: { - published: true - } - } - } + published: true, + }, + }, + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -70,10 +68,10 @@ describe('workflow > instructions > update', () => { collection: 'posts', params: { filter: { - title: 'test' - } - } - } + title: 'test', + }, + }, + }, }); const n2 = await workflow.createNode({ @@ -82,14 +80,14 @@ describe('workflow > instructions > update', () => { collection: 'posts', params: { filter: { - id: `{{$jobsMapByNodeId.${n1.id}.id}}` + id: `{{$jobsMapByNodeId.${n1.id}.id}}`, }, values: { - title: 'changed' - } - } + title: 'changed', + }, + }, }, - upstreamId: n1.id + upstreamId: n1.id, }); await n1.setDownstream(n2); diff --git a/packages/plugins/workflow/src/server/__tests__/triggers/collection.test.ts b/packages/plugins/workflow/src/server/__tests__/triggers/collection.test.ts index 8da49c16c..f2f97d6ce 100644 --- a/packages/plugins/workflow/src/server/__tests__/triggers/collection.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/triggers/collection.test.ts @@ -3,8 +3,6 @@ import Database from '@nocobase/database'; import { getApp, sleep } from '..'; import { EXECUTION_STATUS } from '../../constants'; - - describe('workflow > triggers > collection', () => { let app: Application; let db: Database; @@ -34,15 +32,15 @@ describe('workflow > triggers > collection', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); await workflow.update({ config: { ...workflow.config, - collection: 'comments' - } + collection: 'comments', + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -61,8 +59,8 @@ describe('workflow > triggers > collection', () => { type: 'collection', config: { mode: 1, - collection: 'posts' - } + collection: 'posts', + }, }); const post = await PostRepo.create({ values: { title: 't1', category: { title: 'c1' } } }); @@ -83,8 +81,8 @@ describe('workflow > triggers > collection', () => { type: 'collection', config: { mode: 2, - collection: 'posts' - } + collection: 'posts', + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -104,8 +102,8 @@ describe('workflow > triggers > collection', () => { config: { mode: 2, collection: 'posts', - changed: ['title'] - } + changed: ['title'], + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -126,8 +124,8 @@ describe('workflow > triggers > collection', () => { config: { mode: 2, collection: 'posts', - changed: ['published'] - } + changed: ['published'], + }, }); const post = await PostRepo.create({ values: { title: 't1' } }); @@ -148,11 +146,11 @@ describe('workflow > triggers > collection', () => { config: { mode: 1, collection: 'posts', - } + }, }); await workflow.createNode({ - type: 'echo' + type: 'echo', }); const category = await CategoryRepo.create({ values: { title: 'c1' } }); @@ -160,8 +158,8 @@ describe('workflow > triggers > collection', () => { const post = await PostRepo.create({ values: { title: 't1', - categoryId: category.id - } + categoryId: category.id, + }, }); await sleep(500); @@ -179,12 +177,12 @@ describe('workflow > triggers > collection', () => { config: { mode: 1, collection: 'posts', - appends: ['category'] - } + appends: ['category'], + }, }); await workflow.createNode({ - type: 'echo' + type: 'echo', }); const category = await CategoryRepo.create({ values: { title: 'c1' } }); @@ -192,8 +190,8 @@ describe('workflow > triggers > collection', () => { const post = await PostRepo.create({ values: { title: 't1', - categoryId: category.id - } + categoryId: category.id, + }, }); await sleep(500); @@ -211,18 +209,18 @@ describe('workflow > triggers > collection', () => { config: { mode: 1, collection: 'posts', - appends: ['category'] - } + appends: ['category'], + }, }); await workflow.createNode({ - type: 'echo' + type: 'echo', }); const post = await PostRepo.create({ values: { title: 't1', - } + }, }); await sleep(500); @@ -240,12 +238,12 @@ describe('workflow > triggers > collection', () => { config: { mode: 1, collection: 'posts', - appends: ['comments'] - } + appends: ['comments'], + }, }); await workflow.createNode({ - type: 'echo' + type: 'echo', }); const comments = await CommentRepo.create({ values: [{}] }); @@ -253,8 +251,8 @@ describe('workflow > triggers > collection', () => { const post = await PostRepo.create({ values: { title: 't1', - comments: comments.map(item => item.id) - } + comments: comments.map((item) => item.id), + }, }); await sleep(500); @@ -272,12 +270,12 @@ describe('workflow > triggers > collection', () => { config: { mode: 1, collection: 'posts', - appends: ['tags'] - } + appends: ['tags'], + }, }); await workflow.createNode({ - type: 'echo' + type: 'echo', }); const tags = await TagRepo.create({ values: [{}] }); @@ -285,8 +283,8 @@ describe('workflow > triggers > collection', () => { const post = await PostRepo.create({ values: { title: 't1', - tags: tags.map(item => item.id) - } + tags: tags.map((item) => item.id), + }, }); await sleep(500); diff --git a/packages/plugins/workflow/src/server/__tests__/triggers/schedule.test.ts b/packages/plugins/workflow/src/server/__tests__/triggers/schedule.test.ts index 324db0cfd..0dca12786 100644 --- a/packages/plugins/workflow/src/server/__tests__/triggers/schedule.test.ts +++ b/packages/plugins/workflow/src/server/__tests__/triggers/schedule.test.ts @@ -2,8 +2,6 @@ import { Application } from '@nocobase/server'; import Database from '@nocobase/database'; import { getApp, sleep } from '..'; - - describe.skip('workflow > triggers > schedule', () => { let app: Application; let db: Database; @@ -31,8 +29,8 @@ describe.skip('workflow > triggers > schedule', () => { enabled: true, type: 'schedule', config: { - mode: 0 - } + mode: 0, + }, }); await sleep(3000); @@ -44,7 +42,7 @@ describe.skip('workflow > triggers > schedule', () => { it('on every 2 seconds', async () => { const now = new Date(); // NOTE: align to even(0, 2, ...) + 0.5 seconds to start - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); const workflow = await WorkflowModel.create({ enabled: true, @@ -53,7 +51,7 @@ describe.skip('workflow > triggers > schedule', () => { mode: 0, startsOn: now.toISOString(), repeat: '*/2 * * * * *', - } + }, }); await sleep(4000); @@ -67,7 +65,7 @@ describe.skip('workflow > triggers > schedule', () => { it('on every even seconds and limit 1', async () => { const now = new Date(); // NOTE: align to even(0, 2, ...) + 0.5 seconds to start - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); const workflow = await WorkflowModel.create({ enabled: true, @@ -76,8 +74,8 @@ describe.skip('workflow > triggers > schedule', () => { mode: 0, startsOn: now.toISOString(), repeat: '*/2 * * * * *', - limit: 1 - } + limit: 1, + }, }); await sleep(5000); @@ -89,7 +87,7 @@ describe.skip('workflow > triggers > schedule', () => { it('on every 2 seconds after created and limit 1', async () => { const now = new Date(); // NOTE: align to even(0, 2, ...) + 0.5 seconds to start - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); const workflow = await WorkflowModel.create({ enabled: true, @@ -98,8 +96,8 @@ describe.skip('workflow > triggers > schedule', () => { mode: 0, startsOn: now.toISOString(), repeat: 2000, - limit: 1 - } + limit: 1, + }, }); await sleep(5000); @@ -121,7 +119,7 @@ describe.skip('workflow > triggers > schedule', () => { mode: 0, startsOn, repeat: `${now.getSeconds()} * * * * *`, - } + }, }); await sleep(5000); @@ -147,9 +145,9 @@ describe.skip('workflow > triggers > schedule', () => { mode: 0, startsOn, repeat: `${now.getSeconds()} * * * * *`, - } + }, }, - transaction + transaction, }); }); @@ -162,9 +160,9 @@ describe.skip('workflow > triggers > schedule', () => { mode: 0, startsOn, repeat: `${now.getSeconds()} * * * * *`, - } + }, }, - transaction + transaction, }); }); @@ -191,15 +189,15 @@ describe.skip('workflow > triggers > schedule', () => { collection: 'posts', startsOn: { field: 'createdAt', - offset: 2 - } - } + offset: 2, + }, + }, }); const now = new Date(); - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); - const post = await PostRepo.create({ values: { title: 't1' }}); + const post = await PostRepo.create({ values: { title: 't1' } }); await sleep(1000); const executions = await workflow.getExecutions(); @@ -223,18 +221,18 @@ describe.skip('workflow > triggers > schedule', () => { mode: 1, collection: 'posts', startsOn: { - field: 'createdAt' + field: 'createdAt', }, - repeat: '*/2 * * * * *' - } + repeat: '*/2 * * * * *', + }, }); const now = new Date(); - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); const startTime = new Date(); startTime.setMilliseconds(500); - const post = await PostRepo.create({ values: { title: 't1' }}); + const post = await PostRepo.create({ values: { title: 't1' } }); await sleep(5000); // sleep 1.5s at 2s trigger 1st time @@ -250,7 +248,7 @@ describe.skip('workflow > triggers > schedule', () => { it('starts on post.createdAt and repeat with endsOn at certain time', async () => { const now = new Date(); - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); const startTime = new Date(); startTime.setMilliseconds(500); @@ -261,14 +259,14 @@ describe.skip('workflow > triggers > schedule', () => { mode: 1, collection: 'posts', startsOn: { - field: 'createdAt' + field: 'createdAt', }, repeat: '*/2 * * * * *', - endsOn: new Date(startTime.getTime() + 2500).toISOString() - } + endsOn: new Date(startTime.getTime() + 2500).toISOString(), + }, }); - const post = await PostRepo.create({ values: { title: 't1' }}); + const post = await PostRepo.create({ values: { title: 't1' } }); await sleep(5000); @@ -286,22 +284,22 @@ describe.skip('workflow > triggers > schedule', () => { mode: 1, collection: 'posts', startsOn: { - field: 'createdAt' + field: 'createdAt', }, repeat: '*/2 * * * * *', endsOn: { field: 'createdAt', - offset: 3 - } - } + offset: 3, + }, + }, }); const now = new Date(); - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); const startTime = new Date(); startTime.setMilliseconds(500); - const post = await PostRepo.create({ values: { title: 't1' }}); + const post = await PostRepo.create({ values: { title: 't1' } }); await sleep(5000); const executions = await workflow.getExecutions(); @@ -318,22 +316,22 @@ describe.skip('workflow > triggers > schedule', () => { mode: 1, collection: 'posts', startsOn: { - field: 'createdAt' + field: 'createdAt', }, repeat: 2000, endsOn: { field: 'createdAt', - offset: 3 - } - } + offset: 3, + }, + }, }); const now = new Date(); - await sleep((2.5 - now.getSeconds() % 2) * 1000 - now.getMilliseconds()); + await sleep((2.5 - (now.getSeconds() % 2)) * 1000 - now.getMilliseconds()); const startTime = new Date(); startTime.setMilliseconds(500); - const post = await PostRepo.create({ values: { title: 't1' }}); + const post = await PostRepo.create({ values: { title: 't1' } }); await sleep(5000); const executions = await workflow.getExecutions(); @@ -353,10 +351,10 @@ describe.skip('workflow > triggers > schedule', () => { collection: 'posts', startsOn: { field: 'createdAt', - offset: 2 + offset: 2, }, - appends: ['category'] - } + appends: ['category'], + }, }); const post = await PostRepo.create({ values: { title: 't1', categoryId: category.id } }); diff --git a/packages/plugins/workflow/src/server/actions/index.ts b/packages/plugins/workflow/src/server/actions/index.ts index cf733131f..5b67d63f0 100644 --- a/packages/plugins/workflow/src/server/actions/index.ts +++ b/packages/plugins/workflow/src/server/actions/index.ts @@ -2,21 +2,24 @@ import * as workflows from './workflows'; import * as nodes from './nodes'; function make(name, mod) { - return Object.keys(mod).reduce((result, key) => ({ - ...result, - [`${name}:${key}`]: mod[key] - }), {}) + return Object.keys(mod).reduce( + (result, key) => ({ + ...result, + [`${name}:${key}`]: mod[key], + }), + {}, + ); } -export default function({ app }) { +export default function ({ app }) { app.actions({ ...make('workflows', workflows), ...make('workflows.nodes', { create: nodes.create, - destroy: nodes.destroy + destroy: nodes.destroy, }), ...make('flow_nodes', { - update: nodes.update + update: nodes.update, }), }); } diff --git a/packages/plugins/workflow/src/server/actions/nodes.ts b/packages/plugins/workflow/src/server/actions/nodes.ts index 2bb54db51..60abdfd35 100644 --- a/packages/plugins/workflow/src/server/actions/nodes.ts +++ b/packages/plugins/workflow/src/server/actions/nodes.ts @@ -8,8 +8,8 @@ export async function create(context: Context, next) { const repository = utils.getRepositoryFromParams(context) as MultipleRelationRepository; const { whitelist, blacklist, updateAssociationValues, values, associatedIndex: workflowId } = context.action.params; - context.body = await db.sequelize.transaction(async transaction => { - const workflow = await repository.getSourceModel(transaction) as WorkflowModel; + context.body = await db.sequelize.transaction(async (transaction) => { + const workflow = (await repository.getSourceModel(transaction)) as WorkflowModel; if (workflow.executed) { context.throw(400, 'Node could not be created in executed workflow'); } @@ -20,18 +20,18 @@ export async function create(context: Context, next) { blacklist, updateAssociationValues, context, - transaction + transaction, }); if (!instance.upstreamId) { const previousHead = await repository.findOne({ filter: { id: { - $ne: instance.id + $ne: instance.id, }, - upstreamId: null + upstreamId: null, }, - transaction + transaction, }); if (previousHead) { await previousHead.setUpstream(instance, { transaction }); @@ -52,27 +52,33 @@ export async function create(context: Context, next) { instance.set('downstream', downstream); } - await upstream.update({ - downstreamId: instance.id - }, { transaction }); + await upstream.update( + { + downstreamId: instance.id, + }, + { transaction }, + ); upstream.set('downstream', instance); } else { const [downstream] = await upstream.getBranches({ where: { id: { - [Op.ne]: instance.id + [Op.ne]: instance.id, }, - branchIndex: instance.branchIndex + branchIndex: instance.branchIndex, }, - transaction + transaction, }); if (downstream) { - await downstream.update({ - upstreamId: instance.id, - branchIndex: null - }, { transaction }); + await downstream.update( + { + upstreamId: instance.id, + branchIndex: null, + }, + { transaction }, + ); await instance.setDownstream(downstream, { transaction }); instance.set('downstream', downstream); } @@ -87,9 +93,11 @@ export async function create(context: Context, next) { } function searchBranchNodes(nodes, from): any[] { - const branchHeads = nodes - .filter((item: any) => item.upstreamId === from.id && item.branchIndex != null); - return branchHeads.reduce((flatten: any[], head) => flatten.concat(searchBranchDownstreams(nodes, head)), []) as any[]; + const branchHeads = nodes.filter((item: any) => item.upstreamId === from.id && item.branchIndex != null); + return branchHeads.reduce( + (flatten: any[], head) => flatten.concat(searchBranchDownstreams(nodes, head)), + [], + ) as any[]; } function searchBranchDownstreams(nodes, from) { @@ -105,8 +113,8 @@ export async function destroy(context: Context, next) { const repository = utils.getRepositoryFromParams(context) as MultipleRelationRepository; const { filterByTk } = context.action.params; - context.body = await db.sequelize.transaction(async transaction => { - const workflow = await repository.getSourceModel(transaction) as WorkflowModel; + context.body = await db.sequelize.transaction(async (transaction) => { + const workflow = (await repository.getSourceModel(transaction)) as WorkflowModel; if (workflow.executed) { context.throw(400, 'Nodes in executed workflow could not be deleted'); } @@ -116,39 +124,45 @@ export async function destroy(context: Context, next) { filterByTk, fields: [...fields, 'workflowId'], appends: ['upstream', 'downstream'], - transaction + transaction, }); const { upstream, downstream } = instance.get(); if (upstream && upstream.downstreamId === instance.id) { - await upstream.update({ - downstreamId: instance.downstreamId - }, { transaction }); + await upstream.update( + { + downstreamId: instance.downstreamId, + }, + { transaction }, + ); } if (downstream) { - await downstream.update({ - upstreamId: instance.upstreamId, - branchIndex: instance.branchIndex - }, { transaction }); + await downstream.update( + { + upstreamId: instance.upstreamId, + branchIndex: instance.branchIndex, + }, + { transaction }, + ); } const nodes = await repository.find({ filter: { - workflowId: instance.workflowId + workflowId: instance.workflowId, }, fields, - transaction + transaction, }); const nodesMap = new Map(); // make map - nodes.forEach(item => { + nodes.forEach((item) => { nodesMap.set(item.id, item); }); // overwrite nodesMap.set(instance.id, instance); // make linked list - nodes.forEach(item => { + nodes.forEach((item) => { if (item.upstreamId) { item.upstream = nodesMap.get(item.upstreamId); } @@ -160,8 +174,8 @@ export async function destroy(context: Context, next) { const branchNodes = searchBranchNodes(nodes, instance); await repository.destroy({ - filterByTk: [instance.id, ...branchNodes.map(item => item.id)], - transaction + filterByTk: [instance.id, ...branchNodes.map((item) => item.id)], + transaction, }); return instance; @@ -174,12 +188,12 @@ export async function update(context: Context, next) { const { db } = context; const repository = utils.getRepositoryFromParams(context); const { filterByTk, values, whitelist, blacklist, filter, updateAssociationValues } = context.action.params; - context.body = await db.sequelize.transaction(async transaction => { + context.body = await db.sequelize.transaction(async (transaction) => { // TODO(optimize): duplicated instance query const { workflow } = await repository.findOne({ filterByTk, appends: ['workflow.executed'], - transaction + transaction, }); if (workflow.executed) { context.throw(400, 'Nodes in executed workflow could not be reconfigured'); @@ -193,7 +207,7 @@ export async function update(context: Context, next) { filter, updateAssociationValues, context, - transaction + transaction, }); }); diff --git a/packages/plugins/workflow/src/server/actions/workflows.ts b/packages/plugins/workflow/src/server/actions/workflows.ts index 136eccc9c..edc1925f1 100644 --- a/packages/plugins/workflow/src/server/actions/workflows.ts +++ b/packages/plugins/workflow/src/server/actions/workflows.ts @@ -5,10 +5,10 @@ export async function update(context: Context, next) { const repository = utils.getRepositoryFromParams(context) as Repository; const { filterByTk, values } = context.action.params; context.action.mergeParams({ - whitelist: ['title', 'description', 'enabled', 'config'] + whitelist: ['title', 'description', 'enabled', 'config'], }); // only enable/disable - if (Object.keys(values).includes('config')){ + if (Object.keys(values).includes('config')) { const workflow = await repository.findById(filterByTk); if (workflow.get('executed')) { return context.throw(400, 'config of executed workflow can not be updated'); @@ -21,30 +21,30 @@ export async function destroy(context: Context, next) { const repository = utils.getRepositoryFromParams(context) as Repository; const { filterByTk, filter } = context.action.params; - await context.db.sequelize.transaction(async transaction => { + await context.db.sequelize.transaction(async (transaction) => { const items = await repository.find({ filterByTk, filter, fields: ['id', 'key', 'current'], - transaction + transaction, }); - const ids = new Set(items.map(item => item.id)); - const keysSet = new Set(items.filter(item => item.current).map(item => item.key)); + const ids = new Set(items.map((item) => item.id)); + const keysSet = new Set(items.filter((item) => item.current).map((item) => item.key)); const revisions = await repository.find({ filter: { key: Array.from(keysSet), - current: { [Op.not]: true } + current: { [Op.not]: true }, }, fields: ['id'], - transaction + transaction, }); - revisions.forEach(item => ids.add(item.id)); + revisions.forEach((item) => ids.add(item.id)); context.body = await repository.destroy({ filterByTk: Array.from(ids), individualHooks: true, - transaction + transaction, }); }); @@ -72,13 +72,13 @@ function migrateConfig(config, oldToNew) { ...value, options: { ...value.options, - nodeId: oldToNew.get(value.options?.nodeId)?.id - } + nodeId: oldToNew.get(value.options?.nodeId)?.id, + }, }; } return Object.keys(value).reduce((result, key) => ({ ...result, [key]: migrate(value[key]) }), {}); case 'array': - return value.map(item => migrate(item)); + return value.map((item) => migrate(item)); case 'string': return value.replace(/(\{\{\$jobsMapByNodeId\.)([\w-]+)/g, (_, jobVar, oldNodeId) => { const newNode = oldToNew.get(Number.parseInt(oldNodeId, 10)); @@ -100,20 +100,22 @@ export async function revision(context: Context, next) { const repository = utils.getRepositoryFromParams(context); const { filterByTk, filter = {} } = context.action.params; - context.body = await db.sequelize.transaction(async transaction => { + context.body = await db.sequelize.transaction(async (transaction) => { const origin = await repository.findOne({ filterByTk, filter, appends: ['nodes'], context, - transaction + transaction, }); - const revisionData = filter.key ? { - key: filter.key, - title: origin.title, - allExecuted: origin.allExecuted - } : {}; + const revisionData = filter.key + ? { + key: filter.key, + title: origin.title, + allExecuted: origin.allExecuted, + } + : {}; const instance = await repository.create({ values: { @@ -121,9 +123,9 @@ export async function revision(context: Context, next) { description: origin.description, type: origin.type, config: origin.config, - ...revisionData + ...revisionData, }, - transaction + transaction, }); const originalNodesMap = new Map(); @@ -134,12 +136,15 @@ export async function revision(context: Context, next) { const oldToNew = new Map(); const newToOld = new Map(); for await (const node of origin.nodes) { - const newNode = await instance.createNode({ - type: node.type, - config: node.config, - title: node.title, - branchIndex: node.branchIndex - }, { transaction }); + const newNode = await instance.createNode( + { + type: node.type, + config: node.config, + title: node.title, + branchIndex: node.branchIndex, + }, + { transaction }, + ); // NOTE: keep original node references for later replacement oldToNew.set(node.id, newNode); newToOld.set(newNode.id, node); @@ -156,11 +161,14 @@ export async function revision(context: Context, next) { return context.throw(400, err.message); } - await newNode.update({ - upstreamId: newUpstream?.id ?? null, - downstreamId: newDownstream?.id ?? null, - config: migratedConfig - }, { transaction }); + await newNode.update( + { + upstreamId: newUpstream?.id ?? null, + downstreamId: newDownstream?.id ?? null, + config: migratedConfig, + }, + { transaction }, + ); } return instance; diff --git a/packages/plugins/workflow/src/server/constants.ts b/packages/plugins/workflow/src/server/constants.ts index b4ac161e2..ef1b1733f 100644 --- a/packages/plugins/workflow/src/server/constants.ts +++ b/packages/plugins/workflow/src/server/constants.ts @@ -22,5 +22,5 @@ export const JOB_STATUS = { export const BRANCH_INDEX = { DEFAULT: null, ON_TRUE: 1, - ON_FALSE: 0 + ON_FALSE: 0, }; diff --git a/packages/plugins/workflow/src/server/fields/expression-field.ts b/packages/plugins/workflow/src/server/fields/expression-field.ts index 8e93933df..12cc27ebe 100644 --- a/packages/plugins/workflow/src/server/fields/expression-field.ts +++ b/packages/plugins/workflow/src/server/fields/expression-field.ts @@ -3,11 +3,9 @@ import { DataTypes } from 'sequelize'; import { BaseFieldOptions, Field } from '@nocobase/database'; export interface ExpressionFieldOptions extends BaseFieldOptions { - type: 'expression', + type: 'expression'; } - - export class ExpressionField extends Field { get dataType() { return DataTypes.TEXT; diff --git a/packages/plugins/workflow/src/server/fields/index.ts b/packages/plugins/workflow/src/server/fields/index.ts index 1ce6147ca..da056c83d 100644 --- a/packages/plugins/workflow/src/server/fields/index.ts +++ b/packages/plugins/workflow/src/server/fields/index.ts @@ -1,7 +1,7 @@ -import { ExpressionField } from "./expression-field"; +import { ExpressionField } from './expression-field'; export default function (plugin) { plugin.db.registerFieldTypes({ - expression: ExpressionField + expression: ExpressionField, }); } diff --git a/packages/plugins/workflow/src/server/functions/index.ts b/packages/plugins/workflow/src/server/functions/index.ts index 76f120396..84e7fd903 100644 --- a/packages/plugins/workflow/src/server/functions/index.ts +++ b/packages/plugins/workflow/src/server/functions/index.ts @@ -1,13 +1,13 @@ -import Plugin from ".."; +import Plugin from '..'; function now() { return new Date(); } -export default function({ functions }: Plugin, more: { [key: string]: Function } = {}) { +export default function ({ functions }: Plugin, more: { [key: string]: Function } = {}) { functions.register('now', now); for (const [name, fn] of Object.entries(more)) { functions.register(name, fn); } -}; +} diff --git a/packages/plugins/workflow/src/server/instructions/calculation.ts b/packages/plugins/workflow/src/server/instructions/calculation.ts index 43d19ffd0..d988515ef 100644 --- a/packages/plugins/workflow/src/server/instructions/calculation.ts +++ b/packages/plugins/workflow/src/server/instructions/calculation.ts @@ -3,11 +3,9 @@ import parse from 'json-templates'; import evaluators, { Evaluator } from '@nocobase/evaluators'; import { Processor } from '..'; -import { JOB_STATUS } from "../constants"; -import FlowNodeModel from "../models/FlowNode"; -import { Instruction } from "."; - - +import { JOB_STATUS } from '../constants'; +import FlowNodeModel from '../models/FlowNode'; +import { Instruction } from '.'; interface CalculationConfig { dynamic?: boolean | string; @@ -30,18 +28,16 @@ export default { const evaluator = evaluators.get(engine); try { - const result = evaluator && expression - ? evaluator(expression, scope) - : null; + const result = evaluator && expression ? evaluator(expression, scope) : null; return { result, - status: JOB_STATUS.RESOLVED + status: JOB_STATUS.RESOLVED, }; } catch (e) { return { result: e.toString(), - status: JOB_STATUS.ERROR - } + status: JOB_STATUS.ERROR, + }; } - } + }, } as Instruction; diff --git a/packages/plugins/workflow/src/server/instructions/condition.ts b/packages/plugins/workflow/src/server/instructions/condition.ts index f209195d9..a7a9661dc 100644 --- a/packages/plugins/workflow/src/server/instructions/condition.ts +++ b/packages/plugins/workflow/src/server/instructions/condition.ts @@ -1,10 +1,10 @@ -import { Registry } from "@nocobase/utils"; +import { Registry } from '@nocobase/utils'; import evaluators from '@nocobase/evaluators'; import { Processor } from '..'; -import { JOB_STATUS } from "../constants"; -import FlowNodeModel from "../models/FlowNode"; -import { Instruction } from "."; +import { JOB_STATUS } from '../constants'; +import FlowNodeModel from '../models/FlowNode'; +import { Instruction } from '.'; export const calculators = new Registry(); @@ -78,8 +78,6 @@ calculators.register('notStartsWith', notStartsWith); calculators.register('endsWith', endsWith); calculators.register('notEndsWith', notEndsWith); - - type CalculationItem = { calculator?: string; operands?: [any?, any?]; @@ -89,7 +87,7 @@ type CalculationGroup = { group: { type: 'and' | 'or'; calculations?: Calculation[]; - } + }; }; type Calculation = CalculationItem | CalculationGroup; @@ -115,7 +113,6 @@ function logicCalculate(calculation?: Calculation) { return calculate(calculation as CalculationItem); } - export default { async run(node: FlowNodeModel, prevJob, processor: Processor) { const { engine, calculation, expression, rejectOnFalse } = node.config || {}; @@ -130,14 +127,14 @@ export default { } catch (e) { return { result: e.toString(), - status: JOB_STATUS.ERROR - } + status: JOB_STATUS.ERROR, + }; } if (!result && rejectOnFalse) { return { status: JOB_STATUS.FAILED, - result + result, }; } @@ -146,11 +143,10 @@ export default { result, // TODO(optimize): try unify the building of job nodeId: node.id, - upstreamId: prevJob && prevJob.id || null + upstreamId: (prevJob && prevJob.id) || null, }; - const branchNode = processor.nodes - .find(item => item.upstream === node && Boolean(item.branchIndex) === result); + const branchNode = processor.nodes.find((item) => item.upstream === node && Boolean(item.branchIndex) === result); if (!branchNode) { return job; @@ -169,5 +165,5 @@ export default { // pass control to upper scope by ending current scope return processor.end(node, branchJob); - } + }, } as Instruction; diff --git a/packages/plugins/workflow/src/server/instructions/create.ts b/packages/plugins/workflow/src/server/instructions/create.ts index daf9d4bde..e517a289a 100644 --- a/packages/plugins/workflow/src/server/instructions/create.ts +++ b/packages/plugins/workflow/src/server/instructions/create.ts @@ -1,40 +1,37 @@ -import { JOB_STATUS } from "../constants"; -import FlowNodeModel from "../models/FlowNode"; +import { JOB_STATUS } from '../constants'; +import FlowNodeModel from '../models/FlowNode'; export default { async run(node: FlowNodeModel, input, processor) { - const { - collection, - params: { appends = [], ...params } = {} - } = node.config; + const { collection, params: { appends = [], ...params } = {} } = node.config; const { repository, model } = (node.constructor).database.getCollection(collection); const options = processor.getParsedValue(params); const result = await repository.create({ ...options, context: { - executionId: processor.execution.id + executionId: processor.execution.id, }, - transaction: processor.transaction + transaction: processor.transaction, }); if (result && appends.length) { - const includeFields = appends.filter(field => !result.get(field) || !result[field]); + const includeFields = appends.filter((field) => !result.get(field) || !result[field]); const included = await model.findByPk(result[model.primaryKeyAttribute], { attributes: [model.primaryKeyAttribute], include: includeFields, - transaction: processor.transaction + transaction: processor.transaction, }); - includeFields.forEach(field => { + includeFields.forEach((field) => { const value = included!.get(field); - result.set(field, Array.isArray(value) ? value.map(item => item.toJSON()) : value.toJSON(), { raw: true }); + result.set(field, Array.isArray(value) ? value.map((item) => item.toJSON()) : value.toJSON(), { raw: true }); }); } return { // NOTE: get() for non-proxied instance (#380) result: result?.toJSON(), - status: JOB_STATUS.RESOLVED + status: JOB_STATUS.RESOLVED, }; - } -} + }, +}; diff --git a/packages/plugins/workflow/src/server/instructions/delay.ts b/packages/plugins/workflow/src/server/instructions/delay.ts index 633318a81..6dafe578f 100644 --- a/packages/plugins/workflow/src/server/instructions/delay.ts +++ b/packages/plugins/workflow/src/server/instructions/delay.ts @@ -1,5 +1,5 @@ import Plugin from '..'; -import { EXECUTION_STATUS, JOB_STATUS } from "../constants"; +import { EXECUTION_STATUS, JOB_STATUS } from '../constants'; import ExecutionModel from '../models/Execution'; import JobModel from '../models/Job'; import Processor from '../Processor'; @@ -22,31 +22,31 @@ export default class implements Instruction { async load() { const { model } = this.plugin.db.getCollection('jobs'); - const jobs = await model.findAll({ + const jobs = (await model.findAll({ where: { - status: JOB_STATUS.PENDING + status: JOB_STATUS.PENDING, }, include: [ { association: 'execution', attributes: [], where: { - status: EXECUTION_STATUS.STARTED + status: EXECUTION_STATUS.STARTED, }, - required: true + required: true, }, { association: 'node', attributes: ['config'], where: { - type: 'delay' + type: 'delay', }, - required: true - } - ] - }) as JobModel[]; + required: true, + }, + ], + })) as JobModel[]; - jobs.forEach(job => { + jobs.forEach((job) => { this.schedule(job, job.node!.config.duration); }); } @@ -68,7 +68,7 @@ export default class implements Instruction { } async trigger(job) { - const execution = await job.getExecution() as ExecutionModel; + const execution = (await job.getExecution()) as ExecutionModel; if (execution.status === EXECUTION_STATUS.STARTED) { job.execution = execution; await this.plugin.resume(job); @@ -83,7 +83,7 @@ export default class implements Instruction { status: JOB_STATUS.PENDING, result: null, nodeId: node.id, - upstreamId: prevJob?.id ?? null + upstreamId: prevJob?.id ?? null, }); const { duration } = node.config as DelayConfig; diff --git a/packages/plugins/workflow/src/server/instructions/destroy.ts b/packages/plugins/workflow/src/server/instructions/destroy.ts index a0af6e0a8..23da9aed3 100644 --- a/packages/plugins/workflow/src/server/instructions/destroy.ts +++ b/packages/plugins/workflow/src/server/instructions/destroy.ts @@ -1,26 +1,23 @@ -import { JOB_STATUS } from "../constants"; -import FlowNodeModel from "../models/FlowNode"; +import { JOB_STATUS } from '../constants'; +import FlowNodeModel from '../models/FlowNode'; export default { async run(node: FlowNodeModel, input, processor) { - const { - collection, - params = {} - } = node.config; + const { collection, params = {} } = node.config; const repo = (node.constructor).database.getRepository(collection); const options = processor.getParsedValue(params); const result = await repo.destroy({ ...options, context: { - executionId: processor.execution.id + executionId: processor.execution.id, }, - transaction: processor.transaction + transaction: processor.transaction, }); return { result, - status: JOB_STATUS.RESOLVED + status: JOB_STATUS.RESOLVED, }; - } -} + }, +}; diff --git a/packages/plugins/workflow/src/server/instructions/index.ts b/packages/plugins/workflow/src/server/instructions/index.ts index 52c50ac9a..a4b3dc904 100644 --- a/packages/plugins/workflow/src/server/instructions/index.ts +++ b/packages/plugins/workflow/src/server/instructions/index.ts @@ -23,15 +23,12 @@ export interface Instruction { run: Runner; // for start node in main flow (or branch) to resume when manual sub branch triggered - resume?: Runner + resume?: Runner; } -type InstructionConstructor = { new(p: Plugin): T }; +type InstructionConstructor = { new (p: Plugin): T }; -export default function( - plugin, - more: { [key: string]: T | InstructionConstructor } = {} -) { +export default function (plugin, more: { [key: string]: T | InstructionConstructor } = {}) { const { instructions } = plugin; const natives = [ @@ -44,15 +41,19 @@ export default function( 'create', 'update', 'destroy', - 'request' - ].reduce((result, key) => Object.assign(result, { - [key]: requireModule(path.isAbsolute(key) ? key : path.join(__dirname, key)) - }), {}); + 'request', + ].reduce( + (result, key) => + Object.assign(result, { + [key]: requireModule(path.isAbsolute(key) ? key : path.join(__dirname, key)), + }), + {}, + ); for (const [name, instruction] of Object.entries({ ...more, ...natives })) { - instructions.register(name, typeof instruction === 'function' - ? new (instruction as InstructionConstructor)(plugin) - : instruction + instructions.register( + name, + typeof instruction === 'function' ? new (instruction as InstructionConstructor)(plugin) : instruction, ); } } diff --git a/packages/plugins/workflow/src/server/instructions/manual/actions.ts b/packages/plugins/workflow/src/server/instructions/manual/actions.ts index 67cba7a5b..edd1916cb 100644 --- a/packages/plugins/workflow/src/server/instructions/manual/actions.ts +++ b/packages/plugins/workflow/src/server/instructions/manual/actions.ts @@ -2,8 +2,6 @@ import { Context, utils } from '@nocobase/actions'; import Plugin from '../..'; import { EXECUTION_STATUS, JOB_STATUS } from '../../constants'; - - export async function submit(context: Context, next) { const repository = utils.getRepositoryFromParams(context); const { filterByTk, values } = context.action.params; @@ -15,7 +13,7 @@ export async function submit(context: Context, next) { const plugin: Plugin = context.app.pm.get('workflow') as Plugin; - const userJob = await context.db.sequelize.transaction(async transaction => { + const userJob = await context.db.sequelize.transaction(async (transaction) => { const instance = await repository.findOne({ filterByTk, // filter: { @@ -23,7 +21,7 @@ export async function submit(context: Context, next) { // }, appends: ['job', 'node', 'execution', 'workflow'], context, - transaction + transaction, }); if (!instance) { @@ -34,11 +32,12 @@ export async function submit(context: Context, next) { const [form] = Object.keys(values.result ?? {}); // NOTE: validate status - if (instance.status !== JOB_STATUS.PENDING - || instance.job.status !== JOB_STATUS.PENDING - || instance.execution.status !== EXECUTION_STATUS.STARTED - || !instance.workflow.enabled - || !forms[form]?.actions?.includes(values.status) + if ( + instance.status !== JOB_STATUS.PENDING || + instance.job.status !== JOB_STATUS.PENDING || + instance.execution.status !== EXECUTION_STATUS.STARTED || + !instance.workflow.enabled || + !forms[form]?.actions?.includes(values.status) ) { return context.throw(400); } @@ -48,24 +47,24 @@ export async function submit(context: Context, next) { await processor.prepare(); const assignees = processor.getParsedValue(instance.node.config.assignees ?? []); - if (!assignees.includes(currentUser.id) - || instance.userId !== currentUser.id - ) { + if (!assignees.includes(currentUser.id) || instance.userId !== currentUser.id) { return context.throw(403); } // NOTE: validate assignee - await instance.update({ - status: values.status, - result: values.result - }, { - transaction - }); + await instance.update( + { + status: values.status, + result: values.result, + }, + { + transaction, + }, + ); return instance; }); - // await transaction.commit(); context.body = userJob; diff --git a/packages/plugins/workflow/src/server/instructions/manual/collecions/jobs.ts b/packages/plugins/workflow/src/server/instructions/manual/collecions/jobs.ts index 18164a3d5..6863d6c34 100644 --- a/packages/plugins/workflow/src/server/instructions/manual/collecions/jobs.ts +++ b/packages/plugins/workflow/src/server/instructions/manual/collecions/jobs.ts @@ -11,7 +11,7 @@ export default { name: 'usersJobs', target: 'users_jobs', foreignKey: 'jobId', - onDelete: 'CASCADE' - } - ] + onDelete: 'CASCADE', + }, + ], }; diff --git a/packages/plugins/workflow/src/server/instructions/manual/collecions/users.ts b/packages/plugins/workflow/src/server/instructions/manual/collecions/users.ts index 21ebdaffe..87afc0cf3 100644 --- a/packages/plugins/workflow/src/server/instructions/manual/collecions/users.ts +++ b/packages/plugins/workflow/src/server/instructions/manual/collecions/users.ts @@ -9,7 +9,7 @@ export default { { type: 'hasMany', name: 'usersJobs', - target: 'users_jobs' - } - ] + target: 'users_jobs', + }, + ], }; diff --git a/packages/plugins/workflow/src/server/instructions/manual/index.ts b/packages/plugins/workflow/src/server/instructions/manual/index.ts index 051f26203..b034ae558 100644 --- a/packages/plugins/workflow/src/server/instructions/manual/index.ts +++ b/packages/plugins/workflow/src/server/instructions/manual/index.ts @@ -2,20 +2,19 @@ import actions from '@nocobase/actions'; import { HandlerType } from '@nocobase/resourcer'; import Plugin from '../..'; -import { JOB_STATUS } from "../../constants"; +import { JOB_STATUS } from '../../constants'; import { Instruction } from '..'; import jobsCollection from './collecions/jobs'; import usersCollection from './collecions/users'; import usersJobsCollection from './collecions/users_jobs'; import { submit } from './actions'; - type FormType = { type: 'custom' | 'create' | 'update'; actions: number[]; options: { [key: string]: any; - } + }; }; export interface ManualConfig { @@ -30,45 +29,48 @@ const MULTIPLE_ASSIGNED_MODE = { ALL: Symbol('all'), ANY: Symbol('any'), ALL_PERCENTAGE: Symbol('all percentage'), - ANY_PERCENTAGE: Symbol('any percentage') + ANY_PERCENTAGE: Symbol('any percentage'), }; const Modes = { [MULTIPLE_ASSIGNED_MODE.SINGLE]: { getStatus(distribution, assignees) { - const done = distribution.find(item => item.status !== JOB_STATUS.PENDING && item.count > 0); - return done ? done.status : null - } + const done = distribution.find((item) => item.status !== JOB_STATUS.PENDING && item.count > 0); + return done ? done.status : null; + }, }, [MULTIPLE_ASSIGNED_MODE.ALL]: { getStatus(distribution, assignees) { - const resolved = distribution.find(item => item.status === JOB_STATUS.RESOLVED); + const resolved = distribution.find((item) => item.status === JOB_STATUS.RESOLVED); if (resolved && resolved.count === assignees.length) { return JOB_STATUS.RESOLVED; } - const rejected = distribution.find(item => item.status < JOB_STATUS.PENDING); + const rejected = distribution.find((item) => item.status < JOB_STATUS.PENDING); if (rejected && rejected.count) { return rejected.status; } return null; - } + }, }, [MULTIPLE_ASSIGNED_MODE.ANY]: { getStatus(distribution, assignees) { - const resolved = distribution.find(item => item.status === JOB_STATUS.RESOLVED); + const resolved = distribution.find((item) => item.status === JOB_STATUS.RESOLVED); if (resolved && resolved.count) { return JOB_STATUS.RESOLVED; } - const rejectedCount = distribution.reduce((count, item) => item.status < JOB_STATUS.PENDING ? count + item.count : count, 0); + const rejectedCount = distribution.reduce( + (count, item) => (item.status < JOB_STATUS.PENDING ? count + item.count : count), + 0, + ); // NOTE: all failures are considered as rejected for now if (rejectedCount === assignees.length) { return JOB_STATUS.REJECTED; } return null; - } - } + }, + }, }; function getMode(mode) { @@ -99,46 +101,49 @@ export default class implements Instruction { filter: { $or: [ { - 'workflow.enabled': true + 'workflow.enabled': true, }, { 'workflow.enabled': false, status: { - $ne: JOB_STATUS.PENDING - } - } - ] + $ne: JOB_STATUS.PENDING, + }, + }, + ], }, - handler: actions.list as HandlerType + handler: actions.list as HandlerType, }, - submit - } + submit, + }, }); } async run(node, prevJob, processor) { const { mode, ...config } = node.config as ManualConfig; - const assignees = [...(new Set(processor.getParsedValue(config.assignees) || []))]; + const assignees = [...new Set(processor.getParsedValue(config.assignees) || [])]; const job = await processor.saveJob({ status: JOB_STATUS.PENDING, result: mode ? [] : null, nodeId: node.id, - upstreamId: prevJob?.id ?? null + upstreamId: prevJob?.id ?? null, }); // NOTE: batch create users jobs const UserJobModel = processor.options.plugin.db.getModel('users_jobs'); - await UserJobModel.bulkCreate(assignees.map(userId => ({ - userId, - jobId: job.id, - nodeId: node.id, - executionId: job.executionId, - workflowId: node.workflowId, - status: JOB_STATUS.PENDING - })), { - transaction: processor.transaction - }); + await UserJobModel.bulkCreate( + assignees.map((userId) => ({ + userId, + jobId: job.id, + nodeId: node.id, + executionId: job.executionId, + workflowId: node.workflowId, + status: JOB_STATUS.PENDING, + })), + { + transaction: processor.transaction, + }, + ); return job; } @@ -150,18 +155,21 @@ export default class implements Instruction { const UserJobModel = processor.options.plugin.db.getModel('users_jobs'); const distribution = await UserJobModel.count({ where: { - jobId: job.id + jobId: job.id, }, - group: ['status'] + group: ['status'], }); - const submitted = distribution.reduce((count, item) => item.status !== JOB_STATUS.PENDING ? count + item.count : count, 0); + const submitted = distribution.reduce( + (count, item) => (item.status !== JOB_STATUS.PENDING ? count + item.count : count), + 0, + ); const result = mode ? (submitted || 0) / assignees.length : job.latestUserJob?.result ?? job.result; job.set({ status: job.status || (getMode(mode).getStatus(distribution, assignees) ?? JOB_STATUS.PENDING), - result + result, }); return job; } -}; +} diff --git a/packages/plugins/workflow/src/server/instructions/parallel.ts b/packages/plugins/workflow/src/server/instructions/parallel.ts index c889e218c..cf24c0356 100644 --- a/packages/plugins/workflow/src/server/instructions/parallel.ts +++ b/packages/plugins/workflow/src/server/instructions/parallel.ts @@ -1,12 +1,12 @@ -import FlowNodeModel from "../models/FlowNode"; -import JobModel from "../models/Job"; -import Processor from "../Processor"; -import { JOB_STATUS } from "../constants"; +import FlowNodeModel from '../models/FlowNode'; +import JobModel from '../models/Job'; +import Processor from '../Processor'; +import { JOB_STATUS } from '../constants'; export const PARALLEL_MODE = { ALL: 'all', ANY: 'any', - RACE: 'race' + RACE: 'race', } as const; const Modes = { @@ -15,45 +15,45 @@ const Modes = { return previous.status >= JOB_STATUS.PENDING; }, getStatus(result) { - const failedStatus = result.find(status => status != null && status < JOB_STATUS.PENDING) + const failedStatus = result.find((status) => status != null && status < JOB_STATUS.PENDING); if (typeof failedStatus !== 'undefined') { return failedStatus; } - if (result.every(status => status != null && status === JOB_STATUS.RESOLVED)) { + if (result.every((status) => status != null && status === JOB_STATUS.RESOLVED)) { return JOB_STATUS.RESOLVED; } return JOB_STATUS.PENDING; - } + }, }, [PARALLEL_MODE.ANY]: { next(previous) { return previous.status <= JOB_STATUS.PENDING; }, getStatus(result) { - if (result.some(status => status != null && status === JOB_STATUS.RESOLVED)) { + if (result.some((status) => status != null && status === JOB_STATUS.RESOLVED)) { return JOB_STATUS.RESOLVED; } - if (result.some(status => status != null ? status === JOB_STATUS.PENDING : true)) { + if (result.some((status) => (status != null ? status === JOB_STATUS.PENDING : true))) { return JOB_STATUS.PENDING; } return JOB_STATUS.FAILED; - } + }, }, [PARALLEL_MODE.RACE]: { next(previous) { return previous.status === JOB_STATUS.PENDING; }, getStatus(result) { - if (result.some(status => status != null && status === JOB_STATUS.RESOLVED)) { + if (result.some((status) => status != null && status === JOB_STATUS.RESOLVED)) { return JOB_STATUS.RESOLVED; } - const failedStatus = result.find(status => status != null && status < JOB_STATUS.PENDING); + const failedStatus = result.find((status) => status != null && status < JOB_STATUS.PENDING); if (typeof failedStatus !== 'undefined') { return failedStatus; } return JOB_STATUS.PENDING; - } - } + }, + }, }; export default { @@ -64,7 +64,7 @@ export default { status: JOB_STATUS.PENDING, result: Array(branches.length).fill(null), nodeId: node.id, - upstreamId: prevJob?.id ?? null + upstreamId: prevJob?.id ?? null, }); // NOTE: @@ -73,13 +73,16 @@ export default { // because of the delay is not significant sensible. // another benifit of this is, it could handle sequenced branches in future. const { mode = PARALLEL_MODE.ALL } = node.config; - await branches.reduce((promise: Promise, branch, i) => - promise.then((previous) => { - if (i && !Modes[mode].next(previous)) { - return Promise.resolve(previous); - } - return processor.run(branch, job); - }), Promise.resolve()); + await branches.reduce( + (promise: Promise, branch, i) => + promise.then((previous) => { + if (i && !Modes[mode].next(previous)) { + return Promise.resolve(previous); + } + return processor.run(branch, job); + }), + Promise.resolve(), + ); return processor.end(node, job); }, @@ -103,7 +106,7 @@ export default { const newResult = [...result.slice(0, branchIndex), branchJob.status, ...result.slice(branchIndex + 1)]; job.set({ result: newResult, - status: Modes[mode].getStatus(newResult) + status: Modes[mode].getStatus(newResult), }); if (job.status === JOB_STATUS.PENDING) { @@ -112,5 +115,5 @@ export default { } return job; - } + }, }; diff --git a/packages/plugins/workflow/src/server/instructions/query.ts b/packages/plugins/workflow/src/server/instructions/query.ts index 675ad4c90..8ecefe693 100644 --- a/packages/plugins/workflow/src/server/instructions/query.ts +++ b/packages/plugins/workflow/src/server/instructions/query.ts @@ -1,39 +1,34 @@ -import FlowNodeModel from "../models/FlowNode"; -import Processor from "../Processor"; -import { JOB_STATUS } from "../constants"; +import FlowNodeModel from '../models/FlowNode'; +import Processor from '../Processor'; +import { JOB_STATUS } from '../constants'; export default { async run(node: FlowNodeModel, input, processor: Processor) { - const { - collection, - multiple, - params = {}, - failOnEmpty = false - } = node.config; + const { collection, multiple, params = {}, failOnEmpty = false } = node.config; const repo = (node.constructor).database.getRepository(collection); const options = processor.getParsedValue(params); const result = await (multiple ? repo.find : repo.findOne).call(repo, { ...options, context: { - executionId: processor.execution.id + executionId: processor.execution.id, }, - transaction: processor.transaction + transaction: processor.transaction, }); if (failOnEmpty && (multiple ? !result.length : !result)) { return { result, - status: JOB_STATUS.FAILED - } + status: JOB_STATUS.FAILED, + }; } // NOTE: `toJSON()` to avoid getting undefined value from Proxied model instance (#380) // e.g. Object.prototype.hasOwnProperty.call(result, 'id') // false // so the properties can not be get by json-templates(object-path) return { - result: multiple ? result.map(item => item.toJSON()) : result?.toJSON(), - status: JOB_STATUS.RESOLVED + result: multiple ? result.map((item) => item.toJSON()) : result?.toJSON(), + status: JOB_STATUS.RESOLVED, }; - } + }, }; diff --git a/packages/plugins/workflow/src/server/instructions/request.ts b/packages/plugins/workflow/src/server/instructions/request.ts index 6349c8384..294c08ce5 100644 --- a/packages/plugins/workflow/src/server/instructions/request.ts +++ b/packages/plugins/workflow/src/server/instructions/request.ts @@ -24,7 +24,10 @@ async function request(config) { } return Object.assign(result, { [header.name]: header.value }); }, {}); - const params = (config.params ?? []).reduce((result, param) => Object.assign(result, { [param.name]: param.value }), {}); + const params = (config.params ?? []).reduce( + (result, param) => Object.assign(result, { [param.name]: param.value }), + {}, + ); // TODO(feat): only support JSON type for now, should support others in future headers['Content-Type'] = 'application/json'; @@ -37,7 +40,7 @@ async function request(config) { data, timeout, }); -}; +} export default class implements Instruction { constructor(public plugin) {} @@ -51,16 +54,16 @@ export default class implements Instruction { const config = processor.getParsedValue(node.config) as RequestConfig; request(config) - .then(response => { + .then((response) => { job.set({ status: JOB_STATUS.RESOLVED, - result: response.data + result: response.data, }); }) - .catch(error => { + .catch((error) => { job.set({ status: JOB_STATUS.FAILED, - result: error.isAxiosError ? error.toJSON() : error.message + result: error.isAxiosError ? error.toJSON() : error.message, }); }) .finally(() => { diff --git a/packages/plugins/workflow/src/server/instructions/update.ts b/packages/plugins/workflow/src/server/instructions/update.ts index 127cd784c..ba82cd1c3 100644 --- a/packages/plugins/workflow/src/server/instructions/update.ts +++ b/packages/plugins/workflow/src/server/instructions/update.ts @@ -1,28 +1,24 @@ -import FlowNodeModel from "../models/FlowNode"; -import Processor from "../Processor"; -import { JOB_STATUS } from "../constants"; +import FlowNodeModel from '../models/FlowNode'; +import Processor from '../Processor'; +import { JOB_STATUS } from '../constants'; export default { async run(node: FlowNodeModel, input, processor: Processor) { - const { - collection, - multiple = false, - params = {} - } = node.config; + const { collection, multiple = false, params = {} } = node.config; const repo = (node.constructor).database.getRepository(collection); const options = processor.getParsedValue(params); const result = await repo.update({ ...options, context: { - executionId: processor.execution.id + executionId: processor.execution.id, }, - transaction: processor.transaction + transaction: processor.transaction, }); return { - result: multiple ? result : (result[0] || null), - status: JOB_STATUS.RESOLVED + result: multiple ? result : result[0] || null, + status: JOB_STATUS.RESOLVED, }; - } -} + }, +}; diff --git a/packages/plugins/workflow/src/server/migrations/20221129153547-calculation-variables.ts b/packages/plugins/workflow/src/server/migrations/20221129153547-calculation-variables.ts index b0d63d8cb..83371e530 100644 --- a/packages/plugins/workflow/src/server/migrations/20221129153547-calculation-variables.ts +++ b/packages/plugins/workflow/src/server/migrations/20221129153547-calculation-variables.ts @@ -10,12 +10,12 @@ const VTypes = { }, $context({ options }) { return `{{$context.${options.path}}}`; - } + }, }; function migrateConfig(config) { if (Array.isArray(config)) { - return config.map(item => migrateConfig(item)); + return config.map((item) => migrateConfig(item)); } if (typeof config !== 'object') { return config; @@ -40,20 +40,22 @@ export default class extends Migration { const nodes = await NodeRepo.find({ filter: { type: { - $or: ['calculation', 'condition'] - } + $or: ['calculation', 'condition'], + }, }, - transaction + transaction, }); console.log('%d nodes need to be migrated.', nodes.length); await nodes.reduce((promise, node) => { - return node.update({ - config: migrateConfig(node.config) - }, { - transaction - }); - + return node.update( + { + config: migrateConfig(node.config), + }, + { + transaction, + }, + ); }, Promise.resolve()); }); } diff --git a/packages/plugins/workflow/src/server/migrations/20230221032941-change-request-body-type.ts b/packages/plugins/workflow/src/server/migrations/20230221032941-change-request-body-type.ts index 6b901b42d..7d789f8a5 100644 --- a/packages/plugins/workflow/src/server/migrations/20230221032941-change-request-body-type.ts +++ b/packages/plugins/workflow/src/server/migrations/20230221032941-change-request-body-type.ts @@ -11,7 +11,7 @@ function migrateData(input) { } const typeMap = { ctx: '$context', - node: '$jobsMapByNodeId' + node: '$jobsMapByNodeId', }; return input.replace(EJS_RE, (_, type, path) => { if (type === 'ctx') { @@ -36,31 +36,40 @@ export default class extends Migration { await this.context.db.sequelize.transaction(async (transaction) => { const nodes = await NodeRepo.find({ filter: { - type: 'request' + type: 'request', }, - transaction + transaction, }); console.log('%d nodes need to be migrated.', nodes.length); - await nodes.reduce((promise, node) => promise.then(async () => { - if (typeof node.config.data !== 'string') { - return; - } - let data = migrateData(node.config.data); - try { - data = JSON.parse(node.config.data); - return node.update({ - config: { - ...node.config, - data + await nodes.reduce( + (promise, node) => + promise.then(async () => { + if (typeof node.config.data !== 'string') { + return; } - }, { - transaction - }); - } catch (error) { - console.error(`flow_node #${node.id} config migrating failed! you should migrate its format from ejs to json-templates manually in your db.`); - } - }), Promise.resolve()); + let data = migrateData(node.config.data); + try { + data = JSON.parse(node.config.data); + return node.update( + { + config: { + ...node.config, + data, + }, + }, + { + transaction, + }, + ); + } catch (error) { + console.error( + `flow_node #${node.id} config migrating failed! you should migrate its format from ejs to json-templates manually in your db.`, + ); + } + }), + Promise.resolve(), + ); }); } async down() {} diff --git a/packages/plugins/workflow/src/server/migrations/20230221071831-calculation-expression.ts b/packages/plugins/workflow/src/server/migrations/20230221071831-calculation-expression.ts index d2f086be0..cd74af528 100644 --- a/packages/plugins/workflow/src/server/migrations/20230221071831-calculation-expression.ts +++ b/packages/plugins/workflow/src/server/migrations/20230221071831-calculation-expression.ts @@ -13,19 +13,19 @@ function addQuote(v) { } const calculatorsMap = { - 'equal': '==', + equal: '==', '===': '==', - 'notEqual': '!=', + notEqual: '!=', '!==': '!=', - 'gt': '>', - 'gte': '>=', - 'lt': '<', - 'lte': '<=', - 'add': '+', - 'minus': '-', - 'multiple': '*', - 'divide': '/', - 'mod': '%', + gt: '>', + gte: '>=', + lt: '<', + lte: '<=', + add: '+', + minus: '-', + multiple: '*', + divide: '/', + mod: '%', includes(a, b) { return `SEARCH(${b}, ${a}) >= 0`; }, @@ -33,7 +33,7 @@ const calculatorsMap = { return `SEARCH(${b}, ${a}) < 0`; }, startsWith(a, b) { - return `SEARCH(${b}, ${a}) == 0` + return `SEARCH(${b}, ${a}) == 0`; }, endsWith(a, b) { return `RIGHT(${a}, LEN(${b})) == ${b}`; @@ -46,8 +46,8 @@ const calculatorsMap = { }, concat(a, b) { return `CONCATENATE(${a}, ${b})`; - } -} + }, +}; function migrateConfig({ calculation, ...config }: any = {}) { if (!calculation?.calculator || !calculation?.operands?.length) { @@ -55,14 +55,15 @@ function migrateConfig({ calculation, ...config }: any = {}) { } const calculator = calculatorsMap[calculation.calculator]; - const operands = (calculator.operands ?? []).map(operand => addQuote(operand)); + const operands = (calculator.operands ?? []).map((operand) => addQuote(operand)); return { engine: 'formula.js', - expression: typeof calculator === 'function' - ? calculator(...operands) - : operands.join(` ${calculator ?? calculation.calculator} `) - } + expression: + typeof calculator === 'function' + ? calculator(...operands) + : operands.join(` ${calculator ?? calculation.calculator} `), + }; } export default class extends Migration { @@ -76,19 +77,26 @@ export default class extends Migration { await this.context.db.sequelize.transaction(async (transaction) => { const nodes = await NodeRepo.find({ filter: { - type: 'calculation' + type: 'calculation', }, - transaction + transaction, }); console.log('%d nodes need to be migrated.', nodes.length); - await nodes.reduce((promise, node) => promise.then(() => { - return node.update({ - config: migrateConfig(node.config) - }, { - transaction - }); - }), Promise.resolve()); + await nodes.reduce( + (promise, node) => + promise.then(() => { + return node.update( + { + config: migrateConfig(node.config), + }, + { + transaction, + }, + ); + }), + Promise.resolve(), + ); }); } } diff --git a/packages/plugins/workflow/src/server/migrations/20230221121203-condition-calculation.ts b/packages/plugins/workflow/src/server/migrations/20230221121203-condition-calculation.ts index 2cf6edbd9..feac7c0f1 100644 --- a/packages/plugins/workflow/src/server/migrations/20230221121203-condition-calculation.ts +++ b/packages/plugins/workflow/src/server/migrations/20230221121203-condition-calculation.ts @@ -1,16 +1,14 @@ import { Migration } from '@nocobase/server'; - - const calculatorsMap = { - 'equal': '==', + equal: '==', '===': '==', - 'notEqual': '!=', + notEqual: '!=', '!==': '!=', - 'gt': '>', - 'gte': '>=', - 'lt': '<', - 'lte': '<=', + gt: '>', + gte: '>=', + lt: '<', + lte: '<=', includes(a, b) { return `SEARCH('${b}', '${a}') >= 0`; }, @@ -18,7 +16,7 @@ const calculatorsMap = { return `SEARCH('${b}', '${a}') < 0`; }, startsWith(a, b) { - return `SEARCH('${b}', '${a}') == 0` + return `SEARCH('${b}', '${a}') == 0`; }, endsWith(a, b) { return `RIGHT('${a}', LEN('${b}')) == '${b}'`; @@ -29,17 +27,19 @@ const calculatorsMap = { notEndsWith(a, b) { return `RIGHT('${a}', LEN('${b}')) != '${b}'`; }, -} +}; function migrateConfig({ group: { type = 'and', calculations = [] } }) { return { group: { type, calculations: calculations.map(({ calculator = '===', operands = [] }: any) => { - return `(${operands.map((operand) => operand?.group ? migrateConfig(operand) : operand).join(` ${calculatorsMap[calculator]} `)})`; - }) - } - } + return `(${operands + .map((operand) => (operand?.group ? migrateConfig(operand) : operand)) + .join(` ${calculatorsMap[calculator]} `)})`; + }), + }, + }; } export default class extends Migration { @@ -53,23 +53,30 @@ export default class extends Migration { await this.context.db.sequelize.transaction(async (transaction) => { const nodes = await NodeRepo.find({ filter: { - type: 'condition' + type: 'condition', }, - transaction + transaction, }); console.log('%d nodes need to be migrated.', nodes.length); - await nodes.reduce((promise, node) => promise.then(() => { - return node.update({ - config: { - ...node.config, - engine: 'basic', - // calculation: migrateConfig(node.config.calculation) - } - }, { - transaction - }); - }), Promise.resolve()); + await nodes.reduce( + (promise, node) => + promise.then(() => { + return node.update( + { + config: { + ...node.config, + engine: 'basic', + // calculation: migrateConfig(node.config.calculation) + }, + }, + { + transaction, + }, + ); + }), + Promise.resolve(), + ); }); } } diff --git a/packages/plugins/workflow/src/server/migrations/20230221162902-jsonb-to-json.ts b/packages/plugins/workflow/src/server/migrations/20230221162902-jsonb-to-json.ts index c692b43c1..e3c25c2f3 100644 --- a/packages/plugins/workflow/src/server/migrations/20230221162902-jsonb-to-json.ts +++ b/packages/plugins/workflow/src/server/migrations/20230221162902-jsonb-to-json.ts @@ -9,21 +9,43 @@ export default class extends Migration { return; } - const { context: { sequelize, queryInterface } } = arguments[0]; + const sequelize = this.sequelize; + const queryInterface = this.queryInterface; + const { db } = this.app; await sequelize.transaction(async (transaction) => { - await queryInterface.changeColumn(db.getCollection('workflows').model.getTableName(), 'config', { - type: DataTypes.JSON - }, { transaction }); - await queryInterface.changeColumn(db.getCollection('flow_nodes').model.getTableName(), 'config', { - type: DataTypes.JSON - }, { transaction }); - await queryInterface.changeColumn(db.getCollection('executions').model.getTableName(), 'context', { - type: DataTypes.JSON - }, { transaction }); - await queryInterface.changeColumn(db.getCollection('jobs').model.getTableName(), 'result', { - type: DataTypes.JSON - }, { transaction }); + await queryInterface.changeColumn( + db.getCollection('workflows').model.getTableName(), + 'config', + { + type: DataTypes.JSON, + }, + { transaction }, + ); + await queryInterface.changeColumn( + db.getCollection('flow_nodes').model.getTableName(), + 'config', + { + type: DataTypes.JSON, + }, + { transaction }, + ); + await queryInterface.changeColumn( + db.getCollection('executions').model.getTableName(), + 'context', + { + type: DataTypes.JSON, + }, + { transaction }, + ); + await queryInterface.changeColumn( + db.getCollection('jobs').model.getTableName(), + 'result', + { + type: DataTypes.JSON, + }, + { transaction }, + ); }); } } diff --git a/packages/plugins/workflow/src/server/migrations/20230411034722-manual-multi-form.ts b/packages/plugins/workflow/src/server/migrations/20230411034722-manual-multi-form.ts index 66c7a05ef..d43e62d65 100644 --- a/packages/plugins/workflow/src/server/migrations/20230411034722-manual-multi-form.ts +++ b/packages/plugins/workflow/src/server/migrations/20230411034722-manual-multi-form.ts @@ -3,7 +3,6 @@ import { cloneDeep } from 'lodash'; import { Migration } from '@nocobase/server'; import { uid } from '@nocobase/utils'; - function findSchema(root, filter, onlyLeaf = false) { const result = []; @@ -17,7 +16,7 @@ function findSchema(root, filter, onlyLeaf = false) { } if (root.properties) { - Object.keys(root.properties).forEach(key => { + Object.keys(root.properties).forEach((key) => { result.push(...findSchema(root.properties[key], filter)); }); } @@ -25,7 +24,7 @@ function findSchema(root, filter, onlyLeaf = false) { } function findParent(root, node) { - return findSchema(root, item => item.properties && Object.values(item.properties).includes(node))[0]; + return findSchema(root, (item) => item.properties && Object.values(item.properties).includes(node))[0]; } // 1. all form blocks combine into one, at first form block position @@ -35,36 +34,41 @@ function findParent(root, node) { // 5. make collection fields decorator as `FormCollectionProvider` for form block // 6. add form component wrapper for form grid // 7. move action footer to form block -function migrateConfig({ schema = {}, actions = [] }: { schema: any; actions: number[] }): Object { +function migrateConfig({ schema = {}, actions = [] }: { schema: any; actions: number[] }): object { const { blocks, collection } = schema; if (!blocks) { return { - forms: {} + forms: {}, }; } const root = { properties: blocks }; const formBlocks = findSchema(root, (item) => { - return item['x-component'] === 'CardItem' - && item['x-designer'] === 'SimpleDesigner' - && item.properties.grid['x-initializer'] === 'AddFormField'; + return ( + item['x-component'] === 'CardItem' && + item['x-designer'] === 'SimpleDesigner' && + item.properties.grid['x-initializer'] === 'AddFormField' + ); }); if (!formBlocks.length) { return { schema: blocks, - forms: {} + forms: {}, }; } // 1. formBlocks.forEach((formBlock, i) => { - const formItems = findSchema(formBlock, (item) => { - return item['x-component'] === 'CollectionField' - && item['x-decorator'] === 'FormItem'; - }, true); + const formItems = findSchema( + formBlock, + (item) => { + return item['x-component'] === 'CollectionField' && item['x-decorator'] === 'FormItem'; + }, + true, + ); // 4. - formItems.forEach(item => { + formItems.forEach((item) => { Object.assign(item, { - 'x-interface-options': collection.fields.find(field => field.name === item.name) + 'x-interface-options': collection.fields.find((field) => field.name === item.name), }); }); // skip first form block @@ -89,14 +93,14 @@ function migrateConfig({ schema = {}, actions = [] }: { schema: any; actions: nu Object.assign(formBlock, { 'x-decorator': 'FormCollectionProvider', 'x-decorator-props': { - collection + collection, }, 'x-component-props': { title: '{{t("Form")}}', }, 'x-designer-props': { type: 'customForm', - } + }, }); const formId = uid(); @@ -106,11 +110,11 @@ function migrateConfig({ schema = {}, actions = [] }: { schema: any; actions: nu type: 'void', 'x-component': 'FormV2', 'x-component-props': { - useProps: '{{ useFormBlockProps }}' + useProps: '{{ useFormBlockProps }}', }, properties: { grid: Object.assign(formBlock.properties.grid, { - 'x-initializer': 'AddCustomFormField' + 'x-initializer': 'AddCustomFormField', }), // 7. actions: { @@ -124,10 +128,10 @@ function migrateConfig({ schema = {}, actions = [] }: { schema: any; actions: nu }, }, 'x-initializer': 'AddActionButton', - properties: schema.actions - } - } - } + properties: schema.actions, + }, + }, + }, }; delete formBlock.properties.grid; Object.assign(formBlock.properties, newFormBlock); @@ -139,14 +143,14 @@ function migrateConfig({ schema = {}, actions = [] }: { schema: any; actions: nu type: 'custom', title: '{{t("Form")}}', actions, - collection - } - } + collection, + }, + }, }; } function migrateUsedConfig(config, manualForms) { - Object.keys(config).forEach(key => { + Object.keys(config).forEach((key) => { const valueType = typeof config[key]; if (valueType === 'string') { config[key] = config[key].replace(/{{\s*\$jobsMapByNodeId\.(\d+)(\.[^}]+)?\s*}}/g, (matched, id, path) => { @@ -162,7 +166,6 @@ function migrateUsedConfig(config, manualForms) { return config; } - export default class extends Migration { async up() { const match = await this.app.version.satisfies('<0.9.1-alpha.3'); @@ -175,83 +178,107 @@ export default class extends Migration { await db.sequelize.transaction(async (transaction) => { const nodes = await NodeRepo.find({ filter: { - type: 'manual' + type: 'manual', }, - transaction + transaction, }); console.log('%d nodes need to be migrated.', nodes.length); - await nodes.reduce((promise, node) => promise.then(() => { - const { forms, schema, actions, ...config } = node.config; - if (forms) { - return; - } - return node.update({ - config: { - ...config, - ...migrateConfig({ schema, actions }) - } - }, { - silent: true, - transaction - }); - }), Promise.resolve()); + await nodes.reduce( + (promise, node) => + promise.then(() => { + const { forms, schema, actions, ...config } = node.config; + if (forms) { + return; + } + return node.update( + { + config: { + ...config, + ...migrateConfig({ schema, actions }), + }, + }, + { + silent: true, + transaction, + }, + ); + }), + Promise.resolve(), + ); const usersJobs = await UserJobRepo.find({ filter: { - nodeId: nodes.map(item => item.id) + nodeId: nodes.map((item) => item.id), }, appends: ['job', 'node'], - transaction + transaction, }); // update all results - await usersJobs.reduce((promise, userJob) => promise.then(async () => { - const { result, job, node } = userJob; - const { forms } = node.config; - const [formId] = Object.keys(forms); - if (result) { - await userJob.update({ - result: { [formId]: result } - }, { - silent: true, - transaction - }); - } - if (job.result) { - await job.update({ - result: { [formId]: result } - }, { - silent: true, - transaction - }); - } - }), Promise.resolve()); + await usersJobs.reduce( + (promise, userJob) => + promise.then(async () => { + const { result, job, node } = userJob; + const { forms } = node.config; + const [formId] = Object.keys(forms); + if (result) { + await userJob.update( + { + result: { [formId]: result }, + }, + { + silent: true, + transaction, + }, + ); + } + if (job.result) { + await job.update( + { + result: { [formId]: result }, + }, + { + silent: true, + transaction, + }, + ); + } + }), + Promise.resolve(), + ); const usedNodes = await NodeRepo.find({ filter: { type: { - $notIn: ['delay', 'parallel'] - } + $notIn: ['delay', 'parallel'], + }, }, - transaction + transaction, }); const nodeForms = {}; - nodes.forEach(node => { + nodes.forEach((node) => { const [form] = Object.keys(node.config.forms); if (form) { nodeForms[node.id] = form; } }); - await usedNodes.reduce((promise, node) => promise.then(async () => { - await node.update({ - config: migrateUsedConfig(cloneDeep(node.config ?? {}), nodeForms) - }, { - silent: true, - transaction - }); - }), Promise.resolve()); + await usedNodes.reduce( + (promise, node) => + promise.then(async () => { + await node.update( + { + config: migrateUsedConfig(cloneDeep(node.config ?? {}), nodeForms), + }, + { + silent: true, + transaction, + }, + ); + }), + Promise.resolve(), + ); }); } } diff --git a/packages/plugins/workflow/src/server/models/Execution.ts b/packages/plugins/workflow/src/server/models/Execution.ts index 86821d5d7..8a65de6bd 100644 --- a/packages/plugins/workflow/src/server/models/Execution.ts +++ b/packages/plugins/workflow/src/server/models/Execution.ts @@ -3,8 +3,6 @@ import { BelongsToGetAssociationMixin, HasManyGetAssociationsMixin } from 'seque import WorkflowModel from './Workflow'; import JobModel from './Job'; - - export default class ExecutionModel extends Model { declare static readonly database: Database; diff --git a/packages/plugins/workflow/src/server/models/FlowNode.ts b/packages/plugins/workflow/src/server/models/FlowNode.ts index 19816ca5b..ec0fd2598 100644 --- a/packages/plugins/workflow/src/server/models/FlowNode.ts +++ b/packages/plugins/workflow/src/server/models/FlowNode.ts @@ -2,7 +2,6 @@ import { Database, Model } from '@nocobase/database'; import { BelongsToGetAssociationMixin } from 'sequelize'; import WorkflowModel from './Workflow'; - export default class FlowNodeModel extends Model { declare static readonly database: Database; diff --git a/packages/plugins/workflow/src/server/models/Job.ts b/packages/plugins/workflow/src/server/models/Job.ts index cde654334..12c15a2a7 100644 --- a/packages/plugins/workflow/src/server/models/Job.ts +++ b/packages/plugins/workflow/src/server/models/Job.ts @@ -16,4 +16,4 @@ export default class JobModel extends Model { declare nodeId: number; declare node?: FlowNodeModel; declare getNode: BelongsToGetAssociationMixin; -} \ No newline at end of file +} diff --git a/packages/plugins/workflow/src/server/models/Workflow.ts b/packages/plugins/workflow/src/server/models/Workflow.ts index 3aca769de..0b35a2d2a 100644 --- a/packages/plugins/workflow/src/server/models/Workflow.ts +++ b/packages/plugins/workflow/src/server/models/Workflow.ts @@ -1,10 +1,14 @@ import { Database, Model, Op } from '@nocobase/database'; -import { HasManyCountAssociationsMixin, HasManyCreateAssociationMixin, HasManyGetAssociationsMixin, Transactionable } from 'sequelize'; +import { + HasManyCountAssociationsMixin, + HasManyCreateAssociationMixin, + HasManyGetAssociationsMixin, + Transactionable, +} from 'sequelize'; import ExecutionModel from './Execution'; import FlowNodeModel from './FlowNode'; - export default class WorkflowModel extends Model { declare static database: Database; diff --git a/packages/plugins/workflow/src/server/triggers/collection.ts b/packages/plugins/workflow/src/server/triggers/collection.ts index 9c40ce77e..81e772e59 100644 --- a/packages/plugins/workflow/src/server/triggers/collection.ts +++ b/packages/plugins/workflow/src/server/triggers/collection.ts @@ -1,6 +1,6 @@ -import { Collection, Model } from "@nocobase/database"; -import { Trigger } from ".."; -import WorkflowModel from "../models/Workflow"; +import { Collection, Model } from '@nocobase/database'; +import { Trigger } from '..'; +import WorkflowModel from '../models/Workflow'; export interface CollectionChangeTriggerConfig { collection: string; @@ -12,7 +12,7 @@ export interface CollectionChangeTriggerConfig { const MODE_BITMAP = { CREATE: 1, UPDATE: 2, - DESTROY: 4 + DESTROY: 4, }; const MODE_BITMAP_EVENTS = new Map(); @@ -20,8 +20,6 @@ MODE_BITMAP_EVENTS.set(MODE_BITMAP.CREATE, 'afterCreateWithAssociations'); MODE_BITMAP_EVENTS.set(MODE_BITMAP.UPDATE, 'afterUpdateWithAssociations'); MODE_BITMAP_EVENTS.set(MODE_BITMAP.DESTROY, 'afterDestroy'); - - function getHookId(workflow, type) { return `${type}#${workflow.id}`; } @@ -42,11 +40,12 @@ async function handler(this: CollectionTrigger, workflow: WorkflowModel, data: M const { repository, model } = collection; // NOTE: if no configured fields changed, do not trigger - if (changed - && changed.length - && changed - .filter(name => !['linkTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(collection.getField(name).type)) - .every(name => !data.changedWithAssociations(getFieldRawName(collection, name))) + if ( + changed && + changed.length && + changed + .filter((name) => !['linkTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(collection.getField(name).type)) + .every((name) => !data.changedWithAssociations(getFieldRawName(collection, name))) ) { return; } @@ -56,13 +55,10 @@ async function handler(this: CollectionTrigger, workflow: WorkflowModel, data: M // const calculation = toCalculation(condition); const count = await repository.count({ filter: { - $and: [ - condition, - { [model.primaryKeyAttribute]: data[model.primaryKeyAttribute] } - ] + $and: [condition, { [model.primaryKeyAttribute]: data[model.primaryKeyAttribute] }], }, context, - transaction + transaction, }); if (!count) { @@ -71,21 +67,27 @@ async function handler(this: CollectionTrigger, workflow: WorkflowModel, data: M } if (appends?.length && !(mode & MODE_BITMAP.DESTROY)) { - const includeFields = appends.filter(field => !data.get(field) || !data[field]); + const includeFields = appends.filter((field) => !data.get(field) || !data[field]); const included = await model.findByPk(data[model.primaryKeyAttribute], { attributes: [model.primaryKeyAttribute], include: includeFields, - transaction + transaction, }); - includeFields.forEach(field => { + includeFields.forEach((field) => { const value = included!.get(field); - data.set(field, Array.isArray(value) ? value.map(item => item.toJSON()) : (value ? value.toJSON() : null), { raw: true }); + data.set(field, Array.isArray(value) ? value.map((item) => item.toJSON()) : value ? value.toJSON() : null, { + raw: true, + }); }); } - this.plugin.trigger(workflow, { data: data.toJSON() }, { - context - }); + this.plugin.trigger( + workflow, + { data: data.toJSON() }, + { + context, + }, + ); } export default class CollectionTrigger extends Trigger { @@ -99,7 +101,7 @@ export default class CollectionTrigger extends Trigger { return; } - for (let [key, type] of MODE_BITMAP_EVENTS.entries()) { + for (const [key, type] of MODE_BITMAP_EVENTS.entries()) { const event = `${collection}.${type}`; const name = getHookId(workflow, event); if (mode & key) { @@ -125,7 +127,7 @@ export default class CollectionTrigger extends Trigger { if (!Collection) { return; } - for (let [key, type] of MODE_BITMAP_EVENTS.entries()) { + for (const [key, type] of MODE_BITMAP_EVENTS.entries()) { const event = `${collection}.${type}`; const name = getHookId(workflow, event); if (mode & key) { diff --git a/packages/plugins/workflow/src/server/triggers/index.ts b/packages/plugins/workflow/src/server/triggers/index.ts index 69b83af8f..1dc25c7b7 100644 --- a/packages/plugins/workflow/src/server/triggers/index.ts +++ b/packages/plugins/workflow/src/server/triggers/index.ts @@ -4,15 +4,13 @@ import { requireModule } from '@nocobase/utils'; import Plugin from '..'; import WorkflowModel from '../models/Workflow'; - - export abstract class Trigger { constructor(public readonly plugin: Plugin) {} abstract on(workflow: WorkflowModel): void; abstract off(workflow: WorkflowModel): void; } -export default function(plugin, more: { [key: string]: { new(p: Plugin): T } } = {}) { +export default function (plugin, more: { [key: string]: { new (p: Plugin): T } } = {}) { const { triggers } = plugin; triggers.register('collection', new (requireModule(path.join(__dirname, 'collection')))(plugin)); diff --git a/packages/plugins/workflow/src/server/triggers/schedule.ts b/packages/plugins/workflow/src/server/triggers/schedule.ts index b76943591..486b529ea 100644 --- a/packages/plugins/workflow/src/server/triggers/schedule.ts +++ b/packages/plugins/workflow/src/server/triggers/schedule.ts @@ -1,14 +1,16 @@ import parser from 'cron-parser'; -import { literal, Op, where, fn } from 'sequelize'; +import { Op, fn, literal, where } from 'sequelize'; import Plugin, { Trigger } from '..'; import WorkflowModel from '../models/Workflow'; -export type ScheduleOnField = string | { - field: string; - // in seconds - offset?: number; - unit?: 1000 | 60000 | 3600000 | 86400000; -}; +export type ScheduleOnField = + | string + | { + field: string; + // in seconds + offset?: number; + unit?: 1000 | 60000 | 3600000 | 86400000; + }; export interface ScheduleTriggerConfig { // trigger mode mode: number; @@ -23,7 +25,7 @@ export interface ScheduleTriggerConfig { export const SCHEDULE_MODE = { CONSTANT: 0, - COLLECTION_FIELD: 1 + COLLECTION_FIELD: 1, } as const; interface ScheduleMode { @@ -46,13 +48,13 @@ ScheduleModes.set(SCHEDULE_MODE.CONSTANT, { // NOTE: align to second start const startTime = parseDateWithoutMs(startsOn); - if (!startTime || (startTime > timestamp + this.cacheCycle)) { + if (!startTime || startTime > timestamp + this.cacheCycle) { return false; } if (repeat) { if (typeof repeat === 'number') { - const next = timestamp - (timestamp - startTime) % repeat + repeat; + const next = timestamp - ((timestamp - startTime) % repeat) + repeat; if (next <= timestamp || next > timestamp + this.cacheCycle) { return false; } @@ -101,14 +103,14 @@ ScheduleModes.set(SCHEDULE_MODE.CONSTANT, { } return this.plugin.trigger(workflow, { date: now }); - } + }, }); function getOnTimestampWithOffset(on, now: Date) { switch (typeof on) { case 'string': return parseDateWithoutMs(on); - case 'object': + case 'object': { const { field, offset = 0, unit = 1000 } = on; if (!field) { return null; @@ -117,6 +119,7 @@ function getOnTimestampWithOffset(on, now: Date) { // onDate + offset > now // onDate > now - offset return timestamp - offset * unit; + } default: return null; } @@ -127,12 +130,14 @@ function getDataOptionTime(data, on, dir = 1) { return null; } switch (typeof on) { - case 'string': + case 'string': { const time = parseDateWithoutMs(on); return time ? time : null; - case 'object': + } + case 'object': { const { field, offset = 0, unit = 1000 } = on; return data.get(field) ? data.get(field).getTime() - offset * unit * dir : null; + } default: return null; } @@ -142,7 +147,7 @@ function getHookId(workflow, type: string) { return `${type}#${workflow.id}`; } -const DialectTimestampFnMap: { [key: string]: Function } = { +const DialectTimestampFnMap: { [key: string]: (col: string) => string } = { postgres(col) { return `CAST(FLOOR(extract(epoch from "${col}")) AS INTEGER)`; }, @@ -151,7 +156,7 @@ const DialectTimestampFnMap: { [key: string]: Function } = { }, sqlite(col) { return `CAST(FLOOR(unixepoch(${col})) AS INTEGER)`; - } + }, }; DialectTimestampFnMap.mariadb = DialectTimestampFnMap.mysql; @@ -182,9 +187,10 @@ ScheduleModes.set(SCHEDULE_MODE.COLLECTION_FIELD, { if (!matchNext.call(this, workflow, now)) { return; } - if (typeof repeat === 'number' - && repeat > this.cacheCycle - && (timestamp - startTime) % repeat > this.cacheCycle + if ( + typeof repeat === 'number' && + repeat > this.cacheCycle && + (timestamp - startTime) % repeat > this.cacheCycle ) { return; } @@ -219,23 +225,22 @@ ScheduleModes.set(SCHEDULE_MODE.COLLECTION_FIELD, { const conditions: any[] = [ { [startsOn.field]: { - [Op.lt]: new Date(startTimestamp + this.cacheCycle) - } - } + [Op.lt]: new Date(startTimestamp + this.cacheCycle), + }, + }, ]; // when repeat is number, means repeat after startsOn // (now - startsOn) % repeat <= cacheCycle if (repeat) { const tsFn = DialectTimestampFnMap[db.options.dialect!]; - if (typeof repeat === 'number' - && repeat > this.cacheCycle - && tsFn - ) { - conditions.push(where( - fn('MOD', literal(`${Math.round(timestamp / 1000)} - ${tsFn(startsOn.field)}`), Math.round(repeat / 1000)), - { [Op.lt]: Math.round(this.cacheCycle / 1000) } - )); + if (typeof repeat === 'number' && repeat > this.cacheCycle && tsFn) { + conditions.push( + where( + fn('MOD', literal(`${Math.round(timestamp / 1000)} - ${tsFn(startsOn.field)}`), Math.round(repeat / 1000)), + { [Op.lt]: Math.round(this.cacheCycle / 1000) }, + ), + ); // conditions.push(literal(`mod(${timestamp} - ${tsFn(startsOn.field)} * 1000, ${repeat}) < ${this.cacheCycle}`)); } @@ -251,22 +256,22 @@ ScheduleModes.set(SCHEDULE_MODE.COLLECTION_FIELD, { } else { conditions.push({ [endsOn.field]: { - [Op.gte]: new Date(endTimestamp + this.interval) - } + [Op.gte]: new Date(endTimestamp + this.interval), + }, }); } } } else { conditions.push({ [startsOn.field]: { - [Op.gte]: new Date(startTimestamp) - } + [Op.gte]: new Date(startTimestamp), + }, }); } const { model } = db.getCollection(collection); const count = await model.count({ - where: { [Op.and]: conditions } + where: { [Op.and]: conditions }, }); return Boolean(count); @@ -284,25 +289,27 @@ ScheduleModes.set(SCHEDULE_MODE.COLLECTION_FIELD, { const conditions: any[] = [ { [startsOn.field]: { - [Op.lt]: new Date(startTimestamp + this.interval) - } - } + [Op.lt]: new Date(startTimestamp + this.interval), + }, + }, ]; if (repeat) { // startsOn not after now conditions.push({ [startsOn.field]: { - [Op.lt]: new Date(startTimestamp) - } + [Op.lt]: new Date(startTimestamp), + }, }); const tsFn = DialectTimestampFnMap[this.plugin.app.db.options.dialect!]; if (typeof repeat === 'number' && tsFn) { - conditions.push(where( - fn('MOD', literal(`${Math.round(timestamp / 1000)} - ${tsFn(startsOn.field)}`), Math.round(repeat / 1000)), - { [Op.eq]: 0 } - )); + conditions.push( + where( + fn('MOD', literal(`${Math.round(timestamp / 1000)} - ${tsFn(startsOn.field)}`), Math.round(repeat / 1000)), + { [Op.eq]: 0 }, + ), + ); // conditions.push(literal(`MOD(CAST(${timestamp} AS BIGINT) - CAST((FLOOR(${tsFn(startsOn.field)}) AS BIGINT) * 1000), ${repeat}) = 0`)); } @@ -319,8 +326,8 @@ ScheduleModes.set(SCHEDULE_MODE.COLLECTION_FIELD, { } else { conditions.push({ [endsOn.field]: { - [Op.gte]: new Date(endTimestamp + this.interval) - } + [Op.gte]: new Date(endTimestamp + this.interval), + }, }); } } @@ -328,29 +335,28 @@ ScheduleModes.set(SCHEDULE_MODE.COLLECTION_FIELD, { // startsOn exactly equal to now in 1s conditions.push({ [startsOn.field]: { - [Op.gte]: new Date(startTimestamp) - } + [Op.gte]: new Date(startTimestamp), + }, }); } const repo = this.plugin.app.db.getRepository(collection); const instances = await repo.find({ filter: { - $and: conditions + $and: conditions, }, - appends + appends, }); - instances.forEach(item => { + instances.forEach((item) => { this.plugin.trigger(workflow, { date: now, - data: item.toJSON() + data: item.toJSON(), }); }); - } + }, }); - function matchNext(this: ScheduleTrigger, workflow, now: Date, range: number = this.cacheCycle): boolean { const { repeat } = workflow.config; // no repeat means no need to rerun @@ -365,7 +371,7 @@ function matchNext(this: ScheduleTrigger, workflow, now: Date, range: number = t currentDate.setMilliseconds(-1); const timestamp = now.getTime(); const interval = parser.parseExpression(repeat, { currentDate }); - let next = interval.next(); + const next = interval.next(); // NOTE: cache all workflows will be matched in current cycle if (next.getTime() - timestamp <= range) { @@ -379,21 +385,21 @@ export default class ScheduleTrigger extends Trigger { static CacheRules = [ ({ config, allExecuted }) => (config.limit ? allExecuted < config.limit : true) && config.startsOn, matchNext, - function(workflow, now) { + function (workflow, now) { const { mode } = workflow.config; const modeHandlers = ScheduleModes.get(mode); if (!modeHandlers) { return false; } return modeHandlers.shouldCache.call(this, workflow, now); - } + }, ]; static TriggerRules = [ ({ config, allExecuted }) => (config.limit ? allExecuted < config.limit : true) && config.startsOn, function (workflow, now) { return matchNext.call(this, workflow, now, 0); - } + }, ]; events = new Map(); @@ -403,9 +409,9 @@ export default class ScheduleTrigger extends Trigger { private cache: Map = new Map(); // running interval, default to 1s - interval: number = 1_000; + interval = 1_000; // caching workflows in range, default to 1min - cacheCycle: number = 60_000; + cacheCycle = 60_000; constructor(plugin: Plugin) { super(plugin); @@ -431,7 +437,7 @@ export default class ScheduleTrigger extends Trigger { // try to align to system time on each second starts, // after at least 1 second initialized for anything to get ready. // so jobs in 2 seconds will be missed at first start. - 1_000 - now.getMilliseconds() + 1_000 - now.getMilliseconds(), ); } @@ -456,16 +462,19 @@ export default class ScheduleTrigger extends Trigger { // NOTE: trigger workflows in sequence when sqlite due to only one transaction const isSqlite = this.plugin.app.db.options.dialect === 'sqlite'; - return Array.from(this.cache.values()).reduce((prev, workflow) => { - if (!this.shouldTrigger(workflow, now)) { - return prev; - } - if (isSqlite) { - return prev.then(() => this.trigger(workflow, now)); - } - this.trigger(workflow, now); - return null; - }, isSqlite ? Promise.resolve() : null); + return Array.from(this.cache.values()).reduce( + (prev, workflow) => { + if (!this.shouldTrigger(workflow, now)) { + return prev; + } + if (isSqlite) { + return prev.then(() => this.trigger(workflow, now)); + } + this.trigger(workflow, now); + return null; + }, + isSqlite ? Promise.resolve() : null, + ); } async reload() { @@ -479,7 +488,7 @@ export default class ScheduleTrigger extends Trigger { separate: true, limit: 1, order: [['createdAt', 'DESC']], - } + }, ], group: ['id'], }); @@ -506,9 +515,7 @@ export default class ScheduleTrigger extends Trigger { } setCache(workflow, out = false) { - out - ? this.cache.delete(workflow.id) - : this.cache.set(workflow.id, workflow); + out ? this.cache.delete(workflow.id) : this.cache.set(workflow.id, workflow); } async shouldCache(workflow, now) { diff --git a/packages/presets/nocobase/src/index.ts b/packages/presets/nocobase/src/index.ts index c38faa9a7..de083f60c 100644 --- a/packages/presets/nocobase/src/index.ts +++ b/packages/presets/nocobase/src/index.ts @@ -76,7 +76,7 @@ export class PresetNocoBase extends Plugin { console.log(`The version number before upgrade is ${version}`); }); - this.app.on('beforeUpgrade', async (options) => { + this.app.on('beforeUpgrade', async () => { const result = await this.app.version.satisfies('<0.8.0-alpha.1'); if (result) { @@ -104,7 +104,7 @@ export class PresetNocoBase extends Plugin { await this.app.db.sync(); }); - this.app.on('beforeInstall', async (options) => { + this.app.on('beforeInstall', async () => { console.log(`Initialize all built-in plugins beforeInstall in ${this.app.name}`); await this.addBuiltInPlugins({ method: 'install' }); }); diff --git a/packages/samples/command/src/server/index.ts b/packages/samples/command/src/server/index.ts index dca5ec858..61c16a636 100644 --- a/packages/samples/command/src/server/index.ts +++ b/packages/samples/command/src/server/index.ts @@ -4,7 +4,6 @@ import path from 'path'; import { InstallOptions, Plugin } from '@nocobase/server'; export class CommandPlugin extends Plugin { - beforeLoad() { // TODO } @@ -15,16 +14,20 @@ export class CommandPlugin extends Plugin { .option('-o, --output-dir') .action(async (options, ...collections) => { const { outputDir = path.join(process.env.PWD, 'storage') } = options; - await collections.reduce((promise, collection) => promise.then(async () => { - if (!this.db.hasCollection(collection)) { - console.warn('No such collection:', collection); - return; - } + await collections.reduce( + (promise, collection) => + promise.then(async () => { + if (!this.db.hasCollection(collection)) { + console.warn('No such collection:', collection); + return; + } - const repo = this.db.getRepository(collection); - const data = repo.find(); - await fs.writeFile(path.join(outputDir, `${collection}.json`), JSON.stringify(data), { mode: 0o644 }); - }), Promise.resolve()); + const repo = this.db.getRepository(collection); + const data = repo.find(); + await fs.writeFile(path.join(outputDir, `${collection}.json`), JSON.stringify(data), { mode: 0o644 }); + }), + Promise.resolve(), + ); }); } diff --git a/packages/samples/custom-block/src/server/index.ts b/packages/samples/custom-block/src/server/index.ts index a25716eab..9671f634f 100644 --- a/packages/samples/custom-block/src/server/index.ts +++ b/packages/samples/custom-block/src/server/index.ts @@ -1,7 +1,6 @@ import { InstallOptions, Plugin } from '@nocobase/server'; export class CustomBlockPlugin extends Plugin { - beforeLoad() { // TODO } diff --git a/packages/samples/custom-collection-template/src/server/index.ts b/packages/samples/custom-collection-template/src/server/index.ts index 75c6b5349..5a6c06102 100644 --- a/packages/samples/custom-collection-template/src/server/index.ts +++ b/packages/samples/custom-collection-template/src/server/index.ts @@ -1,7 +1,6 @@ import { InstallOptions, Plugin } from '@nocobase/server'; export class CustomCollectionTemplatePlugin extends Plugin { - afterAdd() {} beforeLoad() {} diff --git a/packages/samples/custom-page/src/server/index.ts b/packages/samples/custom-page/src/server/index.ts index d44ae4178..853bf3880 100644 --- a/packages/samples/custom-page/src/server/index.ts +++ b/packages/samples/custom-page/src/server/index.ts @@ -1,7 +1,6 @@ import { InstallOptions, Plugin } from '@nocobase/server'; export class CustomPagePlugin extends Plugin { - afterAdd() {} beforeLoad() {} diff --git a/packages/samples/hello/src/client/HelloDesigner.tsx b/packages/samples/hello/src/client/HelloDesigner.tsx index ba5602092..d1afc02da 100644 --- a/packages/samples/hello/src/client/HelloDesigner.tsx +++ b/packages/samples/hello/src/client/HelloDesigner.tsx @@ -1,9 +1,5 @@ import { useFieldSchema } from '@formily/react'; -import { - GeneralSchemaDesigner, - SchemaSettings, - useCollection -} from '@nocobase/client'; +import { GeneralSchemaDesigner, SchemaSettings, useCollection } from '@nocobase/client'; import React from 'react'; export const HelloDesigner = () => { diff --git a/packages/samples/hello/src/client/index.tsx b/packages/samples/hello/src/client/index.tsx index 165c259ae..38ef3b388 100644 --- a/packages/samples/hello/src/client/index.tsx +++ b/packages/samples/hello/src/client/index.tsx @@ -2,7 +2,8 @@ import { TableOutlined } from '@ant-design/icons'; import { SchemaComponentOptions, SchemaInitializer, - SchemaInitializerContext, SettingsCenterProvider + SchemaInitializerContext, + SettingsCenterProvider, } from '@nocobase/client'; import { Card } from 'antd'; import React, { useContext } from 'react'; diff --git a/packages/samples/ratelimit/src/server/index.ts b/packages/samples/ratelimit/src/server/index.ts index 6b3a083de..39b6c24f0 100644 --- a/packages/samples/ratelimit/src/server/index.ts +++ b/packages/samples/ratelimit/src/server/index.ts @@ -2,7 +2,6 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import ratelimit from 'koa-ratelimit'; export class CustomPagePlugin extends Plugin { - beforeLoad() { const db = new Map(); this.app.use( diff --git a/packages/samples/shop-actions/src/server/collections/categories.ts b/packages/samples/shop-actions/src/server/collections/categories.ts index d3704b8b5..961526698 100644 --- a/packages/samples/shop-actions/src/server/collections/categories.ts +++ b/packages/samples/shop-actions/src/server/collections/categories.ts @@ -3,11 +3,11 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'hasMany', name: 'products', - } - ] + }, + ], }; diff --git a/packages/samples/shop-actions/src/server/collections/deliveries.ts b/packages/samples/shop-actions/src/server/collections/deliveries.ts index 33313595d..27889ada7 100644 --- a/packages/samples/shop-actions/src/server/collections/deliveries.ts +++ b/packages/samples/shop-actions/src/server/collections/deliveries.ts @@ -3,19 +3,19 @@ export default { fields: [ { type: 'belongsTo', - name: 'order' + name: 'order', }, { type: 'string', - name: 'provider' + name: 'provider', }, { type: 'string', - name: 'trackingNumber' + name: 'trackingNumber', }, { type: 'integer', - name: 'status' - } - ] + name: 'status', + }, + ], }; diff --git a/packages/samples/shop-actions/src/server/collections/orders.ts b/packages/samples/shop-actions/src/server/collections/orders.ts index e524b3a84..d623fcfb9 100644 --- a/packages/samples/shop-actions/src/server/collections/orders.ts +++ b/packages/samples/shop-actions/src/server/collections/orders.ts @@ -3,31 +3,31 @@ export default { fields: [ { type: 'belongsTo', - name: 'product' + name: 'product', }, { type: 'integer', - name: 'quantity' + name: 'quantity', }, { type: 'integer', - name: 'totalPrice' + name: 'totalPrice', }, { type: 'integer', - name: 'status' + name: 'status', }, { type: 'string', - name: 'address' + name: 'address', }, { type: 'belongsTo', - name: 'user' + name: 'user', }, { type: 'hasOne', - name: 'delivery' - } - ] + name: 'delivery', + }, + ], }; diff --git a/packages/samples/shop-actions/src/server/collections/products.ts b/packages/samples/shop-actions/src/server/collections/products.ts index 99e9daf16..8fe4ab376 100644 --- a/packages/samples/shop-actions/src/server/collections/products.ts +++ b/packages/samples/shop-actions/src/server/collections/products.ts @@ -3,19 +3,19 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'integer', - name: 'price' + name: 'price', }, { type: 'boolean', - name: 'enabled' + name: 'enabled', }, { type: 'integer', - name: 'inventory' - } - ] + name: 'inventory', + }, + ], }; diff --git a/packages/samples/shop-events/src/server/collections/categories.ts b/packages/samples/shop-events/src/server/collections/categories.ts index d3704b8b5..961526698 100644 --- a/packages/samples/shop-events/src/server/collections/categories.ts +++ b/packages/samples/shop-events/src/server/collections/categories.ts @@ -3,11 +3,11 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'hasMany', name: 'products', - } - ] + }, + ], }; diff --git a/packages/samples/shop-events/src/server/collections/deliveries.ts b/packages/samples/shop-events/src/server/collections/deliveries.ts index e253691e9..715c0ed23 100644 --- a/packages/samples/shop-events/src/server/collections/deliveries.ts +++ b/packages/samples/shop-events/src/server/collections/deliveries.ts @@ -3,20 +3,20 @@ export default { fields: [ { type: 'belongsTo', - name: 'order' + name: 'order', }, { type: 'string', - name: 'provider' + name: 'provider', }, { type: 'string', - name: 'trackingNumber' + name: 'trackingNumber', }, { type: 'integer', name: 'status', - defaultValue: 0 - } - ] + defaultValue: 0, + }, + ], }; diff --git a/packages/samples/shop-events/src/server/collections/orders.ts b/packages/samples/shop-events/src/server/collections/orders.ts index e524b3a84..d623fcfb9 100644 --- a/packages/samples/shop-events/src/server/collections/orders.ts +++ b/packages/samples/shop-events/src/server/collections/orders.ts @@ -3,31 +3,31 @@ export default { fields: [ { type: 'belongsTo', - name: 'product' + name: 'product', }, { type: 'integer', - name: 'quantity' + name: 'quantity', }, { type: 'integer', - name: 'totalPrice' + name: 'totalPrice', }, { type: 'integer', - name: 'status' + name: 'status', }, { type: 'string', - name: 'address' + name: 'address', }, { type: 'belongsTo', - name: 'user' + name: 'user', }, { type: 'hasOne', - name: 'delivery' - } - ] + name: 'delivery', + }, + ], }; diff --git a/packages/samples/shop-events/src/server/collections/products.ts b/packages/samples/shop-events/src/server/collections/products.ts index 99e9daf16..8fe4ab376 100644 --- a/packages/samples/shop-events/src/server/collections/products.ts +++ b/packages/samples/shop-events/src/server/collections/products.ts @@ -3,19 +3,19 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'integer', - name: 'price' + name: 'price', }, { type: 'boolean', - name: 'enabled' + name: 'enabled', }, { type: 'integer', - name: 'inventory' - } - ] + name: 'inventory', + }, + ], }; diff --git a/packages/samples/shop-i18n/src/client/index.tsx b/packages/samples/shop-i18n/src/client/index.tsx index ca835122b..82afa0a1f 100644 --- a/packages/samples/shop-i18n/src/client/index.tsx +++ b/packages/samples/shop-i18n/src/client/index.tsx @@ -1,9 +1,15 @@ -import React, { useContext } from 'react'; -import { useHistory } from 'react-router-dom'; -import { useTranslation } from 'react-i18next'; -import { Select } from 'antd'; import { ShopOutlined } from '@ant-design/icons'; -import { i18n, PluginManager, PluginManagerContext, RouteSwitchContext, SettingsCenterProvider } from '@nocobase/client'; +import { + i18n, + PluginManager, + PluginManagerContext, + RouteSwitchContext, + SettingsCenterProvider, +} from '@nocobase/client'; +import { Select } from 'antd'; +import React, { useContext } from 'react'; +import { useTranslation } from 'react-i18next'; +import { useHistory } from 'react-router-dom'; const ns = '@nocobase/plugin-sample-shop-i18n'; @@ -13,7 +19,7 @@ i18n.addResources('zh-CN', ns, { Pending: 'ๅทฒไธ‹ๅ•', Paid: 'ๅทฒๆ”ฏไป˜', Delivered: 'ๅทฒๅ‘่ดง', - Received: 'ๅทฒ็ญพๆ”ถ' + Received: 'ๅทฒ็ญพๆ”ถ', }); const ORDER_STATUS_LIST = [ @@ -22,15 +28,17 @@ const ORDER_STATUS_LIST = [ { value: 1, label: 'Paid' }, { value: 2, label: 'Delivered' }, { value: 3, label: 'Received' }, -] +]; function OrderStatusSelect() { const { t } = useTranslation(ns); return ( ); diff --git a/packages/samples/shop-i18n/src/server/collections/categories.ts b/packages/samples/shop-i18n/src/server/collections/categories.ts index d3704b8b5..961526698 100644 --- a/packages/samples/shop-i18n/src/server/collections/categories.ts +++ b/packages/samples/shop-i18n/src/server/collections/categories.ts @@ -3,11 +3,11 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'hasMany', name: 'products', - } - ] + }, + ], }; diff --git a/packages/samples/shop-i18n/src/server/collections/orders.ts b/packages/samples/shop-i18n/src/server/collections/orders.ts index 339a6c6b3..db3b0c9d8 100644 --- a/packages/samples/shop-i18n/src/server/collections/orders.ts +++ b/packages/samples/shop-i18n/src/server/collections/orders.ts @@ -3,23 +3,23 @@ export default { fields: [ { type: 'belongsTo', - name: 'product' + name: 'product', }, { type: 'integer', - name: 'quantity' + name: 'quantity', }, { type: 'integer', - name: 'totalPrice' + name: 'totalPrice', }, { type: 'integer', - name: 'status' + name: 'status', }, { type: 'belongsTo', - name: 'user' - } - ] + name: 'user', + }, + ], }; diff --git a/packages/samples/shop-i18n/src/server/collections/products.ts b/packages/samples/shop-i18n/src/server/collections/products.ts index 99e9daf16..8fe4ab376 100644 --- a/packages/samples/shop-i18n/src/server/collections/products.ts +++ b/packages/samples/shop-i18n/src/server/collections/products.ts @@ -3,19 +3,19 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'integer', - name: 'price' + name: 'price', }, { type: 'boolean', - name: 'enabled' + name: 'enabled', }, { type: 'integer', - name: 'inventory' - } - ] + name: 'inventory', + }, + ], }; diff --git a/packages/samples/shop-i18n/src/server/index.ts b/packages/samples/shop-i18n/src/server/index.ts index 84a688539..f44105734 100644 --- a/packages/samples/shop-i18n/src/server/index.ts +++ b/packages/samples/shop-i18n/src/server/index.ts @@ -57,6 +57,7 @@ export class ShopPlugin extends Plugin { this.app.acl.allow('orders', '*'); } + // eslint-disable-next-line @typescript-eslint/no-unused-vars async install(options: InstallOptions) { // TODO } diff --git a/packages/samples/shop-modeling/src/server/collections/categories.ts b/packages/samples/shop-modeling/src/server/collections/categories.ts index d3704b8b5..961526698 100644 --- a/packages/samples/shop-modeling/src/server/collections/categories.ts +++ b/packages/samples/shop-modeling/src/server/collections/categories.ts @@ -3,11 +3,11 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'hasMany', name: 'products', - } - ] + }, + ], }; diff --git a/packages/samples/shop-modeling/src/server/collections/orders.ts b/packages/samples/shop-modeling/src/server/collections/orders.ts index b8af29bc2..1a5c6c3e6 100644 --- a/packages/samples/shop-modeling/src/server/collections/orders.ts +++ b/packages/samples/shop-modeling/src/server/collections/orders.ts @@ -4,27 +4,27 @@ export default { { type: 'snowflake', name: 'id', - primaryKey: true + primaryKey: true, }, { type: 'belongsTo', - name: 'product' + name: 'product', }, { type: 'integer', - name: 'quantity' + name: 'quantity', }, { type: 'integer', - name: 'totalPrice' + name: 'totalPrice', }, { type: 'integer', - name: 'status' + name: 'status', }, { type: 'belongsTo', - name: 'user' - } - ] + name: 'user', + }, + ], }; diff --git a/packages/samples/shop-modeling/src/server/collections/products.ts b/packages/samples/shop-modeling/src/server/collections/products.ts index 99e9daf16..8fe4ab376 100644 --- a/packages/samples/shop-modeling/src/server/collections/products.ts +++ b/packages/samples/shop-modeling/src/server/collections/products.ts @@ -3,19 +3,19 @@ export default { fields: [ { type: 'string', - name: 'title' + name: 'title', }, { type: 'integer', - name: 'price' + name: 'price', }, { type: 'boolean', - name: 'enabled' + name: 'enabled', }, { type: 'integer', - name: 'inventory' - } - ] + name: 'inventory', + }, + ], }; diff --git a/packages/samples/shop-modeling/src/server/index.ts b/packages/samples/shop-modeling/src/server/index.ts index 5fcfa57c3..e443ec9a1 100644 --- a/packages/samples/shop-modeling/src/server/index.ts +++ b/packages/samples/shop-modeling/src/server/index.ts @@ -25,6 +25,7 @@ export class ShopPlugin extends Plugin { this.app.acl.allow('orders', '*'); } + // eslint-disable-next-line @typescript-eslint/no-unused-vars async install(options: InstallOptions) { // TODO } diff --git a/yarn.lock b/yarn.lock index fc68fb54b..2af6c19c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3254,10 +3254,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.38.0.tgz#73a8a0d8aa8a8e6fe270431c5e72ae91b5337892" - integrity sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g== +"@eslint/js@8.39.0": + version "8.39.0" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz#58b536bcc843f4cd1e02a7e6171da5c040f4d44b" + integrity sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng== "@formily/antd@2.0.20": version "2.0.20" @@ -5482,7 +5482,7 @@ resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-2.2.7.tgz#226a9e31680835a6188e887f3988e60c04d3f6a3" integrity sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA== -"@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -5790,7 +5790,7 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== -"@types/semver@^7.3.9": +"@types/semver@^7.3.12", "@types/semver@^7.3.9": version "7.3.13" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== @@ -5913,108 +5913,88 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.9.1": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== +"@typescript-eslint/eslint-plugin@^5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz#9b09ee1541bff1d2cebdcb87e7ce4a4003acde08" + integrity sha512-AVi0uazY5quFB9hlp2Xv+ogpfpk77xzsgsIEWyVS7uK/c7MZ5tw7ZPbapa0SbfkqE0fsAMkz5UwtgMLVk2BQAg== dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.59.1" + "@typescript-eslint/type-utils" "5.59.1" + "@typescript-eslint/utils" "5.59.1" + debug "^4.3.4" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== +"@typescript-eslint/parser@^5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.1.tgz#73c2c12127c5c1182d2e5b71a8fa2a85d215cbb4" + integrity sha512-nzjFAN8WEu6yPRDizIFyzAfgK7nybPodMNFGNH0M9tei2gYnYszRDqVA0xlnRjkl7Hkx2vYrEdb6fP2a21cG1g== dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - -"@typescript-eslint/parser@^5.30.7": - version "5.57.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.57.1.tgz#af911234bd4401d09668c5faf708a0570a17a748" - integrity sha512-hlA0BLeVSA/wBPKdPGxoVr9Pp6GutGoY380FEhbVi0Ph4WNe8kLvqIRx76RSQt1lynZKfrXKs0/XeEk4zZycuA== - dependencies: - "@typescript-eslint/scope-manager" "5.57.1" - "@typescript-eslint/types" "5.57.1" - "@typescript-eslint/typescript-estree" "5.57.1" + "@typescript-eslint/scope-manager" "5.59.1" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/typescript-estree" "5.59.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== +"@typescript-eslint/scope-manager@5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz#8a20222719cebc5198618a5d44113705b51fd7fe" + integrity sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA== dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/visitor-keys" "5.59.1" -"@typescript-eslint/scope-manager@5.57.1": - version "5.57.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.57.1.tgz#5d28799c0fc8b501a29ba1749d827800ef22d710" - integrity sha512-N/RrBwEUKMIYxSKl0oDK5sFVHd6VI7p9K5MyUlVYAY6dyNb/wHUqndkTd3XhpGlXgnQsBkRZuu4f9kAHghvgPw== +"@typescript-eslint/type-utils@5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz#63981d61684fd24eda2f9f08c0a47ecb000a2111" + integrity sha512-ZMWQ+Oh82jWqWzvM3xU+9y5U7MEMVv6GLioM3R5NJk6uvP47kZ7YvlgSHJ7ERD6bOY7Q4uxWm25c76HKEwIjZw== dependencies: - "@typescript-eslint/types" "5.57.1" - "@typescript-eslint/visitor-keys" "5.57.1" - -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - -"@typescript-eslint/types@5.57.1": - version "5.57.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.57.1.tgz#d9989c7a9025897ea6f0550b7036027f69e8a603" - integrity sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA== - -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" + "@typescript-eslint/typescript-estree" "5.59.1" + "@typescript-eslint/utils" "5.59.1" + debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.57.1": - version "5.57.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.1.tgz#10d9643e503afc1ca4f5553d9bbe672ea4050b71" - integrity sha512-A2MZqD8gNT0qHKbk2wRspg7cHbCDCk2tcqt6ScCFLr5Ru8cn+TCfM786DjPhqwseiS+PrYwcXht5ztpEQ6TFTw== +"@typescript-eslint/types@5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.1.tgz#03f3fedd1c044cb336ebc34cc7855f121991f41d" + integrity sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg== + +"@typescript-eslint/typescript-estree@5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz#4aa546d27fd0d477c618f0ca00b483f0ec84c43c" + integrity sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA== dependencies: - "@typescript-eslint/types" "5.57.1" - "@typescript-eslint/visitor-keys" "5.57.1" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/visitor-keys" "5.59.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== +"@typescript-eslint/utils@5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.1.tgz#d89fc758ad23d2157cfae53f0b429bdf15db9473" + integrity sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA== dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.59.1" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/typescript-estree" "5.59.1" + eslint-scope "^5.1.1" + semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.57.1": - version "5.57.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.1.tgz#585e5fa42a9bbcd9065f334fd7c8a4ddfa7d905e" - integrity sha512-RjQrAniDU0CEk5r7iphkm731zKlFiUjvcBS2yHAg8WWqFMCaCrD0rKEVOMUyMMcbGPZ0bPp56srkGWrgfZqLRA== +"@typescript-eslint/visitor-keys@5.59.1": + version "5.59.1" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz#0d96c36efb6560d7fb8eb85de10442c10d8f6058" + integrity sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA== dependencies: - "@typescript-eslint/types" "5.57.1" + "@typescript-eslint/types" "5.59.1" eslint-visitor-keys "^3.3.0" "@umijs/ast@3.5.39": @@ -7248,6 +7228,17 @@ atomically@^1.7.0: resolved "https://registry.yarnpkg.com/atomically/-/atomically-1.7.0.tgz#c07a0458432ea6dbc9a3506fffa424b48bccaafe" integrity sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w== +auto-changelog@^2.4.0: + version "2.4.0" + resolved "https://registry.npmjs.org/auto-changelog/-/auto-changelog-2.4.0.tgz#a2d57d49b70ada7ca2e7c6a20a71572561d19cd9" + integrity sha512-vh17hko1c0ItsEcw6m7qPRf3m45u+XK5QyCrrBFViElZ8jnKrPC1roSznrd1fIB/0vR/zawdECCRJtTuqIXaJw== + dependencies: + commander "^7.2.0" + handlebars "^4.7.7" + node-fetch "^2.6.1" + parse-github-url "^1.0.2" + semver "^7.3.5" + autoprefixer@9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.0.tgz#0111c6bde2ad20c6f17995a33fad7cf6854b4c87" @@ -8799,9 +8790,9 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@7: +commander@7, commander@^7.2.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== commander@9.2.0: @@ -11122,9 +11113,9 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^8.5.0: +eslint-config-prettier@^8.8.0: version "8.8.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348" + resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348" integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA== eslint-import-resolver-node@^0.3.7: @@ -11151,9 +11142,9 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@^2.26.0: +eslint-plugin-import@^2.27.5: version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== dependencies: array-includes "^3.1.6" @@ -11198,9 +11189,9 @@ eslint-plugin-prettier@^4.2.1: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-promise@^6.0.0: +eslint-plugin-promise@^6.1.1: version "6.1.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816" + resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816" integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== eslint-plugin-react-hooks@^4.6.0: @@ -11208,9 +11199,9 @@ eslint-plugin-react-hooks@^4.6.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== -eslint-plugin-react@^7.30.1: +eslint-plugin-react@^7.32.2: version "7.32.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10" + resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10" integrity sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg== dependencies: array-includes "^3.1.6" @@ -11237,10 +11228,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-scope@^7.2.0: + version "7.2.0" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" + integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -11252,37 +11243,25 @@ eslint-utils@^2.0.0: dependencies: eslint-visitor-keys "^1.1.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== -eslint@^8.20.0: - version "8.38.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.38.0.tgz#a62c6f36e548a5574dd35728ac3c6209bd1e2f1a" - integrity sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg== +eslint@^8.39.0: + version "8.39.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz#7fd20a295ef92d43809e914b70c39fd5a23cf3f1" + integrity sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.4.0" "@eslint/eslintrc" "^2.0.2" - "@eslint/js" "8.38.0" + "@eslint/js" "8.39.0" "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -11292,7 +11271,7 @@ eslint@^8.20.0: debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" + eslint-scope "^7.2.0" eslint-visitor-keys "^3.4.0" espree "^9.5.1" esquery "^1.4.2" @@ -12255,11 +12234,6 @@ function.prototype.name@^1.1.2, function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - functions-have-names@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -12667,7 +12641,7 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@^11.0.2, globby@^11.0.3, globby@^11.1.0: +globby@^11.0.2, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -17441,6 +17415,11 @@ native-request@^1.0.5: resolved "https://registry.yarnpkg.com/native-request/-/native-request-1.1.0.tgz#acdb30fe2eefa3e1bc8c54b3a6852e9c5c0d3cb0" integrity sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -18556,6 +18535,11 @@ parse-git-config@^1.1.1: git-config-path "^1.0.1" ini "^1.3.4" +parse-github-url@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" + integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -21470,7 +21454,7 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" -regexpp@^3.0.0, regexpp@^3.1.0: +regexpp@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==