@headless-adminapp/app 1.4.53 → 1.5.0

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 (170) hide show
  1. package/app/AppProvider.d.ts +1 -1
  2. package/app/AuthWrapper.d.ts +2 -2
  3. package/app/LayoutProvider.d.ts +7 -7
  4. package/app/context.d.ts +2 -2
  5. package/app/hooks/useAppContext.d.ts +1 -1
  6. package/auth/AuthProvider.d.ts +2 -2
  7. package/auth/context.d.ts +1 -1
  8. package/auth/hooks/useAuthSession.d.ts +1 -1
  9. package/auth/index.d.ts +1 -1
  10. package/auth/index.js +0 -1
  11. package/auth/types.d.ts +1 -1
  12. package/board/BoardColumnProvider.d.ts +2 -2
  13. package/board/context.d.ts +1 -1
  14. package/board/hooks/useBoardColumnConfig.d.ts +1 -1
  15. package/board/hooks/useBoardColumnData.d.ts +2 -2
  16. package/board/hooks/useBoardConfig.d.ts +2 -2
  17. package/board/hooks/useBoardSchema.d.ts +1 -1
  18. package/board/types.d.ts +7 -7
  19. package/board/utils.d.ts +2 -2
  20. package/builders/CommandBuilder/DefaultCommandBuilder.d.ts +4 -4
  21. package/builders/CommandBuilder/FormCommandBuilder.d.ts +3 -3
  22. package/builders/CommandBuilder/SubgridCommandBuilder.d.ts +3 -3
  23. package/builders/CommandBuilder/ViewCommandBuilder.d.ts +3 -3
  24. package/builders/CommandBuilder/ViewCommandBuilder.js +7 -3
  25. package/builders/CommandBuilder/utils.d.ts +1 -1
  26. package/builders/SchemaExperienceBuilder.d.ts +4 -4
  27. package/builders/utils.d.ts +6 -6
  28. package/builders/utils.js +5 -1
  29. package/calendar/CalendarProvider.d.ts +3 -3
  30. package/calendar/context.d.ts +1 -1
  31. package/calendar/hooks/useConfig.d.ts +2 -2
  32. package/calendar/hooks/useOpenDetailDialog.d.ts +1 -1
  33. package/calendar/types.d.ts +5 -5
  34. package/calendar/utils.d.ts +2 -2
  35. package/command/hooks/useBaseCommandHandlerContext.d.ts +2 -2
  36. package/command/hooks/useBaseCommandHandlerContext.js +10 -2
  37. package/command/hooks/useCommands.d.ts +2 -2
  38. package/command/index.d.ts +1 -1
  39. package/command/index.js +0 -1
  40. package/command/types.d.ts +5 -5
  41. package/command/utils/index.d.ts +2 -2
  42. package/components/ScrollView/index.d.ts +1 -1
  43. package/components/ScrollbarWithMoreDataRequest/index.d.ts +1 -1
  44. package/dataform/DataFormProvider/CalculatedField.d.ts +1 -1
  45. package/dataform/DataFormProvider/CalculatedField.js +1 -0
  46. package/dataform/DataFormProvider/DataResolver.d.ts +2 -2
  47. package/dataform/DataFormProvider/DataResolver.js +1 -0
  48. package/dataform/DataFormProvider/UnsavedChangesInfoSetter.d.ts +1 -1
  49. package/dataform/DataFormProvider/getRecord.d.ts +5 -5
  50. package/dataform/DataFormProvider/getRecord.js +1 -0
  51. package/dataform/DataFormProvider/index.d.ts +5 -5
  52. package/dataform/DataFormProvider/index.js +1 -0
  53. package/dataform/DataFormProvider/types.d.ts +4 -4
  54. package/dataform/DataFormProvider/utils.d.ts +6 -6
  55. package/dataform/FormManager.d.ts +7 -7
  56. package/dataform/context.d.ts +8 -8
  57. package/dataform/hooks/useFormNotifications.d.ts +5 -3
  58. package/dataform/hooks/useFormNotifications.js +5 -8
  59. package/dataform/hooks/useFormSave.d.ts +1 -1
  60. package/dataform/hooks/useFormSchema.d.ts +1 -1
  61. package/dataform/hooks/useLoadFormGridPage.d.ts +2 -2
  62. package/dataform/hooks/useMainFormCommands.d.ts +2 -2
  63. package/dataform/hooks/useMainFormCommands.js +2 -1
  64. package/dataform/hooks/useOnFieldValueChangeListener.js +3 -1
  65. package/dataform/hooks/useProcessFlowSteps.js +3 -1
  66. package/dataform/hooks/useSelectedForm.d.ts +2 -2
  67. package/dataform/utils/defaultParameters.d.ts +3 -3
  68. package/dataform/utils/defaultParameters.js +4 -1
  69. package/dataform/utils/index.d.ts +7 -7
  70. package/dataform/utils/index.js +31 -8
  71. package/dataform/utils/saveRecord.d.ts +6 -6
  72. package/dataform/utils/saveRecord.js +11 -2
  73. package/datagrid/DataGridProvider/DataResolver.d.ts +1 -1
  74. package/datagrid/DataGridProvider/index.d.ts +6 -6
  75. package/datagrid/DataGridProvider/transformViewColumns.d.ts +4 -4
  76. package/datagrid/DataGridProvider/useGridCellRangeResolver.d.ts +4 -4
  77. package/datagrid/DataGridProvider/utils.d.ts +5 -5
  78. package/datagrid/DataGridProvider/utils.js +3 -0
  79. package/datagrid/column-filter/constants.d.ts +1 -1
  80. package/datagrid/column-filter/utils.d.ts +1 -1
  81. package/datagrid/context.d.ts +5 -5
  82. package/datagrid/hooks/useGridColumnFilter.d.ts +1 -1
  83. package/datagrid/hooks/useGridColumns.d.ts +2 -2
  84. package/datagrid/hooks/useGridCommands.d.ts +2 -2
  85. package/datagrid/hooks/useGridOptions.js +1 -0
  86. package/datagrid/hooks/useGridPagination.js +1 -0
  87. package/datagrid/hooks/useGridSchema.d.ts +1 -1
  88. package/datagrid/hooks/useGridSorting.d.ts +2 -2
  89. package/datagrid/hooks/useGridSorting.js +1 -0
  90. package/datagrid/hooks/useLoadMainGridPage.d.ts +3 -3
  91. package/datagrid/hooks/useMainGridCommands.d.ts +2 -2
  92. package/datagrid/hooks/useMainGridCommands.js +2 -0
  93. package/datagrid/hooks/useSelectedView.d.ts +2 -2
  94. package/datagrid/hooks/useSubGridCommands.d.ts +2 -2
  95. package/dialog/DialogProvider.d.ts +1 -1
  96. package/dialog/context.d.ts +1 -1
  97. package/dialog/hooks/useOpenAlertDialog.d.ts +1 -1
  98. package/dialog/hooks/useOpenConfirmDialog.d.ts +1 -1
  99. package/dialog/hooks/useOpenDialog.d.ts +1 -1
  100. package/dialog/hooks/useOpenErrorDialog.d.ts +1 -1
  101. package/dialog/hooks/useOpenPromptDialog.d.ts +2 -2
  102. package/header/HeaderProvider.d.ts +1 -1
  103. package/header/components/MobileHeaderLeftContent.d.ts +1 -1
  104. package/header/components/MobileHeaderRightContent.d.ts +1 -1
  105. package/header/components/MobileHeaderTitle.d.ts +1 -1
  106. package/header/hooks/useHeaderValue.d.ts +1 -1
  107. package/header/hooks/useMobileHeaderSetValue.d.ts +1 -1
  108. package/historystate/provider.d.ts +1 -1
  109. package/hooks/useDebouncedValue.js +5 -2
  110. package/hooks/useElementLayout.d.ts +2 -2
  111. package/hooks/useItemsWithKey.d.ts +1 -1
  112. package/hooks/useLongPress.js +4 -2
  113. package/hooks/useStorageState.d.ts +1 -1
  114. package/insights/context.d.ts +1 -1
  115. package/insights/hooks/index.d.ts +2 -2
  116. package/insights/hooks/index.js +1 -0
  117. package/locale/LocaleProvider.d.ts +2 -2
  118. package/locale/context.d.ts +1 -1
  119. package/locale/utils.d.ts +1 -1
  120. package/metadata/MetadataProvider.d.ts +5 -5
  121. package/metadata/context.d.ts +2 -2
  122. package/metadata/hooks/useExperienceView.d.ts +1 -1
  123. package/metadata/hooks/useExperienceView.js +3 -1
  124. package/metadata/hooks/useMetadata.d.ts +1 -1
  125. package/metadata/hooks/useRecentItemStore.d.ts +1 -1
  126. package/metadata/hooks/useSchema.d.ts +1 -1
  127. package/mutable/context.d.ts +1 -1
  128. package/mutable/context.js +1 -0
  129. package/mutable/index.d.ts +1 -1
  130. package/mutable/index.js +0 -15
  131. package/mutable/state.d.ts +1 -1
  132. package/mutable/utils.d.ts +1 -1
  133. package/mutable/utils.js +1 -1
  134. package/navigation/hooks/useOpenForm.d.ts +1 -1
  135. package/navigation/unsaved-changes/useUnsavedChangesRouteGuard.js +1 -0
  136. package/package.json +3 -3
  137. package/progress-indicator/ProgressIndicatorProvider.d.ts +1 -1
  138. package/progress-indicator/ProgressIndicatorProvider.js +1 -1
  139. package/progress-indicator/context.js +3 -1
  140. package/providers/PageEntityFormProvider/index.d.ts +5 -5
  141. package/providers/PageEntityViewProvider/index.d.ts +4 -4
  142. package/quickcreate/QuickCreateProvider.d.ts +1 -1
  143. package/quickcreate/context.d.ts +2 -2
  144. package/quickcreate/hooks/useFormSave.d.ts +1 -1
  145. package/quickcreate/hooks/useOpenQuickCreate.d.ts +2 -2
  146. package/recordset/RecordSetProvider.d.ts +1 -1
  147. package/recordset/RecordSetProvider.js +1 -1
  148. package/recordset/context.d.ts +1 -1
  149. package/recordset/hooks/useRecordSetResult.d.ts +1 -1
  150. package/route/RouteProvider.d.ts +4 -4
  151. package/route/context.d.ts +3 -3
  152. package/route/context.js +8 -2
  153. package/store/ComponentStore.d.ts +1 -1
  154. package/store/EventManager.d.ts +1 -1
  155. package/store/EventManager.js +1 -0
  156. package/store/RecentItemStore.d.ts +1 -1
  157. package/store/SchemaExperienceStore.d.ts +6 -6
  158. package/store/SchemaExperienceStore.js +2 -2
  159. package/toast-notification/ToastNotificationProvider.d.ts +1 -1
  160. package/toast-notification/hooks/useOpenToastNotification.d.ts +1 -1
  161. package/transport/InMemoryDataService/index.d.ts +3 -3
  162. package/transport/InMemoryDataService/index.js +5 -0
  163. package/transport/RestDataService/index.d.ts +2 -2
  164. package/transport/context.d.ts +1 -1
  165. package/transport/hooks/useCustomActionQuery.d.ts +2 -1
  166. package/transport/hooks/useDataService.d.ts +1 -1
  167. package/transport/hooks/useRetriveRecords.d.ts +6 -16
  168. package/transport/hooks/useRetriveRecords.js +2 -1
  169. package/utils/getAttributeFormattedValue.d.ts +3 -3
  170. package/utils/getAttributeFormattedValue.js +20 -3
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import { type FC, type PropsWithChildren } from 'react';
2
2
  interface AppProviderProps {
3
3
  }
