openxiangda 1.0.33 → 1.0.35

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 (52) hide show
  1. package/README.md +16 -0
  2. package/lib/cli.js +409 -0
  3. package/lib/workspace-init.js +1 -0
  4. package/openxiangda-skills/SKILL.md +7 -0
  5. package/openxiangda-skills/references/architecture-patterns.md +2 -2
  6. package/openxiangda-skills/references/best-practices.md +42 -12
  7. package/openxiangda-skills/references/connector-resources.md +3 -0
  8. package/openxiangda-skills/references/data-views.md +217 -0
  9. package/openxiangda-skills/references/forms/component-registry.md +4 -2
  10. package/openxiangda-skills/references/forms/form-schema.md +37 -0
  11. package/openxiangda-skills/references/pages/page-sdk.md +43 -0
  12. package/openxiangda-skills/references/pages/workspace-structure.md +1 -0
  13. package/openxiangda-skills/references/workspace-state.md +9 -0
  14. package/openxiangda-skills/skills/openxiangda-form/SKILL.md +8 -1
  15. package/openxiangda-skills/skills/openxiangda-page/SKILL.md +1 -0
  16. package/openxiangda-skills/skills/openxiangda-permission-settings/SKILL.md +1 -1
  17. package/package.json +1 -1
  18. package/packages/sdk/dist/components/index.cjs +944 -765
  19. package/packages/sdk/dist/components/index.cjs.map +1 -1
  20. package/packages/sdk/dist/components/index.d.mts +18 -2
  21. package/packages/sdk/dist/components/index.d.ts +18 -2
  22. package/packages/sdk/dist/components/index.mjs +938 -761
  23. package/packages/sdk/dist/components/index.mjs.map +1 -1
  24. package/packages/sdk/dist/runtime/index.cjs +47 -0
  25. package/packages/sdk/dist/runtime/index.cjs.map +1 -1
  26. package/packages/sdk/dist/runtime/index.d.mts +18 -1
  27. package/packages/sdk/dist/runtime/index.d.ts +18 -1
  28. package/packages/sdk/dist/runtime/index.mjs +47 -0
  29. package/packages/sdk/dist/runtime/index.mjs.map +1 -1
  30. package/packages/sdk/src/build-source/scripts/utils/form-api.mjs +1 -0
  31. package/templates/sy-lowcode-app-workspace/examples/best-practices/catalog.json +1 -1
  32. package/templates/sy-lowcode-app-workspace/examples/best-practices/decision-guide.md +12 -6
  33. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/permissions.test.ts +24 -7
  34. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/permissions.ts +13 -0
  35. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/types.ts +8 -6
  36. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/permissions.test.ts +5 -5
  37. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/permissions.ts +7 -5
  38. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/state-machine.test.ts +1 -1
  39. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/state-machine.ts +3 -3
  40. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/ticket-query.test.ts +2 -2
  41. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/ticket-query.ts +8 -8
  42. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/types.ts +12 -10
  43. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/app-role/schema.ts +58 -6
  44. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/customer-profile/schema.ts +9 -0
  45. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/service-ticket/schema.ts +72 -16
  46. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/components/TicketDetailDrawer.tsx +6 -3
  47. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/components/TicketTableActions.tsx +6 -4
  48. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/permissions/form-groups/service-ticket-college.json +2 -2
  49. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/permissions/roles.json +2 -2
  50. package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/services/service-ticket.ts +4 -4
  51. package/templates/sy-lowcode-app-workspace/examples/forms/customer/schema.ts +1 -0
  52. package/templates/sy-lowcode-app-workspace/src/shared/form-schema.ts +1 -0
@@ -315,6 +315,20 @@ interface FormAdvancedSearchParams {
315
315
  order?: SearchSortItem | SearchSortItem[];
316
316
  instanceStatus?: InstanceStatus;
317
317
  }
