Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Feat] Composer module #36

Draft
wants to merge 118 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
b2f98de
feat(composer): add library skeleton
gund Mar 15, 2019
3c7326a
chore(package): fix jest version
gund Mar 15, 2019
2ea0a97
chore(package): add composer build scripts
gund Mar 15, 2019
0f49eb9
feat(composer): add 7 public unimplemented components
gund Mar 15, 2019
86af8d2
style: reformat source files
gund Mar 15, 2019
1ac941f
feat(composer): add main component
gund Mar 15, 2019
b525077
fix(composer): add configurator to private import
gund Mar 15, 2019
c73a9c1
fix(composer): expose public components via API
gund Mar 15, 2019
57b9f97
feat(composer): add droppable internal component
gund Mar 15, 2019
0a952a2
fix(composer): use on push in configurator component
gund Mar 15, 2019
3188d9d
fix(core): add component map to public API
gund Mar 15, 2019
f5e4d04
docs(composer): add example application
gund Mar 15, 2019
48566ff
chore(composer): fix tslint selector
gund Mar 15, 2019
ce93fd9
fix(core): expose only component registry to public API
gund Mar 18, 2019
e594725
refactor(core): update componet registry imports
gund Mar 18, 2019
7dca5ca
feat(core): add getComponent method to ComponentLocatorService
gund Mar 18, 2019
da349f2
fix(core): export component locator service via public API
gund Mar 18, 2019
564938a
fix(core): do not fail if not components registered
gund Mar 18, 2019
1aadb71
fix(core): aot compilation of component locator service
gund Mar 19, 2019
822241c
feat(composer): add ant design to example app
gund Mar 19, 2019
31c51a6
feat(composer): render list of all components
gund Mar 19, 2019
6f5b884
docs(composer): add more components to example
gund Mar 19, 2019
a72a3f3
test(composer): fix main component test
gund Mar 19, 2019
d9545fb
chore(composer): update ng-zorro-antd to v7.0.5
gund Jun 7, 2019
59d1b9e
fix(composer): render components list in fixed sider layout
gund Jun 7, 2019
7bfeca7
fix(composer): remove unused menu module import
gund Jun 7, 2019
17e2bb3
refactor(core): update injection token description
gund Jun 15, 2019
4c09d4f
feat(composer): implement basic drag'n'drop in canvas component
gund Jun 15, 2019
ec39fb2
style(composer): reformat code
gund Jun 15, 2019
8d9a212
fix(core): add generics to local injector types
gund Jun 16, 2019
617ca67
refactor(composer): use RenderComponent API in droppable component
gund Jun 16, 2019
33eb44e
fix(core): collect type info of configurations
gund Jun 16, 2019
13bc599
build(ts): set lib to exnext for all packages
gund Jun 16, 2019
ef2e9ad
feat(composer): generate config form for dynamic components
gund Jun 16, 2019
d40d8a0
docs(composer): add browser animations module to app
gund Jun 16, 2019
4f2b1a5
style(composer): reformat code
gund Jun 16, 2019
64d71aa
fix(composer): update components with new config
gund Jun 16, 2019
4157a5d
fix(composer): config updates of components
Jun 17, 2019
19f5036
fix(layout): track items by component
gund Jun 17, 2019
54aa0fd
fix(core): return mapped injector from getInjector token
gund Jun 17, 2019
75be126
chore(layout): remove logging from component
gund Jun 17, 2019
404334c
fix(layout): correct track by function signature
gund Jun 17, 2019
1adc3a7
fix(composer): properly update components in droppable component
gund Jun 17, 2019
e6a0c39
feat(composer): allow to remove and clear items
gund Jun 18, 2019
2cdc0e9
docs(composer): add http client module for ant icons module
gund Jun 18, 2019
aef0d4a
test(core): fix local injector tests
gund Jun 18, 2019
8ea87f3
fix(composer): hide controls popover when child hovered
gund Jun 24, 2019
a5089d3
refactor(composer): cleanup unused code in droppable component
gund Jul 7, 2019
91b991b
refactor(composer): move config resolution from component to service
gund Jul 7, 2019
076ccf2
refactor(composer): extract decortator configurations components into DI
gund Aug 6, 2019
9336be7
test(composer): disable unimlemented unit tests for new components
gund Aug 6, 2019
2c3231a
refactor(core): cleanup small things
Aug 14, 2019
5876771
feat(composer): add library skeleton
gund Mar 15, 2019
334d729
chore(package): fix jest version
gund Mar 15, 2019
9525d5e
feat(composer): add 7 public unimplemented components
gund Mar 15, 2019
dc70f8d
style: reformat source files
gund Mar 15, 2019
4b66829
feat(composer): add main component
gund Mar 15, 2019
c894882
fix(composer): add configurator to private import
gund Mar 15, 2019
a6175ce
fix(composer): expose public components via API
gund Mar 15, 2019
fac7fcf
feat(composer): add droppable internal component
gund Mar 15, 2019
d5a2538
fix(composer): use on push in configurator component
gund Mar 15, 2019
a81b897
docs(composer): add example application
gund Mar 15, 2019
82a05f0
chore(composer): fix tslint selector
gund Mar 15, 2019
5fe8fd5
fix(core): expose only component registry to public API
gund Mar 18, 2019
aeb45b2
refactor(core): update componet registry imports
gund Mar 18, 2019
dc16491
feat(core): add getComponent method to ComponentLocatorService
gund Mar 18, 2019
b4a4db7
fix(core): export component locator service via public API
gund Mar 18, 2019
de951e2
fix(core): do not fail if not components registered
gund Mar 18, 2019
de00967
fix(core): aot compilation of component locator service
gund Mar 19, 2019
b31309a
feat(composer): add ant design to example app
gund Mar 19, 2019
6e4fb03
feat(composer): render list of all components
gund Mar 19, 2019
2334003
docs(composer): add more components to example
gund Mar 19, 2019
4f01c35
test(composer): fix main component test
gund Mar 19, 2019
61dfba6
chore(composer): update ng-zorro-antd to v7.0.5
gund Jun 7, 2019
31fc4ca
fix(composer): render components list in fixed sider layout
gund Jun 7, 2019
a5c199a
fix(composer): remove unused menu module import
gund Jun 7, 2019
65504db
refactor(core): update injection token description
gund Jun 15, 2019
fa11f61
feat(composer): implement basic drag'n'drop in canvas component
gund Jun 15, 2019
3e5bea1
style(composer): reformat code
gund Jun 15, 2019
8dba993
fix(core): add generics to local injector types
gund Jun 16, 2019
78bfe38
refactor(composer): use RenderComponent API in droppable component
gund Jun 16, 2019
e541747
fix(core): collect type info of configurations
gund Jun 16, 2019
8a1d100
build(ts): set lib to exnext for all packages
gund Jun 16, 2019
10bf2c2
feat(composer): generate config form for dynamic components
gund Jun 16, 2019
36be8af
docs(composer): add browser animations module to app
gund Jun 16, 2019
2123516
style(composer): reformat code
gund Jun 16, 2019
28d954d
fix(composer): update components with new config
gund Jun 16, 2019
f2f0771
fix(composer): config updates of components
Jun 17, 2019
dea60b6
fix(layout): track items by component
gund Jun 17, 2019
4fbe6f6
fix(core): return mapped injector from getInjector token
gund Jun 17, 2019
448f316
chore(layout): remove logging from component
gund Jun 17, 2019
bf8548f
fix(layout): correct track by function signature
gund Jun 17, 2019
fb4e499
fix(composer): properly update components in droppable component
gund Jun 17, 2019
a802fc6
feat(composer): allow to remove and clear items
gund Jun 18, 2019
628a428
docs(composer): add http client module for ant icons module
gund Jun 18, 2019
d3ec532
test(core): fix local injector tests
gund Jun 18, 2019
575cd8c
fix(composer): hide controls popover when child hovered
gund Jun 24, 2019
6d10cbf
refactor(composer): cleanup unused code in droppable component
gund Jul 7, 2019
5d3b95a
refactor(composer): move config resolution from component to service
gund Jul 7, 2019
2dddd92
refactor(composer): extract decortator configurations components into DI
gund Aug 6, 2019
d150c7a
test(composer): disable unimlemented unit tests for new components
gund Aug 6, 2019
4dbd039
refactor(core): cleanup small things
Aug 14, 2019
30bfd36
test(e2e): update composer e2e app files
gund Jan 14, 2022
3a5abe8
fix(composer): update example app to Angular v13
gund Jan 14, 2022
89c6f05
fix(composer): update lib to Angular v13
gund Jan 15, 2022
7adcb23
fix(composer): add used Ant styles to the lib
gund Jan 15, 2022
78fdb0f
fix(composer): add styles to app
gund Jan 15, 2022
bc03272
fix(compser): fix styles module specifier in lib package
gund Jan 15, 2022
7b62c01
chore(composer): update comment in app styles
gund Jan 15, 2022
336a799
Merge branch 'feat-composer-module' into feat-composer-module-update
gund Jan 15, 2022
5f3ca69
fix(core): update components token file
gund Jan 15, 2022
5536d18
refactor(composer): remove old files from merge
gund Jan 15, 2022
35503f3
refactor(composer): remove/replace tslint comments with eslint
gund Jan 15, 2022
fc3f658
refactor(core): remove/replace tslint comments with eslint
gund Jan 15, 2022
1bfa9b4
refactor(stepper): remove/replace tslint comments with eslint
gund Jan 15, 2022
694f379
fix(core): provide context getter once in local providers
gund Jan 15, 2022
fb25c9f
fix(composer): add Ant package to dependencies
gund Jan 15, 2022
acd24f6
Merge pull request #68 from orchestratora/feat-composer-module-update
gund Feb 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 176 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,182 @@
}
},
"schematics": {}
},
"composer": {
"root": "libs/composer",
"sourceRoot": "libs/composer/src",
"projectType": "library",
"prefix": "orc",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "libs/composer/tsconfig.lib.json",
"project": "libs/composer/ng-package.json"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"libs/composer/tsconfig.lib.json",
"libs/composer/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
},
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"configPath": "jest.config.js"
}
}
},
"schematics": {}
},
"composer-example": {
"root": "apps/composer-example/",
"sourceRoot": "apps/composer-example/src",
"projectType": "application",
"prefix": "orc",
"schematics": {
"@nrwl/schematics:class": {
"skipTests": true
},
"@nrwl/schematics:component": {
"skipTests": true
},
"@nrwl/schematics:directive": {
"skipTests": true
},
"@nrwl/schematics:guard": {
"skipTests": true
},
"@nrwl/schematics:module": {
"skipTests": true
},
"@nrwl/schematics:pipe": {
"skipTests": true
},
"@nrwl/schematics:service": {
"skipTests": true
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/apps/composer-example",
"index": "apps/composer-example/src/index.html",
"main": "apps/composer-example/src/main.ts",
"polyfills": "apps/composer-example/src/polyfills.ts",
"tsConfig": "apps/composer-example/tsconfig.app.json",
"assets": [
"apps/composer-example/src/favicon.ico",
"apps/composer-example/src/assets",
{
"glob": "**/*",
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
],
"styles": [
"apps/composer-example/src/styles.css",
"node_modules/ng-zorro-antd/ng-zorro-antd.min.css"
],
"scripts": [],
"es5BrowserSupport": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "apps/composer-example/src/environments/environment.ts",
"with": "apps/composer-example/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "composer-example:build"
},
"configurations": {
"production": {
"browserTarget": "composer-example:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "composer-example:build"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"apps/composer-example/tsconfig.app.json",
"apps/composer-example/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
},
"test": {
"builder": "@nrwl/builders:jest",
"options": {
"jestConfig": "apps/composer-example/jest.config.js",
"tsConfig": "apps/composer-example/tsconfig.spec.json",
"setupFile": "apps/composer-example/src/test-setup.ts"
}
}
}
},
"composer-example-e2e": {
"root": "apps/composer-example-e2e",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@nrwl/builders:cypress",
"options": {
"cypressConfig": "apps/composer-example-e2e/cypress.json",
"tsConfig": "apps/composer-example-e2e/tsconfig.e2e.json",
"devServerTarget": "composer-example:serve"
},
"configurations": {
"production": {
"devServerTarget": "composer-example:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "apps/composer-example-e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"cli": {
Expand Down
11 changes: 11 additions & 0 deletions apps/composer-example-e2e/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"fileServerFolder": "../../dist/out-tsc/apps/composer-example-e2e",
"fixturesFolder": "../../dist/out-tsc/apps/composer-example-e2e/src/fixtures",
"integrationFolder": "../../dist/out-tsc/apps/composer-example-e2e/src/integration",
"pluginsFile": "../../dist/out-tsc/apps/composer-example-e2e/src/plugins/index.js",
"supportFile": false,
"video": true,
"videosFolder": "../../dist/out-tsc/apps/composer-example-e2e/videos",
"screenshotsFolder": "../../dist/out-tsc/apps/composer-example-e2e/screenshots",
"chromeWebSecurity": false
}
4 changes: 4 additions & 0 deletions apps/composer-example-e2e/src/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]"
}
9 changes: 9 additions & 0 deletions apps/composer-example-e2e/src/integration/app.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { getGreeting } from '../support/app.po';

describe('Hello Nx', () => {
beforeEach(() => cy.visit('/'));

it('should display welcome message', () => {
getGreeting().contains('Welcome to composer-example!');
});
});
17 changes: 17 additions & 0 deletions apps/composer-example-e2e/src/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

module.exports = (on: Cypress.Actions, config: Cypress.ConfigOptions) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
};
1 change: 1 addition & 0 deletions apps/composer-example-e2e/src/support/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const getGreeting = () => cy.get('h1');
25 changes: 25 additions & 0 deletions apps/composer-example-e2e/src/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
17 changes: 17 additions & 0 deletions apps/composer-example-e2e/src/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';
8 changes: 8 additions & 0 deletions apps/composer-example-e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": false,
"outDir": "../../dist/out-tsc/apps/composer-example-e2e/src"
},
"include": ["src/**/*.ts"]
}
7 changes: 7 additions & 0 deletions apps/composer-example-e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"types": ["cypress", "node"]
},
"include": ["**/*.ts"]
}
11 changes: 11 additions & 0 deletions apps/composer-example/browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11
9 changes: 9 additions & 0 deletions apps/composer-example/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
name: 'composer-example',
preset: '../../jest.config.js',
coverageDirectory: '../../coverage/apps/composer-example/',
snapshotSerializers: [
'jest-preset-angular/AngularSnapshotSerializer.js',
'jest-preset-angular/HTMLCommentSerializer.js',
],
};
Empty file.
10 changes: 10 additions & 0 deletions apps/composer-example/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h1>Composer Example</h1>

<nav>
<ul>
<li><a [routerLink]="['/']">Home</a></li>
<li><a [routerLink]="['/default']">Default</a></li>
</ul>
</nav>

<router-outlet></router-outlet>
8 changes: 8 additions & 0 deletions apps/composer-example/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'orc-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {}
30 changes: 30 additions & 0 deletions apps/composer-example/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';

import { AppComponent } from './app.component';

@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
RouterModule.forRoot([
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{
path: 'home',
loadChildren: './home/home.module#HomeModule',
},
{
path: 'default',
loadChildren: './default/default.module#DefaultModule',
},
]),
],
declarations: [AppComponent],
bootstrap: [AppComponent],
providers: [],
})
export class AppModule {}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<orc-composer></orc-composer>
13 changes: 13 additions & 0 deletions apps/composer-example/src/app/default/default.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';

@Component({
selector: 'orc-default',
templateUrl: './default.component.html',
styleUrls: ['./default.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DefaultComponent implements OnInit {
constructor() {}

ngOnInit() {}
}
Loading