@nocobase/client-v2 2.1.0-beta.36 → 2.1.0-beta.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/es/BaseApplication.d.ts +1 -0
  2. package/es/components/form/DialogFormLayout.d.ts +5 -29
  3. package/es/components/form/filter/CollectionFilter.d.ts +41 -0
  4. package/es/components/form/filter/CollectionFilterItem.d.ts +41 -0
  5. package/es/components/form/filter/DateFilterDynamicComponent.d.ts +57 -0
  6. package/es/components/form/filter/FilterValueInput.d.ts +29 -0
  7. package/es/components/form/filter/index.d.ts +11 -0
  8. package/es/components/form/filter/useFilterActionProps.d.ts +96 -0
  9. package/es/components/form/index.d.ts +1 -0
  10. package/es/data-source/ExtendCollectionsProvider.d.ts +24 -0
  11. package/es/data-source/index.d.ts +9 -0
  12. package/es/flow/components/filter/index.d.ts +2 -0
  13. package/es/flow/components/filter/useFilterOptions.d.ts +54 -0
  14. package/es/flow-compat/passwordUtils.d.ts +1 -1
  15. package/es/index.d.ts +1 -0
  16. package/es/index.mjs +22 -17
  17. package/es/nocobase-buildin-plugin/index.d.ts +3 -10
  18. package/lib/index.js +25 -20
  19. package/package.json +7 -7
  20. package/src/BaseApplication.tsx +13 -0
  21. package/src/__tests__/app.test.tsx +9 -0
  22. package/src/components/README.md +89 -6
  23. package/src/components/README.zh-CN.md +89 -7
  24. package/src/components/form/DialogFormLayout.tsx +5 -29
  25. package/src/components/form/filter/CollectionFilter.tsx +101 -0
  26. package/src/components/form/filter/CollectionFilterItem.tsx +176 -0
  27. package/src/components/form/filter/DateFilterDynamicComponent.tsx +283 -0
  28. package/src/components/form/filter/FilterValueInput.tsx +198 -0
  29. package/src/components/form/filter/__tests__/CollectionFilterItem.test.tsx +205 -0
  30. package/src/components/form/filter/__tests__/DateFilterDynamicComponent.test.tsx +148 -0
  31. package/src/components/form/filter/__tests__/FilterValueInput.test.tsx +243 -0
  32. package/src/components/form/filter/__tests__/compileFilterGroup.test.ts +146 -0
  33. package/src/components/form/filter/index.ts +13 -0
  34. package/src/components/form/filter/useFilterActionProps.ts +200 -0
  35. package/src/components/form/index.tsx +1 -0
  36. package/src/data-source/ExtendCollectionsProvider.tsx +70 -0
  37. package/src/data-source/index.ts +10 -0
  38. package/src/flow/components/filter/index.ts +3 -0
  39. package/src/flow/components/filter/useFilterOptions.ts +80 -0
  40. package/src/index.ts +1 -0
  41. package/src/nocobase-buildin-plugin/index.tsx +13 -19
  42. package/src/nocobase-buildin-plugin/plugins/LocalePlugin.ts +1 -0
@@ -22,22 +22,15 @@ export type CurrentRoleOption = {
22
22
  export declare const CurrentUserContext: React.Context<CurrentUserState>;
23
23
  export declare function useCurrentUserContext(): CurrentUserState;
24
24
  /**
25
- * 返回当前用户在 v2 应用上下文中可选的角色列表,等价于 v1 `useCurrentRoles`:
26
- * 从 FlowEngine 全局上下文 `engine.context.user.roles` 派生(CurrentUserProvider 在
27
- * `/auth:check` 成功后通过 `defineProperty('user', { value })` 写入),按需追加匿名角色,
28
- * 并去掉合并角色 `__union__`。v2 中角色 title 可能含有 `{{t('...')}}` 模板,因此用
29
- * flowEngine.context.t 解析。
25
+ * 返回当前用户在 v2 应用上下文中可选的角色列表,等价于 v1 `useCurrentRoles`:从 FlowEngine 全局上下文 `engine.context.user.roles` 派生(CurrentUserProvider 在 `/auth:check` 成功后通过 `defineProperty('user', { value })` 写入),按需追加匿名角色,并去掉合并角色 `__union__`。v2 中角色 title 可能含有 `{{t('...')}}` 模板,因此用 flowEngine.context.t 解析。
30
26
  *
31
- * 不读 React `CurrentUserContext`:FlowEngine 的 dialog/drawer/popover 内容通过 `ctx.viewer`
32
- * 渲染到独立的 ElementsHolder,部分场景会脱离原 Provider 树;FlowEngine 全局上下文是同一份
33
- * 数据但不受 React 树位置影响。
27
+ * 不读 React `CurrentUserContext`:FlowEngine 的 dialog/drawer/popover 内容通过 `ctx.viewer` 渲染到独立的 ElementsHolder,部分场景会脱离原 Provider 树;FlowEngine 全局上下文是同一份数据但不受 React 树位置影响。
34
28
  */
35
29
  export declare function useCurrentRoles(): CurrentRoleOption[];
36
30
  /**
37
31
  * client-v2 使用的内建插件集合。
38
32
  *
39
- * 只迁移当前 v2 运行时仍然需要的部分,显式跳过 schemaInitializerManager
40
- * 以及用户标注暂不迁移的旧插件注册逻辑。
33
+ * 只迁移当前 v2 运行时仍然需要的部分,显式跳过 schemaInitializerManager 以及用户标注暂不迁移的旧插件注册逻辑。
41
34
  */
42
35
  export declare class NocoBaseBuildInPlugin extends Plugin<any, Application> {
43
36
  afterAdd(): Promise<void>;