Skip to content

Commit

Permalink
Merge pull request #1080 from Yelinz/ember-breaking-updates
Browse files Browse the repository at this point in the history
Ember breaking updates
  • Loading branch information
Yelinz authored Nov 18, 2024
2 parents ba77319 + 429bbf3 commit 4bc39d0
Show file tree
Hide file tree
Showing 40 changed files with 1,146 additions and 2,229 deletions.
3 changes: 1 addition & 2 deletions ember/.template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
rules: {
"no-bare-strings": true,
"block-indentation": true,
// disabled because of https://github.com/ember-template-lint/ember-template-lint/issues/2798
"no-invalid-link-text": false,
"no-at-ember-render-modifiers": "warn",
},
};
2 changes: 1 addition & 1 deletion ember/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM danlynn/ember-cli:4.12.1-node_18.16 as build
FROM danlynn/ember-cli:5.8.1-node_20.12 as build

ARG OIDC_HOST

Expand Down
2 changes: 1 addition & 1 deletion ember/app/models/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class AddressModel extends LocalizedModel {
}

get countryName() {
const countries = new Intl.DisplayNames(this.intl.locale, {
const countries = new Intl.DisplayNames(this.intl.primaryLocale, {
type: "region",
});
return countries.of(this.country);
Expand Down
3 changes: 2 additions & 1 deletion ember/app/ui/application/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<div class="uk-padding">
{{outlet}}
</div>
</main>
<BasicDropdownWormhole />
</main>
7 changes: 3 additions & 4 deletions ember/app/ui/cases/detail/work-items/edit/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,11 @@
{{t "work-items.description"}}
</label>
<div class="uk-form-controls">
<Textarea
class="uk-input"
<textarea
class="uk-textarea"
id="description"
@value={{this.workItem.task.description}}
disabled
/>
>{{this.workItem.task.description}}</textarea>
</div>
</div>

Expand Down
9 changes: 5 additions & 4 deletions ember/app/ui/components/case-transfer/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
</div>
<div class="uk-margin">
<label class="uk-form-label">
<Input
@type="checkbox"
@checked={{this.removeAccess}}
disabled={{not @toRemove}}
<input
type="checkbox"
checked={{this.removeAccess}}
disabled={{not @toRemove.length}}
class="uk-checkbox"
{{on "click" (toggle "removeAccess" this)}}
/>
{{t "documents.bulkEdit.transfer.removeAssignees"}}
</label>
Expand Down
2 changes: 1 addition & 1 deletion ember/app/ui/components/date-picker/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class CfFieldInputDateComponent extends Component {
@tracked flatpickrRef = null;

get locale() {
return this.intl.primaryLocale.split("-")[0];
return this.intl.primaryLocale;
}

@action
Expand Down
12 changes: 1 addition & 11 deletions ember/app/ui/components/filters/dropdown/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,5 @@
{{option.label}}
</PowerSelectMultiple>
</label>
{{#if @invertFilter}}
<label>
<Input
class="uk-checkbox"
@type="checkbox"
@checked={{@inverted}}
{{on "click" @invertFilter}}
/>
{{t "components.filters.invert"}}
</label>
{{/if}}
<Filters::Invert @invertFilter={{@invertFilter}} @inverted={{@inverted}} />
</div>
14 changes: 2 additions & 12 deletions ember/app/ui/components/filters/identity/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,5 @@
{{option.label}}
</PowerSelectMultiple>
</label>
{{#if @invertFilter}}
<label>
<Input
class="uk-checkbox"
@type="checkbox"
@checked={{@inverted}}
{{on "click" @invertFilter}}
/>
{{t "components.filters.invert"}}
</label>
{{/if}}
</div>
<Filters::Invert @invertFilter={{@invertFilter}} @inverted={{@inverted}} />
</div>
12 changes: 1 addition & 11 deletions ember/app/ui/components/filters/input/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,5 @@
</span>
<input value={{@value}} class="uk-input" {{on "input" @onChange}} />
</label>
{{#if @invertFilter}}
<label>
<Input
class="uk-checkbox"
@type="checkbox"
@checked={{@inverted}}
{{on "click" @invertFilter}}
/>
{{t "components.filters.invert"}}
</label>
{{/if}}
<Filters::Invert @invertFilter={{@invertFilter}} @inverted={{@inverted}} />
</div>
11 changes: 11 additions & 0 deletions ember/app/ui/components/filters/invert/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{#if @invertFilter}}
<label>
<input
class="uk-checkbox"
type="checkbox"
checked={{@inverted}}
{{on "click" @invertFilter}}
/>
{{t "components.filters.invert"}}
</label>
{{/if}}
4 changes: 2 additions & 2 deletions ember/app/ui/components/identity-addresses/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@
</div>
{{else}}
<Form.input
@label={{t "components.identity-addresses.form.label.description" lang=(uppercase this.intl.locale.firstObject)}}
@name="_description.{{this.intl.locale.firstObject}}"
@label={{t "components.identity-addresses.form.label.description" lang=(uppercase this.intl.primaryLocale)}}
@name="_description.{{this.intl.primaryLocale}}"
@required={{false}}
/>
{{/if}}
Expand Down
4 changes: 2 additions & 2 deletions ember/app/ui/components/identity-emails/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
</div>
{{else}}
<Form.input
@label={{t "components.identity-emails.form.label.description" lang=(uppercase this.intl.locale.firstObject)}}
@name="_description.{{this.intl.locale.firstObject}}"
@label={{t "components.identity-emails.form.label.description" lang=(uppercase this.intl.primaryLocale)}}
@name="_description.{{this.intl.primaryLocale}}"
@required={{false}}
/>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion ember/app/ui/components/identity-members/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class IdentityMembersComponent extends Component {
}

get locale() {
return this.intl.locale[0];
return this.intl.primaryLocale;
}

membersResource = trackedFunction(this, async () => {
Expand Down
4 changes: 2 additions & 2 deletions ember/app/ui/components/identity-phone-numbers/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
</div>
{{else}}
<Form.input
@label={{t "components.identity-phone-numbers.form.label.description" lang=(uppercase this.intl.locale.firstObject)}}
@name="_description.{{this.intl.locale.firstObject}}"
@label={{t "components.identity-phone-numbers.form.label.description" lang=(uppercase this.intl.primaryLocale)}}
@name="_description.{{this.intl.primaryLocale}}"
@required={{false}}
/>
{{/if}}
Expand Down
6 changes: 3 additions & 3 deletions ember/app/ui/components/nav-bar/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
{{/if}}
<li class="language-select">
<a class="uk-link-reset" href="#">
{{this.intl.locale}}
{{this.intl.primaryLocale}}
<UkIcon @icon="chevron-down" />
</a>
<ul
Expand Down Expand Up @@ -271,7 +271,7 @@
href="#"
data-test-locale
>
{{this.intl.locale}}
{{this.intl.primaryLocale}}
<UkIcon @icon="chevron-down" />
</a>
<ul
Expand Down Expand Up @@ -346,7 +346,7 @@
{{else}}
<p>{{t "snippets.index.empty"}}</p>
{{/each}}
{{#if (not (eq this.pageNumber this.totalPages))}}
{{#if (not-eq this.pageNumber this.totalPages)}}
<a {{on "click" this.loadMoreSnippets}} href="#">
{{t "components.nav-bar.snippet.load-more"}}
</a>
Expand Down
2 changes: 1 addition & 1 deletion ember/app/ui/components/validated-form-error/template.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<small class="uk-text-danger">
{{yield}}
{{#each @errors as |error idx|}}
{{if (not (eq idx 0)) ", "}} {{!-- Space out multiple errors --}}
{{if (not-eq idx 0) ", "}} {{!-- Space out multiple errors --}}
{{t error}}
{{/each}}
</small>
2 changes: 1 addition & 1 deletion ember/app/ui/profile/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<div class="uk-width-1-2@m uk-width-1-3@l">
<div class="uk-card uk-card-default uk-card-body uk-card-small">
<IdentityInterests @identity={{@model}} @endpoint={{"me"}} @profileView={{true}} />
<IdentityInterests @identity={{@model}} @endpoint="me" @profileView={{true}} />
</div>
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions ember/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ module.exports = function (defaults) {
},
},
},
babel: {
plugins: [
require.resolve("ember-concurrency/async-arrow-task-transform"),
],
},
autoImport: {
alias: {
"ember-composable-helpers": "@nullvoxpopuli/ember-composable-helpers",
},
},
});

// Use `app.import` to add additional libraries to the generated
Expand Down
39 changes: 21 additions & 18 deletions ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,36 @@
"@embroider/macros": "^1.16.0",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@projectcaluma/ember-analytics": "^12.15.4",
"@projectcaluma/ember-core": "^12.15.4",
"@projectcaluma/ember-form": "^12.15.4",
"@projectcaluma/ember-form-builder": "^12.15.4",
"@projectcaluma/ember-testing": "^12.15.4",
"@projectcaluma/ember-workflow": "^12.15.4",
"@projectcaluma/ember-analytics": "^13.1.2",
"@projectcaluma/ember-core": "^13.1.2",
"@projectcaluma/ember-form": "^13.1.2",
"@projectcaluma/ember-form-builder": "^13.1.2",
"@projectcaluma/ember-testing": "^13.1.2",
"@projectcaluma/ember-workflow": "^13.1.2",
"ember-apollo-client": "^4.1.0",
"ember-auto-import": "^2.7.2",
"ember-basic-dropdown": "^8.1.0",
"ember-can": "^4.2.0",
"ember-changeset": "^4.1.2",
"ember-changeset-validations": "^4.1.1",
"ember-cli-clipboard": "^1.1.0",
"ember-cli-clipboard": "^1.2.1",
"ember-cli-htmlbars": "^6.2.0",
"ember-cli-sass": "^11.0.1",
"ember-cli-showdown": "^9.0.1",
"ember-cli-string-helpers": "^6.1.0",
"ember-composable-helpers": "^5.0.0",
"ember-concurrency": "^2.3.7",
"@nullvoxpopuli/ember-composable-helpers": "^5.2.6",
"ember-concurrency": "^4.0.2",
"ember-data": "~4.12.4",
"ember-data-resources": "^5.2.1",
"ember-engines": "^0.9.0",
"ember-engines": "^0.11.0",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^8.1.2",
"ember-flatpickr": "^8.0.0",
"ember-flatpickr": "^8.0.1",
"ember-in-viewport": "^4.1.0",
"ember-intl": "^5.7.2",
"ember-intl": "^7.0.7",
"ember-load-initializers": "^2.1.2",
"ember-localized-model": "^3.2.2",
"ember-power-select": "^6.0.1",
"ember-power-select": "^8.2.0",
"ember-resolver": "^11.0.1",
"ember-resources": "^7.0.1",
"ember-set-helper": "^3.0.1",
Expand All @@ -66,7 +67,7 @@
"ember-source": "~4.12.4",
"ember-truth-helpers": "^4.0.3",
"ember-uikit": "^9.1.2",
"ember-validated-form": "^6.1.2",
"ember-validated-form": "^7.0.1",
"file-saver": "^2.0.5",
"flatpickr": "^4.6.13",
"graphql": "^16.8.1",
Expand All @@ -84,7 +85,7 @@
"@babel/eslint-parser": "^7.24.1",
"@babel/plugin-proposal-decorators": "^7.24.1",
"@ember/test-helpers": "^3.3.0",
"@faker-js/faker": "^8.4.1",
"@faker-js/faker": "^9.2.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~4.12.0",
"ember-cli-app-version": "^6.0.1",
Expand All @@ -98,7 +99,7 @@
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-qunit": "^8.0.2",
"ember-template-lint": "^4.18.2",
"ember-template-lint": "^6.0.0",
"ember-test-selectors": "^6.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -113,10 +114,12 @@
"qunit-dom": "^3.1.2"
},
"//": [
"ember-engines-router-service: version 0.4/0.5 causes problems: https://github.com/villander/ember-engines-router-service/issues/67"
"ember-engines-router-service: version 0.4/0.5 causes problems: https://github.com/villander/ember-engines-router-service/issues/67",
"@projectcaluma/ember-form-builder needs uikit satisfying ^3.21.13"
],
"resolutions": {
"ember-engines-router-service": "~0.6.0"
"ember-engines-router-service": "~0.6.0",
"uikit": "3.21.13"
},
"engines": {
"node": ">= 18"
Expand Down
7 changes: 2 additions & 5 deletions ember/tests/acceptance/identities-test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { visit, click, currentURL } from "@ember/test-helpers";
import { setupMirage } from "ember-cli-mirage/test-support";
import { setupIntl } from "ember-intl/test-support";
import { setupApplicationTest } from "ember-qunit";
import { authenticateSession } from "ember-simple-auth/test-support";
import { module, test } from "qunit";

import { setupApplicationTest } from "mysagw/tests/helpers";

module("Acceptance | identities", function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
setupIntl(hooks);

hooks.beforeEach(async function () {
this.identity = this.server.create("identity", {
Expand Down
7 changes: 2 additions & 5 deletions ember/tests/acceptance/interest-test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { visit, fillIn, click, waitFor, currentURL } from "@ember/test-helpers";
import { setupMirage } from "ember-cli-mirage/test-support";
import { setupIntl } from "ember-intl/test-support";
import { setupApplicationTest } from "ember-qunit";
import { authenticateSession } from "ember-simple-auth/test-support";
import { module, test } from "qunit";

import { setupApplicationTest } from "mysagw/tests/helpers";

module("Acceptance | interest", function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
setupIntl(hooks);

hooks.beforeEach(async function () {
this.category = this.server.create("interest-category");
Expand Down
7 changes: 2 additions & 5 deletions ember/tests/acceptance/snippets-test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { visit, fillIn, click } from "@ember/test-helpers";
import { setupMirage } from "ember-cli-mirage/test-support";
import { setupIntl } from "ember-intl/test-support";
import { setupApplicationTest } from "ember-qunit";
import { authenticateSession } from "ember-simple-auth/test-support";
import { module, test } from "qunit";

import { setupApplicationTest } from "mysagw/tests/helpers";

module("Acceptance | snippets", function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
setupIntl(hooks);

hooks.beforeEach(async function () {
this.server.create("snippet", { body: { de: "Lorem ipsum" } });
Expand Down
Loading

0 comments on commit 4bc39d0

Please sign in to comment.