@headless-adminapp/app 0.0.12-alpha.0 → 0.0.15-alpha.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.
- package/package.json +8 -16
- package/src/app/context.ts +0 -11
- package/src/app/hooks/index.ts +0 -1
- package/src/app/hooks/useAppContext.ts +0 -13
- package/src/app/index.ts +0 -2
- package/src/appearance/context.ts +0 -13
- package/src/appearance/hooks/index.ts +0 -1
- package/src/appearance/hooks/useAppearanceContext.ts +0 -13
- package/src/appearance/index.ts +0 -6
- package/src/auth/AuthProvider.tsx +0 -118
- package/src/auth/context.ts +0 -41
- package/src/auth/hooks/index.ts +0 -2
- package/src/auth/hooks/useAuthSession.ts +0 -17
- package/src/auth/hooks/useLogout.ts +0 -23
- package/src/auth/index.ts +0 -4
- package/src/auth/types.ts +0 -17
- package/src/builders/CommandBuilder.ts +0 -777
- package/src/builders/SchemaExperienceBuilder.ts +0 -488
- package/src/builders/index.ts +0 -5
- package/src/command/hooks/index.ts +0 -2
- package/src/command/hooks/useBaseCommandHandlerContext.ts +0 -51
- package/src/command/hooks/useCommands.ts +0 -26
- package/src/command/index.ts +0 -2
- package/src/command/types.ts +0 -116
- package/src/command/utils/index.ts +0 -142
- package/src/components/ScrollView/index.tsx +0 -26
- package/src/dataform/DataFormProvider/DataResolver.tsx +0 -186
- package/src/dataform/DataFormProvider/InitialValueResolver.tsx +0 -55
- package/src/dataform/DataFormProvider/ReadonlyInfoResolver.tsx +0 -35
- package/src/dataform/DataFormProvider/index.tsx +0 -102
- package/src/dataform/context.ts +0 -53
- package/src/dataform/hooks/index.ts +0 -12
- package/src/dataform/hooks/useFormInstance.ts +0 -6
- package/src/dataform/hooks/useFormIsDirty.ts +0 -7
- package/src/dataform/hooks/useFormIsReadonly.ts +0 -11
- package/src/dataform/hooks/useFormNotifications.ts +0 -46
- package/src/dataform/hooks/useFormRecord.ts +0 -7
- package/src/dataform/hooks/useFormSave.ts +0 -147
- package/src/dataform/hooks/useFormSchema.ts +0 -13
- package/src/dataform/hooks/useLoadFormGridPage.ts +0 -97
- package/src/dataform/hooks/useMainFormCommands.ts +0 -65
- package/src/dataform/hooks/useRecordId.ts +0 -6
- package/src/dataform/hooks/useRecordTitle.ts +0 -22
- package/src/dataform/hooks/useSelectedForm.ts +0 -14
- package/src/dataform/index.ts +0 -4
- package/src/dataform/utils/index.ts +0 -594
- package/src/datagrid/DataGridProvider/DataResolver.tsx +0 -281
- package/src/datagrid/DataGridProvider/index.tsx +0 -134
- package/src/datagrid/DataGridProvider/transformViewColumns.ts +0 -54
- package/src/datagrid/DataGridProvider/utils.ts +0 -89
- package/src/datagrid/column-filter/constants.ts +0 -493
- package/src/datagrid/column-filter/index.ts +0 -3
- package/src/datagrid/column-filter/types.ts +0 -68
- package/src/datagrid/column-filter/utils.ts +0 -19
- package/src/datagrid/context.ts +0 -66
- package/src/datagrid/hooks/index.ts +0 -20
- package/src/datagrid/hooks/useChangeView.ts +0 -18
- package/src/datagrid/hooks/useGridColumnFilter.ts +0 -28
- package/src/datagrid/hooks/useGridColumns.ts +0 -13
- package/src/datagrid/hooks/useGridCommands.ts +0 -21
- package/src/datagrid/hooks/useGridData.ts +0 -8
- package/src/datagrid/hooks/useGridDataState.ts +0 -8
- package/src/datagrid/hooks/useGridExtraFilter.ts +0 -6
- package/src/datagrid/hooks/useGridOptions.ts +0 -3
- package/src/datagrid/hooks/useGridPagination.ts +0 -3
- package/src/datagrid/hooks/useGridRefresh.ts +0 -19
- package/src/datagrid/hooks/useGridSchema.ts +0 -13
- package/src/datagrid/hooks/useGridSelection.ts +0 -28
- package/src/datagrid/hooks/useGridSorting.ts +0 -23
- package/src/datagrid/hooks/useGridViewLookupData.ts +0 -10
- package/src/datagrid/hooks/useLoadMainGridPage.ts +0 -90
- package/src/datagrid/hooks/useMainGridCommands.ts +0 -255
- package/src/datagrid/hooks/useMaxRecords.ts +0 -6
- package/src/datagrid/hooks/useSearchText.ts +0 -22
- package/src/datagrid/hooks/useSelectedView.ts +0 -14
- package/src/datagrid/hooks/useSubGridCommands.ts +0 -104
- package/src/datagrid/index.ts +0 -14
- package/src/dialog/DialogProvider.tsx +0 -20
- package/src/dialog/context.ts +0 -14
- package/src/dialog/hooks/index.ts +0 -8
- package/src/dialog/hooks/useCloseDialog.ts +0 -36
- package/src/dialog/hooks/useDialogItem.ts +0 -8
- package/src/dialog/hooks/useDialogItems.ts +0 -6
- package/src/dialog/hooks/useOpenAlertDialog.ts +0 -30
- package/src/dialog/hooks/useOpenConfirmDialog.ts +0 -45
- package/src/dialog/hooks/useOpenDialog.ts +0 -39
- package/src/dialog/hooks/useOpenErrorDialog.ts +0 -26
- package/src/dialog/hooks/useOpenPromptDialog.ts +0 -46
- package/src/dialog/index.ts +0 -7
- package/src/form/FormValidationStringContext.ts +0 -30
- package/src/form/index.ts +0 -6
- package/src/hooks/index.ts +0 -5
- package/src/hooks/useDebouncedValue.ts +0 -38
- package/src/hooks/useElementLayout.ts +0 -49
- package/src/hooks/useIsMobile.ts +0 -21
- package/src/hooks/useStorageState.ts +0 -36
- package/src/hooks/useSystemColorScheme.ts +0 -38
- package/src/index.css +0 -4
- package/src/insights/context.ts +0 -5
- package/src/insights/hooks/index.ts +0 -14
- package/src/insights/index.ts +0 -2
- package/src/locale/context.ts +0 -7
- package/src/locale/index.ts +0 -3
- package/src/locale/types.ts +0 -3
- package/src/locale/useLocale.ts +0 -13
- package/src/metadata/MetadataProvider.tsx +0 -51
- package/src/metadata/context.ts +0 -15
- package/src/metadata/hooks/index.ts +0 -8
- package/src/metadata/hooks/useAppStore.ts +0 -6
- package/src/metadata/hooks/useExperienceStore.ts +0 -6
- package/src/metadata/hooks/useExperienceView.ts +0 -36
- package/src/metadata/hooks/useExperienceViewCommands.ts +0 -20
- package/src/metadata/hooks/useExperienceViewLookup.ts +0 -33
- package/src/metadata/hooks/useExperienceViewSubgridCommands.ts +0 -20
- package/src/metadata/hooks/useMetadata.ts +0 -44
- package/src/metadata/hooks/useSchema.ts +0 -11
- package/src/metadata/index.ts +0 -3
- package/src/mutable/context.ts +0 -71
- package/src/mutable/index.ts +0 -14
- package/src/mutable/state.ts +0 -13
- package/src/mutable/type.ts +0 -9
- package/src/mutable/utils.ts +0 -80
- package/src/navigation/hooks/useOpenForm.ts +0 -34
- package/src/progress-indicator/ProgressIndicatorProvider.tsx +0 -77
- package/src/progress-indicator/context.ts +0 -12
- package/src/progress-indicator/hooks/index.ts +0 -1
- package/src/progress-indicator/hooks/useProgressIndicator.ts +0 -15
- package/src/progress-indicator/index.ts +0 -6
- package/src/providers/PageEntityFormProvider/index.tsx +0 -34
- package/src/providers/PageEntityViewProvider/index.tsx +0 -39
- package/src/recordset/RecordSetProvider.tsx +0 -55
- package/src/recordset/context.ts +0 -12
- package/src/recordset/hooks/index.ts +0 -3
- package/src/recordset/hooks/useRecordSetResult.ts +0 -94
- package/src/recordset/hooks/useRecordSetSetter.ts +0 -21
- package/src/recordset/hooks/useRecordSetVisibility.ts +0 -24
- package/src/recordset/index.ts +0 -3
- package/src/route/RouteProvider.tsx +0 -76
- package/src/route/context.ts +0 -39
- package/src/route/hooks/index.ts +0 -5
- package/src/route/hooks/useBasePath.ts +0 -7
- package/src/route/hooks/usePathname.ts +0 -7
- package/src/route/hooks/useRouteResolver.ts +0 -7
- package/src/route/hooks/useRouter.ts +0 -7
- package/src/route/hooks/useSearchParams.ts +0 -7
- package/src/route/index.ts +0 -2
- package/src/route/types.ts +0 -1
- package/src/store/ClientAppStore.ts +0 -20
- package/src/store/ComponentStore.tsx +0 -22
- package/src/store/EventManager.ts +0 -33
- package/src/store/SchemaExperienceStore.ts +0 -374
- package/src/store/index.ts +0 -4
- package/src/toast-notification/ToastNotificationProvider.tsx +0 -23
- package/src/toast-notification/context.ts +0 -17
- package/src/toast-notification/hooks/index.ts +0 -3
- package/src/toast-notification/hooks/useCloseToastNotification.ts +0 -36
- package/src/toast-notification/hooks/useOpenToastNotification.ts +0 -38
- package/src/toast-notification/hooks/useToastNotificationItems.ts +0 -6
- package/src/toast-notification/index.ts +0 -7
- package/src/transport/InMemoryDataService/index.ts +0 -157
- package/src/transport/RestDataService/index.ts +0 -151
- package/src/transport/context.ts +0 -6
- package/src/transport/hooks/index.ts +0 -1
- package/src/transport/hooks/useDataService.ts +0 -13
- package/src/transport/index.ts +0 -2
- package/src/utils/calculateColumnWidths.ts +0 -72
- package/src/utils/index.ts +0 -1
- package/src/widget/context.ts +0 -5
- package/src/widget/hooks/index.ts +0 -11
- package/src/widget/index.ts +0 -1
- package/tsconfig.json +0 -9
- package/tsconfig.tsbuildinfo +0 -1
- /package/{dist/app → app}/context.d.ts +0 -0
- /package/{dist/app → app}/context.js +0 -0
- /package/{dist/app → app}/hooks/index.d.ts +0 -0
- /package/{dist/app → app}/hooks/index.js +0 -0
- /package/{dist/app → app}/hooks/useAppContext.d.ts +0 -0
- /package/{dist/app → app}/hooks/useAppContext.js +0 -0
- /package/{dist/app → app}/index.d.ts +0 -0
- /package/{dist/app → app}/index.js +0 -0
- /package/{dist/appearance → appearance}/context.d.ts +0 -0
- /package/{dist/appearance → appearance}/context.js +0 -0
- /package/{dist/appearance → appearance}/hooks/index.d.ts +0 -0
- /package/{dist/appearance → appearance}/hooks/index.js +0 -0
- /package/{dist/appearance → appearance}/hooks/useAppearanceContext.d.ts +0 -0
- /package/{dist/appearance → appearance}/hooks/useAppearanceContext.js +0 -0
- /package/{dist/appearance → appearance}/index.d.ts +0 -0
- /package/{dist/appearance → appearance}/index.js +0 -0
- /package/{dist/auth → auth}/AuthProvider.d.ts +0 -0
- /package/{dist/auth → auth}/AuthProvider.js +0 -0
- /package/{dist/auth → auth}/context.d.ts +0 -0
- /package/{dist/auth → auth}/context.js +0 -0
- /package/{dist/auth → auth}/hooks/index.d.ts +0 -0
- /package/{dist/auth → auth}/hooks/index.js +0 -0
- /package/{dist/auth → auth}/hooks/useAuthSession.d.ts +0 -0
- /package/{dist/auth → auth}/hooks/useAuthSession.js +0 -0
- /package/{dist/auth → auth}/hooks/useLogout.d.ts +0 -0
- /package/{dist/auth → auth}/hooks/useLogout.js +0 -0
- /package/{dist/auth → auth}/index.d.ts +0 -0
- /package/{dist/auth → auth}/index.js +0 -0
- /package/{dist/auth → auth}/types.d.ts +0 -0
- /package/{dist/auth → auth}/types.js +0 -0
- /package/{dist/builders → builders}/CommandBuilder.d.ts +0 -0
- /package/{dist/builders → builders}/CommandBuilder.js +0 -0
- /package/{dist/builders → builders}/SchemaExperienceBuilder.d.ts +0 -0
- /package/{dist/builders → builders}/SchemaExperienceBuilder.js +0 -0
- /package/{dist/builders → builders}/index.d.ts +0 -0
- /package/{dist/builders → builders}/index.js +0 -0
- /package/{dist/command → command}/hooks/index.d.ts +0 -0
- /package/{dist/command → command}/hooks/index.js +0 -0
- /package/{dist/command → command}/hooks/useBaseCommandHandlerContext.d.ts +0 -0
- /package/{dist/command → command}/hooks/useBaseCommandHandlerContext.js +0 -0
- /package/{dist/command → command}/hooks/useCommands.d.ts +0 -0
- /package/{dist/command → command}/hooks/useCommands.js +0 -0
- /package/{dist/command → command}/index.d.ts +0 -0
- /package/{dist/command → command}/index.js +0 -0
- /package/{dist/command → command}/types.d.ts +0 -0
- /package/{dist/command → command}/types.js +0 -0
- /package/{dist/command → command}/utils/index.d.ts +0 -0
- /package/{dist/command → command}/utils/index.js +0 -0
- /package/{dist/components → components}/ScrollView/index.d.ts +0 -0
- /package/{dist/components → components}/ScrollView/index.js +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/DataResolver.d.ts +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/DataResolver.js +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/InitialValueResolver.d.ts +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/InitialValueResolver.js +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/ReadonlyInfoResolver.d.ts +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/ReadonlyInfoResolver.js +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/index.d.ts +0 -0
- /package/{dist/dataform → dataform}/DataFormProvider/index.js +0 -0
- /package/{dist/dataform → dataform}/context.d.ts +0 -0
- /package/{dist/dataform → dataform}/context.js +0 -0
- /package/{dist/dataform → dataform}/hooks/index.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/index.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormInstance.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormInstance.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormIsDirty.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormIsDirty.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormIsReadonly.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormIsReadonly.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormNotifications.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormNotifications.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormRecord.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormRecord.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormSave.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormSave.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormSchema.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useFormSchema.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useLoadFormGridPage.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useLoadFormGridPage.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useMainFormCommands.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useMainFormCommands.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useRecordId.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useRecordId.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useRecordTitle.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useRecordTitle.js +0 -0
- /package/{dist/dataform → dataform}/hooks/useSelectedForm.d.ts +0 -0
- /package/{dist/dataform → dataform}/hooks/useSelectedForm.js +0 -0
- /package/{dist/dataform → dataform}/index.d.ts +0 -0
- /package/{dist/dataform → dataform}/index.js +0 -0
- /package/{dist/dataform → dataform}/utils/index.d.ts +0 -0
- /package/{dist/dataform → dataform}/utils/index.js +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/DataResolver.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/DataResolver.js +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/index.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/index.js +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/transformViewColumns.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/transformViewColumns.js +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/utils.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/DataGridProvider/utils.js +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/constants.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/constants.js +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/index.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/index.js +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/types.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/types.js +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/utils.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/column-filter/utils.js +0 -0
- /package/{dist/datagrid → datagrid}/context.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/context.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/index.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/index.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useChangeView.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useChangeView.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridColumnFilter.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridColumnFilter.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridColumns.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridColumns.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridCommands.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridCommands.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridData.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridData.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridDataState.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridDataState.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridExtraFilter.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridExtraFilter.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridOptions.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridOptions.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridPagination.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridPagination.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridRefresh.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridRefresh.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridSchema.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridSchema.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridSelection.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridSelection.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridSorting.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridSorting.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridViewLookupData.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useGridViewLookupData.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useLoadMainGridPage.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useLoadMainGridPage.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useMainGridCommands.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useMainGridCommands.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useMaxRecords.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useMaxRecords.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useSearchText.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useSearchText.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useSelectedView.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useSelectedView.js +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useSubGridCommands.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/hooks/useSubGridCommands.js +0 -0
- /package/{dist/datagrid → datagrid}/index.d.ts +0 -0
- /package/{dist/datagrid → datagrid}/index.js +0 -0
- /package/{dist/dialog → dialog}/DialogProvider.d.ts +0 -0
- /package/{dist/dialog → dialog}/DialogProvider.js +0 -0
- /package/{dist/dialog → dialog}/context.d.ts +0 -0
- /package/{dist/dialog → dialog}/context.js +0 -0
- /package/{dist/dialog → dialog}/hooks/index.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/index.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useCloseDialog.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useCloseDialog.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useDialogItem.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useDialogItem.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useDialogItems.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useDialogItems.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenAlertDialog.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenAlertDialog.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenConfirmDialog.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenConfirmDialog.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenDialog.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenDialog.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenErrorDialog.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenErrorDialog.js +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenPromptDialog.d.ts +0 -0
- /package/{dist/dialog → dialog}/hooks/useOpenPromptDialog.js +0 -0
- /package/{dist/dialog → dialog}/index.d.ts +0 -0
- /package/{dist/dialog → dialog}/index.js +0 -0
- /package/{dist/form → form}/FormValidationStringContext.d.ts +0 -0
- /package/{dist/form → form}/FormValidationStringContext.js +0 -0
- /package/{dist/form → form}/index.d.ts +0 -0
- /package/{dist/form → form}/index.js +0 -0
- /package/{dist/hooks → hooks}/index.d.ts +0 -0
- /package/{dist/hooks → hooks}/index.js +0 -0
- /package/{dist/hooks → hooks}/useDebouncedValue.d.ts +0 -0
- /package/{dist/hooks → hooks}/useDebouncedValue.js +0 -0
- /package/{dist/hooks → hooks}/useElementLayout.d.ts +0 -0
- /package/{dist/hooks → hooks}/useElementLayout.js +0 -0
- /package/{dist/hooks → hooks}/useIsMobile.d.ts +0 -0
- /package/{dist/hooks → hooks}/useIsMobile.js +0 -0
- /package/{dist/hooks → hooks}/useStorageState.d.ts +0 -0
- /package/{dist/hooks → hooks}/useStorageState.js +0 -0
- /package/{dist/hooks → hooks}/useSystemColorScheme.d.ts +0 -0
- /package/{dist/hooks → hooks}/useSystemColorScheme.js +0 -0
- /package/{dist/insights → insights}/context.d.ts +0 -0
- /package/{dist/insights → insights}/context.js +0 -0
- /package/{dist/insights → insights}/hooks/index.d.ts +0 -0
- /package/{dist/insights → insights}/hooks/index.js +0 -0
- /package/{dist/insights → insights}/index.d.ts +0 -0
- /package/{dist/insights → insights}/index.js +0 -0
- /package/{dist/locale → locale}/context.d.ts +0 -0
- /package/{dist/locale → locale}/context.js +0 -0
- /package/{dist/locale → locale}/index.d.ts +0 -0
- /package/{dist/locale → locale}/index.js +0 -0
- /package/{dist/locale → locale}/types.d.ts +0 -0
- /package/{dist/locale → locale}/types.js +0 -0
- /package/{dist/locale → locale}/useLocale.d.ts +0 -0
- /package/{dist/locale → locale}/useLocale.js +0 -0
- /package/{dist/metadata → metadata}/MetadataProvider.d.ts +0 -0
- /package/{dist/metadata → metadata}/MetadataProvider.js +0 -0
- /package/{dist/metadata → metadata}/context.d.ts +0 -0
- /package/{dist/metadata → metadata}/context.js +0 -0
- /package/{dist/metadata → metadata}/hooks/index.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/index.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useAppStore.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useAppStore.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceStore.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceStore.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceView.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceView.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceViewCommands.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceViewCommands.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceViewLookup.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceViewLookup.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceViewSubgridCommands.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useExperienceViewSubgridCommands.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useMetadata.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useMetadata.js +0 -0
- /package/{dist/metadata → metadata}/hooks/useSchema.d.ts +0 -0
- /package/{dist/metadata → metadata}/hooks/useSchema.js +0 -0
- /package/{dist/metadata → metadata}/index.d.ts +0 -0
- /package/{dist/metadata → metadata}/index.js +0 -0
- /package/{dist/mutable → mutable}/context.d.ts +0 -0
- /package/{dist/mutable → mutable}/context.js +0 -0
- /package/{dist/mutable → mutable}/index.d.ts +0 -0
- /package/{dist/mutable → mutable}/index.js +0 -0
- /package/{dist/mutable → mutable}/state.d.ts +0 -0
- /package/{dist/mutable → mutable}/state.js +0 -0
- /package/{dist/mutable → mutable}/type.d.ts +0 -0
- /package/{dist/mutable → mutable}/type.js +0 -0
- /package/{dist/mutable → mutable}/utils.d.ts +0 -0
- /package/{dist/mutable → mutable}/utils.js +0 -0
- /package/{dist/navigation → navigation}/hooks/useOpenForm.d.ts +0 -0
- /package/{dist/navigation → navigation}/hooks/useOpenForm.js +0 -0
- /package/{dist/progress-indicator → progress-indicator}/ProgressIndicatorProvider.d.ts +0 -0
- /package/{dist/progress-indicator → progress-indicator}/ProgressIndicatorProvider.js +0 -0
- /package/{dist/progress-indicator → progress-indicator}/context.d.ts +0 -0
- /package/{dist/progress-indicator → progress-indicator}/context.js +0 -0
- /package/{dist/progress-indicator → progress-indicator}/hooks/index.d.ts +0 -0
- /package/{dist/progress-indicator → progress-indicator}/hooks/index.js +0 -0
- /package/{dist/progress-indicator → progress-indicator}/hooks/useProgressIndicator.d.ts +0 -0
- /package/{dist/progress-indicator → progress-indicator}/hooks/useProgressIndicator.js +0 -0
- /package/{dist/progress-indicator → progress-indicator}/index.d.ts +0 -0
- /package/{dist/progress-indicator → progress-indicator}/index.js +0 -0
- /package/{dist/providers → providers}/PageEntityFormProvider/index.d.ts +0 -0
- /package/{dist/providers → providers}/PageEntityFormProvider/index.js +0 -0
- /package/{dist/providers → providers}/PageEntityViewProvider/index.d.ts +0 -0
- /package/{dist/providers → providers}/PageEntityViewProvider/index.js +0 -0
- /package/{dist/recordset → recordset}/RecordSetProvider.d.ts +0 -0
- /package/{dist/recordset → recordset}/RecordSetProvider.js +0 -0
- /package/{dist/recordset → recordset}/context.d.ts +0 -0
- /package/{dist/recordset → recordset}/context.js +0 -0
- /package/{dist/recordset → recordset}/hooks/index.d.ts +0 -0
- /package/{dist/recordset → recordset}/hooks/index.js +0 -0
- /package/{dist/recordset → recordset}/hooks/useRecordSetResult.d.ts +0 -0
- /package/{dist/recordset → recordset}/hooks/useRecordSetResult.js +0 -0
- /package/{dist/recordset → recordset}/hooks/useRecordSetSetter.d.ts +0 -0
- /package/{dist/recordset → recordset}/hooks/useRecordSetSetter.js +0 -0
- /package/{dist/recordset → recordset}/hooks/useRecordSetVisibility.d.ts +0 -0
- /package/{dist/recordset → recordset}/hooks/useRecordSetVisibility.js +0 -0
- /package/{dist/recordset → recordset}/index.d.ts +0 -0
- /package/{dist/recordset → recordset}/index.js +0 -0
- /package/{dist/route → route}/RouteProvider.d.ts +0 -0
- /package/{dist/route → route}/RouteProvider.js +0 -0
- /package/{dist/route → route}/context.d.ts +0 -0
- /package/{dist/route → route}/context.js +0 -0
- /package/{dist/route → route}/hooks/index.d.ts +0 -0
- /package/{dist/route → route}/hooks/index.js +0 -0
- /package/{dist/route → route}/hooks/useBasePath.d.ts +0 -0
- /package/{dist/route → route}/hooks/useBasePath.js +0 -0
- /package/{dist/route → route}/hooks/usePathname.d.ts +0 -0
- /package/{dist/route → route}/hooks/usePathname.js +0 -0
- /package/{dist/route → route}/hooks/useRouteResolver.d.ts +0 -0
- /package/{dist/route → route}/hooks/useRouteResolver.js +0 -0
- /package/{dist/route → route}/hooks/useRouter.d.ts +0 -0
- /package/{dist/route → route}/hooks/useRouter.js +0 -0
- /package/{dist/route → route}/hooks/useSearchParams.d.ts +0 -0
- /package/{dist/route → route}/hooks/useSearchParams.js +0 -0
- /package/{dist/route → route}/index.d.ts +0 -0
- /package/{dist/route → route}/index.js +0 -0
- /package/{dist/route → route}/types.d.ts +0 -0
- /package/{dist/route → route}/types.js +0 -0
- /package/{dist/store → store}/ClientAppStore.d.ts +0 -0
- /package/{dist/store → store}/ClientAppStore.js +0 -0
- /package/{dist/store → store}/ComponentStore.d.ts +0 -0
- /package/{dist/store → store}/ComponentStore.js +0 -0
- /package/{dist/store → store}/EventManager.d.ts +0 -0
- /package/{dist/store → store}/EventManager.js +0 -0
- /package/{dist/store → store}/SchemaExperienceStore.d.ts +0 -0
- /package/{dist/store → store}/SchemaExperienceStore.js +0 -0
- /package/{dist/store → store}/index.d.ts +0 -0
- /package/{dist/store → store}/index.js +0 -0
- /package/{dist/toast-notification → toast-notification}/ToastNotificationProvider.d.ts +0 -0
- /package/{dist/toast-notification → toast-notification}/ToastNotificationProvider.js +0 -0
- /package/{dist/toast-notification → toast-notification}/context.d.ts +0 -0
- /package/{dist/toast-notification → toast-notification}/context.js +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/index.d.ts +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/index.js +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/useCloseToastNotification.d.ts +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/useCloseToastNotification.js +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/useOpenToastNotification.d.ts +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/useOpenToastNotification.js +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/useToastNotificationItems.d.ts +0 -0
- /package/{dist/toast-notification → toast-notification}/hooks/useToastNotificationItems.js +0 -0
- /package/{dist/toast-notification → toast-notification}/index.d.ts +0 -0
- /package/{dist/toast-notification → toast-notification}/index.js +0 -0
- /package/{dist/transport → transport}/InMemoryDataService/index.d.ts +0 -0
- /package/{dist/transport → transport}/InMemoryDataService/index.js +0 -0
- /package/{dist/transport → transport}/RestDataService/index.d.ts +0 -0
- /package/{dist/transport → transport}/RestDataService/index.js +0 -0
- /package/{dist/transport → transport}/context.d.ts +0 -0
- /package/{dist/transport → transport}/context.js +0 -0
- /package/{dist/transport → transport}/hooks/index.d.ts +0 -0
- /package/{dist/transport → transport}/hooks/index.js +0 -0
- /package/{dist/transport → transport}/hooks/useDataService.d.ts +0 -0
- /package/{dist/transport → transport}/hooks/useDataService.js +0 -0
- /package/{dist/transport → transport}/index.d.ts +0 -0
- /package/{dist/transport → transport}/index.js +0 -0
- /package/{dist/utils → utils}/calculateColumnWidths.d.ts +0 -0
- /package/{dist/utils → utils}/calculateColumnWidths.js +0 -0
- /package/{dist/utils → utils}/index.d.ts +0 -0
- /package/{dist/utils → utils}/index.js +0 -0
- /package/{dist/widget → widget}/context.d.ts +0 -0
- /package/{dist/widget → widget}/context.js +0 -0
- /package/{dist/widget → widget}/hooks/index.d.ts +0 -0
- /package/{dist/widget → widget}/hooks/index.js +0 -0
- /package/{dist/widget → widget}/index.d.ts +0 -0
- /package/{dist/widget → widget}/index.js +0 -0
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
2
|
-
|
|
3
|
-
import { useContextSelector } from '../../mutable/context';
|
|
4
|
-
import { GridContext, TransformedViewColumn } from '../context';
|
|
5
|
-
|
|
6
|
-
export function useGridColumns<
|
|
7
|
-
S extends SchemaAttributes = SchemaAttributes
|
|
8
|
-
>(): TransformedViewColumn<S>[] {
|
|
9
|
-
return useContextSelector(
|
|
10
|
-
GridContext,
|
|
11
|
-
(state) => state.columns as TransformedViewColumn<S>[]
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CommandItemExperience } from '@headless-adminapp/core/experience/command';
|
|
2
|
-
import {
|
|
3
|
-
EntityMainGridCommandContext,
|
|
4
|
-
EntitySubGridCommandContext,
|
|
5
|
-
} from '@headless-adminapp/core/experience/view';
|
|
6
|
-
|
|
7
|
-
import { useContextSelector } from '../../mutable/context';
|
|
8
|
-
import { GridContext } from '../context';
|
|
9
|
-
|
|
10
|
-
export function useGridCommands<
|
|
11
|
-
CommandContext extends
|
|
12
|
-
| EntityMainGridCommandContext
|
|
13
|
-
| EntitySubGridCommandContext = EntityMainGridCommandContext
|
|
14
|
-
>(): CommandItemExperience<CommandContext>[][] {
|
|
15
|
-
const commands = useContextSelector(
|
|
16
|
-
GridContext,
|
|
17
|
-
(state) => state.commands as CommandItemExperience<CommandContext>[][]
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
return commands;
|
|
21
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
|
|
4
|
-
import { useDataGridSchema } from './useGridSchema';
|
|
5
|
-
|
|
6
|
-
export function useGridRefresh() {
|
|
7
|
-
const queryClient = useQueryClient();
|
|
8
|
-
const schema = useDataGridSchema();
|
|
9
|
-
|
|
10
|
-
const refresh = useCallback(() => {
|
|
11
|
-
queryClient
|
|
12
|
-
.resetQueries({
|
|
13
|
-
queryKey: ['data', 'retriveRecords', schema.logicalName],
|
|
14
|
-
})
|
|
15
|
-
.catch(console.error);
|
|
16
|
-
}, [queryClient, schema.logicalName]);
|
|
17
|
-
|
|
18
|
-
return refresh;
|
|
19
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
2
|
-
|
|
3
|
-
import { useContextSelector } from '../../mutable/context';
|
|
4
|
-
import { GridContext } from '../context';
|
|
5
|
-
|
|
6
|
-
export function useDataGridSchema<
|
|
7
|
-
S extends SchemaAttributes = SchemaAttributes
|
|
8
|
-
>(): Schema<S> {
|
|
9
|
-
return useContextSelector(
|
|
10
|
-
GridContext,
|
|
11
|
-
(state) => state.schema as unknown as Schema<S>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
import { useContextSelector, useContextSetValue } from '../../mutable/context';
|
|
4
|
-
import { GridContext } from '../context';
|
|
5
|
-
|
|
6
|
-
export function useGridSelection() {
|
|
7
|
-
const selecteIds = useContextSelector(
|
|
8
|
-
GridContext,
|
|
9
|
-
(state) => state.selectedIds
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
const setValue = useContextSetValue(GridContext);
|
|
13
|
-
|
|
14
|
-
const setSelectedIds = useCallback(
|
|
15
|
-
(selectedIds: string[] | ((previousIds: string[]) => string[])) => {
|
|
16
|
-
if (typeof selectedIds === 'function') {
|
|
17
|
-
setValue((state) => ({
|
|
18
|
-
selectedIds: selectedIds(state.selectedIds),
|
|
19
|
-
}));
|
|
20
|
-
} else {
|
|
21
|
-
setValue({ selectedIds });
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
[setValue]
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
return [selecteIds, setSelectedIds] as const;
|
|
28
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SortingState } from '@headless-adminapp/core/experience/view';
|
|
2
|
-
import { SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
3
|
-
import { useCallback } from 'react';
|
|
4
|
-
|
|
5
|
-
import { useContextSelector, useContextSetValue } from '../../mutable/context';
|
|
6
|
-
import { GridContext } from '../context';
|
|
7
|
-
|
|
8
|
-
export function useGridSorting<
|
|
9
|
-
S extends SchemaAttributes = SchemaAttributes
|
|
10
|
-
>() {
|
|
11
|
-
const sorting = useContextSelector(GridContext, (state) => state.sorting);
|
|
12
|
-
|
|
13
|
-
const setValue = useContextSetValue(GridContext);
|
|
14
|
-
|
|
15
|
-
const setSorting = useCallback(
|
|
16
|
-
(value: SortingState<S>) => {
|
|
17
|
-
setValue({ sorting: value as any });
|
|
18
|
-
},
|
|
19
|
-
[setValue]
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
return [sorting, setSorting] as const;
|
|
23
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContextSelector } from '../../mutable/context';
|
|
2
|
-
import { GridContext } from '../context';
|
|
3
|
-
|
|
4
|
-
export function useGridViewLookupData() {
|
|
5
|
-
const viewLookup = useContextSelector(
|
|
6
|
-
GridContext,
|
|
7
|
-
(state) => state.viewLookup
|
|
8
|
-
);
|
|
9
|
-
return viewLookup;
|
|
10
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { LocalizedDataLookup } from '@headless-adminapp/core/attributes';
|
|
2
|
-
import {
|
|
3
|
-
EntityMainGridCommandItemExperience,
|
|
4
|
-
View,
|
|
5
|
-
} from '@headless-adminapp/core/experience/view';
|
|
6
|
-
import { Schema } from '@headless-adminapp/core/schema';
|
|
7
|
-
|
|
8
|
-
import { useExperienceView } from '../../metadata/hooks/useExperienceView';
|
|
9
|
-
import { useExperienceViewCommands } from '../../metadata/hooks/useExperienceViewCommands';
|
|
10
|
-
import { useExperienceViewLookup } from '../../metadata/hooks/useExperienceViewLookup';
|
|
11
|
-
import { useSchema } from '../../metadata/hooks/useSchema';
|
|
12
|
-
|
|
13
|
-
type UseLoadMainGridPageResult =
|
|
14
|
-
| {
|
|
15
|
-
loading: true;
|
|
16
|
-
}
|
|
17
|
-
| {
|
|
18
|
-
loading: false;
|
|
19
|
-
error: true;
|
|
20
|
-
title: string;
|
|
21
|
-
message: string;
|
|
22
|
-
}
|
|
23
|
-
| {
|
|
24
|
-
loading: false;
|
|
25
|
-
error: false;
|
|
26
|
-
schema: Schema;
|
|
27
|
-
viewLookup: LocalizedDataLookup[];
|
|
28
|
-
commands: EntityMainGridCommandItemExperience[][];
|
|
29
|
-
view: View;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export function useLoadMainGridPage(
|
|
33
|
-
logicalName: string,
|
|
34
|
-
viewId: string | undefined
|
|
35
|
-
): UseLoadMainGridPageResult {
|
|
36
|
-
const schema = useSchema(logicalName);
|
|
37
|
-
|
|
38
|
-
const { viewLookup } = useExperienceViewLookup(logicalName);
|
|
39
|
-
const { commands } = useExperienceViewCommands(logicalName);
|
|
40
|
-
|
|
41
|
-
const { view, isLoadingView } = useExperienceView(logicalName, viewId);
|
|
42
|
-
|
|
43
|
-
if (!schema) {
|
|
44
|
-
return {
|
|
45
|
-
loading: false,
|
|
46
|
-
error: true,
|
|
47
|
-
title: 'Schema not found',
|
|
48
|
-
message: 'The schema was not found',
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!view) {
|
|
53
|
-
if (isLoadingView) {
|
|
54
|
-
return {
|
|
55
|
-
loading: true,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
loading: false,
|
|
61
|
-
error: true,
|
|
62
|
-
title: 'View not found',
|
|
63
|
-
message: 'The view was not found',
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (view.logicalName !== schema.logicalName) {
|
|
68
|
-
if (isLoadingView) {
|
|
69
|
-
return {
|
|
70
|
-
loading: true,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return {
|
|
75
|
-
loading: false,
|
|
76
|
-
error: true,
|
|
77
|
-
title: 'View not found',
|
|
78
|
-
message: 'The view was not found (missmatch)',
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
loading: false,
|
|
84
|
-
error: false,
|
|
85
|
-
schema,
|
|
86
|
-
viewLookup,
|
|
87
|
-
commands,
|
|
88
|
-
view,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { EntityMainGridCommandContext } from '@headless-adminapp/core/experience/view';
|
|
2
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
import { useCommands } from '../../command';
|
|
6
|
-
import {
|
|
7
|
-
CommandItemState,
|
|
8
|
-
MenuItemCommandState,
|
|
9
|
-
UtilityContextState,
|
|
10
|
-
} from '../../command/types';
|
|
11
|
-
import {
|
|
12
|
-
useOpenAlertDialog,
|
|
13
|
-
useOpenConfirmDialog,
|
|
14
|
-
useOpenErrorDialog,
|
|
15
|
-
useOpenPromptDialog,
|
|
16
|
-
} from '../../dialog/hooks';
|
|
17
|
-
import { useLocale } from '../../locale/useLocale';
|
|
18
|
-
import { useMetadata } from '../../metadata/hooks/useMetadata';
|
|
19
|
-
import { useProgressIndicator } from '../../progress-indicator/hooks/useProgressIndicator';
|
|
20
|
-
import { useOpenToastNotification } from '../../toast-notification/hooks/useOpenToastNotification';
|
|
21
|
-
import { useDataService } from '../../transport';
|
|
22
|
-
import { useGridColumnFilter } from './useGridColumnFilter';
|
|
23
|
-
import { useGridCommands } from './useGridCommands';
|
|
24
|
-
import { useGridData } from './useGridData';
|
|
25
|
-
import { useGridExtraFilter } from './useGridExtraFilter';
|
|
26
|
-
import { useGridRefresh } from './useGridRefresh';
|
|
27
|
-
import { useDataGridSchema } from './useGridSchema';
|
|
28
|
-
import { useGridSelection } from './useGridSelection';
|
|
29
|
-
import { useSearchText } from './useSearchText';
|
|
30
|
-
import { useSelectedView } from './useSelectedView';
|
|
31
|
-
|
|
32
|
-
export function useUtility(): UtilityContextState {
|
|
33
|
-
const { hideProgressIndicator, showProgressIndicator } =
|
|
34
|
-
useProgressIndicator();
|
|
35
|
-
const openAlertDialog = useOpenAlertDialog();
|
|
36
|
-
const openConfirmDialog = useOpenConfirmDialog();
|
|
37
|
-
const openErrorDialog = useOpenErrorDialog();
|
|
38
|
-
const openPromptDialog = useOpenPromptDialog();
|
|
39
|
-
const openToastNotification = useOpenToastNotification();
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
hideProgressIndicator,
|
|
43
|
-
showProgressIndicator,
|
|
44
|
-
openAlertDialog,
|
|
45
|
-
openConfirmDialog: openConfirmDialog as any,
|
|
46
|
-
openErrorDialog,
|
|
47
|
-
openPromptDialog: openPromptDialog as any,
|
|
48
|
-
showNotification: openToastNotification,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function useGridControlContext() {
|
|
53
|
-
const data = useGridData();
|
|
54
|
-
const schema = useDataGridSchema();
|
|
55
|
-
const view = useSelectedView();
|
|
56
|
-
const [searchText] = useSearchText();
|
|
57
|
-
const [selectedIds] = useGridSelection();
|
|
58
|
-
const [columnFilter] = useGridColumnFilter();
|
|
59
|
-
const extraFilter = useGridExtraFilter();
|
|
60
|
-
const refresh = useGridRefresh();
|
|
61
|
-
|
|
62
|
-
const selectedIdsObj = useMemo(() => {
|
|
63
|
-
const obj: Record<string, boolean> = {};
|
|
64
|
-
selectedIds.forEach((id) => {
|
|
65
|
-
obj[id] = true;
|
|
66
|
-
});
|
|
67
|
-
return obj;
|
|
68
|
-
}, [selectedIds]);
|
|
69
|
-
|
|
70
|
-
const selectedRecords = useMemo(() => {
|
|
71
|
-
return (data?.records ?? []).filter(
|
|
72
|
-
(record) => selectedIdsObj[record[schema.idAttribute as string] as string]
|
|
73
|
-
);
|
|
74
|
-
}, [data, schema, selectedIdsObj]);
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
data,
|
|
78
|
-
logicalName: schema.logicalName,
|
|
79
|
-
schema,
|
|
80
|
-
refresh,
|
|
81
|
-
searchText,
|
|
82
|
-
selectedIds,
|
|
83
|
-
selectedRecords,
|
|
84
|
-
view,
|
|
85
|
-
viewId: view.id,
|
|
86
|
-
columnFilter,
|
|
87
|
-
extraFilter,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export function useMainGridCommandHandlerContext(): EntityMainGridCommandContext {
|
|
92
|
-
const dataService = useDataService();
|
|
93
|
-
const queryClient = useQueryClient();
|
|
94
|
-
const { appStore, experienceStore, schemaStore } = useMetadata();
|
|
95
|
-
|
|
96
|
-
const utility = useUtility();
|
|
97
|
-
const [locale] = useLocale();
|
|
98
|
-
|
|
99
|
-
const primaryControl = useGridControlContext();
|
|
100
|
-
|
|
101
|
-
return {
|
|
102
|
-
dataService,
|
|
103
|
-
queryClient,
|
|
104
|
-
utility,
|
|
105
|
-
primaryControl,
|
|
106
|
-
stores: {
|
|
107
|
-
appStore,
|
|
108
|
-
experienceStore,
|
|
109
|
-
schemaStore,
|
|
110
|
-
},
|
|
111
|
-
locale,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function useMainGridCommands(): CommandItemState[][] {
|
|
116
|
-
const commands = useGridCommands();
|
|
117
|
-
const handlerContext = useMainGridCommandHandlerContext();
|
|
118
|
-
|
|
119
|
-
// console.log('temp. gc', commands);
|
|
120
|
-
|
|
121
|
-
return useCommands<EntityMainGridCommandContext>(commands, handlerContext);
|
|
122
|
-
|
|
123
|
-
// return [
|
|
124
|
-
// [
|
|
125
|
-
// {
|
|
126
|
-
// type: 'button',
|
|
127
|
-
// icon: 'Add',
|
|
128
|
-
// text: 'Add',
|
|
129
|
-
// },
|
|
130
|
-
// {
|
|
131
|
-
// type: 'button',
|
|
132
|
-
// icon: 'Delete',
|
|
133
|
-
// text: 'Delete',
|
|
134
|
-
// danger: true,
|
|
135
|
-
// },
|
|
136
|
-
// {
|
|
137
|
-
// type: 'button',
|
|
138
|
-
// icon: 'Add',
|
|
139
|
-
// text: 'Add',
|
|
140
|
-
// },
|
|
141
|
-
// {
|
|
142
|
-
// type: 'button',
|
|
143
|
-
// icon: 'Add',
|
|
144
|
-
// text: 'Add',
|
|
145
|
-
// },
|
|
146
|
-
// ],
|
|
147
|
-
// [
|
|
148
|
-
// {
|
|
149
|
-
// type: 'button',
|
|
150
|
-
// icon: 'Add',
|
|
151
|
-
// text: 'Add',
|
|
152
|
-
// },
|
|
153
|
-
// {
|
|
154
|
-
// type: 'button',
|
|
155
|
-
// icon: 'Add',
|
|
156
|
-
// text: 'Add',
|
|
157
|
-
// },
|
|
158
|
-
// {
|
|
159
|
-
// type: 'button',
|
|
160
|
-
// icon: 'Add',
|
|
161
|
-
// text: 'Add',
|
|
162
|
-
// },
|
|
163
|
-
// {
|
|
164
|
-
// type: 'button',
|
|
165
|
-
// icon: 'Add',
|
|
166
|
-
// text: 'Add',
|
|
167
|
-
// },
|
|
168
|
-
// {
|
|
169
|
-
// type: 'button',
|
|
170
|
-
// icon: 'Add',
|
|
171
|
-
// text: 'Add',
|
|
172
|
-
// },
|
|
173
|
-
// {
|
|
174
|
-
// type: 'button',
|
|
175
|
-
// icon: 'Add',
|
|
176
|
-
// text: 'Add',
|
|
177
|
-
// },
|
|
178
|
-
// {
|
|
179
|
-
// type: 'menu',
|
|
180
|
-
// icon: 'Add',
|
|
181
|
-
// text: 'Report',
|
|
182
|
-
// danger: true,
|
|
183
|
-
// handlerId: 'report',
|
|
184
|
-
// items: [
|
|
185
|
-
// {
|
|
186
|
-
// icon: 'Add',
|
|
187
|
-
// text: 'Export',
|
|
188
|
-
// danger: true,
|
|
189
|
-
// },
|
|
190
|
-
// ],
|
|
191
|
-
// },
|
|
192
|
-
// {
|
|
193
|
-
// type: 'menu',
|
|
194
|
-
// icon: 'Add',
|
|
195
|
-
// text: 'Report',
|
|
196
|
-
// danger: true,
|
|
197
|
-
// items: [
|
|
198
|
-
// {
|
|
199
|
-
// icon: 'Add',
|
|
200
|
-
// text: 'Export',
|
|
201
|
-
// danger: true,
|
|
202
|
-
// },
|
|
203
|
-
// ],
|
|
204
|
-
// },
|
|
205
|
-
// ],
|
|
206
|
-
// [
|
|
207
|
-
// {
|
|
208
|
-
// type: 'button',
|
|
209
|
-
// icon: 'Add',
|
|
210
|
-
// text: 'Add',
|
|
211
|
-
// },
|
|
212
|
-
// {
|
|
213
|
-
// type: 'button',
|
|
214
|
-
// icon: 'Add',
|
|
215
|
-
// text: 'Add',
|
|
216
|
-
// },
|
|
217
|
-
// {
|
|
218
|
-
// type: 'button',
|
|
219
|
-
// icon: 'Add',
|
|
220
|
-
// text: 'Add',
|
|
221
|
-
// },
|
|
222
|
-
// {
|
|
223
|
-
// type: 'button',
|
|
224
|
-
// icon: 'Add',
|
|
225
|
-
// text: 'Add',
|
|
226
|
-
// },
|
|
227
|
-
// {
|
|
228
|
-
// type: 'button',
|
|
229
|
-
// icon: 'Add',
|
|
230
|
-
// text: 'Add',
|
|
231
|
-
// },
|
|
232
|
-
// {
|
|
233
|
-
// type: 'button',
|
|
234
|
-
// icon: 'Add',
|
|
235
|
-
// text: 'Add',
|
|
236
|
-
// },
|
|
237
|
-
// {
|
|
238
|
-
// type: 'button',
|
|
239
|
-
// icon: 'Add',
|
|
240
|
-
// text: 'Add',
|
|
241
|
-
// },
|
|
242
|
-
// ],
|
|
243
|
-
// ];
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export function useMainGridContextCommands(): MenuItemCommandState[][] {
|
|
247
|
-
const commands = useGridCommands();
|
|
248
|
-
const handlerContext = useMainGridCommandHandlerContext();
|
|
249
|
-
|
|
250
|
-
return useCommands<EntityMainGridCommandContext>(
|
|
251
|
-
commands,
|
|
252
|
-
handlerContext,
|
|
253
|
-
(command) => ('isContextMenu' in command && command.isContextMenu) ?? false
|
|
254
|
-
) as MenuItemCommandState[][];
|
|
255
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
import { useContextSelector, useContextSetValue } from '../../mutable/context';
|
|
4
|
-
import { GridContext } from '../context';
|
|
5
|
-
|
|
6
|
-
export function useSearchText() {
|
|
7
|
-
const searchText = useContextSelector(
|
|
8
|
-
GridContext,
|
|
9
|
-
(context) => context.searchText
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
const setValue = useContextSetValue(GridContext);
|
|
13
|
-
|
|
14
|
-
const setSearchText = useCallback(
|
|
15
|
-
(value: string) => {
|
|
16
|
-
setValue({ searchText: value });
|
|
17
|
-
},
|
|
18
|
-
[setValue]
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
return [searchText, setSearchText] as const;
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { View } from '@headless-adminapp/core/experience/view';
|
|
2
|
-
import { SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
3
|
-
|
|
4
|
-
import { useContextSelector } from '../../mutable/context';
|
|
5
|
-
import { GridContext } from '../context';
|
|
6
|
-
|
|
7
|
-
export function useSelectedView<
|
|
8
|
-
S extends SchemaAttributes = SchemaAttributes
|
|
9
|
-
>(): View<S> {
|
|
10
|
-
return useContextSelector(
|
|
11
|
-
GridContext,
|
|
12
|
-
(state) => state.view as unknown as View<S>
|
|
13
|
-
);
|
|
14
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { EntitySubGridCommandContext } from '@headless-adminapp/core/experience/view';
|
|
2
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
import { useCommands } from '../../command';
|
|
6
|
-
import { CommandItemState, MenuItemCommandState } from '../../command/types';
|
|
7
|
-
import { useMainFormCommandHandlerContext } from '../../dataform/hooks/useMainFormCommands';
|
|
8
|
-
import { useLocale } from '../../locale/useLocale';
|
|
9
|
-
import { useMetadata } from '../../metadata/hooks/useMetadata';
|
|
10
|
-
import { useDataService } from '../../transport';
|
|
11
|
-
import { useGridColumnFilter } from './useGridColumnFilter';
|
|
12
|
-
import { useGridCommands } from './useGridCommands';
|
|
13
|
-
import { useGridData } from './useGridData';
|
|
14
|
-
import { useGridExtraFilter } from './useGridExtraFilter';
|
|
15
|
-
import { useGridRefresh } from './useGridRefresh';
|
|
16
|
-
import { useDataGridSchema } from './useGridSchema';
|
|
17
|
-
import { useGridSelection } from './useGridSelection';
|
|
18
|
-
import { useUtility } from './useMainGridCommands';
|
|
19
|
-
import { useSearchText } from './useSearchText';
|
|
20
|
-
import { useSelectedView } from './useSelectedView';
|
|
21
|
-
|
|
22
|
-
export function useSubGridCommandHandlerContext(): EntitySubGridCommandContext {
|
|
23
|
-
const dataService = useDataService();
|
|
24
|
-
const queryClient = useQueryClient();
|
|
25
|
-
const { appStore, experienceStore, schemaStore } = useMetadata();
|
|
26
|
-
|
|
27
|
-
const data = useGridData();
|
|
28
|
-
const schema = useDataGridSchema();
|
|
29
|
-
const view = useSelectedView();
|
|
30
|
-
const [searchText] = useSearchText();
|
|
31
|
-
const [selectedIds] = useGridSelection();
|
|
32
|
-
|
|
33
|
-
const selectedIdsObj = useMemo(() => {
|
|
34
|
-
const obj: Record<string, boolean> = {};
|
|
35
|
-
selectedIds.forEach((id) => {
|
|
36
|
-
obj[id] = true;
|
|
37
|
-
});
|
|
38
|
-
return obj;
|
|
39
|
-
}, [selectedIds]);
|
|
40
|
-
|
|
41
|
-
const selectedRecords = useMemo(() => {
|
|
42
|
-
return (data?.records ?? []).filter(
|
|
43
|
-
(record) => selectedIdsObj[record[schema.idAttribute as string] as string]
|
|
44
|
-
);
|
|
45
|
-
}, [data, schema, selectedIdsObj]);
|
|
46
|
-
|
|
47
|
-
const [columnFilter] = useGridColumnFilter();
|
|
48
|
-
const extraFilter = useGridExtraFilter();
|
|
49
|
-
|
|
50
|
-
const refresh = useGridRefresh();
|
|
51
|
-
const utility = useUtility();
|
|
52
|
-
const [locale] = useLocale();
|
|
53
|
-
|
|
54
|
-
const mainFormHandlerContext = useMainFormCommandHandlerContext();
|
|
55
|
-
|
|
56
|
-
// console.log('mainFormHandlerContext', mainFormHandlerContext);
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
dataService,
|
|
60
|
-
queryClient,
|
|
61
|
-
utility,
|
|
62
|
-
primaryControl: mainFormHandlerContext.primaryControl,
|
|
63
|
-
secondaryControl: {
|
|
64
|
-
data,
|
|
65
|
-
logicalName: schema.logicalName,
|
|
66
|
-
schema,
|
|
67
|
-
refresh,
|
|
68
|
-
searchText,
|
|
69
|
-
selectedIds,
|
|
70
|
-
selectedRecords,
|
|
71
|
-
view,
|
|
72
|
-
viewId: view.id,
|
|
73
|
-
columnFilter,
|
|
74
|
-
extraFilter,
|
|
75
|
-
},
|
|
76
|
-
stores: {
|
|
77
|
-
appStore,
|
|
78
|
-
experienceStore,
|
|
79
|
-
schemaStore,
|
|
80
|
-
},
|
|
81
|
-
locale,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function useSubGridCommands(): CommandItemState[][] {
|
|
86
|
-
const commands = useGridCommands<EntitySubGridCommandContext>();
|
|
87
|
-
const handlerContext = useSubGridCommandHandlerContext();
|
|
88
|
-
|
|
89
|
-
console.log('temp. commands (s)', commands);
|
|
90
|
-
console.log('temp. handlerContext (s)', handlerContext);
|
|
91
|
-
|
|
92
|
-
return useCommands<EntitySubGridCommandContext>(commands, handlerContext);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export function useSubGridContextCommands(): MenuItemCommandState[][] {
|
|
96
|
-
const commands = useGridCommands<EntitySubGridCommandContext>();
|
|
97
|
-
const handlerContext = useSubGridCommandHandlerContext();
|
|
98
|
-
|
|
99
|
-
return useCommands<EntitySubGridCommandContext>(
|
|
100
|
-
commands,
|
|
101
|
-
handlerContext,
|
|
102
|
-
(command) => ('isContextMenu' in command && command.isContextMenu) ?? false
|
|
103
|
-
) as MenuItemCommandState[][];
|
|
104
|
-
}
|
package/src/datagrid/index.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
GridContext,
|
|
3
|
-
type GridContextState,
|
|
4
|
-
type TransformedViewColumn,
|
|
5
|
-
} from './context';
|
|
6
|
-
export * from './hooks';
|
|
7
|
-
export {
|
|
8
|
-
type OperatorStrings,
|
|
9
|
-
type OperatorOption,
|
|
10
|
-
defaultOperatorStrings,
|
|
11
|
-
getLocalizedOperatorOptions,
|
|
12
|
-
} from './column-filter';
|
|
13
|
-
export { DataGridProvider } from './DataGridProvider';
|
|
14
|
-
export { transformViewColumns } from './DataGridProvider/transformViewColumns';
|