`
26 | })
27 |
28 | export class Component1 {
29 | @Input() title:any;
30 |
31 | constructor() {}
32 | }
33 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/test/test-comp2.component.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | import { Component, Input } from '@angular/core';
19 |
20 | @Component({
21 | selector: 'test-comp2',
22 | host: {
23 | '[attr.data-title]': 'title'
24 | },
25 | template: `
{{ title }}
`
26 | })
27 |
28 | export class Component2 {
29 | @Input() title:any;
30 |
31 | constructor() {}
32 | }
33 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/test/test-comp3.component.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 |
19 | import { Component, Input } from '@angular/core';
20 |
21 | @Component({
22 | selector: 'test-comp3',
23 | host: {
24 | '[attr.data-title]': 'title'
25 | },
26 | template: `
{{ title }}
`
27 | })
28 |
29 | export class Component3 {
30 | @Input() title:any;
31 | constructor() {}
32 | }
33 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/karma.conf.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 |
20 | const karmaConfigGenerator = require('../../karma-conf-generator');
21 |
22 | module.exports = function (config) {
23 | return karmaConfigGenerator(config, 'aem-angular-core-spa-wcm-components');
24 | };
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/core/karma.conf.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 |
20 | const karmaConfigGenerator = require('../../../karma-conf-generator');
21 |
22 | module.exports = function (config) {
23 | return karmaConfigGenerator(config, 'aem-angular-core-spa-wcm-components-core');
24 | };
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/core/common.ts:
--------------------------------------------------------------------------------
1 | import {ComponentMapping} from "@adobe/aem-angular-editable-components";
2 |
3 | export interface ContainerProperties {
4 | componentMapping?: typeof ComponentMapping;
5 | cqItems: {[key: string]: Model};
6 | cqItemsOrder: string[];
7 | baseCssClass: string;
8 | }
9 |
10 | export interface ContainerModel extends Model{
11 |
12 | }
13 |
14 |
15 | export interface Model extends Object {
16 | ":hierarchyType"?: string;
17 | /**
18 | * Path of the item/page
19 | */
20 | ":path"?: string;
21 | /**
22 | * Child pages (only present on page's itself, not on items)
23 | */
24 | ":children"?: {[key: string]: Model};
25 |
26 | /**
27 | * Items under the page / item
28 | */
29 | ":items"?: {[key: string]: Model};
30 |
31 | /**
32 | * Order of the items under the page / item
33 | * Can be used as keys for the :items property to iterate items in the proper order
34 | */
35 | ":itemsOrder"?: string[];
36 |
37 | /**
38 | * Resource type of the page / item
39 | */
40 | ":type"?: string;
41 | }
42 |
43 | export interface LabelledModel extends Model{
44 | "cq:panelTitle": string
45 | }
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/carousel/v1/karma.conf.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 | const karmaConfigGenerator = require('../../../../../karma-conf-generator');
20 |
21 | module.exports = function (config) {
22 | return karmaConfigGenerator(config, 'aem-angular-core-spa-wcm-components-carousel-v1');
23 | };
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/tabs/v1/karma.conf.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 |
20 | const karmaConfigGenerator = require('../../../../../karma-conf-generator');
21 |
22 | module.exports = function (config) {
23 | return karmaConfigGenerator(config, 'aem-angular-core-spa-wcm-components-tabs-v1');
24 | };
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/accordion/v1/karma.conf.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 | const karmaConfigGenerator = require('../../../../../karma-conf-generator');
20 |
21 | module.exports = function (config) {
22 | return karmaConfigGenerator(config, 'aem-angular-core-spa-wcm-components-accordion-v1');
23 | };
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/container/v1/karma.conf.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 |
20 | const karmaConfigGenerator = require('../../../../../karma-conf-generator');
21 |
22 | module.exports = function (config) {
23 | return karmaConfigGenerator(config, 'aem-angular-core-spa-wcm-components-container-v1');
24 | };
--------------------------------------------------------------------------------
/combine-coverage.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | const createReporter = require('istanbul-api').createReporter;
19 | const istanbulCoverage = require('istanbul-lib-coverage');
20 | const coverage = require('./coverage/coverage-final.json');
21 |
22 | const map = istanbulCoverage.createCoverageMap();
23 | Object.keys(coverage).forEach(filename => map.addFileCoverage(coverage[filename]));
24 |
25 | const reporter = createReporter();
26 | reporter.addAll(['html', 'lcovonly', 'text-summary']);
27 | reporter.write(map);
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/core/README.md:
--------------------------------------------------------------------------------
1 | # AemAngularCoreSpaWcmComponents
2 |
3 | This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.12.
4 |
5 | ## Code scaffolding
6 |
7 | Run `ng generate component component-name --project aem-angular-core-spa-wcm-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aem-angular-core-spa-wcm-components`.
8 | > Note: Don't forget to add `--project aem-angular-core-spa-wcm-components` or else it will be added to the default project in your `angular.json` file.
9 |
10 | ## Build
11 |
12 | Run `ng build aem-angular-core-spa-wcm-components` to build the project. The build artifacts will be stored in the `dist/` directory.
13 |
14 | ## Publishing
15 |
16 | After building your library with `ng build aem-angular-core-spa-wcm-components`, go to the dist folder `cd dist/aem-angular-core-spa-wcm-components` and run `npm publish`.
17 |
18 | ## Running unit tests
19 |
20 | Run `ng test aem-angular-core-spa-wcm-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21 |
22 | ## Further help
23 |
24 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
25 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/src/public-api.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | export * from './aem-angular-core-spa-wcm-components.module';
18 |
19 | export * from "@adobe/aem-core-components-angular-spa/core";
20 | export * from "@adobe/aem-core-components-angular-spa/containers/accordion/v1";
21 | export * from "@adobe/aem-core-components-angular-spa/containers/carousel/v1";
22 | export * from "@adobe/aem-core-components-angular-spa/containers/container/v1";
23 | export * from "@adobe/aem-core-components-angular-spa/containers/tabs/v1";
24 |
25 |
26 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/carousel/v1/README.md:
--------------------------------------------------------------------------------
1 | # AemAngularCoreSpaWcmComponents
2 |
3 | This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.12.
4 |
5 | ## Code scaffolding
6 |
7 | Run `ng generate component component-name --project aem-angular-core-spa-wcm-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aem-angular-core-spa-wcm-components`.
8 | > Note: Don't forget to add `--project aem-angular-core-spa-wcm-components` or else it will be added to the default project in your `angular.json` file.
9 |
10 | ## Build
11 |
12 | Run `ng build aem-angular-core-spa-wcm-components` to build the project. The build artifacts will be stored in the `dist/` directory.
13 |
14 | ## Publishing
15 |
16 | After building your library with `ng build aem-angular-core-spa-wcm-components`, go to the dist folder `cd dist/aem-angular-core-spa-wcm-components` and run `npm publish`.
17 |
18 | ## Running unit tests
19 |
20 | Run `ng test aem-angular-core-spa-wcm-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21 |
22 | ## Further help
23 |
24 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
25 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/tabs/v1/README.md:
--------------------------------------------------------------------------------
1 | # AemAngularCoreSpaWcmComponents
2 |
3 | This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.12.
4 |
5 | ## Code scaffolding
6 |
7 | Run `ng generate component component-name --project aem-angular-core-spa-wcm-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aem-angular-core-spa-wcm-components`.
8 | > Note: Don't forget to add `--project aem-angular-core-spa-wcm-components` or else it will be added to the default project in your `angular.json` file.
9 |
10 | ## Build
11 |
12 | Run `ng build aem-angular-core-spa-wcm-components` to build the project. The build artifacts will be stored in the `dist/` directory.
13 |
14 | ## Publishing
15 |
16 | After building your library with `ng build aem-angular-core-spa-wcm-components`, go to the dist folder `cd dist/aem-angular-core-spa-wcm-components` and run `npm publish`.
17 |
18 | ## Running unit tests
19 |
20 | Run `ng test aem-angular-core-spa-wcm-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21 |
22 | ## Further help
23 |
24 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
25 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/accordion/v1/README.md:
--------------------------------------------------------------------------------
1 | # AemAngularCoreSpaWcmComponents
2 |
3 | This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.12.
4 |
5 | ## Code scaffolding
6 |
7 | Run `ng generate component component-name --project aem-angular-core-spa-wcm-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aem-angular-core-spa-wcm-components`.
8 | > Note: Don't forget to add `--project aem-angular-core-spa-wcm-components` or else it will be added to the default project in your `angular.json` file.
9 |
10 | ## Build
11 |
12 | Run `ng build aem-angular-core-spa-wcm-components` to build the project. The build artifacts will be stored in the `dist/` directory.
13 |
14 | ## Publishing
15 |
16 | After building your library with `ng build aem-angular-core-spa-wcm-components`, go to the dist folder `cd dist/aem-angular-core-spa-wcm-components` and run `npm publish`.
17 |
18 | ## Running unit tests
19 |
20 | Run `ng test aem-angular-core-spa-wcm-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21 |
22 | ## Further help
23 |
24 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
25 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/container/v1/README.md:
--------------------------------------------------------------------------------
1 | # AemAngularCoreSpaWcmComponents
2 |
3 | This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.12.
4 |
5 | ## Code scaffolding
6 |
7 | Run `ng generate component component-name --project aem-angular-core-spa-wcm-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aem-angular-core-spa-wcm-components`.
8 | > Note: Don't forget to add `--project aem-angular-core-spa-wcm-components` or else it will be added to the default project in your `angular.json` file.
9 |
10 | ## Build
11 |
12 | Run `ng build aem-angular-core-spa-wcm-components` to build the project. The build artifacts will be stored in the `dist/` directory.
13 |
14 | ## Publishing
15 |
16 | After building your library with `ng build aem-angular-core-spa-wcm-components`, go to the dist folder `cd dist/aem-angular-core-spa-wcm-components` and run `npm publish`.
17 |
18 | ## Running unit tests
19 |
20 | Run `ng test aem-angular-core-spa-wcm-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21 |
22 | ## Further help
23 |
24 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
25 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/test/mapping.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 |
19 | import { MapTo, AEMResponsiveGridComponent } from "@adobe/aem-angular-editable-components";
20 |
21 | import { Component1 } from "./test-comp1.component";
22 | import { Component2 } from "./test-comp2.component";
23 | import { Component3 } from "./test-comp3.component";
24 |
25 | MapTo("app/components/comp1")(Component1);
26 | MapTo("app/components/comp2")(Component2);
27 | MapTo("app/components/comp3")(Component3);
28 | MapTo('wcm/foundation/components/responsivegrid')(AEMResponsiveGridComponent);
29 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/core/src/core.module.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | import {NgModule} from '@angular/core';
18 | import {CommonModule} from "@angular/common";
19 | import {BrowserModule} from "@angular/platform-browser";
20 | import {RouterModule} from "@angular/router";
21 | import {AbstractContainerComponent} from "./AbstractContainerComponent";
22 |
23 | @NgModule({
24 | imports: [CommonModule, RouterModule],
25 | declarations: [AbstractContainerComponent],
26 | exports: [AbstractContainerComponent],
27 | entryComponents: [AbstractContainerComponent],
28 | })
29 | export class AemAngularCoreSpaWcmComponentsCore {
30 | }
31 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/test/data/container.json:
--------------------------------------------------------------------------------
1 | {
2 | "gridClassNames": "aem-Grid-root-responsivegrid",
3 | "columnClassNames": {
4 | "component1": "aem-GridColumn-root-responsivegrid-component1",
5 | "component2": "aem-GridColumn-root-responsivegrid-component2",
6 | "component3": "aem-GridColumn-root-responsivegrid-component3",
7 | "component4": "aem-GridColumn-root-responsivegrid-component4",
8 | "component5": "aem-GridColumn-root-responsivegrid-component5"
9 | },
10 | "columnCount": 12,
11 | ":items": {
12 | "component1": {
13 | "title": "Component1",
14 | ":type": "app/components/comp1"
15 | },
16 | "component2": {
17 | "title": "Component2",
18 | ":type": "app/components/comp2"
19 | },
20 | "component3": {
21 | "title": "Component3",
22 | ":type": "app/components/comp3"
23 | },
24 | "component4": {
25 | "title": "Component4",
26 | ":type": "app/components/comp2"
27 | },
28 | "component5": {
29 | "title": "Component5",
30 | ":type": "app/components/comp1"
31 | }
32 | },
33 | ":itemsOrder": [
34 | "component1",
35 | "component3",
36 | "component5",
37 | "component2",
38 | "component4"
39 | ],
40 | ":type": "wcm/foundation/components/responsivegrid"
41 | }
42 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "downlevelIteration": true,
9 | "experimentalDecorators": true,
10 | "emitDecoratorMetadata": true,
11 | "module": "esnext",
12 | "moduleResolution": "node",
13 | "importHelpers": true,
14 | "target": "es2015",
15 | "lib": [
16 | "es2020",
17 | "dom"
18 | ],
19 | "paths": {
20 | "@angular/*": ["./node_modules/@angular/*"],
21 | "@adobe/aem-core-components-angular-spa": [
22 | "./dist/aem-angular-core-spa-wcm-components"
23 | ],
24 | "@adobe/aem-core-components-angular-spa/*": [
25 | "./dist/aem-angular-core-spa-wcm-components/*"
26 | ],
27 | "@adobe/aem-core-components-angular-base": [
28 | "./dist/aem-angular-core-wcm-components"
29 | ],
30 | "@adobe/aem-core-components-angular-base/*": [
31 | "./dist/aem-angular-core-wcm-components/*"
32 | ],
33 | "@adobe/aem-angular-editable-components":[
34 | "./node_modules/@adobe/aem-angular-editable-components"
35 | ]
36 | }
37 | },
38 | "angularCompilerOptions": {
39 | "enableIvy": false,
40 | "fullTemplateTypeCheck": true,
41 | "strictInjectionParameters": true
42 | }
43 | }
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/core/src/test.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | import 'core-js/features/reflect';
19 | import 'zone.js/dist/zone';
20 | import 'zone.js/dist/zone-testing';
21 | import { getTestBed } from '@angular/core/testing';
22 | import {
23 | BrowserDynamicTestingModule,
24 | platformBrowserDynamicTesting
25 | } from '@angular/platform-browser-dynamic/testing';
26 |
27 | declare const require: any;
28 |
29 | // First, initialize the Angular testing environment.
30 | getTestBed().initTestEnvironment(
31 | BrowserDynamicTestingModule,
32 | platformBrowserDynamicTesting()
33 | );
34 | // Then we find all the tests.
35 | const context = require.context('./../', true, /\.spec\.ts$/);
36 | // And load the modules.
37 | context.keys().map(context);
38 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/tabs/v1/src/test.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | import 'core-js/features/reflect';
19 | import 'zone.js/dist/zone';
20 | import 'zone.js/dist/zone-testing';
21 | import { getTestBed } from '@angular/core/testing';
22 | import {
23 | BrowserDynamicTestingModule,
24 | platformBrowserDynamicTesting
25 | } from '@angular/platform-browser-dynamic/testing';
26 |
27 | declare const require: any;
28 |
29 | // First, initialize the Angular testing environment.
30 | getTestBed().initTestEnvironment(
31 | BrowserDynamicTestingModule,
32 | platformBrowserDynamicTesting()
33 | );
34 | // Then we find all the tests.
35 | const context = require.context('./../', true, /\.spec\.ts$/);
36 | // And load the modules.
37 | context.keys().map(context);
38 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/accordion/v1/src/test.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | import 'core-js/features/reflect';
19 | import 'zone.js/dist/zone';
20 | import 'zone.js/dist/zone-testing';
21 | import { getTestBed } from '@angular/core/testing';
22 | import {
23 | BrowserDynamicTestingModule,
24 | platformBrowserDynamicTesting
25 | } from '@angular/platform-browser-dynamic/testing';
26 |
27 | declare const require: any;
28 |
29 | // First, initialize the Angular testing environment.
30 | getTestBed().initTestEnvironment(
31 | BrowserDynamicTestingModule,
32 | platformBrowserDynamicTesting()
33 | );
34 | // Then we find all the tests.
35 | const context = require.context('./../', true, /\.spec\.ts$/);
36 | // And load the modules.
37 | context.keys().map(context);
38 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/carousel/v1/src/test.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | import 'core-js/features/reflect';
19 | import 'zone.js/dist/zone';
20 | import 'zone.js/dist/zone-testing';
21 | import { getTestBed } from '@angular/core/testing';
22 | import {
23 | BrowserDynamicTestingModule,
24 | platformBrowserDynamicTesting
25 | } from '@angular/platform-browser-dynamic/testing';
26 |
27 | declare const require: any;
28 |
29 | // First, initialize the Angular testing environment.
30 | getTestBed().initTestEnvironment(
31 | BrowserDynamicTestingModule,
32 | platformBrowserDynamicTesting()
33 | );
34 | // Then we find all the tests.
35 | const context = require.context('./../', true, /\.spec\.ts$/);
36 | // And load the modules.
37 | context.keys().map(context);
38 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/container/v1/src/test.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | import 'core-js/features/reflect';
19 | import 'zone.js/dist/zone';
20 | import 'zone.js/dist/zone-testing';
21 | import { getTestBed } from '@angular/core/testing';
22 | import {
23 | BrowserDynamicTestingModule,
24 | platformBrowserDynamicTesting
25 | } from '@angular/platform-browser-dynamic/testing';
26 |
27 | declare const require: any;
28 |
29 | // First, initialize the Angular testing environment.
30 | getTestBed().initTestEnvironment(
31 | BrowserDynamicTestingModule,
32 | platformBrowserDynamicTesting()
33 | );
34 | // Then we find all the tests.
35 | const context = require.context('./../', true, /\.spec\.ts$/);
36 | // And load the modules.
37 | context.keys().map(context);
38 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/accordion/v1/src/accordion.v1.module.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 | import {NgModule} from '@angular/core';
17 | import {CommonModule} from "@angular/common";
18 | import {RouterModule} from "@angular/router";
19 | import {AccordionV1Component} from "./accordion.v1.component";
20 | import {SpaAngularEditableComponentsModule} from "@adobe/aem-angular-editable-components";
21 | import {AemAngularCoreSpaWcmComponentsCore} from "@adobe/aem-core-components-angular-spa/core";
22 |
23 | @NgModule({
24 | imports: [CommonModule, RouterModule,SpaAngularEditableComponentsModule,AemAngularCoreSpaWcmComponentsCore],
25 | declarations: [
26 | AccordionV1Component
27 | ],
28 | exports: [
29 | AccordionV1Component
30 | ]
31 | })
32 | export class AemAngularCoreWcmComponentsAccordionV1 {
33 | }
34 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/tabs/v1/src/tabs.v1.module.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 |
18 | import {NgModule} from '@angular/core';
19 | import {CommonModule} from "@angular/common";
20 | import {BrowserModule} from "@angular/platform-browser";
21 | import {RouterModule} from "@angular/router";
22 | import {TabsV1Component} from "./tabs.v1.component";
23 | import {SpaAngularEditableComponentsModule} from "@adobe/aem-angular-editable-components";
24 | import {AemAngularCoreSpaWcmComponentsCore} from "@adobe/aem-core-components-angular-spa/core";
25 |
26 | @NgModule({
27 | imports: [CommonModule, BrowserModule, RouterModule,SpaAngularEditableComponentsModule,AemAngularCoreSpaWcmComponentsCore],
28 | declarations: [
29 | TabsV1Component
30 | ],
31 | exports: [
32 | TabsV1Component
33 | ],
34 | entryComponents: [
35 | TabsV1Component,
36 | ],
37 | })
38 | export class AemAngularCoreWcmComponentsTabsV1 {}
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/src/test.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
18 |
19 | import 'zone.js/dist/zone';
20 | import 'zone.js/dist/zone-testing';
21 | import { getTestBed } from '@angular/core/testing';
22 | import {
23 | BrowserDynamicTestingModule,
24 | platformBrowserDynamicTesting
25 | } from '@angular/platform-browser-dynamic/testing';
26 |
27 | declare const require: {
28 | context(path: string, deep?: boolean, filter?: RegExp): {
29 | keys(): string[];
30 | (id: string): T;
31 | };
32 | };
33 |
34 | // First, initialize the Angular testing environment.
35 | getTestBed().initTestEnvironment(
36 | BrowserDynamicTestingModule,
37 | platformBrowserDynamicTesting()
38 | );
39 | // Then we find all the tests.
40 | const context = require.context('./../', true, /\.spec\.ts$/);
41 | // And load the modules.
42 | context.keys().map(context);
43 |
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/carousel/v1/src/carousel.v1.module.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 | import {NgModule} from '@angular/core';
17 | import {CommonModule} from "@angular/common";
18 | import {BrowserModule} from "@angular/platform-browser";
19 | import {RouterModule} from "@angular/router";
20 | import {CarouselV1Component} from "./carousel.v1.component";
21 | import {SpaAngularEditableComponentsModule} from "@adobe/aem-angular-editable-components";
22 | import {AemAngularCoreSpaWcmComponentsCore} from "@adobe/aem-core-components-angular-spa/core";
23 |
24 | @NgModule({
25 | imports: [CommonModule, BrowserModule, RouterModule,SpaAngularEditableComponentsModule,AemAngularCoreSpaWcmComponentsCore],
26 | declarations: [
27 | CarouselV1Component
28 | ],
29 | exports: [
30 | CarouselV1Component
31 | ],
32 | entryComponents: [
33 | CarouselV1Component,
34 | ],
35 | })
36 | export class AemAngularCoreWcmComponentsCarouselV1 {}
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/container/v1/src/container.v1.module.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | import {NgModule} from '@angular/core';
18 | import {CommonModule} from "@angular/common";
19 | import {BrowserModule} from "@angular/platform-browser";
20 | import {RouterModule} from "@angular/router";
21 | import {ContainerV1Component} from "./container.v1.component";
22 | import {SpaAngularEditableComponentsModule} from "@adobe/aem-angular-editable-components";
23 | import {AemAngularCoreSpaWcmComponentsCore} from "@adobe/aem-core-components-angular-spa/core";
24 |
25 | @NgModule({
26 | imports: [CommonModule, BrowserModule, RouterModule,SpaAngularEditableComponentsModule,AemAngularCoreSpaWcmComponentsCore],
27 | declarations: [
28 | ContainerV1Component
29 | ],
30 | exports: [
31 | ContainerV1Component
32 | ],
33 | entryComponents: [
34 | ContainerV1Component,
35 | ],
36 | })
37 | export class AemAngularCoreWcmComponentsContainerV1 {}
--------------------------------------------------------------------------------
/karma-conf-generator.local.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 |
20 | module.exports = function (config, projectName) {
21 | config.set({
22 | basePath: '',
23 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
24 | plugins: [
25 | require('karma-jasmine'),
26 | require('karma-chrome-launcher'),
27 | require('karma-jasmine-html-reporter'),
28 | require('karma-coverage-istanbul-reporter'),
29 | require('@angular-devkit/build-angular/plugins/karma')
30 | ],
31 | client: {
32 | clearContext: false // leave Jasmine Spec Runner output visible in browser
33 | },
34 | coverageIstanbulReporter: {
35 | dir: require('path').join(__dirname, '/coverage/' + projectName),
36 | reports: ['json'],
37 | fixWebpackSourcePaths: true
38 | },
39 | reporters: ['progress', 'kjhtml'],
40 | port: 9876,
41 | colors: true,
42 | logLevel: config.LOG_INFO,
43 | failOnEmptyTestSuite: false,
44 | autoWatch: true,
45 | browsers: ['Chrome'],
46 | singleRun: false,
47 | restartOnFileChange: true
48 | });
49 | };
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/test/data/layout.json:
--------------------------------------------------------------------------------
1 | {
2 | ":items":
3 | {
4 | "root":
5 | {
6 | "gridClassNames": "aem-Grid/root",
7 | "classNames": "test-class-names",
8 | "columnClassNames": {
9 | "responsivegrid": "aem-GridColumn/root/responsivegrid"
10 | },
11 | "columnCount": 12,
12 | ":items":
13 | {
14 | "responsivegrid":
15 | {
16 | "gridClassNames": "aem-Grid/root/responsivegrid",
17 | "columnClassNames": {
18 | "component1": "aem-GridColumn/root/responsivegrid/component1",
19 | "component2": "aem-GridColumn/root/responsivegrid/component2",
20 | "component3": "aem-GridColumn/root/responsivegrid/component3",
21 | "component4": "aem-GridColumn/root/responsivegrid/component4",
22 | "component5": "aem-GridColumn/root/responsivegrid/component5"
23 | },
24 | "columnCount": 12,
25 | ":items":
26 | {
27 | "component1":
28 | {
29 | "title": "Component1",
30 | ":type": "app/components/comp1"
31 | },
32 | "component2":
33 | {
34 | "title": "Component2",
35 | ":type": "app/components/comp2"
36 | },
37 | "component3":
38 | {
39 | "title": "Component3",
40 | ":type": "app/components/comp3"
41 | },
42 | "component4":
43 | {
44 | "title": "Component4",
45 | ":type": "app/components/comp2"
46 | },
47 | "component5":
48 | {
49 | "title": "Component5",
50 | ":type": "app/components/comp1"
51 | }
52 | },
53 | ":itemsOrder": ["component1", "component3", "component5", "component2", "component4"],
54 | ":type": "wcm/foundation/components/responsivegrid"
55 | }
56 | },
57 | ":itemsOrder": ["responsivegrid"],
58 | ":type": "wcm/foundation/components/responsivegrid"
59 | }
60 | },
61 | ":itemsOrder": ["root"]
62 | }
63 |
--------------------------------------------------------------------------------
/karma-conf-generator.js:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | // Karma configuration file, see link for more information
18 | // https://karma-runner.github.io/1.0/config/configuration-file.html
19 | const puppeteer = require('puppeteer');
20 | process.env.CHROME_BIN = puppeteer.executablePath();
21 |
22 |
23 | module.exports = function (config, projectName) {
24 | config.set({
25 | basePath: '',
26 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
27 | plugins: [
28 | require('karma-jasmine'),
29 | require('karma-chrome-launcher'),
30 | require('karma-jasmine-html-reporter'),
31 | require('karma-coverage-istanbul-reporter'),
32 | require('@angular-devkit/build-angular/plugins/karma')
33 | ],
34 | client: {
35 | clearContext: false // leave Jasmine Spec Runner output visible in browser
36 | },
37 | coverageIstanbulReporter: {
38 | dir: require('path').join(__dirname, '/coverage/' + projectName),
39 | reports: ['json'],
40 | fixWebpackSourcePaths: true
41 | },
42 | reporters: ['progress', 'kjhtml'],
43 | port: 9876,
44 | colors: true,
45 | logLevel: config.LOG_INFO,
46 | failOnEmptyTestSuite: false,
47 | autoWatch: true,
48 | browsers: ['ChromeHeadless'],
49 | singleRun: true,
50 | restartOnFileChange: true
51 | });
52 | };
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/README.md:
--------------------------------------------------------------------------------
1 | # AEM WCM Components - Spa editor - Angular Core implementation
2 |
3 | This module provides a Angular implementation for the containers in the [AEM core components](https://www.aemcomponents.dev/).
4 | This only works with the [AEM SPA editor](https://docs.adobe.com/content/help/en/experience-manager-64/developing/headless/spas/spa-overview.html).
5 |
6 | Current supported / exported components:
7 |
8 | ### Containers
9 | - Accordion (V1)
10 | - Carousel (V1)
11 | - Container (V1)
12 | - Tabs (V1)
13 |
14 | ### Abstraction
15 | - AbstractCoreContainerComponent
16 |
17 | ## Usage
18 |
19 | You can choose to import the entire library at once OR import components individually.
20 | The latter is useful if you want to only enable a few components and you want to save your javascript footprint.
21 | Also, if you want to load all core components, but you want to lazyload them with angular suspense, you will need to import them individually.
22 |
23 | ### Importing the whole library:
24 |
25 | ```
26 | import * as SpaCoreComponents from "@adobe/aem-core-components-angular-spa";
27 | const {CarouselV1, CarouselV1IsEmptyFn} = BaseCoreComponents;
28 | ```
29 |
30 | ### Importing the CarouselV1 component individually (for code splitting):
31 |
32 | ```
33 | import {CarouselV1, CarouselV1IsEmptyFn} from "@adobe/aem-core-components-angular-spa/containers/carousel/v1";
34 | ```
35 |
36 | ### Using the imported code
37 |
38 | Now that you have the CarouselV1 and CarouselV1IsEmptyFn imported, you can use them in your project.
39 | The properties of the Button 1 on 1 correspond to the Sling Model Exporter (.model.json) output.
40 |
41 | Note: There are some exceptions where some extra properties are added (mainly i18n labels) that are currently not present in the OOTB sling model exports.
42 | These can be added by the project itself with delegation. If they are not present, the default (English) values will be used.
43 |
44 | #### Carousel - Example with the spa editor:
45 |
46 | ```
47 | MapTo('my-project/wcm/components/containers')(CarouselV1, {isEmpty: CarouselV1IsEmptyFn});
48 | ```
49 |
50 | For a complete project with examples, visit the [github page](https://github.com/adobe/aem-angular-core-wcm-components/tree/master/examples).
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/core/src/common.ts:
--------------------------------------------------------------------------------
1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | ~ Copyright 2020 Adobe Systems Incorporated
3 | ~
4 | ~ Licensed under the Apache License, Version 2.0 (the "License");
5 | ~ you may not use this file except in compliance with the License.
6 | ~ You may obtain a copy of the License at
7 | ~
8 | ~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~
10 | ~ Unless required by applicable law or agreed to in writing, software
11 | ~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~ See the License for the specific language governing permissions and
14 | ~ limitations under the License.
15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16 |
17 | import {ComponentMapping,MappedComponentProperties} from "@adobe/aem-angular-editable-components";
18 |
19 | export interface ContainerProperties extends MappedComponentProperties {
20 | componentMapping?: typeof ComponentMapping;
21 | cqItems: {[key: string]: Model};
22 | cqItemsOrder: string[];
23 | }
24 |
25 | export interface ContainerModel extends Model{
26 |
27 | }
28 |
29 |
30 | export interface Model extends Object {
31 | ":hierarchyType"?: string;
32 | /**
33 | * Path of the item/page
34 | */
35 | ":path"?: string;
36 | /**
37 | * Child pages (only present on page's itself, not on items)
38 | */
39 | ":children"?: {[key: string]: Model};
40 |
41 | /**
42 | * Items under the page / item
43 | */
44 | ":items"?: {[key: string]: Model};
45 |
46 | /**
47 | * Order of the items under the page / item
48 | * Can be used as keys for the :items property to iterate items in the proper order
49 | */
50 | ":itemsOrder"?: string[];
51 |
52 | /**
53 | * Resource type of the page / item
54 | */
55 | ":type"?: string;
56 | }
57 |
58 | export interface LabelledModel extends Model{
59 | "cq:panelTitle": string
60 | }
61 |
62 | /**
63 | * Indicated whether force reload is turned on, forcing the model to be refetched on every MapTo instantiation.
64 | */
65 | export interface ReloadForceAble {
66 | cqForceReload?: boolean;
67 | }
--------------------------------------------------------------------------------
/projects/aem-angular-core-spa-wcm-components/containers/tabs/v1/src/tabs.v1.component.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |