@dereekb/dbx-form 9.16.0 → 9.16.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.
@@ -1,11 +1,16 @@
1
1
  import { ObservableOrValue } from '@dereekb/rxjs';
2
2
  import { FormlyFieldConfig } from '@ngx-formly/core';
3
3
  import { DescriptionFieldConfig, LabeledFieldConfig } from '../field';
4
- export interface ValueSelectionOption<T> {
4
+ export interface ValueSelectionOptionWithValue<T> {
5
5
  value: T;
6
6
  label: string;
7
7
  disabled?: boolean;
8
8
  }
9
+ export interface ValueSelectionOptionClear {
10
+ label?: string;
11
+ clear: true;
12
+ }
13
+ export declare type ValueSelectionOption<T> = ValueSelectionOptionWithValue<T> | ValueSelectionOptionClear;
9
14
  export interface ValueSelectionFieldConfig<T> extends LabeledFieldConfig, DescriptionFieldConfig {
10
15
  /**
11
16
  * Whether or not to use the native select.
@@ -13,8 +18,13 @@ export interface ValueSelectionFieldConfig<T> extends LabeledFieldConfig, Descri
13
18
  * Be sure to import FormlyMatNativeSelectModule.
14
19
  */
15
20
  native?: boolean;
21
+ /**
22
+ * Whether or not to add a clear option to the input values. If using an observable, this
23
+ */
24
+ addClearOption?: string | boolean;
16
25
  options: ObservableOrValue<ValueSelectionOption<T>[]>;
17
26
  multiple?: boolean;
18
27
  selectAllOption?: true | string;
19
28
  }
20
29
  export declare function valueSelectionField<T>(config: ValueSelectionFieldConfig<T>): FormlyFieldConfig;
30
+ export declare function addValueSelectionOptionFunction<T>(label?: string | undefined): (options: ValueSelectionOption<T>[]) => ValueSelectionOption<T>[];
@@ -4,6 +4,12 @@
4
4
 
5
5
  // MARK: Mixin
6
6
  @mixin core() {
7
+ .mat-form-field.mat-form-field-type-toggle {
8
+ .mat-form-field-wrapper .mat-form-field-subscript-wrapper {
9
+ // margin on the checkbox field is unnecessary. By removing it, it becomes more in-line with the other fields.
10
+ margin-top: 0px;
11
+ }
12
+ }
7
13
  }
8
14
 
9
15
  @mixin color($theme-config) {
@@ -4,7 +4,7 @@ import { LabeledFieldConfig, DescriptionFieldConfig } from '../../field';
4
4
  export declare const PHONE_LABEL_MAX_LENGTH = 100;
5
5
  export declare const LABEL_STRING_MAX_LENGTH = 100;
6
6
  export declare const SEARCH_STRING_MAX_LENGTH = 100;
7
- export declare function nameField({ key, label, placeholder, required, minLength, maxLength, attributes }?: Partial<TextFieldConfig>): FormlyFieldConfig;
7
+ export declare function nameField(config?: Partial<TextFieldConfig>): FormlyFieldConfig;
8
8
  export interface EmailFieldConfig extends Partial<LabeledFieldConfig>, DescriptionFieldConfig {
9
9
  rows?: number;
10
10
  }
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-form/mapbox",
3
- "version": "9.16.0",
3
+ "version": "9.16.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.1.0",
6
6
  "@angular/core": "^14.1.0",
7
7
  "@angular/forms": "^14.0.0",
8
- "@dereekb/dbx-web": "9.16.0",
8
+ "@dereekb/dbx-web": "9.16.2",
9
9
  "@ngx-formly/core": "6.0.0-rc.2",
10
10
  "@ngx-formly/material": "6.0.0-rc.2",
11
11
  "@ng-web-apis/geolocation": "^2.0.0",
12
12
  "mapbox-gl": "^2.9.2",
13
- "@dereekb/dbx-web/mapbox": "9.16.0",
14
- "@dereekb/dbx-form": "9.16.0"
13
+ "@dereekb/dbx-web/mapbox": "9.16.2",
14
+ "@dereekb/dbx-form": "9.16.2"
15
15
  },
16
16
  "dependencies": {
17
17
  "tslib": "^2.3.0"
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-form",
3
- "version": "9.16.0",
3
+ "version": "9.16.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.0",
6
6
  "@angular/core": "^14.0.0",
7
7
  "lodash.clonedeep": "^4.5.0",
8
- "@dereekb/dbx-core": "9.16.0",
8
+ "@dereekb/dbx-core": "9.16.2",
9
9
  "@angular/material": "^14.0.0",
10
- "@dereekb/dbx-web": "9.16.0",
10
+ "@dereekb/dbx-web": "9.16.2",
11
11
  "@angular/forms": "^14.0.0",
12
12
  "@ngx-formly/core": "6.0.0-rc.2",
13
13
  "@ngx-formly/material": "6.0.0-rc.2",
14
14
  "change-case": "^4.1.2",
15
15
  "ngx-editor": "^15.0.0",
16
16
  "ngx-mat-intl-tel-input": "^5.0.0",
17
- "@dereekb/model": "9.16.0"
17
+ "@dereekb/model": "9.16.2"
18
18
  },
19
19
  "dependencies": {
20
20
  "tslib": "^2.3.0"