4
4
  export declare const AppProvider: FC<PropsWithChildren<AppProviderProps>>;
@@ -1,5 +1,5 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- import { AuthProviderPlaceholderProps } from '../auth';
1
+ import type { FC, PropsWithChildren } from 'react';
2
+ import { type AuthProviderPlaceholderProps } from '../auth';
3
3
  interface AuthWrapperProps {
4
4
  Placeholder?: FC<AuthProviderPlaceholderProps>;
5
5
  }
@@ -1,10 +1,10 @@
1
- import { IDataService, IFileService } from '@headless-adminapp/core/transport';
2
- import { QueryClient } from '@tanstack/react-query';
3
- import { FC, PropsWithChildren } from 'react';
4
- import { AuthProviderPlaceholderProps, AuthProviderProps } from '../auth';
5
- import { LocaleProviderProps } from '../locale';
6
- import { MetadataProviderProps } from '../metadata/MetadataProvider';
7
- import { RouteProviderProps } from '../route/RouteProvider';
1
+ import type { IDataService, IFileService } from '@headless-adminapp/core/transport';
2
+ import { type QueryClient } from '@tanstack/react-query';
3
+ import type { FC, PropsWithChildren } from 'react';
4
+ import { type AuthProviderPlaceholderProps, type AuthProviderProps } from '../auth';
5
+ import { type LocaleProviderProps } from '../locale';
6
+ import type { MetadataProviderProps } from '../metadata/MetadataProvider';
7
+ import type { RouteProviderProps } from '../route/RouteProvider';
8
8
  export interface LayoutProviderProps {
9
9
  routeProps: RouteProviderProps;
10
10
  queryClient?: QueryClient;
package/app/context.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { AppExperience } from '@headless-adminapp/core/experience/app';
2
- import { SchemaExperienceMetadata } from '@headless-adminapp/core/experience/schema';
1
+ import type { AppExperience } from '@headless-adminapp/core/experience/app';
2
+ import type { SchemaExperienceMetadata } from '@headless-adminapp/core/experience/schema';
3
3
  export interface AppContextState {
4
4
  appExperience: AppExperience;
5
5
  schemaMetadataList: SchemaExperienceMetadata[];
@@ -1,2 +1,2 @@
1
- import { AppContextState } from '../context';
1
+ import { type AppContextState } from '../context';
2
2
  export declare function useAppContext(): AppContextState;
@@ -1,5 +1,5 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- import { SessionResolver, UnauthorizeReason } from './types';
1
+ import { type FC, type PropsWithChildren } from 'react';
2
+ import type { SessionResolver, UnauthorizeReason } from './types';
3
3
  export interface AuthProviderProps {
4
4
  onUnauthenticated?: (reason: UnauthorizeReason) => void;
5
5
  sessionResolver?: SessionResolver;
package/auth/context.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AuthSession } from '@headless-adminapp/core/experience/auth';
1
+ import type { AuthSession } from '@headless-adminapp/core/experience/auth';
2
2
  type UnauthorizeReason = 'sessionExpired' | 'unauthorized' | 'logout' | 'load';
3
3
  interface AuthStoreLoadingState {
4
4
  initialized: false;
@@ -1,2 +1,2 @@
1
- import { AuthSession } from '@headless-adminapp/core/experience/auth';
1
+ import type { AuthSession } from '@headless-adminapp/core/experience/auth';
2
2
  export declare function useAuthSession<T extends AuthSession = AuthSession>(): T | null;
package/auth/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { AuthContext, type AuthState } from './context';
2
2
  export { AuthProvider, type AuthProviderProps } from './AuthProvider';
3
- export * from './types';
3
+ export type * from './types';
4
4
  export * from './hooks';
package/auth/index.js CHANGED
@@ -19,5 +19,4 @@ var context_1 = require("./context");
19
19
  Object.defineProperty(exports, "AuthContext", { enumerable: true, get: function () { return context_1.AuthContext; } });
20
20
  var AuthProvider_1 = require("./AuthProvider");
21
21
  Object.defineProperty(exports, "AuthProvider", { enumerable: true, get: function () { return AuthProvider_1.AuthProvider; } });
22
- __exportStar(require("./types"), exports);
23
22
  __exportStar(require("./hooks"), exports);
package/auth/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AuthSession } from '@headless-adminapp/core/experience/auth';
1
+ import type { AuthSession } from '@headless-adminapp/core/experience/auth';
2
2
  export type UnauthorizeReason = 'sessionExpired' | 'unauthorized' | 'logout' | 'load';
3
3
  export interface AuthProviderPlaceholderProps {
4
4
  loading?: boolean;
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
- import { BoardColumnConfig } from './types';
1
+ import type { PropsWithChildren } from 'react';
2
+ import type { BoardColumnConfig } from './types';
3
3
  export declare function invertValueMapping(value: Record<string, string[]>): Record<string, string[]>;
4
4
  export interface BoardColumnProviderProps {
5
5
  config: BoardColumnConfig;
@@ -1,6 +1,6 @@
1
1
  import type { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
2
2
  import type { RetriveRecordsResult } from '@headless-adminapp/core/transport';
3
- import { BoardColumnConfig, BoardConfig } from './types';
3
+ import type { BoardColumnConfig, BoardConfig } from './types';
4
4
  export interface BoardContextState<S extends SchemaAttributes = SchemaAttributes> {
5
5
  config: BoardConfig<S>;
6
6
  searchText: string;
@@ -1,2 +1,2 @@
1
- import { BoardColumnConfig } from '../types';
1
+ import type { BoardColumnConfig } from '../types';
2
2
  export declare function useBoardColumnConfig(): BoardColumnConfig;
@@ -1,3 +1,3 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { BoardColumnContextState } from '../context';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
+ import { type BoardColumnContextState } from '../context';
3
3
  export declare function useBoardColumnData<S extends SchemaAttributes = SchemaAttributes>(): BoardColumnContextState<S>['data'];
@@ -1,3 +1,3 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { BoardConfig } from '../types';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
+ import type { BoardConfig } from '../types';
3
3
  export declare function useBoardConfig<S extends SchemaAttributes = SchemaAttributes>(): BoardConfig<S>;
@@ -1,2 +1,2 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
2
  export declare function useBoardSchema<S extends SchemaAttributes = SchemaAttributes>(): import("@headless-adminapp/core/schema").Schema<S>;
package/board/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { CommandContextBase } from '@headless-adminapp/core/experience/command';
2
- import { SortingState, View } from '@headless-adminapp/core/experience/view';
3
- import { QuickFilter } from '@headless-adminapp/core/experience/view/QuickFilter';
4
- import { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
5
- import { Filter } from '@headless-adminapp/core/transport';
6
- import { FC } from 'react';
7
- import { UtilityContextState } from '../command';
1
+ import type { CommandContextBase } from '@headless-adminapp/core/experience/command';
2
+ import type { SortingState, View } from '@headless-adminapp/core/experience/view';
3
+ import type { QuickFilter } from '@headless-adminapp/core/experience/view/QuickFilter';
4
+ import type { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
5
+ import type { Filter } from '@headless-adminapp/core/transport';
6
+ import type { FC } from 'react';
7
+ import type { UtilityContextState } from '../command';
8
8
  export interface ItemUpdateContext extends CommandContextBase {
9
9
  primaryControl: {
10
10
  logicalName: string;
package/board/utils.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { BoardConfig } from './types';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
+ import type { BoardConfig } from './types';
3
3
  export declare function defineBoardConfig<S extends SchemaAttributes = SchemaAttributes>(config: BoardConfig<S>): BoardConfig<S>;
@@ -1,7 +1,7 @@
1
- import { EntityMainFormCommandItemExperience } from '@headless-adminapp/core/experience/form';
2
- import { EntityMainGridCommandItemExperience, SubGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
3
- import { Localized } from '@headless-adminapp/core/types';
4
- import { Icon } from '@headless-adminapp/icons';
1
+ import type { EntityMainFormCommandItemExperience } from '@headless-adminapp/core/experience/form';
2
+ import type { EntityMainGridCommandItemExperience, SubGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
3
+ import type { Localized } from '@headless-adminapp/core/types';
4
+ import type { Icon } from '@headless-adminapp/icons';
5
5
  import { FormCommandBuilder } from './FormCommandBuilder';
6
6
  import { ViewCommandBuilder } from './ViewCommandBuilder';
7
7
  export declare namespace DefaultCommandBuilder {
@@ -1,6 +1,6 @@
1
- import { EntityMainFormCommandItemExperience } from '@headless-adminapp/core/experience/form';
2
- import { Localized } from '@headless-adminapp/core/types';
3
- import { Icon } from '@headless-adminapp/icons';
1
+ import type { EntityMainFormCommandItemExperience } from '@headless-adminapp/core/experience/form';
2
+ import type { Localized } from '@headless-adminapp/core/types';
3
+ import type { Icon } from '@headless-adminapp/icons';
4
4
  export declare namespace FormCommandBuilder {
5
5
  function createSaveCommand({ Icon, text, localizedTexts, }: {
6
6
  Icon: Icon;
@@ -1,6 +1,6 @@
1
- import { SubGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
2
- import { Localized } from '@headless-adminapp/core/types';
3
- import { Icon } from '@headless-adminapp/icons';
1
+ import type { SubGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
2
+ import type { Localized } from '@headless-adminapp/core/types';
3
+ import type { Icon } from '@headless-adminapp/icons';
4
4
  import { ViewCommandBuilder } from './ViewCommandBuilder';
5
5
  export declare namespace SubgridCommandBuilder {
6
6
  function createNewRecordCommand({ Icon, text, localizedTexts, }: {
@@ -1,6 +1,6 @@
1
- import { EntityMainGridCommandContext, EntityMainGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
2
- import { Localized } from '@headless-adminapp/core/types';
3
- import { Icon } from '@headless-adminapp/icons';
1
+ import type { EntityMainGridCommandContext, EntityMainGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
2
+ import type { Localized } from '@headless-adminapp/core/types';
3
+ import type { Icon } from '@headless-adminapp/icons';
4
4
  export declare namespace EnabledRules {
5
5
  function HasCreatePermisssion(context: EntityMainGridCommandContext): boolean;
6
6
  function HasUpdatePermission(context: EntityMainGridCommandContext): boolean;
@@ -120,7 +120,7 @@ var ViewCommandBuilder;
120
120
  return;
121
121
  }
122
122
  context.navigation.openForm({
123
- logicalName: data.type,
123
+ logicalName: data.type.value,
124
124
  });
125
125
  },
126
126
  hidden: (context) => {
@@ -151,7 +151,9 @@ var ViewCommandBuilder;
151
151
  ?.baseSchemaLogicalNameAttribute) {
152
152
  return;
153
153
  }
154
- const logicalName = context.primaryControl.selectedRecords[0][context.primaryControl.schema.virtual
154
+ const logicalName =
155
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
156
+ context.primaryControl.selectedRecords[0][context.primaryControl.schema.virtual
155
157
  ?.baseSchemaLogicalNameAttribute];
156
158
  if (!logicalName) {
157
159
  return;
@@ -169,7 +171,9 @@ var ViewCommandBuilder;
169
171
  ?.baseSchemaLogicalNameAttribute) {
170
172
  return true;
171
173
  }
172
- const logicalName = context.primaryControl.selectedRecords[0][context.primaryControl.schema.virtual
174
+ const logicalName =
175
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
176
+ context.primaryControl.selectedRecords[0][context.primaryControl.schema.virtual
173
177
  ?.baseSchemaLogicalNameAttribute];
174
178
  if (!logicalName) {
175
179
  return true;
@@ -1,3 +1,3 @@
1
- import { Localized } from '@headless-adminapp/core/types';
1
+ import type { Localized } from '@headless-adminapp/core/types';
2
2
  export declare function createLocalizedSelector<T>(stringSet: T, localizedStringSet: Localized<T> | undefined, language: string): <U>(selector: (stringSet: T) => U) => U;
3
3
  export declare function plurialize(count: number, singular: string | [string, string], plural?: string): string;
@@ -1,7 +1,7 @@
1
- import { AsyncForm, AsyncQuickCreateForm, Form, FormExperience, QuickCreateForm } from '@headless-adminapp/core/experience/form';
2
- import { SchemaExperience } from '@headless-adminapp/core/experience/schema';
3
- import { AsyncView, View, ViewExperience } from '@headless-adminapp/core/experience/view';
4
- import { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
1
+ import type { AsyncForm, AsyncQuickCreateForm, Form, FormExperience, QuickCreateForm } from '@headless-adminapp/core/experience/form';
2
+ import type { SchemaExperience } from '@headless-adminapp/core/experience/schema';
3
+ import type { AsyncView, View, ViewExperience } from '@headless-adminapp/core/experience/view';
4
+ import type { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
5
5
  import { DefineFormExperience } from './DefineFormExperience';
6
6
  import { DefineViewExperience } from './DefineViewExperience';
7
7
  declare abstract class BaseSchemaExperienceBuilder<S extends SchemaAttributes> {
@@ -1,9 +1,9 @@
1
- import { Locale } from '@headless-adminapp/core/experience/locale';
2
- import { ColumnCondition, SortingState, View } from '@headless-adminapp/core/experience/view';
3
- import { InferredSchemaType, Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
4
- import { ISchemaStore } from '@headless-adminapp/core/store';
5
- import { Filter, IDataService } from '@headless-adminapp/core/transport';
6
- import { TransformedViewColumn } from '../datagrid';
1
+ import type { Locale } from '@headless-adminapp/core/experience/locale';
2
+ import type { ColumnCondition, SortingState, View } from '@headless-adminapp/core/experience/view';
3
+ import type { InferredSchemaType, Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
4
+ import type { ISchemaStore } from '@headless-adminapp/core/store';
5
+ import type { Filter, IDataService } from '@headless-adminapp/core/transport';
6
+ import type { TransformedViewColumn } from '../datagrid';
7
7
  export type ExportColumn<S extends SchemaAttributes = SchemaAttributes> = Omit<TransformedViewColumn<S>, 'id' | 'component' | 'width' | 'maxWidth'>;
8
8
  export type ExportFn<S extends SchemaAttributes = SchemaAttributes> = (option: {
9
9
  attributes: S;
package/builders/utils.js CHANGED
@@ -76,6 +76,7 @@ function extractAttributeData({ column, record, attributes, schemaStore, }) {
76
76
  const exportRecordsCSV = async ({ attributes, records, gridColumns, schemaStore, fileName, locale, }) => {
77
77
  const csvDownload = await Promise.resolve().then(() => __importStar(require('json-to-csv-export')));
78
78
  const headers = getHeaders(attributes, gridColumns, schemaStore);
79
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
79
80
  const cellData = records.map((record) => {
80
81
  return gridColumns.map((column) => {
81
82
  const { attribute, value } = extractAttributeData({
@@ -101,6 +102,7 @@ exports.exportRecordsCSV = exportRecordsCSV;
101
102
  const exportRecordsXLS = async ({ fileName, gridColumns, records, attributes, schemaStore, locale, }) => {
102
103
  const ExcelJS = await Promise.resolve().then(() => __importStar(require('exceljs')));
103
104
  const headers = getHeaders(attributes, gridColumns, schemaStore);
105
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
106
  const cellData = records.map((item) => {
105
107
  return gridColumns.map((column) => {
106
108
  const { attribute, value } = extractAttributeData({
@@ -138,7 +140,8 @@ const exportRecordsXLS = async ({ fileName, gridColumns, records, attributes, sc
138
140
  schemaStore,
139
141
  });
140
142
  const sheetColumn = worksheet.getColumn(index + 1);
141
- let formatFn = (value) => (0, utils_2.getAttributeFormattedValue)(attribute, value, locale) ?? '';
143
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
144
+ const formatFn = (value) => (0, utils_2.getAttributeFormattedValue)(attribute, value, locale) ?? '';
142
145
  if (attribute?.type === 'money') {
143
146
  sheetColumn.numFmt = `"₹" #,##0.00`;
144
147
  }
@@ -174,6 +177,7 @@ async function retriveRecords({ gridColumns, dataService, schema, search, view,
174
177
  columnFilters, schemaStore),
175
178
  skip,
176
179
  limit,
180
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
177
181
  sort: sorting,
178
182
  });
179
183
  return result;
@@ -1,6 +1,6 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { PropsWithChildren } from 'react';
3
- import { CalendarConfig } from './types';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
+ import { type PropsWithChildren } from 'react';
3
+ import type { CalendarConfig } from './types';
4
4
  interface CalendarProviderProps<SA1 extends SchemaAttributes = SchemaAttributes, SA2 extends SchemaAttributes = SchemaAttributes, SA3 extends SchemaAttributes = SchemaAttributes> {
5
5
  config: CalendarConfig<SA1, SA2, SA3>;
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { CalendarConfig } from './types';
2
+ import type { CalendarConfig } from './types';
3
3
  export interface CalendarContextState<SA1 extends SchemaAttributes = SchemaAttributes, SA2 extends SchemaAttributes = SchemaAttributes, SA3 extends SchemaAttributes = SchemaAttributes> {
4
4
  config: CalendarConfig<SA1, SA2, SA3>;
5
5
  }
@@ -1,3 +1,3 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { CalendarConfig } from '../types';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
+ import type { CalendarConfig } from '../types';
3
3
  export declare function useConfig<SA1 extends SchemaAttributes = SchemaAttributes, SA2 extends SchemaAttributes = SchemaAttributes, SA3 extends SchemaAttributes = SchemaAttributes>(): CalendarConfig<SA1, SA2, SA3>;
@@ -1,2 +1,2 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
2
  export declare function useOpenDetailDialog<SA1 extends SchemaAttributes = SchemaAttributes, SA2 extends SchemaAttributes = SchemaAttributes>(DialogComponent: React.ComponentType<any>): (values: unknown) => void;
@@ -1,9 +1,9 @@
1
1
  import type { EventContentArg } from '@fullcalendar/core';
2
- import { AuthSession } from '@headless-adminapp/core/experience/auth';
3
- import { OpenFormOptions } from '@headless-adminapp/core/experience/command';
4
- import { RouterInstance } from '@headless-adminapp/core/navigation';
5
- import { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
6
- import { InternalRouteResolver } from '../route/context';
2
+ import type { AuthSession } from '@headless-adminapp/core/experience/auth';
3
+ import type { OpenFormOptions } from '@headless-adminapp/core/experience/command';
4
+ import type { RouterInstance } from '@headless-adminapp/core/navigation';
5
+ import type { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
6
+ import type { InternalRouteResolver } from '../route/context';
7
7
  export interface CalendarEvent {
8
8
  id: string;
9
9
  title: string;
@@ -1,3 +1,3 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { CalendarConfig } from './types';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
+ import type { CalendarConfig } from './types';
3
3
  export declare function defineCalendarConfig<SA1 extends SchemaAttributes = SchemaAttributes, SA2 extends SchemaAttributes = SchemaAttributes, SA3 extends SchemaAttributes = SchemaAttributes>(config: CalendarConfig<SA1, SA2, SA3>): CalendarConfig<SA1, SA2, SA3>;
@@ -1,4 +1,4 @@
1
- import { CommandContextBase } from '@headless-adminapp/core/experience/command';
2
- import { UtilityContextState } from '../types';
1
+ import type { CommandContextBase } from '@headless-adminapp/core/experience/command';
2
+ import type { UtilityContextState } from '../types';
3
3
  export declare function useUtility(): UtilityContextState;
4
4
  export declare function useBaseCommandHandlerContext(): CommandContextBase;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useUtility = useUtility;
4
4
  exports.useBaseCommandHandlerContext = useBaseCommandHandlerContext;
5
5
  const navigation_1 = require("@headless-adminapp/app/navigation");
6
+ const route_1 = require("@headless-adminapp/app/route");
6
7
  const react_query_1 = require("@tanstack/react-query");
7
8
  const react_1 = require("react");
8
9
  const useAuthSession_1 = require("../../auth/hooks/useAuthSession");
@@ -12,7 +13,6 @@ const hooks_2 = require("../../metadata/hooks");
12
13
  const hooks_3 = require("../../progress-indicator/hooks");
13
14
  const useOpenToastNotification_1 = require("../../toast-notification/hooks/useOpenToastNotification");
14
15
  const transport_1 = require("../../transport");
15
- const route_1 = require("@headless-adminapp/app/route");
16
16
  function useUtility() {
17
17
  const { hideProgressIndicator, showProgressIndicator } = (0, hooks_3.useProgressIndicator)();
18
18
  const openAlertDialog = (0, hooks_1.useOpenAlertDialog)();
@@ -62,5 +62,13 @@ function useBaseCommandHandlerContext() {
62
62
  locale,
63
63
  navigation,
64
64
  authSession,
65
- }), [dataService, queryClient, stores, utility, locale, navigation, authSession]);
65
+ }), [
66
+ dataService,
67
+ queryClient,
68
+ stores,
69
+ utility,
70
+ locale,
71
+ navigation,
72
+ authSession,
73
+ ]);
66
74
  }
@@ -1,5 +1,5 @@
1
- import { CommandItemExperience } from '@headless-adminapp/core/experience/command';
2
- import { CommandItemExperienceSelector, CommandItemState } from '../types';
1
+ import type { CommandItemExperience } from '@headless-adminapp/core/experience/command';
2
+ import type { CommandItemExperienceSelector, CommandItemState } from '../types';
3
3
  /***
4
4
  * @description Transforms the command configuration into a format that can be used by the CommandBar component
5
5
  * and apply the necessary conditions to the commands (disabled, hidden, etc.)
@@ -1,2 +1,2 @@
1
- export * from './types';
1
+ export type * from './types';
2
2
  export * from './hooks';
package/command/index.js CHANGED
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
17
  __exportStar(require("./hooks"), exports);
@@ -1,8 +1,8 @@
1
- import { CommandItemExperience } from '@headless-adminapp/core/experience/command';
2
- import { ConfirmDialogOptions, PromptDialogOptions } from '@headless-adminapp/core/experience/dialog';
3
- import { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
4
- import { ArrayGroupWithAtLeastOne, Localized } from '@headless-adminapp/core/types';
5
- import { Icon } from '@headless-adminapp/icons';
1
+ import type { CommandItemExperience } from '@headless-adminapp/core/experience/command';
2
+ import type { ConfirmDialogOptions, PromptDialogOptions } from '@headless-adminapp/core/experience/dialog';
3
+ import type { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
4
+ import type { ArrayGroupWithAtLeastOne, Localized } from '@headless-adminapp/core/types';
5
+ import type { Icon } from '@headless-adminapp/icons';
6
6
  interface ConfirmResult {
7
7
  confirmed: boolean;
8
8
  }
@@ -1,3 +1,3 @@
1
- import { CommandItemExperience } from '@headless-adminapp/core/experience/command';
2
- import { CommandItemExperienceSelector, CommandItemState } from '../types';
1
+ import type { CommandItemExperience } from '@headless-adminapp/core/experience/command';
2
+ import type { CommandItemExperienceSelector, CommandItemState } from '../types';
3
3
  export declare function transformCommadnGroups<HandlerContext>(groups: CommandItemExperience<HandlerContext>[][], handlerContext: HandlerContext, selector?: CommandItemExperienceSelector<HandlerContext>): CommandItemState[][];
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import { type FC, type PropsWithChildren } from 'react';
2
2
  import { type ScrollbarProps } from 'react-custom-scrollbars-2';
3
3
  interface ScrollViewProps {
4
4
  className?: string;
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import { type FC, type PropsWithChildren } from 'react';
2
2
  interface ScrollbarWithMoreDataRequest {
3
3
  data: any;
4
4
  hasMore: boolean;
@@ -1,2 +1,2 @@
1
- import { FC } from 'react';
1
+ import { type FC } from 'react';
2
2
  export declare const CalculatedField: FC;
@@ -30,6 +30,7 @@ const CalculatedField = () => {
30
30
  for (const dep of item.deps) {
31
31
  record[dep] = values[dep];
32
32
  }
33
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
34
  const relatedRecords = {};
34
35
  for (const relatedDep of Object.entries(item.relatedDeps || {})) {
35
36
  const [logicalName, { associatedColumn, columns }] = relatedDep;
@@ -1,5 +1,5 @@
1
- import { SchemaAttributes } from '@headless-adminapp/core/schema';
2
- import { RetriveRecordFn } from './types';
1
+ import type { SchemaAttributes } from '@headless-adminapp/core/schema';
2
+ import type { RetriveRecordFn } from './types';
3
3
  interface DataResolverProps<SA extends SchemaAttributes> {
4
4
  retriveRecordFn: RetriveRecordFn<SA>;
5
5
  }
@@ -18,6 +18,7 @@ function DataResolver({ retriveRecordFn, }) {
18
18
  const setState = (0, mutable_1.useContextSetValue)(context_1.DataFormContext);
19
19
  const columns = (0, react_1.useMemo)(() => (0, utils_1.getColumns)(form, schema), [form, schema]);
20
20
  const queryKey = (0, react_1.useMemo)(() => ['data', 'retriveRecord', schema.logicalName, recordId, columns], [columns, recordId, schema.logicalName]);
21
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
22
  const { data, refetch, isPending } = (0, react_query_1.useQuery)({
22
23
  queryKey,
23
24
  queryFn: async () => {
@@ -1,2 +1,2 @@
1
- import { FC } from 'react';
1
+ import { type FC } from 'react';
2
2
  export declare const UnsavedChangesInfoSetter: FC;
@@ -1,8 +1,8 @@
1
- import { SectionEditableGridControl } from '@headless-adminapp/core/experience/form';
2
- import { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
3
- import { ISchemaStore } from '@headless-adminapp/core/store';
4
- import { IDataService } from '@headless-adminapp/core/transport';
5
- import { RetriveRecordFnOptions } from './types';
1
+ import type { SectionEditableGridControl } from '@headless-adminapp/core/experience/form';
2
+ import type { InferredSchemaType, SchemaAttributes } from '@headless-adminapp/core/schema';
3
+ import type { ISchemaStore } from '@headless-adminapp/core/store';
4
+ import { type IDataService } from '@headless-adminapp/core/transport';
5
+ import type { RetriveRecordFnOptions } from './types';
6
6
  export declare function getRecord<SA extends SchemaAttributes = SchemaAttributes>({ recordId, dataService, form, schema, columns, schemaStore, }: RetriveRecordFnOptions<SA>): Promise<import("@headless-adminapp/core/transport").Data<SA> | null>;
7
7
  export declare function getEditableSubgridRecords({ dataService, schemaStore, control, recordId, }: {
8
8
  dataService: IDataService;
@@ -30,6 +30,7 @@ async function getRecord({ recordId, dataService, form, schema, columns, schemaS
30
30
  schemaStore,
31
31
  recordId,
32
32
  });
33
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
34
  record[control.alias] = records;
34
35
  }
35
36
  return record;
@@ -1,8 +1,8 @@
1
- import { EntityMainFormCommandItemExperience, Form } from '@headless-adminapp/core/experience/form';
2
- import { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
3
- import { PropsWithChildren } from 'react';
4
- import { SaveRecordFn } from '../utils/saveRecord';
5
- import { RetriveRecordFn } from './types';
1
+ import type { EntityMainFormCommandItemExperience, Form } from '@headless-adminapp/core/experience/form';
2
+ import type { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
3
+ import { type PropsWithChildren } from 'react';
4
+ import { type SaveRecordFn } from '../utils/saveRecord';
5
+ import type { RetriveRecordFn } from './types';
6
6
  export interface DataFormProviderProps<S extends SchemaAttributes = SchemaAttributes> {
7
7
  schema: Schema<S>;
8
8
  form: Form<S>;
@@ -36,6 +36,7 @@ function DataFormProvider(props) {
36
36
  const router = (0, route_1.useRouter)();
37
37
  const historyKey = (0, historystate_1.useHistoryStateKey)();
38
38
  const [formReadOnly, setFormReadOnly] = (0, react_1.useState)(false); // A trick to provide readOnly info to formInstance
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
40
  const formInstance = (0, react_hook_form_1.useForm)({
40
41
  mode: 'all',
41
42
  defaultValues: {},
@@ -1,7 +1,7 @@
1
- import { Form } from '@headless-adminapp/core/experience/form';
2
- import { InferredSchemaType, Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
3
- import { ISchemaStore } from '@headless-adminapp/core/store';
4
- import { Data, IDataService } from '@headless-adminapp/core/transport';
1
+ import type { Form } from '@headless-adminapp/core/experience/form';
2
+ import type { InferredSchemaType, Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
3
+ import type { ISchemaStore } from '@headless-adminapp/core/store';
4
+ import type { Data, IDataService } from '@headless-adminapp/core/transport';
5
5
  export type RetriveRecordFnOptions<SA extends SchemaAttributes> = {
6
6
  recordId: string;
7
7
  dataService: IDataService;
@@ -1,9 +1,9 @@
1
- import { AttributeBase } from '@headless-adminapp/core/attributes/AttributeBase';
2
- import { Form, Section } from '@headless-adminapp/core/experience/form';
3
- import { SectionControl, SectionStatndardControl } from '@headless-adminapp/core/experience/form/SectionControl';
4
- import { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
5
- import { CalculatedAttributeInfo } from '@headless-adminapp/core/schema/CalculatedAttributeInfo';
6
- import { DataFormContextState } from '../context';
1
+ import type { AttributeBase } from '@headless-adminapp/core/attributes/AttributeBase';
2
+ import type { Form, Section } from '@headless-adminapp/core/experience/form';
3
+ import type { SectionControl, SectionStatndardControl } from '@headless-adminapp/core/experience/form/SectionControl';
4
+ import type { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
5
+ import type { CalculatedAttributeInfo } from '@headless-adminapp/core/schema/CalculatedAttributeInfo';
6
+ import type { DataFormContextState } from '../context';
7
7
  export declare function getControls<SA extends SchemaAttributes>(form: Form<SA>): SectionControl<SA>[];
8
8
  export declare function getColumns<SA extends SchemaAttributes>(form: Form<SA>, schema: Schema<SA>): (keyof SA)[];
9
9
  export declare function transformFormInternal<SA extends SchemaAttributes>(form: Form<SA>): DataFormContextState<SA>['formInternal'];