@ember-eui/validated-form 8.0.3 → 8.0.5

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.
Files changed (32) hide show
  1. package/declarations/-private/random-id.d.ts +9 -0
  2. package/declarations/-private/random-id.d.ts.map +1 -0
  3. package/declarations/components/validated-form.d.ts.map +1 -1
  4. package/dist/-private/random-id.js +13 -0
  5. package/dist/-private/random-id.js.map +1 -0
  6. package/dist/components/validated-form/field-checkbox-group.js +3 -3
  7. package/dist/components/validated-form/field-checkbox-group.js.map +1 -1
  8. package/dist/components/validated-form/field-combo-box.js +3 -3
  9. package/dist/components/validated-form/field-combo-box.js.map +1 -1
  10. package/dist/components/validated-form/field-dual-range-slider.js +3 -3
  11. package/dist/components/validated-form/field-dual-range-slider.js.map +1 -1
  12. package/dist/components/validated-form/field-markdown-editor.js +3 -3
  13. package/dist/components/validated-form/field-markdown-editor.js.map +1 -1
  14. package/dist/components/validated-form/field-number.js +3 -3
  15. package/dist/components/validated-form/field-number.js.map +1 -1
  16. package/dist/components/validated-form/field-password.js +3 -3
  17. package/dist/components/validated-form/field-password.js.map +1 -1
  18. package/dist/components/validated-form/field-radio-group.js +3 -3
  19. package/dist/components/validated-form/field-radio-group.js.map +1 -1
  20. package/dist/components/validated-form/field-range-slider.js +3 -3
  21. package/dist/components/validated-form/field-range-slider.js.map +1 -1
  22. package/dist/components/validated-form/field-select.js +3 -3
  23. package/dist/components/validated-form/field-select.js.map +1 -1
  24. package/dist/components/validated-form/field-switch.js +3 -3
  25. package/dist/components/validated-form/field-switch.js.map +1 -1
  26. package/dist/components/validated-form/field-text-area.js +3 -3
  27. package/dist/components/validated-form/field-text-area.js.map +1 -1
  28. package/dist/components/validated-form/field-text.js +3 -3
  29. package/dist/components/validated-form/field-text.js.map +1 -1
  30. package/dist/components/validated-form.js +3 -3
  31. package/dist/components/validated-form.js.map +1 -1
  32. package/package.json +4 -5
@@ -0,0 +1,9 @@
1
+ declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
2
+ Args: {
3
+ Positional: unknown[];
4
+ Named: import("@ember/component/helper").EmptyObject;
5
+ };
6
+ Return: any;
7
+ }>;
8
+ export default _default;
9
+ //# sourceMappingURL=random-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-id.d.ts","sourceRoot":"","sources":["../../src/-private/random-id.js"],"names":[],"mappings":""}
@@ -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;AAa3C,OAAO,SAAS,MAAM,iCAAiC,CAAC;AAcxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,mBAAmB;IAClC,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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;gBACxD,gBAAgB,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;gBAC1D,oBAAoB,EAAE,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;gBAClE,WAAW,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;gBAChD,mBAAmB,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;aACjE;SACF,CAAC;KACH,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IAC1E,eAAe,+IAAoB;IAE5C,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,SAAS;IAIzB,WAAW,CAAC,KAAK,EAAE,SAAS;IAKtB,YAAY,CAAC,CAAC,EAAE,KAAK;IAkB3B,WAAW,CAAC,CAAC,EAAE,KAAK;IAMpB,QAAQ,CAAC,KAAK,EAAE,SAAS;IAOzB,UAAU,CAAC,KAAK,EAAE,SAAS;IAU3B,cAAc;IAId,UAAU;IAIV,YAAY;IAIZ,qBAAqB;IAarB,cAAc;IAgBd,qBAAqB;IAMrB,IAAI,KAAK;;;;;;;;;;;;;;MAIR;CAiDF"}
@@ -0,0 +1,13 @@
1
+ import { helper } from '@ember/component/helper';
2
+
3
+ var randomId = helper(randomId$1);
4
+
5
+ // Copy-pasted from the ember-source implementation:
6
+ // https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/glimmer/lib/helpers/unique-id.ts
7
+ function randomId$1() {
8
+ //@ts-expect-error
9
+ return ([3e7] + -1e3 + -4e3 + -2e3 + -1e11).replace(/[0-3]/g, a => (a * 4 ^ Math.random() * 16 >> (a & 2)).toString(16));
10
+ }
11
+
12
+ export { randomId as default };
13
+ //# sourceMappingURL=random-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-id.js","sources":["../../src/-private/random-id.js"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nexport default helper(randomId);\n\n// Copy-pasted from the ember-source implementation:\n// https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/glimmer/lib/helpers/unique-id.ts\nfunction randomId() {\n //@ts-expect-error\n return ([3e7] + -1e3 + -4e3 + -2e3 + -1e11).replace(/[0-3]/g, (a) =>\n ((a * 4) ^ ((Math.random() * 16) >> (a & 2))).toString(16)\n );\n}\n"],"names":["helper","randomId","replace","a","Math","random","toString"],"mappings":";;AAEA,eAAeA,MAAM,CAACC,UAAQ,CAAC,CAAA;;AAE/B;AACA;AACA,SAASA,UAAQA,GAAG;AAClB;EACA,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,EAAEC,OAAO,CAAC,QAAQ,EAAGC,CAAC,IAC9D,CAAEA,CAAC,GAAG,CAAC,GAAMC,IAAI,CAACC,MAAM,EAAE,GAAG,EAAE,KAAMF,CAAC,GAAG,CAAC,CAAE,EAAEG,QAAQ,CAAC,EAAE,CAC3D,CAAC,CAAA;AACH;;;;"}
@@ -5,7 +5,7 @@ import { EuiFormRow, EuiCheckboxGroup } from '@ember-eui/core/components';
5
5
  import { argOrDefault } from '@ember-eui/core/helpers';
6
6
  import { maybeUnwrapProxy } from '@ember-eui/core/utils/maybe-unwrap-proxy';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { n } from 'decorator-transforms/runtime';
11
11
  import { precompileTemplate } from '@ember/template-compilation';
@@ -45,10 +45,10 @@ class ValidatedFormFieldCheckboxGroup extends ValidatedFormFieldBase {
45
45
  n(this.prototype, "handleChange", [action]);
46
46
  }
