onekijs-ui 0.20.0 → 0.20.2

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.
@@ -9,7 +9,7 @@ export declare const getIconDivProps: (props: IconProps) => {
9
9
  checked?: boolean | undefined;
10
10
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
11
11
  disabled?: boolean | undefined;
12
- enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
12
+ enterKeyHint?: "search" | "done" | "next" | "previous" | "enter" | "go" | "send" | undefined;
13
13
  form?: string | undefined;
14
14
  formAction?: string | undefined;
15
15
  formEncType?: string | undefined;
@@ -80,11 +80,11 @@ export declare const getIconDivProps: (props: IconProps) => {
80
80
  results?: number | undefined;
81
81
  security?: string | undefined;
82
82
  unselectable?: "on" | "off" | undefined;
83
- inputMode?: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
83
+ inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
84
84
  is?: string | undefined;
85
85
  'aria-activedescendant'?: string | undefined;
86
86
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
87
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
87
+ 'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
88
88
  'aria-braillelabel'?: string | undefined;
89
89
  'aria-brailleroledescription'?: string | undefined;
90
90
  'aria-busy'?: (boolean | "true" | "false") | undefined;
@@ -94,17 +94,17 @@ export declare const getIconDivProps: (props: IconProps) => {
94
94
  'aria-colindextext'?: string | undefined;
95
95
  'aria-colspan'?: number | undefined;
96
96
  'aria-controls'?: string | undefined;
97
- 'aria-current'?: boolean | "time" | "step" | "date" | "true" | "false" | "page" | "location" | undefined;
97
+ 'aria-current'?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
98
98
  'aria-describedby'?: string | undefined;
99
99
  'aria-description'?: string | undefined;
100
100
  'aria-details'?: string | undefined;
101
101
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
102
- 'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
102
+ 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
103
103
  'aria-errormessage'?: string | undefined;
104
104
  'aria-expanded'?: (boolean | "true" | "false") | undefined;
105
105
  'aria-flowto'?: string | undefined;
106
106
  'aria-grabbed'?: (boolean | "true" | "false") | undefined;
107
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
107
+ 'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "true" | "false" | "grid" | "tree" | undefined;
108
108
  'aria-hidden'?: (boolean | "true" | "false") | undefined;
109
109
  'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
110
110
  'aria-keyshortcuts'?: string | undefined;
@@ -5,15 +5,15 @@ declare class SelectService<T = any, I extends SelectItem<T> = SelectItem<T>, S
5
5
  protected lastCheckQuery: Query | undefined;
6
6
  get defaultValue(): T | T[] | null | undefined;
7
7
  get defaultValueLoading(): boolean | undefined;
8
- check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>;
8
+ check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | CollectionFetcherResult<T> | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | CollectionFetcherResult<T> | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>;
9
9
  setData(data: T[], query?: Query): void;
10
- setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>, void, unknown>;
10
+ setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | CollectionFetcherResult<T> | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | CollectionFetcherResult<T> | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>, void, unknown>;
11
11
  setDefaultValueLoading(loading: boolean): void;
12
12
  setItemWidth(_item: I, value: number): void;
13
13
  setValue(value: null | T | T[]): void;
14
14
  setUrl(url: string, query?: Query): void;
15
15
  _buildItem(data: T | null | undefined, adaptee: unknown, context?: AnonymousObject): I;
16
- _filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>;
16
+ _filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | CollectionFetcherResult<T> | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>;
17
17
  _compareItem(a: I | undefined, b: I | undefined): boolean;
18
18
  _setDefaultValue(value: T | T[] | null | undefined): void;
19
19
  _setValidDefaultValue(value: T | T[] | null): void;
package/dist/index.js CHANGED
@@ -1895,11 +1895,13 @@ const Alert = styled(AlertComponent) `
1895
1895
  ${alertStyle}
1896
1896
  `;
1897
1897
 
1898
- const FormCard = ({ name, help, children, ...cardProps }) => {
1898
+ const FormCard = ({ name, help, children, visible, disabled, ...cardProps }) => {
1899
1899
  const decorator = onekijsFramework.useFormDecorator(name, {
1900
1900
  Displayer: (displayerProps) => {
1901
1901
  return React.createElement(FormCardDisplayer, { ...displayerProps, name: typeof cardProps.title === 'string' ? cardProps.title : titlelize(name) });
1902
1902
  },
1903
+ visible,
1904
+ disabled,
1903
1905
  });
1904
1906
  const form = onekijsFramework.useForm();
1905
1907
  const metadata = onekijsFramework.useFormMetadata(decorator.name);
@@ -6474,7 +6476,8 @@ let SelectService = class SelectService extends onekijsFramework.CollectionServi
6474
6476
  let isValid = false;
6475
6477
  if (!this.state.items || !this.state.items.find((i) => i?.uid === item.uid)) {
6476
6478
  query = Object.assign({}, query, { search: item.text });
6477
- if (this.state.local) {
6479
+ const local = this.state.fetchOnce ? this.status === onekijsFramework.LoadingStatus.Loaded : this.state.local;
6480
+ if (local) {
6478
6481
  const queryEngine = this.state.queryEngine || this._execute.bind(this);
6479
6482
  const result = yield queryEngine(this._db || [], query, this.state.comparator || onekijsFramework.defaultComparator, this.state.comparators || {});
6480
6483
  isValid = !!result.find((i) => this._compareItem(i, item));