@cratis/scene.blueprint.components 4.1.1 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -22
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.d.ts +0 -2
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.d.ts.map +0 -1
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.js +0 -58
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.js.map +0 -1
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.d.ts +0 -2
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.d.ts.map +0 -1
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.js +0 -26
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.js.map +0 -1
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.d.ts +0 -2
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.d.ts.map +0 -1
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.js +0 -65
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.js.map +0 -1
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.d.ts +0 -2
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.d.ts.map +0 -1
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.js +0 -41
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.js.map +0 -1
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts +0 -2
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts.map +0 -1
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js +0 -38
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts +0 -2
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js +0 -47
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.d.ts +0 -2
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.d.ts.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.js +0 -56
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.js.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.d.ts +0 -2
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.d.ts.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.js +0 -31
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.js.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.d.ts +0 -2
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.d.ts.map +0 -1
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.js +0 -54
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.js.map +0 -1
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.d.ts +0 -2
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.d.ts.map +0 -1
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.js +0 -27
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.js.map +0 -1
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.d.ts +0 -2
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.d.ts.map +0 -1
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.js +0 -18
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.js.map +0 -1
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.d.ts +0 -2
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.d.ts.map +0 -1
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.js +0 -26
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.js.map +0 -1
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.d.ts +0 -2
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.d.ts.map +0 -1
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.js +0 -25
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.js.map +0 -1
- package/for_ArcPageHeader/when_rendering_a_gallery_screen.tsx +0 -86
- package/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.ts +0 -41
- package/for_componentsBlueprint/when_resolving_its_dependencies.ts +0 -93
- package/for_componentsBlueprint/when_validating_the_bundle.ts +0 -55
- package/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.ts +0 -56
- package/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.ts +0 -66
- package/for_componentsScreenTemplates/when_following_the_nesting_chain.ts +0 -83
- package/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.ts +0 -51
- package/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.ts +0 -72
- package/for_deriveArcHeading/when_no_binding_is_named.ts +0 -42
- package/for_deriveArcHeading/when_the_binding_is_not_registered.ts +0 -25
- package/for_deriveArcHeading/when_the_binding_is_registered.ts +0 -35
- package/for_humanizeBindingName/when_reading_a_proxy_name.ts +0 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/scene.blueprint.components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "A blueprint of Arc-bound screen and dialog templates: full pages built from Cratis Components composites, so a data list, a command form or a master-detail screen is a template rather than something you assemble.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cratis",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
26
|
"**/*.ts",
|
|
27
|
-
"**/*.tsx"
|
|
27
|
+
"**/*.tsx",
|
|
28
|
+
"!**/for_*/**"
|
|
28
29
|
],
|
|
29
30
|
"main": "dist/cjs/index.js",
|
|
30
31
|
"module": "dist/esm/index.js",
|
|
@@ -50,30 +51,30 @@
|
|
|
50
51
|
"build-storybook": "storybook build"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"@cratis/components": "^4.
|
|
54
|
-
"@cratis/scene.blueprint.default": "4.
|
|
55
|
-
"@cratis/scene.components": "4.
|
|
56
|
-
"@cratis/scene.engine": "4.
|
|
57
|
-
"@cratis/scene.model": "4.
|
|
58
|
-
"@cratis/scene.react": "4.
|
|
54
|
+
"@cratis/components": "^4.21.1",
|
|
55
|
+
"@cratis/scene.blueprint.default": "4.2.1",
|
|
56
|
+
"@cratis/scene.components": "4.2.1",
|
|
57
|
+
"@cratis/scene.engine": "4.2.1",
|
|
58
|
+
"@cratis/scene.model": "4.2.1",
|
|
59
|
+
"@cratis/scene.react": "4.2.1"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
|
-
"@cratis/components": "^4.
|
|
62
|
-
"@cratis/scene.blueprint.default": "4.
|
|
63
|
-
"@cratis/scene.components": "4.
|
|
64
|
-
"@cratis/scene.engine": "4.
|
|
65
|
-
"@cratis/scene.model": "4.
|
|
66
|
-
"@cratis/scene.react": "4.
|
|
67
|
-
"@primereact/core": "11.
|
|
68
|
-
"@primereact/headless": "11.
|
|
69
|
-
"@storybook/addon-links": "^10.6.
|
|
70
|
-
"@storybook/react": "^10.6.
|
|
71
|
-
"@storybook/react-vite": "^10.6.
|
|
72
|
-
"primeicons": "8.0.
|
|
73
|
-
"primereact": "11.
|
|
62
|
+
"@cratis/components": "^4.21.1",
|
|
63
|
+
"@cratis/scene.blueprint.default": "4.2.1",
|
|
64
|
+
"@cratis/scene.components": "4.2.1",
|
|
65
|
+
"@cratis/scene.engine": "4.2.1",
|
|
66
|
+
"@cratis/scene.model": "4.2.1",
|
|
67
|
+
"@cratis/scene.react": "4.2.1",
|
|
68
|
+
"@primereact/core": "11.2.0",
|
|
69
|
+
"@primereact/headless": "11.2.0",
|
|
70
|
+
"@storybook/addon-links": "^10.6.1",
|
|
71
|
+
"@storybook/react": "^10.6.1",
|
|
72
|
+
"@storybook/react-vite": "^10.6.1",
|
|
73
|
+
"primeicons": "8.0.2",
|
|
74
|
+
"primereact": "11.2.0",
|
|
74
75
|
"react": "^19.3.0",
|
|
75
76
|
"react-dom": "^19.3.0",
|
|
76
|
-
"storybook": "^10.6.
|
|
77
|
+
"storybook": "^10.6.1"
|
|
77
78
|
},
|
|
78
79
|
"peerDependencies": {
|
|
79
80
|
"@cratis/components": "^4.1.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_rendering_a_gallery_screen.d.ts","sourceRoot":"","sources":["../../../for_ArcPageHeader/when_rendering_a_gallery_screen.tsx"],"names":[],"mappings":""}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import { PrimeReactProvider } from '@primereact/core';
|
|
4
|
-
import { SceneElementView } from '@cratis/scene.react';
|
|
5
|
-
import { clearBindings, registerQuery } from '@cratis/scene.components';
|
|
6
|
-
import { composeScreenElement, resolveElementComponentNames } from '@cratis/scene.blueprint.default';
|
|
7
|
-
import { componentsBlueprintCatalog, componentsBlueprintProfile, componentsGalleryScreen, componentsPreviewRegistry } from '../gallery';
|
|
8
|
-
import { SampleBindingName, arcPageHeader } from '../templates';
|
|
9
|
-
class AllInvoices {
|
|
10
|
-
}
|
|
11
|
-
function renderElement(element) {
|
|
12
|
-
render(_jsx(PrimeReactProvider, { children: _jsx(SceneElementView, { element: resolveElementComponentNames(element, componentsBlueprintProfile, componentsBlueprintCatalog), registry: componentsPreviewRegistry, resolveBinding: () => undefined }) }));
|
|
13
|
-
}
|
|
14
|
-
function has(selector) {
|
|
15
|
-
return document.querySelector(selector) !== null;
|
|
16
|
-
}
|
|
17
|
-
describe('when rendering a gallery screen', () => {
|
|
18
|
-
describe('and nothing is registered', () => {
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
clearBindings();
|
|
21
|
-
renderElement(composeScreenElement(componentsGalleryScreen('DataListPage')));
|
|
22
|
-
});
|
|
23
|
-
afterEach(() => clearBindings());
|
|
24
|
-
it('should render inside the shell the blueprint it depends on provides', () => {
|
|
25
|
-
has('.layout-topbar').should.equal(true);
|
|
26
|
-
});
|
|
27
|
-
it('should render the page header this blueprint contributes', () => {
|
|
28
|
-
has('.layout-page-header').should.equal(true);
|
|
29
|
-
});
|
|
30
|
-
it('should render the trail derived from the section and the title', () => {
|
|
31
|
-
screen.getAllByLabelText('Breadcrumb').some(element => element.textContent === 'Billing › Invoices').should.equal(true);
|
|
32
|
-
});
|
|
33
|
-
it('should say which query a host still has to register', () => {
|
|
34
|
-
screen.getAllByText('No query registered as AllInvoices').length.should.be.greaterThan(0);
|
|
35
|
-
});
|
|
36
|
-
it('should render the unbound data page as a placeholder naming the binding it wanted', () => {
|
|
37
|
-
screen.getAllByText("Unresolved query binding 'AllInvoices' on Cratis.Components:dataPage").length.should.be.greaterThan(0);
|
|
38
|
-
});
|
|
39
|
-
it('should render no unresolved-component fallback, because every name the page writes resolves', () => {
|
|
40
|
-
has('[data-scene-unresolved-component]').should.equal(false);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
describe('and the header binding is registered', () => {
|
|
44
|
-
beforeEach(() => {
|
|
45
|
-
clearBindings();
|
|
46
|
-
registerQuery(SampleBindingName.AllInvoices, AllInvoices);
|
|
47
|
-
renderElement(arcPageHeader('bound-header', { title: 'Invoices', section: 'Billing', query: SampleBindingName.AllInvoices }));
|
|
48
|
-
});
|
|
49
|
-
afterEach(() => clearBindings());
|
|
50
|
-
it('should report the binding as resolved rather than missing', () => {
|
|
51
|
-
screen.getAllByText('Bound to query AllInvoices').length.should.be.greaterThan(0);
|
|
52
|
-
});
|
|
53
|
-
it('should mark the header as bound, so a preview can be scanned for what is still unwired', () => {
|
|
54
|
-
has('[data-scene-binding-state="bound"]').should.equal(true);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=when_rendering_a_gallery_screen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_rendering_a_gallery_screen.js","sourceRoot":"","sources":["../../../for_ArcPageHeader/when_rendering_a_gallery_screen.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AACrG,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACxI,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,WAAW;CAAG;AAMpB,SAAS,aAAa,CAAC,OAAqB;IACxC,MAAM,CACF,KAAC,kBAAkB,cACf,KAAC,gBAAgB,IACb,OAAO,EAAE,4BA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0 @@
|
|
|
1
|
-
{"version":3,"file":"when_checking_the_names_against_the_packages_that_declare_them.d.ts","sourceRoot":"","sources":["../../../for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.ts"],"names":[],"mappings":""}
|
package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { cratisComponentsPackageManifest } from '@cratis/scene.components';
|
|
2
|
-
import { BorrowedComponentName } from '../BorrowedComponentName';
|
|
3
|
-
import { CompositeName } from '../CompositeName';
|
|
4
|
-
import { primeReactComponentNames } from '../gallery';
|
|
5
|
-
describe('when checking the names against the packages that declare them', () => {
|
|
6
|
-
const declaredByTheLibrary = new Set(cratisComponentsPackageManifest.components);
|
|
7
|
-
it('should have composite names to check', () => {
|
|
8
|
-
Object.values(CompositeName).should.not.be.empty;
|
|
9
|
-
});
|
|
10
|
-
it('should reference only composites the component library declares', () => {
|
|
11
|
-
Object.values(CompositeName)
|
|
12
|
-
.filter(name => !declaredByTheLibrary.has(name))
|
|
13
|
-
.should.be.empty;
|
|
14
|
-
});
|
|
15
|
-
it('should borrow only names PrimeReact declares', () => {
|
|
16
|
-
Object.values(BorrowedComponentName)
|
|
17
|
-
.filter(name => !primeReactComponentNames.includes(name))
|
|
18
|
-
.should.be.empty;
|
|
19
|
-
});
|
|
20
|
-
it('should borrow nothing the component library already declares, since the library would win the bare name anyway', () => {
|
|
21
|
-
Object.values(BorrowedComponentName)
|
|
22
|
-
.filter(name => declaredByTheLibrary.has(name))
|
|
23
|
-
.should.be.empty;
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=when_checking_the_names_against_the_packages_that_declare_them.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_checking_the_names_against_the_packages_that_declare_them.js","sourceRoot":"","sources":["../../../for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.ts"],"names":[],"mappings":"AAGA,OAAO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ACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_resolving_its_dependencies.d.ts","sourceRoot":"","sources":["../../../for_componentsBlueprint/when_resolving_its_dependencies.ts"],"names":[],"mappings":""}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { PackageKind } from '@cratis/scene.model';
|
|
2
|
-
import { isPackageSelectionValid, resolvePackageDependencies } from '@cratis/scene.engine';
|
|
3
|
-
import { cratisComponentsPackageManifest } from '@cratis/scene.components';
|
|
4
|
-
import { defaultBlueprintManifest } from '@cratis/scene.blueprint.default';
|
|
5
|
-
import { componentsBlueprintManifest } from '../componentsBlueprint';
|
|
6
|
-
import { componentsBlueprintName } from '../packageName';
|
|
7
|
-
const tailwind = {
|
|
8
|
-
name: 'Tailwind',
|
|
9
|
-
version: '4.3.3',
|
|
10
|
-
kind: PackageKind.Styling,
|
|
11
|
-
dependencies: [],
|
|
12
|
-
components: [],
|
|
13
|
-
layouts: [],
|
|
14
|
-
screenTemplates: [],
|
|
15
|
-
dialogTemplates: [],
|
|
16
|
-
themes: [],
|
|
17
|
-
};
|
|
18
|
-
const primeReact = {
|
|
19
|
-
name: 'PrimeReact',
|
|
20
|
-
version: '11.1.0',
|
|
21
|
-
kind: PackageKind.ComponentLibrary,
|
|
22
|
-
dependencies: [{ name: 'Tailwind' }],
|
|
23
|
-
components: ['column', 'table', 'dialog'],
|
|
24
|
-
layouts: [],
|
|
25
|
-
screenTemplates: [],
|
|
26
|
-
dialogTemplates: [],
|
|
27
|
-
themes: [],
|
|
28
|
-
};
|
|
29
|
-
describe('when resolving its dependencies', () => {
|
|
30
|
-
const catalog = [tailwind, primeReact, cratisComponentsPackageManifest, defaultBlueprintManifest, componentsBlueprintManifest];
|
|
31
|
-
const selection = resolvePackageDependencies([componentsBlueprintName], catalog);
|
|
32
|
-
const positionOf = (name) => selection.packages.indexOf(name);
|
|
33
|
-
it('should be a valid selection', () => {
|
|
34
|
-
isPackageSelectionValid(selection).should.be.true;
|
|
35
|
-
});
|
|
36
|
-
it('should order the blueprint it layers on before it', () => {
|
|
37
|
-
positionOf('Cratis.Blueprint.Default').should.be.lessThan(positionOf(componentsBlueprintName));
|
|
38
|
-
});
|
|
39
|
-
it('should order the component library its templates are built from before it', () => {
|
|
40
|
-
positionOf('Cratis.Components').should.be.lessThan(positionOf(componentsBlueprintName));
|
|
41
|
-
});
|
|
42
|
-
it('should pull in the packages its own dependencies need, transitively', () => {
|
|
43
|
-
selection.added.should.contain('PrimeReact');
|
|
44
|
-
selection.added.should.contain('Tailwind');
|
|
45
|
-
});
|
|
46
|
-
it('should report nothing missing', () => {
|
|
47
|
-
selection.missing.should.deep.equal([]);
|
|
48
|
-
});
|
|
49
|
-
it('should report no version conflict', () => {
|
|
50
|
-
selection.versionConflicts.should.deep.equal([]);
|
|
51
|
-
});
|
|
52
|
-
it('should report no cycle, even though both blueprints depend on the same library', () => {
|
|
53
|
-
selection.cycles.should.deep.equal([]);
|
|
54
|
-
});
|
|
55
|
-
describe('and the default blueprint is not in the catalog', () => {
|
|
56
|
-
const withoutTheDefaultBlueprint = resolvePackageDependencies([componentsBlueprintName], [tailwind, primeReact, cratisComponentsPackageManifest, componentsBlueprintManifest]);
|
|
57
|
-
it('should report it missing rather than silently ordering around it', () => {
|
|
58
|
-
withoutTheDefaultBlueprint.missing.should.deep.equal([{ package: componentsBlueprintName, dependsOn: 'Cratis.Blueprint.Default' }]);
|
|
59
|
-
});
|
|
60
|
-
it('should not be a valid selection', () => {
|
|
61
|
-
isPackageSelectionValid(withoutTheDefaultBlueprint).should.be.false;
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
//# sourceMappingURL=when_resolving_its_dependencies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_resolving_its_dependencies.js","sourceRoot":"","sources":["../../../for_componentsBlueprint/when_resolving_its_dependencies.ts"],"names":[],"mappings":"AAGA,OAAO,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AC;IAEH,QAAQ,CAAC,iDAAiD,EAAE,GAAG,EAAE;QAC7D,MAAM,0BAA0B,GAAG,0BAA0B,CACzD,CAAC,uBAAuB,CAAC,EACzB,CAAC,QAAQ,EAAE,UAAU,EAAE,+BAA+B,EAAE,2BAA2B,CAAC,CACvF,CAAC;QAEF,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;YACxE,0BAA0B,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC;QACxI,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;YACvC,uBAAuB,CAAC,0BAA0B,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;QACxE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_validating_the_bundle.d.ts","sourceRoot":"","sources":["../../../for_componentsBlueprint/when_validating_the_bundle.ts"],"names":[],"mappings":""}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { PackageKind } from '@cratis/scene.model';
|
|
2
|
-
import { validatePackageBundle } from '@cratis/scene.react';
|
|
3
|
-
import { componentsBlueprint, componentsBlueprintManifest } from '../componentsBlueprint';
|
|
4
|
-
import { componentsBlueprintName } from '../packageName';
|
|
5
|
-
describe('when validating the bundle', () => {
|
|
6
|
-
const problems = validatePackageBundle(componentsBlueprint);
|
|
7
|
-
it('should report no problems', () => {
|
|
8
|
-
problems.should.be.empty;
|
|
9
|
-
});
|
|
10
|
-
it('should declare itself a blueprint', () => {
|
|
11
|
-
componentsBlueprintManifest.kind.should.equal(PackageKind.Blueprint);
|
|
12
|
-
});
|
|
13
|
-
it('should be named as a blueprint package', () => {
|
|
14
|
-
componentsBlueprintManifest.name.should.equal(componentsBlueprintName);
|
|
15
|
-
});
|
|
16
|
-
it('should depend on the blueprint it layers on and the library its templates are built from', () => {
|
|
17
|
-
componentsBlueprintManifest.dependencies.map(dependency => dependency.name).should.deep.equal(['Cratis.Blueprint.Default', 'Cratis.Components']);
|
|
18
|
-
});
|
|
19
|
-
it('should ship no layout of its own, because it reuses the default blueprint shell', () => {
|
|
20
|
-
componentsBlueprintManifest.layouts.should.be.empty;
|
|
21
|
-
});
|
|
22
|
-
it('should provide no layout either, so the manifest and the bundle agree about that', () => {
|
|
23
|
-
(componentsBlueprint.layouts ?? []).should.be.empty;
|
|
24
|
-
});
|
|
25
|
-
it('should ship no theme, because the shell it themes is not its own', () => {
|
|
26
|
-
componentsBlueprintManifest.themes.should.be.empty;
|
|
27
|
-
});
|
|
28
|
-
it('should declare a screen template for every one it provides', () => {
|
|
29
|
-
componentsBlueprintManifest.screenTemplates.should.deep.equal((componentsBlueprint.screenTemplates ?? []).map(template => template.name));
|
|
30
|
-
});
|
|
31
|
-
it('should declare a dialog template for every one it provides', () => {
|
|
32
|
-
componentsBlueprintManifest.dialogTemplates.should.deep.equal((componentsBlueprint.dialogTemplates ?? []).map(template => template.name));
|
|
33
|
-
});
|
|
34
|
-
it('should ship a gallery screen for every screen template', () => {
|
|
35
|
-
(componentsBlueprint.screens ?? []).map(screen => screen.name).should.deep.equal(componentsBlueprintManifest.screenTemplates);
|
|
36
|
-
});
|
|
37
|
-
it('should name the module a host imports it from', () => {
|
|
38
|
-
componentsBlueprintManifest.module.should.equal('@cratis/scene.blueprint.components');
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=when_validating_the_bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_validating_the_bundle.js","sourceRoot":"","sources":["../../../for_componentsBlueprint/when_validating_the_bundle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAA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_layouts_and_slots_they_fill.d.ts","sourceRoot":"","sources":["../../../for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.ts"],"names":[],"mappings":""}
|
package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defaultBlueprint, shellComponentForLayout } from '@cratis/scene.blueprint.default';
|
|
2
|
-
import { componentsBlueprint } from '../componentsBlueprint';
|
|
3
|
-
import { componentsGalleryScreens } from '../gallery';
|
|
4
|
-
describe('when checking the layouts and slots they fill', () => {
|
|
5
|
-
const layouts = defaultBlueprint.layouts ?? [];
|
|
6
|
-
const layoutsByName = new Map(layouts.map(layout => [layout.name, layout]));
|
|
7
|
-
const templateNames = (componentsBlueprint.screenTemplates ?? []).map(template => template.name);
|
|
8
|
-
it('should have at least one screen to check', () => {
|
|
9
|
-
componentsGalleryScreens.should.not.be.empty;
|
|
10
|
-
});
|
|
11
|
-
for (const screen of componentsGalleryScreens) {
|
|
12
|
-
describe(`and the screen is '${screen.name}'`, () => {
|
|
13
|
-
const layout = layoutsByName.get(screen.layout);
|
|
14
|
-
it('should name a layout the blueprint it depends on provides', () => {
|
|
15
|
-
(layout !== undefined).should.be.true;
|
|
16
|
-
});
|
|
17
|
-
it('should fill only slots that layout declares', () => {
|
|
18
|
-
const declared = new Set((layout?.slots ?? []).map(slot => slot.name));
|
|
19
|
-
Object.keys(screen.slotContent)
|
|
20
|
-
.filter(name => !declared.has(name))
|
|
21
|
-
.should.be.empty;
|
|
22
|
-
});
|
|
23
|
-
it('should fill the content slot, which is the only one every layout declares', () => {
|
|
24
|
-
(screen.slotContent.content?.length ?? 0).should.be.greaterThan(0);
|
|
25
|
-
});
|
|
26
|
-
it('should name a screen template this blueprint provides', () => {
|
|
27
|
-
templateNames.should.contain(screen.screenTemplate);
|
|
28
|
-
});
|
|
29
|
-
it('should render in a shell the blueprint it depends on provides', () => {
|
|
30
|
-
(shellComponentForLayout(screen.layout) !== undefined).should.be.true;
|
|
31
|
-
});
|
|
32
|
-
it('should contribute its navigation, so the menu is the same on every screen', () => {
|
|
33
|
-
screen.contributions.should.not.be.empty;
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=when_checking_the_layouts_and_slots_they_fill.js.map
|
package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_checking_the_layouts_and_slots_they_fill.js","sourceRoot":"","sources":["../../../for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAQtD,QAAQ,CAAC,+CAA+C,EAAE,GAAG,EAAE;IAC3D,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,IAAI,EAAE,CAAC;IAC/C,MAAM,aAAa,GAAG,IAAI,GAAG,CAAiB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5F,MAAM,aAAa,GAAG,CAAC,mBAAmB,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjG,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,wBAAwB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,KAAK,MAAM,MAAM,IAAI,wBAAwB,EAAE,CAAC;QAC5C,QAAQ,CAAC,s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AEH,EAAE,CAAC,2EAA2E,EAAE,GAAG,EAAE;gBACjF,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;YAC7C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_checking_that_arrangements_reference_declared_slots.d.ts","sourceRoot":"","sources":["../../../for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.ts"],"names":[],"mappings":""}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { componentsDialogTemplates, componentsScreenTemplates } from '../templates';
|
|
2
|
-
function slotNamesIn(node) {
|
|
3
|
-
if ('slotName' in node) {
|
|
4
|
-
return [node.slotName];
|
|
5
|
-
}
|
|
6
|
-
if ('children' in node) {
|
|
7
|
-
return node.children.flatMap(slotNamesIn);
|
|
8
|
-
}
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
function referencedSlots(arrangement) {
|
|
12
|
-
const flow = arrangement;
|
|
13
|
-
if (!flow?.root) {
|
|
14
|
-
return [];
|
|
15
|
-
}
|
|
16
|
-
return [flow.root, ...(flow.overrides ?? []).map(override => override.root)].flatMap(slotNamesIn);
|
|
17
|
-
}
|
|
18
|
-
function undeclared(slots, arrangement) {
|
|
19
|
-
const declared = new Set(slots.map(slot => slot.name));
|
|
20
|
-
return [...new Set(referencedSlots(arrangement))].filter(name => !declared.has(name));
|
|
21
|
-
}
|
|
22
|
-
describe('when checking that arrangements reference declared slots', () => {
|
|
23
|
-
for (const template of componentsScreenTemplates.filter(candidate => candidate.arrangement !== undefined)) {
|
|
24
|
-
it(`should reference only slots the '${template.name}' template declares`, () => {
|
|
25
|
-
undeclared(template.slots, template.arrangement).should.be.empty;
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
for (const template of componentsScreenTemplates) {
|
|
29
|
-
it(`should file '${template.name}' content only under slots it declares`, () => {
|
|
30
|
-
const declared = new Set(template.slots.map(slot => slot.name));
|
|
31
|
-
Object.keys(template.content ?? {}).filter(name => !declared.has(name)).should.be.empty;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
for (const template of componentsDialogTemplates) {
|
|
35
|
-
it(`should file '${template.name}' dialog content only under slots it declares`, () => {
|
|
36
|
-
const declared = new Set(template.slots.map(slot => slot.name));
|
|
37
|
-
Object.keys(template.content ?? {}).filter(name => !declared.has(name)).should.be.empty;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
it('should give every dialog template exactly one slot, since the composites own their own chrome', () => {
|
|
41
|
-
componentsDialogTemplates.filter(template => template.slots.length !== 1).should.be.empty;
|
|
42
|
-
});
|
|
43
|
-
it('should give no dialog template a fitsSlot, because an overlay occupies no slot', () => {
|
|
44
|
-
componentsDialogTemplates.filter(template => 'fitsSlot' in template).should.be.empty;
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=when_checking_that_arrangements_reference_declared_slots.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_checking_that_arrangements_reference_declared_slots.js","sourceRoot":"","sources":["../../../for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEpF,SAAS,WAAW,CAAC,IAAc;IAC/B,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACrB,OAAO,CAAE,IAA6B,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACrB,OAAQ,IAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC;AAED,SAAS,eAAe,CAAC,WAAoC;IACzD,MAAM,IAAI,GAAG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,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_following_the_nesting_chain.d.ts","sourceRoot":"","sources":["../../../for_componentsScreenTemplates/when_following_the_nesting_chain.ts"],"names":[],"mappings":""}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { isScreenTemplateResolutionValid, resolveScreenTemplates } from '@cratis/scene.engine';
|
|
2
|
-
import { appShellLayout } from '@cratis/scene.blueprint.default';
|
|
3
|
-
import { nestingChainTemplates } from '../templates';
|
|
4
|
-
describe('when following the nesting chain', () => {
|
|
5
|
-
const resolution = resolveScreenTemplates(appShellLayout, nestingChainTemplates);
|
|
6
|
-
const placementOf = (name) => resolution.placements.find(placement => placement.template === name);
|
|
7
|
-
it('should be a valid resolution', () => {
|
|
8
|
-
isScreenTemplateResolutionValid(resolution).should.be.true;
|
|
9
|
-
});
|
|
10
|
-
it('should place all three levels', () => {
|
|
11
|
-
resolution.placements.should.have.lengthOf(3);
|
|
12
|
-
});
|
|
13
|
-
it('should leave nothing unplaced', () => {
|
|
14
|
-
resolution.unplaced.should.be.empty;
|
|
15
|
-
});
|
|
16
|
-
describe('and it is the module level', () => {
|
|
17
|
-
const placement = placementOf('DataModulePage');
|
|
18
|
-
it('should sit directly inside the application layout', () => {
|
|
19
|
-
placement.container.should.equal(appShellLayout.name);
|
|
20
|
-
});
|
|
21
|
-
it('should fill the content slot', () => {
|
|
22
|
-
placement.slot.should.equal('content');
|
|
23
|
-
});
|
|
24
|
-
it('should be one level below the layout', () => {
|
|
25
|
-
placement.depth.should.equal(1);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
describe('and it is the feature level', () => {
|
|
29
|
-
const placement = placementOf('DataFeatureSection');
|
|
30
|
-
it('should sit inside the module template', () => {
|
|
31
|
-
placement.container.should.equal('DataModulePage');
|
|
32
|
-
});
|
|
33
|
-
it('should fill a slot the module template declares', () => {
|
|
34
|
-
placement.slot.should.equal('body');
|
|
35
|
-
});
|
|
36
|
-
it('should be two levels below the layout', () => {
|
|
37
|
-
placement.depth.should.equal(2);
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
describe('and it is the slice level', () => {
|
|
41
|
-
const placement = placementOf('CommandSliceSection');
|
|
42
|
-
it('should sit inside the feature template', () => {
|
|
43
|
-
placement.container.should.equal('DataFeatureSection');
|
|
44
|
-
});
|
|
45
|
-
it('should fill a slot the feature template declares', () => {
|
|
46
|
-
placement.slot.should.equal('primary');
|
|
47
|
-
});
|
|
48
|
-
it('should be three levels below the layout', () => {
|
|
49
|
-
placement.depth.should.equal(3);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
it('should order the placements shallowest first, so a caller can build the tree top down', () => {
|
|
53
|
-
resolution.placements.map(placement => placement.depth).should.deep.equal([1, 2, 3]);
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
//# sourceMappingURL=when_following_the_nesting_chain.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_following_the_nesting_chain.js","sourceRoot":"","sources":["../../../for_componentsScreenTemplates/when_following_the_nesting_chain.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAUrD,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAC9C,MAAM,UAAU,GAAG,sBAAsB,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC;IACjF,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;IAE3G,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACpC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the_default_blueprint_layout.ts"],"names":[],"mappings":""}
|
package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { resolveScreenTemplates } from '@cratis/scene.engine';
|
|
2
|
-
import { appShellLayout, defaultBlueprint } from '@cratis/scene.blueprint.default';
|
|
3
|
-
import { componentsPageTemplates } from '../templates';
|
|
4
|
-
describe('when placing them in the default blueprint layout', () => {
|
|
5
|
-
const templates = [...(defaultBlueprint.screenTemplates ?? []), ...componentsPageTemplates];
|
|
6
|
-
const resolution = resolveScreenTemplates(appShellLayout, templates);
|
|
7
|
-
const ownNames = new Set(componentsPageTemplates.map(template => template.name));
|
|
8
|
-
const ownPlacements = resolution.placements.filter(placement => ownNames.has(placement.template));
|
|
9
|
-
it('should have templates to place', () => {
|
|
10
|
-
componentsPageTemplates.should.not.be.empty;
|
|
11
|
-
});
|
|
12
|
-
it('should place every one of them', () => {
|
|
13
|
-
ownPlacements.map(placement => placement.template).sort().should.deep.equal([...ownNames].sort());
|
|
14
|
-
});
|
|
15
|
-
it('should leave none of them unplaced, even with the other blueprint templates in scope', () => {
|
|
16
|
-
resolution.unplaced.filter(unplaced => ownNames.has(unplaced.template)).should.be.empty;
|
|
17
|
-
});
|
|
18
|
-
it('should place every one directly inside the layout rather than inside another template', () => {
|
|
19
|
-
ownPlacements.filter(placement => placement.container !== appShellLayout.name).should.be.empty;
|
|
20
|
-
});
|
|
21
|
-
it('should place every one at the first level below the layout', () => {
|
|
22
|
-
ownPlacements.filter(placement => placement.depth !== 1).should.be.empty;
|
|
23
|
-
});
|
|
24
|
-
it('should place every one in the content slot, which is the only region a layout offers a screen', () => {
|
|
25
|
-
ownPlacements.filter(placement => placement.slot !== 'content').should.be.empty;
|
|
26
|
-
});
|
|
27
|
-
it('should introduce no nesting cycle', () => {
|
|
28
|
-
resolution.cycles.should.deep.equal([]);
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=when_placing_them_in_the_default_blueprint_layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_placing_them_in_the_default_blueprint_layout.js","sourceRoot":"","sources":["../../../for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAYvD,QAAQ,CAAC,mDAAmD,EAAE,GAAG,EAAE;IAC/D,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE,GAAG,uBAAuB,CAAC,CAAC;IAC5F,MAAM,UAAU,GAAG,sBAAsB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACjF,MAAM,aAAa,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAElG,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACtC,uBAAuB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACtC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sFAAsF,EAAE,GAAG,EAAE;QAC5F,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;IAC5F,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uFAAuF,EAAE,GAAG,EAAE;QAC7F,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,SAAS,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;IACnG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QAClE,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+FAA+F,EAAE,GAAG,EAAE;QACrG,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;IACpF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QACzC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_resolving_the_component_names_they_reference.d.ts","sourceRoot":"","sources":["../../../for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.ts"],"names":[],"mappings":""}
|