Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pircher <[email protected]>
  • Loading branch information
patricklx committed Jul 7, 2024
1 parent 18e78bb commit cdeff5c
Show file tree
Hide file tree
Showing 38 changed files with 83 additions and 82 deletions.
1 change: 0 additions & 1 deletion carbon-components-ember/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
plugins: ['ember'],
extends: ['plugin:ember/recommended', 'plugin:prettier/recommended'],
globals: {
WithRequired: true,
'ensure-safe-component': true
},
env: {
Expand Down
2 changes: 2 additions & 0 deletions carbon-components-ember/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ declare module '@ember/service' {
declare global {
interface Array<T> extends Ember.ArrayPrototypeExtensions<T> {}
}

type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { default as onUpdate } from '../-helpers/on-update.ts';
import { default as toBool } from '../-helpers/to-bool.ts';
import { default as newObj } from '/helpers/new-obj.ts';
import { default as newObj } from '../../../helpers/new-obj.ts';
import CarbonChart from '../../charts/-components/chart.gts';
import { ScaleTypes } from '@carbon/charts';
import { fn } from '@ember/helper';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { default as TabularData } from '/components/charts/-components/tabular-data.gts';
import { default as Axis } from '/components/charts/-components/axis.gts';
import { default as ColorPairing } from '/components/charts/-components/color/pairing.gts';
import { default as ColorScale } from '/components/charts/-components/color/scale.gts';
import { default as TabularData } from '../../charts/-components/tabular-data.gts';
import { default as Axis } from '../../charts/-components/axis.gts';
import { default as ColorPairing } from '../../charts/-components/color/pairing.gts';
import { default as ColorScale } from '../../charts/-components/color/scale.gts';
import { default as didInsert } from '@ember/render-modifiers/modifiers/did-insert';
import { default as didUpdate } from '@ember/render-modifiers/modifiers/did-update';
import { default as willDestroy } from '@ember/render-modifiers/modifiers/will-destroy';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { throttleTask } from 'ember-lifeline';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../../../utils/decorators.ts';
import { Chart, type ScaleTypes } from '@carbon/charts';
import { type AxisChartOptions, type BaseChartOptions } from '@carbon/charts';
import CarbonChartTabularData from '/components/charts/-components/tabular-data.gts';
import CarbonChartTabularData from '../../charts/-components/tabular-data.gts';
import { type WithBoundArgs } from '@glint/template';
import ChartAxis from '/components/charts/-components/axis.gts';
import ChartAxis from '../../charts/-components/axis.gts';
import { hash } from '@ember/helper';

/** @documenter yuidoc */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as onUpdate } from '/components/charts/-helpers/on-update.ts';
import { default as onUpdate } from '../../../charts/-helpers/on-update.ts';
import Component from '@glimmer/component';
import { defaultArgs } from '/utils/decorators.ts';
import CarbonChart from '/components/charts/-components/chart.gts';
import { defaultArgs } from '../../../../utils/decorators.ts';
import CarbonChart from '../../../charts/-components/chart.gts';
import { fn, hash } from '@ember/helper';

type Args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as onUpdate } from '/components/charts/-helpers/on-update.ts';
import { default as onUpdate } from '../../../../components/charts/-helpers/on-update.ts';
import Component from '@glimmer/component';
import { defaultArgs } from '/utils/decorators.ts';
import CarbonChart from '/components/charts/-components/chart.gts';
import { defaultArgs } from '../../../../utils/decorators.ts';
import CarbonChart from '../../../../components/charts/-components/chart.gts';
import { fn } from '@ember/helper';

type Args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { default as onUpdate } from '/components/charts/-helpers/on-update.ts';
import { default as onUpdate } from '../../charts/-helpers/on-update.ts';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../../../utils/decorators.ts';
import CarbonChart, {
type ChartData,
} from '/components/charts/-components/chart.gts';
} from '../../charts/-components/chart.gts';

