Skip to content

Commit

Permalink
fix gts
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pircher <[email protected]>
  • Loading branch information
patricklx committed Mar 15, 2024
1 parent e70e7b5 commit 9a44b69
Show file tree
Hide file tree
Showing 48 changed files with 200 additions and 594 deletions.
4 changes: 3 additions & 1 deletion carbon-components-ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@gavant/glint-template-types": "^0.3.3",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/node": "^18.15.2",
"broccoli-sass-source-maps": "^4.1.0",
Expand Down Expand Up @@ -97,6 +98,7 @@
"prettier-linter-helpers": "^1.0.0",
"rollup-plugin-astroturf": "^0.1.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-root-import": "^1.0.0",
"spark-md5": "^3.0.1",
"synckit": "^0.8.5",
"ts-node": "^10.9.1",
Expand Down Expand Up @@ -277,7 +279,7 @@
},
"./components/*": {
"types": "./declarations/*.d.ts",
"default": "./dist/components/*/index.js"
"default": "./dist/components/*.js"
},
"./*": {
"types": "./declarations/*.d.ts",
Expand Down
8 changes: 7 additions & 1 deletion carbon-components-ember/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { babel } from '@rollup/plugin-babel';
import copy from 'rollup-plugin-copy';
import { Addon } from '@embroider/addon-dev/rollup';
import resolve from '@rollup/plugin-node-resolve';
import astroturf from 'rollup-plugin-astroturf';
import postcss from 'rollup-plugin-postcss';
import rootImport from 'rollup-plugin-root-import';

const addon = new Addon({
srcDir: 'src',
Expand Down Expand Up @@ -51,6 +51,12 @@ export default {
babelHelpers: 'bundled',
}),

rootImport({
// Will first look in `client/src/*` and then `common/src/*`.
root: `${__dirname}/src`,
useInput: 'prepend',
}),

// Ensure that standalone .hbs files are properly integrated as Javascript.
addon.hbs(),

Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/accordion.gts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { guidFor } from '@ember/object/internals';
import { WithBoundArgs } from '@glint/template';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import or from '#∼/helpers/or.ts';
import or from '/helpers/or.ts';

interface AccordionSignature {
Args: {
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/breadcrumbs.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';
import { action } from '@ember/object';
import eq from 'ember-truth-helpers/helpers/eq';
import { on } from '@ember/modifier';
Expand Down Expand Up @@ -29,7 +29,7 @@ export interface BreadcrumbSignature {
The Carbon Breadcrumb
```handlebars
{{import Breadcrumbs from '#∼/components/breadcrumbs.ts'}}
{{import Breadcrumbs from '/components/breadcrumbs.ts'}}
<Button @onClick={{fn this.onclick}} @danger={{false}} > Button Text </Button>
```
Expand Down
14 changes: 7 additions & 7 deletions carbon-components-ember/src/components/button.gts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Component from '@glimmer/component';
import { bxClassNames, classPrefix, defaultArgs } from '#∼/utils/decorators.ts';
import DialogManagerService from '#∼/services/dialog-manager.js';
import { bxClassNames, classPrefix, defaultArgs } from '/utils/decorators.ts';
import DialogManagerService from '/services/dialog-manager.js';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import ConfirmDialogComponent from '#∼/components/dialogs/confirm.gts';
import or from '#∼/helpers/or.ts';
import Confirm from '#∼/components/dialogs/confirm.gts';
import Loading from '#∼/components/loading.gts';
import ConfirmDialogComponent from '/components/dialogs/confirm.gts';
import or from '/helpers/or.ts';
import Confirm from '/components/dialogs/confirm.gts';
import Loading from '/components/loading.gts';
import { stylesheet } from 'astroturf';

/** @documenter yuidoc */
Expand Down Expand Up @@ -95,7 +95,7 @@ export interface ButtonSignature {
The Carbon Button
```handlebars
{{import Button from '#∼/components/button.ts'}}
{{import Button from '/components/button.ts'}}
<Button @onClick={{fn this.onclick}} @danger={{false}} > Button Text </Button>
```
Expand Down
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 Component from '@glimmer/component';
import CarbonChart from '../../charts/-components/chart.gts';
import { ScaleTypes } from '@carbon/charts';
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 '/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 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 { throttle } from '@ember/runloop';
import { defaultArgs } from '#∼/utils/decorators.ts';
import { defaultArgs } from '/utils/decorators.ts';
import { Chart } from '@carbon/charts';
import { AxisChartOptions, BaseChartOptions } from '@carbon/charts';
import CarbonChartTabularData from '#∼/components/charts/-components/tabular-data.gts'
import CarbonChartTabularData from '/components/charts/-components/tabular-data.gts'
import { WithBoundArgs } from '@glint/template';
import ChartAxis from '#∼/components/charts/-components/axis.gts'
import ChartAxis from '/components/charts/-components/axis.gts'


/** @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 '/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'

type Args = {
numberOfVariants?: number;
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'

type Args = {
name: string;
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 '/components/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, {
ChartData,
} from '#∼/components/charts/-components/chart.gts'
} from '/components/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 { CarbonChartSignature } from './-components/chart.gts';

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

type Args = {
resizable?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/checkbox.gts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import { defaultArgs } from '#∼/utils/decorators.ts';
import { defaultArgs } from '/utils/decorators.ts';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';
import set from '#∼/helpers/set.ts';
import set from '/helpers/set.ts';

type Args = {
name?: string;
Expand Down
8 changes: 4 additions & 4 deletions carbon-components-ember/src/components/code-snippet.gts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { defaultArgs } from '#∼/utils/decorators.ts';
import CopyButton from '#∼/components/copy-button.gts'
import { defaultArgs } from '/utils/decorators.ts';
import CopyButton from '/components/copy-button.gts'
import { concat, fn } from '@ember/helper';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import eq from 'ember-truth-helpers/helpers/eq';
import { on } from '@ember/modifier';
import set from '#∼/helpers/set.ts';
import set from '/helpers/set.ts';
import not from 'ember-truth-helpers/helpers/not';
import htmlSafe from '#∼/helpers/html-safe.ts';
import htmlSafe from '/helpers/html-safe.ts';
import { TemplateOnlyComponent } from '@ember/component/template-only';

type Args = {
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/copy-button.gts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import EmberTooltip from 'ember-tooltips/components/ember-tooltip';
import Button from '#∼/components/button.gts'
import or from '#∼/helpers/or.ts';
import Button from '/components/button.gts'
import or from '/helpers/or.ts';

type Args = {
targetElementId?: string;
Expand Down
18 changes: 9 additions & 9 deletions carbon-components-ember/src/components/data-table.gts
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ import { default as didInsert } from '@ember/render-modifiers/modifiers/did-inse
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { defaultArgs } from '#∼/utils/decorators.ts';
import { defaultArgs } from '/utils/decorators.ts';
import { A } from '@ember/array';
import MutableArray from '@ember/array/mutable';
import { task } from 'ember-concurrency';
import { next } from '@ember/runloop';
import TableToolbarComponent from '#∼/components/data-table/-toolbar.gts';
import TableSearchComponent from '#∼/components/data-table/-search-input.gts';
import CarbonPagination from '#∼/components/pagination.gts';
import TableComponent from '#∼/components/data-table/-table.gts';
import DataTableBody from '#∼/components/data-table/-body.gts';
import TableMenuComponent from '#∼/components/data-table/-menu.gts';
import TableColumn from '#∼/components/data-table/-column.gts';
import TableToolbarComponent from '/components/data-table/-toolbar.gts';
import TableSearchComponent from '/components/data-table/-search-input.gts';
import CarbonPagination from '/components/pagination.gts';
import TableComponent from '/components/data-table/-table.gts';
import DataTableBody from '/components/data-table/-body.gts';
import TableMenuComponent from '/components/data-table/-menu.gts';
import TableColumn from '/components/data-table/-column.gts';
import { WithBoundArgs } from '@glint/template';
import ListHeaderComponent, {
Header,
} from '#∼/components/data-table/-header.gts';
} from '/components/data-table/-header.gts';

class TrackedSet {
@tracked counter = 0;
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 { 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
10 changes: 5 additions & 5 deletions carbon-components-ember/src/components/data-table/-header.gts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { default as Button } from '#∼/components/button.gts'
import { default as Checkbox } from '#∼/components/checkbox.gts'
import { default as Icon } from '#∼/components/icon.gts'
import { default as set } from '#∼/helpers/set.ts';
import { default as Button } from '/components/button.gts'
import { default as Checkbox } from '/components/checkbox.gts'
import { default as Icon } from '/components/icon.gts'
import { default as set } from '/helpers/set.ts';
import { fn } from '@ember/helper';
import Component from '@glimmer/component';
import DataTableComponent from '#∼/components/data-table/index.gts'
import DataTableComponent from '/components/data-table/index.gts'

export type Header = {
sortable?: boolean;
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 '/components/menu.gts'
import Component from '@glimmer/component';
import MenuItemComponent from '#∼/components/menu/-item.gts'
import MenuItemComponent from '/components/menu/-item.gts'

export interface TableMenuComponentSignature {
Blocks: {
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 '/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 { 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 '/components/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 '/components/search-input.gts';
import { default as Loading } from '/components/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 '/components/data-table/-toolbar/-content.gts'
import TableActionsComponent from '/components/data-table/-toolbar/-actions.gts'
import { WithBoundArgs } from '@glint/template';
import DataTableComponent from '#∼/components/data-table.gts'
import DataTableComponent from '/components/data-table.gts'
import { hash } from '@ember/helper';

export interface Signature {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { default as set } from '#∼/helpers/set.ts';
import { default as getFn } from '#∼/helpers/get-fn.ts';
import { default as Button } from '#∼/components/button.gts'
import { default as set } from '/helpers/set.ts';
import { default as getFn } from '/helpers/get-fn.ts';
import { default as Button } from '/components/button.gts'
import { fn } from '@ember/helper';
import Component from '@glimmer/component';
import Table from '../../index';
Expand Down
4 changes: 2 additions & 2 deletions carbon-components-ember/src/components/dialogs/confirm.gts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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 '/components/modal.gts'
import { on } from '@ember/modifier';

type Args = {
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/form-input.gts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { default as defaultTo } from '#∼/helpers/default-to.ts';
import { default as defaultTo } from '/helpers/default-to.ts';
import { on } from '@ember/modifier';
import Component from '@glimmer/component';
import { guidFor } from '@ember/object/internals';
Expand Down
Loading

0 comments on commit 9a44b69

Please sign in to comment.