@farris/jit-engine 1.3.223 → 1.3.227
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/README.md +4 -9
- package/lib/domstructure/.DS_Store +0 -0
- package/lib/domstructure/devkit/.DS_Store +0 -0
- package/lib/domstructure/devkit/section-toolbar/farris-section-toolbar.js.map +1 -1
- package/lib/domstructure/devkit/tab-toolbar/farris-tab-toolbar.js.map +1 -1
- package/lib/domstructure/ui/.DS_Store +0 -0
- package/lib/domstructure/ui/common/appearance.js +3 -2
- package/lib/domstructure/ui/common/appearance.js.map +1 -1
- package/lib/domstructure/ui/data/fields/form/editable/inputs/reference/lookup_edit.js +2 -2
- package/lib/domstructure/ui/data/fields/form/editable/inputs/reference/lookup_edit.js.map +1 -1
- package/lib/domstructure/ui/farris-fileupload-preview/.DS_Store +0 -0
- package/lib/domstructure/ui/multi-select/multi-select.js +4 -1
- package/lib/domstructure/ui/multi-select/multi-select.js.map +1 -1
- package/lib/domstructure/ui/table/farris-table-column.js +1 -0
- package/lib/domstructure/ui/table/farris-table-column.js.map +1 -1
- package/lib/domstructure/ui/table/farris-table-static-text.js.map +1 -1
- package/lib/entity/.DS_Store +0 -0
- package/lib/entity/jit-input-options/jit-input-options.js +2 -0
- package/lib/entity/jit-input-options/jit-input-options.js.map +1 -1
- package/lib/generator/.DS_Store +0 -0
- package/lib/mobileapp/vue/static/.gitignore +13 -0
- package/lib/template/devkit/approuting.pug +19 -19
- package/lib/template/devkit/befproxy.pug +77 -77
- package/lib/template/devkit/commandhandler.pug +65 -65
- package/lib/template/devkit/common/validrules.pug +44 -44
- package/lib/template/devkit/component.pug +658 -658
- package/lib/template/devkit/entity.pug +119 -119
- package/lib/template/devkit/event.pug +29 -29
- package/lib/template/devkit/form.pug +56 -56
- package/lib/template/devkit/lang.pug +27 -27
- package/lib/template/devkit/module.pug +268 -268
- package/lib/template/devkit/repository.pug +51 -51
- package/lib/template/devkit/router.pug +55 -55
- package/lib/template/devkit/service.pug +23 -23
- package/lib/template/devkit/solution.1.pug +47 -47
- package/lib/template/devkit/solution.pug +58 -58
- package/lib/template/devkit/state.pug +18 -18
- package/lib/template/devkit/statemachine.pug +45 -45
- package/lib/template/devkit/viewmodel.pug +83 -83
- package/lib/template/ui/kendo/lookup.pug +1 -1
- package/lib/template/ui/kendo/multi-select.pug +1 -1
- package/lib/template/ui/kendo/table/farris-datepicker.pug +1 -0
- package/lib/template/ui/kendo/table/farris-static-text.pug +1 -2
- package/lib/template/ui/kendo/table/farris-time-picker.pug +1 -1
- package/lib/template/ui/kendo/table/lookup.pug +1 -1
- package/lib/template/ui/kendo/table/multi-select.pug +1 -1
- package/lib/template/ui/mobileapprove/attachment-panel-for-mobileapprove.pug +14 -14
- package/lib/template/ui/mobileapprove/content-container.pug +6 -6
- package/lib/template/ui/mobileapprove/detailheader-for-mobileapprove.pug +16 -16
- package/lib/template/ui/mobileapprove/fieldset-for-mobileapprove.pug +6 -6
- package/lib/template/ui/mobileapprove/html-panel-for-mobileapprove.pug +22 -22
- package/lib/template/ui/mobileapprove/html-template.pug +2 -2
- package/lib/template/ui/mobileapprove/panel-for-mobileapprove.pug +10 -10
- package/lib/template/ui/mobileapprove/statictext-for-mobileapprove.pug +22 -22
- package/lib/utility/devkit/component-external-container-parameter-creator.js.map +1 -1
- package/lib/utility/devkit/component-parameter-collector/farris-section-collector.js +14 -5
- package/lib/utility/devkit/component-parameter-collector/farris-section-collector.js.map +1 -1
- package/lib/utility/devkit/component-parameter-collector/farris-tabs-collector.js +14 -5
- package/lib/utility/devkit/component-parameter-collector/farris-tabs-collector.js.map +1 -1
- package/lib/utility/farris-datagrid/lookup-editor.js +6 -2
- package/lib/utility/farris-datagrid/lookup-editor.js.map +1 -1
- package/lib/utility/i18n/i18n-resource-manager.js +1 -1
- package/lib/utility/i18n/i18n-resource-manager.js.map +1 -1
- package/lib/utility/template-generator/devkit/component-generator/component-farristabs-parameter-generator.js +87 -62
- package/lib/utility/template-generator/devkit/component-generator/component-farristabs-parameter-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/component-generator/component-import-generator.js +2 -0
- package/lib/utility/template-generator/devkit/component-generator/component-import-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/component-generator/component-provider-generator.js +2 -1
- package/lib/utility/template-generator/devkit/component-generator/component-provider-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/component-generator/component-section-parameter-generator.js +61 -38
- package/lib/utility/template-generator/devkit/component-generator/component-section-parameter-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/lang-template-generator.js +4 -3
- package/lib/utility/template-generator/devkit/lang-template-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/module-generator/module-import-statement-generator.js +2 -1
- package/lib/utility/template-generator/devkit/module-generator/module-import-statement-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/module-generator/module-imports-statement-generator.js +3 -2
- package/lib/utility/template-generator/devkit/module-generator/module-imports-statement-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/module-template-generator.js +1 -1
- package/lib/utility/template-generator/devkit/module-template-generator.js.map +1 -1
- package/lib/utility/template-generator/project/index-rollup-html-generator.js +14 -13
- package/lib/utility/template-generator/project/index-rollup-html-generator.js.map +1 -1
- package/lib/utility/template-generator/project-app/navigate-guard-generator.js +4 -3
- package/lib/utility/template-generator/project-app/navigate-guard-generator.js.map +1 -1
- package/lib/utility/template-generator/project-app/systemjs-lc-moduleloader-generator.js +5 -0
- package/lib/utility/template-generator/project-app/systemjs-lc-moduleloader-generator.js.map +1 -1
- package/lib/utility/template-generator/subcontext-path-generator.js +20 -0
- package/lib/utility/template-generator/subcontext-path-generator.js.map +1 -0
- package/package.json +56 -56
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
//- -var variable = {moduleName: "SaleOrder", componentId: "SaleOrderComponent",component: "SaleOrderComponent"};
|
|
2
|
-
|
|
3
|
-
| import { NgModule } from '@angular/core';
|
|
4
|
-
| import { Routes, RouterModule } from '@angular/router';
|
|
5
|
-
| import { #{variable.externalPrefix}#{variable.component} } from './components/#{variable.componentId}/#{variable.component.toLowerCase()}';
|
|
6
|
-
= '\n'
|
|
7
|
-
if(variable.currentPageInfo && variable.currentPageInfo.children && variable.currentPageInfo.children.length)
|
|
8
|
-
each child in variable.currentPageInfo.children
|
|
9
|
-
if(child.relativePath)
|
|
10
|
-
| import { RootComponent as #{child.code}RootComponent } from '../#{child.relativePath.toLowerCase()}/components/root-component/rootcomponent';
|
|
11
|
-
else
|
|
12
|
-
| import { RootComponent as #{child.code}RootComponent } from '../#{child.code.toLowerCase()}/components/root-component/rootcomponent';
|
|
13
|
-
= '\n'
|
|
14
|
-
|
|
|
15
|
-
if(variable.componentChildrenRoutesImport && variable.componentChildrenRoutesImport.length)
|
|
16
|
-
each child in variable.componentChildrenRoutesImport
|
|
17
|
-
| import {#{child.importName}} from '#{child.path}';
|
|
18
|
-
= '\n'
|
|
19
|
-
| const routes: Routes = [
|
|
20
|
-
| { path: '', component: #{variable.externalPrefix}#{variable.component},
|
|
21
|
-
| children:[
|
|
22
|
-
if(variable.currentPageInfo && variable.currentPageInfo.children && variable.currentPageInfo.children.length)
|
|
23
|
-
each child,index in variable.currentPageInfo.children
|
|
24
|
-
|{
|
|
25
|
-
| path:'#{child.routeUri}
|
|
26
|
-
if(child.routeParams && child.routeParams.length)
|
|
27
|
-
each childRouteParam in child.routeParams
|
|
28
|
-
| /:#{childRouteParam}
|
|
29
|
-
| '
|
|
30
|
-
|,component:#{child.code}RootComponent
|
|
31
|
-
|}
|
|
32
|
-
if(index<variable.currentPageInfo.children.length-1)
|
|
33
|
-
| ,
|
|
34
|
-
= '\n'
|
|
35
|
-
if(variable.componentChildrenRoutes && variable.componentChildrenRoutes.length)
|
|
36
|
-
each child,index in variable.componentChildrenRoutes
|
|
37
|
-
| {
|
|
38
|
-
| path:'#{child.routeUri}',component:#{child.childComponentName}
|
|
39
|
-
|}
|
|
40
|
-
if(index<variable.componentChildrenRoutes.length-1)
|
|
41
|
-
| ,
|
|
42
|
-
| ]
|
|
43
|
-
| }
|
|
44
|
-
| ];
|
|
45
|
-
|
|
|
46
|
-
| @NgModule({
|
|
47
|
-
| imports: [
|
|
48
|
-
| RouterModule.forChild(routes)
|
|
49
|
-
| ],
|
|
50
|
-
| exports: [
|
|
51
|
-
| RouterModule
|
|
52
|
-
| ]
|
|
53
|
-
| })
|
|
54
|
-
| export class #{variable.externalPrefix}#{variable.moduleName}RoutingModule {}
|
|
55
|
-
= '\n'
|
|
1
|
+
//- -var variable = {moduleName: "SaleOrder", componentId: "SaleOrderComponent",component: "SaleOrderComponent"};
|
|
2
|
+
|
|
3
|
+
| import { NgModule } from '@angular/core';
|
|
4
|
+
| import { Routes, RouterModule } from '@angular/router';
|
|
5
|
+
| import { #{variable.externalPrefix}#{variable.component} } from './components/#{variable.componentId}/#{variable.component.toLowerCase()}';
|
|
6
|
+
= '\n'
|
|
7
|
+
if(variable.currentPageInfo && variable.currentPageInfo.children && variable.currentPageInfo.children.length)
|
|
8
|
+
each child in variable.currentPageInfo.children
|
|
9
|
+
if(child.relativePath)
|
|
10
|
+
| import { RootComponent as #{child.code}RootComponent } from '../#{child.relativePath.toLowerCase()}/components/root-component/rootcomponent';
|
|
11
|
+
else
|
|
12
|
+
| import { RootComponent as #{child.code}RootComponent } from '../#{child.code.toLowerCase()}/components/root-component/rootcomponent';
|
|
13
|
+
= '\n'
|
|
14
|
+
|
|
|
15
|
+
if(variable.componentChildrenRoutesImport && variable.componentChildrenRoutesImport.length)
|
|
16
|
+
each child in variable.componentChildrenRoutesImport
|
|
17
|
+
| import {#{child.importName}} from '#{child.path}';
|
|
18
|
+
= '\n'
|
|
19
|
+
| const routes: Routes = [
|
|
20
|
+
| { path: '', component: #{variable.externalPrefix}#{variable.component},
|
|
21
|
+
| children:[
|
|
22
|
+
if(variable.currentPageInfo && variable.currentPageInfo.children && variable.currentPageInfo.children.length)
|
|
23
|
+
each child,index in variable.currentPageInfo.children
|
|
24
|
+
|{
|
|
25
|
+
| path:'#{child.routeUri}
|
|
26
|
+
if(child.routeParams && child.routeParams.length)
|
|
27
|
+
each childRouteParam in child.routeParams
|
|
28
|
+
| /:#{childRouteParam}
|
|
29
|
+
| '
|
|
30
|
+
|,component:#{child.code}RootComponent
|
|
31
|
+
|}
|
|
32
|
+
if(index<variable.currentPageInfo.children.length-1)
|
|
33
|
+
| ,
|
|
34
|
+
= '\n'
|
|
35
|
+
if(variable.componentChildrenRoutes && variable.componentChildrenRoutes.length)
|
|
36
|
+
each child,index in variable.componentChildrenRoutes
|
|
37
|
+
| {
|
|
38
|
+
| path:'#{child.routeUri}',component:#{child.childComponentName}
|
|
39
|
+
|}
|
|
40
|
+
if(index<variable.componentChildrenRoutes.length-1)
|
|
41
|
+
| ,
|
|
42
|
+
| ]
|
|
43
|
+
| }
|
|
44
|
+
| ];
|
|
45
|
+
|
|
|
46
|
+
| @NgModule({
|
|
47
|
+
| imports: [
|
|
48
|
+
| RouterModule.forChild(routes)
|
|
49
|
+
| ],
|
|
50
|
+
| exports: [
|
|
51
|
+
| RouterModule
|
|
52
|
+
| ]
|
|
53
|
+
| })
|
|
54
|
+
| export class #{variable.externalPrefix}#{variable.moduleName}RoutingModule {}
|
|
55
|
+
= '\n'
|
|
56
56
|
= '\n'
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
| import { Injectable, Injector } from '@angular/core';
|
|
2
|
-
| import { RestfulService } from '@farris/devkit';
|
|
3
|
-
| import { Router } from '@angular/router';
|
|
4
|
-
|
|
|
5
|
-
| @Injectable()
|
|
6
|
-
| export class SaleOrderListService {
|
|
7
|
-
|
|
|
8
|
-
| constructor() {
|
|
9
|
-
| }
|
|
10
|
-
|
|
|
11
|
-
| load() {
|
|
12
|
-
| }
|
|
13
|
-
|
|
|
14
|
-
| search() {
|
|
15
|
-
| }
|
|
16
|
-
|
|
|
17
|
-
| remove() {
|
|
18
|
-
| }
|
|
19
|
-
|
|
|
20
|
-
| route(action: string) {
|
|
21
|
-
| }
|
|
22
|
-
| }
|
|
23
|
-
= '\n'
|
|
1
|
+
| import { Injectable, Injector } from '@angular/core';
|
|
2
|
+
| import { RestfulService } from '@farris/devkit';
|
|
3
|
+
| import { Router } from '@angular/router';
|
|
4
|
+
|
|
|
5
|
+
| @Injectable()
|
|
6
|
+
| export class SaleOrderListService {
|
|
7
|
+
|
|
|
8
|
+
| constructor() {
|
|
9
|
+
| }
|
|
10
|
+
|
|
|
11
|
+
| load() {
|
|
12
|
+
| }
|
|
13
|
+
|
|
|
14
|
+
| search() {
|
|
15
|
+
| }
|
|
16
|
+
|
|
|
17
|
+
| remove() {
|
|
18
|
+
| }
|
|
19
|
+
|
|
|
20
|
+
| route(action: string) {
|
|
21
|
+
| }
|
|
22
|
+
| }
|
|
23
|
+
= '\n'
|
|
24
24
|
= '\n'
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
//- -var variable={name:'name',pages:[{code:'Aa1',routeUri:''},{code:'Aa2',routeUri:'login'}]};
|
|
2
|
-
|
|
3
|
-
| import { CommonModule } from '@angular/common';
|
|
4
|
-
| import { NgModule } from '@angular/core';
|
|
5
|
-
| import { RouterModule } from '@angular/router';
|
|
6
|
-
| import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
| import { Component } from '@angular/core';
|
|
8
|
-
|
|
|
9
|
-
| @Component({
|
|
10
|
-
| selector: 'app-root',
|
|
11
|
-
| template: `
|
|
12
|
-
router-outlet
|
|
13
|
-
|
|
|
14
|
-
| `
|
|
15
|
-
| })
|
|
16
|
-
| export class !{variable.name}Component {
|
|
17
|
-
| title = 'app';
|
|
18
|
-
| }
|
|
19
|
-
|
|
|
20
|
-
| @NgModule({
|
|
21
|
-
| declarations: [
|
|
22
|
-
| !{variable.name}Component
|
|
23
|
-
| ],
|
|
24
|
-
| imports: [
|
|
25
|
-
| CommonModule,
|
|
26
|
-
| FormsModule,
|
|
27
|
-
| ReactiveFormsModule,
|
|
28
|
-
| RouterModule.forChild([
|
|
29
|
-
= '\n'
|
|
30
|
-
-var index=0;
|
|
31
|
-
each p in variable.pages
|
|
32
|
-
if p.routeUri
|
|
33
|
-
| { path: '!{p.routeUri}', loadChildren: './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module#!{p.code}Module' }
|
|
34
|
-
else
|
|
35
|
-
| { path: '', loadChildren: './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module#!{p.code}Module' }
|
|
36
|
-
if (index+1)<variable.pages.length
|
|
37
|
-
| ,
|
|
38
|
-
= '\n'
|
|
39
|
-
-index+=1;
|
|
40
|
-
| ])
|
|
41
|
-
| ],
|
|
42
|
-
| providers: [],
|
|
43
|
-
| bootstrap: [!{variable.name}Component]
|
|
44
|
-
| })
|
|
45
|
-
| export class !{variable.name}Module {
|
|
46
|
-
| constructor() {}
|
|
47
|
-
| }
|
|
1
|
+
//- -var variable={name:'name',pages:[{code:'Aa1',routeUri:''},{code:'Aa2',routeUri:'login'}]};
|
|
2
|
+
|
|
3
|
+
| import { CommonModule } from '@angular/common';
|
|
4
|
+
| import { NgModule } from '@angular/core';
|
|
5
|
+
| import { RouterModule } from '@angular/router';
|
|
6
|
+
| import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
| import { Component } from '@angular/core';
|
|
8
|
+
|
|
|
9
|
+
| @Component({
|
|
10
|
+
| selector: 'app-root',
|
|
11
|
+
| template: `
|
|
12
|
+
router-outlet
|
|
13
|
+
|
|
|
14
|
+
| `
|
|
15
|
+
| })
|
|
16
|
+
| export class !{variable.name}Component {
|
|
17
|
+
| title = 'app';
|
|
18
|
+
| }
|
|
19
|
+
|
|
|
20
|
+
| @NgModule({
|
|
21
|
+
| declarations: [
|
|
22
|
+
| !{variable.name}Component
|
|
23
|
+
| ],
|
|
24
|
+
| imports: [
|
|
25
|
+
| CommonModule,
|
|
26
|
+
| FormsModule,
|
|
27
|
+
| ReactiveFormsModule,
|
|
28
|
+
| RouterModule.forChild([
|
|
29
|
+
= '\n'
|
|
30
|
+
-var index=0;
|
|
31
|
+
each p in variable.pages
|
|
32
|
+
if p.routeUri
|
|
33
|
+
| { path: '!{p.routeUri}', loadChildren: './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module#!{p.code}Module' }
|
|
34
|
+
else
|
|
35
|
+
| { path: '', loadChildren: './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module#!{p.code}Module' }
|
|
36
|
+
if (index+1)<variable.pages.length
|
|
37
|
+
| ,
|
|
38
|
+
= '\n'
|
|
39
|
+
-index+=1;
|
|
40
|
+
| ])
|
|
41
|
+
| ],
|
|
42
|
+
| providers: [],
|
|
43
|
+
| bootstrap: [!{variable.name}Component]
|
|
44
|
+
| })
|
|
45
|
+
| export class !{variable.name}Module {
|
|
46
|
+
| constructor() {}
|
|
47
|
+
| }
|
|
48
48
|
|
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
//- -var variable={name:'name',pages:[{code:'Aa1',routeUri:'',component:'component'},{code:'Aa2',routeUri:'login',component:'component'}]};
|
|
2
|
-
|
|
3
|
-
| import { CommonModule } from '@angular/common';
|
|
4
|
-
| import { NgModule } from '@angular/core';
|
|
5
|
-
| import { RouterModule } from '@angular/router';
|
|
6
|
-
| import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
| import { Component } from '@angular/core';
|
|
8
|
-
= '\n'
|
|
9
|
-
-var index=0;
|
|
10
|
-
each p in variable.pages
|
|
11
|
-
| import { !{p.code}Module } from './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module';
|
|
12
|
-
| import { !{p.component} as !{p.component + (index + '')} } from './!{p.code.toLowerCase()}/components/!{p.componentId.toLowerCase()}/!{p.component.toLowerCase()}';
|
|
13
|
-
-index+=1;
|
|
14
|
-
= '\n'
|
|
15
|
-
|
|
|
16
|
-
| @Component({
|
|
17
|
-
| selector: 'app-root',
|
|
18
|
-
| template: `
|
|
19
|
-
router-outlet
|
|
20
|
-
|
|
|
21
|
-
| `
|
|
22
|
-
| })
|
|
23
|
-
| export class !{variable.name}Component {
|
|
24
|
-
| title = 'app';
|
|
25
|
-
| }
|
|
26
|
-
|
|
|
27
|
-
| @NgModule({
|
|
28
|
-
| declarations: [
|
|
29
|
-
| !{variable.name}Component
|
|
30
|
-
| ],
|
|
31
|
-
| imports: [
|
|
32
|
-
= '\n'
|
|
33
|
-
each p in variable.pages
|
|
34
|
-
| !{p.code}Module,
|
|
35
|
-
= '\n'
|
|
36
|
-
| CommonModule,
|
|
37
|
-
| FormsModule,
|
|
38
|
-
| ReactiveFormsModule,
|
|
39
|
-
| RouterModule.forChild([
|
|
40
|
-
= '\n'
|
|
41
|
-
-var index=0;
|
|
42
|
-
each p in variable.pages
|
|
43
|
-
if p.routeUri
|
|
44
|
-
| { path: '!{p.routeUri}', component: !{p.component + (index + '')} }
|
|
45
|
-
else
|
|
46
|
-
| { path: '', component: !{p.component + (index + '')} }
|
|
47
|
-
if (index+1)<variable.pages.length
|
|
48
|
-
| ,
|
|
49
|
-
= '\n'
|
|
50
|
-
-index+=1;
|
|
51
|
-
| ])
|
|
52
|
-
| ],
|
|
53
|
-
| providers: [],
|
|
54
|
-
| bootstrap: [!{variable.name}Component]
|
|
55
|
-
| })
|
|
56
|
-
| export class !{variable.name}Module {
|
|
57
|
-
| constructor() {}
|
|
58
|
-
| }
|
|
1
|
+
//- -var variable={name:'name',pages:[{code:'Aa1',routeUri:'',component:'component'},{code:'Aa2',routeUri:'login',component:'component'}]};
|
|
2
|
+
|
|
3
|
+
| import { CommonModule } from '@angular/common';
|
|
4
|
+
| import { NgModule } from '@angular/core';
|
|
5
|
+
| import { RouterModule } from '@angular/router';
|
|
6
|
+
| import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
| import { Component } from '@angular/core';
|
|
8
|
+
= '\n'
|
|
9
|
+
-var index=0;
|
|
10
|
+
each p in variable.pages
|
|
11
|
+
| import { !{p.code}Module } from './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module';
|
|
12
|
+
| import { !{p.component} as !{p.component + (index + '')} } from './!{p.code.toLowerCase()}/components/!{p.componentId.toLowerCase()}/!{p.component.toLowerCase()}';
|
|
13
|
+
-index+=1;
|
|
14
|
+
= '\n'
|
|
15
|
+
|
|
|
16
|
+
| @Component({
|
|
17
|
+
| selector: 'app-root',
|
|
18
|
+
| template: `
|
|
19
|
+
router-outlet
|
|
20
|
+
|
|
|
21
|
+
| `
|
|
22
|
+
| })
|
|
23
|
+
| export class !{variable.name}Component {
|
|
24
|
+
| title = 'app';
|
|
25
|
+
| }
|
|
26
|
+
|
|
|
27
|
+
| @NgModule({
|
|
28
|
+
| declarations: [
|
|
29
|
+
| !{variable.name}Component
|
|
30
|
+
| ],
|
|
31
|
+
| imports: [
|
|
32
|
+
= '\n'
|
|
33
|
+
each p in variable.pages
|
|
34
|
+
| !{p.code}Module,
|
|
35
|
+
= '\n'
|
|
36
|
+
| CommonModule,
|
|
37
|
+
| FormsModule,
|
|
38
|
+
| ReactiveFormsModule,
|
|
39
|
+
| RouterModule.forChild([
|
|
40
|
+
= '\n'
|
|
41
|
+
-var index=0;
|
|
42
|
+
each p in variable.pages
|
|
43
|
+
if p.routeUri
|
|
44
|
+
| { path: '!{p.routeUri}', component: !{p.component + (index + '')} }
|
|
45
|
+
else
|
|
46
|
+
| { path: '', component: !{p.component + (index + '')} }
|
|
47
|
+
if (index+1)<variable.pages.length
|
|
48
|
+
| ,
|
|
49
|
+
= '\n'
|
|
50
|
+
-index+=1;
|
|
51
|
+
| ])
|
|
52
|
+
| ],
|
|
53
|
+
| providers: [],
|
|
54
|
+
| bootstrap: [!{variable.name}Component]
|
|
55
|
+
| })
|
|
56
|
+
| export class !{variable.name}Module {
|
|
57
|
+
| constructor() {}
|
|
58
|
+
| }
|
|
59
59
|
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
//- -var variable={name: 'FormUIState', stateList:[{id:'id', code: 'code', name: 'name', value: 'value'}, {id:'id', code: 'code', name: 'name', value: 'value'}]};
|
|
2
|
-
|
|
3
|
-
| import { Injectable } from '@angular/core';
|
|
4
|
-
| import { UIState, NgParam } from '@farris/devkit';
|
|
5
|
-
|
|
|
6
|
-
| @Injectable()
|
|
7
|
-
| export class #{variable.externalPrefix}#{variable.name} extends UIState {
|
|
8
|
-
= '\n'
|
|
9
|
-
each s, index in variable.stateList
|
|
10
|
-
| @NgParam()
|
|
11
|
-
= '\n'
|
|
12
|
-
if s.value
|
|
13
|
-
| public #{s.code}: #{s.type} = #{s.value};
|
|
14
|
-
else
|
|
15
|
-
| public #{s.code}: #{s.type};
|
|
16
|
-
= '\n'
|
|
17
|
-
= '\n'
|
|
18
|
-
| }
|
|
1
|
+
//- -var variable={name: 'FormUIState', stateList:[{id:'id', code: 'code', name: 'name', value: 'value'}, {id:'id', code: 'code', name: 'name', value: 'value'}]};
|
|
2
|
+
|
|
3
|
+
| import { Injectable } from '@angular/core';
|
|
4
|
+
| import { UIState, NgParam } from '@farris/devkit';
|
|
5
|
+
|
|
|
6
|
+
| @Injectable()
|
|
7
|
+
| export class #{variable.externalPrefix}#{variable.name} extends UIState {
|
|
8
|
+
= '\n'
|
|
9
|
+
each s, index in variable.stateList
|
|
10
|
+
| @NgParam()
|
|
11
|
+
= '\n'
|
|
12
|
+
if s.value
|
|
13
|
+
| public #{s.code}: #{s.type} = #{s.value};
|
|
14
|
+
else
|
|
15
|
+
| public #{s.code}: #{s.type};
|
|
16
|
+
= '\n'
|
|
17
|
+
= '\n'
|
|
18
|
+
| }
|
|
19
19
|
|
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
//- -var variable = {name: 'SaleOrderDetailStateMachine', ngStates: [{name: 'viewState', initialState: true}, {name: 'addState'}, {name: 'editState'}], ngRenderStates: [{name: 'canAdd', render: '(context) => context.state === \'viewState\''}, {name: 'canEdit', render: '(context) => context.state === \'viewState\''}, {name: 'canCancel', render: '(context) => context.state === \'addState\' || context.state === \'editState\''}], ngActions: [{name: 'add', transitTo: 'addState'}, {name: 'edit', transitTo: 'editState'}, {name: 'view', transitTo: 'viewState'}]};
|
|
2
|
-
|
|
3
|
-
| import { Injectable } from '@angular/core';
|
|
4
|
-
| import { StateMachine, State, NgState, RenderState, NgRenderState, Action, NgAction } from '@farris/devkit';
|
|
5
|
-
= '\n'
|
|
6
|
-
= '\n'
|
|
7
|
-
| @Injectable()
|
|
8
|
-
| export class #{variable.externalPrefix}#{variable.name} extends StateMachine {
|
|
9
|
-
= '\n'
|
|
10
|
-
if variable.ngStates && variable.ngStates.length
|
|
11
|
-
each ngState in variable.ngStates
|
|
12
|
-
if ngState.initialState
|
|
13
|
-
| @NgState({
|
|
14
|
-
| initialState: true
|
|
15
|
-
| })
|
|
16
|
-
else
|
|
17
|
-
| @NgState()
|
|
18
|
-
= '\n'
|
|
19
|
-
| #{ngState.name}: State;
|
|
20
|
-
= '\n'
|
|
21
|
-
= '\n'
|
|
22
|
-
if variable.ngRenderStates && variable.ngRenderStates.length
|
|
23
|
-
each ngRenderState in variable.ngRenderStates
|
|
24
|
-
| @NgRenderState({
|
|
25
|
-
| render: !{ngRenderState.render}
|
|
26
|
-
| })
|
|
27
|
-
| #{ngRenderState.name}: RenderState;
|
|
28
|
-
= '\n'
|
|
29
|
-
= '\n'
|
|
30
|
-
if variable.ngActions && variable.ngActions.length
|
|
31
|
-
each ngAction in variable.ngActions
|
|
32
|
-
| @NgAction({
|
|
33
|
-
= '\n'
|
|
34
|
-
if ngAction.precondition
|
|
35
|
-
| precondition: #{ngAction.precondition},
|
|
36
|
-
= '\n'
|
|
37
|
-
if ngAction.transitTo
|
|
38
|
-
| transitTo: '#{ngAction.transitTo}'
|
|
39
|
-
= '\n'
|
|
40
|
-
| })
|
|
41
|
-
| #{ngAction.name}: Action;
|
|
42
|
-
= '\n'
|
|
43
|
-
= '\n'
|
|
44
|
-
|}
|
|
45
|
-
= '\n'
|
|
1
|
+
//- -var variable = {name: 'SaleOrderDetailStateMachine', ngStates: [{name: 'viewState', initialState: true}, {name: 'addState'}, {name: 'editState'}], ngRenderStates: [{name: 'canAdd', render: '(context) => context.state === \'viewState\''}, {name: 'canEdit', render: '(context) => context.state === \'viewState\''}, {name: 'canCancel', render: '(context) => context.state === \'addState\' || context.state === \'editState\''}], ngActions: [{name: 'add', transitTo: 'addState'}, {name: 'edit', transitTo: 'editState'}, {name: 'view', transitTo: 'viewState'}]};
|
|
2
|
+
|
|
3
|
+
| import { Injectable } from '@angular/core';
|
|
4
|
+
| import { StateMachine, State, NgState, RenderState, NgRenderState, Action, NgAction } from '@farris/devkit';
|
|
5
|
+
= '\n'
|
|
6
|
+
= '\n'
|
|
7
|
+
| @Injectable()
|
|
8
|
+
| export class #{variable.externalPrefix}#{variable.name} extends StateMachine {
|
|
9
|
+
= '\n'
|
|
10
|
+
if variable.ngStates && variable.ngStates.length
|
|
11
|
+
each ngState in variable.ngStates
|
|
12
|
+
if ngState.initialState
|
|
13
|
+
| @NgState({
|
|
14
|
+
| initialState: true
|
|
15
|
+
| })
|
|
16
|
+
else
|
|
17
|
+
| @NgState()
|
|
18
|
+
= '\n'
|
|
19
|
+
| #{ngState.name}: State;
|
|
20
|
+
= '\n'
|
|
21
|
+
= '\n'
|
|
22
|
+
if variable.ngRenderStates && variable.ngRenderStates.length
|
|
23
|
+
each ngRenderState in variable.ngRenderStates
|
|
24
|
+
| @NgRenderState({
|
|
25
|
+
| render: !{ngRenderState.render}
|
|
26
|
+
| })
|
|
27
|
+
| #{ngRenderState.name}: RenderState;
|
|
28
|
+
= '\n'
|
|
29
|
+
= '\n'
|
|
30
|
+
if variable.ngActions && variable.ngActions.length
|
|
31
|
+
each ngAction in variable.ngActions
|
|
32
|
+
| @NgAction({
|
|
33
|
+
= '\n'
|
|
34
|
+
if ngAction.precondition
|
|
35
|
+
| precondition: #{ngAction.precondition},
|
|
36
|
+
= '\n'
|
|
37
|
+
if ngAction.transitTo
|
|
38
|
+
| transitTo: '#{ngAction.transitTo}'
|
|
39
|
+
= '\n'
|
|
40
|
+
| })
|
|
41
|
+
| #{ngAction.name}: Action;
|
|
42
|
+
= '\n'
|
|
43
|
+
= '\n'
|
|
44
|
+
|}
|
|
45
|
+
= '\n'
|
|
46
46
|
= '\n'
|