type Args = {
backgroundColors?: string[];
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/charts/bar.gts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as Chart } from './-components/chart.gts';
import { SimpleBarChart } from '@carbon/charts';
import Component from '@glimmer/component';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../../utils/decorators.ts';
import { type CarbonChartSignature } from './-components/chart.gts';

/** @documenter yuidoc */
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/charts/pie.gts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { default as Chart } from './-components/chart.gts';
import { PieChart } from '@carbon/charts';
import Component from '@glimmer/component';
import { defaultArgs } from '/utils/decorators.ts';
import { type CarbonChartSignature } from '/components/charts/-components/chart.gts';
import { defaultArgs } from '../../utils/decorators.ts';
import { type CarbonChartSignature } from '../../components/charts/-components/chart.gts';

type Args = {
resizable?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/data-table/-body.gts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { default as ListRow } from './-row.gts';
import Component from '@glimmer/component';
import DataTableComponent from '/components/data-table.gts';
import DataTableComponent from '../../components/data-table.gts';
import { type WithBoundArgs } from '@glint/template';
import DataTableRow from '/components/data-table/-row.gts';
import DataTableRow from '../../components/data-table/-row.gts';
import { hash } from '@ember/helper';

type Args<T> = {
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/data-table/-header.gts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { default as Button } from '/components/button.gts';
import { default as Checkbox } from '/components/checkbox.gts';
import { default as Button } from '../button.gts';
import { default as Checkbox } from '../checkbox.gts';
import Component from '@glimmer/component';
import type DataTableComponent from '../data-table.gts';

Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/data-table/-menu.gts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { default as Menu } from '/components/menu.gts';
import { default as Menu } from '../menu.gts';
import Component from '@glimmer/component';
import MenuItemComponent from '/components/menu/-item.gts';
import MenuItemComponent from '../menu/-item.gts';
import type { WithBoundArgs } from '@glint/template';

export interface TableMenuComponentSignature {
Expand Down
10 changes: 5 additions & 5 deletions carbon-components-ember/src/components/data-table/-row.gts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { default as Button } from '/components/button.gts';
import { default as Checkbox } from '/components/checkbox.gts';
import { default as set } from '/helpers/set.ts';
import { default as has } from '/helpers/has.ts';
import { default as Button } from '../button.gts';
import { default as Checkbox } from '../checkbox.gts';
import { default as set } from '../../helpers/set.ts';
import { default as has } from '../../helpers/has.ts';
import { fn } from '@ember/helper';
import { default as not } from 'ember-truth-helpers/helpers/not';
import Component from '@glimmer/component';
import DataTableComponent from '/components/data-table.gts';
import DataTableComponent from '../data-table.gts';
import { tracked } from '@glimmer/tracking';

type Args<T> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { default as SearchInput } from '/components/search-input.gts';
import { default as Loading } from '/components/loading.gts';
import { default as SearchInput } from '../search-input.gts';
import { default as Loading } from '../loading.gts';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Component from '@glimmer/component';
import TableToolbarContentComponent from '/components/data-table/-toolbar/-content.gts';
import TableActionsComponent from '/components/data-table/-toolbar/-actions.gts';
import TableToolbarContentComponent from '../data-table/-toolbar/-content.gts';
import TableActionsComponent from '../data-table/-toolbar/-actions.gts';
import { type WithBoundArgs } from '@glint/template';
import DataTableComponent from '/components/data-table.gts';
import DataTableComponent from '../data-table.gts';
import { hash } from '@ember/helper';

export interface Signature {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { default as getFn } from '/helpers/get-fn.ts';
import { default as Button } from '/components/button.gts';
import { default as getFn } from '../../../helpers/get-fn.ts';
import { default as Button } from '../../button.gts';
import { fn } from '@ember/helper';
import { hash } from '@ember/helper';
import Component from '@glimmer/component';
Expand Down
6 changes: 3 additions & 3 deletions carbon-components-ember/src/components/dialogs/confirm.gts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { inject as service } from '@ember/service';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import defaultTo from '/helpers/default-to.ts';
import Modal from '/components/modal.gts';
import defaultTo from '../../helpers/default-to.ts';
import Modal from '../modal.gts';
import { on } from '@ember/modifier';
import type DialogManagerService from '/services/dialog-manager';
import type DialogManagerService from '../../services/dialog-manager';

type Args = {
onAccept: () => void;
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/icon.gts
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ class CarbonIcon extends Component<Args> {
};
if (this.args.danger) {
this.dialogManager.open(
this.args.confirmDialog || '/components/dialogs/confirm.gts',
this.args.confirmDialog || 'carbon-components-ember/components/dialogs/confirm.gts',
{
type: 'danger',
header: 'Danger',
Expand Down
12 changes: 6 additions & 6 deletions carbon-components-ember/src/components/list.gts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import SearchComponent from '/components/search-input.gts';
import SearchComponent from '../components/search-input.gts';
import { type WithBoundArgs } from '@glint/template';
import CarbonPagination from '/components/pagination.gts';
import ListColumnComponent from '/components/list/-column.gts';
import ListBodyComponent from '/components/list/-body.gts';
import ListHeaderComponent from '/components/list/-header.gts';
import CarbonPagination from '../components/pagination.gts';
import ListColumnComponent from '../components/list/-column.gts';
import ListBodyComponent from '../components/list/-body.gts';
import ListHeaderComponent from '../components/list/-header.gts';
import { stylesheet } from 'astroturf';
import ListSkeletonComponent from '/components/list/-skeleton.gts';
import ListSkeletonComponent from '../components/list/-skeleton.gts';

type Args<T> = {
items?: T[];
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/list/-body.gts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as ListRow } from './-row.gts';
import Component from '@glimmer/component';
import { type WithBoundArgs } from '@glint/template';
import ListRowComponent from '/components/list/-row.gts';
import ListRowComponent from '../../components/list/-row.gts';
import { hash } from '@ember/helper';

type Args = {
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/list/-row.gts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { default as Icon } from '/components/icon.gts';
import { default as Icon } from '../../components/icon.gts';
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';
import { default as eq } from 'ember-truth-helpers/helpers/eq';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import ListComponent from '/components/list.gts';
import ListComponent from '../../components/list.gts';

type Args<T> = {
onSelect?(item: any): void;
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/loading.gts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Component from '@glimmer/component';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../utils/decorators.ts';

type Args = {
active?: boolean;
Expand Down
6 changes: 3 additions & 3 deletions carbon-components-ember/src/components/menu.gts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Component from '@glimmer/component';
import Icon, { type IconNames } from '/components/icon.gts';
import MenuItemComponent from '/components/menu/-item.gts';
import Icon, { type IconNames } from '../components/icon.gts';
import MenuItemComponent from '../components/menu/-item.gts';
import BasicDropdown from 'ember-basic-dropdown/components/basic-dropdown';
import defaultTo from '/helpers/default-to.ts';
import defaultTo from '../helpers/default-to.ts';
import { on } from '@ember/modifier';
import EmberTooltip from 'ember-tooltips/components/ember-tooltip';
import type { WithBoundArgs } from '@glint/template';
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/modal.gts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Component from '@glimmer/component';
import { action } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import { cached, tracked } from '@glimmer/tracking';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../utils/decorators.ts';
import { on } from '@ember/modifier';

/** @documenter yuidoc */
Expand Down
8 changes: 4 additions & 4 deletions carbon-components-ember/src/components/notification.gts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';
import { default as eq } from 'ember-truth-helpers/helpers/eq';
import { default as Icon } from '/components/icon.gts';
import { default as Icon } from '../components/icon.gts';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import NotificationService, {
type NotificationOptions,
} from '/services/notifications.ts';
} from '../services/notifications.ts';
import { service } from '@ember/service';
import { tracked } from '@glimmer/tracking';
import { type IconNames } from '/components/icon.gts';
import { type IconNames } from '../components/icon.gts';

type Args = {
onClick: null | ((args: never) => never);
onClick?: ((args: never) => never);
notification?: NotificationOptions;
} & NotificationOptions;

Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/pagination.gts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { default as Select } from './select.gts';
import { default as Icon } from './icon.gts';
import { default as defaultTo } from '/helpers/default-to.ts';
import { default as defaultTo } from '../helpers/default-to.ts';
import { default as range } from 'ember-composable-helpers/helpers/range';
import { default as eq } from 'ember-truth-helpers/helpers/eq';
import { default as didInsert } from '@ember/render-modifiers/modifiers/did-insert';
Expand All @@ -11,7 +11,7 @@ import { default as or } from 'ember-truth-helpers/helpers/or';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../utils/decorators.ts';
import { stylesheet } from 'astroturf';
import { runTask } from 'ember-lifeline';
/** @documenter yuidoc */
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/progress-bar.gts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from '@glimmer/component';
import { guidFor } from '@ember/object/internals';
import Icon from '/components/icon.gts';
import Icon from '../components/icon.gts';
import eq from 'ember-truth-helpers/helpers/eq';
import { htmlSafe } from '@ember/template';
import { concat } from '@ember/helper';
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/radio.gts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from '@glimmer/component';
import { guidFor } from '@ember/object/internals';
import RadioButtonGroup from '/components/radio/group.gts';
import RadioButtonGroup from '../components/radio/group.gts';
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';

Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/radio/group.gts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Component from '@glimmer/component';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../../utils/decorators.ts';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { type WithBoundArgs } from '@glint/template';
import RadioButton from '/components/radio.gts';
import RadioButton from '../../components/radio.gts';

interface Signature {
Args: {
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/search-input.gts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { task } from 'ember-concurrency';
import { timeout, type TaskInstance } from 'ember-concurrency';
import didUpdate from '@ember/render-modifiers/modifiers/did-update';
import { fn } from '@ember/helper';
import Icon from '/components/icon.gts';
import Icon from '../components/icon.gts';
import { on } from '@ember/modifier';
import { runTask } from 'ember-lifeline';

Expand Down
6 changes: 3 additions & 3 deletions carbon-components-ember/src/components/select.gts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Component from '@glimmer/component';
import { set, action } from '@ember/object';
import { isBlank } from '@ember/utils';
import { defaultArgs } from '/utils/decorators.ts';
import { defaultArgs } from '../utils/decorators.ts';
import PowerSelect, {
type PowerSelectArgs,
} from 'ember-power-select/components/power-select';
import { type ContentValue } from '@glint/template';
import PowerSelectMultiple from 'ember-power-select/components/power-select-multiple';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import defaultTo from '/helpers/default-to.ts';
import Checkbox from '/components/checkbox.gts';
import defaultTo from '../helpers/default-to.ts';
import Checkbox from '../components/checkbox.gts';
import isSelected from 'ember-power-select/helpers/ember-power-select-is-equal';

type Args<T extends ContentValue> = {
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/tabs.gts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { on } from '@ember/modifier';
import { registerDestructor } from '@ember/destroyable';
import { type WithBoundArgs } from '@glint/template';
import { action } from '@ember/object';
import or from '/helpers/or.ts';
import or from '../helpers/or.ts';
import didResize from 'ember-resize-modifier/modifiers/did-resize';
import { A, type NativeArray } from '@ember/array';
import { runTask } from 'ember-lifeline';
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/tile.gts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { action } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';
import Icon from '/components/icon.gts';
import set from '/helpers/set.ts';
import Icon from '../components/icon.gts';
import set from '../helpers/set.ts';
import not from 'ember-truth-helpers/helpers/not';

type Args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { default as Icon } from '/components/icon.gts';
import { default as Icon } from '../../components/icon.gts';
import { default as not } from 'ember-truth-helpers/helpers/not';
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';
Expand Down
Loading

0 comments on commit cdeff5c

Please sign in to comment.