@nubitio/crud 0.5.11 → 0.5.14
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/dist/index.cjs +3882 -3350
- package/dist/index.d.cts +35 -1
- package/dist/index.d.mts +35 -1
- package/dist/index.mjs +3882 -3351
- package/dist/style.css +232 -232
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1965,4 +1965,38 @@ declare function ResourceStoreProvider({
|
|
|
1965
1965
|
}: ResourceStoreProviderProps): React.JSX.Element;
|
|
1966
1966
|
declare function useResourceStoreFactory(): ResourceStoreFactory;
|
|
1967
1967
|
//#endregion
|
|
1968
|
-
|
|
1968
|
+
//#region packages/crud/data/restResourceStore.d.ts
|
|
1969
|
+
/**
|
|
1970
|
+
* Query-string dialect for plain REST backends. Every param can be renamed
|
|
1971
|
+
* or disabled (null) to match the API at hand; filters are opt-in because no
|
|
1972
|
+
* two REST APIs agree on a filter syntax.
|
|
1973
|
+
*/
|
|
1974
|
+
interface RestQueryDialect {
|
|
1975
|
+
/** 1-based page number param. Default `page`; null omits pagination params. */
|
|
1976
|
+
pageParam?: string | null;
|
|
1977
|
+
/** Page size param. Default `pageSize`. */
|
|
1978
|
+
pageSizeParam?: string | null;
|
|
1979
|
+
/**
|
|
1980
|
+
* Sort param, comma-joined `field` / `-field` (leading minus = descending).
|
|
1981
|
+
* Default `sort`; null omits sorting params.
|
|
1982
|
+
*/
|
|
1983
|
+
sortParam?: string | null;
|
|
1984
|
+
/** Full-text search param fed from the grid search box. Default `q`; null omits it. */
|
|
1985
|
+
searchParam?: string | null;
|
|
1986
|
+
/** Translate grid filter descriptors into query params. Filters are ignored without it. */
|
|
1987
|
+
serializeFilter?: (filter: ResourceFilterDescriptor) => Record<string, string>;
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* ResourceStore factory for plain (non-Hydra) REST backends — pass it to
|
|
1991
|
+
* `ResourceStoreProvider` and the grids work against array or
|
|
1992
|
+
* `{ items|data, total|totalCount }` responses. Totals fall back to the
|
|
1993
|
+
* `X-Total-Count` header and finally to the payload length, so endpoints
|
|
1994
|
+
* without server-side pagination (JSONPlaceholder-style) work out of the box.
|
|
1995
|
+
*
|
|
1996
|
+
* <ResourceStoreProvider factory={createRestResourceStore()}>
|
|
1997
|
+
*
|
|
1998
|
+
* Pair it with `adapter: RestAdapter` on `defineResource` for entity refs.
|
|
1999
|
+
*/
|
|
2000
|
+
declare function createRestResourceStore(dialect?: RestQueryDialect): ResourceStoreFactory;
|
|
2001
|
+
//#endregion
|
|
2002
|
+
export { type AuditEntry, type AuditFieldLabelResolver, type AuditTrailConfig, AuditTrailPanel, type AuditTrailPanelProps, type BackendAdapter, type BulkAction, type ColSpan, type ColumnPreset, ColumnPresetSelector, type ColumnPresetState, CrudDialogShell, CrudDrawerShell, type CrudDrawerSize, type CrudDrawerViewEvents, type CrudDrawerViewOptions, CrudFormShell, type CrudFormShellProps, CrudPage, CrudPageShell, type CrudPageViewEvents, type CrudPageViewOptions, type CrudViewMode, type CrudViewModeConfig, DATA_GRID_EVENTS, DEFAULT_DRAWER_SIZE, DEFAULT_DRAWER_WIDTH, DRAWER_WIDTHS, type DataGridSelectionChangedEvent, type DataGridSummaryItem, NativeDataGridView as DataGridView, type DataGridViewOptions, type DataRecord, type DetailSummaryOptions, CrudDialogView as DialogView, type DrawerSize, CrudDrawerView as DrawerView, type EnumOption, FORM_EVENTS, type Field, FieldBuilder, type FieldColSpanContext, type FieldDef, type FieldInput, type FieldOverride, FieldType, type FilterRule, type FormHandle, type FormLayout, type FormLayoutHint, type FormOnChangeFn, type FormPresentationContext, type FormPresentationMode, type FormSection, type FormTab, NativeFormView as FormView, type FormViewOptions, type FormatterFn, type GridCellContext, type GridData, type GridHandle, type GridOnChangeFn, HydraAdapter, type ItemFormatterFn, type LoadOption, type OnChangeFn, CrudPageView as PageView, type ResolvedViewMode, type ResourceConfig, type ResourceEmptyState, type ResourceFilterDescriptor, type ResourceFilterRule, type ResourceFormDetail, type ResourceGridDetail, type ResourceLoadOption, type ResourceLoadOptions, type ResourcePermissions, type ResourceRouting, type ResourceRowActions, ResourceSchemaProvider, type ResourceSchemaProviderProps, type ResourceSchemaResolution, type ResourceSchemaResolver, type ResourceSortDescriptor, type ResourceStore, type ResourceStoreFactory, type ResourceStoreOptions, ResourceStoreProvider, type ResourceStoreProviderProps, type ResourceToolbar, type ResourceToolbarAction, type ResourceToolbarActionVariant, type ResourceToolbarContext, type ResourceToolbarItems, RestAdapter, type RestQueryDialect, type SmartCrudFieldContract, type SmartCrudFieldOperation, type SmartCrudFieldPatch, type SmartCrudHydraFieldContract, type SmartCrudHydraFieldDirective, type SmartCrudManualField, type SmartCrudManualFieldContract, type SmartCrudOperation, SmartCrudPage, SmartCrudRolesProvider, type SummaryCalculateContext, type SummaryFormat, type SummaryItem, type SummaryTextContext, type SummaryType, ToolbarSelect, type ToolbarSelectOption, type ToolbarSelectProps, type ValidationRule, buildFieldColSpanContext, buildFields, checkboxField, computeSummaryValue, createCrudEvents, createRestResourceStore, crudRoute, currencyField, dateField, datetimeField, defineFieldContract, defineFields, defineResource, entityField, enumField, fileField, formatSummaryValue, identityField, imageField, isLongTextField, isShortField, noneField, numberField, parseDrawerWidthPx, passwordField, resolveDrawerLayoutBucket, resolveDrawerSize, resolveDrawerWidth, resolveFieldColSpan, resolveFieldsColSpans, resolveSummaryText, resolveViewMode, selectField, switchField, textField, textareaField, useColumnPreset, useResourceStoreFactory, useSmartCrudRoles, validateFieldContract };
|
package/dist/index.d.mts
CHANGED
|
@@ -1965,4 +1965,38 @@ declare function ResourceStoreProvider({
|
|
|
1965
1965
|
}: ResourceStoreProviderProps): React.JSX.Element;
|
|
1966
1966
|
declare function useResourceStoreFactory(): ResourceStoreFactory;
|
|
1967
1967
|
//#endregion
|
|
1968
|
-
|
|
1968
|
+
//#region packages/crud/data/restResourceStore.d.ts
|
|
1969
|
+
/**
|
|
1970
|
+
* Query-string dialect for plain REST backends. Every param can be renamed
|
|
1971
|
+
* or disabled (null) to match the API at hand; filters are opt-in because no
|
|
1972
|
+
* two REST APIs agree on a filter syntax.
|
|
1973
|
+
*/
|
|
1974
|
+
interface RestQueryDialect {
|
|
1975
|
+
/** 1-based page number param. Default `page`; null omits pagination params. */
|
|
1976
|
+
pageParam?: string | null;
|
|
1977
|
+
/** Page size param. Default `pageSize`. */
|
|
1978
|
+
pageSizeParam?: string | null;
|
|
1979
|
+
/**
|
|
1980
|
+
* Sort param, comma-joined `field` / `-field` (leading minus = descending).
|
|
1981
|
+
* Default `sort`; null omits sorting params.
|
|
1982
|
+
*/
|
|
1983
|
+
sortParam?: string | null;
|
|
1984
|
+
/** Full-text search param fed from the grid search box. Default `q`; null omits it. */
|
|
1985
|
+
searchParam?: string | null;
|
|
1986
|
+
/** Translate grid filter descriptors into query params. Filters are ignored without it. */
|
|
1987
|
+
serializeFilter?: (filter: ResourceFilterDescriptor) => Record<string, string>;
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* ResourceStore factory for plain (non-Hydra) REST backends — pass it to
|
|
1991
|
+
* `ResourceStoreProvider` and the grids work against array or
|
|
1992
|
+
* `{ items|data, total|totalCount }` responses. Totals fall back to the
|
|
1993
|
+
* `X-Total-Count` header and finally to the payload length, so endpoints
|
|
1994
|
+
* without server-side pagination (JSONPlaceholder-style) work out of the box.
|
|
1995
|
+
*
|
|
1996
|
+
* <ResourceStoreProvider factory={createRestResourceStore()}>
|
|
1997
|
+
*
|
|
1998
|
+
* Pair it with `adapter: RestAdapter` on `defineResource` for entity refs.
|
|
1999
|
+
*/
|
|
2000
|
+
declare function createRestResourceStore(dialect?: RestQueryDialect): ResourceStoreFactory;
|
|
2001
|
+
//#endregion
|
|
2002
|
+
export { type AuditEntry, type AuditFieldLabelResolver, type AuditTrailConfig, AuditTrailPanel, type AuditTrailPanelProps, type BackendAdapter, type BulkAction, type ColSpan, type ColumnPreset, ColumnPresetSelector, type ColumnPresetState, CrudDialogShell, CrudDrawerShell, type CrudDrawerSize, type CrudDrawerViewEvents, type CrudDrawerViewOptions, CrudFormShell, type CrudFormShellProps, CrudPage, CrudPageShell, type CrudPageViewEvents, type CrudPageViewOptions, type CrudViewMode, type CrudViewModeConfig, DATA_GRID_EVENTS, DEFAULT_DRAWER_SIZE, DEFAULT_DRAWER_WIDTH, DRAWER_WIDTHS, type DataGridSelectionChangedEvent, type DataGridSummaryItem, NativeDataGridView as DataGridView, type DataGridViewOptions, type DataRecord, type DetailSummaryOptions, CrudDialogView as DialogView, type DrawerSize, CrudDrawerView as DrawerView, type EnumOption, FORM_EVENTS, type Field, FieldBuilder, type FieldColSpanContext, type FieldDef, type FieldInput, type FieldOverride, FieldType, type FilterRule, type FormHandle, type FormLayout, type FormLayoutHint, type FormOnChangeFn, type FormPresentationContext, type FormPresentationMode, type FormSection, type FormTab, NativeFormView as FormView, type FormViewOptions, type FormatterFn, type GridCellContext, type GridData, type GridHandle, type GridOnChangeFn, HydraAdapter, type ItemFormatterFn, type LoadOption, type OnChangeFn, CrudPageView as PageView, type ResolvedViewMode, type ResourceConfig, type ResourceEmptyState, type ResourceFilterDescriptor, type ResourceFilterRule, type ResourceFormDetail, type ResourceGridDetail, type ResourceLoadOption, type ResourceLoadOptions, type ResourcePermissions, type ResourceRouting, type ResourceRowActions, ResourceSchemaProvider, type ResourceSchemaProviderProps, type ResourceSchemaResolution, type ResourceSchemaResolver, type ResourceSortDescriptor, type ResourceStore, type ResourceStoreFactory, type ResourceStoreOptions, ResourceStoreProvider, type ResourceStoreProviderProps, type ResourceToolbar, type ResourceToolbarAction, type ResourceToolbarActionVariant, type ResourceToolbarContext, type ResourceToolbarItems, RestAdapter, type RestQueryDialect, type SmartCrudFieldContract, type SmartCrudFieldOperation, type SmartCrudFieldPatch, type SmartCrudHydraFieldContract, type SmartCrudHydraFieldDirective, type SmartCrudManualField, type SmartCrudManualFieldContract, type SmartCrudOperation, SmartCrudPage, SmartCrudRolesProvider, type SummaryCalculateContext, type SummaryFormat, type SummaryItem, type SummaryTextContext, type SummaryType, ToolbarSelect, type ToolbarSelectOption, type ToolbarSelectProps, type ValidationRule, buildFieldColSpanContext, buildFields, checkboxField, computeSummaryValue, createCrudEvents, createRestResourceStore, crudRoute, currencyField, dateField, datetimeField, defineFieldContract, defineFields, defineResource, entityField, enumField, fileField, formatSummaryValue, identityField, imageField, isLongTextField, isShortField, noneField, numberField, parseDrawerWidthPx, passwordField, resolveDrawerLayoutBucket, resolveDrawerSize, resolveDrawerWidth, resolveFieldColSpan, resolveFieldsColSpans, resolveSummaryText, resolveViewMode, selectField, switchField, textField, textareaField, useColumnPreset, useResourceStoreFactory, useSmartCrudRoles, validateFieldContract };
|