Skip to content

fix(components): add missing template registries #2954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sour-needles-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hashicorp/design-system-components': patch
---

Upgraded: `@nullvoxpopuli/ember-composable-helpers` from 5.2.10 to 5.2.11
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"pnpm": {
"overrides": {
"ember-composable-helpers": "npm:@nullvoxpopuli/ember-composable-helpers@^5.2.10"
"ember-composable-helpers": "npm:@nullvoxpopuli/ember-composable-helpers@^5.2.11"
},
"patchedDependencies": {
"@embroider/core": "patches/@embroider__core.patch",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@hashicorp/design-system-tokens": "workspace:^2.3.0",
"@hashicorp/flight-icons": "workspace:^3.11.0",
"@lezer/highlight": "^1.2.1",
"@nullvoxpopuli/ember-composable-helpers": "^5.2.10",
"@nullvoxpopuli/ember-composable-helpers": "^5.2.11",
"clipboard-polyfill": "^4.1.1",
"codemirror-lang-hcl": "^0.0.0-beta.2",
"decorator-transforms": "^2.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
we yield the Tr/Td/Th elements _and_ the record itself as `data`
this means the consumer will *have to* use the `data` key to access it in their template
-------------------------------------------------------------------------------------------- }}
{{! @glint-expect-error: [HDS-4380](https://hashicorp.atlassian.net/browse/HDS-4380) }}
{{#each (sort-by this.getSortCriteria this._tableModel.rows) key=this.identityKey as |record index|}}
{{#if this._tableModel.hasRowsWithChildren}}
<Hds::AdvancedTable::ExpandableTrGroup
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/components/hds/table/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
we yield the Tr/Td/Th elements _and_ the record itself as `data`
this means the consumer will *have to* use the `data` key to access it in their template
-------------------------------------------------------------------------------------------- }}
{{! @glint-expect-error: [HDS-4380](https://hashicorp.atlassian.net/browse/HDS-4380) }}
{{#each (sort-by this.getSortCriteria @model) key=this.identityKey as |record index|}}
{{yield
(hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type PowerSelectRegistry from 'ember-power-select/template-registry';
import type { EmbroiderUtilRegistry } from '@embroider/util';
// eslint-disable-next-line ember/no-at-ember-render-modifiers
import type RenderModifiersRegistry from '@ember/render-modifiers/template-registry';
import type EmberComposableHelpersRegistry from '@nullvoxpopuli/ember-composable-helpers/template-registry';

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry
Expand All @@ -22,15 +23,10 @@ declare module '@glint/environment-ember-loose/registry' {
EmberTruthRegistry,
PowerSelectRegistry,
RenderModifiersRegistry,
EmberComposableHelpersRegistry,
EmbroiderUtilRegistry /*, other addon registries */ {
// local entries
Portal: typeof Portal;
PortalTarget: typeof PortalTarget;
'sort-by': HelperLike<{
Args: {
Positional: [string[], unknown[]];
};
Return: unknown[];
}>;
}
}
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion showcase/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import type PageTitle from 'ember-page-title/template-registry';
// eslint-disable-next-line ember/no-at-ember-render-modifiers
import type RenderModifiersRegistry from '@ember/render-modifiers/template-registry';
import type ShowcaseTemplateRegistry from './template-registry';
import type EmberComposableHelpersRegistry from '@nullvoxpopuli/ember-composable-helpers/template-registry';
import type { HelperLike } from '@glint/template';

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry
Expand All @@ -21,5 +23,14 @@ declare module '@glint/environment-ember-loose/registry' {
HdsComponentsRegistry,
PageTitle,
RenderModifiersRegistry,
ShowcaseTemplateRegistry {}
ShowcaseTemplateRegistry,
EmberComposableHelpersRegistry {
// TODO: `ember-cli-string-helpers` is deprecated and doesn't provide own types, we need to move to `@ember/string` [HDS-4973](https://hashicorp.atlassian.net/browse/HDS-4973)
capitalize: HelperLike<{
Args: {
Positional: [string];
};
Return: string;
}>;
}
}