Skip to content

Commit

Permalink
style: add files extensions to internal import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
phetw committed Jun 23, 2022
1 parent 3458218 commit 6003ddc
Show file tree
Hide file tree
Showing 31 changed files with 41 additions and 41 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/index.ts
Expand Up @@ -43,14 +43,14 @@ export { DeprecationNotice } from './notices/DeprecationNotice.js';
* Export events
*/
export { TapEvent } from './events/TapEvent.js';
export type { FocusedChangedEvent } from './types/events';
export type { FocusedChangedEvent } from './types/events.js';

/**
* Export common interfaces
*/
export type { MultiValue } from './interfaces/MultiValue';
export type { StyleMap } from './interfaces/StyleMap';
export type { StyleInfo } from './interfaces/StyleInfo';
export type { MultiValue } from './interfaces/MultiValue.js';
export type { StyleMap } from './interfaces/StyleMap.js';
export type { StyleInfo } from './interfaces/StyleInfo.js';

/**
* Export useful utils
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/autosuggest/helpers/renderer.ts
@@ -1,6 +1,6 @@
import { uuid } from '@refinitiv-ui/utils/uuid.js';
import { updateElementContent } from './utils.js';
import { AutosuggestQuery, AutosuggestRenderer, Suggestion, AutosuggestItem } from './types';
import { AutosuggestQuery, AutosuggestRenderer, Suggestion, AutosuggestItem } from './types.js';

/**
* Build item element from data object
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/autosuggest/helpers/utils.ts
@@ -1,5 +1,5 @@
import type { Item } from '../../item';
import { AutosuggestHighlightable, AutosuggestItem } from './types';
import { AutosuggestHighlightable, AutosuggestItem } from './types.js';

/**
* Check whether item can be highlighted
Expand Down
4 changes: 2 additions & 2 deletions packages/elements/src/autosuggest/index.ts
Expand Up @@ -19,7 +19,7 @@ import {
TranslateDirective,
TranslatePropertyKey
} from '@refinitiv-ui/translate';
import { TapEvent } from '../events';
import { TapEvent } from '../events.js';
import type {
AutosuggestTargetElement,
AutosuggestHighlightable,
Expand Down Expand Up @@ -55,7 +55,7 @@ export type {
SuggestionsClearRequestedEvent,
SuggestionsQueryEvent,
SuggestionsChangedEvent
} from './helpers/types';
} from './helpers/types.js';
export { updateElementContent } from './helpers/utils.js';
export {
itemHighlightable,
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/calendar/index.ts
Expand Up @@ -80,7 +80,7 @@ import {
DateButtonElement,
NavigationDirection,
WeekdayName
} from './types';
} from './types.js';
import type { TapEvent } from '../events';
import type { Button } from '../button';
import './locales.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/elements/src/combo-box/index.ts
Expand Up @@ -22,8 +22,8 @@ import { CollectionComposer, DataItem } from '@refinitiv-ui/utils/collection.js'
import { AnimationTaskRunner, TimeoutTaskRunner } from '@refinitiv-ui/utils/async.js';
import { registerOverflowTooltip } from '../tooltip/index.js';
import { isElementOverflown } from '@refinitiv-ui/utils/element.js';
import { ItemData } from '../item';
import { ComboBoxData, ComboBoxFilter } from './helpers/types';
import { ItemData } from '../item/index.js';
import { ComboBoxData, ComboBoxFilter } from './helpers/types.js';
import type { List } from '../list/index.js';
import { ComboBoxRenderer } from './helpers/renderer.js';
import { defaultFilter } from './helpers/filter.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/datetime-field/index.ts
Expand Up @@ -30,7 +30,7 @@ import {
NavigationKeys,
DateTimeFormatPart,
InputSelection
} from './types';
} from './types.js';
import { TextField } from '../text-field/index.js';
import {
getSelectedPartIndex,
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/datetime-field/utils.ts
@@ -1,4 +1,4 @@
import { DateTimeFormatPart, DateTimeFormatPartTypes, InputSelection } from './types';
import { DateTimeFormatPart, DateTimeFormatPartTypes, InputSelection } from './types.js';
import { Direction } from './constants.js';

const IterablePartTypes: DateTimeFormatPartTypes[] = ['year', 'day', 'month', 'hour', 'minute', 'second', 'weekday', 'dayPeriod', 'fractionalSecond'];
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/heatmap/helpers/text.ts
@@ -1,4 +1,4 @@
import type { HeatmapCell } from './types';
import type { HeatmapCell } from './types.js';

const MIN_FONT_SIZE = 10;
const MAX_FONT_SIZE = 16;
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/heatmap/index.ts
Expand Up @@ -25,7 +25,7 @@ import { getResponsiveFontSize, getMaximumTextWidth, MIN_FONT_SIZE } from './hel
const MAX_CELL_WIDTH_RATIO = 0.85;
const DEFAULT_CANVAS_RATIO = 0.75; // ratio — 4:3

export type { HeatmapCell, HeatmapXAxis, HeatmapYAxis, HeatmapConfig, HeatmapTooltipCallback, HeatmapRenderCallback, HeatmapCustomisableProperties } from './helpers/types';
export type { HeatmapCell, HeatmapXAxis, HeatmapYAxis, HeatmapConfig, HeatmapTooltipCallback, HeatmapRenderCallback, HeatmapCustomisableProperties } from './helpers/types.js';

/**
* A graphical representation of data where the individual
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/index.ts
@@ -1,3 +1,3 @@
export { VERSION } from './version.js';
export * from './events';
export * from './events.js';
export * from '@refinitiv-ui/core';
2 changes: 1 addition & 1 deletion packages/elements/src/item/index.ts
Expand Up @@ -14,7 +14,7 @@ import type { ItemType } from './helpers/types';
import '../icon/index.js';
import '../checkbox/index.js';

export * from './helpers/types';
export * from './helpers/types.js';

const isAllWhitespaceTextNode = (node: Node): boolean =>
node.nodeType === document.TEXT_NODE
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/overlay-menu/index.ts
Expand Up @@ -20,7 +20,7 @@ import '../item/index.js';
import { Item, ItemData } from '../item/index.js';
import { Overlay, OverlayPosition, OverlayPositionTarget } from '../overlay/index.js';
import { applyLock } from '../overlay/managers/interaction-lock-manager.js';
import { OverlayMenuData, Navigation } from './helpers/types';
import { OverlayMenuData, Navigation } from './helpers/types.js';
import { OpenedMenusManager } from './managers/menu-manager.js';

export type { OverlayMenuData };
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/overlay/index.ts
Expand Up @@ -2,7 +2,7 @@ export type {
Position as OverlayPosition,
PositionTarget as OverlayPositionTarget,
TransitionStyle as OverlayTransitionStyle
} from './helpers/types';
} from './helpers/types.js';

export {
Overlay
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/time-picker/index.ts
Expand Up @@ -12,7 +12,7 @@ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
import { property } from '@refinitiv-ui/core/decorators/property.js';
import { state } from '@refinitiv-ui/core/decorators/state.js';
import { query } from '@refinitiv-ui/core/decorators/query.js';
import { ValueChangedEvent, FocusedChangedEvent } from '../events';
import { ValueChangedEvent, FocusedChangedEvent } from '../events.js';
import { VERSION } from '../version.js';
import {
isValidTime,
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/tree/index.ts
@@ -1,4 +1,4 @@
export * from './elements/tree.js';
export * from './elements/tree-item.js';
export { TreeRenderer } from './helpers/renderer.js';
export type { TreeData, TreeDataItem } from './helpers/types';
export type { TreeData, TreeDataItem } from './helpers/types.js';
2 changes: 1 addition & 1 deletion packages/i18n/src/index.ts
Expand Up @@ -5,7 +5,7 @@ export type {
UnicodeExtensions,
MessageFormats,
MessageOptions
} from './types';
} from './types.js';

export {
LangObserverCallback,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/index.ts
@@ -1,6 +1,6 @@
export type {
Translations
} from './types';
} from './types.js';

export {
Phrasebook,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/de/color-dialog.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/color-dialog.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import dialogTranslations from './dialog';
import dialogTranslations from './dialog.js';

const translations = {
...dialogTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/de/tree-select.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/tree-select.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import comboboxTranslations from './combo-box';
import comboboxTranslations from './combo-box.js';

const translations = {
...comboboxTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/en/color-dialog.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/color-dialog.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import dialogTranslations from './dialog';
import dialogTranslations from './dialog.js';

const translations = {
...dialogTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/en/tree-select.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/tree-select.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import comboboxTranslations from './combo-box';
import comboboxTranslations from './combo-box.js';

const translations = {
...comboboxTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/ja/color-dialog.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/color-dialog.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import dialogTranslations from './dialog';
import dialogTranslations from './dialog.js';

const translations = {
...dialogTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/ja/tree-select.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/tree-select.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import comboboxTranslations from './combo-box';
import comboboxTranslations from './combo-box.js';

const translations = {
...comboboxTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/zh-hant/color-dialog.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/color-dialog.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import dialogTranslations from './dialog';
import dialogTranslations from './dialog.js';

const translations = {
...dialogTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/zh-hant/tree-select.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/tree-select.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import comboboxTranslations from './combo-box';
import comboboxTranslations from './combo-box.js';

const translations = {
...comboboxTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/zh/color-dialog.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/color-dialog.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import dialogTranslations from './dialog';
import dialogTranslations from './dialog.js';

const translations = {
...dialogTranslations,
Expand Down
2 changes: 1 addition & 1 deletion packages/phrasebook/src/locale/zh/tree-select.ts
@@ -1,7 +1,7 @@
// Component docs https://elf.int.refinitiv.com/elements/tree-select.html
import { Phrasebook } from '../../translation.js';
import './shared.js';
import comboboxTranslations from './combo-box';
import comboboxTranslations from './combo-box.js';

const translations = {
...comboboxTranslations,
Expand Down
4 changes: 2 additions & 2 deletions packages/translate/src/test/test-inherited.ts
Expand Up @@ -7,9 +7,9 @@ import { query } from '@refinitiv-ui/core/decorators/query.js';
import {
translate,
TranslateDirective
} from '../translate';
} from '../translate.js';

import { TestTranslate } from './test-translate';
import { TestTranslate } from './test-translate.js';

@customElement('test-inherited', { theme: false })
export class TestInherited extends TestTranslate {
Expand Down
6 changes: 3 additions & 3 deletions packages/translate/src/test/test-promise.ts
Expand Up @@ -13,10 +13,10 @@ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
import {
translate,
TranslatePromise
} from '../translate';
} from '../translate.js';

import './test-nested-translate';
import './phrasebook';
import './test-nested-translate.js';
import './phrasebook.js';

@customElement('test-promise', { theme: false })
export class TestPromise extends BasicElement {
Expand Down
6 changes: 3 additions & 3 deletions packages/translate/src/test/test-translate.ts
Expand Up @@ -15,10 +15,10 @@ import { property } from '@refinitiv-ui/core/decorators/property.js';
import {
translate,
TranslateDirective
} from '../translate';
} from '../translate.js';

import './test-nested-translate';
import './phrasebook';
import './test-nested-translate.js';
import './phrasebook.js';

const date = new Date(2020, 6, 21, 23, 59, 50); /* just a random date */

Expand Down

0 comments on commit 6003ddc

Please sign in to comment.