@fundamental-ngx/core 0.58.0-rc.7 → 0.58.0-rc.70
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/button/index.d.ts +1 -1
- package/card/index.d.ts +8 -4
- package/combobox/index.d.ts +9 -1
- package/dialog/index.d.ts +2 -2
- package/feed-input/index.d.ts +1 -1
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-avatar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-card.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-combobox.mjs +44 -8
- package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-datetime.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-datetime.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-feed-input.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-feed-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-flexible-column-layout.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-flexible-column-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-form.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +1 -2
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-nested-list.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-nested-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-notification.mjs +3 -1
- package/fesm2022/fundamental-ngx-core-notification.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-status.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-status.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-overflow-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-resizable-card-layout.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-resizable-card-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs +3 -3
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +32 -5
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-table.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-table.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tabs.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-theming.mjs +2 -3
- package/fesm2022/fundamental-ngx-core-theming.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-toolbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tree.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-user-menu.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-user-menu.mjs.map +1 -1
- package/form/index.d.ts +2 -2
- package/input-group/index.d.ts +1 -1
- package/list/index.d.ts +4 -4
- package/menu/index.d.ts +2 -2
- package/message-box/index.d.ts +1 -1
- package/multi-combobox/index.d.ts +2 -2
- package/multi-input/index.d.ts +1 -1
- package/nested-list/index.d.ts +11 -11
- package/notification/index.d.ts +2 -0
- package/overflow-layout/index.d.ts +4 -4
- package/package.json +19 -19
- package/popover/index.d.ts +2 -2
- package/segmented-button/index.d.ts +3 -3
- package/shellbar/index.d.ts +13 -2
- package/table/index.d.ts +2 -2
- package/tabs/index.d.ts +3 -3
- package/time/index.d.ts +1 -1
- package/time-picker/index.d.ts +1 -1
- package/toolbar/index.d.ts +1 -1
- package/tree/index.d.ts +3 -3
- package/schematics/add-animations/index.d.ts +0 -7
- package/schematics/add-animations/index.js +0 -83
- package/schematics/add-animations/index.js.map +0 -1
- package/schematics/add-animations/schema.json +0 -21
- package/schematics/add-dependencies/index.d.ts +0 -7
- package/schematics/add-dependencies/index.js +0 -105
- package/schematics/add-dependencies/index.js.map +0 -1
- package/schematics/add-dependencies/schema.json +0 -15
- package/schematics/add-styles/index.d.ts +0 -7
- package/schematics/add-styles/index.js +0 -97
- package/schematics/add-styles/index.js.map +0 -1
- package/schematics/add-styles/schema.json +0 -21
- package/schematics/add-theming/index.d.ts +0 -7
- package/schematics/add-theming/index.js +0 -108
- package/schematics/add-theming/index.js.map +0 -1
- package/schematics/add-theming/schema.json +0 -72
- package/schematics/collection.json +0 -40
- package/schematics/models/schema.d.ts +0 -6
- package/schematics/models/schema.js +0 -3
- package/schematics/models/schema.js.map +0 -1
- package/schematics/ng-add/index.d.ts +0 -9
- package/schematics/ng-add/index.js +0 -30
- package/schematics/ng-add/index.js.map +0 -1
- package/schematics/ng-add/schema.json +0 -84
- package/schematics/utils/calls-providers-function.d.ts +0 -11
- package/schematics/utils/calls-providers-function.js +0 -54
- package/schematics/utils/calls-providers-function.js.map +0 -1
- package/schematics/utils/file-utils.d.ts +0 -2
- package/schematics/utils/file-utils.js +0 -26
- package/schematics/utils/file-utils.js.map +0 -1
- package/schematics/utils/main-ts-file-path.d.ts +0 -2
- package/schematics/utils/main-ts-file-path.js +0 -27
- package/schematics/utils/main-ts-file-path.js.map +0 -1
- package/schematics/utils/ng-module-utils.d.ts +0 -6
- package/schematics/utils/ng-module-utils.js +0 -71
- package/schematics/utils/ng-module-utils.js.map +0 -1
- package/schematics/utils/one-time-packages.d.ts +0 -6
- package/schematics/utils/one-time-packages.js +0 -39
- package/schematics/utils/one-time-packages.js.map +0 -1
- package/schematics/utils/package-utils.d.ts +0 -10
- package/schematics/utils/package-utils.js +0 -25
- package/schematics/utils/package-utils.js.map +0 -1
- package/schematics/utils/workspace.d.ts +0 -40
- package/schematics/utils/workspace.js +0 -110
- package/schematics/utils/workspace.js.map +0 -1
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addDependencies = addDependencies;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
6
|
-
const compare_versions_1 = require("compare-versions");
|
|
7
|
-
const semver_1 = require("semver");
|
|
8
|
-
const package_utils_1 = require("../utils/package-utils");
|
|
9
|
-
const libraryPackageJson = require('@fundamental-ngx/core/package.json');
|
|
10
|
-
const desiredVersions = {
|
|
11
|
-
'fundamental-styles': process.env.FD_ENV_FDSTYLES_VER_PLACEHOLDER || libraryPackageJson.peerDependencies['fundamental-styles'],
|
|
12
|
-
'@sap-theming/theming-base-content': process.env.FD_ENV_THEMING_VER_PLACEHOLDER ||
|
|
13
|
-
libraryPackageJson.peerDependencies['@sap-theming/theming-base-content'],
|
|
14
|
-
'@fundamental-ngx/i18n': process.env.FD_ENV_VERSION_PLACEHOLDER || libraryPackageJson.peerDependencies['@fundamental-ngx/i18n'],
|
|
15
|
-
'@fundamental-ngx/cdk': process.env.FD_ENV_VERSION_PLACEHOLDER || libraryPackageJson.peerDependencies['@fundamental-ngx/cdk']
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Adds dependencies to the project
|
|
19
|
-
* @param options
|
|
20
|
-
*/
|
|
21
|
-
function addDependencies(options) {
|
|
22
|
-
return addExternalLibraries(options);
|
|
23
|
-
}
|
|
24
|
-
function addExternalLibraries(options) {
|
|
25
|
-
return (tree, context) => {
|
|
26
|
-
const ngCoreVersionTag = (0, dependencies_1.getPackageJsonDependency)(tree, '@angular/core');
|
|
27
|
-
if (!ngCoreVersionTag) {
|
|
28
|
-
throw new schematics_1.SchematicsException('Could not find @angular/core in package.json');
|
|
29
|
-
}
|
|
30
|
-
const angularVersion = (0, semver_1.valid)((0, semver_1.coerce)(ngCoreVersionTag.version))
|
|
31
|
-
? `^${(0, semver_1.major)((0, semver_1.coerce)(ngCoreVersionTag.version))}.0.0`
|
|
32
|
-
: null;
|
|
33
|
-
if (!angularVersion) {
|
|
34
|
-
throw new schematics_1.SchematicsException(`Could not determine Angular version, ${ngCoreVersionTag} is not valid semver`);
|
|
35
|
-
}
|
|
36
|
-
const formsDependency = (0, dependencies_1.getPackageJsonDependency)(tree, '@angular/forms');
|
|
37
|
-
if (!formsDependency) {
|
|
38
|
-
(0, package_utils_1.addPackageDependency)(tree, {
|
|
39
|
-
type: dependencies_1.NodeDependencyType.Default,
|
|
40
|
-
version: angularVersion,
|
|
41
|
-
name: '@angular/forms'
|
|
42
|
-
}, context);
|
|
43
|
-
}
|
|
44
|
-
const animationsDependency = (0, dependencies_1.getPackageJsonDependency)(tree, '@angular/animations');
|
|
45
|
-
if (options.animations && !animationsDependency) {
|
|
46
|
-
(0, package_utils_1.addPackageDependency)(tree, {
|
|
47
|
-
type: dependencies_1.NodeDependencyType.Default,
|
|
48
|
-
version: angularVersion,
|
|
49
|
-
name: '@angular/animations'
|
|
50
|
-
}, context);
|
|
51
|
-
}
|
|
52
|
-
const cdKDependency = (0, dependencies_1.getPackageJsonDependency)(tree, '@angular/cdk');
|
|
53
|
-
if (!cdKDependency) {
|
|
54
|
-
(0, package_utils_1.addPackageDependency)(tree, {
|
|
55
|
-
type: dependencies_1.NodeDependencyType.Default,
|
|
56
|
-
version: angularVersion,
|
|
57
|
-
name: '@angular/cdk'
|
|
58
|
-
}, context);
|
|
59
|
-
}
|
|
60
|
-
const fundamentalStylesDependency = (0, dependencies_1.getPackageJsonDependency)(tree, 'fundamental-styles');
|
|
61
|
-
if (!fundamentalStylesDependency ||
|
|
62
|
-
(0, compare_versions_1.compare)(fundamentalStylesDependency.version, desiredVersions['fundamental-styles'], '<')) {
|
|
63
|
-
(0, package_utils_1.addPackageDependency)(tree, {
|
|
64
|
-
type: dependencies_1.NodeDependencyType.Default,
|
|
65
|
-
// Will be replaced with the real version during sync-version script run
|
|
66
|
-
version: desiredVersions['fundamental-styles'],
|
|
67
|
-
name: 'fundamental-styles',
|
|
68
|
-
overwrite: true
|
|
69
|
-
}, context);
|
|
70
|
-
}
|
|
71
|
-
const themingBaseContentDependency = (0, dependencies_1.getPackageJsonDependency)(tree, '@sap-theming/theming-base-content');
|
|
72
|
-
if (!themingBaseContentDependency ||
|
|
73
|
-
(0, compare_versions_1.compare)(themingBaseContentDependency.version, desiredVersions['@sap-theming/theming-base-content'], '<')) {
|
|
74
|
-
(0, package_utils_1.addPackageDependency)(tree, {
|
|
75
|
-
type: dependencies_1.NodeDependencyType.Default,
|
|
76
|
-
// Will be replaced with the real version during sync-version script run
|
|
77
|
-
version: desiredVersions['@sap-theming/theming-base-content'],
|
|
78
|
-
name: '@sap-theming/theming-base-content',
|
|
79
|
-
overwrite: true
|
|
80
|
-
}, context);
|
|
81
|
-
}
|
|
82
|
-
const i18nDependency = (0, dependencies_1.getPackageJsonDependency)(tree, '@fundamental-ngx/i18n');
|
|
83
|
-
if (!i18nDependency || (0, compare_versions_1.compare)(i18nDependency.version, desiredVersions['@fundamental-ngx/i18n'], '<')) {
|
|
84
|
-
(0, package_utils_1.addPackageDependency)(tree, {
|
|
85
|
-
type: dependencies_1.NodeDependencyType.Default,
|
|
86
|
-
// Will be replaced with the real version during sync-version script run
|
|
87
|
-
version: desiredVersions['@fundamental-ngx/i18n'],
|
|
88
|
-
name: '@fundamental-ngx/i18n',
|
|
89
|
-
overwrite: true
|
|
90
|
-
}, context);
|
|
91
|
-
}
|
|
92
|
-
const fdCdkDependency = (0, dependencies_1.getPackageJsonDependency)(tree, '@fundamental-ngx/cdk');
|
|
93
|
-
if (!fdCdkDependency || (0, compare_versions_1.compare)(fdCdkDependency.version, desiredVersions['@fundamental-ngx/cdk'], '<')) {
|
|
94
|
-
(0, package_utils_1.addPackageDependency)(tree, {
|
|
95
|
-
type: dependencies_1.NodeDependencyType.Default,
|
|
96
|
-
// Will be replaced with the real version during sync-version script run
|
|
97
|
-
version: desiredVersions['@fundamental-ngx/cdk'],
|
|
98
|
-
name: '@fundamental-ngx/cdk',
|
|
99
|
-
overwrite: true
|
|
100
|
-
}, context);
|
|
101
|
-
}
|
|
102
|
-
return tree;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/core/schematics/add-dependencies/index.ts"],"names":[],"mappings":";;AAyBA,0CAEC;AA3BD,2DAA+F;AAC/F,2EAAwG;AACxG,uDAA2C;AAC3C,mCAAsD;AAEtD,0DAA8D;AAE9D,MAAM,kBAAkB,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAEzE,MAAM,eAAe,GAAG;IACpB,oBAAoB,EAChB,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,oBAAoB,CAAC;IAC5G,mCAAmC,EAC/B,OAAO,CAAC,GAAG,CAAC,8BAA8B;QAC1C,kBAAkB,CAAC,gBAAgB,CAAC,mCAAmC,CAAC;IAC5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"fundamental-ngx-add-dependencies",
|
|
4
|
-
"title": "Fundamental Library for Angular add-dependencies schematic",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"project": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The name of the project.",
|
|
10
|
-
"$default": {
|
|
11
|
-
"$source": "projectName"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
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
|
-
exports.addStyles = addStyles;
|
|
13
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
|
-
const workspace_1 = require("../utils/workspace");
|
|
15
|
-
/**
|
|
16
|
-
* Add styles to angular.json
|
|
17
|
-
* @param options
|
|
18
|
-
*/
|
|
19
|
-
function addStyles(options) {
|
|
20
|
-
return (0, schematics_1.chain)([addStylesToConfig(options), addAssetsToConfig(options)]);
|
|
21
|
-
}
|
|
22
|
-
function handleError(context, error, message) {
|
|
23
|
-
context.logger.error(message);
|
|
24
|
-
throw new schematics_1.SchematicsException(`${message}: ${error.message}`);
|
|
25
|
-
}
|
|
26
|
-
function addStylesToConfig(options) {
|
|
27
|
-
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
var _a;
|
|
29
|
-
try {
|
|
30
|
-
const additionalStyle = './node_modules/@fundamental-ngx/core/styles/fundamental-ngx-core.css';
|
|
31
|
-
const buildTarget = yield (0, workspace_1.getProjectBuildTarget)(tree, options.project);
|
|
32
|
-
const stylesArray = ((_a = buildTarget.options) === null || _a === void 0 ? void 0 : _a.styles) || [];
|
|
33
|
-
if (!stylesArray.includes(additionalStyle)) {
|
|
34
|
-
stylesArray.push(additionalStyle);
|
|
35
|
-
context.logger.info(`✅️ Added style to angular.json.`);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
context.logger.info(`✅️ Style already exists in angular.json. Skipping.`);
|
|
39
|
-
}
|
|
40
|
-
buildTarget.options.styles = stylesArray;
|
|
41
|
-
const workspace = yield (0, workspace_1.getWorkspaceDefinition)(tree);
|
|
42
|
-
yield (0, workspace_1.updateWorkspaceDefinition)(tree, workspace);
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
handleError(context, error, 'Failed to add styles configuration');
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function addAssetsToConfig(options) {
|
|
50
|
-
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
var _a;
|
|
52
|
-
try {
|
|
53
|
-
const additionalAssets = [
|
|
54
|
-
{
|
|
55
|
-
glob: '**/css_variables.css',
|
|
56
|
-
input: './node_modules/@sap-theming/theming-base-content/content/Base/baseLib/',
|
|
57
|
-
output: './assets/theming-base/'
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
glob: '**/*',
|
|
61
|
-
input: './node_modules/@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/',
|
|
62
|
-
output: './assets/theming-base/baseTheme/fonts/'
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
glob: '**/*',
|
|
66
|
-
input: './node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/fonts/',
|
|
67
|
-
output: './assets/theming-base/sap_horizon/fonts/'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
glob: '**/*',
|
|
71
|
-
input: './node_modules/fundamental-styles/dist/theming/',
|
|
72
|
-
output: './assets/fundamental-styles-theming/'
|
|
73
|
-
}
|
|
74
|
-
];
|
|
75
|
-
const buildTarget = yield (0, workspace_1.getProjectBuildTarget)(tree, options.project);
|
|
76
|
-
const assetsArray = ((_a = buildTarget.options) === null || _a === void 0 ? void 0 : _a.assets) || [];
|
|
77
|
-
const newAssets = additionalAssets.filter((newAsset) => !assetsArray.some((existingAsset) => typeof existingAsset === 'object' &&
|
|
78
|
-
existingAsset.input === newAsset.input &&
|
|
79
|
-
existingAsset.glob === newAsset.glob &&
|
|
80
|
-
existingAsset.output === newAsset.output));
|
|
81
|
-
if (newAssets.length > 0) {
|
|
82
|
-
assetsArray.push(...newAssets);
|
|
83
|
-
context.logger.info(`✅️ Added assets to angular.json.`);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
context.logger.info(`✅️ Assets already exist in angular.json. Skipping.`);
|
|
87
|
-
}
|
|
88
|
-
buildTarget.options.assets = assetsArray;
|
|
89
|
-
const workspace = yield (0, workspace_1.getWorkspaceDefinition)(tree);
|
|
90
|
-
yield (0, workspace_1.updateWorkspaceDefinition)(tree, workspace);
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
handleError(context, error, 'Failed to add assets configuration');
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/core/schematics/add-styles/index.ts"],"names":[],"mappings":";;;;;;;;;;;AASA,8BAEC;AAVD,2DAAsG;AAEtG,kDAA8G;AAE9G;;;GAGG;AACH,SAAgB,SAAS,CAAC,OAAe;IACrC,OAAO,IAAA,kBAAK,EAAC,CAAC,iBAAiB,CAAC,OAAO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OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;YAC9E,CAAC;YAED,WAAW,CAAC,OAAO,CAAC,MAAM,GAAG,WAAW,CAAC;YACzC,MAAM,SAAS,GAAG,MAAM,IAAA,kCAAsB,EAAC,IAAI,CAAC,CAAC;YACrD,MAAM,IAAA,qCAAyB,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACrD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,oCAAoC,CAAC,CAAC;QACtE,CAAC;IACL,CAAC,CAAA,CAAC;AACN,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "fundamental-ngx-add-styles",
|
|
4
|
-
"title": "Fundamental Library for Angular add-styles schematic",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"project": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The name of the project.",
|
|
10
|
-
"$default": {
|
|
11
|
-
"$source": "projectName"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"fonts": {
|
|
15
|
-
"type": "boolean",
|
|
16
|
-
"default": true,
|
|
17
|
-
"description": "Whether default fonts from theming should be added to styles file.",
|
|
18
|
-
"x-prompt": "Add default font imports into styles file?"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
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
|
-
exports.addTheming = addTheming;
|
|
13
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
|
-
const schematics_2 = require("@angular/cdk/schematics");
|
|
15
|
-
const utility_1 = require("@schematics/angular/utility");
|
|
16
|
-
const calls_providers_function_1 = require("../utils/calls-providers-function");
|
|
17
|
-
const main_ts_file_path_1 = require("../utils/main-ts-file-path");
|
|
18
|
-
const workspace_1 = require("../utils/workspace");
|
|
19
|
-
/**
|
|
20
|
-
* Add theming to angular.json and root module or config
|
|
21
|
-
* @param options
|
|
22
|
-
*/
|
|
23
|
-
function addTheming(options) {
|
|
24
|
-
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
if (options.theme === 'custom') {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
context.logger.info(`⚠️ Currently, we don't automatically remove the deprecated Themes approach. If you have it applied you have to remove it by yourself.
|
|
29
|
-
[Instructions: https://sap.github.io/fundamental-ngx/#/core/theming]`);
|
|
30
|
-
const buildTarget = yield (0, workspace_1.getProjectBuildTarget)(tree, options.project);
|
|
31
|
-
const targetOptions = buildTarget.options;
|
|
32
|
-
if (!targetOptions) {
|
|
33
|
-
context.logger.info(`⚠️ Can not add theming to application. Please add theming manually. Reason: no target options found for project ${options.project}`);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const styles = targetOptions.styles;
|
|
37
|
-
for (let i = 0; i < styles.length; i++) {
|
|
38
|
-
const style = styles[i];
|
|
39
|
-
const stylePath = typeof style === 'string' ? style : style.input;
|
|
40
|
-
const baseVariablesMatch = stylePath.match(/@sap-theming\/(.*)\/baseLib\/(.*)\/css_variables.css$/);
|
|
41
|
-
if (baseVariablesMatch) {
|
|
42
|
-
const theme = baseVariablesMatch[2];
|
|
43
|
-
context.logger
|
|
44
|
-
.info(`⚠️ Found theming ${theme} base SAP variables in styles. Can not add theme to application.
|
|
45
|
-
Try to replace theme in application manually, or use ThemingService to manage multiple themes.
|
|
46
|
-
[Instructions: https://sap.github.io/fundamental-ngx/#/core/theming]`);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const fundamentalStylesDeltaThemingVariablesMatch = stylePath.match(/fundamental-styles\/(.*)\/theming\/(.*)\/.css$/);
|
|
50
|
-
if (fundamentalStylesDeltaThemingVariablesMatch) {
|
|
51
|
-
const theme = fundamentalStylesDeltaThemingVariablesMatch[2];
|
|
52
|
-
context.logger
|
|
53
|
-
.info(`⚠️ Found theming ${theme} fundamental-styles variables in styles. Can not add theme to application.
|
|
54
|
-
Try to replace theme in application manually, or use ThemingService to manage multiple themes.
|
|
55
|
-
[Instructions: https://sap.github.io/fundamental-ngx/#/core/theming]`);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
return (0, schematics_1.chain)([
|
|
61
|
-
() => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
if (!(yield (0, calls_providers_function_1.callsProvidersFunction)(tree, options.project, 'provideTheming'))) {
|
|
63
|
-
return (0, schematics_1.chain)([
|
|
64
|
-
(0, utility_1.addRootProvider)(options.project, ({ code, external }) => code `${external('provideTheming', '@fundamental-ngx/core/theming')}({ defaultTheme: '${options.theme}', changeThemeOnQueryParamChange: ${options.readThemeFromURL ? 'true' : 'false'} })`),
|
|
65
|
-
() => context.logger.info(`✅️ Added theming provider to root app config`)
|
|
66
|
-
]);
|
|
67
|
-
}
|
|
68
|
-
context.logger.info(`✅️ Found theming provider in root app config, skipping adding it.`);
|
|
69
|
-
}),
|
|
70
|
-
() => __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
if (options.readThemeFromURL) {
|
|
72
|
-
const mainPath = yield (0, main_ts_file_path_1.getMainTsFilePath)(tree, options.project);
|
|
73
|
-
if ((0, schematics_2.isStandaloneApp)(tree, mainPath)) {
|
|
74
|
-
if (!(yield (0, calls_providers_function_1.callsProvidersFunction)(tree, options.project, 'provideRouter'))) {
|
|
75
|
-
return (0, schematics_1.chain)([
|
|
76
|
-
(0, utility_1.addRootProvider)(options.project, ({ code, external }) => code `${external('provideRouter', '@fundamental-ngx/core/router')}([])`),
|
|
77
|
-
() => context.logger.info(`✅️ Added router provider to root app config`)
|
|
78
|
-
]);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
const appModulePath = (0, schematics_2.getAppModulePath)(tree, mainPath);
|
|
83
|
-
if (!(0, schematics_2.hasNgModuleImport)(tree, appModulePath, 'RouterModule')) {
|
|
84
|
-
(0, schematics_2.addModuleImportToRootModule)(tree, 'RouterModule.forRoot([])', '@angular/router', yield (0, workspace_1.getProjectDefinition)(tree, options.project));
|
|
85
|
-
context.logger.info(`✅️ Added RouterModule.forRoot([]) to root app module`);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}),
|
|
90
|
-
() => __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
if (!(yield (0, calls_providers_function_1.callsProvidersFunction)(tree, options.project, 'themingInitializer'))) {
|
|
92
|
-
return (0, schematics_1.chain)([
|
|
93
|
-
(0, utility_1.addRootProvider)(options.project, ({ code, external }) => code `${external('themingInitializer', '@fundamental-ngx/core/theming')}()`),
|
|
94
|
-
() => context.logger.info(`✅️ Added themingInitializer provider to root app config`)
|
|
95
|
-
]);
|
|
96
|
-
}
|
|
97
|
-
context.logger.info(`✅️ Found themingInitializer provider in root app config, skipping adding it.`);
|
|
98
|
-
})
|
|
99
|
-
]);
|
|
100
|
-
}
|
|
101
|
-
catch (e) {
|
|
102
|
-
context.logger.debug(e);
|
|
103
|
-
context.logger.info(`⚠️ Please process adding Theming to root module by yourself.
|
|
104
|
-
[Instructions: https://sap.github.io/fundamental-ngx/#/core/theming]`);
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/core/schematics/add-theming/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAkBA,gCAqHC;AAtID,2DAAyD;AACzD,wDAKiC;AACjC,yDAA8D;AAE9D,gFAA2E;AAC3E,kEAA+D;AAC/D,kDAAiF;AAEjF;;;GAGG;AACH,SAAgB,UAAU,CAAC,OAAe;IACtC,OAAO,CAAO,IAAI,EAAE,OAAO,EAAE,EAAE;QAC3B,IAAI,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO;QACX,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,IAAI,CACf;qEACyD,CAC5D,CAAC;QACF,MAAM,WAAW,GAAG,MAAM,IAAA,iCAAqB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACvE,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC;QAC1C,IAAI,CAAC,aAAa,EAAE,CAAC;YACjB,OAAO,CAAC,MAAM,CAAC,IAAI,CACf,mHAAmH,OAAO,CAAC,OAAO,EAAE,CACvI,CAAC;YACF,OAAO;QACX,CAAC;QACD,MAAM,MAAM,GAAG,aAAa,CAAC,MAAwB,CAAC;QAEtD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACxB,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;YAElE,MAAM,kBAAkB,GAAG,SAAS,CAAC,KAAK,CAAC,uDAA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AA,yBAAe,EACX,OAAO,CAAC,OAAO,EACf,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CACnB,IAAI,CAAA,GAAG,QAAQ,CAAC,oBAAoB,EAAE,+BAA+B,CAAC,IAAI,CACjF;4BACD,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,yDAAyD,CAAC;yBACvF,CAAC,CAAC;oBACP,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC,IAAI,CACf,8EAA8E,CACjF,CAAC;gBACN,CAAC,CAAA;aACJ,CAAC,CAAC;QACP,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACxB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;qEACqC,CAAC,CAAC;QAC/D,CAAC;IACL,CAAC,CAAA,CAAC;AACN,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "fundamental-ngx-add-theming",
|
|
4
|
-
"title": "Fundamental Library for Angular add-theming schematic",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"project": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The name of the project.",
|
|
10
|
-
"$default": {
|
|
11
|
-
"$source": "projectName"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"theme": {
|
|
15
|
-
"description": "The theme to apply",
|
|
16
|
-
"type": "string",
|
|
17
|
-
"default": "sap_horizon",
|
|
18
|
-
"x-prompt": {
|
|
19
|
-
"message": "Choose a prebuilt theme name, or \"custom\" for a custom theme for later configuration:",
|
|
20
|
-
"type": "list",
|
|
21
|
-
"items": [
|
|
22
|
-
{
|
|
23
|
-
"value": "sap_horizon",
|
|
24
|
-
"label": "Morning Horizon (Light) [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_horizon]"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"value": "sap_horizon_dark",
|
|
28
|
-
"label": "Evening Horizon (Dark) [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_horizon_dark]"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"value": "sap_horizon_hcb",
|
|
32
|
-
"label": "Horizon High Contrast Black [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_horizon_hcb]"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"value": "sap_horizon_hcw",
|
|
36
|
-
"label": "Horizon High Contrast White [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_horizon_hcw]"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"value": "sap_fiori_3",
|
|
40
|
-
"label": "Quartz Light [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_fiori_3]"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"value": "sap_fiori_3_dark",
|
|
44
|
-
"label": "Quartz Dark [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_fiori_3_dark]"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"value": "sap_fiori_3_hcb",
|
|
48
|
-
"label": "Quartz High Contrast Black [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_fiori_3_hcb]"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"value": "sap_fiori_3_hcw",
|
|
52
|
-
"label": "Quartz High Contrast White [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_fiori_3_hcw]"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"value": "sap_fiori_3_light_dark",
|
|
56
|
-
"label": "Quartz Auto [Preview: https://sap.github.io/fundamental-ngx/#/core/home?theme=sap_fiori_3_light_dark]"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"value": "custom",
|
|
60
|
-
"label": "Custom - Manual setup"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"readThemeFromURL": {
|
|
66
|
-
"type": "boolean",
|
|
67
|
-
"default": false,
|
|
68
|
-
"description": "Whether to read the theme from the URL.",
|
|
69
|
-
"x-prompt": "Read theme from URL? Makes difference if theme is not 'Custom'."
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
-
"schematics": {
|
|
4
|
-
"ng-add": {
|
|
5
|
-
"description": "Adds @fundamental-ngx/core to the project.",
|
|
6
|
-
"factory": "./ng-add/index#ngAdd",
|
|
7
|
-
"schema": "./ng-add/schema.json"
|
|
8
|
-
},
|
|
9
|
-
"proceed-with-schematics": {
|
|
10
|
-
"description": "Adds @fundamental-ngx/core to the project.",
|
|
11
|
-
"factory": "./ng-add/index#proceedWithSchematics",
|
|
12
|
-
"schema": "./ng-add/schema.json",
|
|
13
|
-
"private": true
|
|
14
|
-
},
|
|
15
|
-
"add-dependencies": {
|
|
16
|
-
"description": "Adds external libraries as a dependencies for @fundamental-ngx/core",
|
|
17
|
-
"factory": "./add-dependencies/index#addDependencies",
|
|
18
|
-
"schema": "./add-dependencies/schema.json",
|
|
19
|
-
"private": true
|
|
20
|
-
},
|
|
21
|
-
"add-styles": {
|
|
22
|
-
"description": "Adds necessary style files for @fundamental-ngx/core",
|
|
23
|
-
"factory": "./add-styles/index#addStyles",
|
|
24
|
-
"schema": "./add-styles/schema.json",
|
|
25
|
-
"private": true
|
|
26
|
-
},
|
|
27
|
-
"add-theming": {
|
|
28
|
-
"description": "Adds theming capability for @fundamental-ngx/core",
|
|
29
|
-
"factory": "./add-theming/index#addTheming",
|
|
30
|
-
"schema": "./add-theming/schema.json",
|
|
31
|
-
"private": true
|
|
32
|
-
},
|
|
33
|
-
"add-animations": {
|
|
34
|
-
"description": "Adds animations module to the project",
|
|
35
|
-
"factory": "./add-animations/index#addAnimations",
|
|
36
|
-
"schema": "./add-animations/schema.json",
|
|
37
|
-
"private": true
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export interface Schema {
|
|
2
|
-
project: string;
|
|
3
|
-
animations: boolean;
|
|
4
|
-
theme: 'sap_fiori_3' | 'sap_fiori_3_dark' | 'sap_fiori_3_hcb' | 'sap_fiori_3_hcw' | 'sap_fiori_3_light_dark' | 'sap_horizon' | 'sap_horizon_dark' | 'sap_horizon_hcb' | 'sap_horizon_hcw' | 'custom';
|
|
5
|
-
readThemeFromURL: boolean;
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../libs/core/schematics/models/schema.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
import { Schema } from '../models/schema';
|
|
3
|
-
/**
|
|
4
|
-
* Adds dependencies and runs other schematics
|
|
5
|
-
* @param options
|
|
6
|
-
*/
|
|
7
|
-
export declare function ngAdd(options: Schema): Rule;
|
|
8
|
-
/** Proceed with schematics */
|
|
9
|
-
export declare function proceedWithSchematics(options: Schema): Rule;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ngAdd = ngAdd;
|
|
4
|
-
exports.proceedWithSchematics = proceedWithSchematics;
|
|
5
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
-
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
7
|
-
const add_dependencies_1 = require("../add-dependencies");
|
|
8
|
-
/**
|
|
9
|
-
* Adds dependencies and runs other schematics
|
|
10
|
-
* @param options
|
|
11
|
-
*/
|
|
12
|
-
function ngAdd(options) {
|
|
13
|
-
return () => (0, schematics_1.chain)([
|
|
14
|
-
(0, add_dependencies_1.addDependencies)(options),
|
|
15
|
-
(t, ctx) => {
|
|
16
|
-
const installTaskId = ctx.addTask(new tasks_1.NodePackageInstallTask());
|
|
17
|
-
ctx.addTask(new tasks_1.RunSchematicTask('proceed-with-schematics', options), [installTaskId]);
|
|
18
|
-
return t;
|
|
19
|
-
}
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
/** Proceed with schematics */
|
|
23
|
-
function proceedWithSchematics(options) {
|
|
24
|
-
return (0, schematics_1.chain)([
|
|
25
|
-
(0, schematics_1.schematic)('add-animations', options),
|
|
26
|
-
(0, schematics_1.schematic)('add-styles', options),
|
|
27
|
-
(0, schematics_1.schematic)('add-theming', options)
|
|
28
|
-
]);
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/core/schematics/ng-add/index.ts"],"names":[],"mappings":";;AASA,sBAUC;AAGD,sDAMC;AA5BD,2DAAoE;AACpE,4DAA4F;AAC5F,0DAAsD;AAGtD;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACjC,OAAO,GAAS,EAAE,CACd,IAAA,kBAAK,EAAC;QACF,IAAA,kCAAe,EAAC,OAAO,CAAC;QACxB,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YACP,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;YAChE,GAAG,CAAC,OAAO,CAAC,IAAI,wBAAgB,CAAC,yBAAyB,EAAE,OAAO,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;YACvF,OAAO,CAAC,CAAC;QACb,CAAC;KACJ,CAAC,CAAC;AACX,CAAC;AAED,8BAA8B;AAC9B,SAAgB,qBAAqB,CAAC,OAAe;IACjD,OAAO,IAAA,kBAAK,EAAC;QACT,IAAA,sBAAS,EAAC,gBAAgB,EAAE,OAAO,CAAC;QACpC,IAAA,sBAAS,EAAC,YAAY,EAAE,OAAO,CAAC;QAChC,IAAA,sBAAS,EAAC,aAAa,EAAE,OAAO,CAAC;KACpC,CAAC,CAAC;AACP,CAAC"}
|