diff --git a/app/utils/dictionary/age-groups.js b/app/utils/dictionary/age-groups.ts similarity index 100% rename from app/utils/dictionary/age-groups.js rename to app/utils/dictionary/age-groups.ts diff --git a/app/utils/dictionary/amazon-s3-regions.js b/app/utils/dictionary/amazon-s3-regions.ts similarity index 100% rename from app/utils/dictionary/amazon-s3-regions.js rename to app/utils/dictionary/amazon-s3-regions.ts diff --git a/app/utils/dictionary/demography.js b/app/utils/dictionary/demography.ts similarity index 99% rename from app/utils/dictionary/demography.js rename to app/utils/dictionary/demography.ts index 6c507879e6b..3bcca85dc48 100644 --- a/app/utils/dictionary/demography.js +++ b/app/utils/dictionary/demography.ts @@ -1,8 +1,6 @@ /** * Using a lean list of countries instead of an external dependency. * All the libraries have a lot of extra data which is of no use to us at this point and unnecessarily takes up more space. - * - * @type {[*]} */ export const countries = [ { diff --git a/app/utils/dictionary/event.js b/app/utils/dictionary/event.ts similarity index 100% rename from app/utils/dictionary/event.js rename to app/utils/dictionary/event.ts diff --git a/app/utils/dictionary/filters.ts b/app/utils/dictionary/filters.ts new file mode 100644 index 00000000000..ad0b22e756f --- /dev/null +++ b/app/utils/dictionary/filters.ts @@ -0,0 +1,36 @@ +export const getDateRanges = function(this: any) { + return [ + { + name : this.l10n.t('All Dates'), + key : 'all_dates' + }, + { + name : this.l10n.t('Today'), + key : 'today' + }, + { + name : this.l10n.t('Tomorrow'), + key : 'tomorrow' + }, + { + name : this.l10n.t('This week'), + key : 'this_week' + }, + { + name : this.l10n.t('This Weekend'), + key : 'this_weekend' + }, + { + name : this.l10n.t('Next week'), + key : 'next_week' + }, + { + name : this.l10n.t('This Month'), + key : 'this_month' + }, + { + name : this.l10n.t('Custom dates'), + key : 'custom_dates' + } + ]; +}; diff --git a/app/utils/dictionary/genders.js b/app/utils/dictionary/genders.ts similarity index 100% rename from app/utils/dictionary/genders.js rename to app/utils/dictionary/genders.ts diff --git a/app/utils/dictionary/languages.js b/app/utils/dictionary/languages.ts similarity index 100% rename from app/utils/dictionary/languages.js rename to app/utils/dictionary/languages.ts diff --git a/app/utils/dictionary/licenses.js b/app/utils/dictionary/licenses.ts similarity index 93% rename from app/utils/dictionary/licenses.js rename to app/utils/dictionary/licenses.ts index 34ffb3ada06..04aac40dd21 100644 --- a/app/utils/dictionary/licenses.js +++ b/app/utils/dictionary/licenses.ts @@ -1,4 +1,11 @@ -export const licenses = [ +export interface License { + name: string, + link: string, + imageSrc: string, + logoUrl: string | null +} + +export const licenses: License[] = [ { name : 'Attribution-NonCommercial-NoDerivs', link : 'https://creativecommons.org/licenses/by-nc-nd/4.0', diff --git a/app/utils/dictionary/payment.js b/app/utils/dictionary/payment.ts similarity index 95% rename from app/utils/dictionary/payment.js rename to app/utils/dictionary/payment.ts index ac52f14b152..fefc5064dc3 100644 --- a/app/utils/dictionary/payment.js +++ b/app/utils/dictionary/payment.ts @@ -1,6 +1,17 @@ export const paymentCountries = ['US', 'AL', 'AR', 'AU', 'AT', 'BE', 'BR', 'CA', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HK', 'HU', 'IE', 'IL', 'IN', 'IT', 'JP', 'LV', 'LT', 'LU', 'MY', 'MT', 'MX', 'NL', 'NZ', 'NO', 'PH', 'PL', 'PT', 'SG', 'SK', 'SI', 'ES', 'SE', 'CH', 'TW', 'GB']; -export const paymentCurrencies = [ +export interface PaymentCurrency { + code: string, + symbol: string, + name: string, + paypal: boolean, + stripe: boolean, + alipay: boolean, + omise: boolean, + paytm: boolean +} + +export const paymentCurrencies: PaymentCurrency[] = [ { paypal : true, code : 'PLN',