@ngx-formbar/core 0.11.0
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/LICENSE +21 -0
- package/README.md +42 -0
- package/fesm2022/ngx-formbar-core.mjs +2429 -0
- package/fesm2022/ngx-formbar-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/form/ngxfb-form.component.d.ts +28 -0
- package/lib/composables/computed-value.d.ts +8 -0
- package/lib/composables/disabled.state.d.ts +36 -0
- package/lib/composables/dynamic-label.d.ts +9 -0
- package/lib/composables/dynamic-title.d.ts +9 -0
- package/lib/composables/hidden.state.d.ts +68 -0
- package/lib/composables/readonly.state.d.ts +19 -0
- package/lib/composables/testId.d.ts +16 -0
- package/lib/composables/update-strategy.d.ts +20 -0
- package/lib/composables/validators.d.ts +22 -0
- package/lib/config/config.d.ts +7 -0
- package/lib/config/provide-formbar.d.ts +38 -0
- package/lib/directives/ngxfb-abstract-control.directive.d.ts +53 -0
- package/lib/directives/ngxfb-block.directive.d.ts +124 -0
- package/lib/directives/ngxfb-control.directive.d.ts +203 -0
- package/lib/directives/ngxfb-group.directive.d.ts +253 -0
- package/lib/helper/control-container-view-providers.d.ts +33 -0
- package/lib/index.d.ts +23 -0
- package/lib/services/component-registration.service.d.ts +8 -0
- package/lib/services/configuration.service.d.ts +8 -0
- package/lib/services/expression.service.d.ts +148 -0
- package/lib/services/form.service.d.ts +10 -0
- package/lib/services/validator-registration.service.d.ts +10 -0
- package/lib/tokens/component-registrations.d.ts +2 -0
- package/lib/tokens/component-resolver.d.ts +3 -0
- package/lib/tokens/default-update-strategy.d.ts +3 -0
- package/lib/tokens/global-config.d.ts +5 -0
- package/lib/tokens/validator-registrations.d.ts +8 -0
- package/lib/tokens/validator-resolver.d.ts +3 -0
- package/lib/types/component-resolver.type.d.ts +4 -0
- package/lib/types/content.type.d.ts +137 -0
- package/lib/types/expression.type.d.ts +2 -0
- package/lib/types/form.type.d.ts +4 -0
- package/lib/types/functions.type.d.ts +4 -0
- package/lib/types/global-configuration.type.d.ts +4 -0
- package/lib/types/provide.type.d.ts +42 -0
- package/lib/types/registration.type.d.ts +18 -0
- package/lib/types/validation.type.d.ts +59 -0
- package/lib/types/validator-resolver.type.d.ts +6 -0
- package/package.json +52 -0
- package/public-api.d.ts +1 -0
- package/schematics/block/files/__componentName@dasherize__.component.html.template +1 -0
- package/schematics/block/files/__componentName@dasherize__.component.ts.template +29 -0
- package/schematics/block/files/__interfaceName@dasherize__.type.ts.template +6 -0
- package/schematics/block/index.d.ts +3 -0
- package/schematics/block/index.js +11 -0
- package/schematics/block/index.js.map +1 -0
- package/schematics/block/schema.json +62 -0
- package/schematics/collection.json +31 -0
- package/schematics/control/files/__componentName@dasherize__.component.html.template +0 -0
- package/schematics/control/files/__componentName@dasherize__.component.ts.template +29 -0
- package/schematics/control/files/__interfaceName@dasherize__.type.ts.template +6 -0
- package/schematics/control/index.d.ts +3 -0
- package/schematics/control/index.js +11 -0
- package/schematics/control/index.js.map +1 -0
- package/schematics/control/schema.json +61 -0
- package/schematics/group/files/__componentName@dasherize__.component.html.template +5 -0
- package/schematics/group/files/__componentName@dasherize__.component.ts.template +29 -0
- package/schematics/group/files/__interfaceName@dasherize__.type.ts.template +5 -0
- package/schematics/group/index.d.ts +3 -0
- package/schematics/group/index.js +11 -0
- package/schematics/group/index.js.map +1 -0
- package/schematics/group/schema.json +62 -0
- package/schematics/ng-add/files/config-registrations/async-validator-registrations.ts.template +4 -0
- package/schematics/ng-add/files/config-registrations/component-registrations.ts.template +4 -0
- package/schematics/ng-add/files/config-registrations/index.ts.template +3 -0
- package/schematics/ng-add/files/config-registrations/validator-registrations.ts.template +4 -0
- package/schematics/ng-add/files/helper/block.host-directive.ts.template +6 -0
- package/schematics/ng-add/files/helper/control.host-directive.ts.template +6 -0
- package/schematics/ng-add/files/helper/group.host-directive.ts.template +6 -0
- package/schematics/ng-add/files/helper/index.ts.template +4 -0
- package/schematics/ng-add/files/helper/view-provider.ts.template +9 -0
- package/schematics/ng-add/files/provider-config/config/__providerConfigFileName__.ts.template +9 -0
- package/schematics/ng-add/files/provider-config/inline/__providerConfigFileName__.ts.template +8 -0
- package/schematics/ng-add/files/provider-config/token/__providerConfigFileName__.ts.template +4 -0
- package/schematics/ng-add/files/schematics-config/__schematicConfigFileName__.json.template +1 -0
- package/schematics/ng-add/files/token-registrations/async-validator-registrations.ts.template +8 -0
- package/schematics/ng-add/files/token-registrations/component-registrations.ts.template +8 -0
- package/schematics/ng-add/files/token-registrations/index.ts.template +3 -0
- package/schematics/ng-add/files/token-registrations/validator-registrations.ts.template +8 -0
- package/schematics/ng-add/helper.d.ts +11 -0
- package/schematics/ng-add/helper.js +198 -0
- package/schematics/ng-add/helper.js.map +1 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +68 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/rules/create-config-registration-files.rule.d.ts +3 -0
- package/schematics/ng-add/rules/create-config-registration-files.rule.js +32 -0
- package/schematics/ng-add/rules/create-config-registration-files.rule.js.map +1 -0
- package/schematics/ng-add/rules/create-formbar-registration-config.rule.d.ts +3 -0
- package/schematics/ng-add/rules/create-formbar-registration-config.rule.js +30 -0
- package/schematics/ng-add/rules/create-formbar-registration-config.rule.js.map +1 -0
- package/schematics/ng-add/rules/create-helper-files.rule.d.ts +6 -0
- package/schematics/ng-add/rules/create-helper-files.rule.js +22 -0
- package/schematics/ng-add/rules/create-helper-files.rule.js.map +1 -0
- package/schematics/ng-add/rules/create-schematics-config.rule.d.ts +3 -0
- package/schematics/ng-add/rules/create-schematics-config.rule.js +42 -0
- package/schematics/ng-add/rules/create-schematics-config.rule.js.map +1 -0
- package/schematics/ng-add/rules/create-token-registration-files.rule.d.ts +3 -0
- package/schematics/ng-add/rules/create-token-registration-files.rule.js +32 -0
- package/schematics/ng-add/rules/create-token-registration-files.rule.js.map +1 -0
- package/schematics/ng-add/rules/include-templates.rule.d.ts +3 -0
- package/schematics/ng-add/rules/include-templates.rule.js +11 -0
- package/schematics/ng-add/rules/include-templates.rule.js.map +1 -0
- package/schematics/ng-add/rules/install-dependencies.rule.d.ts +2 -0
- package/schematics/ng-add/rules/install-dependencies.rule.js +12 -0
- package/schematics/ng-add/rules/install-dependencies.rule.js.map +1 -0
- package/schematics/ng-add/rules/update-app-config.rule.d.ts +3 -0
- package/schematics/ng-add/rules/update-app-config.rule.js +48 -0
- package/schematics/ng-add/rules/update-app-config.rule.js.map +1 -0
- package/schematics/ng-add/rules/update-schematics-config.rule.d.ts +6 -0
- package/schematics/ng-add/rules/update-schematics-config.rule.js +28 -0
- package/schematics/ng-add/rules/update-schematics-config.rule.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +23 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +81 -0
- package/schematics/register/component-info.type.d.ts +11 -0
- package/schematics/register/component-info.type.js +3 -0
- package/schematics/register/component-info.type.js.map +1 -0
- package/schematics/register/discover-components.d.ts +19 -0
- package/schematics/register/discover-components.js +267 -0
- package/schematics/register/discover-components.js.map +1 -0
- package/schematics/register/index.d.ts +3 -0
- package/schematics/register/index.js +49 -0
- package/schematics/register/index.js.map +1 -0
- package/schematics/register/register-components.d.ts +3 -0
- package/schematics/register/register-components.js +38 -0
- package/schematics/register/register-components.js.map +1 -0
- package/schematics/register/schema.d.ts +14 -0
- package/schematics/register/schema.js +3 -0
- package/schematics/register/schema.js.map +1 -0
- package/schematics/register/schema.json +44 -0
- package/schematics/shared/ast/decorators.d.ts +9 -0
- package/schematics/shared/ast/decorators.js +182 -0
- package/schematics/shared/ast/decorators.js.map +1 -0
- package/schematics/shared/ast/imports.d.ts +3 -0
- package/schematics/shared/ast/imports.js +93 -0
- package/schematics/shared/ast/imports.js.map +1 -0
- package/schematics/shared/ast/parse.d.ts +3 -0
- package/schematics/shared/ast/parse.js +17 -0
- package/schematics/shared/ast/parse.js.map +1 -0
- package/schematics/shared/ast/registrations.d.ts +22 -0
- package/schematics/shared/ast/registrations.js +654 -0
- package/schematics/shared/ast/registrations.js.map +1 -0
- package/schematics/shared/ast/types.d.ts +3 -0
- package/schematics/shared/ast/types.js +58 -0
- package/schematics/shared/ast/types.js.map +1 -0
- package/schematics/shared/file.d.ts +4 -0
- package/schematics/shared/file.js +60 -0
- package/schematics/shared/file.js.map +1 -0
- package/schematics/shared/helper.d.ts +2 -0
- package/schematics/shared/helper.js +29 -0
- package/schematics/shared/helper.js.map +1 -0
- package/schematics/shared/rules/create-component.rule.d.ts +3 -0
- package/schematics/shared/rules/create-component.rule.js +15 -0
- package/schematics/shared/rules/create-component.rule.js.map +1 -0
- package/schematics/shared/rules/register-control.rule.d.ts +3 -0
- package/schematics/shared/rules/register-control.rule.js +30 -0
- package/schematics/shared/rules/register-control.rule.js.map +1 -0
- package/schematics/shared/rules/register-type-map.rule.d.ts +3 -0
- package/schematics/shared/rules/register-type-map.rule.js +46 -0
- package/schematics/shared/rules/register-type-map.rule.js.map +1 -0
- package/schematics/shared/rules/register-type-token.rule.d.ts +3 -0
- package/schematics/shared/rules/register-type-token.rule.js +49 -0
- package/schematics/shared/rules/register-type-token.rule.js.map +1 -0
- package/schematics/shared/rules/scaffold-and-register.rule.d.ts +3 -0
- package/schematics/shared/rules/scaffold-and-register.rule.js +134 -0
- package/schematics/shared/rules/scaffold-and-register.rule.js.map +1 -0
- package/schematics/shared/schema.d.ts +32 -0
- package/schematics/shared/schema.js +3 -0
- package/schematics/shared/schema.js.map +1 -0
- package/schematics/tests/generators.spec.d.ts +1 -0
- package/schematics/tests/generators.spec.js +450 -0
- package/schematics/tests/generators.spec.js.map +1 -0
- package/schematics/tests/helper.d.ts +20 -0
- package/schematics/tests/helper.js +275 -0
- package/schematics/tests/helper.js.map +1 -0
- package/schematics/tests/ng-add.spec.d.ts +1 -0
- package/schematics/tests/ng-add.spec.js +380 -0
- package/schematics/tests/ng-add.spec.js.map +1 -0
- package/schematics/tests/register.spec.d.ts +1 -0
- package/schematics/tests/register.spec.js +340 -0
- package/schematics/tests/register.spec.js.map +1 -0
- package/schematics/tests/workspace-setup.d.ts +21 -0
- package/schematics/tests/workspace-setup.js +255 -0
- package/schematics/tests/workspace-setup.js.map +1 -0
- package/shared/ast.d.ts +10 -0
- package/shared/ast.js +93 -0
- package/shared/ast.js.map +1 -0
- package/shared/constants.d.ts +16 -0
- package/shared/constants.js +20 -0
- package/shared/constants.js.map +1 -0
- package/shared/shared-config.type.d.ts +20 -0
- package/shared/shared-config.type.js +3 -0
- package/shared/shared-config.type.js.map +1 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const vitest_1 = require("vitest");
|
|
13
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
+
const workspace_setup_1 = require("./workspace-setup");
|
|
15
|
+
const helper_1 = require("./helper");
|
|
16
|
+
const find_module_1 = require("@schematics/angular/utility/find-module");
|
|
17
|
+
const parse_1 = require("../shared/ast/parse");
|
|
18
|
+
const imports_1 = require("../shared/ast/imports");
|
|
19
|
+
const decorators_1 = require("../shared/ast/decorators");
|
|
20
|
+
const types_1 = require("../shared/ast/types");
|
|
21
|
+
const registrations_1 = require("../shared/ast/registrations");
|
|
22
|
+
const constants_1 = require("../../shared/constants");
|
|
23
|
+
const appConfigPathRaw = 'app.config.ts';
|
|
24
|
+
const formbarConfigPath = 'app/formbar.config.ts';
|
|
25
|
+
const registrationsPath = 'app/registrations/component-registrations.ts';
|
|
26
|
+
const schematicsConfigPath = 'app/formbar.config.json';
|
|
27
|
+
(0, vitest_1.describe)('control schematic', () => {
|
|
28
|
+
let appTree;
|
|
29
|
+
let runner;
|
|
30
|
+
const baseOptions = {
|
|
31
|
+
project: 'test-app',
|
|
32
|
+
key: 'test',
|
|
33
|
+
};
|
|
34
|
+
const viewProviderHelperPath = 'app/shared/helper';
|
|
35
|
+
const viewProviderHelper = 'control-container.view-provider.ts#controlContainterViewProviders';
|
|
36
|
+
const viewProviderHelperPathOption = `${viewProviderHelperPath}/${viewProviderHelper}`;
|
|
37
|
+
const hostDirectiveHelperPath = 'app/shared/helper';
|
|
38
|
+
const hostDirectiveHelperFile = 'control.directive.ts#controlHost';
|
|
39
|
+
const hostDirectiveHelperPathOption = `${hostDirectiveHelperPath}/${hostDirectiveHelperFile}`;
|
|
40
|
+
const defaultComponentOutputPath = (0, helper_1.app)('test/test-control.component.ts');
|
|
41
|
+
const appConfigPath = (0, helper_1.app)(appConfigPathRaw);
|
|
42
|
+
function runSchematic(schematicName_1) {
|
|
43
|
+
return __awaiter(this, arguments, void 0, function* (schematicName, options = {}) {
|
|
44
|
+
return runner.runSchematic(schematicName, Object.assign(Object.assign({}, baseOptions), options), appTree);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
(0, vitest_1.beforeEach)(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
runner = new testing_1.SchematicTestRunner('schematics', workspace_setup_1.COLLECTION_PATH);
|
|
49
|
+
appTree = yield (0, workspace_setup_1.setupWorkspace)(runner);
|
|
50
|
+
}));
|
|
51
|
+
(0, vitest_1.describe)('generated file content', () => {
|
|
52
|
+
(0, vitest_1.beforeEach)(() => {
|
|
53
|
+
(0, workspace_setup_1.provideMapInlineNoSplit)(appTree, appConfigPathRaw);
|
|
54
|
+
});
|
|
55
|
+
(0, vitest_1.describe)('view provider helper', () => {
|
|
56
|
+
(0, vitest_1.it)('imports view providers from barrel export using default file name and identifier', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
+
(0, workspace_setup_1.addHelperIndexFile)(appTree, viewProviderHelperPath);
|
|
58
|
+
const tree = yield runSchematic('control', {
|
|
59
|
+
viewProviderHelperPath,
|
|
60
|
+
});
|
|
61
|
+
const parts = constants_1.DEFAULT_VIEW_PROVIDER_HELPER.split('#');
|
|
62
|
+
const identifier = parts[1];
|
|
63
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
64
|
+
const viewProviderImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(viewProviderHelperPath));
|
|
65
|
+
const importsViewProviderHelper = (0, imports_1.hasNamedImport)(sf, viewProviderImportPath, identifier);
|
|
66
|
+
const importsControlContainerFromAngular = (0, imports_1.hasNamedImport)(sf, '@angular/forms', 'ControlContainer');
|
|
67
|
+
const hasViewProviderInDecorator = (0, decorators_1.decoratorPropInitializerIsIdentifier)(sf, 'Component', 'viewProviders', identifier);
|
|
68
|
+
(0, vitest_1.expect)(importsViewProviderHelper).toBe(true);
|
|
69
|
+
(0, vitest_1.expect)(importsControlContainerFromAngular).toBe(false);
|
|
70
|
+
(0, vitest_1.expect)(hasViewProviderInDecorator).toBe(true);
|
|
71
|
+
}));
|
|
72
|
+
(0, vitest_1.it)('imports view providers from file using default file name and identifier', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
|
+
const tree = yield runSchematic('control', {
|
|
74
|
+
viewProviderHelperPath,
|
|
75
|
+
});
|
|
76
|
+
const parts = constants_1.DEFAULT_VIEW_PROVIDER_HELPER.split('#');
|
|
77
|
+
const fileName = parts[0].replace('.ts', '');
|
|
78
|
+
const identifier = parts[1];
|
|
79
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
80
|
+
const viewProviderImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(`${viewProviderHelperPath}/${fileName}`));
|
|
81
|
+
const importsViewProviderHelper = (0, imports_1.hasNamedImport)(sf, viewProviderImportPath, identifier);
|
|
82
|
+
const importsControlContainerFromAngular = (0, imports_1.hasNamedImport)(sf, '@angular/forms', 'ControlContainer');
|
|
83
|
+
const hasViewProviderInDecorator = (0, decorators_1.decoratorPropInitializerIsIdentifier)(sf, 'Component', 'viewProviders', identifier);
|
|
84
|
+
(0, vitest_1.expect)(importsViewProviderHelper).toBe(true);
|
|
85
|
+
(0, vitest_1.expect)(importsControlContainerFromAngular).toBe(false);
|
|
86
|
+
(0, vitest_1.expect)(hasViewProviderInDecorator).toBe(true);
|
|
87
|
+
}));
|
|
88
|
+
(0, vitest_1.it)('imports view providers from barrel export using identifier from option', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
89
|
+
(0, workspace_setup_1.addHelperIndexFile)(appTree, viewProviderHelperPath);
|
|
90
|
+
const tree = yield runSchematic('control', {
|
|
91
|
+
viewProviderHelperPath: viewProviderHelperPathOption,
|
|
92
|
+
});
|
|
93
|
+
const parts = viewProviderHelper.split('#');
|
|
94
|
+
const identifier = parts[1];
|
|
95
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
96
|
+
const viewProviderImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(viewProviderHelperPath));
|
|
97
|
+
const importsViewProviderHelper = (0, imports_1.hasNamedImport)(sf, viewProviderImportPath, identifier);
|
|
98
|
+
const importsControlContainerFromAngular = (0, imports_1.hasNamedImport)(sf, '@angular/forms', 'ControlContainer');
|
|
99
|
+
const hasViewProviderInDecorator = (0, decorators_1.decoratorPropInitializerIsIdentifier)(sf, 'Component', 'viewProviders', identifier);
|
|
100
|
+
(0, vitest_1.expect)(importsViewProviderHelper).toBe(true);
|
|
101
|
+
(0, vitest_1.expect)(importsControlContainerFromAngular).toBe(false);
|
|
102
|
+
(0, vitest_1.expect)(hasViewProviderInDecorator).toBe(true);
|
|
103
|
+
}));
|
|
104
|
+
(0, vitest_1.it)('imports view providers from barrel export using file name from option and default identifier', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
105
|
+
(0, workspace_setup_1.addHelperIndexFile)(appTree, viewProviderHelperPath);
|
|
106
|
+
const tree = yield runSchematic('control', {
|
|
107
|
+
viewProviderHelperPath: `${viewProviderHelperPath}/control-container.view-provider.ts`,
|
|
108
|
+
});
|
|
109
|
+
const parts = constants_1.DEFAULT_VIEW_PROVIDER_HELPER.split('#');
|
|
110
|
+
const identifier = parts[1];
|
|
111
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
112
|
+
const viewProviderImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(viewProviderHelperPath));
|
|
113
|
+
const importsViewProviderHelper = (0, imports_1.hasNamedImport)(sf, viewProviderImportPath, identifier);
|
|
114
|
+
const importsControlContainerFromAngular = (0, imports_1.hasNamedImport)(sf, '@angular/forms', 'ControlContainer');
|
|
115
|
+
const hasViewProviderInDecorator = (0, decorators_1.decoratorPropInitializerIsIdentifier)(sf, 'Component', 'viewProviders', identifier);
|
|
116
|
+
(0, vitest_1.expect)(importsViewProviderHelper).toBe(true);
|
|
117
|
+
(0, vitest_1.expect)(importsControlContainerFromAngular).toBe(false);
|
|
118
|
+
(0, vitest_1.expect)(hasViewProviderInDecorator).toBe(true);
|
|
119
|
+
}));
|
|
120
|
+
(0, vitest_1.it)('imports view providers from file using file name from option and default identifier', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
121
|
+
const tree = yield runSchematic('control', {
|
|
122
|
+
viewProviderHelperPath: viewProviderHelperPathOption,
|
|
123
|
+
});
|
|
124
|
+
const parts = viewProviderHelper.split('#');
|
|
125
|
+
const fileName = parts[0].replace('.ts', '');
|
|
126
|
+
const identifier = parts[1];
|
|
127
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
128
|
+
const viewProviderImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(`${viewProviderHelperPath}/${fileName}`));
|
|
129
|
+
const importsViewProviderHelper = (0, imports_1.hasNamedImport)(sf, viewProviderImportPath, identifier);
|
|
130
|
+
const importsControlContainerFromAngular = (0, imports_1.hasNamedImport)(sf, '@angular/forms', 'ControlContainer');
|
|
131
|
+
const hasViewProviderInDecorator = (0, decorators_1.decoratorPropInitializerIsIdentifier)(sf, 'Component', 'viewProviders', identifier);
|
|
132
|
+
(0, vitest_1.expect)(importsViewProviderHelper).toBe(true);
|
|
133
|
+
(0, vitest_1.expect)(importsControlContainerFromAngular).toBe(false);
|
|
134
|
+
(0, vitest_1.expect)(hasViewProviderInDecorator).toBe(true);
|
|
135
|
+
}));
|
|
136
|
+
});
|
|
137
|
+
(0, vitest_1.describe)('control host directive helper', () => {
|
|
138
|
+
(0, vitest_1.it)('imports host directive from barrel export using default file name and identifier', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
139
|
+
(0, workspace_setup_1.addHelperIndexFile)(appTree, hostDirectiveHelperPath);
|
|
140
|
+
const tree = yield runSchematic('control', {
|
|
141
|
+
hostDirectiveHelperPath,
|
|
142
|
+
});
|
|
143
|
+
const parts = constants_1.DEFAULT_CONTROL_HOST_PROVIDER_HELPER.split('#');
|
|
144
|
+
const identifier = parts[1];
|
|
145
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
146
|
+
const controlHostDirectiveImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(hostDirectiveHelperPath));
|
|
147
|
+
const importsControlHostDirectiveHelper = (0, imports_1.hasNamedImport)(sf, controlHostDirectiveImportPath, identifier);
|
|
148
|
+
const hasControlHostDirectiveInDecorator = (0, decorators_1.decoratorArrayPropContainsIdentifier)(sf, 'Component', 'hostDirectives', identifier);
|
|
149
|
+
(0, vitest_1.expect)(importsControlHostDirectiveHelper).toBe(true);
|
|
150
|
+
(0, vitest_1.expect)(hasControlHostDirectiveInDecorator).toBe(true);
|
|
151
|
+
}));
|
|
152
|
+
(0, vitest_1.it)('imports host directive from file using default file name and identifier', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
153
|
+
const tree = yield runSchematic('control', {
|
|
154
|
+
hostDirectiveHelperPath,
|
|
155
|
+
});
|
|
156
|
+
const parts = constants_1.DEFAULT_CONTROL_HOST_PROVIDER_HELPER.split('#');
|
|
157
|
+
const fileName = parts[0].replace('.ts', '');
|
|
158
|
+
const identifier = parts[1];
|
|
159
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
160
|
+
const controlHostDirectiveImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(`${hostDirectiveHelperPath}/${fileName}`));
|
|
161
|
+
const importsControlHostDirectiveHelper = (0, imports_1.hasNamedImport)(sf, controlHostDirectiveImportPath, identifier);
|
|
162
|
+
const hasControlHostDirectiveInDecorator = (0, decorators_1.decoratorArrayPropContainsIdentifier)(sf, 'Component', 'hostDirectives', identifier);
|
|
163
|
+
(0, vitest_1.expect)(importsControlHostDirectiveHelper).toBe(true);
|
|
164
|
+
(0, vitest_1.expect)(hasControlHostDirectiveInDecorator).toBe(true);
|
|
165
|
+
}));
|
|
166
|
+
(0, vitest_1.it)('imports host directive from barrel export using file name and identifier from option', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
167
|
+
(0, workspace_setup_1.addHelperIndexFile)(appTree, hostDirectiveHelperPath);
|
|
168
|
+
const tree = yield runSchematic('control', {
|
|
169
|
+
hostDirectiveHelperPath: hostDirectiveHelperPathOption,
|
|
170
|
+
});
|
|
171
|
+
const parts = hostDirectiveHelperFile.split('#');
|
|
172
|
+
const identifier = parts[1];
|
|
173
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
174
|
+
const controlHostDirectiveImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(hostDirectiveHelperPath));
|
|
175
|
+
const importsControlHostDirectiveHelper = (0, imports_1.hasNamedImport)(sf, controlHostDirectiveImportPath, identifier);
|
|
176
|
+
const hasControlHostDirectiveInDecorator = (0, decorators_1.decoratorArrayPropContainsIdentifier)(sf, 'Component', 'hostDirectives', identifier);
|
|
177
|
+
(0, vitest_1.expect)(importsControlHostDirectiveHelper).toBe(true);
|
|
178
|
+
(0, vitest_1.expect)(hasControlHostDirectiveInDecorator).toBe(true);
|
|
179
|
+
}));
|
|
180
|
+
(0, vitest_1.it)('imports host directive from file using file name from option and default identifier', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
181
|
+
const path = `${hostDirectiveHelperPath}/control.directive.ts`;
|
|
182
|
+
const tree = yield runSchematic('control', {
|
|
183
|
+
hostDirectiveHelperPath: path,
|
|
184
|
+
});
|
|
185
|
+
const parts = constants_1.DEFAULT_CONTROL_HOST_PROVIDER_HELPER.split('#');
|
|
186
|
+
const fileName = 'control.directive';
|
|
187
|
+
const identifier = parts[1];
|
|
188
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
189
|
+
const controlHostDirectiveImportPath = (0, find_module_1.buildRelativePath)(defaultComponentOutputPath, (0, helper_1.src)(`${hostDirectiveHelperPath}/${fileName}`));
|
|
190
|
+
const importsControlHostDirectiveHelper = (0, imports_1.hasNamedImport)(sf, controlHostDirectiveImportPath, identifier);
|
|
191
|
+
const hasControlHostDirectiveInDecorator = (0, decorators_1.decoratorArrayPropContainsIdentifier)(sf, 'Component', 'hostDirectives', identifier);
|
|
192
|
+
(0, vitest_1.expect)(importsControlHostDirectiveHelper).toBe(true);
|
|
193
|
+
(0, vitest_1.expect)(hasControlHostDirectiveInDecorator).toBe(true);
|
|
194
|
+
}));
|
|
195
|
+
(0, vitest_1.it)('falls back to inline providers and host directive when helpers are not provided', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
196
|
+
const tree = yield runSchematic('control');
|
|
197
|
+
const sf = (0, parse_1.parseTS)((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
198
|
+
console.log((0, helper_1.read)(tree, defaultComponentOutputPath));
|
|
199
|
+
const importsControlContainerFromAngular = (0, imports_1.hasNamedImport)(sf, '@angular/forms', 'ControlContainer');
|
|
200
|
+
const hasViewProvidersInDecorator = (0, decorators_1.decoratorArrayPropContainsProviderObject)(sf, 'Component', 'viewProviders', 'ControlContainer');
|
|
201
|
+
const importsDirective = (0, imports_1.hasNamedImport)(sf, '@ngx-formbar/core', 'NgxfbControlDirective');
|
|
202
|
+
const hasControlDirectiveInDecorator = (0, decorators_1.decoratorHostDirectivesHasInlineDirectiveWithInputs)(sf, 'NgxfbControlDirective', ['content', 'name']);
|
|
203
|
+
(0, vitest_1.expect)(importsControlContainerFromAngular).toBe(true);
|
|
204
|
+
(0, vitest_1.expect)(hasViewProvidersInDecorator).toBe(true);
|
|
205
|
+
(0, vitest_1.expect)(hasControlDirectiveInDecorator).toBe(true);
|
|
206
|
+
(0, vitest_1.expect)(importsDirective).toBe(true);
|
|
207
|
+
(0, vitest_1.expect)(hasControlDirectiveInDecorator).toBe(true);
|
|
208
|
+
}));
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
(0, vitest_1.describe)('without configuration', () => {
|
|
212
|
+
(0, vitest_1.it)('creates a control with passed values (name, key, path, suffixes)', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
213
|
+
(0, workspace_setup_1.provideMapInlineNoSplit)(appTree, appConfigPathRaw);
|
|
214
|
+
const options = {
|
|
215
|
+
project: 'test-app',
|
|
216
|
+
name: 'profile',
|
|
217
|
+
key: 'user',
|
|
218
|
+
path: 'app/features/account',
|
|
219
|
+
interfaceSuffix: 'Field',
|
|
220
|
+
componentSuffix: 'Widget',
|
|
221
|
+
};
|
|
222
|
+
const tree = yield runSchematic('control', options);
|
|
223
|
+
const baseDir = (0, helper_1.app)('features/account/profile');
|
|
224
|
+
const componentFilePath = `${baseDir}/profile-widget.component.ts`;
|
|
225
|
+
const typeFilePath = `${baseDir}/profile-field.type.ts`;
|
|
226
|
+
const componentSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, componentFilePath));
|
|
227
|
+
const typeSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, typeFilePath));
|
|
228
|
+
const hasClass = (0, types_1.classDeclarationExists)(componentSf, 'ProfileWidgetComponent');
|
|
229
|
+
const hasSelector = (0, decorators_1.componentSelectorEquals)(componentSf, 'app-profile-widget');
|
|
230
|
+
const importsInterfaceWithCorrectPath = (0, imports_1.importForSymbolUsesCorrectRelativePath)(componentSf, componentFilePath, 'ProfileField', typeFilePath);
|
|
231
|
+
const interfaceHasType = (0, types_1.interfaceHasTypeLiteral)(typeSf, 'ProfileField', 'user');
|
|
232
|
+
(0, vitest_1.expect)(hasClass).toBe(true);
|
|
233
|
+
(0, vitest_1.expect)(hasSelector).toBe(true);
|
|
234
|
+
(0, vitest_1.expect)(importsInterfaceWithCorrectPath).toBe(true);
|
|
235
|
+
(0, vitest_1.expect)(interfaceHasType).toBe(true);
|
|
236
|
+
}));
|
|
237
|
+
(0, vitest_1.it)('registers the created control with the token provider if registrations are split', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
238
|
+
(0, workspace_setup_1.provideToken)(appTree, appConfigPathRaw, registrationsPath);
|
|
239
|
+
const tree = yield runSchematic('control');
|
|
240
|
+
const componentRegistrationsSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, (0, helper_1.src)(registrationsPath)));
|
|
241
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)((0, helper_1.src)(registrationsPath), defaultComponentOutputPath);
|
|
242
|
+
const importsComponent = (0, imports_1.hasNamedImport)(componentRegistrationsSf, componentImportPath, 'TestControlComponent');
|
|
243
|
+
const hasRegistration = (0, registrations_1.componentRegistrationsMapProviderHasIdentifier)(componentRegistrationsSf, 'test', 'TestControlComponent');
|
|
244
|
+
(0, vitest_1.expect)(importsComponent).toBe(true);
|
|
245
|
+
(0, vitest_1.expect)(hasRegistration).toBe(true);
|
|
246
|
+
}));
|
|
247
|
+
(0, vitest_1.it)('registers the created control with the token provider if registrations are not split', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
248
|
+
(0, workspace_setup_1.provideTokenNoSplit)(appTree, appConfigPathRaw);
|
|
249
|
+
const tree = yield runSchematic('control');
|
|
250
|
+
const appConfigSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, appConfigPath));
|
|
251
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)(appConfigPath, defaultComponentOutputPath);
|
|
252
|
+
const importsComponent = (0, imports_1.hasNamedImport)(appConfigSf, componentImportPath, 'TestControlComponent');
|
|
253
|
+
const hasRegistration = (0, registrations_1.appConfigProvidersComponentRegistrationsMapHasIdentifier)(appConfigSf, 'test', 'TestControlComponent');
|
|
254
|
+
(0, vitest_1.expect)(importsComponent).toBe(true);
|
|
255
|
+
(0, vitest_1.expect)(hasRegistration).toBe(true);
|
|
256
|
+
}));
|
|
257
|
+
});
|
|
258
|
+
(0, vitest_1.describe)('with a configuration file', () => {
|
|
259
|
+
(0, vitest_1.it)('creates a control with values from configuration', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
260
|
+
const config = {
|
|
261
|
+
control: {
|
|
262
|
+
interfaceSuffix: 'Field',
|
|
263
|
+
componentSuffix: 'Widget',
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
267
|
+
(0, workspace_setup_1.provideMapInlineNoSplit)(appTree, appConfigPathRaw);
|
|
268
|
+
const tree = yield runSchematic('control', {
|
|
269
|
+
key: 'user',
|
|
270
|
+
name: 'profile',
|
|
271
|
+
path: 'app/features/account',
|
|
272
|
+
schematicsConfig: schematicsConfigPath,
|
|
273
|
+
});
|
|
274
|
+
const baseDir = (0, helper_1.app)('features/account/profile');
|
|
275
|
+
const componentFilePath = `${baseDir}/profile-widget.component.ts`;
|
|
276
|
+
const typeFilePath = `${baseDir}/profile-field.type.ts`;
|
|
277
|
+
const componentSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, componentFilePath));
|
|
278
|
+
const typeSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, typeFilePath));
|
|
279
|
+
const hasClass = (0, types_1.classDeclarationExists)(componentSf, 'ProfileWidgetComponent');
|
|
280
|
+
const hasSelector = (0, decorators_1.componentSelectorEquals)(componentSf, 'app-profile-widget');
|
|
281
|
+
const interfaceHasType = (0, types_1.interfaceHasTypeLiteral)(typeSf, 'ProfileField', 'user');
|
|
282
|
+
(0, vitest_1.expect)(hasClass).toBe(true);
|
|
283
|
+
(0, vitest_1.expect)(hasSelector).toBe(true);
|
|
284
|
+
(0, vitest_1.expect)(interfaceHasType).toBe(true);
|
|
285
|
+
}));
|
|
286
|
+
(0, vitest_1.it)('registers the created control to default location', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
287
|
+
const config = {
|
|
288
|
+
control: {
|
|
289
|
+
interfaceSuffix: 'Field',
|
|
290
|
+
componentSuffix: 'Control',
|
|
291
|
+
},
|
|
292
|
+
};
|
|
293
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
294
|
+
(0, workspace_setup_1.provideToken)(appTree, appConfigPathRaw, registrationsPath);
|
|
295
|
+
const tree = yield runSchematic('control', {
|
|
296
|
+
key: 'user',
|
|
297
|
+
name: 'email',
|
|
298
|
+
schematicsConfig: schematicsConfigPath,
|
|
299
|
+
});
|
|
300
|
+
const componentRegistrationsSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, (0, helper_1.src)(registrationsPath)));
|
|
301
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)((0, helper_1.src)(registrationsPath), (0, helper_1.app)('email/email-control.component.ts'));
|
|
302
|
+
const importsComponent = (0, imports_1.hasNamedImport)(componentRegistrationsSf, componentImportPath, 'EmailControlComponent');
|
|
303
|
+
const hasRegistration = (0, registrations_1.componentRegistrationsMapProviderHasIdentifier)(componentRegistrationsSf, 'user', 'EmailControlComponent');
|
|
304
|
+
(0, vitest_1.expect)(importsComponent).toBe(true);
|
|
305
|
+
(0, vitest_1.expect)(hasRegistration).toBe(true);
|
|
306
|
+
}));
|
|
307
|
+
(0, vitest_1.it)('registers the created control to configured location', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
308
|
+
(0, workspace_setup_1.provideToken)(appTree, appConfigPathRaw, registrationsPath);
|
|
309
|
+
const config = {
|
|
310
|
+
control: {
|
|
311
|
+
interfaceSuffix: 'Field',
|
|
312
|
+
componentSuffix: 'Control',
|
|
313
|
+
},
|
|
314
|
+
controlRegistrationsPath: registrationsPath,
|
|
315
|
+
registrationType: 'token',
|
|
316
|
+
};
|
|
317
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
318
|
+
const tree = yield runSchematic('control', {
|
|
319
|
+
key: 'email',
|
|
320
|
+
name: 'email',
|
|
321
|
+
schematicsConfig: schematicsConfigPath,
|
|
322
|
+
});
|
|
323
|
+
const registrationsSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, (0, helper_1.src)(registrationsPath)));
|
|
324
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)((0, helper_1.src)(registrationsPath), (0, helper_1.app)('email/email-control.component.ts'));
|
|
325
|
+
const importsComponent = (0, imports_1.hasNamedImport)(registrationsSf, componentImportPath, 'EmailControlComponent');
|
|
326
|
+
const hasRegistration = (0, registrations_1.componentRegistrationsMapProviderHasIdentifier)(registrationsSf, 'email', 'EmailControlComponent');
|
|
327
|
+
(0, vitest_1.expect)(importsComponent).toBe(true);
|
|
328
|
+
(0, vitest_1.expect)(hasRegistration).toBe(true);
|
|
329
|
+
}));
|
|
330
|
+
(0, vitest_1.it)('does not register the created control if skipRegistration is set to true', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
331
|
+
const config = {
|
|
332
|
+
control: {
|
|
333
|
+
skipRegistration: true,
|
|
334
|
+
},
|
|
335
|
+
};
|
|
336
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
337
|
+
(0, workspace_setup_1.provideToken)(appTree, appConfigPathRaw, registrationsPath);
|
|
338
|
+
const tree = yield runSchematic('control', {
|
|
339
|
+
key: 'email',
|
|
340
|
+
name: 'email',
|
|
341
|
+
schematicsConfig: schematicsConfigPath,
|
|
342
|
+
});
|
|
343
|
+
const registrationsSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, (0, helper_1.src)(registrationsPath)));
|
|
344
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)((0, helper_1.src)(registrationsPath), (0, helper_1.app)('email/email-control.component.ts'));
|
|
345
|
+
const importsComponent = (0, imports_1.hasNamedImport)(registrationsSf, componentImportPath, 'EmailControlComponent');
|
|
346
|
+
const hasRegistration = (0, registrations_1.provideFormbarComponentRegistrationsHasIdentifier)(registrationsSf, 'email', 'EmailControlComponent');
|
|
347
|
+
(0, vitest_1.expect)(importsComponent).toBe(false);
|
|
348
|
+
(0, vitest_1.expect)(hasRegistration).toBe(false);
|
|
349
|
+
}));
|
|
350
|
+
(0, vitest_1.it)('skips registration if control registrations file is not found', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
351
|
+
const config = {
|
|
352
|
+
control: {
|
|
353
|
+
interfaceSuffix: 'Field',
|
|
354
|
+
componentSuffix: 'Control',
|
|
355
|
+
},
|
|
356
|
+
controlRegistrationsPath: 'shared/forms/non-existent-registrations.ts',
|
|
357
|
+
};
|
|
358
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
359
|
+
(0, workspace_setup_1.provideToken)(appTree, appConfigPathRaw, registrationsPath);
|
|
360
|
+
const tree = yield runSchematic('control', {
|
|
361
|
+
key: 'email',
|
|
362
|
+
name: 'email',
|
|
363
|
+
schematicsConfig: schematicsConfigPath,
|
|
364
|
+
});
|
|
365
|
+
const componentPath = (0, helper_1.app)('email/email-control.component.ts');
|
|
366
|
+
(0, vitest_1.expect)((0, helper_1.exists)(tree, componentPath)).toBe(true);
|
|
367
|
+
(0, vitest_1.expect)((0, helper_1.exists)(tree, (0, helper_1.app)('shared/forms/non-existent-registrations.ts'))).toBe(false);
|
|
368
|
+
}));
|
|
369
|
+
(0, vitest_1.describe)('registration style: map', () => {
|
|
370
|
+
(0, vitest_1.beforeEach)(() => {
|
|
371
|
+
const config = {
|
|
372
|
+
registrationType: 'config',
|
|
373
|
+
};
|
|
374
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
375
|
+
});
|
|
376
|
+
(0, vitest_1.it)('registers the created control in app.config.ts in provideFormbar', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
377
|
+
(0, workspace_setup_1.provideMapInlineNoSplit)(appTree, appConfigPathRaw);
|
|
378
|
+
const tree = yield runSchematic('control');
|
|
379
|
+
const appConfigSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, appConfigPath));
|
|
380
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)(appConfigPath, defaultComponentOutputPath);
|
|
381
|
+
const importsComponent = (0, imports_1.hasNamedImport)(appConfigSf, componentImportPath, 'TestControlComponent');
|
|
382
|
+
const hasRegistration = (0, registrations_1.provideFormbarComponentRegistrationsHasIdentifier)(appConfigSf, 'test', 'TestControlComponent');
|
|
383
|
+
(0, vitest_1.expect)(importsComponent).toBe(true);
|
|
384
|
+
(0, vitest_1.expect)(hasRegistration).toBe(true);
|
|
385
|
+
}));
|
|
386
|
+
(0, vitest_1.it)('registers the created control directly in the registrations config if registrations are not split', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
387
|
+
(0, workspace_setup_1.provideMapNoSplit)(appTree, appConfigPathRaw, formbarConfigPath);
|
|
388
|
+
const tree = yield runSchematic('control');
|
|
389
|
+
const formbarConfigSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, (0, helper_1.src)(formbarConfigPath)));
|
|
390
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)((0, helper_1.src)(formbarConfigPath), defaultComponentOutputPath);
|
|
391
|
+
const importsComponent = (0, imports_1.hasNamedImport)(formbarConfigSf, componentImportPath, 'TestControlComponent');
|
|
392
|
+
const hasRegistration = (0, registrations_1.defineFormbarConfigComponentRegistrationsHasIdentifier)(formbarConfigSf, 'test', 'TestControlComponent');
|
|
393
|
+
(0, vitest_1.expect)(importsComponent).toBe(true);
|
|
394
|
+
(0, vitest_1.expect)(hasRegistration).toBe(true);
|
|
395
|
+
}));
|
|
396
|
+
(0, vitest_1.it)('registers the created control in the registrations if registrations are split', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
397
|
+
(0, workspace_setup_1.provideMap)(appTree, appConfigPathRaw, registrationsPath, formbarConfigPath);
|
|
398
|
+
const tree = yield runSchematic('control');
|
|
399
|
+
const registrationsSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, (0, helper_1.src)(registrationsPath)));
|
|
400
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)((0, helper_1.src)(registrationsPath), defaultComponentOutputPath);
|
|
401
|
+
const importsComponent = (0, imports_1.hasNamedImport)(registrationsSf, componentImportPath, 'TestControlComponent');
|
|
402
|
+
const hasRegistration = (0, registrations_1.directComponentRegistrationsHasIdentifier)(registrationsSf, 'test', 'TestControlComponent');
|
|
403
|
+
(0, vitest_1.expect)(importsComponent).toBe(true);
|
|
404
|
+
(0, vitest_1.expect)(hasRegistration).toBe(true);
|
|
405
|
+
}));
|
|
406
|
+
(0, vitest_1.it)('does not register the created control if skipRegistration is set to true', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
407
|
+
const config = {
|
|
408
|
+
control: {
|
|
409
|
+
skipRegistration: true,
|
|
410
|
+
},
|
|
411
|
+
registrationType: 'config',
|
|
412
|
+
};
|
|
413
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
414
|
+
(0, workspace_setup_1.provideMap)(appTree, appConfigPathRaw, registrationsPath, formbarConfigPath);
|
|
415
|
+
const tree = yield runSchematic('control', {
|
|
416
|
+
key: 'email',
|
|
417
|
+
name: 'email',
|
|
418
|
+
schematicsConfig: schematicsConfigPath,
|
|
419
|
+
});
|
|
420
|
+
const formbarConfigSf = (0, parse_1.parseTS)((0, helper_1.read)(tree, (0, helper_1.src)(formbarConfigPath)));
|
|
421
|
+
const componentImportPath = (0, find_module_1.buildRelativePath)((0, helper_1.src)(formbarConfigPath), (0, helper_1.app)('email/email-control.component.ts'));
|
|
422
|
+
const importsComponent = (0, imports_1.hasNamedImport)(formbarConfigSf, componentImportPath, 'EmailControlComponent');
|
|
423
|
+
const hasRegistration = (0, registrations_1.provideFormbarComponentRegistrationsHasIdentifier)(formbarConfigSf, 'email', 'EmailControlComponent');
|
|
424
|
+
(0, vitest_1.expect)(importsComponent).toBe(false);
|
|
425
|
+
(0, vitest_1.expect)(hasRegistration).toBe(false);
|
|
426
|
+
}));
|
|
427
|
+
(0, vitest_1.it)('skips registration if control registrations file is not found', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
428
|
+
const config = {
|
|
429
|
+
control: {
|
|
430
|
+
interfaceSuffix: 'Field',
|
|
431
|
+
componentSuffix: 'Control',
|
|
432
|
+
},
|
|
433
|
+
controlRegistrationsPath: 'shared/forms/non-existent-registrations.ts',
|
|
434
|
+
registrationType: 'config',
|
|
435
|
+
};
|
|
436
|
+
(0, helper_1.writeJson)(appTree, (0, helper_1.src)(schematicsConfigPath), config);
|
|
437
|
+
(0, workspace_setup_1.provideMapInlineNoSplit)(appTree, appConfigPathRaw);
|
|
438
|
+
const tree = yield runSchematic('control', {
|
|
439
|
+
key: 'email',
|
|
440
|
+
name: 'email',
|
|
441
|
+
schematicsConfig: schematicsConfigPath,
|
|
442
|
+
});
|
|
443
|
+
const componentPath = (0, helper_1.app)('email/email-control.component.ts');
|
|
444
|
+
(0, vitest_1.expect)((0, helper_1.exists)(tree, componentPath)).toBe(true);
|
|
445
|
+
(0, vitest_1.expect)((0, helper_1.exists)(tree, (0, helper_1.app)('shared/forms/non-existent-registrations.ts'))).toBe(false);
|
|
446
|
+
}));
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
});
|
|
450
|
+
//# sourceMappingURL=generators.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators.spec.js","sourceRoot":"","sources":["../../../../projects/core/automation/schematics/tests/generators.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAA0D;AAC1D,gEAG4C;AAG5C,uDAS2B;AAC3B,qCAA6D;AAC7D,yEAA4E;AAE5E,+CAA8C;AAC9C,mDAG+B;AAC/B,yDAMkC;AAClC,+CAG6B;AAC7B,+DAMqC;AACrC,sDAGgC;AAEhC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AACzC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAClD,MAAM,iBAAiB,GAAG,8CAA8C,CAAC;AACzE,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAEvD,IAAA,iBAAQ,EAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,IAAI,OAAqB,CAAC;IAC1B,IAAI,MAA2B,CAAC;IAEhC,MAAM,WAAW,GAAoB;QACnC,OAAO,EAAE,UAAU;QACnB,GAAG,EAAE,MAAM;KACZ,CAAC;IAEF,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;IACnD,MAAM,kBAAkB,GACtB,mEAAmE,CAAC;IACtE,MAAM,4BAA4B,GAAG,GAAG,sBAAsB,IAAI,kBAAkB,EAAE,CAAC;IAEvF,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;IACpD,MAAM,uBAAuB,GAAG,kCAAkC,CAAC;IACnE,MAAM,6BAA6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File } from 'typescript';
|
|
2
|
+
import { UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
3
|
+
export declare function appRoot(p?: string): string;
|
|
4
|
+
export declare function src(p?: string): string;
|
|
5
|
+
export declare function app(p?: string): string;
|
|
6
|
+
export declare function read(tree: UnitTestTree, path: string): string;
|
|
7
|
+
export declare function exists(tree: UnitTestTree, path: string): boolean;
|
|
8
|
+
export declare function writeJson(tree: UnitTestTree, filePath: string, value: unknown): void;
|
|
9
|
+
export declare function writeTs(tree: UnitTestTree, filePath: string, content: string): void;
|
|
10
|
+
export declare function providersArrayContainsCall(sf: SourceFile, callee: string): boolean;
|
|
11
|
+
export declare function providersArrayContainsIdentifier(sf: SourceFile, name: string): boolean;
|
|
12
|
+
export declare function providersArrayContainsProviderObject(sf: SourceFile, tokenName: string): boolean;
|
|
13
|
+
export declare function countNamedImport(sf: SourceFile, moduleName: string, imported: string): number;
|
|
14
|
+
export declare function countCall(sf: SourceFile, callee: string): number;
|
|
15
|
+
type PropShape = 'shorthand' | 'object' | 'identifier';
|
|
16
|
+
export declare function objectHasPropOfKind(obj: ObjectLiteralExpression, propName: string, kind?: PropShape): boolean;
|
|
17
|
+
export declare function callObjectArgHasProp(sf: SourceFile, calleeName: string, propName: string, kind: PropShape): boolean;
|
|
18
|
+
export declare function forEachAtLeastOnce<T>(array: readonly T[], callback: Parameters<(readonly T[])['forEach']>[0]): void;
|
|
19
|
+
export declare function countComponentRegistrationsMapProviderIdentifier(sf: SourceFile, key: string, identifierName: string): number;
|
|
20
|
+
export {};
|