47
47
  static {
48
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiCheckboxGroup class={{@fieldClasses}} @formId={{@formId}} @valueKey={{@valueKey}} @labelKey={{@labelKey}} aria-label={{@ariaLabel}} @disabled={{@disabled}} @compressed={{@compressed}} @isInvalid={{this.isInvalidAndTouched}} @options={{this.options}} @idToSelectedMap={{this.arrayToMap}} @legend={{@legend}} @onChange={{this.handleChange}} autofocus={{@autofocus}} ...attributes />\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
48
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiCheckboxGroup class={{@fieldClasses}} @formId={{@formId}} @valueKey={{@valueKey}} @labelKey={{@labelKey}} aria-label={{@ariaLabel}} @disabled={{@disabled}} @compressed={{@compressed}} @isInvalid={{this.isInvalidAndTouched}} @options={{this.options}} @idToSelectedMap={{this.arrayToMap}} @legend={{@legend}} @onChange={{this.handleChange}} autofocus={{@autofocus}} ...attributes />\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
49
49
  scope: () => ({
50
50
  argOrDefault,
51
- uniqueId,
51
+ randomId,
52
52
  EuiFormRow,
53
53
  not,
54
54
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-checkbox-group.js","sources":["../../../src/components/validated-form/field-checkbox-group.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiCheckboxGroup, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { maybeUnwrapProxy } from '@ember-eui/core/utils/maybe-unwrap-proxy';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiCheckboxGroupSignature } from '@ember-eui/core/components/eui-checkbox-group';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldCheckboxGroupSignature {\n Element: EuiCheckboxGroupSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiCheckboxGroupSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n };\n}\nexport default class ValidatedFormFieldCheckboxGroup extends ValidatedFormFieldBase<FieldCheckboxGroupSignature> {\n get value(): string[] {\n let value1 = maybeUnwrapProxy(this.args.value);\n return value1?.toArray?.() || value1;\n }\n get arrayToMap() {\n const currArr1 = this.value || [];\n return this.transformToMap(currArr1);\n }\n transformToMap(value1: string[] = []) {\n let valuesMap1 = value1.reduce((acc1, val1)=>{\n acc1[val1] = true;\n return acc1;\n }, {} as {\n [key: string]: boolean;\n });\n return valuesMap1;\n }\n @action\n //@ts-expect-error\n handleChange(optionId1: string) {\n const value1 = this.value || [];\n const found1 = value1.find((v1)=>v1 === optionId1);\n let newArr1 = [];\n if (found1) {\n newArr1 = value1.filter((v1)=>v1 !== optionId1);\n } else {\n newArr1 = [\n ...value1,\n optionId1\n ];\n }\n this.args.onChange?.(newArr1);\n this.notifyValidityChange();\n this.isTouched = true;\n }\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiCheckboxGroup\n class={{@fieldClasses}}\n @formId={{@formId}}\n @valueKey={{@valueKey}}\n @labelKey={{@labelKey}}\n aria-label={{@ariaLabel}}\n @disabled={{@disabled}}\n @compressed={{@compressed}}\n @isInvalid={{this.isInvalidAndTouched}}\n @options={{this.options}}\n @idToSelectedMap={{this.arrayToMap}}\n @legend={{@legend}}\n @onChange={{this.handleChange}}\n autofocus={{@autofocus}}\n ...attributes\n />\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldCheckboxGroup","ValidatedFormFieldBase","value","value1","maybeUnwrapProxy","args","toArray","arrayToMap","currArr1","transformToMap","valuesMap1","reduce","acc1","val1","handleChange","optionId1","found1","find","v1","newArr1","filter","onChange","notifyValidityChange","isTouched","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiCheckboxGroup","strictMode"],"mappings":";;;;;;;;;;;;;AA4Be,MAAMA,+BAA+B,SAASC,sBAAsB,CAA8B;EAC7G,IAAIC,KAAKA,GAAa;IAClB,IAAIC,MAAM,GAAGC,gBAAgB,CAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAC,CAAA;AAC9C,IAAA,OAAOC,MAAM,EAAEG,OAAO,IAAI,IAAIH,MAAM,CAAA;AACxC,GAAA;EACA,IAAII,UAAUA,GAAG;AACb,IAAA,MAAMC,QAAQ,GAAG,IAAI,CAACN,KAAK,IAAI,EAAE,CAAA;AACjC,IAAA,OAAO,IAAI,CAACO,cAAc,CAACD,QAAQ,CAAC,CAAA;AACxC,GAAA;AACAC,EAAAA,cAAcA,CAACN,MAAgB,GAAG,EAAE,EAAE;IAClC,IAAIO,UAAU,GAAGP,MAAM,CAACQ,MAAM,CAAC,CAACC,IAAI,EAAEC,IAAI,KAAG;AACzCD,MAAAA,IAAI,CAACC,IAAI,CAAC,GAAG,IAAI,CAAA;AACjB,MAAA,OAAOD,IAAI,CAAA;KACd,EAAE,EAEF,CAAC,CAAA;AACF,IAAA,OAAOF,UAAU,CAAA;AACrB,GAAA;AAEA;EACAI,YAAYA,CAACC,SAAiB,EAAE;AAC5B,IAAA,MAAMZ,MAAM,GAAG,IAAI,CAACD,KAAK,IAAI,EAAE,CAAA;IAC/B,MAAMc,MAAM,GAAGb,MAAM,CAACc,IAAI,CAAEC,EAAE,IAAGA,EAAE,KAAKH,SAAS,CAAC,CAAA;IAClD,IAAII,OAAO,GAAG,EAAE,CAAA;AAChB,IAAA,IAAIH,MAAM,EAAE;MACRG,OAAO,GAAGhB,MAAM,CAACiB,MAAM,CAAEF,EAAE,IAAGA,EAAE,KAAKH,SAAS,CAAC,CAAA;AACnD,KAAC,MAAM;AACHI,MAAAA,OAAO,GAAG,CACN,GAAGhB,MAAM,EACTY,SAAS,CACZ,CAAA;AACL,KAAA;AACA,IAAA,IAAI,CAACV,IAAI,CAACgB,QAAQ,GAAGF,OAAO,CAAC,CAAA;IAC7B,IAAI,CAACG,oBAAoB,EAAE,CAAA;IAC3B,IAAI,CAACC,SAAS,GAAG,IAAI,CAAA;AACzB,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBAjBAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAkBP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA6CH,2pCAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;AAAAC,QAAAA,gBAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-checkbox-group.js","sources":["../../../src/components/validated-form/field-checkbox-group.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiCheckboxGroup, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { maybeUnwrapProxy } from '@ember-eui/core/utils/maybe-unwrap-proxy';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiCheckboxGroupSignature } from '@ember-eui/core/components/eui-checkbox-group';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldCheckboxGroupSignature {\n Element: EuiCheckboxGroupSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiCheckboxGroupSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n };\n}\nexport default class ValidatedFormFieldCheckboxGroup extends ValidatedFormFieldBase<FieldCheckboxGroupSignature> {\n get value(): string[] {\n let value1 = maybeUnwrapProxy(this.args.value);\n return value1?.toArray?.() || value1;\n }\n get arrayToMap() {\n const currArr1 = this.value || [];\n return this.transformToMap(currArr1);\n }\n transformToMap(value1: string[] = []) {\n let valuesMap1 = value1.reduce((acc1, val1)=>{\n acc1[val1] = true;\n return acc1;\n }, {} as {\n [key: string]: boolean;\n });\n return valuesMap1;\n }\n @action\n //@ts-expect-error\n handleChange(optionId1: string) {\n const value1 = this.value || [];\n const found1 = value1.find((v1)=>v1 === optionId1);\n let newArr1 = [];\n if (found1) {\n newArr1 = value1.filter((v1)=>v1 !== optionId1);\n } else {\n newArr1 = [\n ...value1,\n optionId1\n ];\n }\n this.args.onChange?.(newArr1);\n this.notifyValidityChange();\n this.isTouched = true;\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiCheckboxGroup\n class={{@fieldClasses}}\n @formId={{@formId}}\n @valueKey={{@valueKey}}\n @labelKey={{@labelKey}}\n aria-label={{@ariaLabel}}\n @disabled={{@disabled}}\n @compressed={{@compressed}}\n @isInvalid={{this.isInvalidAndTouched}}\n @options={{this.options}}\n @idToSelectedMap={{this.arrayToMap}}\n @legend={{@legend}}\n @onChange={{this.handleChange}}\n autofocus={{@autofocus}}\n ...attributes\n />\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldCheckboxGroup","ValidatedFormFieldBase","value","value1","maybeUnwrapProxy","args","toArray","arrayToMap","currArr1","transformToMap","valuesMap1","reduce","acc1","val1","handleChange","optionId1","found1","find","v1","newArr1","filter","onChange","notifyValidityChange","isTouched","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiCheckboxGroup","strictMode"],"mappings":";;;;;;;;;;;;;AA4Be,MAAMA,+BAA+B,SAASC,sBAAsB,CAA8B;EAC7G,IAAIC,KAAKA,GAAa;IAClB,IAAIC,MAAM,GAAGC,gBAAgB,CAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAC,CAAA;AAC9C,IAAA,OAAOC,MAAM,EAAEG,OAAO,IAAI,IAAIH,MAAM,CAAA;AACxC,GAAA;EACA,IAAII,UAAUA,GAAG;AACb,IAAA,MAAMC,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AAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;AAAAC,QAAAA,gBAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -7,7 +7,7 @@ import { argOrDefault } from '@ember-eui/core/helpers';
7
7
  import optional from 'ember-composable-helpers/helpers/optional';
8
8
  import queue from 'ember-composable-helpers/helpers/queue';
9
9
  import { not } from 'ember-truth-helpers';
10
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
10
+ import randomId from '../../-private/random-id.js';
11
11
  import ValidatedFormFieldBase from './field-base.js';
12
12
  import { n } from 'decorator-transforms/runtime';
13
13
  import { precompileTemplate } from '@ember/template-compilation';
@@ -24,10 +24,10 @@ class ValidatedFormFieldComboBox extends ValidatedFormFieldBase {
24
24
  n(this.prototype, "handleChange", [action]);
25
25
  }
26
26
  static {
27
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @selectedOptions}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiComboBox class={{@fieldClasses}} @onChange={{this.handleChange}} @dropdownClass={{@dropdownClass}} @placeholder={{@placeholder}} @options={{this.options}} @singleSelection={{@singleSelection}} @selectedOptions={{@selectedOptions}} @searchEnabled={{argOrDefault @searchEnabled true}} @searchField={{@searchField}} @searchMessage={{@searchMessage}} @search={{@search}} aria-label={{@ariaLabel}} form={{@formId}} @isInvalid={{this.isInvalidAndTouched}} @isClearable={{@isClearable}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @readOnly={{@readOnly}} @compressed={{@compressed}} @onCreateOption={{@onCreateOption}} @customOptionText={{@customOptionText}} @onBlur={{queue (fn this.setIsTouched true) (optional @onBlur)}} @onFocus={{@onFocus}} @onClose={{@onClose}} @onOpen={{@onOpen}} @isDisabled={{@isDisabled}} @renderInPlace={{@renderInPlace}} @extra={{@extra}} ...attributes as |opt index select|>\n {{yield opt index select}}\n </EuiComboBox>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
27
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @selectedOptions}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiComboBox class={{@fieldClasses}} @onChange={{this.handleChange}} @dropdownClass={{@dropdownClass}} @placeholder={{@placeholder}} @options={{this.options}} @singleSelection={{@singleSelection}} @selectedOptions={{@selectedOptions}} @searchEnabled={{argOrDefault @searchEnabled true}} @searchField={{@searchField}} @searchMessage={{@searchMessage}} @search={{@search}} aria-label={{@ariaLabel}} form={{@formId}} @isInvalid={{this.isInvalidAndTouched}} @isClearable={{@isClearable}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @readOnly={{@readOnly}} @compressed={{@compressed}} @onCreateOption={{@onCreateOption}} @customOptionText={{@customOptionText}} @onBlur={{queue (fn this.setIsTouched true) (optional @onBlur)}} @onFocus={{@onFocus}} @onClose={{@onClose}} @onOpen={{@onOpen}} @isDisabled={{@isDisabled}} @renderInPlace={{@renderInPlace}} @extra={{@extra}} ...attributes as |opt index select|>\n {{yield opt index select}}\n </EuiComboBox>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
28
28
  scope: () => ({
29
29
  argOrDefault,
30
- uniqueId,
30
+ randomId,
31
31
  EuiFormRow,
32
32
  not,
33
33
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-combo-box.js","sources":["../../../src/components/validated-form/field-combo-box.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiComboBox, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport optional from 'ember-composable-helpers/helpers/optional';\nimport queue from 'ember-composable-helpers/helpers/queue';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiComboBoxSignature } from '@ember-eui/core/components/eui-combo-box';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldComboBoxSignature {\n Element: EuiComboBoxSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiComboBoxSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n options?: EuiComboBoxSignature['Args']['options'];\n selectedOptions?: EuiComboBoxSignature['Args']['selectedOptions'];\n };\n Blocks: {\n label: EuiFormRowSignature['Blocks']['label'];\n default: EuiComboBoxSignature['Blocks']['default'];\n };\n}\nexport default class ValidatedFormFieldComboBox extends ValidatedFormFieldBase<FieldComboBoxSignature> {\n validationProperty = 'args.selectedOptions';\n @action\n //@ts-expect-error\n handleChange(options1: any[]) {\n this.args.onChange(options1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @selectedOptions}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiComboBox\n class={{@fieldClasses}}\n @onChange={{this.handleChange}}\n @dropdownClass={{@dropdownClass}}\n @placeholder={{@placeholder}}\n @options={{this.options}}\n @singleSelection={{@singleSelection}}\n @selectedOptions={{@selectedOptions}}\n @searchEnabled={{argOrDefault @searchEnabled true}}\n @searchField={{@searchField}}\n @searchMessage={{@searchMessage}}\n @search={{@search}}\n aria-label={{@ariaLabel}}\n form={{@formId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @isClearable={{@isClearable}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @readOnly={{@readOnly}}\n @compressed={{@compressed}}\n @onCreateOption={{@onCreateOption}}\n @customOptionText={{@customOptionText}}\n @onBlur={{queue (fn this.setIsTouched true) (optional @onBlur)}}\n @onFocus={{@onFocus}}\n @onClose={{@onClose}}\n @onOpen={{@onOpen}}\n @isDisabled={{@isDisabled}}\n @renderInPlace={{@renderInPlace}}\n @extra={{@extra}}\n ...attributes\n as |opt index select|\n >\n {{yield opt index select}}\n </EuiComboBox>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldComboBox","ValidatedFormFieldBase","validationProperty","handleChange","options1","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiComboBox","queue","fn","optional","strictMode"],"mappings":";;;;;;;;;;;;;;;AAiCe,MAAMA,0BAA0B,SAASC,sBAAsB,CAAyB;AACnGC,EAAAA,kBAAkB,GAAG,sBAAsB,CAAA;AAE3C;EACAC,YAAYA,CAACC,QAAe,EAAE;AAC1B,IAAA,IAAI,CAACC,IAAI,CAACC,QAAQ,CAACF,QAAQ,CAAC,CAAA;IAC5B,IAAI,CAACG,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBALAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAMP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA8DH,kvDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,WAAA;QAAAC,KAAA;QAAAC,EAAA;AAAAC,QAAAA,QAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-combo-box.js","sources":["../../../src/components/validated-form/field-combo-box.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiComboBox, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport optional from 'ember-composable-helpers/helpers/optional';\nimport queue from 'ember-composable-helpers/helpers/queue';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiComboBoxSignature } from '@ember-eui/core/components/eui-combo-box';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldComboBoxSignature {\n Element: EuiComboBoxSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiComboBoxSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n options?: EuiComboBoxSignature['Args']['options'];\n selectedOptions?: EuiComboBoxSignature['Args']['selectedOptions'];\n };\n Blocks: {\n label: EuiFormRowSignature['Blocks']['label'];\n default: EuiComboBoxSignature['Blocks']['default'];\n };\n}\nexport default class ValidatedFormFieldComboBox extends ValidatedFormFieldBase<FieldComboBoxSignature> {\n validationProperty = 'args.selectedOptions';\n @action\n //@ts-expect-error\n handleChange(options1: any[]) {\n this.args.onChange(options1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @selectedOptions}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiComboBox\n class={{@fieldClasses}}\n @onChange={{this.handleChange}}\n @dropdownClass={{@dropdownClass}}\n @placeholder={{@placeholder}}\n @options={{this.options}}\n @singleSelection={{@singleSelection}}\n @selectedOptions={{@selectedOptions}}\n @searchEnabled={{argOrDefault @searchEnabled true}}\n @searchField={{@searchField}}\n @searchMessage={{@searchMessage}}\n @search={{@search}}\n aria-label={{@ariaLabel}}\n form={{@formId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @isClearable={{@isClearable}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @readOnly={{@readOnly}}\n @compressed={{@compressed}}\n @onCreateOption={{@onCreateOption}}\n @customOptionText={{@customOptionText}}\n @onBlur={{queue (fn this.setIsTouched true) (optional @onBlur)}}\n @onFocus={{@onFocus}}\n @onClose={{@onClose}}\n @onOpen={{@onOpen}}\n @isDisabled={{@isDisabled}}\n @renderInPlace={{@renderInPlace}}\n @extra={{@extra}}\n ...attributes\n as |opt index select|\n >\n {{yield opt index select}}\n </EuiComboBox>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldComboBox","ValidatedFormFieldBase","validationProperty","handleChange","options1","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiComboBox","queue","fn","optional","strictMode"],"mappings":";;;;;;;;;;;;;;;AAiCe,MAAMA,0BAA0B,SAASC,sBAAsB,CAAyB;AACnGC,EAAAA,kBAAkB,GAAG,sBAAsB,CAAA;AAE3C;EACAC,YAAYA,CAACC,QAAe,EAAE;AAC1B,IAAA,IAAI,CAACC,IAAI,CAACC,QAAQ,CAACF,QAAQ,CAAC,CAAA;IAC5B,IAAI,CAACG,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBALAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAMP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA8DH,kvDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,WAAA;QAAAC,KAAA;QAAAC,EAAA;AAAAC,QAAAA,QAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -6,7 +6,7 @@ import didUpdate from '@ember/render-modifiers/modifiers/did-update';
6
6
  import { EuiFormRow, EuiDualRange } from '@ember-eui/core/components';
7
7
  import { argOrDefault } from '@ember-eui/core/helpers';
8
8
  import { not } from 'ember-truth-helpers';
9
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
9
+ import randomId from '../../-private/random-id.js';
10
10
  import ValidatedFormFieldBase from './field-base.js';
11
11
  import { n } from 'decorator-transforms/runtime';
12
12
  import { precompileTemplate } from '@ember/template-compilation';
@@ -24,10 +24,10 @@ class ValidatedFormFieldRangeSlider extends ValidatedFormFieldBase {
24
24
  n(this.prototype, "handleChange", [action]);
25
25
  }
26
26
  static {
27
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiDualRange class={{@fieldClasses}} form={{@formId}} @value={{@value}} @fullWidth={{@fullWidth}} @isInvalid={{this.isInvalidAndTouched}} @levels={{@levels}} @showLabels={{@showLabels}} @showInput={{@showInput}} @tickInterval={{@tickInterval}} @ticks={{@ticks}} aria-label={{@ariaLabel}} @disabled={{@disabled}} @compressed={{@compressed}} @showRange={{@showRange}} @showTicks={{@showTicks}} @readOnly={{@readOnly}} @id={{theId}} @step={{@step}} @onChange={{this.handleChange}} @max={{@max}} @min={{@min}} @isPrependProvided={{has-block \"prepend\"}} @isAppendProvided={{has-block \"append\"}} @isFakeMinBlock={{not (has-block \"min\")}} @isFakeMaxBlock={{not (has-block \"max\")}} autofocus={{@autofocus}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}}>\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min>\n {{yield to=\"min\"}}\n </:min>\n <:max>\n {{yield to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiDualRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
27
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiDualRange class={{@fieldClasses}} form={{@formId}} @value={{@value}} @fullWidth={{@fullWidth}} @isInvalid={{this.isInvalidAndTouched}} @levels={{@levels}} @showLabels={{@showLabels}} @showInput={{@showInput}} @tickInterval={{@tickInterval}} @ticks={{@ticks}} aria-label={{@ariaLabel}} @disabled={{@disabled}} @compressed={{@compressed}} @showRange={{@showRange}} @showTicks={{@showTicks}} @readOnly={{@readOnly}} @id={{theId}} @step={{@step}} @onChange={{this.handleChange}} @max={{@max}} @min={{@min}} @isPrependProvided={{has-block \"prepend\"}} @isAppendProvided={{has-block \"append\"}} @isFakeMinBlock={{not (has-block \"min\")}} @isFakeMaxBlock={{not (has-block \"max\")}} autofocus={{@autofocus}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}}>\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min>\n {{yield to=\"min\"}}\n </:min>\n <:max>\n {{yield to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiDualRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
28
28
  scope: () => ({
29
29
  argOrDefault,
30
- uniqueId,
30
+ randomId,
31
31
  EuiFormRow,
32
32
  not,
33
33
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-dual-range-slider.js","sources":["../../../src/components/validated-form/field-dual-range-slider.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiDualRange, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiDualRangeSignature, ValueMember } from '@ember-eui/core/components/eui-dual-range';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldDualRangeSliderSignature {\n Element: EuiDualRangeSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiDualRangeSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n disabled?: boolean;\n compressed?: boolean;\n hasFocus?: boolean;\n isLoading?: boolean;\n readOnly?: boolean;\n icon?: string;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n prepend: [...EuiDualRangeSignature['Blocks']['prepend']];\n min: [...EuiDualRangeSignature['Blocks']['min']];\n append: [...EuiDualRangeSignature['Blocks']['append']];\n max: [...EuiDualRangeSignature['Blocks']['max']];\n };\n}\nexport default class ValidatedFormFieldRangeSlider extends ValidatedFormFieldBase<FieldDualRangeSliderSignature> {\n @action\n //@ts-expect-error\n handleChange(e1: [ValueMember, ValueMember], _isValid1: boolean, _event1: Event) {\n // The received event for the dual range is an array with [min, max] as strings\n const value1 = [\n Number(e1[0]),\n Number(e1[1])\n ];\n this.args.onChange(value1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiDualRange\n class={{@fieldClasses}}\n form={{@formId}}\n @value={{@value}}\n @fullWidth={{@fullWidth}}\n @isInvalid={{this.isInvalidAndTouched}}\n @levels={{@levels}}\n @showLabels={{@showLabels}}\n @showInput={{@showInput}}\n @tickInterval={{@tickInterval}}\n @ticks={{@ticks}}\n aria-label={{@ariaLabel}}\n @disabled={{@disabled}}\n @compressed={{@compressed}}\n @showRange={{@showRange}}\n @showTicks={{@showTicks}}\n @readOnly={{@readOnly}}\n @id={{theId}}\n @step={{@step}}\n @onChange={{this.handleChange}}\n @max={{@max}}\n @min={{@min}}\n @isPrependProvided={{has-block \"prepend\"}}\n @isAppendProvided={{has-block \"append\"}}\n @isFakeMinBlock={{not (has-block \"min\")}}\n @isFakeMaxBlock={{not (has-block \"max\")}}\n autofocus={{@autofocus}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n >\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min>\n {{yield to=\"min\"}}\n </:min>\n <:max>\n {{yield to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiDualRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldRangeSlider","ValidatedFormFieldBase","handleChange","e1","_isValid1","_event1","value1","Number","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiDualRange","on","fn","strictMode"],"mappings":";;;;;;;;;;;;;;AAsCe,MAAMA,6BAA6B,SAASC,sBAAsB,CAAgC;AAE7G;AACAC,EAAAA,YAAYA,CAACC,EAA8B,EAAEC,SAAkB,EAAEC,OAAc,EAAE;AAC7E;AACA,IAAA,MAAMC,MAAM,GAAG,CACXC,MAAM,CAACJ,EAAE,CAAC,CAAC,CAAC,CAAC,EACbI,MAAM,CAACJ,EAAE,CAAC,CAAC,CAAC,CAAC,CAChB,CAAA;AACD,IAAA,IAAI,CAACK,IAAI,CAACC,QAAQ,CAACH,MAAM,CAAC,CAAA;IAC1B,IAAI,CAACI,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBAVAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAWP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAwEH,u6DAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,YAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-dual-range-slider.js","sources":["../../../src/components/validated-form/field-dual-range-slider.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiDualRange, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiDualRangeSignature, ValueMember } from '@ember-eui/core/components/eui-dual-range';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldDualRangeSliderSignature {\n Element: EuiDualRangeSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiDualRangeSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n disabled?: boolean;\n compressed?: boolean;\n hasFocus?: boolean;\n isLoading?: boolean;\n readOnly?: boolean;\n icon?: string;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n prepend: [...EuiDualRangeSignature['Blocks']['prepend']];\n min: [...EuiDualRangeSignature['Blocks']['min']];\n append: [...EuiDualRangeSignature['Blocks']['append']];\n max: [...EuiDualRangeSignature['Blocks']['max']];\n };\n}\nexport default class ValidatedFormFieldRangeSlider extends ValidatedFormFieldBase<FieldDualRangeSliderSignature> {\n @action\n //@ts-expect-error\n handleChange(e1: [ValueMember, ValueMember], _isValid1: boolean, _event1: Event) {\n // The received event for the dual range is an array with [min, max] as strings\n const value1 = [\n Number(e1[0]),\n Number(e1[1])\n ];\n this.args.onChange(value1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiDualRange\n class={{@fieldClasses}}\n form={{@formId}}\n @value={{@value}}\n @fullWidth={{@fullWidth}}\n @isInvalid={{this.isInvalidAndTouched}}\n @levels={{@levels}}\n @showLabels={{@showLabels}}\n @showInput={{@showInput}}\n @tickInterval={{@tickInterval}}\n @ticks={{@ticks}}\n aria-label={{@ariaLabel}}\n @disabled={{@disabled}}\n @compressed={{@compressed}}\n @showRange={{@showRange}}\n @showTicks={{@showTicks}}\n @readOnly={{@readOnly}}\n @id={{theId}}\n @step={{@step}}\n @onChange={{this.handleChange}}\n @max={{@max}}\n @min={{@min}}\n @isPrependProvided={{has-block \"prepend\"}}\n @isAppendProvided={{has-block \"append\"}}\n @isFakeMinBlock={{not (has-block \"min\")}}\n @isFakeMaxBlock={{not (has-block \"max\")}}\n autofocus={{@autofocus}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n >\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min>\n {{yield to=\"min\"}}\n </:min>\n <:max>\n {{yield to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiDualRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldRangeSlider","ValidatedFormFieldBase","handleChange","e1","_isValid1","_event1","value1","Number","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiDualRange","on","fn","strictMode"],"mappings":";;;;;;;;;;;;;;AAsCe,MAAMA,6BAA6B,SAASC,sBAAsB,CAAgC;AAE7G;AACAC,EAAAA,YAAYA,CAACC,EAA8B,EAAEC,SAAkB,EAAEC,OAAc,EAAE;AAC7E;AACA,IAAA,MAAMC,MAAM,GAAG,CACXC,MAAM,CAACJ,EAAE,CAAC,CAAC,CAAC,CAAC,EACbI,MAAM,CAACJ,EAAE,CAAC,CAAC,CAAC,CAAC,CAChB,CAAA;AACD,IAAA,IAAI,CAACK,IAAI,CAACC,QAAQ,CAACH,MAAM,CAAC,CAAA;IAC1B,IAAI,CAACI,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBAVAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAWP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAwEH,u6DAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,YAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -7,7 +7,7 @@ import { EuiFormRow, EuiMarkdownEditor } from '@ember-eui/core/components';
7
7
  import { argOrDefault } from '@ember-eui/core/helpers';
8
8
  import { EnsureSafeComponentHelper } from '@embroider/util';
9
9
  import { not } from 'ember-truth-helpers';
10
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
10
+ import randomId from '../../-private/random-id.js';
11
11
  import ValidatedFormFieldBase from './field-base.js';
12
12
  import { n } from 'decorator-transforms/runtime';
13
13
  import { precompileTemplate } from '@ember/template-compilation';
@@ -23,10 +23,10 @@ class ValidatedFormFieldMarkdownEditor extends ValidatedFormFieldBase {
23
23
  n(this.prototype, "handleChange", [action]);
24
24
  }
25
25
  static {
26
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n {{#let (if @editorComponent (component (EnsureSafeComponentHelper @editorComponent)) (component EuiMarkdownEditor)) as |MarkdownEditor|}}\n {{!--@glint-expect-error--}}\n <MarkdownEditor class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @value={{@value}} @isInvalid={{this.isInvalidAndTouched}} @disabled={{@disabled}} @editorId={{theId}} @onChange={{this.handleChange}} @ariaDescribedBy={{@ariaDescribedBy}} @ariaLabel={{@ariaLabel}} @ariaLabelledBy={{@ariaLabelledBy}} autofocus={{@autofocus}} placeholder={{@placeholder}} @onParse={{@onParse}} @parsingPluginList={{@parsingPluginList}} @uiPlugins={{@uiPlugins}} @height={{@height}} @maxHeight={{@maxHeight}} @autoExpandPreview={{@autoExpandPreview}} @initialViewMode={{@initialViewMode}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} />\n {{/let}}\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
26
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n {{#let (if @editorComponent (component (EnsureSafeComponentHelper @editorComponent)) (component EuiMarkdownEditor)) as |MarkdownEditor|}}\n {{!--@glint-expect-error--}}\n <MarkdownEditor class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @value={{@value}} @isInvalid={{this.isInvalidAndTouched}} @disabled={{@disabled}} @editorId={{theId}} @onChange={{this.handleChange}} @ariaDescribedBy={{@ariaDescribedBy}} @ariaLabel={{@ariaLabel}} @ariaLabelledBy={{@ariaLabelledBy}} autofocus={{@autofocus}} placeholder={{@placeholder}} @onParse={{@onParse}} @parsingPluginList={{@parsingPluginList}} @uiPlugins={{@uiPlugins}} @height={{@height}} @maxHeight={{@maxHeight}} @autoExpandPreview={{@autoExpandPreview}} @initialViewMode={{@initialViewMode}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} />\n {{/let}}\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
27
27
  scope: () => ({
28
28
  argOrDefault,
29
- uniqueId,
29
+ randomId,
30
30
  EuiFormRow,
31
31
  not,
32
32
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-markdown-editor.js","sources":["../../../src/components/validated-form/field-markdown-editor.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiMarkdownEditor } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { EnsureSafeComponentHelper } from '@embroider/util';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiMarkdownEditorSignature } from '@ember-eui/core/components/eui-markdown-editor';\nimport type { ComponentLike } from '@glint/template';\nexport interface FieldMarkdownEditorSignature {\n Element: EuiMarkdownEditorSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiMarkdownEditorSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n editorComponent?: ComponentLike;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n };\n}\nexport default class ValidatedFormFieldMarkdownEditor extends ValidatedFormFieldBase<FieldMarkdownEditorSignature> {\n @action\n //@ts-expect-error\n handleChange(str1: string) {\n this.args.onChange(str1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n {{#let\n (if\n @editorComponent\n (component (EnsureSafeComponentHelper @editorComponent))\n (component EuiMarkdownEditor)\n )\n as |MarkdownEditor|\n }}\n {{!@glint-expect-error}}\n <MarkdownEditor\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @value={{@value}}\n @isInvalid={{this.isInvalidAndTouched}}\n @disabled={{@disabled}}\n @editorId={{theId}}\n @onChange={{this.handleChange}}\n @ariaDescribedBy={{@ariaDescribedBy}}\n @ariaLabel={{@ariaLabel}}\n @ariaLabelledBy={{@ariaLabelledBy}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n @onParse={{@onParse}}\n @parsingPluginList={{@parsingPluginList}}\n @uiPlugins={{@uiPlugins}}\n @height={{@height}}\n @maxHeight={{@maxHeight}}\n @autoExpandPreview={{@autoExpandPreview}}\n @initialViewMode={{@initialViewMode}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n />\n {{/let}}\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldMarkdownEditor","ValidatedFormFieldBase","handleChange","str1","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EnsureSafeComponentHelper","EuiMarkdownEditor","on","fn","strictMode"],"mappings":";;;;;;;;;;;;;;;AAgCe,MAAMA,gCAAgC,SAASC,sBAAsB,CAA+B;AAE/G;EACAC,YAAYA,CAACC,IAAY,EAAE;AACvB,IAAA,IAAI,CAACC,IAAI,CAACC,QAAQ,CAACF,IAAI,CAAC,CAAA;IACxB,IAAI,CAACG,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBALAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAMP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA8DH,soDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,yBAAA;QAAAC,iBAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-markdown-editor.js","sources":["../../../src/components/validated-form/field-markdown-editor.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiMarkdownEditor } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { EnsureSafeComponentHelper } from '@embroider/util';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiMarkdownEditorSignature } from '@ember-eui/core/components/eui-markdown-editor';\nimport type { ComponentLike } from '@glint/template';\nexport interface FieldMarkdownEditorSignature {\n Element: EuiMarkdownEditorSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiMarkdownEditorSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n editorComponent?: ComponentLike;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n };\n}\nexport default class ValidatedFormFieldMarkdownEditor extends ValidatedFormFieldBase<FieldMarkdownEditorSignature> {\n @action\n //@ts-expect-error\n handleChange(str1: string) {\n this.args.onChange(str1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n {{#let\n (if\n @editorComponent\n (component (EnsureSafeComponentHelper @editorComponent))\n (component EuiMarkdownEditor)\n )\n as |MarkdownEditor|\n }}\n {{!@glint-expect-error}}\n <MarkdownEditor\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @value={{@value}}\n @isInvalid={{this.isInvalidAndTouched}}\n @disabled={{@disabled}}\n @editorId={{theId}}\n @onChange={{this.handleChange}}\n @ariaDescribedBy={{@ariaDescribedBy}}\n @ariaLabel={{@ariaLabel}}\n @ariaLabelledBy={{@ariaLabelledBy}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n @onParse={{@onParse}}\n @parsingPluginList={{@parsingPluginList}}\n @uiPlugins={{@uiPlugins}}\n @height={{@height}}\n @maxHeight={{@maxHeight}}\n @autoExpandPreview={{@autoExpandPreview}}\n @initialViewMode={{@initialViewMode}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n />\n {{/let}}\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldMarkdownEditor","ValidatedFormFieldBase","handleChange","str1","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EnsureSafeComponentHelper","EuiMarkdownEditor","on","fn","strictMode"],"mappings":";;;;;;;;;;;;;;;AAgCe,MAAMA,gCAAgC,SAASC,sBAAsB,CAA+B;AAE/G;EACAC,YAAYA,CAACC,IAAY,EAAE;AACvB,IAAA,IAAI,CAACC,IAAI,CAACC,QAAQ,CAACF,IAAI,CAAC,CAAA;IACxB,IAAI,CAACG,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBALAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAMP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA8DH,soDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,yBAAA;QAAAC,iBAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -5,17 +5,17 @@ import didUpdate from '@ember/render-modifiers/modifiers/did-update';
5
5
  import { EuiFormRow, EuiFieldNumber } from '@ember-eui/core/components';
6
6
  import { argOrDefault } from '@ember-eui/core/helpers';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { precompileTemplate } from '@ember/template-compilation';
11
11
  import { setComponentTemplate } from '@ember/component';
12
12
 
13
13
  class ValidatedFormFieldNumber extends ValidatedFormFieldBase {
14
14
  static {
15
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiFieldNumber class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @value={{@value}} @icon={{@icon}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @readOnly={{@readOnly}} @disabled={{@disabled}} @min={{@min}} @max={{@max}} @step={{@step}} @inputRef={{@inputRef}} @controlOnly={{@controlOnly}} @compressed={{@compressed}} @id={{theId}} @clear={{@clear}} @isPrependProvided={{has-block \"prepend\"}} @isAppendProvided={{has-block \"append\"}} autofocus={{@autofocus}} placeholder={{@placeholder}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}}>\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiFieldNumber>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
15
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiFieldNumber class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @value={{@value}} @icon={{@icon}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @readOnly={{@readOnly}} @disabled={{@disabled}} @min={{@min}} @max={{@max}} @step={{@step}} @inputRef={{@inputRef}} @controlOnly={{@controlOnly}} @compressed={{@compressed}} @id={{theId}} @clear={{@clear}} @isPrependProvided={{has-block \"prepend\"}} @isAppendProvided={{has-block \"append\"}} autofocus={{@autofocus}} placeholder={{@placeholder}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}}>\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiFieldNumber>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
16
16
  scope: () => ({
17
17
  argOrDefault,
18
- uniqueId,
18
+ randomId,
19
19
  EuiFormRow,
20
20
  not,
21
21
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-number.js","sources":["../../../src/components/validated-form/field-number.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFieldNumber, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldNumberSignature } from '@ember-eui/core/components/eui-field-number';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldNumberSignature {\n Element: EuiFieldNumberSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiFieldNumberSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n prepend: [...EuiFieldNumberSignature['Blocks']['prepend']];\n append: [...EuiFieldNumberSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldNumber extends ValidatedFormFieldBase<FieldNumberSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiFieldNumber\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @value={{@value}}\n @icon={{@icon}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @readOnly={{@readOnly}}\n @disabled={{@disabled}}\n @min={{@min}}\n @max={{@max}}\n @step={{@step}}\n @inputRef={{@inputRef}}\n @controlOnly={{@controlOnly}}\n @compressed={{@compressed}}\n @id={{theId}}\n @clear={{@clear}}\n @isPrependProvided={{has-block \"prepend\"}}\n @isAppendProvided={{has-block \"append\"}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n >\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiFieldNumber>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldNumber","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiFieldNumber","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA8Be,MAAMA,wBAAwB,SAASC,sBAAsB,CAAuB;AAC/F,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA+DH,2pDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,cAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-number.js","sources":["../../../src/components/validated-form/field-number.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFieldNumber, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldNumberSignature } from '@ember-eui/core/components/eui-field-number';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldNumberSignature {\n Element: EuiFieldNumberSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiFieldNumberSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n prepend: [...EuiFieldNumberSignature['Blocks']['prepend']];\n append: [...EuiFieldNumberSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldNumber extends ValidatedFormFieldBase<FieldNumberSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiFieldNumber\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @value={{@value}}\n @icon={{@icon}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @readOnly={{@readOnly}}\n @disabled={{@disabled}}\n @min={{@min}}\n @max={{@max}}\n @step={{@step}}\n @inputRef={{@inputRef}}\n @controlOnly={{@controlOnly}}\n @compressed={{@compressed}}\n @id={{theId}}\n @clear={{@clear}}\n @isPrependProvided={{has-block \"prepend\"}}\n @isAppendProvided={{has-block \"append\"}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n >\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiFieldNumber>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldNumber","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiFieldNumber","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA8Be,MAAMA,wBAAwB,SAASC,sBAAsB,CAAuB;AAC/F,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA+DH,2pDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,cAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -5,17 +5,17 @@ import didUpdate from '@ember/render-modifiers/modifiers/did-update';
5
5
  import { EuiFormRow, EuiFieldPassword } from '@ember-eui/core/components';
6
6
  import { argOrDefault } from '@ember-eui/core/helpers';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { precompileTemplate } from '@ember/template-compilation';
11
11
  import { setComponentTemplate } from '@ember/component';
12
12
 
13
13
  class ValidatedFormFieldPassword extends ValidatedFormFieldBase {
14
14
  static {
15
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldPassword class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @compressed={{@compressed}} @inputRef={{@inputRef}} @value={{@value}} @type={{@type}} @id={{theId}} @disabled={{@disabled}} @isFakePrependBlock={{not (has-block \"prepend\")}} @isFakeAppendBlock={{not (has-block \"append\")}} autofocus={{@autofocus}} placeholder={{@placeholder}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}}>\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldPassword>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
15
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldPassword class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @compressed={{@compressed}} @inputRef={{@inputRef}} @value={{@value}} @type={{@type}} @id={{theId}} @disabled={{@disabled}} @isFakePrependBlock={{not (has-block \"prepend\")}} @isFakeAppendBlock={{not (has-block \"append\")}} autofocus={{@autofocus}} placeholder={{@placeholder}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}}>\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldPassword>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
16
16
  scope: () => ({
17
17
  argOrDefault,
18
- uniqueId,
18
+ randomId,
19
19
  EuiFormRow,
20
20
  not,
21
21
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-password.js","sources":["../../../src/components/validated-form/field-password.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFieldPassword, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldPasswordSignature } from '@ember-eui/core/components/eui-field-password';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldPasswordSignature {\n Element: EuiFieldPasswordSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiFieldPasswordSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n prepend: [...EuiFieldPasswordSignature['Blocks']['prepend']];\n append: [...EuiFieldPasswordSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldPassword extends ValidatedFormFieldBase<FieldPasswordSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldPassword\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @compressed={{@compressed}}\n @inputRef={{@inputRef}}\n @value={{@value}}\n @type={{@type}}\n @id={{theId}}\n @disabled={{@disabled}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldPassword>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldPassword","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiFieldPassword","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA8Be,MAAMA,0BAA0B,SAASC,sBAAsB,CAAyB;AACnG,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAwDH,ulDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,gBAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-password.js","sources":["../../../src/components/validated-form/field-password.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFieldPassword, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldPasswordSignature } from '@ember-eui/core/components/eui-field-password';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldPasswordSignature {\n Element: EuiFieldPasswordSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiFieldPasswordSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n placeholder?: string;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n prepend: [...EuiFieldPasswordSignature['Blocks']['prepend']];\n append: [...EuiFieldPasswordSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldPassword extends ValidatedFormFieldBase<FieldPasswordSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldPassword\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @compressed={{@compressed}}\n @inputRef={{@inputRef}}\n @value={{@value}}\n @type={{@type}}\n @id={{theId}}\n @disabled={{@disabled}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldPassword>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldPassword","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiFieldPassword","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA8Be,MAAMA,0BAA0B,SAASC,sBAAsB,CAAyB;AACnG,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAwDH,ulDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,gBAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -5,7 +5,7 @@ import { EuiFormRow, EuiRadioGroup } from '@ember-eui/core/components';
5
5
  import { argOrDefault } from '@ember-eui/core/helpers';
6
6
  import { maybeUnwrapProxy } from '@ember-eui/core/utils/maybe-unwrap-proxy';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { n } from 'decorator-transforms/runtime';
11
11
  import { precompileTemplate } from '@ember/template-compilation';
@@ -44,10 +44,10 @@ class ValidatedFormFieldRadioGroup extends ValidatedFormFieldBase {
44
44
  n(this.prototype, "handleChange", [action]);
45
45
  }
46
46
  static {
47
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n <EuiRadioGroup class={{@fieldClasses}} @formId={{@formId}} aria-label={{@ariaLabel}} @disabled={{@disabled}} @valueKey={{@valueKey}} @labelKey={{@labelKey}} @compressed={{@compressed}} @name={{@name}} @options={{this.options}} @idSelected={{this.value}} @legend={{@legend}} @onChange={{this.handleChange}} autofocus={{@autofocus}} ...attributes />\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
47
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n <EuiRadioGroup class={{@fieldClasses}} @formId={{@formId}} aria-label={{@ariaLabel}} @disabled={{@disabled}} @valueKey={{@valueKey}} @labelKey={{@labelKey}} @compressed={{@compressed}} @name={{@name}} @options={{this.options}} @idSelected={{this.value}} @legend={{@legend}} @onChange={{this.handleChange}} autofocus={{@autofocus}} ...attributes />\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
48
48
  scope: () => ({
49
49
  argOrDefault,
50
- uniqueId,
50
+ randomId,
51
51
  EuiFormRow,
52
52
  not,
53
53
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-radio-group.js","sources":["../../../src/components/validated-form/field-radio-group.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiRadioGroup } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { maybeUnwrapProxy } from '@ember-eui/core/utils/maybe-unwrap-proxy';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiRadioGroupSignature } from '@ember-eui/core/components/eui-radio-group';\nexport interface FieldRadioGroupSignature {\n Element: EuiRadioGroupSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiRadioGroupSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n };\n}\nexport default class ValidatedFormFieldRadioGroup extends ValidatedFormFieldBase<FieldRadioGroupSignature> {\n get value() {\n let value1 = maybeUnwrapProxy(this.args.value);\n return value1?.toArray?.() || value1;\n }\n get arrayToMap() {\n const currArr1 = this.args.value || [];\n return this.transformToMap(currArr1);\n }\n transformToMap(value1 = []) {\n let valuesMap1 = value1.reduce((acc1, val1: string)=>{\n acc1[val1] = true;\n return acc1;\n }, {} as {\n [key: string]: boolean;\n });\n return valuesMap1;\n }\n @action\n //@ts-expect-error\n handleChange(optionId1: string) {\n let value1 = this.value || [];\n const found1 = value1.find((v1: string)=>v1 === optionId1);\n let newArr1 = [];\n if (found1) {\n newArr1 = value1.filter((v1: string)=>v1 !== optionId1);\n } else {\n newArr1 = [\n ...value1,\n optionId1\n ];\n }\n this.args.onChange?.(newArr1);\n this.isTouched = true;\n }\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n <EuiRadioGroup\n class={{@fieldClasses}}\n @formId={{@formId}}\n aria-label={{@ariaLabel}}\n @disabled={{@disabled}}\n @valueKey={{@valueKey}}\n @labelKey={{@labelKey}}\n @compressed={{@compressed}}\n @name={{@name}}\n @options={{this.options}}\n @idSelected={{this.value}}\n @legend={{@legend}}\n @onChange={{this.handleChange}}\n autofocus={{@autofocus}}\n ...attributes\n />\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldRadioGroup","ValidatedFormFieldBase","value","value1","maybeUnwrapProxy","args","toArray","arrayToMap","currArr1","transformToMap","valuesMap1","reduce","acc1","val1","handleChange","optionId1","found1","find","v1","newArr1","filter","onChange","isTouched","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiRadioGroup","strictMode"],"mappings":";;;;;;;;;;;;;AA2Be,MAAMA,4BAA4B,SAASC,sBAAsB,CAA2B;EACvG,IAAIC,KAAKA,GAAG;IACR,IAAIC,MAAM,GAAGC,gBAAgB,CAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAC,CAAA;AAC9C,IAAA,OAAOC,MAAM,EAAEG,OAAO,IAAI,IAAIH,MAAM,CAAA;AACxC,GAAA;EACA,IAAII,UAAUA,GAAG;IACb,MAAMC,QAAQ,GAAG,IAAI,CAACH,IAAI,CAACH,KAAK,IAAI,EAAE,CAAA;AACtC,IAAA,OAAO,IAAI,CAACO,cAAc,CAACD,QAAQ,CAAC,CAAA;AACxC,GAAA;AACAC,EAAAA,cAAcA,CAACN,MAAM,GAAG,EAAE,EAAE;IACxB,IAAIO,UAAU,GAAGP,MAAM,CAACQ,MAAM,CAAC,CAACC,IAAI,EAAEC,IAAY,KAAG;AACjDD,MAAAA,IAAI,CAACC,IAAI,CAAC,GAAG,IAAI,CAAA;AACjB,MAAA,OAAOD,IAAI,CAAA;KACd,EAAE,EAEF,CAAC,CAAA;AACF,IAAA,OAAOF,UAAU,CAAA;AACrB,GAAA;AAEA;EACAI,YAAYA,CAACC,SAAiB,EAAE;AAC5B,IAAA,IAAIZ,MAAM,GAAG,IAAI,CAACD,KAAK,IAAI,EAAE,CAAA;IAC7B,MAAMc,MAAM,GAAGb,MAAM,CAACc,IAAI,CAAEC,EAAU,IAAGA,EAAE,KAAKH,SAAS,CAAC,CAAA;IAC1D,IAAII,OAAO,GAAG,EAAE,CAAA;AAChB,IAAA,IAAIH,MAAM,EAAE;MACRG,OAAO,GAAGhB,MAAM,CAACiB,MAAM,CAAEF,EAAU,IAAGA,EAAE,KAAKH,SAAS,CAAC,CAAA;AAC3D,KAAC,MAAM;AACHI,MAAAA,OAAO,GAAG,CACN,GAAGhB,MAAM,EACTY,SAAS,CACZ,CAAA;AACL,KAAA;AACA,IAAA,IAAI,CAACV,IAAI,CAACgB,QAAQ,GAAGF,OAAO,CAAC,CAAA;IAC7B,IAAI,CAACG,SAAS,GAAG,IAAI,CAAA;AACzB,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBAhBAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAiBP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA4CH,qoCAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;AAAAC,QAAAA,aAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-radio-group.js","sources":["../../../src/components/validated-form/field-radio-group.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiRadioGroup } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { maybeUnwrapProxy } from '@ember-eui/core/utils/maybe-unwrap-proxy';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiRadioGroupSignature } from '@ember-eui/core/components/eui-radio-group';\nexport interface FieldRadioGroupSignature {\n Element: EuiRadioGroupSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiRadioGroupSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [...EuiFormRowSignature['Blocks']['label']];\n };\n}\nexport default class ValidatedFormFieldRadioGroup extends ValidatedFormFieldBase<FieldRadioGroupSignature> {\n get value() {\n let value1 = maybeUnwrapProxy(this.args.value);\n return value1?.toArray?.() || value1;\n }\n get arrayToMap() {\n const currArr1 = this.args.value || [];\n return this.transformToMap(currArr1);\n }\n transformToMap(value1 = []) {\n let valuesMap1 = value1.reduce((acc1, val1: string)=>{\n acc1[val1] = true;\n return acc1;\n }, {} as {\n [key: string]: boolean;\n });\n return valuesMap1;\n }\n @action\n //@ts-expect-error\n handleChange(optionId1: string) {\n let value1 = this.value || [];\n const found1 = value1.find((v1: string)=>v1 === optionId1);\n let newArr1 = [];\n if (found1) {\n newArr1 = value1.filter((v1: string)=>v1 !== optionId1);\n } else {\n newArr1 = [\n ...value1,\n optionId1\n ];\n }\n this.args.onChange?.(newArr1);\n this.isTouched = true;\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label as |label|>\n {{yield label to=\"label\"}}\n </:label>\n <:field>\n <EuiRadioGroup\n class={{@fieldClasses}}\n @formId={{@formId}}\n aria-label={{@ariaLabel}}\n @disabled={{@disabled}}\n @valueKey={{@valueKey}}\n @labelKey={{@labelKey}}\n @compressed={{@compressed}}\n @name={{@name}}\n @options={{this.options}}\n @idSelected={{this.value}}\n @legend={{@legend}}\n @onChange={{this.handleChange}}\n autofocus={{@autofocus}}\n ...attributes\n />\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldRadioGroup","ValidatedFormFieldBase","value","value1","maybeUnwrapProxy","args","toArray","arrayToMap","currArr1","transformToMap","valuesMap1","reduce","acc1","val1","handleChange","optionId1","found1","find","v1","newArr1","filter","onChange","isTouched","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiRadioGroup","strictMode"],"mappings":";;;;;;;;;;;;;AA2Be,MAAMA,4BAA4B,SAASC,sBAAsB,CAA2B;EACvG,IAAIC,KAAKA,GAAG;IACR,IAAIC,MAAM,GAAGC,gBAAgB,CAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAC,CAAA;AAC9C,IAAA,OAAOC,MAAM,EAAEG,OAAO,IAAI,IAAIH,MAAM,CAAA;AACxC,GAAA;EACA,IAAII,UAAUA,GAAG;IACb,MAAMC,QAAQ,GAAG,IAAI,CAACH,IAAI,CAACH,KAAK,IAAI,EAAE,CAAA;AACtC,IAAA,OAAO,IAAI,CAACO,cAAc,CAACD,QAAQ,CAAC,CAAA;AACxC,GAAA;AACAC,EAAAA,cAAcA,CAACN,MAAM,GAAG,EAAE,EAAE;IACxB,IAAIO,UAAU,GAAGP,MAAM,CAACQ,MAAM,CAAC,CAACC,IAAI,EAAEC,IAAY,KAAG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Range } from '@ember-eui/core/components';
6
6
  import { argOrDefault } from '@ember-eui/core/helpers';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { precompileTemplate } from '@ember/template-compilation';
11
11
  import { setComponentTemplate } from '@ember/component';
12
12
 
13
13
  class ValidatedFormFieldRangeSlider extends ValidatedFormFieldBase {
14
14
  static {
15
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiRange class={{@fieldClasses}} form={{@formId}} @compressed={{@compressed}} @readOnly={{@readOnly}} @fullWidth={{@fullWidth}} @id={{theId}} @levels={{@levels}} @step={{@step}} @showInput={{@showInput}} @showLabels={{@showLabels}} @showRange={{@showRange}} @showTicks={{@showTicks}} @showValue={{@showValue}} @disabled={{@disabled}} @ticks={{@ticks}} @tickInterval={{@tickInterval}} @valuePrepend={{@valuePrepend}} @valueAppend={{@valueAppend}} @onChange={{this.handleChange}} @value={{@value}} @max={{@max}} @isLoading={{@isLoading}} @min={{@min}} @isInvalid={{this.isInvalidAndTouched}} @isPrependProvided={{has-block \"prepend\"}} @isAppendProvided={{has-block \"append\"}} @isFakeMinBlock={{not (has-block \"min\")}} @isFakeMaxBlock={{not (has-block \"max\")}} @isFakeValueBlock={{not (has-block \"value\")}} @isFakeValuePrependBlock={{not (has-block \"valuePrepend\")}} @isFakeValueAppendBlock={{not (has-block \"valueAppend\")}} aria-label={{@ariaLabel}} autofocus={{@autofocus}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}}>\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min as |min|>\n {{yield min to=\"min\"}}\n </:min>\n <:valuePrepend>\n {{yield to=\"valuePrepend\"}}\n </:valuePrepend>\n <:value>\n {{yield to=\"value\"}}\n </:value>\n <:valueAppend>\n {{yield to=\"valueAppend\"}}\n </:valueAppend>\n <:max as |max|>\n {{yield max to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
15
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiRange class={{@fieldClasses}} form={{@formId}} @compressed={{@compressed}} @readOnly={{@readOnly}} @fullWidth={{@fullWidth}} @id={{theId}} @levels={{@levels}} @step={{@step}} @showInput={{@showInput}} @showLabels={{@showLabels}} @showRange={{@showRange}} @showTicks={{@showTicks}} @showValue={{@showValue}} @disabled={{@disabled}} @ticks={{@ticks}} @tickInterval={{@tickInterval}} @valuePrepend={{@valuePrepend}} @valueAppend={{@valueAppend}} @onChange={{this.handleChange}} @value={{@value}} @max={{@max}} @isLoading={{@isLoading}} @min={{@min}} @isInvalid={{this.isInvalidAndTouched}} @isPrependProvided={{has-block \"prepend\"}} @isAppendProvided={{has-block \"append\"}} @isFakeMinBlock={{not (has-block \"min\")}} @isFakeMaxBlock={{not (has-block \"max\")}} @isFakeValueBlock={{not (has-block \"value\")}} @isFakeValuePrependBlock={{not (has-block \"valuePrepend\")}} @isFakeValueAppendBlock={{not (has-block \"valueAppend\")}} aria-label={{@ariaLabel}} autofocus={{@autofocus}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}}>\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min as |min|>\n {{yield min to=\"min\"}}\n </:min>\n <:valuePrepend>\n {{yield to=\"valuePrepend\"}}\n </:valuePrepend>\n <:value>\n {{yield to=\"value\"}}\n </:value>\n <:valueAppend>\n {{yield to=\"valueAppend\"}}\n </:valueAppend>\n <:max as |max|>\n {{yield max to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
16
16
  scope: () => ({
17
17
  argOrDefault,
18
- uniqueId,
18
+ randomId,
19
19
  EuiFormRow,
20
20
  not,
21
21
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-range-slider.js","sources":["../../../src/components/validated-form/field-range-slider.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiRange } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiRangeSignature } from '@ember-eui/core/components/eui-range';\nexport interface FieldRangeSliderSignature {\n Element: EuiRangeSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiRangeSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n prepend: [...EuiRangeSignature['Blocks']['prepend']];\n min: [...EuiRangeSignature['Blocks']['min']];\n valuePrepend: [...EuiRangeSignature['Blocks']['valuePrepend']];\n value: [...EuiRangeSignature['Blocks']['value']];\n valueAppend: [...EuiRangeSignature['Blocks']['valueAppend']];\n append: [...EuiRangeSignature['Blocks']['append']];\n max: [...EuiRangeSignature['Blocks']['max']];\n };\n}\nexport default class ValidatedFormFieldRangeSlider extends ValidatedFormFieldBase<FieldRangeSliderSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiRange\n class={{@fieldClasses}}\n form={{@formId}}\n @compressed={{@compressed}}\n @readOnly={{@readOnly}}\n @fullWidth={{@fullWidth}}\n @id={{theId}}\n @levels={{@levels}}\n @step={{@step}}\n @showInput={{@showInput}}\n @showLabels={{@showLabels}}\n @showRange={{@showRange}}\n @showTicks={{@showTicks}}\n @showValue={{@showValue}}\n @disabled={{@disabled}}\n @ticks={{@ticks}}\n @tickInterval={{@tickInterval}}\n @valuePrepend={{@valuePrepend}}\n @valueAppend={{@valueAppend}}\n @onChange={{this.handleChange}}\n @value={{@value}}\n @max={{@max}}\n @isLoading={{@isLoading}}\n @min={{@min}}\n @isInvalid={{this.isInvalidAndTouched}}\n @isPrependProvided={{has-block \"prepend\"}}\n @isAppendProvided={{has-block \"append\"}}\n @isFakeMinBlock={{not (has-block \"min\")}}\n @isFakeMaxBlock={{not (has-block \"max\")}}\n @isFakeValueBlock={{not (has-block \"value\")}}\n @isFakeValuePrependBlock={{not (has-block \"valuePrepend\")}}\n @isFakeValueAppendBlock={{not (has-block \"valueAppend\")}}\n aria-label={{@ariaLabel}}\n autofocus={{@autofocus}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n >\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min as |min|>\n {{yield min to=\"min\"}}\n </:min>\n <:valuePrepend>\n {{yield to=\"valuePrepend\"}}\n </:valuePrepend>\n <:value>\n {{yield to=\"value\"}}\n </:value>\n <:valueAppend>\n {{yield to=\"valueAppend\"}}\n </:valueAppend>\n <:max as |max|>\n {{yield max to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldRangeSlider","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiRange","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AAkCe,MAAMA,6BAA6B,SAASC,sBAAsB,CAA4B;AACzG,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAwFH,q/EAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-range-slider.js","sources":["../../../src/components/validated-form/field-range-slider.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiRange } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiRangeSignature } from '@ember-eui/core/components/eui-range';\nexport interface FieldRangeSliderSignature {\n Element: EuiRangeSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiRangeSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n prepend: [...EuiRangeSignature['Blocks']['prepend']];\n min: [...EuiRangeSignature['Blocks']['min']];\n valuePrepend: [...EuiRangeSignature['Blocks']['valuePrepend']];\n value: [...EuiRangeSignature['Blocks']['value']];\n valueAppend: [...EuiRangeSignature['Blocks']['valueAppend']];\n append: [...EuiRangeSignature['Blocks']['append']];\n max: [...EuiRangeSignature['Blocks']['max']];\n };\n}\nexport default class ValidatedFormFieldRangeSlider extends ValidatedFormFieldBase<FieldRangeSliderSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiRange\n class={{@fieldClasses}}\n form={{@formId}}\n @compressed={{@compressed}}\n @readOnly={{@readOnly}}\n @fullWidth={{@fullWidth}}\n @id={{theId}}\n @levels={{@levels}}\n @step={{@step}}\n @showInput={{@showInput}}\n @showLabels={{@showLabels}}\n @showRange={{@showRange}}\n @showTicks={{@showTicks}}\n @showValue={{@showValue}}\n @disabled={{@disabled}}\n @ticks={{@ticks}}\n @tickInterval={{@tickInterval}}\n @valuePrepend={{@valuePrepend}}\n @valueAppend={{@valueAppend}}\n @onChange={{this.handleChange}}\n @value={{@value}}\n @max={{@max}}\n @isLoading={{@isLoading}}\n @min={{@min}}\n @isInvalid={{this.isInvalidAndTouched}}\n @isPrependProvided={{has-block \"prepend\"}}\n @isAppendProvided={{has-block \"append\"}}\n @isFakeMinBlock={{not (has-block \"min\")}}\n @isFakeMaxBlock={{not (has-block \"max\")}}\n @isFakeValueBlock={{not (has-block \"value\")}}\n @isFakeValuePrependBlock={{not (has-block \"valuePrepend\")}}\n @isFakeValueAppendBlock={{not (has-block \"valueAppend\")}}\n aria-label={{@ariaLabel}}\n autofocus={{@autofocus}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n >\n <:prepend as |classes|>\n {{yield classes to=\"prepend\"}}\n </:prepend>\n <:min as |min|>\n {{yield min to=\"min\"}}\n </:min>\n <:valuePrepend>\n {{yield to=\"valuePrepend\"}}\n </:valuePrepend>\n <:value>\n {{yield to=\"value\"}}\n </:value>\n <:valueAppend>\n {{yield to=\"valueAppend\"}}\n </:valueAppend>\n <:max as |max|>\n {{yield max to=\"max\"}}\n </:max>\n <:append as |classes|>\n {{yield classes to=\"append\"}}\n </:append>\n </EuiRange>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldRangeSlider","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiRange","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AAkCe,MAAMA,6BAA6B,SAASC,sBAAsB,CAA4B;AACzG,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAwFH,q/EAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -5,17 +5,17 @@ import didUpdate from '@ember/render-modifiers/modifiers/did-update';
5
5
  import { EuiFormRow, EuiSelect } from '@ember-eui/core/components';
6
6
  import { argOrDefault } from '@ember-eui/core/helpers';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { precompileTemplate } from '@ember/template-compilation';
11
11
  import { setComponentTemplate } from '@ember/component';
12
12
 
13
13
  class ValidatedFormFieldSelect extends ValidatedFormFieldBase {
14
14
  static {
15
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiSelect aria-label={{@ariaLabel}} class={{@fieldClasses}} form={{@formId}} @options={{this.options}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @hasNoInitialSelection={{@hasNoInitialSelection}} @inputRef={{@inputRef}} @disabled={{@disabled}} @value={{@value}} @compressed={{@compressed}} @isFakePrependBlock={{not (has-block \"prepend\")}} @isFakeAppendBlock={{not (has-block \"append\")}} @id={{theId}} autofocus={{@autofocus}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"change\" this.handleChange}}>\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiSelect>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
15
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiSelect aria-label={{@ariaLabel}} class={{@fieldClasses}} form={{@formId}} @options={{this.options}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @hasNoInitialSelection={{@hasNoInitialSelection}} @inputRef={{@inputRef}} @disabled={{@disabled}} @value={{@value}} @compressed={{@compressed}} @isFakePrependBlock={{not (has-block \"prepend\")}} @isFakeAppendBlock={{not (has-block \"append\")}} @id={{theId}} autofocus={{@autofocus}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"change\" this.handleChange}}>\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiSelect>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
16
16
  scope: () => ({
17
17
  argOrDefault,
18
- uniqueId,
18
+ randomId,
19
19
  EuiFormRow,
20
20
  not,
21
21
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-select.js","sources":["../../../src/components/validated-form/field-select.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiSelect } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiSelectSignature } from '@ember-eui/core/components/eui-select';\nexport interface FieldSelectSignature {\n Element: EuiSelectSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiSelectSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n prepend: [...EuiSelectSignature['Blocks']['prepend']];\n append: [...EuiSelectSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldSelect extends ValidatedFormFieldBase<FieldSelectSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiSelect\n aria-label={{@ariaLabel}}\n class={{@fieldClasses}}\n form={{@formId}}\n @options={{this.options}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @hasNoInitialSelection={{@hasNoInitialSelection}}\n @inputRef={{@inputRef}}\n @disabled={{@disabled}}\n @value={{@value}}\n @compressed={{@compressed}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n @id={{theId}}\n autofocus={{@autofocus}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"change\" this.handleChange}}\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiSelect>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldSelect","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiSelect","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA6Be,MAAMA,wBAAwB,SAASC,sBAAsB,CAAuB;AAC/F,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAyDH,2mDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-select.js","sources":["../../../src/components/validated-form/field-select.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiSelect } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiSelectSignature } from '@ember-eui/core/components/eui-select';\nexport interface FieldSelectSignature {\n Element: EuiSelectSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiSelectSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n prepend: [...EuiSelectSignature['Blocks']['prepend']];\n append: [...EuiSelectSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldSelect extends ValidatedFormFieldBase<FieldSelectSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n\n <:field>\n <EuiSelect\n aria-label={{@ariaLabel}}\n class={{@fieldClasses}}\n form={{@formId}}\n @options={{this.options}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @hasNoInitialSelection={{@hasNoInitialSelection}}\n @inputRef={{@inputRef}}\n @disabled={{@disabled}}\n @value={{@value}}\n @compressed={{@compressed}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n @id={{theId}}\n autofocus={{@autofocus}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"change\" this.handleChange}}\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiSelect>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldSelect","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiSelect","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA6Be,MAAMA,wBAAwB,SAASC,sBAAsB,CAAuB;AAC/F,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAyDH,2mDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -6,7 +6,7 @@ import didUpdate from '@ember/render-modifiers/modifiers/did-update';
6
6
  import { EuiFormRow, EuiSwitch } from '@ember-eui/core/components';
7
7
  import { argOrDefault } from '@ember-eui/core/helpers';
8
8
  import { not } from 'ember-truth-helpers';
9
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
9
+ import randomId from '../../-private/random-id.js';
10
10
  import ValidatedFormFieldBase from './field-base.js';
11
11
  import { n } from 'decorator-transforms/runtime';
12
12
  import { precompileTemplate } from '@ember/template-compilation';
@@ -23,10 +23,10 @@ class ValidatedFormFieldSwitch extends ValidatedFormFieldBase {
23
23
  n(this.prototype, "handleChange", [action]);
24
24
  }
25
25
  static {
26
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiSwitch class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @id={{theId}} @showLabel={{@showLabel}} @label={{@switchLabel}} @checked={{@value}} @onChange={{this.handleChange}} @isFakeLabelBlock={{not (has-block \"switch-label\")}} @disabled={{@disabled}} @compressed={{@compressed}} @type={{@type}} {{on \"blur\" (fn this.setIsTouched true)}} ...attributes>\n <:label>\n {{yield to=\"switch-label\"}}\n </:label>\n </EuiSwitch>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
26
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiSwitch class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @id={{theId}} @showLabel={{@showLabel}} @label={{@switchLabel}} @checked={{@value}} @onChange={{this.handleChange}} @isFakeLabelBlock={{not (has-block \"switch-label\")}} @disabled={{@disabled}} @compressed={{@compressed}} @type={{@type}} {{on \"blur\" (fn this.setIsTouched true)}} ...attributes>\n <:label>\n {{yield to=\"switch-label\"}}\n </:label>\n </EuiSwitch>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
27
27
  scope: () => ({
28
28
  argOrDefault,
29
- uniqueId,
29
+ randomId,
30
30
  EuiFormRow,
31
31
  not,
32
32
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-switch.js","sources":["../../../src/components/validated-form/field-switch.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiSwitch } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiSwitchSignature } from '@ember-eui/core/components/eui-switch';\nexport interface FieldSwitchSignature {\n Element: EuiSwitchSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiSwitchSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n switchLabel?: EuiSwitchSignature['Args']['label'];\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n 'switch-label': [];\n };\n}\nexport default class ValidatedFormFieldSwitch extends ValidatedFormFieldBase<FieldSwitchSignature> {\n @action\n handleChange(e1: MouseEvent) {\n e1.preventDefault();\n const checked1 = (e1.target as HTMLInputElement).checked;\n this.args.onChange?.(checked1, e1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiSwitch\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @id={{theId}}\n @showLabel={{@showLabel}}\n @label={{@switchLabel}}\n @checked={{@value}}\n @onChange={{this.handleChange}}\n @isFakeLabelBlock={{not (has-block \"switch-label\")}}\n @disabled={{@disabled}}\n @compressed={{@compressed}}\n @type={{@type}}\n {{on \"blur\" (fn this.setIsTouched true)}}\n ...attributes\n >\n <:label>\n {{yield to=\"switch-label\"}}\n </:label>\n </EuiSwitch>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldSwitch","ValidatedFormFieldBase","handleChange","e1","preventDefault","checked1","target","checked","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiSwitch","on","fn","strictMode"],"mappings":";;;;;;;;;;;;;;AA8Be,MAAMA,wBAAwB,SAASC,sBAAsB,CAAuB;EAE/FC,YAAYA,CAACC,EAAc,EAAE;IACzBA,EAAE,CAACC,cAAc,EAAE,CAAA;AACnB,IAAA,MAAMC,QAAQ,GAAIF,EAAE,CAACG,MAAM,CAAsBC,OAAO,CAAA;IACxD,IAAI,CAACC,IAAI,CAACC,QAAQ,GAAGJ,QAAQ,EAAEF,EAAE,CAAC,CAAA;IAClC,IAAI,CAACO,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBANAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAOP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAgDH,kwCAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-switch.js","sources":["../../../src/components/validated-form/field-switch.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiSwitch } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiSwitchSignature } from '@ember-eui/core/components/eui-switch';\nexport interface FieldSwitchSignature {\n Element: EuiSwitchSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiSwitchSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n switchLabel?: EuiSwitchSignature['Args']['label'];\n onChange?: (state: boolean, e: MouseEvent) => void;\n };\n Blocks: {\n label: [];\n 'switch-label': [];\n };\n}\nexport default class ValidatedFormFieldSwitch extends ValidatedFormFieldBase<FieldSwitchSignature> {\n @action\n handleChange(e1: MouseEvent) {\n e1.preventDefault();\n const checked1 = (e1.target as HTMLInputElement).checked;\n this.args.onChange?.(checked1, e1);\n this.notifyValidityChange();\n }\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiSwitch\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @id={{theId}}\n @showLabel={{@showLabel}}\n @label={{@switchLabel}}\n @checked={{@value}}\n @onChange={{this.handleChange}}\n @isFakeLabelBlock={{not (has-block \"switch-label\")}}\n @disabled={{@disabled}}\n @compressed={{@compressed}}\n @type={{@type}}\n {{on \"blur\" (fn this.setIsTouched true)}}\n ...attributes\n >\n <:label>\n {{yield to=\"switch-label\"}}\n </:label>\n </EuiSwitch>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldSwitch","ValidatedFormFieldBase","handleChange","e1","preventDefault","checked1","target","checked","args","onChange","notifyValidityChange","n","this","prototype","action","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiSwitch","on","fn","strictMode"],"mappings":";;;;;;;;;;;;;;AA8Be,MAAMA,wBAAwB,SAASC,sBAAsB,CAAuB;EAE/FC,YAAYA,CAACC,EAAc,EAAE;IACzBA,EAAE,CAACC,cAAc,EAAE,CAAA;AACnB,IAAA,MAAMC,QAAQ,GAAIF,EAAE,CAACG,MAAM,CAAsBC,OAAO,CAAA;IACxD,IAAI,CAACC,IAAI,CAACC,QAAQ,GAAGJ,QAAQ,EAAEF,EAAE,CAAC,CAAA;IAClC,IAAI,CAACO,oBAAoB,EAAE,CAAA;AAC/B,GAAA;AAAC,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,mBANAC,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAOP,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAgDH,kwCAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -5,17 +5,17 @@ import didUpdate from '@ember/render-modifiers/modifiers/did-update';
5
5
  import { EuiFormRow, EuiTextArea } from '@ember-eui/core/components';
6
6
  import { argOrDefault } from '@ember-eui/core/helpers';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { precompileTemplate } from '@ember/template-compilation';
11
11
  import { setComponentTemplate } from '@ember/component';
12
12
 
13
13
  class ValidatedFormFieldTextArea extends ValidatedFormFieldBase {
14
14
  static {
15
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiTextArea class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @value={{@value}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @compressed={{@compressed}} @resize={{@resize}} @disabled={{@disabled}} @inputRef={{@inputRef}} @id={{theId}} @rows={{@rows}} autofocus={{@autofocus}} placeholder={{@placeholder}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}}>\n {{yield}}\n </EuiTextArea>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
15
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiTextArea class={{@fieldClasses}} form={{@formId}} aria-label={{@ariaLabel}} @value={{@value}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @compressed={{@compressed}} @resize={{@resize}} @disabled={{@disabled}} @inputRef={{@inputRef}} @id={{theId}} @rows={{@rows}} autofocus={{@autofocus}} placeholder={{@placeholder}} ...attributes {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}}>\n {{yield}}\n </EuiTextArea>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
16
16
  scope: () => ({
17
17
  argOrDefault,
18
- uniqueId,
18
+ randomId,
19
19
  EuiFormRow,
20
20
  not,
21
21
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-text-area.js","sources":["../../../src/components/validated-form/field-text-area.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiTextArea } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiTextAreaSignature } from '@ember-eui/core/components/eui-text-area';\nimport type { ComponentLike } from '@glint/template';\nexport interface FieldTextAreaSignature extends FieldBaseSignature {\n Element: EuiTextAreaSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiTextAreaSignature['Args'] & {\n formId?: string;\n ariaLabel?: string;\n rows?: number;\n resize?: 'vertical' | 'horizontal' | 'both' | 'none';\n rowClasses?: string;\n fieldClasses?: string;\n labelAppend?: ComponentLike;\n prepend?: ComponentLike;\n append?: ComponentLike;\n placeholder?: string;\n autofocus?: boolean;\n inputRef?: (element: HTMLTextAreaElement) => void;\n };\n Blocks: {\n label: [];\n default: [...EuiTextAreaSignature['Blocks']['default']];\n };\n}\nexport default class ValidatedFormFieldTextArea extends ValidatedFormFieldBase<FieldTextAreaSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiTextArea\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @value={{@value}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @compressed={{@compressed}}\n @resize={{@resize}}\n @disabled={{@disabled}}\n @inputRef={{@inputRef}}\n @id={{theId}}\n @rows={{@rows}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n >\n {{yield}}\n </EuiTextArea>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldTextArea","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiTextArea","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AAmCe,MAAMA,0BAA0B,SAASC,sBAAsB,CAAyB;AACnG,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAiDH,+vCAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,WAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-text-area.js","sources":["../../../src/components/validated-form/field-text-area.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFormRow, EuiTextArea } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nimport type { EuiTextAreaSignature } from '@ember-eui/core/components/eui-text-area';\nimport type { ComponentLike } from '@glint/template';\nexport interface FieldTextAreaSignature extends FieldBaseSignature {\n Element: EuiTextAreaSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiTextAreaSignature['Args'] & {\n formId?: string;\n ariaLabel?: string;\n rows?: number;\n resize?: 'vertical' | 'horizontal' | 'both' | 'none';\n rowClasses?: string;\n fieldClasses?: string;\n labelAppend?: ComponentLike;\n prepend?: ComponentLike;\n append?: ComponentLike;\n placeholder?: string;\n autofocus?: boolean;\n inputRef?: (element: HTMLTextAreaElement) => void;\n };\n Blocks: {\n label: [];\n default: [...EuiTextAreaSignature['Blocks']['default']];\n };\n}\nexport default class ValidatedFormFieldTextArea extends ValidatedFormFieldBase<FieldTextAreaSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiTextArea\n class={{@fieldClasses}}\n form={{@formId}}\n aria-label={{@ariaLabel}}\n @value={{@value}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @compressed={{@compressed}}\n @resize={{@resize}}\n @disabled={{@disabled}}\n @inputRef={{@inputRef}}\n @id={{theId}}\n @rows={{@rows}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n ...attributes\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n >\n {{yield}}\n </EuiTextArea>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldTextArea","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiTextArea","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AAmCe,MAAMA,0BAA0B,SAASC,sBAAsB,CAAyB;AACnG,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAiDH,+vCAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,WAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -5,17 +5,17 @@ import didUpdate from '@ember/render-modifiers/modifiers/did-update';
5
5
  import { EuiFormRow, EuiFieldText } from '@ember-eui/core/components';
6
6
  import { argOrDefault } from '@ember-eui/core/helpers';
7
7
  import { not } from 'ember-truth-helpers';
8
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
8
+ import randomId from '../../-private/random-id.js';
9
9
  import ValidatedFormFieldBase from './field-base.js';
10
10
  import { precompileTemplate } from '@ember/template-compilation';
11
11
  import { setComponentTemplate } from '@ember/component';
12
12
 
13
13
  class ValidatedFormFieldText extends ValidatedFormFieldBase {
14
14
  static {
15
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldText class={{@fieldClasses}} aria-label={{@ariaLabel}} form={{@formId}} @value={{@value}} @icon={{@icon}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @disabled={{@disabled}} @readOnly={{@readOnly}} @inputRef={{@inputRef}} @controlOnly={{@controlOnly}} @compressed={{@compressed}} @clear={{@clear}} @id={{theId}} @isFakePrependBlock={{not (has-block \"prepend\")}} @isFakeAppendBlock={{not (has-block \"append\")}} autofocus={{@autofocus}} placeholder={{@placeholder}} {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}} ...attributes>\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldText>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
15
+ setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow class={{this.rowClasses}} @labelType={{@labelType}} @display={{@display}} @hasEmptyLabelSpace={{@hasEmptyLabelSpace}} @fullWidth={{@fullWidth}} @hasChildLabel={{@hasChildLabel}} @label={{this.label}} @labelAppend={{@labelAppend}} @id={{theId}} @isInvalid={{this.isInvalidAndTouched}} @error={{this.validationErrorMessages}} @helpText={{@helpText}} @errorClasses={{@errorClasses}} @isFakeLabelBlock={{not (has-block \"label\")}} {{didInsert this.setValidationMessages}} {{didUpdate this.didUpdateValue @validations}} {{didUpdate this.didUpdateValue @value}}>\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldText class={{@fieldClasses}} aria-label={{@ariaLabel}} form={{@formId}} @value={{@value}} @icon={{@icon}} @isInvalid={{this.isInvalidAndTouched}} @fullWidth={{@fullWidth}} @isLoading={{@isLoading}} @disabled={{@disabled}} @readOnly={{@readOnly}} @inputRef={{@inputRef}} @controlOnly={{@controlOnly}} @compressed={{@compressed}} @clear={{@clear}} @id={{theId}} @isFakePrependBlock={{not (has-block \"prepend\")}} @isFakeAppendBlock={{not (has-block \"append\")}} autofocus={{@autofocus}} placeholder={{@placeholder}} {{on \"blur\" (fn this.setIsTouched true)}} {{on \"input\" this.handleChange}} ...attributes>\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldText>\n </:field>\n </EuiFormRow>\n {{/let}}\n ", {
16
16
  scope: () => ({
17
17
  argOrDefault,
18
- uniqueId,
18
+ randomId,
19
19
  EuiFormRow,
20
20
  not,
21
21
  didInsert,
@@ -1 +1 @@
1
- {"version":3,"file":"field-text.js","sources":["../../../src/components/validated-form/field-text.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFieldText, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldTextSignature } from '@ember-eui/core/components/eui-field-text';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldTextSignature {\n Element: EuiFieldTextSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiFieldTextSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n };\n Blocks: {\n label: [];\n prepend: [...EuiFieldTextSignature['Blocks']['prepend']];\n append: [...EuiFieldTextSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldText extends ValidatedFormFieldBase<FieldTextSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (uniqueId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldText\n class={{@fieldClasses}}\n aria-label={{@ariaLabel}}\n form={{@formId}}\n @value={{@value}}\n @icon={{@icon}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @disabled={{@disabled}}\n @readOnly={{@readOnly}}\n @inputRef={{@inputRef}}\n @controlOnly={{@controlOnly}}\n @compressed={{@compressed}}\n @clear={{@clear}}\n @id={{theId}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n ...attributes\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldText>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldText","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiFormRow","not","didInsert","didUpdate","EuiFieldText","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA4Be,MAAMA,sBAAsB,SAASC,sBAAsB,CAAqB;AAC3F,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA2DH,upDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,YAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"field-text.js","sources":["../../../src/components/validated-form/field-text.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { fn } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { EuiFieldText, EuiFormRow } from '@ember-eui/core/components';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport { not } from 'ember-truth-helpers';\nimport randomId from '../../-private/random-id';\nimport ValidatedFormFieldBase from './field-base.gts';\nimport type { FieldBaseSignature } from './field-base.gts';\nimport type { EuiFieldTextSignature } from '@ember-eui/core/components/eui-field-text';\nimport type { EuiFormRowSignature } from '@ember-eui/core/components/eui-form-row';\nexport interface FieldTextSignature {\n Element: EuiFieldTextSignature['Element'];\n Args: FieldBaseSignature['Args'] & EuiFormRowSignature['Args'] & EuiFieldTextSignature['Args'] & {\n rowClasses?: string;\n fieldClasses?: string;\n formId?: string;\n ariaLabel?: string;\n autofocus?: boolean;\n };\n Blocks: {\n label: [];\n prepend: [...EuiFieldTextSignature['Blocks']['prepend']];\n append: [...EuiFieldTextSignature['Blocks']['append']];\n };\n}\nexport default class ValidatedFormFieldText extends ValidatedFormFieldBase<FieldTextSignature> {\n static{\n template(`\n {{#let (argOrDefault @id (randomId)) as |theId|}}\n <EuiFormRow\n class={{this.rowClasses}}\n @labelType={{@labelType}}\n @display={{@display}}\n @hasEmptyLabelSpace={{@hasEmptyLabelSpace}}\n @fullWidth={{@fullWidth}}\n @hasChildLabel={{@hasChildLabel}}\n @label={{this.label}}\n @labelAppend={{@labelAppend}}\n @id={{theId}}\n @isInvalid={{this.isInvalidAndTouched}}\n @error={{this.validationErrorMessages}}\n @helpText={{@helpText}}\n @errorClasses={{@errorClasses}}\n @isFakeLabelBlock={{not (has-block \"label\")}}\n {{didInsert this.setValidationMessages}}\n {{didUpdate this.didUpdateValue @validations}}\n {{didUpdate this.didUpdateValue @value}}\n >\n <:label>\n {{yield to=\"label\"}}\n </:label>\n <:field>\n <EuiFieldText\n class={{@fieldClasses}}\n aria-label={{@ariaLabel}}\n form={{@formId}}\n @value={{@value}}\n @icon={{@icon}}\n @isInvalid={{this.isInvalidAndTouched}}\n @fullWidth={{@fullWidth}}\n @isLoading={{@isLoading}}\n @disabled={{@disabled}}\n @readOnly={{@readOnly}}\n @inputRef={{@inputRef}}\n @controlOnly={{@controlOnly}}\n @compressed={{@compressed}}\n @clear={{@clear}}\n @id={{theId}}\n @isFakePrependBlock={{not (has-block \"prepend\")}}\n @isFakeAppendBlock={{not (has-block \"append\")}}\n autofocus={{@autofocus}}\n placeholder={{@placeholder}}\n {{on \"blur\" (fn this.setIsTouched true)}}\n {{on \"input\" this.handleChange}}\n ...attributes\n >\n <:prepend as |classes inputId|>\n {{yield classes inputId to=\"prepend\"}}\n </:prepend>\n <:append as |classes inputId|>\n {{yield classes inputId to=\"append\"}}\n </:append>\n </EuiFieldText>\n </:field>\n </EuiFormRow>\n {{/let}}\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ValidatedFormFieldText","ValidatedFormFieldBase","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiFormRow","not","didInsert","didUpdate","EuiFieldText","on","fn","strictMode"],"mappings":";;;;;;;;;;;;AA4Be,MAAMA,sBAAsB,SAASC,sBAAsB,CAAqB;AAC3F,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CA2DH,upDAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,YAAA;QAAAC,EAAA;AAAAC,QAAAA,EAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
@@ -8,7 +8,7 @@ import didInsert from '@ember/render-modifiers/modifiers/did-insert';
8
8
  import { schedule, next } from '@ember/runloop';
9
9
  import { EuiForm } from '@ember-eui/core/components';
10
10
  import { argOrDefault } from '@ember-eui/core/helpers';
11
- import uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';
11
+ import randomId from '../-private/random-id.js';
12
12
  import ValidatedFormFieldBase from './validated-form/field-base.js';
13
13
  import ValidatedFormFieldCheckboxGroup from './validated-form/field-checkbox-group.js';
14
14
  import ValidatedFormFieldComboBox from './validated-form/field-combo-box.js';
@@ -173,10 +173,10 @@ class ValidatedFormComponent extends Component {
173
173
  };
174
174
  }
175
175
  static {
176
- setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @id (uniqueId)) 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}} ...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 ", {
176
+ 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}} ...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 ", {
177
177
  scope: () => ({
178
178
  argOrDefault,
179
- uniqueId,
179
+ randomId,
180
180
  EuiForm,
181
181
  on,
182
182
  didInsert,
@@ -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';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport uniqueId from 'ember-unique-id-helper-polyfill/helpers/unique-id';\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';\nimport type { EuiFormSignature } from '@ember-eui/core/components/eui-form';\nimport type { ComponentLike } from '@glint/template';\nexport interface IValidatedFormTheme {\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}\nexport const ValidatedFormDefaultTheme: IValidatedFormTheme = {\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};\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 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 (uniqueId)) 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 ...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":["ValidatedFormDefaultTheme","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","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","theme","theme1","setComponentTemplate","precompileTemplate","scope","argOrDefault","uniqueId","EuiForm","on","didInsert","hash","strictMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,MAAMA,yBAA8C,GAAG;AAC1DC,EAAAA,SAAS,EAAEA,sBAAS;AACpBC,EAAAA,WAAW,EAAEC,wBAAoB;AACjCC,EAAAA,SAAS,EAAEC,sBAAkB;AAC7BC,EAAAA,aAAa,EAAEC,0BAAsB;AACrCC,EAAAA,aAAa,EAAEC,0BAAsB;AACrCC,EAAAA,WAAW,EAAEC,wBAAoB;AACjCC,EAAAA,aAAa,EAAEC,0BAAsB;AACrCC,EAAAA,kBAAkB,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;AACzB,EAAC;AAgDc,MAAMC,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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,IAAI,CAACrB,SAAS,GAAG,IAAI,CAACuB,YAAY,EAAE,CAAA;AACpC,MAAA,IAAI,CAAC,IAAI,CAACM,YAAY,EAAE;AACpB,QAAA,IAAI,CAACpC,IAAI,CAACqC,gBAAgB,GAAG,IAAI,CAACjC,OAAO,EAAE,IAAI,CAACG,SAAS,EAAE,IAAI,CAACD,mBAAmB,CAAC,CAAA;AACxF,OAAA;AACJ,KAAC,CAAC,CAAA;AACN,GAAA;AAAC,EAAA;AAAAc,IAAAA,CAAA,CAAA/B,IAAA,CAAAC,SAAA,qBATA+B,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;AAWPiB,EAAAA,qBAAqBA,GAAG;AACpB,IAAA,IAAI,CAAC,IAAI,CAACF,YAAY,EAAE;MACpB,IAAI,CAACT,cAAc,EAAE,CAAA;AACzB,KAAA;AACJ,GAAA;AAAC,EAAA;AAAAP,IAAAA,CAAA,CAAA/B,IAAA,CAAAC,SAAA,4BALA+B,MAAM,CAAA,CAAA,CAAA;AAAA,GAAA;EAMP,IAAIkB,KAAKA,GAAG;IACR,MAAMC,MAAoC,GAAG,IAAI,CAACxC,IAAI,CAACuC,KAAK,IAAI,EAAE,CAAA;IAClE,OAAO;AACH,MAAA,GAAG/E,yBAAyB;MAC5B,GAAGgF,MAAAA;KACN,CAAA;AACL,GAAA;AACA,EAAA;IACIC,oBAAA,CAAAC,kBAAA,CAgJH,yrGAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,OAAA;QAAAC,EAAA;QAAAC,SAAA;AAAAC,QAAAA,IAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
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';\nimport { argOrDefault } from '@ember-eui/core/helpers';\nimport randomId from '../-private/random-id';\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';\nimport type { EuiFormSignature } from '@ember-eui/core/components/eui-form';\nimport type { ComponentLike } from '@glint/template';\nexport interface IValidatedFormTheme {\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}\nexport const ValidatedFormDefaultTheme: IValidatedFormTheme = {\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};\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 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 ...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":["ValidatedFormDefaultTheme","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","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","theme","theme1","setComponentTemplate","precompileTemplate","scope","argOrDefault","randomId","EuiForm","on","didInsert","hash","strictMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,MAAMA,yBAA8C,GAAG;AAC1DC,EAAAA,SAAS,EAAEA,sBAAS;AACpBC,EAAAA,WAAW,EAAEC,wBAAoB;AACjCC,EAAAA,SAAS,EAAEC,sBAAkB;AAC7BC,EAAAA,aAAa,EAAEC,0BAAsB;AACrCC,EAAAA,aAAa,EAAEC,0BAAsB;AACrCC,EAAAA,WAAW,EAAEC,wBAAoB;AACjCC,EAAAA,aAAa,EAAEC,0BAAsB;AACrCC,EAAAA,kBAAkB,EAAEC,+BAA2B;AAC/CC,EAAAA,eAAe,EAAEC,4BAAwB;AACzCC,EAAAA,gBAAgB,EAAEC,6BAAyB;AAC3CC,EAAAA,oBAAoB,EAAEC,+BAA6B;AACnDC,EAAAA,WAAW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,yrGAAA,EAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,OAAA;QAAAC,EAAA;QAAAC,SAAA;AAAAC,QAAAA,IAAAA;AAAA,OAAA,CAAA;MAAAC,UAAA,EAAA,IAAA;KAKI,CAAC,EAJa,IAAI,CAAA,CAAA;AAKvB,GAAA;AACJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/validated-form",
3
- "version": "8.0.3",
3
+ "version": "8.0.5",
4
4
  "description": "The default blueprint for ember-cli addons.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -31,17 +31,16 @@
31
31
  "dependencies": {
32
32
  "@ember/render-modifiers": "^2.1.0",
33
33
  "@embroider/util": "^1.12.0",
34
- "ember-auto-import": "^2.6.3",
34
+ "ember-auto-import": "^2.7.2",
35
35
  "ember-composable-helpers": "^5.0.0",
36
36
  "ember-modifier": "^4.1.0",
37
37
  "ember-svg-jar": "^2.3.4",
38
38
  "ember-truth-helpers": "^4.0.3",
39
- "ember-unique-id-helper-polyfill": "^1.2.2",
40
39
  "ember-validators": "^4.1.2",
41
40
  "decorator-transforms": "^1.0.3"
42
41
  },
43
42
  "peerDependencies": {
44
- "@ember-eui/core": "^8.0.3",
43
+ "@ember-eui/core": "^8.0.5",
45
44
  "@glimmer/component": "^1.1.2",
46
45
  "@glimmer/tracking": "^1.1.2",
47
46
  "ember-source": "^3.28.0 || >=4.0.0"
@@ -107,7 +106,7 @@
107
106
  "rollup-plugin-ts": "^3.0.2",
108
107
  "typescript": "~5.0.3",
109
108
  "webpack": "^5.89.0",
110
- "@ember-eui/core": "8.0.3"
109
+ "@ember-eui/core": "8.0.5"
111
110
  },
112
111
  "engines": {
113
112
  "node": "12.* || 14.* || >= 16"