@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,659 +1,659 @@
|
|
|
1
|
-
//- -var variable = {isQdpForm:true, id: 'salesorder-component', appearance: "mb-2", onInit: "viewModel.loadList", name: 'SalesOrder', repositoryName: "repositoryName", viewModelName: 'SaleOrderListViewModel',form: 'form',stateMachine:'stateMachine',template: 'SaleOrder', handlers: ['a']}
|
|
2
|
-
|
|
3
|
-
| import { Component, OnInit, Injector, AfterViewInit,ViewChild,HostBinding,TemplateRef } from '@angular/core';
|
|
4
|
-
| import { BehaviorSubject } from 'rxjs';
|
|
5
|
-
| import { of } from 'rxjs/observable/of';
|
|
6
|
-
| import { Form, FrameEvent, FrameEventBus, FrameComponent, FARRIS_DEVKIT_FRAME_PROVIDERS, ViewModel, COMMAND_HANDLERS_TOKEN, FRAME_ID, StateMachine, BindingData, Repository, UIState,NgSubscription,Declaration,EXCEPTION_HANDLER } from '@farris/devkit';
|
|
7
|
-
| import { FARRIS_COMMAND_SERVICE_FRAME_PROVIDERS,ComponentManagerService } from '@farris/command-services';
|
|
8
|
-
| import { KeybindingService } from '@farris/command-services';
|
|
9
|
-
| import { EditorTypes} from '@farris/ui-datagrid-editors';
|
|
10
|
-
= '\n'
|
|
11
|
-
if (variable.componentType == 'Frame')
|
|
12
|
-
| import { ExceptionHandler } from '@farris/command-services';
|
|
13
|
-
| import { FrameworkSessionService,UriService } from '@farris/bef';
|
|
14
|
-
| import { WFSubmiteService } from '@gsp-wf/rtdevkit';
|
|
15
|
-
| import { ActivatedRoute, ParamMap } from '@angular/router';
|
|
16
|
-
| import { FrameworkService } from '@gsp-sys/rtf-common';
|
|
17
|
-
| import { ApplicationParamService } from '@farris/command-services';
|
|
18
|
-
| import { #{variable.externalPrefix}EventDeclaration } from '../../events/event';
|
|
19
|
-
| import { FARRIS_FORM_COMPONENTS } from '@farris/command-services';
|
|
20
|
-
| import { CloudprintService } from '@gsp-svc/cloudprint';
|
|
21
|
-
| import { WFFlowchartService } from '@gsp-wf/ui-flowchart';
|
|
22
|
-
if(variable.isGroupForm==false)
|
|
23
|
-
= '\n'
|
|
24
|
-
| import { AppContext } from '@farris/devkit';
|
|
25
|
-
= '\n'
|
|
26
|
-
| import { BefLookupRestService,DefaultComboHttpService } from '@farris/bef';
|
|
27
|
-
| import { #{variable.externalPrefix}#{variable.viewModelName} } from '../../viewmodels/#{variable.viewModelName.toLowerCase()}';
|
|
28
|
-
| import { #{variable.externalPrefix}#{variable.repositoryName} } from '../../models/#{variable.repositoryName.toLowerCase()}';
|
|
29
|
-
| import { ServerSideToken,LookupGridComponent } from '@farris/ui-lookup';
|
|
30
|
-
| import { ComboServerSideToken } from '@farris/ui-combo-list';
|
|
31
|
-
= '\n'
|
|
32
|
-
if (variable.isQdpForm)
|
|
33
|
-
| import { QDP_COMMAND_SERVICE_PROVIDERS } from '@qdp/command-services';
|
|
34
|
-
= '\n'
|
|
35
|
-
if (variable.isJointSearch)
|
|
36
|
-
| import { ElementRef } from '@angular/core';
|
|
37
|
-
| import { QdpViewComponent } from '@qdp/spread';
|
|
38
|
-
| import { MenuControllerService} from '@qdp/search-join';
|
|
39
|
-
= '\n'
|
|
40
|
-
| import { WizardService, FarrisPageDetailComponent } from '@farris/ui-wizard';
|
|
41
|
-
| import { #{variable.externalPrefix}LangService } from '../../lang/lang-pipe';
|
|
42
|
-
if (variable.form)
|
|
43
|
-
| import { #{variable.externalPrefix}#{variable.form} } from '../../viewmodels/form/#{variable.form.toLowerCase()}';
|
|
44
|
-
= '\n'
|
|
45
|
-
if (variable.stateMachine)
|
|
46
|
-
| import { #{variable.externalPrefix}#{variable.stateMachine} } from '../../viewmodels/statemachine/#{variable.stateMachine.toLowerCase()}';
|
|
47
|
-
= '\n'
|
|
48
|
-
if (variable.states)
|
|
49
|
-
| import { #{variable.externalPrefix}#{variable.states} } from '../../viewmodels/uistate/#{variable.states.toLowerCase()}';
|
|
50
|
-
= '\n'
|
|
51
|
-
if (variable.handlers && variable.handlers.length)
|
|
52
|
-
each p in variable.handlers
|
|
53
|
-
| import { #{variable.externalPrefix}#{p} } from '../../viewmodels/handlers/#{p.toLowerCase()}';
|
|
54
|
-
= '\n'
|
|
55
|
-
if (variable.services && variable.services.length)
|
|
56
|
-
each service in variable.services
|
|
57
|
-
| import { #{service.name} as #{service.alias} } from '../../services/#{service.fileName.toLowerCase()}';
|
|
58
|
-
= '\n'
|
|
59
|
-
if (variable.dependencies && variable.dependencies.length)
|
|
60
|
-
each dependent in variable.dependencies
|
|
61
|
-
if(dependent.usePrefix == null || dependent.usePrefix == undefined || dependent.usePrefix == true)
|
|
62
|
-
| import { #{variable.externalPrefix}#{dependent.name} } from '#{dependent.path}';
|
|
63
|
-
else
|
|
64
|
-
| import { #{dependent.name} } from '#{dependent.path}';
|
|
65
|
-
= '\n'
|
|
66
|
-
= '\n'
|
|
67
|
-
if (variable.componentType == 'Frame')
|
|
68
|
-
| const FORM_CONTROLS = {
|
|
69
|
-
= '\n'
|
|
70
|
-
if (variable.modalFormControls && variable.modalFormControls.length)
|
|
71
|
-
each modalFormControl,index in variable.modalFormControls
|
|
72
|
-
if(modalFormControl.modalFormType && modalFormControl.modalFormType == "url")
|
|
73
|
-
| '#{modalFormControl.name}' : '#{modalFormControl.url}'
|
|
74
|
-
else
|
|
75
|
-
| '#{modalFormControl.name}' : #{modalFormControl.className}
|
|
76
|
-
if (index<variable.modalFormControls.length-1)
|
|
77
|
-
| ,
|
|
78
|
-
= '\n'
|
|
79
|
-
|}
|
|
80
|
-
= '\n'
|
|
81
|
-
| @Component({
|
|
82
|
-
= '\n'
|
|
83
|
-
if (variable.componentSelector)
|
|
84
|
-
| selector: 'app-#{variable.componentSelector.toLowerCase()}',
|
|
85
|
-
else
|
|
86
|
-
| selector: 'app-#{variable.name.toLowerCase()}',
|
|
87
|
-
= '\n'
|
|
88
|
-
| templateUrl: './#{variable.name.toLowerCase()}.html',
|
|
89
|
-
if(variable.createEmptyScssFile)
|
|
90
|
-
= '\n'
|
|
91
|
-
| styleUrls: ['./#{variable.name.toLowerCase()}.scss'],
|
|
92
|
-
= '\n'
|
|
93
|
-
= '\n'
|
|
94
|
-
if (variable.handlers && variable.handlers.length)
|
|
95
|
-
| providers: [
|
|
96
|
-
= '\n'
|
|
97
|
-
if (variable.componentType == 'Frame')
|
|
98
|
-
| { provide: Declaration, useClass: #{variable.externalPrefix}EventDeclaration },
|
|
99
|
-
| { provide: WFSubmiteService, useClass: WFSubmiteService },
|
|
100
|
-
| { provide: CloudprintService, useClass: CloudprintService},
|
|
101
|
-
| { provide: WFFlowchartService, useClass: WFFlowchartService},
|
|
102
|
-
if(variable.isGroupForm==false)
|
|
103
|
-
| AppContext,
|
|
104
|
-
= '\n'
|
|
105
|
-
if (variable.componentSelector)
|
|
106
|
-
= '\n'
|
|
107
|
-
| { provide: EXCEPTION_HANDLER, useValue: null},
|
|
108
|
-
= '\n'
|
|
109
|
-
else
|
|
110
|
-
= '\n'
|
|
111
|
-
| { provide: EXCEPTION_HANDLER, useClass: ExceptionHandler},
|
|
112
|
-
= '\n'
|
|
113
|
-
| { provide: FARRIS_FORM_COMPONENTS, useValue: FORM_CONTROLS},
|
|
114
|
-
= '\n'
|
|
115
|
-
else
|
|
116
|
-
| { provide: EXCEPTION_HANDLER, useValue: null},
|
|
117
|
-
= '\n'
|
|
118
|
-
each p in variable.handlers
|
|
119
|
-
| { provide: COMMAND_HANDLERS_TOKEN, useClass: #{variable.externalPrefix}#{p}, multi: true },
|
|
120
|
-
= '\n'
|
|
121
|
-
| FARRIS_DEVKIT_FRAME_PROVIDERS,
|
|
122
|
-
| FARRIS_COMMAND_SERVICE_FRAME_PROVIDERS,
|
|
123
|
-
= '\n'
|
|
124
|
-
if (variable.isQdpForm)
|
|
125
|
-
| QDP_COMMAND_SERVICE_PROVIDERS,
|
|
126
|
-
= '\n'
|
|
127
|
-
| { provide: FRAME_ID, useValue: '#{variable.componentFrameID ? variable.componentFrameID : variable.replacedId}' },
|
|
128
|
-
| { provide: BindingData, useClass: BindingData },
|
|
129
|
-
| { provide: Repository, useExisting: #{variable.externalPrefix}#{variable.repositoryName} },
|
|
130
|
-
| { provide: ServerSideToken, useClass: BefLookupRestService },
|
|
131
|
-
| { provide: ComboServerSideToken, useClass: DefaultComboHttpService },
|
|
132
|
-
| #{variable.externalPrefix}LangService,
|
|
133
|
-
= '\n'
|
|
134
|
-
if (variable.form)
|
|
135
|
-
| { provide: Form, useClass: #{variable.externalPrefix}#{variable.form} },
|
|
136
|
-
= '\n'
|
|
137
|
-
if (variable.stateMachine)
|
|
138
|
-
| { provide: StateMachine, useClass: #{variable.externalPrefix}#{variable.stateMachine} },
|
|
139
|
-
= '\n'
|
|
140
|
-
if (variable.states)
|
|
141
|
-
| { provide: UIState, useClass: #{variable.externalPrefix}#{variable.states} },
|
|
142
|
-
= '\n'
|
|
143
|
-
if (variable.services && variable.services.length)
|
|
144
|
-
each service in variable.services
|
|
145
|
-
| #{service.alias},
|
|
146
|
-
= '\n'
|
|
147
|
-
if (variable.providers && variable.providers.length)
|
|
148
|
-
each provider, index in variable.providers
|
|
149
|
-
if(provider.usePrefix || provider.usePrefix==true)
|
|
150
|
-
| #{variable.externalPrefix}#{provider.name},
|
|
151
|
-
else
|
|
152
|
-
| #{provider.name},
|
|
153
|
-
= '\n'
|
|
154
|
-
| { provide: ViewModel, useClass: #{variable.externalPrefix}#{variable.viewModelName} }
|
|
155
|
-
| ]
|
|
156
|
-
= '\n'
|
|
157
|
-
else
|
|
158
|
-
| providers: [
|
|
159
|
-
| FARRIS_DEVKIT_FRAME_PROVIDERS,
|
|
160
|
-
| FARRIS_COMMAND_SERVICE_FRAME_PROVIDERS,
|
|
161
|
-
= '\n'
|
|
162
|
-
if (variable.isQdpForm)
|
|
163
|
-
| QDP_COMMAND_SERVICE_PROVIDERS,
|
|
164
|
-
= '\n'
|
|
165
|
-
| { provide: FRAME_ID, useValue: '#{variable.componentFrameID ? variable.componentFrameID : variable.replacedId}' },
|
|
166
|
-
| { provide: BindingData, useClass: BindingData },
|
|
167
|
-
| { provide: Repository, useExisting: #{variable.externalPrefix}#{variable.repositoryName} },
|
|
168
|
-
| { provide: ServerSideToken, useClass: BefLookupRestService },
|
|
169
|
-
| { provide: ComboServerSideToken, useClass: DefaultComboHttpService },
|
|
170
|
-
| #{variable.externalPrefix}LangService,
|
|
171
|
-
= '\n'
|
|
172
|
-
if (variable.componentType == 'Frame')
|
|
173
|
-
| { provide: Declaration, useClass: #{variable.externalPrefix}EventDeclaration },
|
|
174
|
-
| { provide: WFSubmiteService, useClass: WFSubmiteService },
|
|
175
|
-
| { provide: WFFlowchartService, useClass: WFFlowchartService},
|
|
176
|
-
if(variable.isGroupForm==false)
|
|
177
|
-
| AppContext,
|
|
178
|
-
= '\n'
|
|
179
|
-
if (variable.componentSelector)
|
|
180
|
-
| { provide: EXCEPTION_HANDLER,useValue: null},
|
|
181
|
-
= '\n'
|
|
182
|
-
else
|
|
183
|
-
| { provide: EXCEPTION_HANDLER, useClass: ExceptionHandler},
|
|
184
|
-
= '\n'
|
|
185
|
-
| { provide: FARRIS_FORM_COMPONENTS, useValue: FORM_CONTROLS},
|
|
186
|
-
= '\n'
|
|
187
|
-
else
|
|
188
|
-
| { provide: EXCEPTION_HANDLER, useValue: null},
|
|
189
|
-
= '\n'
|
|
190
|
-
if (variable.form)
|
|
191
|
-
| { provide: Form, useClass: #{variable.externalPrefix}#{variable.form} },
|
|
192
|
-
= '\n'
|
|
193
|
-
if (variable.stateMachine)
|
|
194
|
-
| { provide: StateMachine, useClass: #{variable.externalPrefix}#{variable.stateMachine} },
|
|
195
|
-
= '\n'
|
|
196
|
-
if (variable.states)
|
|
197
|
-
| { provide: UIState, useClass: #{variable.externalPrefix}#{variable.states} },
|
|
198
|
-
= '\n'
|
|
199
|
-
if (variable.services && variable.services.length)
|
|
200
|
-
each service in variable.services
|
|
201
|
-
| #{service.alias},
|
|
202
|
-
= '\n'
|
|
203
|
-
if (variable.providers && variable.providers.length)
|
|
204
|
-
each provider, index in variable.providers
|
|
205
|
-
if(provider.usePrefix || provider.usePrefix==true)
|
|
206
|
-
| #{variable.externalPrefix}#{provider.name},
|
|
207
|
-
else
|
|
208
|
-
| #{provider.name},
|
|
209
|
-
= '\n'
|
|
210
|
-
| { provide: ViewModel, useClass: #{variable.externalPrefix}#{variable.viewModelName} }
|
|
211
|
-
| ]
|
|
212
|
-
= '\n'
|
|
213
|
-
| })
|
|
214
|
-
| export class #{variable.externalPrefix}#{variable.name} extends FrameComponent implements OnInit, AfterViewInit {
|
|
215
|
-
if(variable.componentFarrisLookups && variable.componentFarrisLookups.length)
|
|
216
|
-
each farrisLookup,lookupIndex in variable.componentFarrisLookups
|
|
217
|
-
| @ViewChild('#{farrisLookup.id}')
|
|
218
|
-
| #{farrisLookup.id}:LookupGridComponent;
|
|
219
|
-
= '\n'
|
|
220
|
-
if(variable.farrisDataGridParameter && variable.farrisDataGridParameter.length)
|
|
221
|
-
each dataGridParameter in variable.farrisDataGridParameter
|
|
222
|
-
= '\n'
|
|
223
|
-
| #{dataGridParameter.columnsName}=[];
|
|
224
|
-
= '\n'
|
|
225
|
-
if(dataGridParameter.groupFormatter)
|
|
226
|
-
| #{dataGridParameter.groupFormatterName}= (row) => {
|
|
227
|
-
| !{dataGridParameter.groupFormatter}
|
|
228
|
-
|}
|
|
229
|
-
= '\n'
|
|
230
|
-
if(dataGridParameter.groupStyler)
|
|
231
|
-
| #{dataGridParameter.groupStylerName}= (row) => {
|
|
232
|
-
| !{dataGridParameter.groupStyler}
|
|
233
|
-
|}
|
|
234
|
-
= '\n'
|
|
235
|
-
if(dataGridParameter.rowStyler)
|
|
236
|
-
| #{dataGridParameter.rowStylerName}= (rowData) => {
|
|
237
|
-
| !{dataGridParameter.rowStyler}
|
|
238
|
-
|}
|
|
239
|
-
= '\n'
|
|
240
|
-
if(dataGridParameter.footerTemplateName)
|
|
241
|
-
| @ViewChild('#{dataGridParameter.footerTemplateName}') #{dataGridParameter.footerTemplateName}:TemplateRef<any>;
|
|
242
|
-
= '\n'
|
|
243
|
-
if(dataGridParameter.columns && dataGridParameter.columns.length)
|
|
244
|
-
= '\n'
|
|
245
|
-
each dataGridColumn,dataGridColumnIndex in dataGridParameter.columns
|
|
246
|
-
if(dataGridColumn && dataGridColumn.length)
|
|
247
|
-
each dataGridInnerColumn,dataGridInnerColumnIndex in dataGridColumn
|
|
248
|
-
if(dataGridInnerColumn.template)
|
|
249
|
-
| @ViewChild('#{dataGridInnerColumn.template}') #{dataGridInnerColumn.template}:TemplateRef<any>;
|
|
250
|
-
= '\n'
|
|
251
|
-
if(variable.farrisDataGridParameter && variable.farrisDataGridParameter.length)
|
|
252
|
-
each dataGridParameter in variable.farrisDataGridParameter
|
|
253
|
-
= '\n'
|
|
254
|
-
if(dataGridParameter.columns && dataGridParameter.columns.length)
|
|
255
|
-
each dataGridColumn,dataGridColumnIndex in dataGridParameter.columns
|
|
256
|
-
if(dataGridColumn && dataGridColumn.length)
|
|
257
|
-
each dataGridInnerColumn,dataGridInnerColumnIndex in dataGridColumn
|
|
258
|
-
if(dataGridInnerColumn.cellStyler)
|
|
259
|
-
| #{dataGridInnerColumn.cellStylerName}=(val, data, index) =>{
|
|
260
|
-
| #{dataGridInnerColumn.cellStyler}
|
|
261
|
-
|}
|
|
262
|
-
= '\n'
|
|
263
|
-
if (variable.componentType == "Frame")
|
|
264
|
-
= '\n'
|
|
265
|
-
| @HostBinding('class')
|
|
266
|
-
| cls = 'f-page-root #{variable.appearance} ';
|
|
267
|
-
else
|
|
268
|
-
| @HostBinding('class')
|
|
269
|
-
| cls = '#{variable.appearance}';
|
|
270
|
-
= '\n'
|
|
271
|
-
if (variable.isJointSearch)
|
|
272
|
-
| @ViewChild('menu', { read: ElementRef }) public menuElement: ElementRef;
|
|
273
|
-
| @ViewChild(QdpViewComponent, { read: ElementRef }) public qdpViewElementRef: ElementRef;
|
|
274
|
-
| @ViewChild(QdpViewComponent) public qdpView: any;
|
|
275
|
-
= '\n'
|
|
276
|
-
| public viewModel: #{variable.externalPrefix}#{variable.viewModelName};
|
|
277
|
-
| lang: string;
|
|
278
|
-
| size: any = {};
|
|
279
|
-
= '\n'
|
|
280
|
-
= '\n'
|
|
281
|
-
| constructor(
|
|
282
|
-
= '\n'
|
|
283
|
-
| private wizardSer: WizardService,
|
|
284
|
-
| private keybindingService: KeybindingService,
|
|
285
|
-
| private langService: #{variable.externalPrefix}LangService,
|
|
286
|
-
= '\n'
|
|
287
|
-
if (variable.isJointSearch)
|
|
288
|
-
| public menuController: MenuControllerService,
|
|
289
|
-
= '\n'
|
|
290
|
-
if(variable.componentFarrisLookups&& variable.componentFarrisLookups.length)
|
|
291
|
-
|private componentManagerService:ComponentManagerService,
|
|
292
|
-
if(variable.injectors&&variable.injectors.length)
|
|
293
|
-
each injector in variable.injectors
|
|
294
|
-
if(injector.usePrefix)
|
|
295
|
-
| private #{injector.name}: #{injector.className},
|
|
296
|
-
else
|
|
297
|
-
| private #{variable.externalPrefix}#{injector.name}: #{injector.className},
|
|
298
|
-
= '\n'
|
|
299
|
-
if (variable.componentType == 'Frame')
|
|
300
|
-
| private route: ActivatedRoute,
|
|
301
|
-
| private frameworkService: FrameworkService,
|
|
302
|
-
| private applicationParamsService: ApplicationParamService,
|
|
303
|
-
= '\n'
|
|
304
|
-
if (variable.stateMachine)
|
|
305
|
-
| private stateMachine: StateMachine,
|
|
306
|
-
= '\n'
|
|
307
|
-
| public injector: Injector
|
|
308
|
-
| ) {
|
|
309
|
-
| super(injector);
|
|
310
|
-
| this.lang = localStorage.getItem('languageCode');
|
|
311
|
-
| }
|
|
312
|
-
= '\n'
|
|
313
|
-
= '\n'
|
|
314
|
-
| ngOnInit() {
|
|
315
|
-
| if (this.keybindingService) {
|
|
316
|
-
| this.viewModel.keybindingMap.forEach((keyBinding, method) => {
|
|
317
|
-
| this.keybindingService.register(keyBinding, () => {
|
|
318
|
-
| return this.viewModel[method]();
|
|
319
|
-
| });
|
|
320
|
-
| });
|
|
321
|
-
| }
|
|
322
|
-
= '\n'
|
|
323
|
-
if(variable.farrisDataGridParameter && variable.farrisDataGridParameter.length)
|
|
324
|
-
each dataGridParameter in variable.farrisDataGridParameter
|
|
325
|
-
| this.#{dataGridParameter.columnsName}=[
|
|
326
|
-
= '\n'
|
|
327
|
-
if (dataGridParameter.columns && dataGridParameter.columns.length)
|
|
328
|
-
each dataGridParameterColumn,columnIndex in dataGridParameter.columns
|
|
329
|
-
if(dataGridParameterColumn && dataGridParameterColumn.length)
|
|
330
|
-
| [
|
|
331
|
-
each dataGridParameterInnerColumn,innerColumnIndex in dataGridParameterColumn
|
|
332
|
-
if(!dataGridParameterInnerColumn.template)
|
|
333
|
-
| {field:'#{dataGridParameterInnerColumn.field}'#{dataGridParameterInnerColumn.width?',width:'+dataGridParameterInnerColumn.width:',width:100'},title: this.langService.transform('#{dataGridParameterInnerColumn.id}',this.lang) || '#{dataGridParameterInnerColumn.title}',dataType:'#{dataGridParameterInnerColumn.dataType}'
|
|
334
|
-
if(dataGridParameterInnerColumn.editor)
|
|
335
|
-
| ,
|
|
336
|
-
| editor:{type:#{dataGridParameterInnerColumn.editorType},options:!{dataGridParameterInnerColumn.editor}}
|
|
337
|
-
if(dataGridParameterInnerColumn.fixed)
|
|
338
|
-
| ,
|
|
339
|
-
| fixed:'#{dataGridParameterInnerColumn.fixed}'
|
|
340
|
-
if(dataGridParameterInnerColumn.cellStyler)
|
|
341
|
-
| ,
|
|
342
|
-
| styler:this.#{dataGridParameterInnerColumn.cellStylerName}
|
|
343
|
-
if(dataGridParameterInnerColumn.colspan && !dataGridParameterInnerColumn.field)
|
|
344
|
-
| ,
|
|
345
|
-
| colspan:#{dataGridParameterInnerColumn.colspan}
|
|
346
|
-
if(dataGridParameterInnerColumn.rowspan)
|
|
347
|
-
| ,
|
|
348
|
-
| rowspan:#{dataGridParameterInnerColumn.rowspan}
|
|
349
|
-
if(dataGridParameterInnerColumn.sortable)
|
|
350
|
-
| ,
|
|
351
|
-
| sortable:#{dataGridParameterInnerColumn.sortable}
|
|
352
|
-
if(dataGridParameterInnerColumn.sortOrder)
|
|
353
|
-
| ,
|
|
354
|
-
| order:'#{dataGridParameterInnerColumn.sortOrder}'
|
|
355
|
-
if(dataGridParameterInnerColumn.noSearch)
|
|
356
|
-
| ,
|
|
357
|
-
| nosearch:'#{dataGridParameterInnerColumn.noSearch}'
|
|
358
|
-
if(dataGridParameterInnerColumn.formatterString)
|
|
359
|
-
| ,
|
|
360
|
-
| formatter:!{dataGridParameterInnerColumn.formatterString}
|
|
361
|
-
|}
|
|
362
|
-
else
|
|
363
|
-
| {field:'#{dataGridParameterInnerColumn.field}'#{dataGridParameterInnerColumn.width?',width:'+dataGridParameterInnerColumn.width:',width:100'},title:this.langService.transform('#{dataGridParameterInnerColumn.id}',this.lang) || '#{dataGridParameterInnerColumn.title}',dataType:'#{dataGridParameterInnerColumn.dataType}',
|
|
364
|
-
| template:this.#{dataGridParameterInnerColumn.template}
|
|
365
|
-
if(dataGridParameterInnerColumn.editor)
|
|
366
|
-
| ,
|
|
367
|
-
| editor:{type:#{dataGridParameterInnerColumn.editorType},options:!{dataGridParameterInnerColumn.editor}}
|
|
368
|
-
if(dataGridParameterInnerColumn.fixed)
|
|
369
|
-
| ,
|
|
370
|
-
| fixed:'#{dataGridParameterInnerColumn.fixed}'
|
|
371
|
-
if(dataGridParameterInnerColumn.cellStyler)
|
|
372
|
-
| ,
|
|
373
|
-
| styler:this.#{dataGridParameterInnerColumn.cellStylerName}
|
|
374
|
-
if(dataGridParameterInnerColumn.colspan && !dataGridParameterInnerColumn.field)
|
|
375
|
-
| ,
|
|
376
|
-
| colspan:#{dataGridParameterInnerColumn.colspan}
|
|
377
|
-
if(dataGridParameterInnerColumn.rowspan)
|
|
378
|
-
| ,
|
|
379
|
-
| rowspan:#{dataGridParameterInnerColumn.rowspan}
|
|
380
|
-
if(dataGridParameterInnerColumn.sortable)
|
|
381
|
-
| ,
|
|
382
|
-
| sortable:#{dataGridParameterInnerColumn.sortable}
|
|
383
|
-
if(dataGridParameterInnerColumn.sortOrder)
|
|
384
|
-
| ,
|
|
385
|
-
| order:'#{dataGridParameterInnerColumn.sortOrder}'
|
|
386
|
-
if(dataGridParameterInnerColumn.noSearch)
|
|
387
|
-
| ,
|
|
388
|
-
| nosearch:'#{dataGridParameterInnerColumn.noSearch}'
|
|
389
|
-
if(dataGridParameterInnerColumn.formatterString)
|
|
390
|
-
| ,
|
|
391
|
-
| formatter:!{dataGridParameterInnerColumn.formatterString}
|
|
392
|
-
| }
|
|
393
|
-
if(innerColumnIndex < dataGridParameterColumn.length-1)
|
|
394
|
-
|,
|
|
395
|
-
= '\n'
|
|
396
|
-
= '\n'
|
|
397
|
-
| ]
|
|
398
|
-
if(columnIndex < dataGridParameter.columns.length -1 )
|
|
399
|
-
| ,
|
|
400
|
-
= '\n'
|
|
401
|
-
| ];
|
|
402
|
-
if (variable.componentType == 'Frame')
|
|
403
|
-
| this.applicationParamsService.parseParams(this.route, this.frameworkService, this.viewModel, () => {
|
|
404
|
-
| this.onFormLoad();
|
|
405
|
-
| })
|
|
406
|
-
if (variable.stateMachine && variable.toolbars && variable.toolbars.length)
|
|
407
|
-
each toolbar in variable.toolbars
|
|
408
|
-
= '\n'
|
|
409
|
-
| this.stateMachine.stateChange.subscribe(() => {
|
|
410
|
-
| const #{toolbar.id}states = {
|
|
411
|
-
= '\n'
|
|
412
|
-
if (toolbar.states)
|
|
413
|
-
each state, buttonId in toolbar.states
|
|
414
|
-
| '#{buttonId}': #{state.replace('viewModel','this.viewModel')},
|
|
415
|
-
= '\n'
|
|
416
|
-
| }
|
|
417
|
-
| this.#{toolbar.id}States.next(#{toolbar.id}states);
|
|
418
|
-
| });
|
|
419
|
-
= '\n'
|
|
420
|
-
= '\n'
|
|
421
|
-
if (variable.stateMachine && variable.toolbars && variable.toolbars.length)
|
|
422
|
-
each toolbar in variable.toolbars
|
|
423
|
-
= '\n'
|
|
424
|
-
| this.stateMachine.stateChange.subscribe(() => {
|
|
425
|
-
| const #{toolbar.id}visibleStates = {
|
|
426
|
-
= '\n'
|
|
427
|
-
if(toolbar.visibleStates)
|
|
428
|
-
each state, buttonId in toolbar.visibleStates
|
|
429
|
-
| '#{buttonId}': #{((state==true || state==false)?state:state.replace('viewModel','this.viewModel'))},
|
|
430
|
-
= '\n'
|
|
431
|
-
| }
|
|
432
|
-
| this.#{toolbar.id}VisibleStates.next(#{toolbar.id}visibleStates);
|
|
433
|
-
| });
|
|
434
|
-
= '\n'
|
|
435
|
-
= '\n'
|
|
436
|
-
if (variable.stateMachine && variable.toolbars && variable.toolbars.length)
|
|
437
|
-
each toolbar in variable.toolbars
|
|
438
|
-
= '\n'
|
|
439
|
-
| this.#{toolbar.id}.forEach((toolbarItem)=>{
|
|
440
|
-
| const transformText =this.langService.transform(toolbarItem.id,this.lang);
|
|
441
|
-
| if(transformText)
|
|
442
|
-
| {
|
|
443
|
-
| toolbarItem.text=transformText;
|
|
444
|
-
| }
|
|
445
|
-
|});
|
|
446
|
-
if (variable.stateMachine && variable.farristabtoolbars && variable.farristabtoolbars.length)
|
|
447
|
-
= '\n'
|
|
448
|
-
| this.stateMachine.stateChange.subscribe(() => {
|
|
449
|
-
| const states={
|
|
450
|
-
= '\n'
|
|
451
|
-
each farristabtoolbar,toolbarIndex in variable.farristabtoolbars
|
|
452
|
-
if (farristabtoolbar.contents && farristabtoolbar.contents.length > 0)
|
|
453
|
-
if (toolbarIndex>0)
|
|
454
|
-
| ,
|
|
455
|
-
= '\n'
|
|
456
|
-
each farristabtoolbaritem,index in farristabtoolbar.contents
|
|
457
|
-
| '#{farristabtoolbaritem.id}':#{(farristabtoolbaritem.disable==true || farristabtoolbaritem.disable==false)?farristabtoolbaritem.disable:farristabtoolbaritem.disable}
|
|
458
|
-
if (index < farristabtoolbar.contents.length-1)
|
|
459
|
-
| ,
|
|
460
|
-
= '\n'
|
|
461
|
-
= '\n'
|
|
462
|
-
| };
|
|
463
|
-
= '\n'
|
|
464
|
-
| this.tabsToolbarStates.next(states);
|
|
465
|
-
| });
|
|
466
|
-
if (variable.stateMachine && variable.farristabtoolbars && variable.farristabtoolbars.length)
|
|
467
|
-
= '\n'
|
|
468
|
-
| this.stateMachine.stateChange.subscribe(() => {
|
|
469
|
-
| const visibleStates={
|
|
470
|
-
= '\n'
|
|
471
|
-
each farristabtoolbar,toolbarIndex in variable.farristabtoolbars
|
|
472
|
-
if (farristabtoolbar.contents && farristabtoolbar.contents.length > 0)
|
|
473
|
-
if (toolbarIndex>0)
|
|
474
|
-
| ,
|
|
475
|
-
= '\n'
|
|
476
|
-
each farristabtoolbaritem,index in farristabtoolbar.contents
|
|
477
|
-
| '#{farristabtoolbaritem.id}':#{((farristabtoolbaritem.visible==true || farristabtoolbaritem.visible==false)?farristabtoolbaritem.visible:farristabtoolbaritem.visible.replace('viewModel','this.viewModel'))}
|
|
478
|
-
if (index < farristabtoolbar.contents.length-1)
|
|
479
|
-
| ,
|
|
480
|
-
= '\n'
|
|
481
|
-
= '\n'
|
|
482
|
-
| };
|
|
483
|
-
= '\n'
|
|
484
|
-
| this.tabsToolbarVisibleStates.next(visibleStates);
|
|
485
|
-
| });
|
|
486
|
-
else
|
|
487
|
-
= '\n'
|
|
488
|
-
| this.onFormLoad();
|
|
489
|
-
= '\n'
|
|
490
|
-
= '\n'
|
|
491
|
-
= '\n'
|
|
492
|
-
| }
|
|
493
|
-
= '\n'
|
|
494
|
-
= '\n'
|
|
495
|
-
| ngAfterViewInit(): void {
|
|
496
|
-
if(variable.afterViewInit)
|
|
497
|
-
= '\n'
|
|
498
|
-
| #{variable.afterViewInit}
|
|
499
|
-
if(variable.componentFarrisLookups && variable.componentFarrisLookups.length)
|
|
500
|
-
= '\n'
|
|
501
|
-
each farrisLookup,lookupIndex in variable.componentFarrisLookups
|
|
502
|
-
| this.componentManagerService.appendControl('#{farrisLookup.id}',this.#{farrisLookup.id});
|
|
503
|
-
= '\n'
|
|
504
|
-
if (variable.afterViewInitDeclarationEvents)
|
|
505
|
-
each afterViewInitDeclarationEvent in variable.afterViewInitDeclarationEvents
|
|
506
|
-
= '\n'
|
|
507
|
-
| #{afterViewInitDeclarationEvent}
|
|
508
|
-
= '\n'
|
|
509
|
-
= '\n'
|
|
510
|
-
| }
|
|
511
|
-
= '\n'
|
|
512
|
-
= '\n'
|
|
513
|
-
| handleSizeChange(size: any) {
|
|
514
|
-
| this.size = size;
|
|
515
|
-
| }
|
|
516
|
-
= '\n'
|
|
517
|
-
= '\n'
|
|
518
|
-
| public onFormLoad() {
|
|
519
|
-
= '\n'
|
|
520
|
-
if (variable.onInit)
|
|
521
|
-
| #{variable.onInit}
|
|
522
|
-
= '\n'
|
|
523
|
-
if (variable.onInitDeclarationEvents)
|
|
524
|
-
each onInitDeclarationEvent in variable.onInitDeclarationEvents
|
|
525
|
-
= '\n'
|
|
526
|
-
| #{onInitDeclarationEvent}
|
|
527
|
-
= '\n'
|
|
528
|
-
| }
|
|
529
|
-
= '\n'
|
|
530
|
-
= '\n'
|
|
531
|
-
if (variable.componentEvents && variable.componentEvents.length)
|
|
532
|
-
each event in variable.componentEvents
|
|
533
|
-
| #{event.name} = (data) => {
|
|
534
|
-
if (event.declarationEvents && event.declarationEvents.length)
|
|
535
|
-
= '\n'
|
|
536
|
-
each declarationEvent in event.declarationEvents
|
|
537
|
-
| #{declarationEvent}
|
|
538
|
-
= '\n'
|
|
539
|
-
if (event.eventHandler)
|
|
540
|
-
= '\n'
|
|
541
|
-
| return #{event.eventHandler}.call(this,data);
|
|
542
|
-
= '\n'
|
|
543
|
-
else
|
|
544
|
-
= '\n'
|
|
545
|
-
| return of(true);
|
|
546
|
-
= '\n'
|
|
547
|
-
| };
|
|
548
|
-
= '\n'
|
|
549
|
-
= '\n'
|
|
550
|
-
= '\n'
|
|
551
|
-
= '\n'
|
|
552
|
-
if (variable.toolbars && variable.toolbars.length)
|
|
553
|
-
each toolbar in variable.toolbars
|
|
554
|
-
| #{toolbar.id} = !{JSON.stringify(toolbar.items, null, 2)};
|
|
555
|
-
= '\n'
|
|
556
|
-
= '\n'
|
|
557
|
-
| #{toolbar.id}States = new BehaviorSubject({});
|
|
558
|
-
| #{toolbar.id}VisibleStates = new BehaviorSubject({});
|
|
559
|
-
= '\n'
|
|
560
|
-
= '\n'
|
|
561
|
-
if(toolbar.eventHandler)
|
|
562
|
-
| #{toolbar.eventHandler}(args) {
|
|
563
|
-
if (toolbar.events && toolbar.events.length)
|
|
564
|
-
= '\n'
|
|
565
|
-
| switch (args.id) {
|
|
566
|
-
= '\n'
|
|
567
|
-
each event in toolbar.events
|
|
568
|
-
| case '#{event.name}':
|
|
569
|
-
if (event.eventHandler)
|
|
570
|
-
= '\n'
|
|
571
|
-
| #{event.eventHandler};
|
|
572
|
-
= '\n'
|
|
573
|
-
if (event.declarationEvents && event.declarationEvents.length)
|
|
574
|
-
each eventDeclaration in event.declarationEvents
|
|
575
|
-
= '\n'
|
|
576
|
-
| #{eventDeclaration}
|
|
577
|
-
= '\n'
|
|
578
|
-
| break;
|
|
579
|
-
= '\n'
|
|
580
|
-
| }
|
|
581
|
-
= '\n'
|
|
582
|
-
| }
|
|
583
|
-
= '\n'
|
|
584
|
-
if (variable.farristabtoolbars && variable.farristabtoolbars.length)
|
|
585
|
-
| tabsToolbarStates = new BehaviorSubject({});
|
|
586
|
-
| tabsToolbarVisibleStates = new BehaviorSubject({});
|
|
587
|
-
= '\n'
|
|
588
|
-
each farristabtoolbar in variable.farristabtoolbars
|
|
589
|
-
| #{farristabtoolbar.generatedID} = {
|
|
590
|
-
= '\n'
|
|
591
|
-
if(farristabtoolbar.position)
|
|
592
|
-
| position:'#{farristabtoolbar.position}',
|
|
593
|
-
= '\n'
|
|
594
|
-
if (farristabtoolbar.contents && farristabtoolbar.contents.length > 0)
|
|
595
|
-
| contents:[
|
|
596
|
-
= '\n'
|
|
597
|
-
each farristabtoolbaritem,index in farristabtoolbar.contents
|
|
598
|
-
| {
|
|
599
|
-
| id:'#{farristabtoolbaritem.id}',
|
|
600
|
-
= '\n'
|
|
601
|
-
| disable:#{(farristabtoolbaritem.disable==true || farristabtoolbaritem.disable==false)?farristabtoolbaritem.disable:farristabtoolbaritem.disable},
|
|
602
|
-
= '\n'
|
|
603
|
-
| visible:#{(farristabtoolbaritem.visible==true || farristabtoolbaritem.visible==false)?farristabtoolbaritem.visible:farristabtoolbaritem.visible.replace('viewModel','this.viewModel')},
|
|
604
|
-
| title:'#{farristabtoolbaritem.title}',
|
|
605
|
-
= '\n'
|
|
606
|
-
if (farristabtoolbaritem.click)
|
|
607
|
-
| click:()=>{ #{farristabtoolbaritem.click} },
|
|
608
|
-
= '\n'
|
|
609
|
-
| appearance:{
|
|
610
|
-
= '\n'
|
|
611
|
-
if (farristabtoolbaritem.appearance && farristabtoolbaritem.appearance.class)
|
|
612
|
-
| "class":"#{farristabtoolbaritem.appearance.class}"
|
|
613
|
-
= '\n'
|
|
614
|
-
| }
|
|
615
|
-
= '\n'
|
|
616
|
-
| }
|
|
617
|
-
if (index<farristabtoolbar.contents.length-1)
|
|
618
|
-
| ,
|
|
619
|
-
= '\n'
|
|
620
|
-
| ]
|
|
621
|
-
= '\n'
|
|
622
|
-
| }
|
|
623
|
-
= '\n'
|
|
624
|
-
if (variable.componentSubscriptions && variable.componentSubscriptions.length)
|
|
625
|
-
each subscriptionItem in variable.componentSubscriptions
|
|
626
|
-
= '\n'
|
|
627
|
-
| @NgSubscription({
|
|
628
|
-
| name: '#{subscriptionItem.subscribeOn}',
|
|
629
|
-
| token: '#{subscriptionItem.token}',
|
|
630
|
-
| paramMapCollection:[
|
|
631
|
-
= '\n'
|
|
632
|
-
if (subscriptionItem.paramMapCollection && subscriptionItem.paramMapCollection.length)
|
|
633
|
-
each paramMap,index in subscriptionItem.paramMapCollection
|
|
634
|
-
| {
|
|
635
|
-
| frameId:'#{variable.componentFrameID ? variable.componentFrameID : variable.replacedId}',
|
|
636
|
-
= '\n'
|
|
637
|
-
| from: '#{paramMap.from}',
|
|
638
|
-
= '\n'
|
|
639
|
-
| to : '#{paramMap.to}'
|
|
640
|
-
| }
|
|
641
|
-
if (index < subscriptionItem.paramMapCollection.length-1)
|
|
642
|
-
| ,
|
|
643
|
-
= '\n'
|
|
644
|
-
= '\n'
|
|
645
|
-
| ]
|
|
646
|
-
= '\n'
|
|
647
|
-
| })
|
|
648
|
-
= '\n'
|
|
649
|
-
| public #{subscriptionItem.subscribeOn}(currentComponent:#{variable.externalPrefix}RootComponent,eventArgs: any) {
|
|
650
|
-
if (subscriptionItem.command)
|
|
651
|
-
= '\n'
|
|
652
|
-
| currentComponent.viewModel#{subscriptionItem.command.viewModelCommandPath}.call(this,eventArgs);
|
|
653
|
-
= '\n'
|
|
654
|
-
| }
|
|
655
|
-
= '\n'
|
|
656
|
-
= '\n'
|
|
657
|
-
| }
|
|
658
|
-
= '\n'
|
|
1
|
+
//- -var variable = {isQdpForm:true, id: 'salesorder-component', appearance: "mb-2", onInit: "viewModel.loadList", name: 'SalesOrder', repositoryName: "repositoryName", viewModelName: 'SaleOrderListViewModel',form: 'form',stateMachine:'stateMachine',template: 'SaleOrder', handlers: ['a']}
|
|
2
|
+
|
|
3
|
+
| import { Component, OnInit, Injector, AfterViewInit,ViewChild,HostBinding,TemplateRef } from '@angular/core';
|
|
4
|
+
| import { BehaviorSubject } from 'rxjs';
|
|
5
|
+
| import { of } from 'rxjs/observable/of';
|
|
6
|
+
| import { Form, FrameEvent, FrameEventBus, FrameComponent, FARRIS_DEVKIT_FRAME_PROVIDERS, ViewModel, COMMAND_HANDLERS_TOKEN, FRAME_ID, StateMachine, BindingData, Repository, UIState,NgSubscription,Declaration,EXCEPTION_HANDLER } from '@farris/devkit';
|
|
7
|
+
| import { FARRIS_COMMAND_SERVICE_FRAME_PROVIDERS,ComponentManagerService } from '@farris/command-services';
|
|
8
|
+
| import { KeybindingService } from '@farris/command-services';
|
|
9
|
+
| import { EditorTypes} from '@farris/ui-datagrid-editors';
|
|
10
|
+
= '\n'
|
|
11
|
+
if (variable.componentType == 'Frame')
|
|
12
|
+
| import { ExceptionHandler } from '@farris/command-services';
|
|
13
|
+
| import { FrameworkSessionService,UriService } from '@farris/bef';
|
|
14
|
+
| import { WFSubmiteService } from '@gsp-wf/rtdevkit';
|
|
15
|
+
| import { ActivatedRoute, ParamMap } from '@angular/router';
|
|
16
|
+
| import { FrameworkService } from '@gsp-sys/rtf-common';
|
|
17
|
+
| import { ApplicationParamService } from '@farris/command-services';
|
|
18
|
+
| import { #{variable.externalPrefix}EventDeclaration } from '../../events/event';
|
|
19
|
+
| import { FARRIS_FORM_COMPONENTS } from '@farris/command-services';
|
|
20
|
+
| import { CloudprintService } from '@gsp-svc/cloudprint';
|
|
21
|
+
| import { WFFlowchartService } from '@gsp-wf/ui-flowchart';
|
|
22
|
+
if(variable.isGroupForm==false)
|
|
23
|
+
= '\n'
|
|
24
|
+
| import { AppContext } from '@farris/devkit';
|
|
25
|
+
= '\n'
|
|
26
|
+
| import { BefLookupRestService,DefaultComboHttpService } from '@farris/bef';
|
|
27
|
+
| import { #{variable.externalPrefix}#{variable.viewModelName} } from '../../viewmodels/#{variable.viewModelName.toLowerCase()}';
|
|
28
|
+
| import { #{variable.externalPrefix}#{variable.repositoryName} } from '../../models/#{variable.repositoryName.toLowerCase()}';
|
|
29
|
+
| import { ServerSideToken,LookupGridComponent } from '@farris/ui-lookup';
|
|
30
|
+
| import { ComboServerSideToken } from '@farris/ui-combo-list';
|
|
31
|
+
= '\n'
|
|
32
|
+
if (variable.isQdpForm)
|
|
33
|
+
| import { QDP_COMMAND_SERVICE_PROVIDERS } from '@qdp/command-services';
|
|
34
|
+
= '\n'
|
|
35
|
+
if (variable.isJointSearch)
|
|
36
|
+
| import { ElementRef } from '@angular/core';
|
|
37
|
+
| import { QdpViewComponent } from '@qdp/spread';
|
|
38
|
+
| import { MenuControllerService} from '@qdp/search-join';
|
|
39
|
+
= '\n'
|
|
40
|
+
| import { WizardService, FarrisPageDetailComponent } from '@farris/ui-wizard';
|
|
41
|
+
| import { #{variable.externalPrefix}LangService } from '../../lang/lang-pipe';
|
|
42
|
+
if (variable.form)
|
|
43
|
+
| import { #{variable.externalPrefix}#{variable.form} } from '../../viewmodels/form/#{variable.form.toLowerCase()}';
|
|
44
|
+
= '\n'
|
|
45
|
+
if (variable.stateMachine)
|
|
46
|
+
| import { #{variable.externalPrefix}#{variable.stateMachine} } from '../../viewmodels/statemachine/#{variable.stateMachine.toLowerCase()}';
|
|
47
|
+
= '\n'
|
|
48
|
+
if (variable.states)
|
|
49
|
+
| import { #{variable.externalPrefix}#{variable.states} } from '../../viewmodels/uistate/#{variable.states.toLowerCase()}';
|
|
50
|
+
= '\n'
|
|
51
|
+
if (variable.handlers && variable.handlers.length)
|
|
52
|
+
each p in variable.handlers
|
|
53
|
+
| import { #{variable.externalPrefix}#{p} } from '../../viewmodels/handlers/#{p.toLowerCase()}';
|
|
54
|
+
= '\n'
|
|
55
|
+
if (variable.services && variable.services.length)
|
|
56
|
+
each service in variable.services
|
|
57
|
+
| import { #{service.name} as #{service.alias} } from '../../services/#{service.fileName.toLowerCase()}';
|
|
58
|
+
= '\n'
|
|
59
|
+
if (variable.dependencies && variable.dependencies.length)
|
|
60
|
+
each dependent in variable.dependencies
|
|
61
|
+
if(dependent.usePrefix == null || dependent.usePrefix == undefined || dependent.usePrefix == true)
|
|
62
|
+
| import { #{variable.externalPrefix}#{dependent.name} } from '#{dependent.path}';
|
|
63
|
+
else
|
|
64
|
+
| import { #{dependent.name} } from '#{dependent.path}';
|
|
65
|
+
= '\n'
|
|
66
|
+
= '\n'
|
|
67
|
+
if (variable.componentType == 'Frame')
|
|
68
|
+
| const FORM_CONTROLS = {
|
|
69
|
+
= '\n'
|
|
70
|
+
if (variable.modalFormControls && variable.modalFormControls.length)
|
|
71
|
+
each modalFormControl,index in variable.modalFormControls
|
|
72
|
+
if(modalFormControl.modalFormType && modalFormControl.modalFormType == "url")
|
|
73
|
+
| '#{modalFormControl.name}' : '#{modalFormControl.url}'
|
|
74
|
+
else
|
|
75
|
+
| '#{modalFormControl.name}' : #{modalFormControl.className}
|
|
76
|
+
if (index<variable.modalFormControls.length-1)
|
|
77
|
+
| ,
|
|
78
|
+
= '\n'
|
|
79
|
+
|}
|
|
80
|
+
= '\n'
|
|
81
|
+
| @Component({
|
|
82
|
+
= '\n'
|
|
83
|
+
if (variable.componentSelector)
|
|
84
|
+
| selector: 'app-#{variable.componentSelector.toLowerCase()}',
|
|
85
|
+
else
|
|
86
|
+
| selector: 'app-#{variable.name.toLowerCase()}',
|
|
87
|
+
= '\n'
|
|
88
|
+
| templateUrl: './#{variable.name.toLowerCase()}.html',
|
|
89
|
+
if(variable.createEmptyScssFile)
|
|
90
|
+
= '\n'
|
|
91
|
+
| styleUrls: ['./#{variable.name.toLowerCase()}.scss'],
|
|
92
|
+
= '\n'
|
|
93
|
+
= '\n'
|
|
94
|
+
if (variable.handlers && variable.handlers.length)
|
|
95
|
+
| providers: [
|
|
96
|
+
= '\n'
|
|
97
|
+
if (variable.componentType == 'Frame')
|
|
98
|
+
| { provide: Declaration, useClass: #{variable.externalPrefix}EventDeclaration },
|
|
99
|
+
| { provide: WFSubmiteService, useClass: WFSubmiteService },
|
|
100
|
+
| { provide: CloudprintService, useClass: CloudprintService},
|
|
101
|
+
| { provide: WFFlowchartService, useClass: WFFlowchartService},
|
|
102
|
+
if(variable.isGroupForm==false)
|
|
103
|
+
| AppContext,
|
|
104
|
+
= '\n'
|
|
105
|
+
if (variable.componentSelector)
|
|
106
|
+
= '\n'
|
|
107
|
+
| { provide: EXCEPTION_HANDLER, useValue: null},
|
|
108
|
+
= '\n'
|
|
109
|
+
else
|
|
110
|
+
= '\n'
|
|
111
|
+
| { provide: EXCEPTION_HANDLER, useClass: ExceptionHandler},
|
|
112
|
+
= '\n'
|
|
113
|
+
| { provide: FARRIS_FORM_COMPONENTS, useValue: FORM_CONTROLS},
|
|
114
|
+
= '\n'
|
|
115
|
+
else
|
|
116
|
+
| { provide: EXCEPTION_HANDLER, useValue: null},
|
|
117
|
+
= '\n'
|
|
118
|
+
each p in variable.handlers
|
|
119
|
+
| { provide: COMMAND_HANDLERS_TOKEN, useClass: #{variable.externalPrefix}#{p}, multi: true },
|
|
120
|
+
= '\n'
|
|
121
|
+
| FARRIS_DEVKIT_FRAME_PROVIDERS,
|
|
122
|
+
| FARRIS_COMMAND_SERVICE_FRAME_PROVIDERS,
|
|
123
|
+
= '\n'
|
|
124
|
+
if (variable.isQdpForm)
|
|
125
|
+
| QDP_COMMAND_SERVICE_PROVIDERS,
|
|
126
|
+
= '\n'
|
|
127
|
+
| { provide: FRAME_ID, useValue: '#{variable.componentFrameID ? variable.componentFrameID : variable.replacedId}' },
|
|
128
|
+
| { provide: BindingData, useClass: BindingData },
|
|
129
|
+
| { provide: Repository, useExisting: #{variable.externalPrefix}#{variable.repositoryName} },
|
|
130
|
+
| { provide: ServerSideToken, useClass: BefLookupRestService },
|
|
131
|
+
| { provide: ComboServerSideToken, useClass: DefaultComboHttpService },
|
|
132
|
+
| #{variable.externalPrefix}LangService,
|
|
133
|
+
= '\n'
|
|
134
|
+
if (variable.form)
|
|
135
|
+
| { provide: Form, useClass: #{variable.externalPrefix}#{variable.form} },
|
|
136
|
+
= '\n'
|
|
137
|
+
if (variable.stateMachine)
|
|
138
|
+
| { provide: StateMachine, useClass: #{variable.externalPrefix}#{variable.stateMachine} },
|
|
139
|
+
= '\n'
|
|
140
|
+
if (variable.states)
|
|
141
|
+
| { provide: UIState, useClass: #{variable.externalPrefix}#{variable.states} },
|
|
142
|
+
= '\n'
|
|
143
|
+
if (variable.services && variable.services.length)
|
|
144
|
+
each service in variable.services
|
|
145
|
+
| #{service.alias},
|
|
146
|
+
= '\n'
|
|
147
|
+
if (variable.providers && variable.providers.length)
|
|
148
|
+
each provider, index in variable.providers
|
|
149
|
+
if(provider.usePrefix || provider.usePrefix==true)
|
|
150
|
+
| #{variable.externalPrefix}#{provider.name},
|
|
151
|
+
else
|
|
152
|
+
| #{provider.name},
|
|
153
|
+
= '\n'
|
|
154
|
+
| { provide: ViewModel, useClass: #{variable.externalPrefix}#{variable.viewModelName} }
|
|
155
|
+
| ]
|
|
156
|
+
= '\n'
|
|
157
|
+
else
|
|
158
|
+
| providers: [
|
|
159
|
+
| FARRIS_DEVKIT_FRAME_PROVIDERS,
|
|
160
|
+
| FARRIS_COMMAND_SERVICE_FRAME_PROVIDERS,
|
|
161
|
+
= '\n'
|
|
162
|
+
if (variable.isQdpForm)
|
|
163
|
+
| QDP_COMMAND_SERVICE_PROVIDERS,
|
|
164
|
+
= '\n'
|
|
165
|
+
| { provide: FRAME_ID, useValue: '#{variable.componentFrameID ? variable.componentFrameID : variable.replacedId}' },
|
|
166
|
+
| { provide: BindingData, useClass: BindingData },
|
|
167
|
+
| { provide: Repository, useExisting: #{variable.externalPrefix}#{variable.repositoryName} },
|
|
168
|
+
| { provide: ServerSideToken, useClass: BefLookupRestService },
|
|
169
|
+
| { provide: ComboServerSideToken, useClass: DefaultComboHttpService },
|
|
170
|
+
| #{variable.externalPrefix}LangService,
|
|
171
|
+
= '\n'
|
|
172
|
+
if (variable.componentType == 'Frame')
|
|
173
|
+
| { provide: Declaration, useClass: #{variable.externalPrefix}EventDeclaration },
|
|
174
|
+
| { provide: WFSubmiteService, useClass: WFSubmiteService },
|
|
175
|
+
| { provide: WFFlowchartService, useClass: WFFlowchartService},
|
|
176
|
+
if(variable.isGroupForm==false)
|
|
177
|
+
| AppContext,
|
|
178
|
+
= '\n'
|
|
179
|
+
if (variable.componentSelector)
|
|
180
|
+
| { provide: EXCEPTION_HANDLER,useValue: null},
|
|
181
|
+
= '\n'
|
|
182
|
+
else
|
|
183
|
+
| { provide: EXCEPTION_HANDLER, useClass: ExceptionHandler},
|
|
184
|
+
= '\n'
|
|
185
|
+
| { provide: FARRIS_FORM_COMPONENTS, useValue: FORM_CONTROLS},
|
|
186
|
+
= '\n'
|
|
187
|
+
else
|
|
188
|
+
| { provide: EXCEPTION_HANDLER, useValue: null},
|
|
189
|
+
= '\n'
|
|
190
|
+
if (variable.form)
|
|
191
|
+
| { provide: Form, useClass: #{variable.externalPrefix}#{variable.form} },
|
|
192
|
+
= '\n'
|
|
193
|
+
if (variable.stateMachine)
|
|
194
|
+
| { provide: StateMachine, useClass: #{variable.externalPrefix}#{variable.stateMachine} },
|
|
195
|
+
= '\n'
|
|
196
|
+
if (variable.states)
|
|
197
|
+
| { provide: UIState, useClass: #{variable.externalPrefix}#{variable.states} },
|
|
198
|
+
= '\n'
|
|
199
|
+
if (variable.services && variable.services.length)
|
|
200
|
+
each service in variable.services
|
|
201
|
+
| #{service.alias},
|
|
202
|
+
= '\n'
|
|
203
|
+
if (variable.providers && variable.providers.length)
|
|
204
|
+
each provider, index in variable.providers
|
|
205
|
+
if(provider.usePrefix || provider.usePrefix==true)
|
|
206
|
+
| #{variable.externalPrefix}#{provider.name},
|
|
207
|
+
else
|
|
208
|
+
| #{provider.name},
|
|
209
|
+
= '\n'
|
|
210
|
+
| { provide: ViewModel, useClass: #{variable.externalPrefix}#{variable.viewModelName} }
|
|
211
|
+
| ]
|
|
212
|
+
= '\n'
|
|
213
|
+
| })
|
|
214
|
+
| export class #{variable.externalPrefix}#{variable.name} extends FrameComponent implements OnInit, AfterViewInit {
|
|
215
|
+
if(variable.componentFarrisLookups && variable.componentFarrisLookups.length)
|
|
216
|
+
each farrisLookup,lookupIndex in variable.componentFarrisLookups
|
|
217
|
+
| @ViewChild('#{farrisLookup.id}')
|
|
218
|
+
| #{farrisLookup.id}:LookupGridComponent;
|
|
219
|
+
= '\n'
|
|
220
|
+
if(variable.farrisDataGridParameter && variable.farrisDataGridParameter.length)
|
|
221
|
+
each dataGridParameter in variable.farrisDataGridParameter
|
|
222
|
+
= '\n'
|
|
223
|
+
| #{dataGridParameter.columnsName}=[];
|
|
224
|
+
= '\n'
|
|
225
|
+
if(dataGridParameter.groupFormatter)
|
|
226
|
+
| #{dataGridParameter.groupFormatterName}= (row) => {
|
|
227
|
+
| !{dataGridParameter.groupFormatter}
|
|
228
|
+
|}
|
|
229
|
+
= '\n'
|
|
230
|
+
if(dataGridParameter.groupStyler)
|
|
231
|
+
| #{dataGridParameter.groupStylerName}= (row) => {
|
|
232
|
+
| !{dataGridParameter.groupStyler}
|
|
233
|
+
|}
|
|
234
|
+
= '\n'
|
|
235
|
+
if(dataGridParameter.rowStyler)
|
|
236
|
+
| #{dataGridParameter.rowStylerName}= (rowData) => {
|
|
237
|
+
| !{dataGridParameter.rowStyler}
|
|
238
|
+
|}
|
|
239
|
+
= '\n'
|
|
240
|
+
if(dataGridParameter.footerTemplateName)
|
|
241
|
+
| @ViewChild('#{dataGridParameter.footerTemplateName}') #{dataGridParameter.footerTemplateName}:TemplateRef<any>;
|
|
242
|
+
= '\n'
|
|
243
|
+
if(dataGridParameter.columns && dataGridParameter.columns.length)
|
|
244
|
+
= '\n'
|
|
245
|
+
each dataGridColumn,dataGridColumnIndex in dataGridParameter.columns
|
|
246
|
+
if(dataGridColumn && dataGridColumn.length)
|
|
247
|
+
each dataGridInnerColumn,dataGridInnerColumnIndex in dataGridColumn
|
|
248
|
+
if(dataGridInnerColumn.template)
|
|
249
|
+
| @ViewChild('#{dataGridInnerColumn.template}') #{dataGridInnerColumn.template}:TemplateRef<any>;
|
|
250
|
+
= '\n'
|
|
251
|
+
if(variable.farrisDataGridParameter && variable.farrisDataGridParameter.length)
|
|
252
|
+
each dataGridParameter in variable.farrisDataGridParameter
|
|
253
|
+
= '\n'
|
|
254
|
+
if(dataGridParameter.columns && dataGridParameter.columns.length)
|
|
255
|
+
each dataGridColumn,dataGridColumnIndex in dataGridParameter.columns
|
|
256
|
+
if(dataGridColumn && dataGridColumn.length)
|
|
257
|
+
each dataGridInnerColumn,dataGridInnerColumnIndex in dataGridColumn
|
|
258
|
+
if(dataGridInnerColumn.cellStyler)
|
|
259
|
+
| #{dataGridInnerColumn.cellStylerName}=(val, data, index) =>{
|
|
260
|
+
| #{dataGridInnerColumn.cellStyler}
|
|
261
|
+
|}
|
|
262
|
+
= '\n'
|
|
263
|
+
if (variable.componentType == "Frame")
|
|
264
|
+
= '\n'
|
|
265
|
+
| @HostBinding('class')
|
|
266
|
+
| cls = 'f-page-root #{variable.appearance} ';
|
|
267
|
+
else
|
|
268
|
+
| @HostBinding('class')
|
|
269
|
+
| cls = '#{variable.appearance}';
|
|
270
|
+
= '\n'
|
|
271
|
+
if (variable.isJointSearch)
|
|
272
|
+
| @ViewChild('menu', { read: ElementRef }) public menuElement: ElementRef;
|
|
273
|
+
| @ViewChild(QdpViewComponent, { read: ElementRef }) public qdpViewElementRef: ElementRef;
|
|
274
|
+
| @ViewChild(QdpViewComponent) public qdpView: any;
|
|
275
|
+
= '\n'
|
|
276
|
+
| public viewModel: #{variable.externalPrefix}#{variable.viewModelName};
|
|
277
|
+
| lang: string;
|
|
278
|
+
| size: any = {};
|
|
279
|
+
= '\n'
|
|
280
|
+
= '\n'
|
|
281
|
+
| constructor(
|
|
282
|
+
= '\n'
|
|
283
|
+
| private wizardSer: WizardService,
|
|
284
|
+
| private keybindingService: KeybindingService,
|
|
285
|
+
| private langService: #{variable.externalPrefix}LangService,
|
|
286
|
+
= '\n'
|
|
287
|
+
if (variable.isJointSearch)
|
|
288
|
+
| public menuController: MenuControllerService,
|
|
289
|
+
= '\n'
|
|
290
|
+
if(variable.componentFarrisLookups&& variable.componentFarrisLookups.length)
|
|
291
|
+
|private componentManagerService:ComponentManagerService,
|
|
292
|
+
if(variable.injectors&&variable.injectors.length)
|
|
293
|
+
each injector in variable.injectors
|
|
294
|
+
if(injector.usePrefix)
|
|
295
|
+
| private #{injector.name}: #{injector.className},
|
|
296
|
+
else
|
|
297
|
+
| private #{variable.externalPrefix}#{injector.name}: #{injector.className},
|
|
298
|
+
= '\n'
|
|
299
|
+
if (variable.componentType == 'Frame')
|
|
300
|
+
| private route: ActivatedRoute,
|
|
301
|
+
| private frameworkService: FrameworkService,
|
|
302
|
+
| private applicationParamsService: ApplicationParamService,
|
|
303
|
+
= '\n'
|
|
304
|
+
if (variable.stateMachine)
|
|
305
|
+
| private stateMachine: StateMachine,
|
|
306
|
+
= '\n'
|
|
307
|
+
| public injector: Injector
|
|
308
|
+
| ) {
|
|
309
|
+
| super(injector);
|
|
310
|
+
| this.lang = localStorage.getItem('languageCode');
|
|
311
|
+
| }
|
|
312
|
+
= '\n'
|
|
313
|
+
= '\n'
|
|
314
|
+
| ngOnInit() {
|
|
315
|
+
| if (this.keybindingService) {
|
|
316
|
+
| this.viewModel.keybindingMap.forEach((keyBinding, method) => {
|
|
317
|
+
| this.keybindingService.register(keyBinding, () => {
|
|
318
|
+
| return this.viewModel[method]();
|
|
319
|
+
| });
|
|
320
|
+
| });
|
|
321
|
+
| }
|
|
322
|
+
= '\n'
|
|
323
|
+
if(variable.farrisDataGridParameter && variable.farrisDataGridParameter.length)
|
|
324
|
+
each dataGridParameter in variable.farrisDataGridParameter
|
|
325
|
+
| this.#{dataGridParameter.columnsName}=[
|
|
326
|
+
= '\n'
|
|
327
|
+
if (dataGridParameter.columns && dataGridParameter.columns.length)
|
|
328
|
+
each dataGridParameterColumn,columnIndex in dataGridParameter.columns
|
|
329
|
+
if(dataGridParameterColumn && dataGridParameterColumn.length)
|
|
330
|
+
| [
|
|
331
|
+
each dataGridParameterInnerColumn,innerColumnIndex in dataGridParameterColumn
|
|
332
|
+
if(!dataGridParameterInnerColumn.template)
|
|
333
|
+
| {field:'#{dataGridParameterInnerColumn.field}'#{dataGridParameterInnerColumn.width?',width:'+dataGridParameterInnerColumn.width:',width:100'},title: this.langService.transform('#{dataGridParameterInnerColumn.id}',this.lang) || '#{dataGridParameterInnerColumn.title}',dataType:'#{dataGridParameterInnerColumn.dataType}'
|
|
334
|
+
if(dataGridParameterInnerColumn.editor)
|
|
335
|
+
| ,
|
|
336
|
+
| editor:{type:#{dataGridParameterInnerColumn.editorType},options:!{dataGridParameterInnerColumn.editor}}
|
|
337
|
+
if(dataGridParameterInnerColumn.fixed)
|
|
338
|
+
| ,
|
|
339
|
+
| fixed:'#{dataGridParameterInnerColumn.fixed}'
|
|
340
|
+
if(dataGridParameterInnerColumn.cellStyler)
|
|
341
|
+
| ,
|
|
342
|
+
| styler:this.#{dataGridParameterInnerColumn.cellStylerName}
|
|
343
|
+
if(dataGridParameterInnerColumn.colspan && !dataGridParameterInnerColumn.field)
|
|
344
|
+
| ,
|
|
345
|
+
| colspan:#{dataGridParameterInnerColumn.colspan}
|
|
346
|
+
if(dataGridParameterInnerColumn.rowspan)
|
|
347
|
+
| ,
|
|
348
|
+
| rowspan:#{dataGridParameterInnerColumn.rowspan}
|
|
349
|
+
if(dataGridParameterInnerColumn.sortable)
|
|
350
|
+
| ,
|
|
351
|
+
| sortable:#{dataGridParameterInnerColumn.sortable}
|
|
352
|
+
if(dataGridParameterInnerColumn.sortOrder)
|
|
353
|
+
| ,
|
|
354
|
+
| order:'#{dataGridParameterInnerColumn.sortOrder}'
|
|
355
|
+
if(dataGridParameterInnerColumn.noSearch)
|
|
356
|
+
| ,
|
|
357
|
+
| nosearch:'#{dataGridParameterInnerColumn.noSearch}'
|
|
358
|
+
if(dataGridParameterInnerColumn.formatterString)
|
|
359
|
+
| ,
|
|
360
|
+
| formatter:!{dataGridParameterInnerColumn.formatterString}
|
|
361
|
+
|}
|
|
362
|
+
else
|
|
363
|
+
| {field:'#{dataGridParameterInnerColumn.field}'#{dataGridParameterInnerColumn.width?',width:'+dataGridParameterInnerColumn.width:',width:100'},title:this.langService.transform('#{dataGridParameterInnerColumn.id}',this.lang) || '#{dataGridParameterInnerColumn.title}',dataType:'#{dataGridParameterInnerColumn.dataType}',
|
|
364
|
+
| template:this.#{dataGridParameterInnerColumn.template}
|
|
365
|
+
if(dataGridParameterInnerColumn.editor)
|
|
366
|
+
| ,
|
|
367
|
+
| editor:{type:#{dataGridParameterInnerColumn.editorType},options:!{dataGridParameterInnerColumn.editor}}
|
|
368
|
+
if(dataGridParameterInnerColumn.fixed)
|
|
369
|
+
| ,
|
|
370
|
+
| fixed:'#{dataGridParameterInnerColumn.fixed}'
|
|
371
|
+
if(dataGridParameterInnerColumn.cellStyler)
|
|
372
|
+
| ,
|
|
373
|
+
| styler:this.#{dataGridParameterInnerColumn.cellStylerName}
|
|
374
|
+
if(dataGridParameterInnerColumn.colspan && !dataGridParameterInnerColumn.field)
|
|
375
|
+
| ,
|
|
376
|
+
| colspan:#{dataGridParameterInnerColumn.colspan}
|
|
377
|
+
if(dataGridParameterInnerColumn.rowspan)
|
|
378
|
+
| ,
|
|
379
|
+
| rowspan:#{dataGridParameterInnerColumn.rowspan}
|
|
380
|
+
if(dataGridParameterInnerColumn.sortable)
|
|
381
|
+
| ,
|
|
382
|
+
| sortable:#{dataGridParameterInnerColumn.sortable}
|
|
383
|
+
if(dataGridParameterInnerColumn.sortOrder)
|
|
384
|
+
| ,
|
|
385
|
+
| order:'#{dataGridParameterInnerColumn.sortOrder}'
|
|
386
|
+
if(dataGridParameterInnerColumn.noSearch)
|
|
387
|
+
| ,
|
|
388
|
+
| nosearch:'#{dataGridParameterInnerColumn.noSearch}'
|
|
389
|
+
if(dataGridParameterInnerColumn.formatterString)
|
|
390
|
+
| ,
|
|
391
|
+
| formatter:!{dataGridParameterInnerColumn.formatterString}
|
|
392
|
+
| }
|
|
393
|
+
if(innerColumnIndex < dataGridParameterColumn.length-1)
|
|
394
|
+
|,
|
|
395
|
+
= '\n'
|
|
396
|
+
= '\n'
|
|
397
|
+
| ]
|
|
398
|
+
if(columnIndex < dataGridParameter.columns.length -1 )
|
|
399
|
+
| ,
|
|
400
|
+
= '\n'
|
|
401
|
+
| ];
|
|
402
|
+
if (variable.componentType == 'Frame')
|
|
403
|
+
| this.applicationParamsService.parseParams(this.route, this.frameworkService, this.viewModel, () => {
|
|
404
|
+
| this.onFormLoad();
|
|
405
|
+
| })
|
|
406
|
+
if (variable.stateMachine && variable.toolbars && variable.toolbars.length)
|
|
407
|
+
each toolbar in variable.toolbars
|
|
408
|
+
= '\n'
|
|
409
|
+
| this.stateMachine.stateChange.subscribe(() => {
|
|
410
|
+
| const #{toolbar.id}states = {
|
|
411
|
+
= '\n'
|
|
412
|
+
if (toolbar.states)
|
|
413
|
+
each state, buttonId in toolbar.states
|
|
414
|
+
| '#{buttonId}': #{state.replace('viewModel','this.viewModel')},
|
|
415
|
+
= '\n'
|
|
416
|
+
| }
|
|
417
|
+
| this.#{toolbar.id}States.next(#{toolbar.id}states);
|
|
418
|
+
| });
|
|
419
|
+
= '\n'
|
|
420
|
+
= '\n'
|
|
421
|
+
if (variable.stateMachine && variable.toolbars && variable.toolbars.length)
|
|
422
|
+
each toolbar in variable.toolbars
|
|
423
|
+
= '\n'
|
|
424
|
+
| this.stateMachine.stateChange.subscribe(() => {
|
|
425
|
+
| const #{toolbar.id}visibleStates = {
|
|
426
|
+
= '\n'
|
|
427
|
+
if(toolbar.visibleStates)
|
|
428
|
+
each state, buttonId in toolbar.visibleStates
|
|
429
|
+
| '#{buttonId}': #{((state==true || state==false)?state:state.replace('viewModel','this.viewModel'))},
|
|
430
|
+
= '\n'
|
|
431
|
+
| }
|
|
432
|
+
| this.#{toolbar.id}VisibleStates.next(#{toolbar.id}visibleStates);
|
|
433
|
+
| });
|
|
434
|
+
= '\n'
|
|
435
|
+
= '\n'
|
|
436
|
+
if (variable.stateMachine && variable.toolbars && variable.toolbars.length)
|
|
437
|
+
each toolbar in variable.toolbars
|
|
438
|
+
= '\n'
|
|
439
|
+
| this.#{toolbar.id}.forEach((toolbarItem)=>{
|
|
440
|
+
| const transformText =this.langService.transform(toolbarItem.id,this.lang);
|
|
441
|
+
| if(transformText)
|
|
442
|
+
| {
|
|
443
|
+
| toolbarItem.text=transformText;
|
|
444
|
+
| }
|
|
445
|
+
|});
|
|
446
|
+
if (variable.stateMachine && variable.farristabtoolbars && variable.farristabtoolbars.length)
|
|
447
|
+
= '\n'
|
|
448
|
+
| this.stateMachine.stateChange.subscribe(() => {
|
|
449
|
+
| const states={
|
|
450
|
+
= '\n'
|
|
451
|
+
each farristabtoolbar,toolbarIndex in variable.farristabtoolbars
|
|
452
|
+
if (farristabtoolbar.contents && farristabtoolbar.contents.length > 0)
|
|
453
|
+
if (toolbarIndex>0)
|
|
454
|
+
| ,
|
|
455
|
+
= '\n'
|
|
456
|
+
each farristabtoolbaritem,index in farristabtoolbar.contents
|
|
457
|
+
| '#{farristabtoolbaritem.id}':#{(farristabtoolbaritem.disable==true || farristabtoolbaritem.disable==false)?farristabtoolbaritem.disable:farristabtoolbaritem.disable}
|
|
458
|
+
if (index < farristabtoolbar.contents.length-1)
|
|
459
|
+
| ,
|
|
460
|
+
= '\n'
|
|
461
|
+
= '\n'
|
|
462
|
+
| };
|
|
463
|
+
= '\n'
|
|
464
|
+
| this.tabsToolbarStates.next(states);
|
|
465
|
+
| });
|
|
466
|
+
if (variable.stateMachine && variable.farristabtoolbars && variable.farristabtoolbars.length)
|
|
467
|
+
= '\n'
|
|
468
|
+
| this.stateMachine.stateChange.subscribe(() => {
|
|
469
|
+
| const visibleStates={
|
|
470
|
+
= '\n'
|
|
471
|
+
each farristabtoolbar,toolbarIndex in variable.farristabtoolbars
|
|
472
|
+
if (farristabtoolbar.contents && farristabtoolbar.contents.length > 0)
|
|
473
|
+
if (toolbarIndex>0)
|
|
474
|
+
| ,
|
|
475
|
+
= '\n'
|
|
476
|
+
each farristabtoolbaritem,index in farristabtoolbar.contents
|
|
477
|
+
| '#{farristabtoolbaritem.id}':#{((farristabtoolbaritem.visible==true || farristabtoolbaritem.visible==false)?farristabtoolbaritem.visible:farristabtoolbaritem.visible.replace('viewModel','this.viewModel'))}
|
|
478
|
+
if (index < farristabtoolbar.contents.length-1)
|
|
479
|
+
| ,
|
|
480
|
+
= '\n'
|
|
481
|
+
= '\n'
|
|
482
|
+
| };
|
|
483
|
+
= '\n'
|
|
484
|
+
| this.tabsToolbarVisibleStates.next(visibleStates);
|
|
485
|
+
| });
|
|
486
|
+
else
|
|
487
|
+
= '\n'
|
|
488
|
+
| this.onFormLoad();
|
|
489
|
+
= '\n'
|
|
490
|
+
= '\n'
|
|
491
|
+
= '\n'
|
|
492
|
+
| }
|
|
493
|
+
= '\n'
|
|
494
|
+
= '\n'
|
|
495
|
+
| ngAfterViewInit(): void {
|
|
496
|
+
if(variable.afterViewInit)
|
|
497
|
+
= '\n'
|
|
498
|
+
| #{variable.afterViewInit}
|
|
499
|
+
if(variable.componentFarrisLookups && variable.componentFarrisLookups.length)
|
|
500
|
+
= '\n'
|
|
501
|
+
each farrisLookup,lookupIndex in variable.componentFarrisLookups
|
|
502
|
+
| this.componentManagerService.appendControl('#{farrisLookup.id}',this.#{farrisLookup.id});
|
|
503
|
+
= '\n'
|
|
504
|
+
if (variable.afterViewInitDeclarationEvents)
|
|
505
|
+
each afterViewInitDeclarationEvent in variable.afterViewInitDeclarationEvents
|
|
506
|
+
= '\n'
|
|
507
|
+
| #{afterViewInitDeclarationEvent}
|
|
508
|
+
= '\n'
|
|
509
|
+
= '\n'
|
|
510
|
+
| }
|
|
511
|
+
= '\n'
|
|
512
|
+
= '\n'
|
|
513
|
+
| handleSizeChange(size: any) {
|
|
514
|
+
| this.size = size;
|
|
515
|
+
| }
|
|
516
|
+
= '\n'
|
|
517
|
+
= '\n'
|
|
518
|
+
| public onFormLoad() {
|
|
519
|
+
= '\n'
|
|
520
|
+
if (variable.onInit)
|
|
521
|
+
| #{variable.onInit}
|
|
522
|
+
= '\n'
|
|
523
|
+
if (variable.onInitDeclarationEvents)
|
|
524
|
+
each onInitDeclarationEvent in variable.onInitDeclarationEvents
|
|
525
|
+
= '\n'
|
|
526
|
+
| #{onInitDeclarationEvent}
|
|
527
|
+
= '\n'
|
|
528
|
+
| }
|
|
529
|
+
= '\n'
|
|
530
|
+
= '\n'
|
|
531
|
+
if (variable.componentEvents && variable.componentEvents.length)
|
|
532
|
+
each event in variable.componentEvents
|
|
533
|
+
| #{event.name} = (data) => {
|
|
534
|
+
if (event.declarationEvents && event.declarationEvents.length)
|
|
535
|
+
= '\n'
|
|
536
|
+
each declarationEvent in event.declarationEvents
|
|
537
|
+
| #{declarationEvent}
|
|
538
|
+
= '\n'
|
|
539
|
+
if (event.eventHandler)
|
|
540
|
+
= '\n'
|
|
541
|
+
| return #{event.eventHandler}.call(this,data);
|
|
542
|
+
= '\n'
|
|
543
|
+
else
|
|
544
|
+
= '\n'
|
|
545
|
+
| return of(true);
|
|
546
|
+
= '\n'
|
|
547
|
+
| };
|
|
548
|
+
= '\n'
|
|
549
|
+
= '\n'
|
|
550
|
+
= '\n'
|
|
551
|
+
= '\n'
|
|
552
|
+
if (variable.toolbars && variable.toolbars.length)
|
|
553
|
+
each toolbar in variable.toolbars
|
|
554
|
+
| #{toolbar.id} = !{JSON.stringify(toolbar.items, null, 2)};
|
|
555
|
+
= '\n'
|
|
556
|
+
= '\n'
|
|
557
|
+
| #{toolbar.id}States = new BehaviorSubject({});
|
|
558
|
+
| #{toolbar.id}VisibleStates = new BehaviorSubject({});
|
|
559
|
+
= '\n'
|
|
560
|
+
= '\n'
|
|
561
|
+
if(toolbar.eventHandler)
|
|
562
|
+
| #{toolbar.eventHandler}(args) {
|
|
563
|
+
if (toolbar.events && toolbar.events.length)
|
|
564
|
+
= '\n'
|
|
565
|
+
| switch (args.id) {
|
|
566
|
+
= '\n'
|
|
567
|
+
each event in toolbar.events
|
|
568
|
+
| case '#{event.name}':
|
|
569
|
+
if (event.eventHandler)
|
|
570
|
+
= '\n'
|
|
571
|
+
| #{event.eventHandler};
|
|
572
|
+
= '\n'
|
|
573
|
+
if (event.declarationEvents && event.declarationEvents.length)
|
|
574
|
+
each eventDeclaration in event.declarationEvents
|
|
575
|
+
= '\n'
|
|
576
|
+
| #{eventDeclaration}
|
|
577
|
+
= '\n'
|
|
578
|
+
| break;
|
|
579
|
+
= '\n'
|
|
580
|
+
| }
|
|
581
|
+
= '\n'
|
|
582
|
+
| }
|
|
583
|
+
= '\n'
|
|
584
|
+
if (variable.farristabtoolbars && variable.farristabtoolbars.length)
|
|
585
|
+
| tabsToolbarStates = new BehaviorSubject({});
|
|
586
|
+
| tabsToolbarVisibleStates = new BehaviorSubject({});
|
|
587
|
+
= '\n'
|
|
588
|
+
each farristabtoolbar in variable.farristabtoolbars
|
|
589
|
+
| #{farristabtoolbar.generatedID} = {
|
|
590
|
+
= '\n'
|
|
591
|
+
if(farristabtoolbar.position)
|
|
592
|
+
| position:'#{farristabtoolbar.position}',
|
|
593
|
+
= '\n'
|
|
594
|
+
if (farristabtoolbar.contents && farristabtoolbar.contents.length > 0)
|
|
595
|
+
| contents:[
|
|
596
|
+
= '\n'
|
|
597
|
+
each farristabtoolbaritem,index in farristabtoolbar.contents
|
|
598
|
+
| {
|
|
599
|
+
| id:'#{farristabtoolbaritem.id}',
|
|
600
|
+
= '\n'
|
|
601
|
+
| disable:#{(farristabtoolbaritem.disable==true || farristabtoolbaritem.disable==false)?farristabtoolbaritem.disable:farristabtoolbaritem.disable},
|
|
602
|
+
= '\n'
|
|
603
|
+
| visible:#{(farristabtoolbaritem.visible==true || farristabtoolbaritem.visible==false)?farristabtoolbaritem.visible:farristabtoolbaritem.visible.replace('viewModel','this.viewModel')},
|
|
604
|
+
| title:'#{farristabtoolbaritem.title}',
|
|
605
|
+
= '\n'
|
|
606
|
+
if (farristabtoolbaritem.click)
|
|
607
|
+
| click:()=>{ #{farristabtoolbaritem.click} },
|
|
608
|
+
= '\n'
|
|
609
|
+
| appearance:{
|
|
610
|
+
= '\n'
|
|
611
|
+
if (farristabtoolbaritem.appearance && farristabtoolbaritem.appearance.class)
|
|
612
|
+
| "class":"#{farristabtoolbaritem.appearance.class}"
|
|
613
|
+
= '\n'
|
|
614
|
+
| }
|
|
615
|
+
= '\n'
|
|
616
|
+
| }
|
|
617
|
+
if (index<farristabtoolbar.contents.length-1)
|
|
618
|
+
| ,
|
|
619
|
+
= '\n'
|
|
620
|
+
| ]
|
|
621
|
+
= '\n'
|
|
622
|
+
| }
|
|
623
|
+
= '\n'
|
|
624
|
+
if (variable.componentSubscriptions && variable.componentSubscriptions.length)
|
|
625
|
+
each subscriptionItem in variable.componentSubscriptions
|
|
626
|
+
= '\n'
|
|
627
|
+
| @NgSubscription({
|
|
628
|
+
| name: '#{subscriptionItem.subscribeOn}',
|
|
629
|
+
| token: '#{subscriptionItem.token}',
|
|
630
|
+
| paramMapCollection:[
|
|
631
|
+
= '\n'
|
|
632
|
+
if (subscriptionItem.paramMapCollection && subscriptionItem.paramMapCollection.length)
|
|
633
|
+
each paramMap,index in subscriptionItem.paramMapCollection
|
|
634
|
+
| {
|
|
635
|
+
| frameId:'#{variable.componentFrameID ? variable.componentFrameID : variable.replacedId}',
|
|
636
|
+
= '\n'
|
|
637
|
+
| from: '#{paramMap.from}',
|
|
638
|
+
= '\n'
|
|
639
|
+
| to : '#{paramMap.to}'
|
|
640
|
+
| }
|
|
641
|
+
if (index < subscriptionItem.paramMapCollection.length-1)
|
|
642
|
+
| ,
|
|
643
|
+
= '\n'
|
|
644
|
+
= '\n'
|
|
645
|
+
| ]
|
|
646
|
+
= '\n'
|
|
647
|
+
| })
|
|
648
|
+
= '\n'
|
|
649
|
+
| public #{subscriptionItem.subscribeOn}(currentComponent:#{variable.externalPrefix}RootComponent,eventArgs: any) {
|
|
650
|
+
if (subscriptionItem.command)
|
|
651
|
+
= '\n'
|
|
652
|
+
| currentComponent.viewModel#{subscriptionItem.command.viewModelCommandPath}.call(this,eventArgs);
|
|
653
|
+
= '\n'
|
|
654
|
+
| }
|
|
655
|
+
= '\n'
|
|
656
|
+
= '\n'
|
|
657
|
+
| }
|
|
658
|
+
= '\n'
|
|
659
659
|
= '\n'
|