318
+ interface DataViewQueryParams {
319
+ appType?: string;
320
+ fields?: string[];
321
+ filters?: SearchExpression | string;
322
+ conditionType?: SearchLogic;
323
+ searchKeyWord?: string;
324
+ currentPage?: number;
325
+ pageSize?: number;
326
+ order?: SearchSortItem | SearchSortItem[];
327
+ }
328
+ interface DataViewQueryResult<TItem = unknown> extends PageListResult<TItem> {
329
+ pageSize: number;
330
+ lastRefreshedAt?: string | null;
331
+ }
318
332
  interface FormExportParams extends FormAdvancedSearchParams {
319
333
  exportAll?: "y" | "n";
320
334
  embedImages?: "y" | "n";
@@ -847,6 +861,9 @@ interface PageSdk {
847
861
  dataSource: {
848
862
  run<TResult = unknown, TRaw = TResult>(name: string, params?: Record<string, unknown>): Promise<PageApiResponse<TResult, TRaw>>;
849
863
  };
864
+ dataView: {
865
+ query<T = unknown>(code: string, params?: DataViewQueryParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
866
+ };
850
867
  notification: {
851
868
  sendByType<T = SendNotificationResult>(params: SendNotificationByTypeParams): Promise<PageApiResponse<T>>;
852
869
  batchSendByType<T = SendNotificationResult>(params: BatchSendNotificationByTypeParams): Promise<PageApiResponse<T>>;
@@ -931,4 +948,4 @@ declare const usePageRoute: () => PageRouteInfo;
931
948
 
932
949
  declare const usePageSdk: () => PageSdk;
933
950
 
934
- export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
951
+ export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
@@ -315,6 +315,20 @@ interface FormAdvancedSearchParams {
315
315
  order?: SearchSortItem | SearchSortItem[];
316
316
  instanceStatus?: InstanceStatus;
317
317
  }
318
+ interface DataViewQueryParams {
319
+ appType?: string;
320
+ fields?: string[];
321
+ filters?: SearchExpression | string;
322
+ conditionType?: SearchLogic;
323
+ searchKeyWord?: string;
324
+ currentPage?: number;
325
+ pageSize?: number;
326
+ order?: SearchSortItem | SearchSortItem[];
327
+ }
328
+ interface DataViewQueryResult<TItem = unknown> extends PageListResult<TItem> {
329
+ pageSize: number;
330
+ lastRefreshedAt?: string | null;
331
+ }
318
332
  interface FormExportParams extends FormAdvancedSearchParams {
319
333
  exportAll?: "y" | "n";
320
334
  embedImages?: "y" | "n";
@@ -847,6 +861,9 @@ interface PageSdk {
847
861
  dataSource: {
848
862
  run<TResult = unknown, TRaw = TResult>(name: string, params?: Record<string, unknown>): Promise<PageApiResponse<TResult, TRaw>>;
849
863
  };
864
+ dataView: {
865
+ query<T = unknown>(code: string, params?: DataViewQueryParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
866
+ };
850
867
  notification: {
851
868
  sendByType<T = SendNotificationResult>(params: SendNotificationByTypeParams): Promise<PageApiResponse<T>>;
852
869
  batchSendByType<T = SendNotificationResult>(params: BatchSendNotificationByTypeParams): Promise<PageApiResponse<T>>;
@@ -931,4 +948,4 @@ declare const usePageRoute: () => PageRouteInfo;
931
948
 
932
949
  declare const usePageSdk: () => PageSdk;
933
950
 
934
- export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
951
+ export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
@@ -1030,6 +1030,31 @@ var createPageSdk = (context) => {
1030
1030
  }
1031
1031
  })
1032
1032
  };
1033
+ const dataView = {
1034
+ query: (code, params = {}) => {
1035
+ const dataViewCode = String(code || "").trim();
1036
+ if (!dataViewCode) {
1037
+ throw new Error("\u6570\u636E\u89C6\u56FE code \u4E0D\u80FD\u4E3A\u7A7A");
1038
+ }
1039
+ return request({
1040
+ path: buildAppPath(
1041
+ context,
1042
+ params.appType,
1043
+ `/v1/data-views/${encodePathSegment(dataViewCode)}/query.json`
1044
+ ),
1045
+ method: "post",
1046
+ body: {
1047
+ fields: params.fields,
1048
+ filters: serializeSearchExpression(params.filters),
1049
+ conditionType: params.conditionType,
1050
+ searchKeyWord: params.searchKeyWord,
1051
+ currentPage: params.currentPage,
1052
+ pageSize: params.pageSize,
1053
+ order: Array.isArray(params.order) ? params.order : params.order ? [params.order] : void 0
1054
+ }
1055
+ });
1056
+ }
1057
+ };
1033
1058
  const notification = {
1034
1059
  sendByType: (params) => request({
1035
1060
  path: buildOpenXiangdaAppPath(
@@ -1093,6 +1118,7 @@ var createPageSdk = (context) => {
1093
1118
  permission,
1094
1119
  process,
1095
1120
  notification,
1121
+ dataView,
1096
1122
  dataSource: {
1097
1123
  run: async (name, params = {}) => {
1098
1124
  const descriptor = (context.page.dataSources || []).find(
@@ -1106,6 +1132,27 @@ var createPageSdk = (context) => {
1106
1132
  runtimeParams.formUuid || descriptor.formUuid || ""
1107
1133
  ).trim();
1108
1134
  switch (descriptor.type) {
1135
+ case "dataView.query": {
1136
+ const dataViewCode = String(
1137
+ runtimeParams.code || runtimeParams.dataViewCode || descriptor.code || descriptor.dataViewCode || descriptor.viewCode || descriptor.key || ""
1138
+ ).trim();
1139
+ const queryParams = {
1140
+ ...descriptor.params && typeof descriptor.params === "object" ? descriptor.params : {},
1141
+ ...runtimeParams,
1142
+ fields: runtimeParams.fields || descriptor.fields,
1143
+ filters: mergeSearchExpressions(
1144
+ descriptor.defaultFilter,
1145
+ runtimeParams.filters
1146
+ )
1147
+ };
1148
+ delete queryParams.code;
1149
+ delete queryParams.dataViewCode;
1150
+ delete queryParams.viewCode;
1151
+ return dataView.query(
1152
+ dataViewCode,
1153
+ queryParams
1154
+ );
1155
+ }
1109
1156
  case "form.list":
1110
1157
  return form.advancedSearch({
1111
1158
  ...runtimeParams,