@stenajs-webui/filter 21.9.1 → 21.10.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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SearchFilterActions } from "../redux/SearchFilterRedux";
3
2
  export declare const SearchFilterActionsContext: import("react").Context<SearchFilterActions<unknown, any>>;
4
3
  export declare const useSearchFilterActions: <TFormModel, TSectionKey extends string>() => SearchFilterActions<TFormModel, TSectionKey>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SearchFilterDispatch } from "../redux/SearchFilterRedux";
3
2
  export declare const SearchFilterDispatchContext: import("react").Context<SearchFilterDispatch<unknown>>;
4
3
  export declare const useSearchFilterDispatch: () => SearchFilterDispatch<unknown>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const SearchFilterModelContext: import("react").Context<unknown>;
3
2
  export declare const useSearchFilterModel: <TFormModel>() => TFormModel;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SearchFilterState } from "../redux/SearchFilterRedux";
3
2
  export declare const SearchFilterStateContext: import("react").Context<SearchFilterState<unknown>>;
4
3
  export declare const useSearchFilterState: <TFormModel>() => SearchFilterState<TFormModel>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SearchFilterState } from "../redux/SearchFilterRedux";
3
2
  export declare const useLocalSearchFilterState: <TFormModel, TSectionKey extends string>(initialState: SearchFilterState<TFormModel>) => {
4
3
  actions: import("../redux/SearchFilterRedux").SearchFilterActions<TFormModel, TSectionKey>;
@@ -1,6 +1,7 @@
1
1
  import { BooleanRecord, BooleanRecordOptions } from "./BooleanRecordTypes";
2
2
  import { SearchFilterSectionChipModel, SearchFilterSectionOnClickRemoveOnChip } from "../../config/SearchFilterConfig";
3
+ import { PickByValue } from "@stenajs-webui/core";
3
4
  import { SectionChipsProps } from "../../features/chips/SectionChips";
4
- export declare const createChipsPropsForBooleanRecord: <TFormModel, TSectionKey extends string, TField extends { [Key in keyof TFormModel]-?: TFormModel[Key] extends BooleanRecord ? Key : never; }[keyof TFormModel]>(formModel: TFormModel, fieldName: TField, options?: BooleanRecordOptions) => Pick<SectionChipsProps<TFormModel, TSectionKey>, "chips" | "onClickRemoveOnChip">;
5
+ export declare const createChipsPropsForBooleanRecord: <TFormModel, TSectionKey extends string, TField extends keyof PickByValue<TFormModel, BooleanRecord>>(formModel: TFormModel, fieldName: TField, options?: BooleanRecordOptions) => Pick<SectionChipsProps<TFormModel, TSectionKey>, "chips" | "onClickRemoveOnChip">;
5
6
  export declare const createChipsForBooleanRecord: (booleanRecord: BooleanRecord, options?: BooleanRecordOptions) => Array<SearchFilterSectionChipModel>;
6
- export declare const createOnClickRemoveOnChipForBooleanRecord: <TFormModel, TField extends { [Key in keyof TFormModel]-?: TFormModel[Key] extends BooleanRecord ? Key : never; }[keyof TFormModel]>(formModel: TFormModel, fieldName: TField) => SearchFilterSectionOnClickRemoveOnChip<TFormModel>;
7
+ export declare const createOnClickRemoveOnChipForBooleanRecord: <TFormModel, TField extends keyof PickByValue<TFormModel, BooleanRecord>>(formModel: TFormModel, fieldName: TField) => SearchFilterSectionOnClickRemoveOnChip<TFormModel>;
@@ -1,5 +1,6 @@
1
1
  import { SearchFilterSectionChipModel, SearchFilterSectionOnClickRemoveOnChip } from "../../config/SearchFilterConfig";
2
+ import { PickByValue } from "@stenajs-webui/core";
2
3
  import { SectionChipsProps } from "../../features/chips/SectionChips";
3
- export declare const createChipsPropsForDateRange: <TFormModel, TSectionKey extends string, TField extends { [Key in keyof TFormModel]-?: TFormModel[Key] extends string | undefined ? Key : never; }[keyof TFormModel]>(formModel: TFormModel, startDateFieldName: TField, endDateFieldName: TField) => Pick<SectionChipsProps<TFormModel, TSectionKey>, "chips" | "onClickRemoveOnChip">;
4
+ export declare const createChipsPropsForDateRange: <TFormModel, TSectionKey extends string, TField extends keyof PickByValue<TFormModel, string | undefined>>(formModel: TFormModel, startDateFieldName: TField, endDateFieldName: TField) => Pick<SectionChipsProps<TFormModel, TSectionKey>, "chips" | "onClickRemoveOnChip">;
4
5
  export declare const createChipsForDateRange: (startDate: string | undefined, endDate: string | undefined) => Array<SearchFilterSectionChipModel>;
5
- export declare const createOnClickRemoveOnChipForDateRange: <TFormModel, TField extends { [Key in keyof TFormModel]-?: TFormModel[Key] extends string | undefined ? Key : never; }[keyof TFormModel]>(startDateFieldName: TField, endDateFieldName: TField) => SearchFilterSectionOnClickRemoveOnChip<TFormModel>;
6
+ export declare const createOnClickRemoveOnChipForDateRange: <TFormModel, TField extends keyof PickByValue<TFormModel, string | undefined>>(startDateFieldName: TField, endDateFieldName: TField) => SearchFilterSectionOnClickRemoveOnChip<TFormModel>;
@@ -1,2 +1,3 @@
1
+ import { PickByValue } from "@stenajs-webui/core";
1
2
  import { DateRangeCalendarSectionProps } from "./components/DateRangeCalendarSection";
2
- export declare const createDateRangeSectionProps: <TFormModel, TField extends { [Key in keyof TFormModel]-?: TFormModel[Key] extends string | undefined ? Key : never; }[keyof TFormModel], TSectionKey extends string>(formModel: TFormModel, startDateFieldName: TField, endDateFieldName: TField) => Pick<DateRangeCalendarSectionProps<TFormModel, TSectionKey>, "value" | "onValueChange">;
3
+ export declare const createDateRangeSectionProps: <TFormModel, TField extends keyof PickByValue<TFormModel, string | undefined>, TSectionKey extends string>(formModel: TFormModel, startDateFieldName: TField, endDateFieldName: TField) => Pick<DateRangeCalendarSectionProps<TFormModel, TSectionKey>, "value" | "onValueChange">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stenajs-webui/filter",
3
- "version": "21.9.1",
3
+ "version": "21.10.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "author": "mattias800",
@@ -33,15 +33,15 @@
33
33
  "deploy": "gh-pages -d example/build"
34
34
  },
