@ember-eui/validated-form 7.1.5 → 8.0.0-beta.12
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/addon-main.js +5 -0
- package/declarations/components/validated-form/field-base/index.d.ts +37 -0
- package/declarations/components/validated-form/field-base/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-base.d.ts +56 -0
- package/declarations/components/validated-form/field-base.d.ts.map +1 -0
- package/declarations/components/validated-form/field-checkbox-group/index.d.ts +8 -0
- package/declarations/components/validated-form/field-checkbox-group/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-checkbox-group.d.ts +30 -0
- package/declarations/components/validated-form/field-checkbox-group.d.ts.map +1 -0
- package/declarations/components/validated-form/field-combo-box/index.d.ts +5 -0
- package/declarations/components/validated-form/field-combo-box/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-combo-box.d.ts +27 -0
- package/declarations/components/validated-form/field-combo-box.d.ts.map +1 -0
- package/declarations/components/validated-form/field-dual-range-slider/index.d.ts +5 -0
- package/declarations/components/validated-form/field-dual-range-slider/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-dual-range-slider.d.ts +32 -0
- package/declarations/components/validated-form/field-dual-range-slider.d.ts.map +1 -0
- package/{addon/components/validated-form/field-markdown-editor/index.js → declarations/components/validated-form/field-markdown-editor/index.d.ts} +3 -8
- package/declarations/components/validated-form/field-markdown-editor/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-markdown-editor.d.ts +25 -0
- package/declarations/components/validated-form/field-markdown-editor.d.ts.map +1 -0
- package/{addon/components/validated-form/field-number/index.js → declarations/components/validated-form/field-number/index.d.ts} +3 -2
- package/declarations/components/validated-form/field-number/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-number.d.ts +24 -0
- package/declarations/components/validated-form/field-number.d.ts.map +1 -0
- package/{addon/components/validated-form/field-password/index.js → declarations/components/validated-form/field-password/index.d.ts} +3 -2
- package/declarations/components/validated-form/field-password/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-password.d.ts +24 -0
- package/declarations/components/validated-form/field-password.d.ts.map +1 -0
- package/declarations/components/validated-form/field-radio-group/index.d.ts +8 -0
- package/declarations/components/validated-form/field-radio-group/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-radio-group.d.ts +29 -0
- package/declarations/components/validated-form/field-radio-group.d.ts.map +1 -0
- package/{addon/components/validated-form/field-range-slider/index.js → declarations/components/validated-form/field-range-slider/index.d.ts} +3 -2
- package/declarations/components/validated-form/field-range-slider/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-range-slider.d.ts +28 -0
- package/declarations/components/validated-form/field-range-slider.d.ts.map +1 -0
- package/{addon/components/validated-form/field-select/index.js → declarations/components/validated-form/field-select/index.d.ts} +3 -2
- package/declarations/components/validated-form/field-select/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-select.d.ts +23 -0
- package/declarations/components/validated-form/field-select.d.ts.map +1 -0
- package/declarations/components/validated-form/field-switch/index.d.ts +5 -0
- package/declarations/components/validated-form/field-switch/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-switch.d.ts +24 -0
- package/declarations/components/validated-form/field-switch.d.ts.map +1 -0
- package/{addon/components/validated-form/field-text/index.js → declarations/components/validated-form/field-text/index.d.ts} +3 -2
- package/declarations/components/validated-form/field-text/index.d.ts.map +1 -0
- package/{addon/components/validated-form/field-text-area/index.js → declarations/components/validated-form/field-text-area/index.d.ts} +3 -2
- package/declarations/components/validated-form/field-text-area/index.d.ts.map +1 -0
- package/declarations/components/validated-form/field-text-area.d.ts +29 -0
- package/declarations/components/validated-form/field-text-area.d.ts.map +1 -0
- package/declarations/components/validated-form/field-text.d.ts +22 -0
- package/declarations/components/validated-form/field-text.d.ts.map +1 -0
- package/declarations/components/validated-form/index.d.ts +30 -0
- package/declarations/components/validated-form/index.d.ts.map +1 -0
- package/declarations/components/validated-form.d.ts +91 -0
- package/declarations/components/validated-form.d.ts.map +1 -0
- package/declarations/utils/build-validation-messages.d.ts +13 -0
- package/declarations/utils/build-validation-messages.d.ts.map +1 -0
- package/declarations/utils/get-messages.d.ts +11 -0
- package/declarations/utils/get-messages.d.ts.map +1 -0
- package/declarations/utils/validation-errors.d.ts +2 -0
- package/declarations/utils/validation-errors.d.ts.map +1 -0
- package/declarations/utils/with-defaults.d.ts +10 -0
- package/declarations/utils/with-defaults.d.ts.map +1 -0
- package/declarations/validators/messages.d.ts +4 -0
- package/declarations/validators/messages.d.ts.map +1 -0
- package/dist/_app_/components/validated-form/field-base.js +1 -0
- package/dist/_app_/components/validated-form/field-checkbox-group.js +1 -0
- package/dist/_app_/components/validated-form/field-combo-box.js +1 -0
- package/dist/_app_/components/validated-form/field-dual-range-slider.js +1 -0
- package/dist/_app_/components/validated-form/field-markdown-editor.js +1 -0
- package/dist/_app_/components/validated-form/field-number.js +1 -0
- package/dist/_app_/components/validated-form/field-password.js +1 -0
- package/dist/_app_/components/validated-form/field-radio-group.js +1 -0
- package/dist/_app_/components/validated-form/field-range-slider.js +1 -0
- package/dist/_app_/components/validated-form/field-select.js +1 -0
- package/dist/_app_/components/validated-form/field-switch.js +1 -0
- package/dist/_app_/components/validated-form/field-text-area.js +1 -0
- package/dist/_app_/components/validated-form/field-text.js +1 -0
- package/dist/_app_/components/validated-form.js +1 -0
- package/dist/_app_/utils/build-validation-messages.js +1 -0
- package/dist/_app_/utils/get-messages.js +1 -0
- package/dist/_app_/utils/validation-errors.js +1 -0
- package/dist/_app_/utils/with-defaults.js +1 -0
- package/dist/_app_/validators/messages.js +1 -0
- package/dist/components/validated-form/field-base.js +7 -0
- package/dist/components/validated-form/field-base.js.map +1 -0
- package/dist/components/validated-form/field-checkbox-group.js +104 -0
- package/dist/components/validated-form/field-checkbox-group.js.map +1 -0
- package/dist/components/validated-form/field-combo-box.js +106 -0
- package/dist/components/validated-form/field-combo-box.js.map +1 -0
- package/dist/components/validated-form/field-dual-range-slider.js +112 -0
- package/dist/components/validated-form/field-dual-range-slider.js.map +1 -0
- package/dist/components/validated-form/field-markdown-editor.js +102 -0
- package/dist/components/validated-form/field-markdown-editor.js.map +1 -0
- package/dist/components/validated-form/field-number.js +94 -0
- package/dist/components/validated-form/field-number.js.map +1 -0
- package/dist/components/validated-form/field-password.js +87 -0
- package/dist/components/validated-form/field-password.js.map +1 -0
- package/dist/components/validated-form/field-radio-group.js +102 -0
- package/dist/components/validated-form/field-radio-group.js.map +1 -0
- package/dist/components/validated-form/field-range-slider.js +119 -0
- package/dist/components/validated-form/field-range-slider.js.map +1 -0
- package/dist/components/validated-form/field-select.js +88 -0
- package/dist/components/validated-form/field-select.js.map +1 -0
- package/dist/components/validated-form/field-switch.js +87 -0
- package/dist/components/validated-form/field-switch.js.map +1 -0
- package/dist/components/validated-form/field-text-area.js +80 -0
- package/dist/components/validated-form/field-text-area.js.map +1 -0
- package/dist/components/validated-form/field-text.js +90 -0
- package/dist/components/validated-form/field-text.js.map +1 -0
- package/dist/components/validated-form.js +303 -0
- package/dist/components/validated-form.js.map +1 -0
- package/dist/field-base-t4F7Xj_I.js +185 -0
- package/dist/field-base-t4F7Xj_I.js.map +1 -0
- package/{addon → dist}/utils/build-validation-messages.js +13 -36
- package/dist/utils/build-validation-messages.js.map +1 -0
- package/{addon → dist}/utils/get-messages.js +6 -7
- package/dist/utils/get-messages.js.map +1 -0
- package/dist/utils/validation-errors.js +18 -0
- package/dist/utils/validation-errors.js.map +1 -0
- package/{addon → dist}/utils/with-defaults.js +5 -2
- package/dist/utils/with-defaults.js.map +1 -0
- package/dist/validators/messages.js +7 -0
- package/dist/validators/messages.js.map +1 -0
- package/package.json +116 -75
- package/addon/components/validated-form/field-base/index.js +0 -144
- package/addon/components/validated-form/field-checkbox-group/index.hbs +0 -47
- package/addon/components/validated-form/field-checkbox-group/index.js +0 -42
- package/addon/components/validated-form/field-combo-box/index.hbs +0 -65
- package/addon/components/validated-form/field-combo-box/index.js +0 -12
- package/addon/components/validated-form/field-dual-range-slider/index.hbs +0 -80
- package/addon/components/validated-form/field-dual-range-slider/index.js +0 -12
- package/addon/components/validated-form/field-markdown-editor/index.hbs +0 -61
- package/addon/components/validated-form/field-number/index.hbs +0 -63
- package/addon/components/validated-form/field-password/index.hbs +0 -56
- package/addon/components/validated-form/field-radio-group/index.hbs +0 -45
- package/addon/components/validated-form/field-radio-group/index.js +0 -39
- package/addon/components/validated-form/field-range-slider/index.hbs +0 -93
- package/addon/components/validated-form/field-select/index.hbs +0 -57
- package/addon/components/validated-form/field-switch/index.hbs +0 -48
- package/addon/components/validated-form/field-switch/index.js +0 -12
- package/addon/components/validated-form/field-text/index.hbs +0 -59
- package/addon/components/validated-form/field-text-area/index.hbs +0 -54
- package/addon/components/validated-form/index.hbs +0 -158
- package/addon/components/validated-form/index.js +0 -132
- package/addon/utils/validation-errors.js +0 -13
- package/addon/validators/messages.js +0 -4
- package/app/components/validated-form/field-base/index.js +0 -1
- package/app/components/validated-form/field-checkbox-group/index.js +0 -1
- package/app/components/validated-form/field-combo-box/index.js +0 -1
- package/app/components/validated-form/field-dual-range-slider/index.js +0 -1
- package/app/components/validated-form/field-markdown-editor/index.js +0 -1
- package/app/components/validated-form/field-number/index.js +0 -1
- package/app/components/validated-form/field-password/index.js +0 -1
- package/app/components/validated-form/field-radio-group/index.js +0 -1
- package/app/components/validated-form/field-range-slider/index.js +0 -1
- package/app/components/validated-form/field-select/index.js +0 -1
- package/app/components/validated-form/field-switch/index.js +0 -1
- package/app/components/validated-form/field-text/index.js +0 -1
- package/app/components/validated-form/field-text-area/index.js +0 -1
- package/app/components/validated-form/index.js +0 -1
- package/app/utils/build-validation-messages.js +0 -1
- package/app/utils/get-messages.js +0 -1
- package/app/utils/validation-errors.js +0 -1
- package/app/validators/messages.js +0 -1
- package/config/environment.js +0 -5
- package/docs/validated-form-demo/demo1.md +0 -162
- package/docs/validated-form.md +0 -1
- package/index.js +0 -5
- package/tsconfig.json +0 -27
- package/types/dummy/index.d.ts +0 -1
- package/types/global.d.ts +0 -22
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
<:field>
|
|
26
|
-
{{#let
|
|
27
|
-
(if
|
|
28
|
-
@editorComponent
|
|
29
|
-
(component (ensure-safe-component @editorComponent))
|
|
30
|
-
(component "eui-markdown-editor")
|
|
31
|
-
)
|
|
32
|
-
as |MarkdownEditor|
|
|
33
|
-
}}
|
|
34
|
-
<MarkdownEditor
|
|
35
|
-
class={{@fieldClasses}}
|
|
36
|
-
form={{@formId}}
|
|
37
|
-
aria-label={{@ariaLabel}}
|
|
38
|
-
@value={{@value}}
|
|
39
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
40
|
-
@disabled={{@disabled}}
|
|
41
|
-
@editorId={{theId}}
|
|
42
|
-
@onChange={{this.handleChange}}
|
|
43
|
-
@ariaDescribedBy={{@ariaDescribedBy}}
|
|
44
|
-
@ariaLabel={{@ariaLabel}}
|
|
45
|
-
@ariaLabelledBy={{@ariaLabelledBy}}
|
|
46
|
-
autofocus={{@autofocus}}
|
|
47
|
-
placeholder={{@placeholder}}
|
|
48
|
-
@onParse={{@onParse}}
|
|
49
|
-
@parsingPluginList={{@parsingPluginList}}
|
|
50
|
-
@uiPlugins={{@uiPlugins}}
|
|
51
|
-
@height={{@height}}
|
|
52
|
-
@maxHeight={{@maxHeight}}
|
|
53
|
-
@autoExpandPreview={{@autoExpandPreview}}
|
|
54
|
-
@initialViewMode={{@initialViewMode}}
|
|
55
|
-
...attributes
|
|
56
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
57
|
-
/>
|
|
58
|
-
{{/let}}
|
|
59
|
-
</:field>
|
|
60
|
-
</EuiFormRow>
|
|
61
|
-
{{/let}}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
|
|
26
|
-
<:field>
|
|
27
|
-
<EuiFieldNumber
|
|
28
|
-
class={{@fieldClasses}}
|
|
29
|
-
form={{@formId}}
|
|
30
|
-
aria-label={{@ariaLabel}}
|
|
31
|
-
@value={{@value}}
|
|
32
|
-
@icon={{@icon}}
|
|
33
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
34
|
-
@fullWidth={{@fullWidth}}
|
|
35
|
-
@isLoading={{@isLoading}}
|
|
36
|
-
@readOnly={{@readOnly}}
|
|
37
|
-
@disabled={{@disabled}}
|
|
38
|
-
@min={{@min}}
|
|
39
|
-
@max={{@max}}
|
|
40
|
-
@step={{@step}}
|
|
41
|
-
@inputRef={{@inputRef}}
|
|
42
|
-
@controlOnly={{@controlOnly}}
|
|
43
|
-
@compressed={{@compressed}}
|
|
44
|
-
@id={{theId}}
|
|
45
|
-
@clear={{@clear}}
|
|
46
|
-
@isPrependProvided={{has-block "prepend"}}
|
|
47
|
-
@isAppendProvided={{has-block "append"}}
|
|
48
|
-
autofocus={{@autofocus}}
|
|
49
|
-
placeholder={{@placeholder}}
|
|
50
|
-
...attributes
|
|
51
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
52
|
-
{{on "input" this.handleChange}}
|
|
53
|
-
>
|
|
54
|
-
<:prepend as |classes|>
|
|
55
|
-
{{yield classes to="prepend"}}
|
|
56
|
-
</:prepend>
|
|
57
|
-
<:append as |classes|>
|
|
58
|
-
{{yield classes to="append"}}
|
|
59
|
-
</:append>
|
|
60
|
-
</EuiFieldNumber>
|
|
61
|
-
</:field>
|
|
62
|
-
</EuiFormRow>
|
|
63
|
-
{{/let}}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
<:field>
|
|
26
|
-
<EuiFieldPassword
|
|
27
|
-
class={{@fieldClasses}}
|
|
28
|
-
form={{@formId}}
|
|
29
|
-
aria-label={{@ariaLabel}}
|
|
30
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
31
|
-
@fullWidth={{@fullWidth}}
|
|
32
|
-
@isLoading={{@isLoading}}
|
|
33
|
-
@compressed={{@compressed}}
|
|
34
|
-
@inputRef={{@inputRef}}
|
|
35
|
-
@value={{@value}}
|
|
36
|
-
@type={{@type}}
|
|
37
|
-
@id={{theId}}
|
|
38
|
-
@disabled={{@disabled}}
|
|
39
|
-
@isFakePrependBlock={{not (has-block "prepend")}}
|
|
40
|
-
@isFakeAppendBlock={{not (has-block "append")}}
|
|
41
|
-
autofocus={{@autofocus}}
|
|
42
|
-
placeholder={{@placeholder}}
|
|
43
|
-
...attributes
|
|
44
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
45
|
-
{{on "input" this.handleChange}}
|
|
46
|
-
>
|
|
47
|
-
<:prepend as |classes|>
|
|
48
|
-
{{yield classes to="prepend"}}
|
|
49
|
-
</:prepend>
|
|
50
|
-
<:append as |classes|>
|
|
51
|
-
{{yield classes to="append"}}
|
|
52
|
-
</:append>
|
|
53
|
-
</EuiFieldPassword>
|
|
54
|
-
</:field>
|
|
55
|
-
</EuiFormRow>
|
|
56
|
-
{{/let}}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
<:field>
|
|
26
|
-
<EuiRadioGroup
|
|
27
|
-
class={{@fieldClasses}}
|
|
28
|
-
@formId={{@formId}}
|
|
29
|
-
aria-label={{@ariaLabel}}
|
|
30
|
-
@disabled={{@disabled}}
|
|
31
|
-
@valueKey={{@valueKey}}
|
|
32
|
-
@labelKey={{@labelKey}}
|
|
33
|
-
@compressed={{@compressed}}
|
|
34
|
-
@name={{@name}}
|
|
35
|
-
@options={{this.options}}
|
|
36
|
-
@idSelected={{this.value}}
|
|
37
|
-
@legend={{@legend}}
|
|
38
|
-
@id={{theId}}
|
|
39
|
-
@onChange={{this.handleChange}}
|
|
40
|
-
autofocus={{@autofocus}}
|
|
41
|
-
...attributes
|
|
42
|
-
/>
|
|
43
|
-
</:field>
|
|
44
|
-
</EuiFormRow>
|
|
45
|
-
{{/let}}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import ValidatedFormFieldBase from '../field-base';
|
|
2
|
-
import { action } from '@ember/object';
|
|
3
|
-
import { maybeUnwrapProxy } from '@ember-eui/core/utils/maybe-unwrap-proxy';
|
|
4
|
-
export default class ValidatedFormFieldRadioGroup extends ValidatedFormFieldBase {
|
|
5
|
-
get value() {
|
|
6
|
-
let value = maybeUnwrapProxy(this.args.value);
|
|
7
|
-
return value?.toArray?.() || value;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
get arrayToMap() {
|
|
11
|
-
const currArr = this.args.value || [];
|
|
12
|
-
return this.transformToMap(currArr);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
transformToMap(value = []) {
|
|
16
|
-
let valuesMap = value.reduce((acc, val) => {
|
|
17
|
-
acc[val] = true;
|
|
18
|
-
return acc;
|
|
19
|
-
}, {});
|
|
20
|
-
return valuesMap;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@action
|
|
24
|
-
handleChange(optionId) {
|
|
25
|
-
let value = this.value || [];
|
|
26
|
-
|
|
27
|
-
const found = value.find((v) => v === optionId);
|
|
28
|
-
let newArr = [];
|
|
29
|
-
|
|
30
|
-
if (found) {
|
|
31
|
-
newArr = value.filter((v) => v !== optionId);
|
|
32
|
-
} else {
|
|
33
|
-
newArr = [...value, optionId];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
this.args.onChange?.(newArr);
|
|
37
|
-
this.isTouched = true;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
|
|
26
|
-
<:field>
|
|
27
|
-
<EuiRange
|
|
28
|
-
class={{@fieldClasses}}
|
|
29
|
-
form={{@formId}}
|
|
30
|
-
@compressed={{@compressed}}
|
|
31
|
-
@readOnly={{@readOnly}}
|
|
32
|
-
@fullWidth={{@fullWidth}}
|
|
33
|
-
@id={{theId}}
|
|
34
|
-
@levels={{@levels}}
|
|
35
|
-
@step={{@step}}
|
|
36
|
-
@showInput={{@showInput}}
|
|
37
|
-
@showLabels={{@showLabels}}
|
|
38
|
-
@showRange={{@showRange}}
|
|
39
|
-
@showTicks={{@showTicks}}
|
|
40
|
-
@showValue={{@showValue}}
|
|
41
|
-
@disabled={{@disabled}}
|
|
42
|
-
@ticks={{@ticks}}
|
|
43
|
-
@tickInternval={{@tickInternval}}
|
|
44
|
-
@valuePrepend={{@valuePrepend}}
|
|
45
|
-
@valueAppend={{@valueAppend}}
|
|
46
|
-
@onChange={{this.handleChange}}
|
|
47
|
-
@value={{@value}}
|
|
48
|
-
@max={{@max}}
|
|
49
|
-
@isLoading={{@isLoading}}
|
|
50
|
-
@min={{@min}}
|
|
51
|
-
@icon={{@icon}}
|
|
52
|
-
@side={{@side}}
|
|
53
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
54
|
-
@inputRef={{@inputRef}}
|
|
55
|
-
@controlOnly={{@controlOnly}}
|
|
56
|
-
@autoSize={{@autoSize}}
|
|
57
|
-
@isPrependProvided={{has-block "prepend"}}
|
|
58
|
-
@isAppendProvided={{has-block "append"}}
|
|
59
|
-
@isFakeMinBlock={{not (has-block "min")}}
|
|
60
|
-
@isFakeMaxBlock={{not (has-block "max")}}
|
|
61
|
-
@isFakeValueBlock={{not (has-block "value")}}
|
|
62
|
-
@isFakeValuePrependBlock={{not (has-block "valuePrepend")}}
|
|
63
|
-
@isFakeValueAppendBlock={{not (has-block "valueAppend")}}
|
|
64
|
-
aria-label={{@ariaLabel}}
|
|
65
|
-
autofocus={{@autofocus}}
|
|
66
|
-
...attributes
|
|
67
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
68
|
-
>
|
|
69
|
-
<:prepend as |classes|>
|
|
70
|
-
{{yield classes to="prepend"}}
|
|
71
|
-
</:prepend>
|
|
72
|
-
<:min>
|
|
73
|
-
{{yield to="min"}}
|
|
74
|
-
</:min>
|
|
75
|
-
<:valuePrepend>
|
|
76
|
-
{{yield to="valuePrepend"}}
|
|
77
|
-
</:valuePrepend>
|
|
78
|
-
<:value>
|
|
79
|
-
{{yield to="value"}}
|
|
80
|
-
</:value>
|
|
81
|
-
<:valueAppend>
|
|
82
|
-
{{yield to="valueAppend"}}
|
|
83
|
-
</:valueAppend>
|
|
84
|
-
<:max>
|
|
85
|
-
{{yield to="max"}}
|
|
86
|
-
</:max>
|
|
87
|
-
<:append as |classes|>
|
|
88
|
-
{{yield classes to="append"}}
|
|
89
|
-
</:append>
|
|
90
|
-
</EuiRange>
|
|
91
|
-
</:field>
|
|
92
|
-
</EuiFormRow>
|
|
93
|
-
{{/let}}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
|
|
26
|
-
<:field>
|
|
27
|
-
<EuiSelect
|
|
28
|
-
aria-label={{@ariaLabel}}
|
|
29
|
-
class={{@fieldClasses}}
|
|
30
|
-
form={{@formId}}
|
|
31
|
-
@options={{this.options}}
|
|
32
|
-
@isInvalid={{this.isInvalidAndTouchedh}}
|
|
33
|
-
@fullWidth={{@fullWidth}}
|
|
34
|
-
@isLoading={{@isLoading}}
|
|
35
|
-
@hasNoInitialSelection={{@hasNoInitialSelection}}
|
|
36
|
-
@inputRef={{@inputRef}}
|
|
37
|
-
@disabled={{@disabled}}
|
|
38
|
-
@value={{@value}}
|
|
39
|
-
@compressed={{@compressed}}
|
|
40
|
-
@isFakePrependBlock={{not (has-block "prepend")}}
|
|
41
|
-
@isFakeAppendBlock={{not (has-block "append")}}
|
|
42
|
-
@id={{theId}}
|
|
43
|
-
autofocus={{@autofocus}}
|
|
44
|
-
...attributes
|
|
45
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
46
|
-
{{on "change" this.handleChange}}
|
|
47
|
-
>
|
|
48
|
-
<:prepend as |classes|>
|
|
49
|
-
{{yield classes to="prepend"}}
|
|
50
|
-
</:prepend>
|
|
51
|
-
<:append as |classes|>
|
|
52
|
-
{{yield classes to="append"}}
|
|
53
|
-
</:append>
|
|
54
|
-
</EuiSelect>
|
|
55
|
-
</:field>
|
|
56
|
-
</EuiFormRow>
|
|
57
|
-
{{/let}}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
<:field>
|
|
26
|
-
<EuiSwitch
|
|
27
|
-
class={{@fieldClasses}}
|
|
28
|
-
form={{@formId}}
|
|
29
|
-
aria-label={{@ariaLabel}}
|
|
30
|
-
@id={{theId}}
|
|
31
|
-
@showLabel={{@showLabel}}
|
|
32
|
-
@label={{@switchLabel}}
|
|
33
|
-
@checked={{@value}}
|
|
34
|
-
@onChange={{this.handleChange}}
|
|
35
|
-
@isFakeLabelBlock={{not (has-block "switch-label")}}
|
|
36
|
-
@disabled={{@disabled}}
|
|
37
|
-
@compressed={{@compressed}}
|
|
38
|
-
@type={{@type}}
|
|
39
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
40
|
-
...attributes
|
|
41
|
-
>
|
|
42
|
-
<:label>
|
|
43
|
-
{{yield to="switch-label"}}
|
|
44
|
-
</:label>
|
|
45
|
-
</EuiSwitch>
|
|
46
|
-
</:field>
|
|
47
|
-
</EuiFormRow>
|
|
48
|
-
{{/let}}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import ValidatedFormFieldBase from '../field-base';
|
|
2
|
-
import { action } from '@ember/object';
|
|
3
|
-
|
|
4
|
-
export default class ValidatedFormFieldSwitch extends ValidatedFormFieldBase {
|
|
5
|
-
@action
|
|
6
|
-
handleChange(e) {
|
|
7
|
-
e.preventDefault();
|
|
8
|
-
const checked = e.target.checked;
|
|
9
|
-
this.args.onChange?.(checked, e);
|
|
10
|
-
this.notifyValidityChange();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
<:field>
|
|
26
|
-
<EuiFieldText
|
|
27
|
-
class={{@fieldClasses}}
|
|
28
|
-
aria-label={{@ariaLabel}}
|
|
29
|
-
form={{@formId}}
|
|
30
|
-
@value={{@value}}
|
|
31
|
-
@icon={{@icon}}
|
|
32
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
33
|
-
@fullWidth={{@fullWidth}}
|
|
34
|
-
@isLoading={{@isLoading}}
|
|
35
|
-
@disabled={{@disabled}}
|
|
36
|
-
@readOnly={{@readOnly}}
|
|
37
|
-
@inputRef={{@inputRef}}
|
|
38
|
-
@controlOnly={{@controlOnly}}
|
|
39
|
-
@compressed={{@compressed}}
|
|
40
|
-
@clear={{@clear}}
|
|
41
|
-
@id={{theId}}
|
|
42
|
-
@isFakePrependBlock={{not (has-block "prepend")}}
|
|
43
|
-
@isFakeAppendBlock={{not (has-block "append")}}
|
|
44
|
-
autofocus={{@autofocus}}
|
|
45
|
-
placeholder={{@placeholder}}
|
|
46
|
-
...attributes
|
|
47
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
48
|
-
{{on "input" this.handleChange}}
|
|
49
|
-
>
|
|
50
|
-
<:prepend as |classes|>
|
|
51
|
-
{{yield classes to="prepend"}}
|
|
52
|
-
</:prepend>
|
|
53
|
-
<:append as |classes|>
|
|
54
|
-
{{yield classes to="append"}}
|
|
55
|
-
</:append>
|
|
56
|
-
</EuiFieldText>
|
|
57
|
-
</:field>
|
|
58
|
-
</EuiFormRow>
|
|
59
|
-
{{/let}}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{{#let (arg-or-default @id (unique-id)) as |theId|}}
|
|
2
|
-
<EuiFormRow
|
|
3
|
-
class={{@rowClasses}}
|
|
4
|
-
@extra={{this.rowExtra}}
|
|
5
|
-
@labelType={{@labelType}}
|
|
6
|
-
@display={{@display}}
|
|
7
|
-
@hasEmptyLabelSpace={{@hasEmptyLabelSpace}}
|
|
8
|
-
@fullWidth={{@fullWidth}}
|
|
9
|
-
@hasChildLabel={{@hasChildLabel}}
|
|
10
|
-
@label={{this.label}}
|
|
11
|
-
@labelAppend={{@labelAppend}}
|
|
12
|
-
@id={{theId}}
|
|
13
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
14
|
-
@error={{this.validationErrorMessages}}
|
|
15
|
-
@helpText={{@helpText}}
|
|
16
|
-
@errorClasses={{@errorClasses}}
|
|
17
|
-
@isFakeLabelBlock={{not (has-block "label")}}
|
|
18
|
-
{{did-insert this.setValidationMessages}}
|
|
19
|
-
{{did-update this.didUpdateValue @validations}}
|
|
20
|
-
{{did-update this.didUpdateValue @value}}
|
|
21
|
-
>
|
|
22
|
-
<:label>
|
|
23
|
-
{{yield to="label"}}
|
|
24
|
-
</:label>
|
|
25
|
-
<:field>
|
|
26
|
-
<EuiTextArea
|
|
27
|
-
class={{@fieldClasses}}
|
|
28
|
-
form={{@formId}}
|
|
29
|
-
aria-label={{@ariaLabel}}
|
|
30
|
-
@value={{@value}}
|
|
31
|
-
@isInvalid={{this.isInvalidAndTouched}}
|
|
32
|
-
@fullWidth={{@fullWidth}}
|
|
33
|
-
@compressed={{@compressed}}
|
|
34
|
-
@resize={{@resize}}
|
|
35
|
-
@disabled={{@disabled}}
|
|
36
|
-
@inputRef={{@inputRef}}
|
|
37
|
-
@id={{theId}}
|
|
38
|
-
@rows={{@rows}}
|
|
39
|
-
autofocus={{@autofocus}}
|
|
40
|
-
placeholder={{@placeholder}}
|
|
41
|
-
...attributes
|
|
42
|
-
{{on "blur" (fn this.setIsTouched true)}}
|
|
43
|
-
{{on "input" this.handleChange}}
|
|
44
|
-
>
|
|
45
|
-
<:prepend as |classes|>
|
|
46
|
-
{{yield classes to="prepend"}}
|
|
47
|
-
</:prepend>
|
|
48
|
-
<:append as |classes|>
|
|
49
|
-
{{yield classes to="append"}}
|
|
50
|
-
</:append>
|
|
51
|
-
</EuiTextArea>
|
|
52
|
-
</:field>
|
|
53
|
-
</EuiFormRow>
|
|
54
|
-
{{/let}}
|