Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addon/components/basic-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { computed, set } from '@ember/object';
import { inject as service } from '@ember/service';
import Component from '@ember/component';
import { isEmpty } from '@ember/utils';
import { dasherize } from '@ember/string';
import { dasherize } from '../utils/string-utils';

import { isIOS, clickHandlerDelay } from '../utils/config-utils';

Expand Down
2 changes: 1 addition & 1 deletion addon/components/liquid-tether-dialog.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable ember/no-computed-properties-in-native-classes */
import { computed, set } from '@ember/object';
import { dasherize } from '@ember/string';
import { dasherize } from '../utils/string-utils';

import BasicDialog from './basic-dialog';

Expand Down
2 changes: 1 addition & 1 deletion addon/components/modal-dialog.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
import { dasherize } from '@ember/string';
import { dasherize } from '../utils/string-utils';
import { typeOf } from '@ember/utils';
import { assert, warn } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
Expand Down
2 changes: 1 addition & 1 deletion addon/components/positioned-container.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from '@ember/debug';
import { typeOf } from '@ember/utils';
import Component from '@ember/component';
import { capitalize } from '@ember/string';
import { capitalize } from '../utils/string-utils';
import { observer, computed } from '@ember/object';
import { on } from '@ember/object/evented';

Expand Down
2 changes: 1 addition & 1 deletion addon/components/tether-dialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { computed, set } from '@ember/object';
import { dasherize } from '@ember/string';
import { dasherize } from '../utils/string-utils';

import BasicDialog from './basic-dialog';

Expand Down
20 changes: 20 additions & 0 deletions addon/utils/string-utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Converts a camelCase or other string to kebab-case (dasherized)
* @param {string} str - The string to dasherize
* @returns {string} The dasherized string
*/
export function dasherize(str) {
return str
.replace(/([a-z\d])([A-Z])/g, '$1-$2')
.replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1-$2')
.toLowerCase();
}

/**
* Capitalizes the first letter of a string
* @param {string} str - The string to capitalize
* @returns {string} The capitalized string
*/
export function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
74 changes: 39 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,66 +28,67 @@
"test:ember-compatibility": "ember try:one"
},
"dependencies": {
"@babel/core": "^7.26.0",
"@embroider/macros": "^1.16.9",
"@embroider/util": "^1.13.2",
"@babel/core": "^7.28.5",
"@embroider/macros": "^1.19.5",
"@embroider/util": "^1.13.5",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.3.0",
"ember-cli-version-checker": "^5.1.2",
"ember-wormhole": "^0.6.0"
"ember-wormhole": "^0.6.1"
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.9",
"@babel/plugin-proposal-decorators": "^7.25.9",
"@ember/optional-features": "^2.1.0",
"@ember/string": "^3.0.0",
"@ember/test-helpers": "^4.0.4",
"@babel/eslint-parser": "^7.28.5",
"@babel/plugin-proposal-decorators": "^7.28.0",
"@ember/optional-features": "^2.3.0",
"@ember/test-helpers": "^4.0.5",
"@embroider/test-setup": "^4.0.0",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^9.1.0",
"ember-auto-import": "^2.10.0",
"concurrently": "^9.2.1",
"ember-auto-import": "^2.12.0",
"ember-cli": "~5.12.0",
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-deprecation-workflow": "^3.0.2",
"ember-cli-dependency-checker": "^3.3.3",
"ember-cli-deprecation-workflow": "^3.4.0",
"ember-cli-github-pages": "^0.2.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-load-initializers": "^2.1.2",
"ember-qunit": "^8.1.1",
"ember-resolver": "^13.1.0",
"ember-resolver": "^13.1.1",
"ember-shiki": "^0.3.0",
"ember-source": "~5.12.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^6.0.0",
"ember-template-lint": "^6.1.0",
"ember-template-lint-plugin-prettier": "^5.0.0",
"ember-tether": "^3.1.0",
"ember-tether": "^3.1.1",
"ember-try": "^3.0.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^12.3.3",
"eslint-plugin-n": "^17.14.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-qunit": "^8.1.2",
"liquid-fire": "0.34.0",
"liquid-tether": "pzuraq/liquid-tether#7c140024787c3c1b266e89a2ef528eaea898c78e",
"liquid-wormhole": "pzuraq/liquid-wormhole#efa7e5ca518de7c1d6c52666b70bbc0671fcf380",
"eslint-config-prettier": "^9.1.2",
"eslint-plugin-ember": "^12.7.5",
"eslint-plugin-n": "^17.23.1",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-qunit": "^8.2.5",
"liquid-fire": "^0.37.1",
"liquid-tether": "^3.0.0",
"liquid-wormhole": "^6.0.0",
"loader.js": "^4.7.0",
"only-allow": "^1.2.1",
"prettier": "^3.3.3",
"qunit": "^2.22.0",
"qunit-dom": "^3.3.0",
"only-allow": "^1.2.2",
"prettier": "^3.7.4",
"qunit": "^2.24.3",
"qunit-dom": "^3.5.0",
"release-it": "^13.7.2",
"release-it-lerna-changelog": "^2.4.0",
"webpack": "^5.96.1"
"velocity-animate": "^1.5.2",
"webpack": "^5.103.0"
},
"peerDependencies": {
"@ember/string": "^3.0.0 || ^4.0.0",
"ember-tether": "^3.0.0",
"liquid-tether": "^2.0.7",
"liquid-wormhole": "^3.0.1"
"liquid-fire": "^0.37.1",
"liquid-tether": "^3.0.0",
"liquid-wormhole": "^6.0.0",
"velocity-animate": "^1.5.2"
},
"peerDependenciesMeta": {
"ember-tether": {
Expand All @@ -112,8 +113,11 @@
"ember-addon": {
"configPath": "tests/dummy/config",
"demoURL": "http://yapplabs.github.io/ember-modal-dialog/",
"after": [
"liquid-fire"
],
"versionCompatibility": {
"ember": "~3.20.0 || ~3.24.0 || >= 3.25.0"
"ember": ">= 3.28.0"
}
},
"release-it": {
Expand All @@ -132,8 +136,8 @@
}
},
"volta": {
"node": "20.14.0",
"pnpm": "9.14.2"
"node": "20.19.6",
"pnpm": "10.24.0"
},
"pnpm": {
"overrides": {
Expand Down
Loading