@headless-adminapp/app 0.0.8-0.0.9-alpha.1.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/LICENSE +21 -0
- package/dist/app/context.d.ts +8 -0
- package/dist/app/context.js +5 -0
- package/dist/app/hooks/index.d.ts +1 -0
- package/dist/app/hooks/index.js +17 -0
- package/dist/app/hooks/useAppContext.d.ts +2 -0
- package/dist/app/hooks/useAppContext.js +12 -0
- package/dist/app/index.d.ts +2 -0
- package/dist/app/index.js +7 -0
- package/dist/appearance/context.d.ts +7 -0
- package/dist/appearance/context.js +5 -0
- package/dist/appearance/hooks/index.d.ts +1 -0
- package/dist/appearance/hooks/index.js +17 -0
- package/dist/appearance/hooks/useAppearanceContext.d.ts +1 -0
- package/dist/appearance/hooks/useAppearanceContext.js +12 -0
- package/dist/appearance/index.d.ts +2 -0
- package/dist/appearance/index.js +20 -0
- package/dist/auth/AuthProvider.d.ts +7 -0
- package/dist/auth/AuthProvider.js +104 -0
- package/dist/auth/context.d.ts +30 -0
- package/dist/auth/context.js +5 -0
- package/dist/auth/hooks/index.d.ts +2 -0
- package/dist/auth/hooks/index.js +18 -0
- package/dist/auth/hooks/useAuthSession.d.ts +2 -0
- package/dist/auth/hooks/useAuthSession.js +16 -0
- package/dist/auth/hooks/useLogout.d.ts +1 -0
- package/dist/auth/hooks/useLogout.js +19 -0
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/index.js +23 -0
- package/dist/auth/types.d.ts +10 -0
- package/dist/auth/types.js +2 -0
- package/dist/builders/CommandBuilder.d.ts +176 -0
- package/dist/builders/CommandBuilder.js +474 -0
- package/dist/builders/SchemaExperienceBuilder.d.ts +69 -0
- package/dist/builders/SchemaExperienceBuilder.js +267 -0
- package/dist/builders/index.d.ts +2 -0
- package/dist/builders/index.js +7 -0
- package/dist/command/hooks/index.d.ts +2 -0
- package/dist/command/hooks/index.js +18 -0
- package/dist/command/hooks/useBaseCommandHandlerContext.d.ts +4 -0
- package/dist/command/hooks/useBaseCommandHandlerContext.js +42 -0
- package/dist/command/hooks/useCommands.d.ts +7 -0
- package/dist/command/hooks/useCommands.js +16 -0
- package/dist/command/index.d.ts +2 -0
- package/dist/command/index.js +18 -0
- package/dist/command/types.d.ts +76 -0
- package/dist/command/types.js +2 -0
- package/dist/command/utils/index.d.ts +3 -0
- package/dist/command/utils/index.js +63 -0
- package/dist/components/ScrollView/index.d.ts +10 -0
- package/dist/components/ScrollView/index.js +11 -0
- package/dist/dataform/DataFormProvider/DataResolver.d.ts +5 -0
- package/dist/dataform/DataFormProvider/DataResolver.js +143 -0
- package/dist/dataform/DataFormProvider/InitialValueResolver.d.ts +1 -0
- package/dist/dataform/DataFormProvider/InitialValueResolver.js +44 -0
- package/dist/dataform/DataFormProvider/ReadonlyInfoResolver.d.ts +3 -0
- package/dist/dataform/DataFormProvider/ReadonlyInfoResolver.js +27 -0
- package/dist/dataform/DataFormProvider/index.d.ts +10 -0
- package/dist/dataform/DataFormProvider/index.js +72 -0
- package/dist/dataform/context.d.ts +22 -0
- package/dist/dataform/context.js +5 -0
- package/dist/dataform/hooks/index.d.ts +11 -0
- package/dist/dataform/hooks/index.js +27 -0
- package/dist/dataform/hooks/useFormInstance.d.ts +1 -0
- package/dist/dataform/hooks/useFormInstance.js +8 -0
- package/dist/dataform/hooks/useFormIsDirty.d.ts +1 -0
- package/dist/dataform/hooks/useFormIsDirty.js +8 -0
- package/dist/dataform/hooks/useFormIsReadonly.d.ts +1 -0
- package/dist/dataform/hooks/useFormIsReadonly.js +9 -0
- package/dist/dataform/hooks/useFormNotifications.d.ts +4 -0
- package/dist/dataform/hooks/useFormNotifications.js +34 -0
- package/dist/dataform/hooks/useFormRecord.d.ts +1 -0
- package/dist/dataform/hooks/useFormRecord.js +9 -0
- package/dist/dataform/hooks/useFormSave.d.ts +2 -0
- package/dist/dataform/hooks/useFormSave.js +135 -0
- package/dist/dataform/hooks/useFormSchema.d.ts +2 -0
- package/dist/dataform/hooks/useFormSchema.js +8 -0
- package/dist/dataform/hooks/useLoadFormGridPage.d.ts +18 -0
- package/dist/dataform/hooks/useLoadFormGridPage.js +73 -0
- package/dist/dataform/hooks/useMainFormCommands.d.ts +16 -0
- package/dist/dataform/hooks/useMainFormCommands.js +47 -0
- package/dist/dataform/hooks/useRecordId.d.ts +1 -0
- package/dist/dataform/hooks/useRecordId.js +8 -0
- package/dist/dataform/hooks/useRecordTitle.d.ts +1 -0
- package/dist/dataform/hooks/useRecordTitle.js +20 -0
- package/dist/dataform/hooks/useSelectedForm.d.ts +3 -0
- package/dist/dataform/hooks/useSelectedForm.js +8 -0
- package/dist/dataform/utils/index.d.ts +62 -0
- package/dist/dataform/utils/index.js +356 -0
- package/dist/datagrid/DataGridProvider/DataResolver.d.ts +2 -0
- package/dist/datagrid/DataGridProvider/DataResolver.js +208 -0
- package/dist/datagrid/DataGridProvider/index.d.ts +18 -0
- package/dist/datagrid/DataGridProvider/index.js +77 -0
- package/dist/datagrid/DataGridProvider/transformViewColumns.d.ts +5 -0
- package/dist/datagrid/DataGridProvider/transformViewColumns.js +29 -0
- package/dist/datagrid/DataGridProvider/utils.d.ts +3 -0
- package/dist/datagrid/DataGridProvider/utils.js +74 -0
- package/dist/datagrid/column-filter/constants.d.ts +4 -0
- package/dist/datagrid/column-filter/constants.js +482 -0
- package/dist/datagrid/column-filter/index.d.ts +3 -0
- package/dist/datagrid/column-filter/index.js +7 -0
- package/dist/datagrid/column-filter/types.d.ts +65 -0
- package/dist/datagrid/column-filter/types.js +2 -0
- package/dist/datagrid/column-filter/utils.d.ts +3 -0
- package/dist/datagrid/column-filter/utils.js +8 -0
- package/dist/datagrid/context.d.ts +33 -0
- package/dist/datagrid/context.js +5 -0
- package/dist/datagrid/hooks/index.d.ts +19 -0
- package/dist/datagrid/hooks/index.js +35 -0
- package/dist/datagrid/hooks/useChangeView.d.ts +1 -0
- package/dist/datagrid/hooks/useChangeView.js +12 -0
- package/dist/datagrid/hooks/useGridColumnFilter.d.ts +2 -0
- package/dist/datagrid/hooks/useGridColumnFilter.js +16 -0
- package/dist/datagrid/hooks/useGridColumns.d.ts +3 -0
- package/dist/datagrid/hooks/useGridColumns.js +8 -0
- package/dist/datagrid/hooks/useGridCommands.d.ts +3 -0
- package/dist/datagrid/hooks/useGridCommands.js +9 -0
- package/dist/datagrid/hooks/useGridData.d.ts +1 -0
- package/dist/datagrid/hooks/useGridData.js +9 -0
- package/dist/datagrid/hooks/useGridDataState.d.ts +5 -0
- package/dist/datagrid/hooks/useGridDataState.js +9 -0
- package/dist/datagrid/hooks/useGridExtraFilter.d.ts +1 -0
- package/dist/datagrid/hooks/useGridExtraFilter.js +8 -0
- package/dist/datagrid/hooks/useGridOptions.d.ts +1 -0
- package/dist/datagrid/hooks/useGridOptions.js +6 -0
- package/dist/datagrid/hooks/useGridPagination.d.ts +1 -0
- package/dist/datagrid/hooks/useGridPagination.js +6 -0
- package/dist/datagrid/hooks/useGridRefresh.d.ts +1 -0
- package/dist/datagrid/hooks/useGridRefresh.js +18 -0
- package/dist/datagrid/hooks/useGridSchema.d.ts +2 -0
- package/dist/datagrid/hooks/useGridSchema.js +8 -0
- package/dist/datagrid/hooks/useGridSelection.d.ts +1 -0
- package/dist/datagrid/hooks/useGridSelection.js +21 -0
- package/dist/datagrid/hooks/useGridSorting.d.ts +3 -0
- package/dist/datagrid/hooks/useGridSorting.js +14 -0
- package/dist/datagrid/hooks/useGridViewLookupData.d.ts +1 -0
- package/dist/datagrid/hooks/useGridViewLookupData.js +9 -0
- package/dist/datagrid/hooks/useLoadMainGridPage.d.ts +20 -0
- package/dist/datagrid/hooks/useLoadMainGridPage.js +55 -0
- package/dist/datagrid/hooks/useMainGridCommands.d.ts +19 -0
- package/dist/datagrid/hooks/useMainGridCommands.js +228 -0
- package/dist/datagrid/hooks/useMaxRecords.d.ts +1 -0
- package/dist/datagrid/hooks/useMaxRecords.js +8 -0
- package/dist/datagrid/hooks/useSearchText.d.ts +1 -0
- package/dist/datagrid/hooks/useSearchText.js +14 -0
- package/dist/datagrid/hooks/useSelectedView.d.ts +3 -0
- package/dist/datagrid/hooks/useSelectedView.js +8 -0
- package/dist/datagrid/hooks/useSubGridCommands.d.ts +5 -0
- package/dist/datagrid/hooks/useSubGridCommands.js +87 -0
- package/dist/dialog/DialogProvider.d.ts +5 -0
- package/dist/dialog/DialogProvider.js +13 -0
- package/dist/dialog/context.d.ts +6 -0
- package/dist/dialog/context.js +5 -0
- package/dist/dialog/hooks/index.d.ts +8 -0
- package/dist/dialog/hooks/index.js +24 -0
- package/dist/dialog/hooks/useCloseDialog.d.ts +1 -0
- package/dist/dialog/hooks/useCloseDialog.js +30 -0
- package/dist/dialog/hooks/useDialogItem.d.ts +1 -0
- package/dist/dialog/hooks/useDialogItem.js +8 -0
- package/dist/dialog/hooks/useDialogItems.d.ts +1 -0
- package/dist/dialog/hooks/useDialogItems.js +8 -0
- package/dist/dialog/hooks/useOpenAlertDialog.d.ts +2 -0
- package/dist/dialog/hooks/useOpenAlertDialog.js +20 -0
- package/dist/dialog/hooks/useOpenConfirmDialog.d.ts +2 -0
- package/dist/dialog/hooks/useOpenConfirmDialog.js +26 -0
- package/dist/dialog/hooks/useOpenDialog.d.ts +5 -0
- package/dist/dialog/hooks/useOpenDialog.js +27 -0
- package/dist/dialog/hooks/useOpenErrorDialog.d.ts +2 -0
- package/dist/dialog/hooks/useOpenErrorDialog.js +16 -0
- package/dist/dialog/hooks/useOpenPromptDialog.d.ts +3 -0
- package/dist/dialog/hooks/useOpenPromptDialog.js +26 -0
- package/dist/dialog/index.d.ts +3 -0
- package/dist/dialog/index.js +22 -0
- package/dist/form/FormValidationStringContext.d.ts +12 -0
- package/dist/form/FormValidationStringContext.js +19 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.js +21 -0
- package/dist/hooks/useDebouncedValue.d.ts +3 -0
- package/dist/hooks/useDebouncedValue.js +32 -0
- package/dist/hooks/useElementLayout.d.ts +7 -0
- package/dist/hooks/useElementLayout.js +34 -0
- package/dist/hooks/useIsMobile.d.ts +1 -0
- package/dist/hooks/useIsMobile.js +21 -0
- package/dist/hooks/useStorageState.d.ts +2 -0
- package/dist/hooks/useStorageState.js +26 -0
- package/dist/hooks/useSystemColorScheme.d.ts +1 -0
- package/dist/hooks/useSystemColorScheme.js +27 -0
- package/dist/insights/context.d.ts +2 -0
- package/dist/insights/context.js +5 -0
- package/dist/locale/context.d.ts +2 -0
- package/dist/locale/context.js +5 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/index.js +21 -0
- package/dist/locale/types.d.ts +2 -0
- package/dist/locale/types.js +2 -0
- package/dist/locale/useLocale.d.ts +1 -0
- package/dist/locale/useLocale.js +12 -0
- package/dist/metadata/MetadataProvider.d.ts +9 -0
- package/dist/metadata/MetadataProvider.js +29 -0
- package/dist/metadata/context.d.ts +7 -0
- package/dist/metadata/context.js +5 -0
- package/dist/metadata/hooks/index.d.ts +8 -0
- package/dist/metadata/hooks/index.js +24 -0
- package/dist/metadata/hooks/useAppStore.d.ts +1 -0
- package/dist/metadata/hooks/useAppStore.js +8 -0
- package/dist/metadata/hooks/useExperienceStore.d.ts +1 -0
- package/dist/metadata/hooks/useExperienceStore.js +8 -0
- package/dist/metadata/hooks/useExperienceView.d.ts +4 -0
- package/dist/metadata/hooks/useExperienceView.js +37 -0
- package/dist/metadata/hooks/useExperienceViewCommands.d.ts +4 -0
- package/dist/metadata/hooks/useExperienceViewCommands.js +28 -0
- package/dist/metadata/hooks/useExperienceViewLookup.d.ts +4 -0
- package/dist/metadata/hooks/useExperienceViewLookup.js +36 -0
- package/dist/metadata/hooks/useExperienceViewSubgridCommands.d.ts +4 -0
- package/dist/metadata/hooks/useExperienceViewSubgridCommands.js +28 -0
- package/dist/metadata/hooks/useMetadata.d.ts +9 -0
- package/dist/metadata/hooks/useMetadata.js +28 -0
- package/dist/metadata/hooks/useSchema.d.ts +2 -0
- package/dist/metadata/hooks/useSchema.js +8 -0
- package/dist/metadata/index.d.ts +3 -0
- package/dist/metadata/index.js +22 -0
- package/dist/mutable/context.d.ts +11 -0
- package/dist/mutable/context.js +46 -0
- package/dist/mutable/index.d.ts +3 -0
- package/dist/mutable/index.js +26 -0
- package/dist/mutable/state.d.ts +6 -0
- package/dist/mutable/state.js +12 -0
- package/dist/mutable/type.d.ts +11 -0
- package/dist/mutable/type.js +2 -0
- package/dist/mutable/utils.d.ts +3 -0
- package/dist/mutable/utils.js +62 -0
- package/dist/navigation/hooks/useOpenForm.d.ts +4 -0
- package/dist/navigation/hooks/useOpenForm.js +20 -0
- package/dist/progress-indicator/ProgressIndicatorProvider.d.ts +2 -0
- package/dist/progress-indicator/ProgressIndicatorProvider.js +54 -0
- package/dist/progress-indicator/context.d.ts +8 -0
- package/dist/progress-indicator/context.js +5 -0
- package/dist/progress-indicator/hooks/index.d.ts +1 -0
- package/dist/progress-indicator/hooks/index.js +17 -0
- package/dist/progress-indicator/hooks/useProgressIndicator.d.ts +1 -0
- package/dist/progress-indicator/hooks/useProgressIndicator.js +12 -0
- package/dist/progress-indicator/index.d.ts +3 -0
- package/dist/progress-indicator/index.js +22 -0
- package/dist/providers/PageEntityFormProvider/index.d.ts +11 -0
- package/dist/providers/PageEntityFormProvider/index.js +8 -0
- package/dist/providers/PageEntityViewProvider/index.d.ts +13 -0
- package/dist/providers/PageEntityViewProvider/index.js +8 -0
- package/dist/recordset/RecordSetProvider.d.ts +2 -0
- package/dist/recordset/RecordSetProvider.js +40 -0
- package/dist/recordset/context.d.ts +8 -0
- package/dist/recordset/context.js +5 -0
- package/dist/recordset/hooks/index.d.ts +3 -0
- package/dist/recordset/hooks/index.js +19 -0
- package/dist/recordset/hooks/useRecordSetResult.d.ts +7 -0
- package/dist/recordset/hooks/useRecordSetResult.js +81 -0
- package/dist/recordset/hooks/useRecordSetSetter.d.ts +1 -0
- package/dist/recordset/hooks/useRecordSetSetter.js +17 -0
- package/dist/recordset/hooks/useRecordSetVisibility.d.ts +1 -0
- package/dist/recordset/hooks/useRecordSetVisibility.js +16 -0
- package/dist/recordset/index.d.ts +3 -0
- package/dist/recordset/index.js +22 -0
- package/dist/route/RouteProvider.d.ts +13 -0
- package/dist/route/RouteProvider.js +24 -0
- package/dist/route/context.d.ts +23 -0
- package/dist/route/context.js +9 -0
- package/dist/route/hooks/index.d.ts +4 -0
- package/dist/route/hooks/index.js +20 -0
- package/dist/route/hooks/useBasePath.d.ts +1 -0
- package/dist/route/hooks/useBasePath.js +8 -0
- package/dist/route/hooks/usePathname.d.ts +1 -0
- package/dist/route/hooks/usePathname.js +8 -0
- package/dist/route/hooks/useRouteResolver.d.ts +1 -0
- package/dist/route/hooks/useRouteResolver.js +8 -0
- package/dist/route/hooks/useRouter.d.ts +1 -0
- package/dist/route/hooks/useRouter.js +8 -0
- package/dist/route/hooks/useSearchParams.d.ts +1 -0
- package/dist/route/hooks/useSearchParams.js +8 -0
- package/dist/route/index.d.ts +2 -0
- package/dist/route/index.js +20 -0
- package/dist/route/types.d.ts +2 -0
- package/dist/route/types.js +2 -0
- package/dist/store/ClientAppStore.d.ts +7 -0
- package/dist/store/ClientAppStore.js +30 -0
- package/dist/store/ComponentStore.d.ts +6 -0
- package/dist/store/ComponentStore.js +23 -0
- package/dist/store/EventManager.d.ts +7 -0
- package/dist/store/EventManager.js +42 -0
- package/dist/store/SchemaExperienceStore.d.ts +32 -0
- package/dist/store/SchemaExperienceStore.js +264 -0
- package/dist/store/index.d.ts +4 -0
- package/dist/store/index.js +20 -0
- package/dist/toast-notification/ToastNotificationProvider.d.ts +5 -0
- package/dist/toast-notification/ToastNotificationProvider.js +13 -0
- package/dist/toast-notification/context.d.ts +15 -0
- package/dist/toast-notification/context.js +5 -0
- package/dist/toast-notification/hooks/index.d.ts +3 -0
- package/dist/toast-notification/hooks/index.js +19 -0
- package/dist/toast-notification/hooks/useCloseToastNotification.d.ts +1 -0
- package/dist/toast-notification/hooks/useCloseToastNotification.js +30 -0
- package/dist/toast-notification/hooks/useOpenToastNotification.d.ts +5 -0
- package/dist/toast-notification/hooks/useOpenToastNotification.js +27 -0
- package/dist/toast-notification/hooks/useToastNotificationItems.d.ts +1 -0
- package/dist/toast-notification/hooks/useToastNotificationItems.js +8 -0
- package/dist/toast-notification/index.d.ts +3 -0
- package/dist/toast-notification/index.js +22 -0
- package/dist/transport/InMemoryDataService/index.d.ts +25 -0
- package/dist/transport/InMemoryDataService/index.js +112 -0
- package/dist/transport/RestDataService/index.d.ts +25 -0
- package/dist/transport/RestDataService/index.js +124 -0
- package/dist/transport/context.d.ts +2 -0
- package/dist/transport/context.js +5 -0
- package/dist/transport/hooks/index.d.ts +1 -0
- package/dist/transport/hooks/index.js +17 -0
- package/dist/transport/hooks/useDataService.d.ts +1 -0
- package/dist/transport/hooks/useDataService.js +12 -0
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +20 -0
- package/dist/utils/calculateColumnWidths.d.ts +14 -0
- package/dist/utils/calculateColumnWidths.js +46 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +17 -0
- package/dist/widget/context.d.ts +2 -0
- package/dist/widget/context.js +5 -0
- package/dist/widget/hooks/index.d.ts +3 -0
- package/dist/widget/hooks/index.js +8 -0
- package/dist/widget/index.d.ts +1 -0
- package/dist/widget/index.js +5 -0
- package/package.json +45 -0
- package/src/app/context.ts +11 -0
- package/src/app/hooks/index.ts +1 -0
- package/src/app/hooks/useAppContext.ts +13 -0
- package/src/app/index.ts +2 -0
- package/src/appearance/context.ts +13 -0
- package/src/appearance/hooks/index.ts +1 -0
- package/src/appearance/hooks/useAppearanceContext.ts +13 -0
- package/src/appearance/index.ts +6 -0
- package/src/auth/AuthProvider.tsx +118 -0
- package/src/auth/context.ts +41 -0
- package/src/auth/hooks/index.ts +2 -0
- package/src/auth/hooks/useAuthSession.ts +17 -0
- package/src/auth/hooks/useLogout.ts +23 -0
- package/src/auth/index.ts +4 -0
- package/src/auth/types.ts +17 -0
- package/src/builders/CommandBuilder.ts +777 -0
- package/src/builders/SchemaExperienceBuilder.ts +488 -0
- package/src/builders/index.ts +2 -0
- package/src/command/hooks/index.ts +2 -0
- package/src/command/hooks/useBaseCommandHandlerContext.ts +51 -0
- package/src/command/hooks/useCommands.ts +26 -0
- package/src/command/index.ts +2 -0
- package/src/command/types.ts +116 -0
- package/src/command/utils/index.ts +142 -0
- package/src/components/ScrollView/index.tsx +26 -0
- package/src/dataform/DataFormProvider/DataResolver.tsx +186 -0
- package/src/dataform/DataFormProvider/InitialValueResolver.tsx +55 -0
- package/src/dataform/DataFormProvider/ReadonlyInfoResolver.tsx +35 -0
- package/src/dataform/DataFormProvider/index.tsx +102 -0
- package/src/dataform/context.ts +53 -0
- package/src/dataform/hooks/index.ts +11 -0
- package/src/dataform/hooks/useFormInstance.ts +6 -0
- package/src/dataform/hooks/useFormIsDirty.ts +7 -0
- package/src/dataform/hooks/useFormIsReadonly.ts +11 -0
- package/src/dataform/hooks/useFormNotifications.ts +46 -0
- package/src/dataform/hooks/useFormRecord.ts +7 -0
- package/src/dataform/hooks/useFormSave.ts +147 -0
- package/src/dataform/hooks/useFormSchema.ts +13 -0
- package/src/dataform/hooks/useLoadFormGridPage.ts +97 -0
- package/src/dataform/hooks/useMainFormCommands.ts +65 -0
- package/src/dataform/hooks/useRecordId.ts +6 -0
- package/src/dataform/hooks/useRecordTitle.ts +22 -0
- package/src/dataform/hooks/useSelectedForm.ts +14 -0
- package/src/dataform/utils/index.ts +582 -0
- package/src/datagrid/DataGridProvider/DataResolver.tsx +281 -0
- package/src/datagrid/DataGridProvider/index.tsx +134 -0
- package/src/datagrid/DataGridProvider/transformViewColumns.ts +54 -0
- package/src/datagrid/DataGridProvider/utils.ts +89 -0
- package/src/datagrid/column-filter/constants.ts +493 -0
- package/src/datagrid/column-filter/index.ts +3 -0
- package/src/datagrid/column-filter/types.ts +68 -0
- package/src/datagrid/column-filter/utils.ts +19 -0
- package/src/datagrid/context.ts +66 -0
- package/src/datagrid/hooks/index.ts +19 -0
- package/src/datagrid/hooks/useChangeView.ts +18 -0
- package/src/datagrid/hooks/useGridColumnFilter.ts +28 -0
- package/src/datagrid/hooks/useGridColumns.ts +13 -0
- package/src/datagrid/hooks/useGridCommands.ts +21 -0
- package/src/datagrid/hooks/useGridData.ts +8 -0
- package/src/datagrid/hooks/useGridDataState.ts +8 -0
- package/src/datagrid/hooks/useGridExtraFilter.ts +6 -0
- package/src/datagrid/hooks/useGridOptions.ts +3 -0
- package/src/datagrid/hooks/useGridPagination.ts +3 -0
- package/src/datagrid/hooks/useGridRefresh.ts +19 -0
- package/src/datagrid/hooks/useGridSchema.ts +13 -0
- package/src/datagrid/hooks/useGridSelection.ts +28 -0
- package/src/datagrid/hooks/useGridSorting.ts +23 -0
- package/src/datagrid/hooks/useGridViewLookupData.ts +10 -0
- package/src/datagrid/hooks/useLoadMainGridPage.ts +90 -0
- package/src/datagrid/hooks/useMainGridCommands.ts +255 -0
- package/src/datagrid/hooks/useMaxRecords.ts +6 -0
- package/src/datagrid/hooks/useSearchText.ts +22 -0
- package/src/datagrid/hooks/useSelectedView.ts +14 -0
- package/src/datagrid/hooks/useSubGridCommands.ts +104 -0
- package/src/dialog/DialogProvider.tsx +20 -0
- package/src/dialog/context.ts +14 -0
- package/src/dialog/hooks/index.ts +8 -0
- package/src/dialog/hooks/useCloseDialog.ts +36 -0
- package/src/dialog/hooks/useDialogItem.ts +8 -0
- package/src/dialog/hooks/useDialogItems.ts +6 -0
- package/src/dialog/hooks/useOpenAlertDialog.ts +30 -0
- package/src/dialog/hooks/useOpenConfirmDialog.ts +45 -0
- package/src/dialog/hooks/useOpenDialog.ts +39 -0
- package/src/dialog/hooks/useOpenErrorDialog.ts +26 -0
- package/src/dialog/hooks/useOpenPromptDialog.ts +46 -0
- package/src/dialog/index.ts +7 -0
- package/src/form/FormValidationStringContext.ts +30 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useDebouncedValue.ts +38 -0
- package/src/hooks/useElementLayout.ts +49 -0
- package/src/hooks/useIsMobile.ts +21 -0
- package/src/hooks/useStorageState.ts +36 -0
- package/src/hooks/useSystemColorScheme.ts +38 -0
- package/src/index.css +4 -0
- package/src/insights/context.ts +5 -0
- package/src/locale/context.ts +7 -0
- package/src/locale/index.ts +3 -0
- package/src/locale/types.ts +3 -0
- package/src/locale/useLocale.ts +13 -0
- package/src/metadata/MetadataProvider.tsx +51 -0
- package/src/metadata/context.ts +15 -0
- package/src/metadata/hooks/index.ts +8 -0
- package/src/metadata/hooks/useAppStore.ts +6 -0
- package/src/metadata/hooks/useExperienceStore.ts +6 -0
- package/src/metadata/hooks/useExperienceView.ts +36 -0
- package/src/metadata/hooks/useExperienceViewCommands.ts +20 -0
- package/src/metadata/hooks/useExperienceViewLookup.ts +33 -0
- package/src/metadata/hooks/useExperienceViewSubgridCommands.ts +20 -0
- package/src/metadata/hooks/useMetadata.ts +44 -0
- package/src/metadata/hooks/useSchema.ts +11 -0
- package/src/metadata/index.ts +3 -0
- package/src/mutable/context.ts +71 -0
- package/src/mutable/index.ts +9 -0
- package/src/mutable/state.ts +13 -0
- package/src/mutable/type.ts +9 -0
- package/src/mutable/utils.ts +80 -0
- package/src/navigation/hooks/useOpenForm.ts +34 -0
- package/src/progress-indicator/ProgressIndicatorProvider.tsx +77 -0
- package/src/progress-indicator/context.ts +12 -0
- package/src/progress-indicator/hooks/index.ts +1 -0
- package/src/progress-indicator/hooks/useProgressIndicator.ts +15 -0
- package/src/progress-indicator/index.ts +6 -0
- package/src/providers/PageEntityFormProvider/index.tsx +34 -0
- package/src/providers/PageEntityViewProvider/index.tsx +39 -0
- package/src/recordset/RecordSetProvider.tsx +55 -0
- package/src/recordset/context.ts +12 -0
- package/src/recordset/hooks/index.ts +3 -0
- package/src/recordset/hooks/useRecordSetResult.ts +94 -0
- package/src/recordset/hooks/useRecordSetSetter.ts +21 -0
- package/src/recordset/hooks/useRecordSetVisibility.ts +24 -0
- package/src/recordset/index.ts +3 -0
- package/src/route/RouteProvider.tsx +76 -0
- package/src/route/context.ts +39 -0
- package/src/route/hooks/index.ts +4 -0
- package/src/route/hooks/useBasePath.ts +7 -0
- package/src/route/hooks/usePathname.ts +7 -0
- package/src/route/hooks/useRouteResolver.ts +7 -0
- package/src/route/hooks/useRouter.ts +7 -0
- package/src/route/hooks/useSearchParams.ts +7 -0
- package/src/route/index.ts +2 -0
- package/src/route/types.ts +1 -0
- package/src/store/ClientAppStore.ts +20 -0
- package/src/store/ComponentStore.tsx +22 -0
- package/src/store/EventManager.ts +33 -0
- package/src/store/SchemaExperienceStore.ts +374 -0
- package/src/store/index.ts +4 -0
- package/src/toast-notification/ToastNotificationProvider.tsx +23 -0
- package/src/toast-notification/context.ts +17 -0
- package/src/toast-notification/hooks/index.ts +3 -0
- package/src/toast-notification/hooks/useCloseToastNotification.ts +36 -0
- package/src/toast-notification/hooks/useOpenToastNotification.ts +38 -0
- package/src/toast-notification/hooks/useToastNotificationItems.ts +6 -0
- package/src/toast-notification/index.ts +7 -0
- package/src/transport/InMemoryDataService/index.ts +157 -0
- package/src/transport/RestDataService/index.ts +151 -0
- package/src/transport/context.ts +6 -0
- package/src/transport/hooks/index.ts +1 -0
- package/src/transport/hooks/useDataService.ts +13 -0
- package/src/transport/index.ts +2 -0
- package/src/utils/calculateColumnWidths.ts +72 -0
- package/src/utils/index.ts +1 -0
- package/src/widget/context.ts +5 -0
- package/src/widget/hooks/index.ts +11 -0
- package/src/widget/index.ts +1 -0
- package/tsconfig.json +9 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.operatorOptions = exports.defaultOperatorStrings = void 0;
|
|
4
|
+
exports.defaultOperatorStrings = {
|
|
5
|
+
equals: 'Equals',
|
|
6
|
+
doesNotEqual: 'Does not equal',
|
|
7
|
+
contains: 'Contains',
|
|
8
|
+
doesNotContain: 'Does not contain',
|
|
9
|
+
beginsWith: 'Begins with',
|
|
10
|
+
doesNotBeginWith: 'Does not begin with',
|
|
11
|
+
endsWith: 'Ends with',
|
|
12
|
+
doesNotEndWith: 'Does not end with',
|
|
13
|
+
containsData: 'Contains data',
|
|
14
|
+
doesNotContainData: 'Does not contain data',
|
|
15
|
+
greaterThan: 'Greater than',
|
|
16
|
+
greaterThanOrEquals: 'Greater than or equals',
|
|
17
|
+
lessThan: 'Less than',
|
|
18
|
+
lessThanOrEquals: 'Less than or equals',
|
|
19
|
+
between: 'Between',
|
|
20
|
+
on: 'On',
|
|
21
|
+
onOrAfter: 'On or after',
|
|
22
|
+
onOrBefore: 'On or before',
|
|
23
|
+
today: 'Today',
|
|
24
|
+
yesterday: 'Yesterday',
|
|
25
|
+
tomorrow: 'Tomorrow',
|
|
26
|
+
thisWeek: 'This week',
|
|
27
|
+
thisMonth: 'This month',
|
|
28
|
+
thisYear: 'This year',
|
|
29
|
+
thisFiscalYear: 'This fiscal year',
|
|
30
|
+
nextWeek: 'Next week',
|
|
31
|
+
nextSevenDays: 'Next 7 days',
|
|
32
|
+
nextMonth: 'Next month',
|
|
33
|
+
nextYear: 'Next year',
|
|
34
|
+
nextFiscalYear: 'Next fiscal year',
|
|
35
|
+
nextXHours: 'Next X hours',
|
|
36
|
+
nextXDays: 'Next X days',
|
|
37
|
+
nextXWeeks: 'Next X weeks',
|
|
38
|
+
nextXMonths: 'Next X months',
|
|
39
|
+
nextXYears: 'Next X years',
|
|
40
|
+
lastWeek: 'Last week',
|
|
41
|
+
lastSevenDays: 'Last 7 days',
|
|
42
|
+
lastMonth: 'Last month',
|
|
43
|
+
lastYear: 'Last year',
|
|
44
|
+
lastFiscalYear: 'Last fiscal year',
|
|
45
|
+
lastXHours: 'Last X hours',
|
|
46
|
+
lastXDays: 'Last X days',
|
|
47
|
+
lastXWeeks: 'Last X weeks',
|
|
48
|
+
lastXMonths: 'Last X months',
|
|
49
|
+
lastXYears: 'Last X years',
|
|
50
|
+
olderthanXHours: 'Older than X hours',
|
|
51
|
+
olderthanXDays: 'Older than X days',
|
|
52
|
+
olderthanXWeeks: 'Older than X weeks',
|
|
53
|
+
olderthanXMonths: 'Older than X months',
|
|
54
|
+
olderthanXYears: 'Older than X years',
|
|
55
|
+
inFiscalYear: 'In fiscal year',
|
|
56
|
+
};
|
|
57
|
+
const stringOperatorOptions = [
|
|
58
|
+
{
|
|
59
|
+
value: 'eq',
|
|
60
|
+
labelKey: 'equals',
|
|
61
|
+
controls: ['string'],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: 'ne',
|
|
65
|
+
labelKey: 'doesNotEqual',
|
|
66
|
+
controls: ['string'],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: 'like',
|
|
70
|
+
labelKey: 'contains',
|
|
71
|
+
controls: ['string'],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: 'not-like',
|
|
75
|
+
labelKey: 'doesNotContain',
|
|
76
|
+
controls: ['string'],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
value: 'begins-with',
|
|
80
|
+
labelKey: 'beginsWith',
|
|
81
|
+
controls: ['string'],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
value: 'not-begin-with',
|
|
85
|
+
labelKey: 'doesNotBeginWith',
|
|
86
|
+
controls: ['string'],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
value: 'ends-with',
|
|
90
|
+
labelKey: 'endsWith',
|
|
91
|
+
controls: ['string'],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
value: 'not-end-with',
|
|
95
|
+
labelKey: 'doesNotEndWith',
|
|
96
|
+
controls: ['string'],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
value: 'not-null',
|
|
100
|
+
labelKey: 'containsData',
|
|
101
|
+
controls: [],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
value: 'null',
|
|
105
|
+
labelKey: 'doesNotContainData',
|
|
106
|
+
controls: [],
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
const numberOperatorOptions = [
|
|
110
|
+
{
|
|
111
|
+
value: 'eq',
|
|
112
|
+
labelKey: 'equals',
|
|
113
|
+
controls: ['number'],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
value: 'ne',
|
|
117
|
+
labelKey: 'doesNotEqual',
|
|
118
|
+
controls: ['number'],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
value: 'not-null',
|
|
122
|
+
labelKey: 'containsData',
|
|
123
|
+
controls: [],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
value: 'null',
|
|
127
|
+
labelKey: 'doesNotContainData',
|
|
128
|
+
controls: [],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
value: 'gt',
|
|
132
|
+
labelKey: 'greaterThan',
|
|
133
|
+
controls: ['number'],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
value: 'gte',
|
|
137
|
+
labelKey: 'greaterThanOrEquals',
|
|
138
|
+
controls: ['number'],
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
value: 'lt',
|
|
142
|
+
labelKey: 'lessThan',
|
|
143
|
+
controls: ['number'],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
value: 'lte',
|
|
147
|
+
labelKey: 'lessThanOrEquals',
|
|
148
|
+
controls: ['number'],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
value: 'between',
|
|
152
|
+
labelKey: 'between',
|
|
153
|
+
controls: ['number', 'number'],
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
const moneyOperatorOptions = [
|
|
157
|
+
{
|
|
158
|
+
value: 'eq',
|
|
159
|
+
labelKey: 'equals',
|
|
160
|
+
controls: ['money'],
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
value: 'ne',
|
|
164
|
+
labelKey: 'doesNotEqual',
|
|
165
|
+
controls: ['money'],
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
value: 'not-null',
|
|
169
|
+
labelKey: 'containsData',
|
|
170
|
+
controls: [],
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
value: 'null',
|
|
174
|
+
labelKey: 'doesNotContainData',
|
|
175
|
+
controls: [],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
value: 'gt',
|
|
179
|
+
labelKey: 'greaterThan',
|
|
180
|
+
controls: ['money'],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
value: 'gte',
|
|
184
|
+
labelKey: 'greaterThanOrEquals',
|
|
185
|
+
controls: ['money'],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
value: 'lt',
|
|
189
|
+
labelKey: 'lessThan',
|
|
190
|
+
controls: ['money'],
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
value: 'lte',
|
|
194
|
+
labelKey: 'lessThanOrEquals',
|
|
195
|
+
controls: ['money'],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
value: 'between',
|
|
199
|
+
labelKey: 'between',
|
|
200
|
+
controls: ['money', 'money'],
|
|
201
|
+
},
|
|
202
|
+
];
|
|
203
|
+
const dateOperatorOptions = [
|
|
204
|
+
{
|
|
205
|
+
value: 'on',
|
|
206
|
+
labelKey: 'on',
|
|
207
|
+
controls: ['date'],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
value: 'on-or-after',
|
|
211
|
+
labelKey: 'onOrAfter',
|
|
212
|
+
controls: ['date'],
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
value: 'on-or-before',
|
|
216
|
+
labelKey: 'onOrBefore',
|
|
217
|
+
controls: ['date'],
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
value: 'today',
|
|
221
|
+
labelKey: 'today',
|
|
222
|
+
controls: [],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
value: 'yesterday',
|
|
226
|
+
labelKey: 'yesterday',
|
|
227
|
+
controls: [],
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
value: 'tomorrow',
|
|
231
|
+
labelKey: 'tomorrow',
|
|
232
|
+
controls: [],
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
value: 'this-week',
|
|
236
|
+
labelKey: 'thisWeek',
|
|
237
|
+
controls: [],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
value: 'this-month',
|
|
241
|
+
labelKey: 'thisMonth',
|
|
242
|
+
controls: [],
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
value: 'this-year',
|
|
246
|
+
labelKey: 'thisYear',
|
|
247
|
+
controls: [],
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
value: 'this-fiscal-year',
|
|
251
|
+
labelKey: 'thisFiscalYear',
|
|
252
|
+
controls: [],
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
value: 'next-week',
|
|
256
|
+
labelKey: 'nextWeek',
|
|
257
|
+
controls: [],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
value: 'next-seven-days',
|
|
261
|
+
labelKey: 'nextSevenDays',
|
|
262
|
+
controls: [],
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
value: 'next-month',
|
|
266
|
+
labelKey: 'nextMonth',
|
|
267
|
+
controls: [],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
value: 'next-year',
|
|
271
|
+
labelKey: 'nextYear',
|
|
272
|
+
controls: [],
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
value: 'next-fiscal-year',
|
|
276
|
+
labelKey: 'nextFiscalYear',
|
|
277
|
+
controls: [],
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
value: 'next-x-hours',
|
|
281
|
+
labelKey: 'nextXHours',
|
|
282
|
+
controls: [],
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
value: 'next-x-days',
|
|
286
|
+
labelKey: 'nextXDays',
|
|
287
|
+
controls: [],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
value: 'next-x-weeks',
|
|
291
|
+
labelKey: 'nextXWeeks',
|
|
292
|
+
controls: [],
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
value: 'next-x-months',
|
|
296
|
+
labelKey: 'nextXMonths',
|
|
297
|
+
controls: [],
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
value: 'next-x-years',
|
|
301
|
+
labelKey: 'nextXYears',
|
|
302
|
+
controls: [],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
value: 'last-week',
|
|
306
|
+
labelKey: 'lastWeek',
|
|
307
|
+
controls: [],
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
value: 'last-seven-days',
|
|
311
|
+
labelKey: 'lastSevenDays',
|
|
312
|
+
controls: [],
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
value: 'last-month',
|
|
316
|
+
labelKey: 'lastMonth',
|
|
317
|
+
controls: [],
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
value: 'last-year',
|
|
321
|
+
labelKey: 'lastYear',
|
|
322
|
+
controls: [],
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
value: 'last-fiscal-year',
|
|
326
|
+
labelKey: 'lastFiscalYear',
|
|
327
|
+
controls: [],
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
value: 'last-x-hours',
|
|
331
|
+
labelKey: 'lastXHours',
|
|
332
|
+
controls: ['number'],
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
value: 'last-x-days',
|
|
336
|
+
labelKey: 'lastXDays',
|
|
337
|
+
controls: ['number'],
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
value: 'last-x-weeks',
|
|
341
|
+
labelKey: 'lastXWeeks',
|
|
342
|
+
controls: ['number'],
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
value: 'last-x-months',
|
|
346
|
+
labelKey: 'lastXMonths',
|
|
347
|
+
controls: ['number'],
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
value: 'last-x-years',
|
|
351
|
+
labelKey: 'lastXYears',
|
|
352
|
+
controls: ['number'],
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
value: 'olderthan-x-hours',
|
|
356
|
+
labelKey: 'olderthanXHours',
|
|
357
|
+
controls: ['number'],
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
value: 'olderthan-x-days',
|
|
361
|
+
labelKey: 'olderthanXDays',
|
|
362
|
+
controls: ['number'],
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
value: 'olderthan-x-weeks',
|
|
366
|
+
labelKey: 'olderthanXWeeks',
|
|
367
|
+
controls: ['number'],
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
value: 'olderthan-x-months',
|
|
371
|
+
labelKey: 'olderthanXMonths',
|
|
372
|
+
controls: ['number'],
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
value: 'olderthan-x-years',
|
|
376
|
+
labelKey: 'olderthanXYears',
|
|
377
|
+
controls: ['number'],
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
value: 'in-fiscal-year',
|
|
381
|
+
labelKey: 'inFiscalYear',
|
|
382
|
+
controls: [],
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
value: 'between',
|
|
386
|
+
labelKey: 'between',
|
|
387
|
+
controls: ['date', 'date'],
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
value: 'not-null',
|
|
391
|
+
labelKey: 'containsData',
|
|
392
|
+
controls: [],
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
value: 'null',
|
|
396
|
+
labelKey: 'doesNotContainData',
|
|
397
|
+
controls: [],
|
|
398
|
+
},
|
|
399
|
+
];
|
|
400
|
+
const choiceOperatorOptions = [
|
|
401
|
+
{
|
|
402
|
+
value: 'in',
|
|
403
|
+
labelKey: 'equals',
|
|
404
|
+
controls: ['choice'],
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
value: 'not-in',
|
|
408
|
+
labelKey: 'doesNotEqual',
|
|
409
|
+
controls: ['choice'],
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
value: 'not-null',
|
|
413
|
+
labelKey: 'containsData',
|
|
414
|
+
controls: [],
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
value: 'null',
|
|
418
|
+
labelKey: 'doesNotContainData',
|
|
419
|
+
controls: [],
|
|
420
|
+
},
|
|
421
|
+
];
|
|
422
|
+
const lookupOperatorOptions = [
|
|
423
|
+
{
|
|
424
|
+
value: 'in',
|
|
425
|
+
labelKey: 'equals',
|
|
426
|
+
controls: ['lookup'],
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
value: 'not-in',
|
|
430
|
+
labelKey: 'doesNotEqual',
|
|
431
|
+
controls: ['lookup'],
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
value: 'not-null',
|
|
435
|
+
labelKey: 'containsData',
|
|
436
|
+
controls: [],
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
value: 'null',
|
|
440
|
+
labelKey: 'doesNotContainData',
|
|
441
|
+
controls: [],
|
|
442
|
+
},
|
|
443
|
+
];
|
|
444
|
+
const booleanOperatorOptions = [
|
|
445
|
+
{
|
|
446
|
+
value: 'in',
|
|
447
|
+
labelKey: 'equals',
|
|
448
|
+
controls: ['boolean'],
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
value: 'not-in',
|
|
452
|
+
labelKey: 'doesNotEqual',
|
|
453
|
+
controls: ['boolean'],
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
value: 'not-null',
|
|
457
|
+
labelKey: 'containsData',
|
|
458
|
+
controls: [],
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
value: 'null',
|
|
462
|
+
labelKey: 'doesNotContainData',
|
|
463
|
+
controls: [],
|
|
464
|
+
},
|
|
465
|
+
];
|
|
466
|
+
const idOperatorOptions = [];
|
|
467
|
+
const attachmentOperatorOptions = [];
|
|
468
|
+
exports.operatorOptions = {
|
|
469
|
+
id: idOperatorOptions,
|
|
470
|
+
boolean: booleanOperatorOptions,
|
|
471
|
+
choice: choiceOperatorOptions,
|
|
472
|
+
choices: choiceOperatorOptions,
|
|
473
|
+
date: dateOperatorOptions,
|
|
474
|
+
lookup: lookupOperatorOptions,
|
|
475
|
+
money: moneyOperatorOptions,
|
|
476
|
+
number: numberOperatorOptions,
|
|
477
|
+
string: stringOperatorOptions,
|
|
478
|
+
attachment: attachmentOperatorOptions,
|
|
479
|
+
mixed: [],
|
|
480
|
+
daterange: [],
|
|
481
|
+
lookups: [],
|
|
482
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultOperatorStrings = exports.getLocalizedOperatorOptions = void 0;
|
|
4
|
+
var utils_1 = require("./utils");
|
|
5
|
+
Object.defineProperty(exports, "getLocalizedOperatorOptions", { enumerable: true, get: function () { return utils_1.getLocalizedOperatorOptions; } });
|
|
6
|
+
var constants_1 = require("./constants");
|
|
7
|
+
Object.defineProperty(exports, "defaultOperatorStrings", { enumerable: true, get: function () { return constants_1.defaultOperatorStrings; } });
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { AttributeType } from '@headless-adminapp/core/attributes';
|
|
2
|
+
import type { OperatorKey } from '@headless-adminapp/core/transport';
|
|
3
|
+
export interface OperatorStrings {
|
|
4
|
+
equals: string;
|
|
5
|
+
doesNotEqual: string;
|
|
6
|
+
contains: string;
|
|
7
|
+
doesNotContain: string;
|
|
8
|
+
beginsWith: string;
|
|
9
|
+
doesNotBeginWith: string;
|
|
10
|
+
endsWith: string;
|
|
11
|
+
doesNotEndWith: string;
|
|
12
|
+
containsData: string;
|
|
13
|
+
doesNotContainData: string;
|
|
14
|
+
greaterThan: string;
|
|
15
|
+
greaterThanOrEquals: string;
|
|
16
|
+
lessThan: string;
|
|
17
|
+
lessThanOrEquals: string;
|
|
18
|
+
between: string;
|
|
19
|
+
on: string;
|
|
20
|
+
onOrAfter: string;
|
|
21
|
+
onOrBefore: string;
|
|
22
|
+
today: string;
|
|
23
|
+
yesterday: string;
|
|
24
|
+
tomorrow: string;
|
|
25
|
+
thisWeek: string;
|
|
26
|
+
thisMonth: string;
|
|
27
|
+
thisYear: string;
|
|
28
|
+
thisFiscalYear: string;
|
|
29
|
+
nextWeek: string;
|
|
30
|
+
nextSevenDays: string;
|
|
31
|
+
nextMonth: string;
|
|
32
|
+
nextYear: string;
|
|
33
|
+
nextFiscalYear: string;
|
|
34
|
+
nextXHours: string;
|
|
35
|
+
nextXDays: string;
|
|
36
|
+
nextXWeeks: string;
|
|
37
|
+
nextXMonths: string;
|
|
38
|
+
nextXYears: string;
|
|
39
|
+
lastWeek: string;
|
|
40
|
+
lastSevenDays: string;
|
|
41
|
+
lastMonth: string;
|
|
42
|
+
lastYear: string;
|
|
43
|
+
lastFiscalYear: string;
|
|
44
|
+
lastXHours: string;
|
|
45
|
+
lastXDays: string;
|
|
46
|
+
lastXWeeks: string;
|
|
47
|
+
lastXMonths: string;
|
|
48
|
+
lastXYears: string;
|
|
49
|
+
olderthanXHours: string;
|
|
50
|
+
olderthanXDays: string;
|
|
51
|
+
olderthanXWeeks: string;
|
|
52
|
+
olderthanXMonths: string;
|
|
53
|
+
olderthanXYears: string;
|
|
54
|
+
inFiscalYear: string;
|
|
55
|
+
}
|
|
56
|
+
export type OperatorOptionConfig = {
|
|
57
|
+
value: OperatorKey;
|
|
58
|
+
labelKey: keyof OperatorStrings;
|
|
59
|
+
controls: AttributeType[];
|
|
60
|
+
};
|
|
61
|
+
export type OperatorOption = {
|
|
62
|
+
value: OperatorKey;
|
|
63
|
+
label: string;
|
|
64
|
+
controls: AttributeType[];
|
|
65
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLocalizedOperatorOptions = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const getLocalizedOperatorOptions = (strings) => {
|
|
6
|
+
return Object.entries(constants_1.operatorOptions).reduce((acc, [key, value]) => (Object.assign(Object.assign({}, acc), { [key]: value.map((option) => (Object.assign(Object.assign({}, option), { label: strings[option.labelKey] }))) })), {});
|
|
7
|
+
};
|
|
8
|
+
exports.getLocalizedOperatorOptions = getLocalizedOperatorOptions;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LocalizedDataLookup } from '@headless-adminapp/core/attributes';
|
|
2
|
+
import { CommandItemExperience } from '@headless-adminapp/core/experience/command';
|
|
3
|
+
import { ColumnCondition, EntityMainGridCommandContext, EntitySubGridCommandContext, SortingState, View, ViewColumn } from '@headless-adminapp/core/experience/view';
|
|
4
|
+
import { InferredSchemaType, Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
5
|
+
import { Filter, RetriveRecordsResult } from '@headless-adminapp/core/transport';
|
|
6
|
+
export interface TransformedViewColumn<S extends SchemaAttributes = SchemaAttributes> extends ViewColumn<S> {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GridContextState<S extends SchemaAttributes = SchemaAttributes, CommandContext extends EntityMainGridCommandContext | EntitySubGridCommandContext = EntityMainGridCommandContext> {
|
|
11
|
+
schema: Schema<S>;
|
|
12
|
+
view: View<S>;
|
|
13
|
+
viewLookup: LocalizedDataLookup[];
|
|
14
|
+
onChangeView: (viewId: string) => void;
|
|
15
|
+
extraFilter?: Filter;
|
|
16
|
+
commands: CommandItemExperience<CommandContext>[][];
|
|
17
|
+
maxRecords?: number;
|
|
18
|
+
columns: TransformedViewColumn<S>[];
|
|
19
|
+
searchText: string;
|
|
20
|
+
columnFilters: Partial<Record<keyof S, ColumnCondition>>;
|
|
21
|
+
sorting: SortingState<S>;
|
|
22
|
+
selectedIds: string[];
|
|
23
|
+
data: RetriveRecordsResult<InferredSchemaType<S>> | null;
|
|
24
|
+
dataState: {
|
|
25
|
+
isFetching: boolean;
|
|
26
|
+
hasNextPage: boolean;
|
|
27
|
+
isFetchingNextPage: boolean;
|
|
28
|
+
};
|
|
29
|
+
fetchNextPage: () => void;
|
|
30
|
+
isSubGrid: boolean;
|
|
31
|
+
allowViewSelection: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const GridContext: import("react").Context<import("../mutable/context").ContextValue<GridContextState<SchemaAttributes, EntityMainGridCommandContext>>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './useChangeView';
|
|
2
|
+
export * from './useGridColumnFilter';
|
|
3
|
+
export * from './useGridColumns';
|
|
4
|
+
export * from './useGridCommands';
|
|
5
|
+
export * from './useGridData';
|
|
6
|
+
export * from './useGridDataState';
|
|
7
|
+
export * from './useGridExtraFilter';
|
|
8
|
+
export * from './useGridOptions';
|
|
9
|
+
export * from './useGridPagination';
|
|
10
|
+
export * from './useGridRefresh';
|
|
11
|
+
export * from './useGridSchema';
|
|
12
|
+
export * from './useGridSelection';
|
|
13
|
+
export * from './useGridSorting';
|
|
14
|
+
export * from './useGridViewLookupData';
|
|
15
|
+
export * from './useMainGridCommands';
|
|
16
|
+
export * from './useMaxRecords';
|
|
17
|
+
export * from './useSearchText';
|
|
18
|
+
export * from './useSelectedView';
|
|
19
|
+
export * from './useSubGridCommands';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useChangeView"), exports);
|
|
18
|
+
__exportStar(require("./useGridColumnFilter"), exports);
|
|
19
|
+
__exportStar(require("./useGridColumns"), exports);
|
|
20
|
+
__exportStar(require("./useGridCommands"), exports);
|
|
21
|
+
__exportStar(require("./useGridData"), exports);
|
|
22
|
+
__exportStar(require("./useGridDataState"), exports);
|
|
23
|
+
__exportStar(require("./useGridExtraFilter"), exports);
|
|
24
|
+
__exportStar(require("./useGridOptions"), exports);
|
|
25
|
+
__exportStar(require("./useGridPagination"), exports);
|
|
26
|
+
__exportStar(require("./useGridRefresh"), exports);
|
|
27
|
+
__exportStar(require("./useGridSchema"), exports);
|
|
28
|
+
__exportStar(require("./useGridSelection"), exports);
|
|
29
|
+
__exportStar(require("./useGridSorting"), exports);
|
|
30
|
+
__exportStar(require("./useGridViewLookupData"), exports);
|
|
31
|
+
__exportStar(require("./useMainGridCommands"), exports);
|
|
32
|
+
__exportStar(require("./useMaxRecords"), exports);
|
|
33
|
+
__exportStar(require("./useSearchText"), exports);
|
|
34
|
+
__exportStar(require("./useSelectedView"), exports);
|
|
35
|
+
__exportStar(require("./useSubGridCommands"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useChangeView(): (viewId: string) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useChangeView = useChangeView;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const context_1 = require("../../mutable/context");
|
|
6
|
+
const context_2 = require("../context");
|
|
7
|
+
function useChangeView() {
|
|
8
|
+
const onChangeView = (0, context_1.useContextSelector)(context_2.GridContext, (state) => state.onChangeView);
|
|
9
|
+
return (0, react_1.useCallback)((viewId) => {
|
|
10
|
+
onChangeView(viewId);
|
|
11
|
+
}, [onChangeView]);
|
|
12
|
+
}
|