@ember-eui/validated-form 13.0.5 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declarations/-private/random-id.d.ts.map +1 -1
- package/declarations/components/validated-form/field-base.d.ts +33 -4
- package/declarations/components/validated-form/field-base.d.ts.map +1 -1
- package/declarations/components/validated-form/field-checkbox-group.d.ts +12 -1
- package/declarations/components/validated-form/field-checkbox-group.d.ts.map +1 -1
- package/declarations/components/validated-form/field-combo-box.d.ts +14 -1
- package/declarations/components/validated-form/field-combo-box.d.ts.map +1 -1
- package/declarations/components/validated-form/field-dual-range-slider.d.ts +17 -1
- package/declarations/components/validated-form/field-dual-range-slider.d.ts.map +1 -1
- package/declarations/components/validated-form/field-markdown-editor.d.ts +13 -1
- package/declarations/components/validated-form/field-markdown-editor.d.ts.map +1 -1
- package/declarations/components/validated-form/field-number.d.ts +12 -1
- package/declarations/components/validated-form/field-number.d.ts.map +1 -1
- package/declarations/components/validated-form/field-password.d.ts +12 -1
- package/declarations/components/validated-form/field-password.d.ts.map +1 -1
- package/declarations/components/validated-form/field-radio-group.d.ts +11 -7
- package/declarations/components/validated-form/field-radio-group.d.ts.map +1 -1
- package/declarations/components/validated-form/field-range-slider.d.ts +11 -1
- package/declarations/components/validated-form/field-range-slider.d.ts.map +1 -1
- package/declarations/components/validated-form/field-select.d.ts +11 -1
- package/declarations/components/validated-form/field-select.d.ts.map +1 -1
- package/declarations/components/validated-form/field-switch.d.ts +12 -1
- package/declarations/components/validated-form/field-switch.d.ts.map +1 -1
- package/declarations/components/validated-form/field-text-area.d.ts +17 -0
- package/declarations/components/validated-form/field-text-area.d.ts.map +1 -1
- package/declarations/components/validated-form/field-text.d.ts +9 -0
- package/declarations/components/validated-form/field-text.d.ts.map +1 -1
- package/declarations/components/validated-form.d.ts +37 -1
- package/declarations/components/validated-form.d.ts.map +1 -1
- package/declarations/utils/build-validation-messages.d.ts.map +1 -1
- package/declarations/validators/messages.d.ts +44 -1
- package/declarations/validators/messages.d.ts.map +1 -1
- package/dist/-private/random-id.js +1 -0
- package/dist/-private/random-id.js.map +1 -1
- package/dist/components/default-theme.js.map +1 -1
- package/dist/components/validated-form/field-base.js +3 -3
- package/dist/components/validated-form/field-base.js.map +1 -1
- package/dist/components/validated-form/field-checkbox-group.js +4 -4
- package/dist/components/validated-form/field-checkbox-group.js.map +1 -1
- package/dist/components/validated-form/field-combo-box.js +2 -2
- package/dist/components/validated-form/field-combo-box.js.map +1 -1
- package/dist/components/validated-form/field-dual-range-slider.js +2 -4
- package/dist/components/validated-form/field-dual-range-slider.js.map +1 -1
- package/dist/components/validated-form/field-markdown-editor.js +2 -6
- package/dist/components/validated-form/field-markdown-editor.js.map +1 -1
- package/dist/components/validated-form/field-number.js +1 -2
- package/dist/components/validated-form/field-number.js.map +1 -1
- package/dist/components/validated-form/field-password.js +1 -2
- package/dist/components/validated-form/field-password.js.map +1 -1
- package/dist/components/validated-form/field-radio-group.js +4 -24
- package/dist/components/validated-form/field-radio-group.js.map +1 -1
- package/dist/components/validated-form/field-range-slider.js +1 -3
- package/dist/components/validated-form/field-range-slider.js.map +1 -1
- package/dist/components/validated-form/field-select.js +1 -2
- package/dist/components/validated-form/field-select.js.map +1 -1
- package/dist/components/validated-form/field-switch.js +2 -4
- package/dist/components/validated-form/field-switch.js.map +1 -1
- package/dist/components/validated-form/field-text-area.js +1 -1
- package/dist/components/validated-form/field-text-area.js.map +1 -1
- package/dist/components/validated-form/field-text.js +1 -2
- package/dist/components/validated-form/field-text.js.map +1 -1
- package/dist/components/validated-form.js +3 -3
- package/dist/components/validated-form.js.map +1 -1
- package/dist/utils/build-validation-messages.js +13 -5
- package/dist/utils/build-validation-messages.js.map +1 -1
- package/dist/utils/get-messages.js.map +1 -1
- package/dist/utils/validation-errors.js.map +1 -1
- package/dist/utils/with-defaults.js.map +1 -1
- package/dist/validators/messages.js.map +1 -1
- package/package.json +57 -34
- /package/{addon-main.js → addon-main.cjs} +0 -0
|
@@ -2,7 +2,6 @@ import { getOwner } from '@ember/application';
|
|
|
2
2
|
import { isArray } from '@ember/array';
|
|
3
3
|
import { assert } from '@ember/debug';
|
|
4
4
|
import { get, set } from '@ember/object';
|
|
5
|
-
import { typeOf } from '@ember/utils';
|
|
6
5
|
import { validate } from 'ember-validators';
|
|
7
6
|
import getMessages from './get-messages.js';
|
|
8
7
|
import buildMessage from './validation-errors.js';
|
|
@@ -36,9 +35,18 @@ function buildValidationMessages(property) {
|
|
|
36
35
|
let customValidators = this.customValidations;
|
|
37
36
|
assert('`customValidations` must be an array', isArray(customValidators));
|
|
38
37
|
customValidators.forEach(validator => {
|
|
39
|
-
assert('validation
|
|
38
|
+
assert('validator.validation must be a function', typeof validator?.validation === 'function');
|
|
40
39
|
let isError = validator.validation(currentValue, validator.params);
|
|
41
|
-
if (isError
|
|
40
|
+
if (isError === true) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (typeof isError === 'string') {
|
|
44
|
+
messages.push(isError);
|
|
45
|
+
} else if (isError === false || isError == null) {
|
|
46
|
+
messages.push(buildMessage(messageBuilder, null, {
|
|
47
|
+
type: 'invalid'
|
|
48
|
+
}));
|
|
49
|
+
} else {
|
|
42
50
|
messages.push(buildMessage(messageBuilder, null, isError));
|
|
43
51
|
}
|
|
44
52
|
});
|
|
@@ -66,10 +74,10 @@ function notifyValidityChange(ctx, onValidityChange) {
|
|
|
66
74
|
set(ctx, 'lastIsTouched', isTouched);
|
|
67
75
|
}
|
|
68
76
|
}
|
|
69
|
-
var
|
|
77
|
+
var buildValidationMessages_default = {
|
|
70
78
|
buildValidationMessages,
|
|
71
79
|
notifyValidityChange
|
|
72
80
|
};
|
|
73
81
|
|
|
74
|
-
export { buildValidationMessages,
|
|
82
|
+
export { buildValidationMessages, buildValidationMessages_default as default, notifyValidityChange };
|
|
75
83
|
//# sourceMappingURL=build-validation-messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-validation-messages.js","sources":["../../src/utils/build-validation-messages.js"],"sourcesContent":["import { getOwner } from '@ember/application';\nimport { isArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { get, set } from '@ember/object';\
|
|
1
|
+
{"version":3,"file":"build-validation-messages.js","sources":["../../src/utils/build-validation-messages.js"],"sourcesContent":["import { getOwner } from '@ember/application';\nimport { isArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { get, set } from '@ember/object';\n\nimport { validate } from 'ember-validators';\n\nimport getMessages from './get-messages.js';\nimport buildMessage from './validation-errors.js';\n\n/**\n * Based on ember-paper validation-mixin\n * @param {string} property - property to grab the currentValue from\n * @returns\n */\nexport function buildValidationMessages(property) {\n const messages = [];\n\n let messageBuilder = getMessages(getOwner(this));\n let emberValidatorConfig = this.validations || {};\n let emberValidatorsConfigKeys = Object.keys(emberValidatorConfig);\n\n // execute ember-validators validations\n let currentValue = get(this, property);\n\n emberValidatorsConfigKeys.forEach((configKey) => {\n const config = emberValidatorConfig[configKey];\n\n try {\n let isError = validate(\n configKey,\n currentValue,\n config,\n config.model,\n config.attribute\n );\n\n if (isError !== true) {\n messages.push(\n buildMessage(\n messageBuilder,\n config.attribute ? config.attribute : null,\n isError\n )\n );\n }\n } catch (error) {\n console.log(error);\n }\n });\n\n // custom validations\n let customValidators = this.customValidations;\n\n assert('`customValidations` must be an array', isArray(customValidators));\n\n customValidators.forEach((validator) => {\n assert(\n 'validator.validation must be a function',\n typeof validator?.validation === 'function'\n );\n\n let isError = validator.validation(currentValue, validator.params);\n\n if (isError === true) {\n return;\n }\n\n if (typeof isError === 'string') {\n messages.push(isError);\n } else if (isError === false || isError == null) {\n messages.push(buildMessage(messageBuilder, null, { type: 'invalid' }));\n } else {\n messages.push(buildMessage(messageBuilder, null, isError));\n }\n });\n\n // error messages array\n let errors = this.errors || [];\n\n assert('`errors` must be an array', isArray(errors));\n\n messages.push(...errors);\n\n return messages;\n}\n\nexport function notifyValidityChange(ctx, onValidityChange) {\n const isValid = ctx.isValid;\n const lastIsValid = ctx.lastIsValid;\n const isTouched = ctx.isTouched;\n const lastIsTouched = ctx.lastIsTouched;\n const isInvalidAndTouched = ctx.isInvalidAndTouched;\n\n if (lastIsValid !== isValid || lastIsTouched !== isTouched) {\n onValidityChange?.({\n child: ctx,\n isValid,\n isTouched,\n isInvalidAndTouched\n });\n\n set(ctx, 'lastIsValid', isValid);\n set(ctx, 'lastIsTouched', isTouched);\n }\n}\n\nexport default {\n buildValidationMessages,\n notifyValidityChange\n};\n"],"names":["buildValidationMessages","property","messages","messageBuilder","getMessages","getOwner","emberValidatorConfig","validations","emberValidatorsConfigKeys","Object","keys","currentValue","get","forEach","configKey","config","isError","validate","model","attribute","push","buildMessage","error","console","log","customValidators","customValidations","assert","isArray","validator","validation","params","type","errors","notifyValidityChange","ctx","onValidityChange","isValid","lastIsValid","isTouched","lastIsTouched","isInvalidAndTouched","child","set"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-messages.js","sources":["../../src/utils/get-messages.js"],"sourcesContent":["import { isPresent } from '@ember/utils';\nimport { isNone } from '@ember/utils';\n\nimport Messages from 'ember-validators/messages';\n\nlet cachedRef = null;\n\n/**\n * Find and load messages module on consuming app. Defaults to addon messages.\n * To define a custom message map, create `my-app/app/validators/messages.js`\n * that extends from ember-validators/messages\n *\n * @param {Object} owner\n * @param {Boolean} useCache Pass `false` to ignore cached key\n * @return {Object}\n */\nexport default function getMessages(owner, useCache = true) {\n let messagesModule = Messages;\n\n if (useCache && isPresent(cachedRef)) {\n return cachedRef;\n }\n\n if (!isNone(owner)) {\n messagesModule = owner.factoryFor('validator:messages')?.create()\n }\n\n cachedRef = messagesModule;\n\n return messagesModule || Messages;\n}\n"],"names":["cachedRef","getMessages","owner","useCache","messagesModule","Messages","isPresent","isNone","factoryFor","create"],"mappings":";;;AAKA,IAAIA,SAAS,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,WAAWA,CAACC,KAAK,EAAEC,QAAQ,GAAG,IAAI,EAAE;EAC1D,IAAIC,cAAc,GAAGC,QAAQ;AAE7B,EAAA,IAAIF,QAAQ,IAAIG,SAAS,CAACN,SAAS,CAAC,EAAE;AACpC,IAAA,OAAOA,SAAS;AAClB;AAEA,EAAA,IAAI,CAACO,MAAM,CAACL,KAAK,CAAC,EAAE;IAClBE,cAAc,GAAGF,KAAK,CAACM,UAAU,CAAC,oBAAoB,CAAC,EAAEC,MAAM,EAAE;AACnE;AAEAT,EAAAA,SAAS,GAAGI,cAAc;EAE1B,OAAOA,cAAc,IAAIC,QAAQ;AACnC
|
|
1
|
+
{"version":3,"file":"get-messages.js","sources":["../../src/utils/get-messages.js"],"sourcesContent":["import { isPresent } from '@ember/utils';\nimport { isNone } from '@ember/utils';\n\nimport Messages from 'ember-validators/messages';\n\nlet cachedRef = null;\n\n/**\n * Find and load messages module on consuming app. Defaults to addon messages.\n * To define a custom message map, create `my-app/app/validators/messages.js`\n * that extends from ember-validators/messages\n *\n * @param {Object} owner\n * @param {Boolean} useCache Pass `false` to ignore cached key\n * @return {Object}\n */\nexport default function getMessages(owner, useCache = true) {\n let messagesModule = Messages;\n\n if (useCache && isPresent(cachedRef)) {\n return cachedRef;\n }\n\n if (!isNone(owner)) {\n messagesModule = owner.factoryFor('validator:messages')?.create()\n }\n\n cachedRef = messagesModule;\n\n return messagesModule || Messages;\n}\n"],"names":["cachedRef","getMessages","owner","useCache","messagesModule","Messages","isPresent","isNone","factoryFor","create"],"mappings":";;;AAKA,IAAIA,SAAS,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,WAAWA,CAACC,KAAK,EAAEC,QAAQ,GAAG,IAAI,EAAE;EAC1D,IAAIC,cAAc,GAAGC,QAAQ;AAE7B,EAAA,IAAIF,QAAQ,IAAIG,SAAS,CAACN,SAAS,CAAC,EAAE;AACpC,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,IAAI,CAACO,MAAM,CAACL,KAAK,CAAC,EAAE;IAClBE,cAAc,GAAGF,KAAK,CAACM,UAAU,CAAC,oBAAoB,CAAC,EAAEC,MAAM,EAAE;AACnE,EAAA;AAEAT,EAAAA,SAAS,GAAGI,cAAc;EAE1B,OAAOA,cAAc,IAAIC,QAAQ;AACnC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-errors.js","sources":["../../src/utils/validation-errors.js"],"sourcesContent":["export default function buildMessage(messages, key, result = {}) {\n let description = messages.getDescriptionFor(key);\n\n if (result?.context?.message) {\n return result.context.message;\n }\n\n let { type, context = {} } = result;\n\n return messages.getMessageFor(type, Object.assign({ description }, context));\n}\n"],"names":["buildMessage","messages","key","result","description","getDescriptionFor","context","message","type","getMessageFor","Object","assign"],"mappings":"AAAe,SAASA,YAAYA,CAACC,QAAQ,EAAEC,GAAG,EAAEC,MAAM,GAAG,EAAE,EAAE;AAC/D,EAAA,IAAIC,WAAW,GAAGH,QAAQ,CAACI,iBAAiB,CAACH,GAAG,CAAC;AAEjD,EAAA,IAAIC,MAAM,EAAEG,OAAO,EAAEC,OAAO,EAAE;AAC5B,IAAA,OAAOJ,MAAM,CAACG,OAAO,CAACC,OAAO;AAC/B;EAEA,IAAI;IAAEC,IAAI;AAAEF,IAAAA,OAAO,GAAG;AAAG,GAAC,GAAGH,MAAM;EAEnC,OAAOF,QAAQ,CAACQ,aAAa,CAACD,IAAI,EAAEE,MAAM,CAACC,MAAM,CAAC;AAAEP,IAAAA;GAAa,EAAEE,OAAO,CAAC,CAAC;AAC9E
|
|
1
|
+
{"version":3,"file":"validation-errors.js","sources":["../../src/utils/validation-errors.js"],"sourcesContent":["export default function buildMessage(messages, key, result = {}) {\n let description = messages.getDescriptionFor(key);\n\n if (result?.context?.message) {\n return result.context.message;\n }\n\n let { type, context = {} } = result;\n\n return messages.getMessageFor(type, Object.assign({ description }, context));\n}\n"],"names":["buildMessage","messages","key","result","description","getDescriptionFor","context","message","type","getMessageFor","Object","assign"],"mappings":"AAAe,SAASA,YAAYA,CAACC,QAAQ,EAAEC,GAAG,EAAEC,MAAM,GAAG,EAAE,EAAE;AAC/D,EAAA,IAAIC,WAAW,GAAGH,QAAQ,CAACI,iBAAiB,CAACH,GAAG,CAAC;AAEjD,EAAA,IAAIC,MAAM,EAAEG,OAAO,EAAEC,OAAO,EAAE;AAC5B,IAAA,OAAOJ,MAAM,CAACG,OAAO,CAACC,OAAO;AAC/B,EAAA;EAEA,IAAI;IAAEC,IAAI;AAAEF,IAAAA,OAAO,GAAG;AAAG,GAAC,GAAGH,MAAM;EAEnC,OAAOF,QAAQ,CAACQ,aAAa,CAACD,IAAI,EAAEE,MAAM,CAACC,MAAM,CAAC;AAAEP,IAAAA;GAAa,EAAEE,OAAO,CAAC,CAAC;AAC9E;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-defaults.js","sources":["../../src/utils/with-defaults.js"],"sourcesContent":["/**\n * Create a new object with defaults\n *\n * @public\n * @param {Object} obj\n * @param {Object} defaults\n * @return {Object}\n */\nexport default function withDefaults(obj = {}, defaults = {}) {\n return Object.assign(Object.assign({}, defaults), obj);\n}\n"],"names":["withDefaults","obj","defaults","Object","assign"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAYA,CAACC,GAAG,GAAG,EAAE,EAAEC,QAAQ,GAAG,EAAE,EAAE;AAC5D,EAAA,OAAOC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEF,QAAQ,CAAC,EAAED,GAAG,CAAC;AACxD
|
|
1
|
+
{"version":3,"file":"with-defaults.js","sources":["../../src/utils/with-defaults.js"],"sourcesContent":["/**\n * Create a new object with defaults\n *\n * @public\n * @param {Object} obj\n * @param {Object} defaults\n * @return {Object}\n */\nexport default function withDefaults(obj = {}, defaults = {}) {\n return Object.assign(Object.assign({}, defaults), obj);\n}\n"],"names":["withDefaults","obj","defaults","Object","assign"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAYA,CAACC,GAAG,GAAG,EAAE,EAAEC,QAAQ,GAAG,EAAE,EAAE;AAC5D,EAAA,OAAOC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEF,QAAQ,CAAC,EAAED,GAAG,CAAC;AACxD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sources":["../../src/validators/messages.js"],"sourcesContent":["import EmberObject from '@ember/object';\n\nimport Messages from 'ember-validators/messages';\n\nexport default EmberObject.extend(Messages)"],"names":["EmberObject","extend","Messages"],"mappings":";;;AAIA,eAAeA,WAAW,CAACC,MAAM,CAACC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"messages.js","sources":["../../src/validators/messages.js"],"sourcesContent":["import EmberObject from '@ember/object';\n\nimport Messages from 'ember-validators/messages';\n\nexport default EmberObject.extend(Messages)"],"names":["EmberObject","extend","Messages"],"mappings":";;;AAIA,eAAeA,WAAW,CAACC,MAAM,CAACC,QAAQ,CAAC;;"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/validated-form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "The default blueprint for ember-cli addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
7
7
|
],
|
|
8
|
-
"repository":
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": ""
|
|
11
|
+
},
|
|
9
12
|
"license": "MIT",
|
|
10
13
|
"author": "",
|
|
11
14
|
"directories": {
|
|
12
15
|
"doc": "doc",
|
|
13
16
|
"test": "tests"
|
|
14
17
|
},
|
|
18
|
+
"imports": {
|
|
19
|
+
"#src/*": "./src/*"
|
|
20
|
+
},
|
|
15
21
|
"exports": {
|
|
16
22
|
".": {
|
|
17
23
|
"types": "./declarations/index.d.ts",
|
|
@@ -21,42 +27,45 @@
|
|
|
21
27
|
"types": "./declarations/*.d.ts",
|
|
22
28
|
"default": "./dist/*.js"
|
|
23
29
|
},
|
|
24
|
-
"./addon-main.js": "./addon-main.
|
|
30
|
+
"./addon-main.js": "./addon-main.cjs"
|
|
25
31
|
},
|
|
26
32
|
"files": [
|
|
27
|
-
"addon-main.
|
|
33
|
+
"addon-main.cjs",
|
|
28
34
|
"declarations",
|
|
29
35
|
"dist"
|
|
30
36
|
],
|
|
31
37
|
"dependencies": {
|
|
32
38
|
"@babel/core": "^7.26.7",
|
|
33
|
-
"@ember/render-modifiers": "^
|
|
34
|
-
"@embroider/
|
|
35
|
-
"ember-
|
|
36
|
-
"@nullvoxpopuli/ember-composable-helpers": "^5.2.8",
|
|
37
|
-
"ember-modifier": "^4.2.0",
|
|
38
|
-
"ember-svg-jar": "^2.6.0",
|
|
39
|
+
"@ember/render-modifiers": "^4.0.0",
|
|
40
|
+
"@embroider/addon-shim": "^1.10.3",
|
|
41
|
+
"@nullvoxpopuli/ember-composable-helpers": "^5.3.2",
|
|
39
42
|
"decorator-transforms": "^2.3.0",
|
|
40
|
-
"ember-
|
|
41
|
-
"
|
|
42
|
-
"ember-validators": "^
|
|
43
|
+
"ember-modifier": "^4.2.0",
|
|
44
|
+
"ember-truth-helpers": "^5.0.0",
|
|
45
|
+
"ember-validators": "^5.0.0"
|
|
43
46
|
},
|
|
44
47
|
"peerDependencies": {
|
|
45
|
-
"@ember-eui/core": "^
|
|
48
|
+
"@ember-eui/core": "^14.0.0",
|
|
46
49
|
"@glimmer/component": "^2.0.0",
|
|
47
|
-
"ember-source": ">= 4.
|
|
50
|
+
"ember-source": ">= 4.12.0"
|
|
48
51
|
},
|
|
49
52
|
"devDependencies": {
|
|
50
53
|
"@babel/core": "^7.26.0",
|
|
51
|
-
"@babel/eslint-parser": "^7.
|
|
54
|
+
"@babel/eslint-parser": "^7.29.7",
|
|
52
55
|
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
53
56
|
"@babel/plugin-transform-typescript": "^7.12.13",
|
|
54
57
|
"@babel/preset-typescript": "^7.18.6",
|
|
58
|
+
"@ember-eui/core": "14.1.0",
|
|
55
59
|
"@ember/optional-features": "^2.2.0",
|
|
56
|
-
"@ember/test-helpers": "^5.1
|
|
57
|
-
"@
|
|
60
|
+
"@ember/test-helpers": "^5.2.1",
|
|
61
|
+
"@ember/test-waiters": "^4.1.1",
|
|
62
|
+
"@embroider/addon-dev": "8.4.0",
|
|
63
|
+
"@embroider/compat": "^4.1.0",
|
|
64
|
+
"@embroider/core": "^4.1.0",
|
|
65
|
+
"@embroider/macros": "^1.20.1",
|
|
58
66
|
"@embroider/test-setup": "^4.0.0",
|
|
59
|
-
"@
|
|
67
|
+
"@embroider/vite": "^1.1.5",
|
|
68
|
+
"@eslint/js": "^9.39.5",
|
|
60
69
|
"@glimmer/component": "^2.0.0",
|
|
61
70
|
"@glint/core": "1.5.2",
|
|
62
71
|
"@glint/environment-ember-loose": "1.5.2",
|
|
@@ -87,27 +96,40 @@
|
|
|
87
96
|
"@types/ember__template": "^4.0.2",
|
|
88
97
|
"@types/ember__test": "^4.0.2",
|
|
89
98
|
"@types/ember__utils": "^4.0.3",
|
|
90
|
-
"
|
|
99
|
+
"@types/qunit": "^2.19.12",
|
|
100
|
+
"@typescript-eslint/parser": "^8.70.0",
|
|
101
|
+
"babel-plugin-ember-template-compilation": "^4.0.0",
|
|
91
102
|
"concurrently": "^9.1.2",
|
|
103
|
+
"ember-basic-dropdown": "^9.0.0",
|
|
92
104
|
"ember-cli": "~6.2.0",
|
|
93
105
|
"ember-cli-clean-css": "^3.0.0",
|
|
94
|
-
"ember-
|
|
106
|
+
"ember-concurrency": "^5.1.0",
|
|
107
|
+
"ember-focus-trap": "^1.1.0",
|
|
108
|
+
"ember-keyboard": "^9.0.4",
|
|
109
|
+
"ember-power-select": "^9.0.2",
|
|
110
|
+
"ember-qunit": "^9.0.2",
|
|
111
|
+
"ember-source": "~6.12.0",
|
|
112
|
+
"ember-strict-application-resolver": "^0.1.1",
|
|
95
113
|
"ember-template-lint": "^6.1.0",
|
|
96
|
-
"eslint": "^9.
|
|
97
|
-
"eslint-config-prettier": "^
|
|
98
|
-
"eslint-plugin-ember": "^12.5
|
|
99
|
-
"eslint-plugin-
|
|
100
|
-
"
|
|
101
|
-
"
|
|
114
|
+
"eslint": "^9.39.5",
|
|
115
|
+
"eslint-config-prettier": "^10.1.8",
|
|
116
|
+
"eslint-plugin-ember": "^12.7.5",
|
|
117
|
+
"eslint-plugin-import": "^2.32.0",
|
|
118
|
+
"eslint-plugin-n": "^17.24.0",
|
|
119
|
+
"globals": "^16.5.0",
|
|
102
120
|
"prettier-plugin-ember-template-tag": "^2.0.4",
|
|
121
|
+
"qunit": "^2.24.1",
|
|
122
|
+
"qunit-dom": "^3.4.0",
|
|
103
123
|
"rollup": "^4.6.0",
|
|
104
124
|
"rollup-plugin-copy": "^3.5.0",
|
|
105
125
|
"stylelint": "^16.14.1",
|
|
106
126
|
"stylelint-config-standard": "^36.0.1",
|
|
107
127
|
"stylelint-prettier": "^5.0.3",
|
|
128
|
+
"testem": "^3.15.1",
|
|
108
129
|
"typescript": "^5.3.3",
|
|
109
|
-
"
|
|
110
|
-
"
|
|
130
|
+
"typescript-eslint": "^8.70.0",
|
|
131
|
+
"vite": "^7.1.9",
|
|
132
|
+
"webpack": "^5.97.1"
|
|
111
133
|
},
|
|
112
134
|
"engines": {
|
|
113
135
|
"node": ">= 18"
|
|
@@ -121,7 +143,7 @@
|
|
|
121
143
|
"ember-addon": {
|
|
122
144
|
"version": 2,
|
|
123
145
|
"type": "addon",
|
|
124
|
-
"main": "addon-main.
|
|
146
|
+
"main": "addon-main.cjs",
|
|
125
147
|
"app-js": {
|
|
126
148
|
"./components/default-theme.js": "./dist/_app_/components/default-theme.js",
|
|
127
149
|
"./components/validated-form.js": "./dist/_app_/components/validated-form.js",
|
|
@@ -148,14 +170,15 @@
|
|
|
148
170
|
"build:js": "rollup --config",
|
|
149
171
|
"build:types": "glint --declaration",
|
|
150
172
|
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
|
151
|
-
"lint:css": "stylelint \"**/*.css\"",
|
|
173
|
+
"lint:css": "stylelint \"**/*.css\" --allow-empty-input",
|
|
152
174
|
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
|
|
153
175
|
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\" --prefixColors auto",
|
|
154
|
-
"lint:js": "eslint .
|
|
176
|
+
"lint:js": "eslint .",
|
|
155
177
|
"lint:js:fix": "eslint . --fix",
|
|
156
|
-
"_syncPnpm": "pnpm sync-dependencies-meta-injected",
|
|
157
178
|
"start": "concurrently 'npm:start:*'",
|
|
158
179
|
"start:js": "rollup --config --watch",
|
|
159
|
-
"start:types": "glint --build --watch"
|
|
180
|
+
"start:types": "glint --build --watch",
|
|
181
|
+
"test:dev": "vite dev",
|
|
182
|
+
"test": "node ../../scripts/sync-injected.mjs && vite build --mode=development --out-dir dist-tests && testem --file testem.cjs ci --port 0"
|
|
160
183
|
}
|
|
161
184
|
}
|
|
File without changes
|