diff --git a/.ember-cli b/.ember-cli
new file mode 100644
index 00000000..ee64cfed
--- /dev/null
+++ b/.ember-cli
@@ -0,0 +1,9 @@
+{
+ /**
+ Ember CLI sends analytics information by default. The data is completely
+ anonymous, but there are times when you might want to disable this behavior.
+
+ Setting `disableAnalytics` to true will prevent any data from being sent.
+ */
+ "disableAnalytics": false
+}
diff --git a/.eslintrc.js b/.eslintrc.js
index 6cb5e605..659e1288 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -29,7 +29,7 @@ module.exports = {
},
env: {
browser: false,
- node: true
+ node: true,
}
}
]
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..92216555
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,21 @@
+# unconventional js
+/blueprints/*/files/
+/vendor/
+
+# compiled output
+/dist/
+/tmp/
+
+# dependencies
+/bower_components/
+/node_modules/
+
+# misc
+/coverage/
+!.*
+.eslintcache
+
+# ember-try
+/.node_modules.ember-try/
+/bower.json.ember-try
+/package.json.ember-try
diff --git a/.template-lintrc.js b/.template-lintrc.js
index a73e7b71..04f97818 100644
--- a/.template-lintrc.js
+++ b/.template-lintrc.js
@@ -15,7 +15,7 @@ module.exports = {
'no-triple-curlies': false,
'no-unused-block-params': false,
'simple-unless': false,
- 'no-console': false,
+ 'no-log': false,
'no-bare-strings': false
}
};
\ No newline at end of file
diff --git a/app/adapters/application.js b/app/adapters/application.js
index 6fefaaf3..d5903f0e 100644
--- a/app/adapters/application.js
+++ b/app/adapters/application.js
@@ -1,9 +1,9 @@
-import DS from 'ember-data';
+import JSONAPIAdapter from '@ember-data/adapter/json-api';
import ENV from 'ror-app/config/environment';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
-export default DS.JSONAPIAdapter.extend({
+export default JSONAPIAdapter.extend({
launchDarkly: service(),
host: computed('launchDarkly.variation', function() {
return this.launchDarkly.variation('v2_ui') ? ENV.API_URL_V2 : ENV.API_URL_V1;
diff --git a/app/adapters/organization.js b/app/adapters/organization.js
index 7ce9c10b..adeae6fa 100644
--- a/app/adapters/organization.js
+++ b/app/adapters/organization.js
@@ -1,9 +1,9 @@
-import DS from 'ember-data';
+import JSONAPIAdapter from '@ember-data/adapter/json-api';
import ENV from 'ror-app/config/environment';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
-export default DS.JSONAPIAdapter.extend({
+export default JSONAPIAdapter.extend({
launchDarkly: service(),
host: computed('launchDarkly.variation', function() {
return this.launchDarkly.variation('v2_ui') ? ENV.API_URL_V2 : ENV.API_URL_V1;
diff --git a/app/components/application-header.js b/app/components/application-header.js
index e54c1564..2fc6eeca 100644
--- a/app/components/application-header.js
+++ b/app/components/application-header.js
@@ -8,10 +8,10 @@ export default Component.extend({
actions: {
search() {
- this.get('globalSearch').doSearch(this.query);
+ this.globalSearch.doSearch(this.query);
},
clear() {
- this.get('globalSearch').doSearch(null);
+ this.globalSearch.doSearch(null);
}
}
});
diff --git a/app/components/filter-sidebar.js b/app/components/filter-sidebar.js
index 23d8e37f..31374951 100644
--- a/app/components/filter-sidebar.js
+++ b/app/components/filter-sidebar.js
@@ -23,7 +23,7 @@ export default Component.extend({
this.filterValue = this.filterValue.slice(0, -1)
this.set('model.query.filter', this.filterValue)
//this.get('globalSearch').doSearch(this.query, this.allStatus)
- this.get('router').transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}});
+ this.router.transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}});
},
clearFilter() {
this.filterValue = ''
@@ -32,7 +32,7 @@ export default Component.extend({
this.set('withdrawnStatus', false);
this.filterValue = "status:active"
this.set('model.query.filter', this.filterValue)
- this.get('router').transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}});
+ this.router.transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}});
}
}
diff --git a/app/components/page-numbers.js b/app/components/page-numbers.js
index 3e8b1780..4e615ab7 100644
--- a/app/components/page-numbers.js
+++ b/app/components/page-numbers.js
@@ -1,15 +1,16 @@
+import { alias } from '@ember/object/computed';
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
tagName: 'row',
- currentPage: computed.alias("model.query.page"),
- totalPages: computed.alias("model.meta.totalPages"),
+ currentPage: alias("model.query.page"),
+ totalPages: alias("model.meta.totalPages"),
pageItems: computed("currentPage","totalPages", function() {
- const page = Number(this.get("currentPage") || 1);
- const totalPages = Number(this.get("totalPages"));
+ const page = Number(this.currentPage || 1);
+ const totalPages = Number(this.totalPages);
return Array.from(Array(totalPages).keys()).reduce(function (sum, i) {
if (i < 2 || (i > (page - 4) && i < (page + 2)) || i > (totalPages - 3)) {
@@ -24,8 +25,8 @@ export default Component.extend({
}),
nextPage: computed("currentPage", "totalPages", function() {
- const page = Number(this.get("currentPage"));
- const totalPages = Number(this.get("totalPages"));
+ const page = Number(this.currentPage);
+ const totalPages = Number(this.totalPages);
if (page < totalPages) {
return page + 1;
} else {
@@ -34,7 +35,7 @@ export default Component.extend({
}),
previousPage: computed("currentPage", function() {
- const page = Number(this.get("currentPage"));
+ const page = Number(this.currentPage);
if (page > 1) {
return page - 1;
} else {
diff --git a/app/helpers/decimal-format.js b/app/helpers/decimal-format.js
new file mode 100644
index 00000000..54a4f6df
--- /dev/null
+++ b/app/helpers/decimal-format.js
@@ -0,0 +1,13 @@
+import { helper } from '@ember/component/helper';
+
+export function decimalFormat(params) {
+ const [number] = params;
+
+ if (isNaN(number) || number === '') {
+ return "";
+ }
+
+ return new Intl.NumberFormat().format(number);
+}
+
+export default helper(decimalFormat);
diff --git a/app/models/organization.js b/app/models/organization.js
index 6d35285b..f367a26b 100644
--- a/app/models/organization.js
+++ b/app/models/organization.js
@@ -1,23 +1,23 @@
-import DS from 'ember-data';
+import Model, { attr } from '@ember-data/model';
-export default DS.Model.extend({
- meta: DS.attr(),
+export default Model.extend({
+ meta: attr(),
- name: DS.attr('string'), //TODO: Remove this when v1 has been retired
- names: DS.attr(),
- local: DS.attr('string'),
- types: DS.attr(),
- links: DS.attr(),
- aliases: DS.attr(),
- acronyms: DS.attr(),
- external_ids: DS.attr(),
- wikipediaUrl: DS.attr('string'),
- labels: DS.attr(),
- country: DS.attr(),
- addresses: DS.attr(),
- relationships: DS.attr(),
- status: DS.attr('string'),
- admin: DS.attr(),
- locations: DS.attr()
+ name: attr('string'), //TODO: Remove this when v1 has been retired
+ names: attr(),
+ local: attr('string'),
+ types: attr(),
+ links: attr(),
+ aliases: attr(),
+ acronyms: attr(),
+ external_ids: attr(),
+ wikipediaUrl: attr('string'),
+ labels: attr(),
+ country: attr(),
+ addresses: attr(),
+ relationships: attr(),
+ status: attr('string'),
+ admin: attr(),
+ locations: attr()
});
diff --git a/app/serializers/application.js b/app/serializers/application.js
index 4b7338fa..d6eb84aa 100644
--- a/app/serializers/application.js
+++ b/app/serializers/application.js
@@ -1,8 +1,8 @@
+import JSONSerializer from '@ember-data/serializer/json';
import { underscore } from '@ember/string';
import { assign } from '@ember/polyfills';
-import DS from 'ember-data';
-export default DS.JSONSerializer.extend({
+export default JSONSerializer.extend({
normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {
let total = payload.number_of_results;
let totalPages = Math.min(Math.ceil(total / 20), 500);
diff --git a/app/services/global-search.js b/app/services/global-search.js
index 3bb6395a..cb669a5e 100644
--- a/app/services/global-search.js
+++ b/app/services/global-search.js
@@ -1,5 +1,4 @@
-import Service from '@ember/service';
-import { inject as service } from '@ember/service';
+import Service, { inject as service } from '@ember/service';
// import { assign } from '@ember/polyfills';
export default Service.extend({
@@ -16,6 +15,6 @@ export default Service.extend({
//let params = assign(this.model.get('query'), { query: this.query, sort: this.sort });
// this.router.transitionTo({ queryParams: params });
- this.get('router').transitionTo('organizations.index', { queryParams: { query: query, page: 1}});
+ this.router.transitionTo('organizations.index', { queryParams: { query: query, page: 1}});
}
});
diff --git a/app/templates/application.hbs b/app/templates/application.hbs
index ae45aab0..f46c147c 100644
--- a/app/templates/application.hbs
+++ b/app/templates/application.hbs
@@ -2,6 +2,6 @@
{{outlet}}
-{{application-subscribe}}
-{{application-socials}}
-{{application-footer}}
+
+
+
diff --git a/app/templates/components/application-header.hbs b/app/templates/components/application-header.hbs
index ff07aba4..32561e6d 100755
--- a/app/templates/components/application-header.hbs
+++ b/app/templates/components/application-header.hbs
@@ -1,68 +1,66 @@
-{{#bs-navbar backgroundColor="white" class="navbar-expand-lg"
-onCollapse=(action (mut collapsed) true) onExpand=(action (mut collapsed) false) as |navbar|}}
+
-
{{navbar.toggle}}
- {{#navbar.content}}
- {{#navbar.nav class="ml-auto" as |nav|}}
+
+
- {{#nav.item}}
+
About
- {{/nav.item}}
+
- {{#nav.item}}
+
Registry
- {{/nav.item}}
+
- {{#nav.item}}
+
Community
- {{/nav.item}}
+
- {{#nav.item}}
+
Blog
- {{/nav.item}}
+
- {{#nav.item}}
+
Documentation
- {{/nav.item}}
+
- {{/navbar.nav}}
- {{/navbar.content}}
+
+
-{{/bs-navbar}}
-{{#if showAdvanced}}
+
+{{#if this.showAdvanced}}
diff --git a/app/templates/components/page-numbers.hbs b/app/templates/components/page-numbers.hbs
index 2555dbdc..e3dcadff 100644
--- a/app/templates/components/page-numbers.hbs
+++ b/app/templates/components/page-numbers.hbs
@@ -1,15 +1,9 @@