@dereekb/dbx-form 8.3.0 → 8.4.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,5 @@
1
1
  export * from './pickable';
2
2
  export * from './searchable';
3
3
  export * from './selection';
4
+ export * from './selection.field';
4
5
  export * from './selection.module';
@@ -0,0 +1,14 @@
1
+ import { FormlyFieldConfig } from '@ngx-formly/core';
2
+ import { DescriptionFieldConfig, LabeledFieldConfig } from '../field';
3
+ export interface ValueSelectionOption<T> {
4
+ value: T;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface ValueSelectionFieldConfig<T> extends LabeledFieldConfig, DescriptionFieldConfig {
9
+ native?: boolean;
10
+ options: ValueSelectionOption<T>[];
11
+ multiple?: boolean;
12
+ selectAllOption?: true | string;
13
+ }
14
+ export declare function valueSelectionField<T>(config: ValueSelectionFieldConfig<T>): FormlyFieldConfig;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated use ValueSelectionOption instead.
3
+ */
1
4
  export interface EnumValueFieldOption<T> {
2
5
  value: T;
3
6
  label: string;
@@ -1,6 +1,9 @@
1
1
  import { DescriptionFieldConfig, LabeledFieldConfig } from '../../field';
2
2
  import { FormlyFieldConfig } from '@ngx-formly/core';
3
3
  import { EnumValueFieldOption } from './enum';
4
+ /**
5
+ * @deprecated
6
+ */
4
7
  export interface StaticEnumFieldConfig<T> extends LabeledFieldConfig, DescriptionFieldConfig {
5
8
  /**
6
9
  * Whether or not multiple values can be selected.
@@ -11,4 +14,7 @@ export interface StaticEnumFieldConfig<T> extends LabeledFieldConfig, Descriptio
11
14
  */
12
15
  options: EnumValueFieldOption<T>[];
13
16
  }
17
+ /**
18
+ * @deprecated use valueSelectionField instead.
19
+ */
14
20
  export declare function staticEnumField<T = unknown>({ key, label, placeholder, description, multiple, required, options }: StaticEnumFieldConfig<T>): FormlyFieldConfig;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-form",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/core": "^13.0.0",
7
- "@dereekb/dbx-core": "8.3.0",
7
+ "@dereekb/dbx-core": "8.4.0",
8
8
  "@angular/material": "^13.0.0",
9
- "@dereekb/dbx-web": "8.3.0",
9
+ "@dereekb/dbx-web": "8.4.0",
10
10
  "@angular/forms": "^13.0.0",
11
11
  "@ngx-formly/core": "6.0.0-beta.2",
12
12
  "@ngx-formly/material": "6.0.0-beta.2",