35
35
  "dependencies": {
36
- "@stenajs-webui/calendar": "21.9.1",
37
- "@stenajs-webui/core": "21.9.1",
38
- "@stenajs-webui/elements": "21.9.1",
39
- "@stenajs-webui/forms": "21.9.1",
40
- "@stenajs-webui/modal": "21.9.1",
41
- "@stenajs-webui/panels": "21.9.1",
42
- "@stenajs-webui/redux": "21.9.1",
43
- "@stenajs-webui/select": "21.9.1",
44
- "@stenajs-webui/theme": "21.9.1",
36
+ "@stenajs-webui/calendar": "21.10.0",
37
+ "@stenajs-webui/core": "21.10.0",
38
+ "@stenajs-webui/elements": "21.10.0",
39
+ "@stenajs-webui/forms": "21.10.0",
40
+ "@stenajs-webui/modal": "21.10.0",
41
+ "@stenajs-webui/panels": "21.10.0",
42
+ "@stenajs-webui/redux": "21.10.0",
43
+ "@stenajs-webui/select": "21.10.0",
44
+ "@stenajs-webui/theme": "21.10.0",
45
45
  "date-fns": "3.6.0",
46
46
  "lodash-es": "^4.17.21"
47
47
  },
@@ -71,5 +71,5 @@
71
71
  "files": [
72
72
  "dist"
73
73
  ],
74
- "gitHead": "ec426180b80c80a698c805d54b530d10f54bb485"
74
+ "gitHead": "b02af89951bf394379a02c8e8dc5ad5182d36daa"
75
75
  }