@ember-eui/validated-form 8.0.65 → 8.0.66
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/declarations/components/default-theme.d.ts +1 -0
- package/declarations/components/default-theme.d.ts.map +1 -1
- package/declarations/components/validated-form.d.ts +15 -9
- package/declarations/components/validated-form.d.ts.map +1 -1
- package/dist/components/default-theme.js +14 -31
- package/dist/components/default-theme.js.map +1 -1
- package/dist/components/validated-form.js +15 -172
- package/dist/components/validated-form.js.map +1 -1
- package/dist/default-theme-ZEynS4Fb.js +225 -0
- package/dist/default-theme-ZEynS4Fb.js.map +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-theme.d.ts","sourceRoot":"","sources":["../../src/components/default-theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default-theme.d.ts","sourceRoot":"","sources":["../../src/components/default-theme.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACpC,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9B,WAAW,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAChC,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9B,aAAa,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAClC,aAAa,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAClC,WAAW,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAClC,kBAAkB,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACvC,eAAe,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACpC,gBAAgB,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACrC,oBAAoB,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACzC,WAAW,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAChC,mBAAmB,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,yBAAyB,EAAE,mBAkBvC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -2,14 +2,16 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import type { IValidatedFormTheme } from './default-theme';
|
|
3
3
|
import type FieldBase from './validated-form/field-base.gts';
|
|
4
4
|
import type { EuiFormSignature } from '@ember-eui/core/components/eui-form';
|
|
5
|
+
export type ValidatedFormChild = FieldBase | ValidatedFormComponent;
|
|
5
6
|
export interface ValidatedFormSignature {
|
|
6
7
|
Element: EuiFormSignature['Element'];
|
|
7
8
|
Args: {
|
|
8
9
|
id?: string;
|
|
10
|
+
formId?: string;
|
|
9
11
|
register?: (child: ValidatedFormComponent) => void;
|
|
10
12
|
unregister?: (child: ValidatedFormComponent) => void;
|
|
11
|
-
addChild?: (child:
|
|
12
|
-
removeChild?: (child:
|
|
13
|
+
addChild?: (child: ValidatedFormChild) => void;
|
|
14
|
+
removeChild?: (child: ValidatedFormChild) => void;
|
|
13
15
|
onInvalid?: () => void;
|
|
14
16
|
onSubmit?: () => void;
|
|
15
17
|
onReset?: (e: Event) => void;
|
|
@@ -27,13 +29,15 @@ export interface ValidatedFormSignature {
|
|
|
27
29
|
default: [
|
|
28
30
|
{
|
|
29
31
|
onValidityChange: (isValid: boolean, isTouched: boolean, isInvalidAndTouched: boolean) => void;
|
|
30
|
-
register: (child:
|
|
31
|
-
unregister: (child:
|
|
32
|
+
register: (child: ValidatedFormChild) => void;
|
|
33
|
+
unregister: (child: ValidatedFormChild) => void;
|
|
32
34
|
isValid: boolean;
|
|
33
35
|
isInvalid: boolean;
|
|
34
36
|
isTouched: boolean;
|
|
35
37
|
isInvalidAndTouched: boolean;
|
|
36
38
|
formId: string;
|
|
39
|
+
Form: IValidatedFormTheme['FieldNestedForm'];
|
|
40
|
+
FieldNestedForm: IValidatedFormTheme['FieldNestedForm'];
|
|
37
41
|
FieldBase: IValidatedFormTheme['FieldBase'];
|
|
38
42
|
FieldNumber: IValidatedFormTheme['FieldNumber'];
|
|
39
43
|
FieldText: IValidatedFormTheme['FieldText'];
|
|
@@ -52,7 +56,7 @@ export interface ValidatedFormSignature {
|
|
|
52
56
|
};
|
|
53
57
|
}
|
|
54
58
|
export default class ValidatedFormComponent extends Component<ValidatedFormSignature> {
|
|
55
|
-
childComponents: import("@ember/array/-private/native-array").default<
|
|
59
|
+
childComponents: import("@ember/array/-private/native-array").default<ValidatedFormChild>;
|
|
56
60
|
lastIsValid?: boolean;
|
|
57
61
|
lastIsTouched?: boolean;
|
|
58
62
|
isInvalid: boolean;
|
|
@@ -61,12 +65,13 @@ export default class ValidatedFormComponent extends Component<ValidatedFormSigna
|
|
|
61
65
|
willDestroy(): void;
|
|
62
66
|
get isValid(): boolean;
|
|
63
67
|
get isInvalidAndTouched(): boolean;
|
|
64
|
-
addChild(child:
|
|
65
|
-
removeChild(child:
|
|
68
|
+
addChild(child: ValidatedFormChild): void;
|
|
69
|
+
removeChild(child: ValidatedFormChild): void;
|
|
66
70
|
handleSubmit(e: Event): Promise<void>;
|
|
71
|
+
setIsTouched(isTouched: boolean): void;
|
|
67
72
|
handleReset(e: Event): void;
|
|
68
|
-
register(child:
|
|
69
|
-
unregister(child:
|
|
73
|
+
register(child: ValidatedFormChild): void;
|
|
74
|
+
unregister(child: ValidatedFormChild): void;
|
|
70
75
|
updateValidity(): void;
|
|
71
76
|
getIsValid(): boolean;
|
|
72
77
|
getIsTouched(): boolean;
|
|
@@ -75,6 +80,7 @@ export default class ValidatedFormComponent extends Component<ValidatedFormSigna
|
|
|
75
80
|
onChildValidityChange(): void;
|
|
76
81
|
onFocusOut(e: FocusEvent): void;
|
|
77
82
|
get theme(): {
|
|
83
|
+
FieldNestedForm: import("@glint/template").ComponentLike<any>;
|
|
78
84
|
FieldBase: import("@glint/template").ComponentLike<any>;
|
|
79
85
|
FieldNumber: import("@glint/template").ComponentLike<any>;
|
|
80
86
|
FieldText: import("@glint/template").ComponentLike<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validated-form.d.ts","sourceRoot":"","sources":["../../src/components/validated-form.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAc3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;QACnD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;QACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"validated-form.d.ts","sourceRoot":"","sources":["../../src/components/validated-form.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAc3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,sBAAsB,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,C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1E,eAAe,2EAA6B;IAErD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IAEf,SAAS,UAAS;IAClB,SAAS,UAAS;gBAEf,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAKhE,WAAW;IAKX,IAAI,OAAO,YAEV;IAED,IAAI,mBAAmB,YAEtB;IAED,QAAQ,CAAC,KAAK,EAAE,kBAAkB;IAKlC,WAAW,CAAC,KAAK,EAAE,kBAAkB;IAK/B,YAAY,CAAC,CAAC,EAAE,KAAK;IAsB3B,YAAY,CAAC,SAAS,EAAE,OAAO;IAM/B,WAAW,CAAC,CAAC,EAAE,KAAK;IAUpB,QAAQ,CAAC,KAAK,EAAE,kBAAkB;IAOlC,UAAU,CAAC,KAAK,EAAE,kBAAkB;IAUpC,cAAc;IAId,UAAU;IAIV,YAAY;IAIZ,qBAAqB;IAarB,cAAc;IAoBd,qBAAqB;IAOrB,UAAU,CAAC,CAAC,EAAE,UAAU;IAcxB,IAAI,KAAK;;;;;;;;;;;;;;;MAIR;CAoDF"}
|
|
@@ -1,32 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
const ValidatedFormDefaultTheme = {
|
|
16
|
-
FieldBase: ValidatedFormFieldBase,
|
|
17
|
-
FieldNumber: ValidatedFormFieldNumber,
|
|
18
|
-
FieldText: ValidatedFormFieldText,
|
|
19
|
-
FieldPassword: ValidatedFormFieldPassword,
|
|
20
|
-
FieldTextArea: ValidatedFormFieldTextArea,
|
|
21
|
-
FieldSelect: ValidatedFormFieldSelect,
|
|
22
|
-
FieldComboBox: ValidatedFormFieldComboBox,
|
|
23
|
-
FieldCheckboxGroup: ValidatedFormFieldCheckboxGroup,
|
|
24
|
-
FieldRadioGroup: ValidatedFormFieldRadioGroup,
|
|
25
|
-
FieldRangeSlider: ValidatedFormFieldRangeSlider,
|
|
26
|
-
FieldDualRangeSlider: ValidatedFormFieldRangeSlider$1,
|
|
27
|
-
FieldSwitch: ValidatedFormFieldSwitch,
|
|
28
|
-
FieldMarkdownEditor: ValidatedFormFieldMarkdownEditor
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { ValidatedFormDefaultTheme, ValidatedFormDefaultTheme as default };
|
|
1
|
+
export { a as ValidatedFormDefaultTheme, a as default } from '../default-theme-ZEynS4Fb.js';
|
|
2
|
+
import './validated-form/field-base.js';
|
|
3
|
+
import './validated-form/field-checkbox-group.js';
|
|
4
|
+
import './validated-form/field-combo-box.js';
|
|
5
|
+
import './validated-form/field-dual-range-slider.js';
|
|
6
|
+
import './validated-form/field-markdown-editor.js';
|
|
7
|
+
import './validated-form/field-number.js';
|
|
8
|
+
import './validated-form/field-password.js';
|
|
9
|
+
import './validated-form/field-radio-group.js';
|
|
10
|
+
import './validated-form/field-range-slider.js';
|
|
11
|
+
import './validated-form/field-select.js';
|
|
12
|
+
import './validated-form/field-switch.js';
|
|
13
|
+
import './validated-form/field-text.js';
|
|
14
|
+
import './validated-form/field-text-area.js';
|
|
32
15
|
//# sourceMappingURL=default-theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-theme.js","sources":[
|
|
1
|
+
{"version":3,"file":"default-theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -1,173 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
class ValidatedFormComponent extends Component {
|
|
18
|
-
static {
|
|
19
|
-
g(this.prototype, "childComponents", [tracked], function () {
|
|
20
|
-
return A([]);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
#childComponents = (i(this, "childComponents"), void 0);
|
|
24
|
-
//cache to only notify if changed
|
|
25
|
-
lastIsValid;
|
|
26
|
-
lastIsTouched;
|
|
27
|
-
static {
|
|
28
|
-
g(this.prototype, "isInvalid", [tracked], function () {
|
|
29
|
-
return false;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
#isInvalid = (i(this, "isInvalid"), void 0);
|
|
33
|
-
static {
|
|
34
|
-
g(this.prototype, "isTouched", [tracked], function () {
|
|
35
|
-
return false;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
#isTouched = (i(this, "isTouched"), void 0);
|
|
39
|
-
constructor(owner1, args1) {
|
|
40
|
-
super(owner1, args1);
|
|
41
|
-
this.args.register?.(this);
|
|
42
|
-
}
|
|
43
|
-
willDestroy() {
|
|
44
|
-
super.willDestroy();
|
|
45
|
-
this.args.unregister?.(this);
|
|
46
|
-
}
|
|
47
|
-
get isValid() {
|
|
48
|
-
return !this.isInvalid;
|
|
49
|
-
}
|
|
50
|
-
get isInvalidAndTouched() {
|
|
51
|
-
return this.isInvalid && this.isTouched;
|
|
52
|
-
}
|
|
53
|
-
addChild(child1) {
|
|
54
|
-
this.childComponents.pushObject(child1);
|
|
55
|
-
}
|
|
56
|
-
removeChild(child1) {
|
|
57
|
-
this.childComponents.removeObject(child1);
|
|
58
|
-
}
|
|
59
|
-
async handleSubmit(e1) {
|
|
60
|
-
e1.preventDefault();
|
|
61
|
-
if (this.isInvalid) {
|
|
62
|
-
this.childComponents.setEach('isTouched', true);
|
|
63
|
-
this.args.onInvalid?.();
|
|
64
|
-
} else {
|
|
65
|
-
this.childComponents.setEach('isTouched', false);
|
|
66
|
-
try {
|
|
67
|
-
await this.args.onSubmit?.();
|
|
68
|
-
} catch (e1) {
|
|
69
|
-
this.childComponents.setEach('isTouched', true);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
static {
|
|
74
|
-
n(this.prototype, "handleSubmit", [action]);
|
|
75
|
-
}
|
|
76
|
-
handleReset(e1) {
|
|
77
|
-
e1.preventDefault();
|
|
78
|
-
this.args.onReset?.(e1);
|
|
79
|
-
}
|
|
80
|
-
static {
|
|
81
|
-
n(this.prototype, "handleReset", [action]);
|
|
82
|
-
}
|
|
83
|
-
register(child1) {
|
|
84
|
-
if (!this.isDestroyed) {
|
|
85
|
-
schedule('afterRender', this, this.addChild, child1);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
static {
|
|
89
|
-
n(this.prototype, "register", [action]);
|
|
90
|
-
}
|
|
91
|
-
unregister(child1) {
|
|
92
|
-
if (!this.isDestroyed) {
|
|
93
|
-
schedule('afterRender', this, this.removeChild, child1);
|
|
94
|
-
// When adding a child the validation gets calculated on a `did-insert` modifier
|
|
95
|
-
// for removal there's no modifier so it gets called here
|
|
96
|
-
schedule('afterRender', this, this.triggerValidityChange);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
static {
|
|
100
|
-
n(this.prototype, "unregister", [action]);
|
|
101
|
-
}
|
|
102
|
-
updateValidity() {
|
|
103
|
-
this.triggerValidityChange();
|
|
104
|
-
}
|
|
105
|
-
static {
|
|
106
|
-
n(this.prototype, "updateValidity", [action]);
|
|
107
|
-
}
|
|
108
|
-
getIsValid() {
|
|
109
|
-
return this.childComponents.isEvery('isValid');
|
|
110
|
-
}
|
|
111
|
-
getIsTouched() {
|
|
112
|
-
return this.childComponents.isAny('isTouched');
|
|
113
|
-
}
|
|
114
|
-
triggerValidityChange() {
|
|
115
|
-
const lastIsValid1 = this.isValid;
|
|
116
|
-
const lastIsTouched1 = this.isTouched;
|
|
117
|
-
if (lastIsValid1 !== this.getIsValid() || lastIsTouched1 !== this.getIsTouched()) {
|
|
118
|
-
this.setNewValidity();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
setNewValidity() {
|
|
122
|
-
next(() => {
|
|
123
|
-
this.isInvalid = !this.getIsValid();
|
|
124
|
-
this.isTouched = this.getIsTouched();
|
|
125
|
-
if (!this.isDestroying) {
|
|
126
|
-
this.args.onValidityChange?.(this.isValid, this.isTouched, this.isInvalidAndTouched);
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
static {
|
|
131
|
-
n(this.prototype, "setNewValidity", [action]);
|
|
132
|
-
}
|
|
133
|
-
onChildValidityChange() {
|
|
134
|
-
if (!this.isDestroying) {
|
|
135
|
-
this.updateValidity();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
static {
|
|
139
|
-
n(this.prototype, "onChildValidityChange", [action]);
|
|
140
|
-
}
|
|
141
|
-
onFocusOut(e1) {
|
|
142
|
-
const targetEuiFormRow1 = e1.target?.closest?.('.euiFormRow');
|
|
143
|
-
this.childComponents.find(child1 => {
|
|
144
|
-
return targetEuiFormRow1 === child1.formRowElement;
|
|
145
|
-
})?.setIsTouched(true);
|
|
146
|
-
}
|
|
147
|
-
static {
|
|
148
|
-
n(this.prototype, "onFocusOut", [action]);
|
|
149
|
-
}
|
|
150
|
-
get theme() {
|
|
151
|
-
const theme1 = this.args.theme || {};
|
|
152
|
-
return {
|
|
153
|
-
...ValidatedFormDefaultTheme,
|
|
154
|
-
...theme1
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
static {
|
|
158
|
-
setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |formId|}}\n <EuiForm @tagName={{argOrDefault @tagName \"form\"}} id={{formId}} @isInvalid={{@isInvalid}} @invalidCallout={{@invalidCallout}} @error={{@error}} @errorTitle={{@errorTitle}} {{on \"submit\" this.handleSubmit}} {{on \"reset\" this.handleReset}} {{didInsert this.setNewValidity}} {{on \"focusout\" this.onFocusOut}} ...attributes>\n {{yield (hash onValidityChange=this.onChildValidityChange register=this.register unregister=this.unregister isValid=this.isValid isInvalid=this.isInvalid isTouched=this.isTouched isInvalidAndTouched=this.isInvalidAndTouched formId=formId FieldBase=(component this.theme.FieldBase register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange formId=formId disabled=@isDisabled) FieldNumber=(component this.theme.FieldNumber register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldText=(component this.theme.FieldText register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldPassword=(component this.theme.FieldPassword register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldTextArea=(component this.theme.FieldTextArea register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldSelect=(component this.theme.FieldSelect register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldComboBox=(component this.theme.FieldComboBox register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId isDisabled=@isDisabled) FieldCheckboxGroup=(component this.theme.FieldCheckboxGroup register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldRadioGroup=(component this.theme.FieldRadioGroup register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldRangeSlider=(component this.theme.FieldRangeSlider register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldDualRangeSlider=(component this.theme.FieldDualRangeSlider register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldSwitch=(component this.theme.FieldSwitch register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled) FieldMarkdownEditor=(component this.theme.FieldMarkdownEditor register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=formId disabled=@isDisabled))}}\n </EuiForm>\n {{/let}}\n ", {
|
|
159
|
-
scope: () => ({
|
|
160
|
-
argOrDefault,
|
|
161
|
-
randomId,
|
|
162
|
-
EuiForm,
|
|
163
|
-
on,
|
|
164
|
-
didInsert,
|
|
165
|
-
hash
|
|
166
|
-
}),
|
|
167
|
-
strictMode: true
|
|
168
|
-
}), this);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export { ValidatedFormComponent as default };
|
|
1
|
+
import '@glimmer/component';
|
|
2
|
+
import '@glimmer/tracking';
|
|
3
|
+
import '@ember/array';
|
|
4
|
+
import '@ember/helper';
|
|
5
|
+
import '@ember/modifier';
|
|
6
|
+
import '@ember/object';
|
|
7
|
+
import '@ember/render-modifiers/modifiers/did-insert';
|
|
8
|
+
import '@ember/runloop';
|
|
9
|
+
import '@ember-eui/core/components/eui-form';
|
|
10
|
+
import '@ember-eui/core/helpers';
|
|
11
|
+
import '../-private/random-id.js';
|
|
12
|
+
export { V as default } from '../default-theme-ZEynS4Fb.js';
|
|
13
|
+
import 'decorator-transforms/runtime';
|
|
14
|
+
import '@ember/template-compilation';
|
|
15
|
+
import '@ember/component';
|
|
173
16
|
//# sourceMappingURL=validated-form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validated-form.js","sources":["../../src/components/validated-form.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { hash } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport { next, schedule } from '@ember/runloop';\nimport EuiForm from '@ember-eui/core/components/eui-form';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport randomId from '../-private/random-id';\nimport { ValidatedFormDefaultTheme } from './default-theme.ts';\nimport type { IValidatedFormTheme } from './default-theme';\nimport type FieldBase from './validated-form/field-base.gts';\nimport type { EuiFormSignature } from '@ember-eui/core/components/eui-form';\nexport interface ValidatedFormSignature {\n Element: EuiFormSignature['Element'];\n Args: {\n id?: string;\n register?: (child: ValidatedFormComponent) => void;\n unregister?: (child: ValidatedFormComponent) => void;\n addChild?: (child: FieldBase) => void;\n removeChild?: (child: FieldBase) => void;\n onInvalid?: () => void;\n onSubmit?: () => void;\n onReset?: (e: Event) => void;\n onValidityChange?: (isValid: boolean, isTouched: boolean, isInvalidAndTouched: boolean) => void;\n theme?: Partial<IValidatedFormTheme>;\n isDisabled?: boolean;\n fullWidth?: boolean;\n tagName?: EuiFormSignature['Args']['tagName'];\n isInvalid?: EuiFormSignature['Args']['isInvalid'];\n invalidCallout?: EuiFormSignature['Args']['invalidCallout'];\n error?: EuiFormSignature['Args']['error'];\n errorTitle?: EuiFormSignature['Args']['errorTitle'];\n };\n Blocks: {\n default: [{\n onValidityChange: (isValid: boolean, isTouched: boolean, isInvalidAndTouched: boolean) => void;\n register: (child: FieldBase) => void;\n unregister: (child: FieldBase) => void;\n isValid: boolean;\n isInvalid: boolean;\n isTouched: boolean;\n isInvalidAndTouched: boolean;\n formId: string;\n FieldBase: IValidatedFormTheme['FieldBase'];\n FieldNumber: IValidatedFormTheme['FieldNumber'];\n FieldText: IValidatedFormTheme['FieldText'];\n FieldPassword: IValidatedFormTheme['FieldPassword'];\n FieldTextArea: IValidatedFormTheme['FieldTextArea'];\n FieldSelect: IValidatedFormTheme['FieldSelect'];\n FieldComboBox: IValidatedFormTheme['FieldComboBox'];\n FieldCheckboxGroup: IValidatedFormTheme['FieldCheckboxGroup'];\n FieldRadioGroup: IValidatedFormTheme['FieldRadioGroup'];\n FieldRangeSlider: IValidatedFormTheme['FieldRangeSlider'];\n FieldDualRangeSlider: IValidatedFormTheme['FieldDualRangeSlider'];\n FieldSwitch: IValidatedFormTheme['FieldSwitch'];\n FieldMarkdownEditor: IValidatedFormTheme['FieldMarkdownEditor'];\n }];\n };\n}\nexport default class ValidatedFormComponent extends Component<ValidatedFormSignature> {\n @tracked\n childComponents = A<FieldBase>([]);\n //cache to only notify if changed\n lastIsValid?: boolean;\n lastIsTouched?: boolean;\n @tracked\n isInvalid = false;\n @tracked\n isTouched = false;\n constructor(owner1: unknown, args1: ValidatedFormSignature['Args']){\n super(owner1, args1);\n this.args.register?.(this);\n }\n willDestroy() {\n super.willDestroy();\n this.args.unregister?.(this);\n }\n get isValid() {\n return !this.isInvalid;\n }\n get isInvalidAndTouched() {\n return this.isInvalid && this.isTouched;\n }\n addChild(child1: FieldBase) {\n this.childComponents.pushObject(child1);\n }\n removeChild(child1: FieldBase) {\n this.childComponents.removeObject(child1);\n }\n @action\n async handleSubmit(e1: Event) {\n e1.preventDefault();\n if (this.isInvalid) {\n this.childComponents.setEach('isTouched', true);\n this.args.onInvalid?.();\n } else {\n this.childComponents.setEach('isTouched', false);\n try {\n await this.args.onSubmit?.();\n } catch (e1) {\n this.childComponents.setEach('isTouched', true);\n }\n }\n }\n @action\n handleReset(e1: Event) {\n e1.preventDefault();\n this.args.onReset?.(e1);\n }\n @action\n register(child1: FieldBase) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.addChild, child1);\n }\n }\n @action\n unregister(child1: FieldBase) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.removeChild, child1);\n // When adding a child the validation gets calculated on a `did-insert` modifier\n // for removal there's no modifier so it gets called here\n schedule('afterRender', this, this.triggerValidityChange);\n }\n }\n @action\n updateValidity() {\n this.triggerValidityChange();\n }\n getIsValid() {\n return this.childComponents.isEvery('isValid');\n }\n getIsTouched() {\n return this.childComponents.isAny('isTouched');\n }\n triggerValidityChange() {\n const lastIsValid1 = this.isValid;\n const lastIsTouched1 = this.isTouched;\n if (lastIsValid1 !== this.getIsValid() || lastIsTouched1 !== this.getIsTouched()) {\n this.setNewValidity();\n }\n }\n @action\n setNewValidity() {\n next(()=>{\n this.isInvalid = !this.getIsValid();\n this.isTouched = this.getIsTouched();\n if (!this.isDestroying) {\n this.args.onValidityChange?.(this.isValid, this.isTouched, this.isInvalidAndTouched);\n }\n });\n }\n @action\n onChildValidityChange() {\n if (!this.isDestroying) {\n this.updateValidity();\n }\n }\n @action\n onFocusOut(e1: FocusEvent) {\n const targetEuiFormRow1 = (e1.target as HTMLInputElement)?.closest?.('.euiFormRow');\n this.childComponents.find((child1)=>{\n return targetEuiFormRow1 === child1.formRowElement;\n })?.setIsTouched(true);\n }\n get theme() {\n const theme1: Partial<IValidatedFormTheme> = this.args.theme || {};\n return {\n ...ValidatedFormDefaultTheme,\n ...theme1\n };\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |formId|}}\n <EuiForm\n @tagName={{argOrDefault @tagName \"form\"}}\n id={{formId}}\n @isInvalid={{@isInvalid}}\n @invalidCallout={{@invalidCallout}}\n @error={{@error}}\n @errorTitle={{@errorTitle}}\n {{on \"submit\" this.handleSubmit}}\n {{on \"reset\" this.handleReset}}\n {{didInsert this.setNewValidity}}\n {{on \"focusout\" this.onFocusOut}}\n ...attributes\n >\n {{yield\n (hash\n onValidityChange=this.onChildValidityChange\n register=this.register\n unregister=this.unregister\n isValid=this.isValid\n isInvalid=this.isInvalid\n isTouched=this.isTouched\n isInvalidAndTouched=this.isInvalidAndTouched\n formId=formId\n FieldBase=(component\n this.theme.FieldBase\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n formId=formId\n disabled=@isDisabled\n )\n FieldNumber=(component\n this.theme.FieldNumber\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldText=(component\n this.theme.FieldText\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldPassword=(component\n this.theme.FieldPassword\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldTextArea=(component\n this.theme.FieldTextArea\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldSelect=(component\n this.theme.FieldSelect\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldComboBox=(component\n this.theme.FieldComboBox\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n isDisabled=@isDisabled\n )\n FieldCheckboxGroup=(component\n this.theme.FieldCheckboxGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldRadioGroup=(component\n this.theme.FieldRadioGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldRangeSlider=(component\n this.theme.FieldRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldDualRangeSlider=(component\n this.theme.FieldDualRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldSwitch=(component\n this.theme.FieldSwitch\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n FieldMarkdownEditor=(component\n this.theme.FieldMarkdownEditor\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=formId\n disabled=@isDisabled\n )\n )\n }}\n </EuiForm>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormComponent","Component","g","this","prototype","tracked","A","i","void 0","lastIsValid","lastIsTouched","constructor","owner1","args1","args","register","willDestroy","unregister","isValid","isInvalid","isInvalidAndTouched","isTouched","addChild","child1","childComponents","pushObject","removeChild","removeObject","handleSubmit","e1","preventDefault","setEach","onInvalid","onSubmit","n","action","handleReset","onReset","isDestroyed","schedule","triggerValidityChange","updateValidity","getIsValid","isEvery","getIsTouched","isAny","lastIsValid1","lastIsTouched1","setNewValidity","next","isDestroying","onValidityChange","onChildValidityChange","onFocusOut","targetEuiFormRow1","target","closest","find","formRowElement","setIsTouched","theme","theme1","ValidatedFormDefaultTheme","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiForm","on","didInsert","hash","strictMode"],"mappings":";;;;;;;;;;;;;;;;AA+De,MAAMA,sBAAsB,SAASC,SAAS,CAAyB;AAAA,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,sBACjFC,OAAO,CAAA,EAAA,YAAA;MAAA,OACUC,CAAC,CAAY,EAAE,CAAC,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,gBAAA,IAAAC,CAAA,CAAAJ,IAAA,sBAAAK,KAAA,CAAA,EAAA;AAClC;EACAC,WAAW,CAAA;EACXC,aAAa,CAAA;AAAW,EAAA;AAAAR,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,gBACvBC,OAAO,CAAA,EAAA,YAAA;AAAA,MAAA,OACI,KAAK,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,UAAA,IAAAE,CAAA,CAAAJ,IAAA,gBAAAK,KAAA,CAAA,EAAA;AAAA,EAAA;AAAAN,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,gBAChBC,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":"validated-form.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
3
|
+
import { A } from '@ember/array';
|
|
4
|
+
import { hash } from '@ember/helper';
|
|
5
|
+
import { on } from '@ember/modifier';
|
|
6
|
+
import { action } from '@ember/object';
|
|
7
|
+
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
|
|
8
|
+
import { schedule, next } from '@ember/runloop';
|
|
9
|
+
import EuiForm from '@ember-eui/core/components/eui-form';
|
|
10
|
+
import { argOrDefault } from '@ember-eui/core/helpers';
|
|
11
|
+
import randomId from './-private/random-id.js';
|
|
12
|
+
import ValidatedFormFieldBase from './components/validated-form/field-base.js';
|
|
13
|
+
import ValidatedFormFieldCheckboxGroup from './components/validated-form/field-checkbox-group.js';
|
|
14
|
+
import ValidatedFormFieldComboBox from './components/validated-form/field-combo-box.js';
|
|
15
|
+
import ValidatedFormFieldRangeSlider$1 from './components/validated-form/field-dual-range-slider.js';
|
|
16
|
+
import ValidatedFormFieldMarkdownEditor from './components/validated-form/field-markdown-editor.js';
|
|
17
|
+
import ValidatedFormFieldNumber from './components/validated-form/field-number.js';
|
|
18
|
+
import ValidatedFormFieldPassword from './components/validated-form/field-password.js';
|
|
19
|
+
import ValidatedFormFieldRadioGroup from './components/validated-form/field-radio-group.js';
|
|
20
|
+
import ValidatedFormFieldRangeSlider from './components/validated-form/field-range-slider.js';
|
|
21
|
+
import ValidatedFormFieldSelect from './components/validated-form/field-select.js';
|
|
22
|
+
import ValidatedFormFieldSwitch from './components/validated-form/field-switch.js';
|
|
23
|
+
import ValidatedFormFieldText from './components/validated-form/field-text.js';
|
|
24
|
+
import ValidatedFormFieldTextArea from './components/validated-form/field-text-area.js';
|
|
25
|
+
import { g, i, n } from 'decorator-transforms/runtime';
|
|
26
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
27
|
+
import { setComponentTemplate } from '@ember/component';
|
|
28
|
+
|
|
29
|
+
class ValidatedFormComponent extends Component {
|
|
30
|
+
static {
|
|
31
|
+
g(this.prototype, "childComponents", [tracked], function () {
|
|
32
|
+
return A([]);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
#childComponents = (i(this, "childComponents"), void 0);
|
|
36
|
+
//cache to only notify if changed
|
|
37
|
+
lastIsValid;
|
|
38
|
+
lastIsTouched;
|
|
39
|
+
static {
|
|
40
|
+
g(this.prototype, "isInvalid", [tracked], function () {
|
|
41
|
+
return false;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
#isInvalid = (i(this, "isInvalid"), void 0);
|
|
45
|
+
static {
|
|
46
|
+
g(this.prototype, "isTouched", [tracked], function () {
|
|
47
|
+
return false;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
#isTouched = (i(this, "isTouched"), void 0);
|
|
51
|
+
constructor(owner1, args1) {
|
|
52
|
+
super(owner1, args1);
|
|
53
|
+
this.args.register?.(this);
|
|
54
|
+
}
|
|
55
|
+
willDestroy() {
|
|
56
|
+
super.willDestroy();
|
|
57
|
+
this.args.unregister?.(this);
|
|
58
|
+
}
|
|
59
|
+
get isValid() {
|
|
60
|
+
return !this.isInvalid;
|
|
61
|
+
}
|
|
62
|
+
get isInvalidAndTouched() {
|
|
63
|
+
return this.isInvalid && this.isTouched;
|
|
64
|
+
}
|
|
65
|
+
addChild(child1) {
|
|
66
|
+
this.childComponents.pushObject(child1);
|
|
67
|
+
this.triggerValidityChange();
|
|
68
|
+
}
|
|
69
|
+
removeChild(child1) {
|
|
70
|
+
this.childComponents.removeObject(child1);
|
|
71
|
+
}
|
|
72
|
+
async handleSubmit(e1) {
|
|
73
|
+
if (e1.target !== e1.currentTarget) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
e1.preventDefault();
|
|
77
|
+
if (this.isInvalid) {
|
|
78
|
+
this.setIsTouched(true);
|
|
79
|
+
this.args.onInvalid?.();
|
|
80
|
+
} else {
|
|
81
|
+
this.setIsTouched(false);
|
|
82
|
+
try {
|
|
83
|
+
await this.args.onSubmit?.();
|
|
84
|
+
} catch (e1) {
|
|
85
|
+
this.setIsTouched(true);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
static {
|
|
90
|
+
n(this.prototype, "handleSubmit", [action]);
|
|
91
|
+
}
|
|
92
|
+
setIsTouched(isTouched1) {
|
|
93
|
+
this.childComponents.forEach(child1 => child1.setIsTouched(isTouched1));
|
|
94
|
+
this.updateValidity();
|
|
95
|
+
}
|
|
96
|
+
static {
|
|
97
|
+
n(this.prototype, "setIsTouched", [action]);
|
|
98
|
+
}
|
|
99
|
+
handleReset(e1) {
|
|
100
|
+
if (e1.target !== e1.currentTarget) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
e1.preventDefault();
|
|
104
|
+
this.args.onReset?.(e1);
|
|
105
|
+
}
|
|
106
|
+
static {
|
|
107
|
+
n(this.prototype, "handleReset", [action]);
|
|
108
|
+
}
|
|
109
|
+
register(child1) {
|
|
110
|
+
if (!this.isDestroyed) {
|
|
111
|
+
schedule('afterRender', this, this.addChild, child1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
n(this.prototype, "register", [action]);
|
|
116
|
+
}
|
|
117
|
+
unregister(child1) {
|
|
118
|
+
if (!this.isDestroyed) {
|
|
119
|
+
schedule('afterRender', this, this.removeChild, child1);
|
|
120
|
+
// When adding a child the validation gets calculated on a `did-insert` modifier
|
|
121
|
+
// for removal there's no modifier so it gets called here
|
|
122
|
+
schedule('afterRender', this, this.triggerValidityChange);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
static {
|
|
126
|
+
n(this.prototype, "unregister", [action]);
|
|
127
|
+
}
|
|
128
|
+
updateValidity() {
|
|
129
|
+
this.triggerValidityChange();
|
|
130
|
+
}
|
|
131
|
+
static {
|
|
132
|
+
n(this.prototype, "updateValidity", [action]);
|
|
133
|
+
}
|
|
134
|
+
getIsValid() {
|
|
135
|
+
return this.childComponents.isEvery('isValid');
|
|
136
|
+
}
|
|
137
|
+
getIsTouched() {
|
|
138
|
+
return this.childComponents.isAny('isTouched');
|
|
139
|
+
}
|
|
140
|
+
triggerValidityChange() {
|
|
141
|
+
const lastIsValid1 = this.isValid;
|
|
142
|
+
const lastIsTouched1 = this.isTouched;
|
|
143
|
+
if (lastIsValid1 !== this.getIsValid() || lastIsTouched1 !== this.getIsTouched()) {
|
|
144
|
+
this.setNewValidity();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
setNewValidity() {
|
|
148
|
+
next(() => {
|
|
149
|
+
if (this.isDestroying || this.isDestroyed) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
this.isInvalid = !this.getIsValid();
|
|
153
|
+
this.isTouched = this.getIsTouched();
|
|
154
|
+
if (!this.isDestroying) {
|
|
155
|
+
this.args.onValidityChange?.(this.isValid, this.isTouched, this.isInvalidAndTouched);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
static {
|
|
160
|
+
n(this.prototype, "setNewValidity", [action]);
|
|
161
|
+
}
|
|
162
|
+
onChildValidityChange() {
|
|
163
|
+
if (!this.isDestroying) {
|
|
164
|
+
this.updateValidity();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
static {
|
|
168
|
+
n(this.prototype, "onChildValidityChange", [action]);
|
|
169
|
+
}
|
|
170
|
+
onFocusOut(e1) {
|
|
171
|
+
const targetEuiFormRow1 = e1.target?.closest?.('.euiFormRow');
|
|
172
|
+
if (!targetEuiFormRow1) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.childComponents.find(child1 => {
|
|
176
|
+
return 'formRowElement' in child1 && targetEuiFormRow1 === child1.formRowElement;
|
|
177
|
+
})?.setIsTouched(true);
|
|
178
|
+
}
|
|
179
|
+
static {
|
|
180
|
+
n(this.prototype, "onFocusOut", [action]);
|
|
181
|
+
}
|
|
182
|
+
get theme() {
|
|
183
|
+
const theme1 = this.args.theme || {};
|
|
184
|
+
return {
|
|
185
|
+
...ValidatedFormDefaultTheme,
|
|
186
|
+
...theme1
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
static {
|
|
190
|
+
setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |formId|}}\n <EuiForm @tagName={{argOrDefault @tagName \"form\"}} id={{formId}} @isInvalid={{@isInvalid}} @invalidCallout={{@invalidCallout}} @error={{@error}} @errorTitle={{@errorTitle}} {{on \"submit\" this.handleSubmit}} {{on \"reset\" this.handleReset}} {{didInsert this.setNewValidity}} {{on \"focusout\" this.onFocusOut}} ...attributes>\n {{yield (hash onValidityChange=this.onChildValidityChange register=this.register unregister=this.unregister isValid=this.isValid isInvalid=this.isInvalid isTouched=this.isTouched isInvalidAndTouched=this.isInvalidAndTouched formId=(argOrDefault @formId formId) Form=(component this.theme.FieldNestedForm register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange tagName=\"div\" formId=(argOrDefault @formId formId) theme=@theme isDisabled=@isDisabled fullWidth=@fullWidth) FieldNestedForm=(component this.theme.FieldNestedForm register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange tagName=\"div\" formId=(argOrDefault @formId formId) theme=@theme isDisabled=@isDisabled fullWidth=@fullWidth) FieldBase=(component this.theme.FieldBase register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldNumber=(component this.theme.FieldNumber register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldText=(component this.theme.FieldText register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldPassword=(component this.theme.FieldPassword register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldTextArea=(component this.theme.FieldTextArea register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldSelect=(component this.theme.FieldSelect register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldComboBox=(component this.theme.FieldComboBox register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) isDisabled=@isDisabled) FieldCheckboxGroup=(component this.theme.FieldCheckboxGroup register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldRadioGroup=(component this.theme.FieldRadioGroup register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldRangeSlider=(component this.theme.FieldRangeSlider register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldDualRangeSlider=(component this.theme.FieldDualRangeSlider register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldSwitch=(component this.theme.FieldSwitch register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled) FieldMarkdownEditor=(component this.theme.FieldMarkdownEditor register=this.register unregister=this.unregister onValidityChange=this.onChildValidityChange fullWidth=@fullWidth formId=(argOrDefault @formId formId) disabled=@isDisabled))}}\n </EuiForm>\n {{/let}}\n ", {
|
|
191
|
+
scope: () => ({
|
|
192
|
+
argOrDefault,
|
|
193
|
+
randomId,
|
|
194
|
+
EuiForm,
|
|
195
|
+
on,
|
|
196
|
+
didInsert,
|
|
197
|
+
hash
|
|
198
|
+
}),
|
|
199
|
+
strictMode: true
|
|
200
|
+
}), this);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const ValidatedFormDefaultTheme = {
|
|
205
|
+
// Resolve lazily because ValidatedForm also imports its default theme.
|
|
206
|
+
get FieldNestedForm() {
|
|
207
|
+
return ValidatedFormComponent;
|
|
208
|
+
},
|
|
209
|
+
FieldBase: ValidatedFormFieldBase,
|
|
210
|
+
FieldNumber: ValidatedFormFieldNumber,
|
|
211
|
+
FieldText: ValidatedFormFieldText,
|
|
212
|
+
FieldPassword: ValidatedFormFieldPassword,
|
|
213
|
+
FieldTextArea: ValidatedFormFieldTextArea,
|
|
214
|
+
FieldSelect: ValidatedFormFieldSelect,
|
|
215
|
+
FieldComboBox: ValidatedFormFieldComboBox,
|
|
216
|
+
FieldCheckboxGroup: ValidatedFormFieldCheckboxGroup,
|
|
217
|
+
FieldRadioGroup: ValidatedFormFieldRadioGroup,
|
|
218
|
+
FieldRangeSlider: ValidatedFormFieldRangeSlider,
|
|
219
|
+
FieldDualRangeSlider: ValidatedFormFieldRangeSlider$1,
|
|
220
|
+
FieldSwitch: ValidatedFormFieldSwitch,
|
|
221
|
+
FieldMarkdownEditor: ValidatedFormFieldMarkdownEditor
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
export { ValidatedFormComponent as V, ValidatedFormDefaultTheme as a };
|
|
225
|
+
//# sourceMappingURL=default-theme-ZEynS4Fb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-theme-ZEynS4Fb.js","sources":["../src/components/validated-form.gts","../src/components/default-theme.ts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { hash } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport { next, schedule } from '@ember/runloop';\nimport EuiForm from '@ember-eui/core/components/eui-form';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport randomId from '../-private/random-id';\nimport { ValidatedFormDefaultTheme } from './default-theme.ts';\nimport type { IValidatedFormTheme } from './default-theme';\nimport type FieldBase from './validated-form/field-base.gts';\nimport type { EuiFormSignature } from '@ember-eui/core/components/eui-form';\nexport type ValidatedFormChild = FieldBase | ValidatedFormComponent;\nexport interface ValidatedFormSignature {\n Element: EuiFormSignature['Element'];\n Args: {\n id?: string;\n formId?: string;\n register?: (child: ValidatedFormComponent) => void;\n unregister?: (child: ValidatedFormComponent) => void;\n addChild?: (child: ValidatedFormChild) => void;\n removeChild?: (child: ValidatedFormChild) => void;\n onInvalid?: () => void;\n onSubmit?: () => void;\n onReset?: (e: Event) => void;\n onValidityChange?: (isValid: boolean, isTouched: boolean, isInvalidAndTouched: boolean) => void;\n theme?: Partial<IValidatedFormTheme>;\n isDisabled?: boolean;\n fullWidth?: boolean;\n tagName?: EuiFormSignature['Args']['tagName'];\n isInvalid?: EuiFormSignature['Args']['isInvalid'];\n invalidCallout?: EuiFormSignature['Args']['invalidCallout'];\n error?: EuiFormSignature['Args']['error'];\n errorTitle?: EuiFormSignature['Args']['errorTitle'];\n };\n Blocks: {\n default: [{\n onValidityChange: (isValid: boolean, isTouched: boolean, isInvalidAndTouched: boolean) => void;\n register: (child: ValidatedFormChild) => void;\n unregister: (child: ValidatedFormChild) => void;\n isValid: boolean;\n isInvalid: boolean;\n isTouched: boolean;\n isInvalidAndTouched: boolean;\n formId: string;\n Form: IValidatedFormTheme['FieldNestedForm'];\n FieldNestedForm: IValidatedFormTheme['FieldNestedForm'];\n FieldBase: IValidatedFormTheme['FieldBase'];\n FieldNumber: IValidatedFormTheme['FieldNumber'];\n FieldText: IValidatedFormTheme['FieldText'];\n FieldPassword: IValidatedFormTheme['FieldPassword'];\n FieldTextArea: IValidatedFormTheme['FieldTextArea'];\n FieldSelect: IValidatedFormTheme['FieldSelect'];\n FieldComboBox: IValidatedFormTheme['FieldComboBox'];\n FieldCheckboxGroup: IValidatedFormTheme['FieldCheckboxGroup'];\n FieldRadioGroup: IValidatedFormTheme['FieldRadioGroup'];\n FieldRangeSlider: IValidatedFormTheme['FieldRangeSlider'];\n FieldDualRangeSlider: IValidatedFormTheme['FieldDualRangeSlider'];\n FieldSwitch: IValidatedFormTheme['FieldSwitch'];\n FieldMarkdownEditor: IValidatedFormTheme['FieldMarkdownEditor'];\n }];\n };\n}\nexport default class ValidatedFormComponent extends Component<ValidatedFormSignature> {\n @tracked\n childComponents = A<ValidatedFormChild>([]);\n //cache to only notify if changed\n lastIsValid?: boolean;\n lastIsTouched?: boolean;\n @tracked\n isInvalid = false;\n @tracked\n isTouched = false;\n constructor(owner1: unknown, args1: ValidatedFormSignature['Args']){\n super(owner1, args1);\n this.args.register?.(this);\n }\n willDestroy() {\n super.willDestroy();\n this.args.unregister?.(this);\n }\n get isValid() {\n return !this.isInvalid;\n }\n get isInvalidAndTouched() {\n return this.isInvalid && this.isTouched;\n }\n addChild(child1: ValidatedFormChild) {\n this.childComponents.pushObject(child1);\n this.triggerValidityChange();\n }\n removeChild(child1: ValidatedFormChild) {\n this.childComponents.removeObject(child1);\n }\n @action\n async handleSubmit(e1: Event) {\n if (e1.target !== e1.currentTarget) {\n return;\n }\n e1.preventDefault();\n if (this.isInvalid) {\n this.setIsTouched(true);\n this.args.onInvalid?.();\n } else {\n this.setIsTouched(false);\n try {\n await this.args.onSubmit?.();\n } catch (e1) {\n this.setIsTouched(true);\n }\n }\n }\n @action\n setIsTouched(isTouched1: boolean) {\n this.childComponents.forEach((child1)=>child1.setIsTouched(isTouched1));\n this.updateValidity();\n }\n @action\n handleReset(e1: Event) {\n if (e1.target !== e1.currentTarget) {\n return;\n }\n e1.preventDefault();\n this.args.onReset?.(e1);\n }\n @action\n register(child1: ValidatedFormChild) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.addChild, child1);\n }\n }\n @action\n unregister(child1: ValidatedFormChild) {\n if (!this.isDestroyed) {\n schedule('afterRender', this, this.removeChild, child1);\n // When adding a child the validation gets calculated on a `did-insert` modifier\n // for removal there's no modifier so it gets called here\n schedule('afterRender', this, this.triggerValidityChange);\n }\n }\n @action\n updateValidity() {\n this.triggerValidityChange();\n }\n getIsValid() {\n return this.childComponents.isEvery('isValid');\n }\n getIsTouched() {\n return this.childComponents.isAny('isTouched');\n }\n triggerValidityChange() {\n const lastIsValid1 = this.isValid;\n const lastIsTouched1 = this.isTouched;\n if (lastIsValid1 !== this.getIsValid() || lastIsTouched1 !== this.getIsTouched()) {\n this.setNewValidity();\n }\n }\n @action\n setNewValidity() {\n next(()=>{\n if (this.isDestroying || this.isDestroyed) {\n return;\n }\n this.isInvalid = !this.getIsValid();\n this.isTouched = this.getIsTouched();\n if (!this.isDestroying) {\n this.args.onValidityChange?.(this.isValid, this.isTouched, this.isInvalidAndTouched);\n }\n });\n }\n @action\n onChildValidityChange() {\n if (!this.isDestroying) {\n this.updateValidity();\n }\n }\n @action\n onFocusOut(e1: FocusEvent) {\n const targetEuiFormRow1 = (e1.target as HTMLInputElement)?.closest?.('.euiFormRow');\n if (!targetEuiFormRow1) {\n return;\n }\n this.childComponents.find((child1)=>{\n return 'formRowElement' in child1 && targetEuiFormRow1 === child1.formRowElement;\n })?.setIsTouched(true);\n }\n get theme() {\n const theme1: Partial<IValidatedFormTheme> = this.args.theme || {};\n return {\n ...ValidatedFormDefaultTheme,\n ...theme1\n };\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |formId|}}\n <EuiForm\n @tagName={{argOrDefault @tagName \"form\"}}\n id={{formId}}\n @isInvalid={{@isInvalid}}\n @invalidCallout={{@invalidCallout}}\n @error={{@error}}\n @errorTitle={{@errorTitle}}\n {{on \"submit\" this.handleSubmit}}\n {{on \"reset\" this.handleReset}}\n {{didInsert this.setNewValidity}}\n {{on \"focusout\" this.onFocusOut}}\n ...attributes\n >\n {{yield\n (hash\n onValidityChange=this.onChildValidityChange\n register=this.register\n unregister=this.unregister\n isValid=this.isValid\n isInvalid=this.isInvalid\n isTouched=this.isTouched\n isInvalidAndTouched=this.isInvalidAndTouched\n formId=(argOrDefault @formId formId)\n Form=(component\n this.theme.FieldNestedForm\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n tagName=\"div\"\n formId=(argOrDefault @formId formId)\n theme=@theme\n isDisabled=@isDisabled\n fullWidth=@fullWidth\n )\n FieldNestedForm=(component\n this.theme.FieldNestedForm\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n tagName=\"div\"\n formId=(argOrDefault @formId formId)\n theme=@theme\n isDisabled=@isDisabled\n fullWidth=@fullWidth\n )\n FieldBase=(component\n this.theme.FieldBase\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldNumber=(component\n this.theme.FieldNumber\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldText=(component\n this.theme.FieldText\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldPassword=(component\n this.theme.FieldPassword\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldTextArea=(component\n this.theme.FieldTextArea\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldSelect=(component\n this.theme.FieldSelect\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldComboBox=(component\n this.theme.FieldComboBox\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n isDisabled=@isDisabled\n )\n FieldCheckboxGroup=(component\n this.theme.FieldCheckboxGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldRadioGroup=(component\n this.theme.FieldRadioGroup\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldRangeSlider=(component\n this.theme.FieldRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldDualRangeSlider=(component\n this.theme.FieldDualRangeSlider\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldSwitch=(component\n this.theme.FieldSwitch\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n FieldMarkdownEditor=(component\n this.theme.FieldMarkdownEditor\n register=this.register\n unregister=this.unregister\n onValidityChange=this.onChildValidityChange\n fullWidth=@fullWidth\n formId=(argOrDefault @formId formId)\n disabled=@isDisabled\n )\n )\n }}\n </EuiForm>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n","import ValidatedFormComponent from './validated-form.gts';\nimport FieldBase from './validated-form/field-base.gts';\nimport FieldCheckboxGroupComponent from './validated-form/field-checkbox-group.gts';\nimport FieldComboBoxComponent from './validated-form/field-combo-box.gts';\nimport FieldDualRangeSliderComponent from './validated-form/field-dual-range-slider.gts';\nimport FieldMarkdownEditorComponent from './validated-form/field-markdown-editor.gts';\nimport FieldNumberComponent from './validated-form/field-number.gts';\nimport FieldPasswordComponent from './validated-form/field-password.gts';\nimport FieldRadioGroupComponent from './validated-form/field-radio-group.gts';\nimport FieldRangeSliderComponent from './validated-form/field-range-slider.gts';\nimport FieldSelectComponent from './validated-form/field-select.gts';\nimport FieldSwitchComponent from './validated-form/field-switch.gts';\nimport FieldTextComponent from './validated-form/field-text.gts';\nimport FieldTextAreaComponent from './validated-form/field-text-area.gts';\n\nimport type { ComponentLike } from '@glint/template';\n\nexport interface IValidatedFormTheme {\n FieldNestedForm: ComponentLike<any>;\n FieldBase: ComponentLike<any>;\n FieldNumber: ComponentLike<any>;\n FieldText: ComponentLike<any>;\n FieldPassword: ComponentLike<any>;\n FieldTextArea: ComponentLike<any>;\n FieldSelect: ComponentLike<any>;\n FieldComboBox: ComponentLike<any>;\n FieldCheckboxGroup: ComponentLike<any>;\n FieldRadioGroup: ComponentLike<any>;\n FieldRangeSlider: ComponentLike<any>;\n FieldDualRangeSlider: ComponentLike<any>;\n FieldSwitch: ComponentLike<any>;\n FieldMarkdownEditor: ComponentLike<any>;\n}\n\nexport const ValidatedFormDefaultTheme: IValidatedFormTheme = {\n // Resolve lazily because ValidatedForm also imports its default theme.\n get FieldNestedForm(): ComponentLike<any> {\n return ValidatedFormComponent;\n },\n FieldBase: FieldBase,\n FieldNumber: FieldNumberComponent,\n FieldText: FieldTextComponent,\n FieldPassword: FieldPasswordComponent,\n FieldTextArea: FieldTextAreaComponent,\n FieldSelect: FieldSelectComponent,\n FieldComboBox: FieldComboBoxComponent,\n FieldCheckboxGroup: FieldCheckboxGroupComponent,\n FieldRadioGroup: FieldRadioGroupComponent,\n FieldRangeSlider: FieldRangeSliderComponent,\n FieldDualRangeSlider: FieldDualRangeSliderComponent,\n FieldSwitch: FieldSwitchComponent,\n FieldMarkdownEditor: FieldMarkdownEditorComponent\n};\n\nexport default ValidatedFormDefaultTheme;"],"names":["ValidatedFormComponent","Component","g","this","prototype","tracked","A","i","void 0","lastIsValid","lastIsTouched","constructor","owner1","args1","args","register","willDestroy","unregister","isValid","isInvalid","isInvalidAndTouched","isTouched","addChild","child1","childComponents","pushObject","triggerValidityChange","removeChild","removeObject","handleSubmit","e1","target","currentTarget","preventDefault","setIsTouched","onInvalid","onSubmit","n","action","isTouched1","forEach","updateValidity","handleReset","onReset","isDestroyed","schedule","getIsValid","isEvery","getIsTouched","isAny","lastIsValid1","lastIsTouched1","setNewValidity","next","isDestroying","onValidityChange","onChildValidityChange","onFocusOut","targetEuiFormRow1","closest","find","formRowElement","theme","theme1","ValidatedFormDefaultTheme","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiForm","on","didInsert","hash","strictMode","FieldNestedForm","FieldBase","FieldNumber","FieldNumberComponent","FieldText","FieldTextComponent","FieldPassword","FieldPasswordComponent","FieldTextArea","FieldTextAreaComponent","FieldSelect","FieldSelectComponent","FieldComboBox","FieldComboBoxComponent","FieldCheckboxGroup","FieldCheckboxGroupComponent","FieldRadioGroup","FieldRadioGroupComponent","FieldRangeSlider","FieldRangeSliderComponent","FieldDualRangeSlider","FieldDualRangeSliderComponent","FieldSwitch","FieldSwitchComponent","FieldMarkdownEditor","FieldMarkdownEditorComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEe,MAAMA,sBAAsB,SAASC,SAAS,CAAyB;AAAA,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,sBACjFC,OAAO,CAAA,EAAA,YAAA;MAAA,OACUC,CAAC,CAAqB,EAAE,CAAC,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,gBAAA,IAAAC,CAAA,CAAAJ,IAAA,sBAAAK,KAAA,CAAA,EAAA;AAC3C;EACAC,WAAW,CAAA;EACXC,aAAa,CAAA;AAAW,EAAA;AAAAR,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,gBACvBC,OAAO,CAAA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AkB,EAAEC,+BAA2B;AAC/CC,EAAAA,eAAe,EAAEC,4BAAwB;AACzCC,EAAAA,gBAAgB,EAAEC,6BAAyB;AAC3CC,EAAAA,oBAAoB,EAAEC,+BAA6B;AACnDC,EAAAA,WAAW,EAAEC,wBAAoB;AACjCC,EAAAA,mBAAmB,EAAEC,gCAAAA;AACvB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/validated-form",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.66",
|
|
4
4
|
"description": "The default blueprint for ember-cli addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"decorator-transforms": "^1.0.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@ember-eui/core": "^8.0.
|
|
43
|
+
"@ember-eui/core": "^8.0.66",
|
|
44
44
|
"@glimmer/component": "^1.1.2",
|
|
45
45
|
"@glimmer/tracking": "^1.1.2",
|
|
46
46
|
"ember-source": "^3.28.0 || >=4.0.0"
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"rollup-plugin-ts": "^3.0.2",
|
|
102
102
|
"typescript": "~5.0.3",
|
|
103
103
|
"webpack": "^5.89.0",
|
|
104
|
-
"@ember-eui/core": "8.0.
|
|
104
|
+
"@ember-eui/core": "8.0.66"
|
|
105
105
|
},
|
|
106
106
|
"engines": {
|
|
107
107
|
"node": "12.* || 14.* || >= 16"
|