ngx-histaff-alpha 6.4.8 → 6.5.0
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/fesm2022/{ngx-histaff-alpha-ai-hint-for-table.component-f4YBgbOv.mjs → ngx-histaff-alpha-ai-hint-for-table.component-CHgQSi0p.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-ai-hint-for-table.component-f4YBgbOv.mjs.map → ngx-histaff-alpha-ai-hint-for-table.component-CHgQSi0p.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-form-design.component-BMU-rbOU.mjs → ngx-histaff-alpha-core-form-design.component-CTrNNE7-.mjs} +458 -254
- package/fesm2022/ngx-histaff-alpha-core-form-design.component-CTrNNE7-.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-core-sys-action.component-nEE8LeYS.mjs → ngx-histaff-alpha-core-sys-action.component-GIciqrnf.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-sys-action.component-nEE8LeYS.mjs.map → ngx-histaff-alpha-core-sys-action.component-GIciqrnf.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-template-editor.component-DwSst07G.mjs → ngx-histaff-alpha-core-template-editor.component-XwgAdRVH.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-template-editor.component-DwSst07G.mjs.map → ngx-histaff-alpha-core-template-editor.component-XwgAdRVH.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-toast-loading.component-DWIQZeZl.mjs → ngx-histaff-alpha-core-toast-loading.component-Dx9YYqpG.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-toast-loading.component-DWIQZeZl.mjs.map → ngx-histaff-alpha-core-toast-loading.component-Dx9YYqpG.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-workflow-consume.component-B-RPGCiI.mjs → ngx-histaff-alpha-core-workflow-consume.component-BP8zuxYQ.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-workflow-consume.component-B-RPGCiI.mjs.map → ngx-histaff-alpha-core-workflow-consume.component-BP8zuxYQ.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-db-settings.component-C3fYKsMd.mjs → ngx-histaff-alpha-db-settings.component-aOgA1qSq.mjs} +5 -5
- package/fesm2022/{ngx-histaff-alpha-db-settings.component-C3fYKsMd.mjs.map → ngx-histaff-alpha-db-settings.component-aOgA1qSq.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.component-C9Jf7XWj.mjs → ngx-histaff-alpha-design-wrapper.component-hBUaZceS.mjs} +49 -7
- package/fesm2022/ngx-histaff-alpha-design-wrapper.component-hBUaZceS.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.route-Bk9j5IIl.mjs → ngx-histaff-alpha-design-wrapper.route-DQoOPQge.mjs} +5 -5
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.route-Bk9j5IIl.mjs.map → ngx-histaff-alpha-design-wrapper.route-DQoOPQge.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-hrm-schema.component-SerupGF3.mjs → ngx-histaff-alpha-hrm-schema.component-BJZOW5Wi.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-hrm-schema.component-SerupGF3.mjs.map → ngx-histaff-alpha-hrm-schema.component-BJZOW5Wi.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-live-form.component-CkeOK3B7.mjs → ngx-histaff-alpha-live-form.component-x08G6uI3.mjs} +99 -139
- package/fesm2022/ngx-histaff-alpha-live-form.component-x08G6uI3.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-ngx-histaff-alpha-DZMJyvtg.mjs → ngx-histaff-alpha-ngx-histaff-alpha-B4dw5BXZ.mjs} +296 -308
- package/fesm2022/ngx-histaff-alpha-ngx-histaff-alpha-B4dw5BXZ.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-simple-chat.component-BbsCjEaN.mjs → ngx-histaff-alpha-simple-chat.component-CtnJMX2M.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-simple-chat.component-BbsCjEaN.mjs.map → ngx-histaff-alpha-simple-chat.component-CtnJMX2M.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-template-list.component-BZCdtedY.mjs → ngx-histaff-alpha-template-list.component-BysOT_8n.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-template-list.component-BZCdtedY.mjs.map → ngx-histaff-alpha-template-list.component-BysOT_8n.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-tracker-studio.component-CDJfkoan.mjs → ngx-histaff-alpha-tracker-studio.component-D9L1y1k0.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-tracker-studio.component-CDJfkoan.mjs.map → ngx-histaff-alpha-tracker-studio.component-D9L1y1k0.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-form-assign.component-BLM4gRwQ.mjs → ngx-histaff-alpha-wf-form-assign.component-BACGd2Yk.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-wf-form-assign.component-BLM4gRwQ.mjs.map → ngx-histaff-alpha-wf-form-assign.component-BACGd2Yk.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-global-config.component-BhlbCxKD.mjs → ngx-histaff-alpha-wf-global-config.component-ABO46891.mjs} +18 -2
- package/fesm2022/ngx-histaff-alpha-wf-global-config.component-ABO46891.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-wf-instance-status.component-rCfzZVzd.mjs → ngx-histaff-alpha-wf-instance-status.component-CJj_SSmd.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-wf-instance-status.component-rCfzZVzd.mjs.map → ngx-histaff-alpha-wf-instance-status.component-CJj_SSmd.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-instance-step-react.component-BFrOIHlR.mjs → ngx-histaff-alpha-wf-instance-step-react.component-D2FW3Uk6.mjs} +6 -7
- package/fesm2022/ngx-histaff-alpha-wf-instance-step-react.component-D2FW3Uk6.mjs.map +1 -0
- package/fesm2022/ngx-histaff-alpha-wf-lab.component-Ci9x7286.mjs +130 -0
- package/fesm2022/ngx-histaff-alpha-wf-lab.component-Ci9x7286.mjs.map +1 -0
- package/fesm2022/ngx-histaff-alpha.mjs +1 -1
- package/lib/app/libraries/core-form/core-form/enum-interfaces.d.ts +6 -0
- package/lib/app/libraries/core-form-design/core-form-design.component.d.ts +1 -1
- package/lib/app/libraries/core-form-design/core-form-group-editor.component.d.ts +1 -1
- package/lib/app/libraries/core-form-design/field-setting/field-setting-props.registry.d.ts +2 -0
- package/lib/app/libraries/core-form-design/field-setting/field-setting.component.d.ts +8 -2
- package/lib/app/libraries/core-form-design/field-setting/type-specific/seeker-props/seeker-props.component.d.ts +31 -7
- package/lib/app/libraries/core-form-design/field-setting/type-specific/seeker-props/seeker-props.service.d.ts +16 -0
- package/lib/app/libraries/core-form-design/live-form/live-form.component.d.ts +3 -1
- package/lib/app/libraries/core-form-design/props-host/props-host.component.d.ts +6 -8
- package/lib/app/libraries/core-orgchartflex/core-orgchartflex/core-orgchartflex.component.d.ts +13 -8
- package/lib/app/libraries/core-workflow-builder/core-workflow.service.d.ts +1 -1
- package/lib/app/libraries/core-workflow-builder/interfaces/IStepConfig.d.ts +10 -1
- package/lib/app/libraries/core-workflow-builder/interfaces/IWorkflowReactContext.d.ts +2 -0
- package/lib/app/libraries/core-workflow-builder/wf-lab/wf-lab.component.d.ts +35 -0
- package/lib/app/libraries/core-workflow-builder/wf-process-design/wf-step-config-shell/wf-formui-config/wf-formui-config.component.d.ts +21 -0
- package/package.json +2 -2
- package/fesm2022/ngx-histaff-alpha-core-form-design.component-BMU-rbOU.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-design-wrapper.component-C9Jf7XWj.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-email-props.component-Cf35Pexq.mjs +0 -14
- package/fesm2022/ngx-histaff-alpha-email-props.component-Cf35Pexq.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-form-array-props.component-DZ7gptOo.mjs +0 -26
- package/fesm2022/ngx-histaff-alpha-form-array-props.component-DZ7gptOo.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-live-form.component-CkeOK3B7.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-ngx-histaff-alpha-DZMJyvtg.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-wf-global-config.component-BhlbCxKD.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-wf-instance-step-react.component-BFrOIHlR.mjs.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { s as CanDeactivateGuard } from './ngx-histaff-alpha-ngx-histaff-alpha-
|
|
1
|
+
import { s as CanDeactivateGuard } from './ngx-histaff-alpha-ngx-histaff-alpha-B4dw5BXZ.mjs';
|
|
2
2
|
|
|
3
3
|
const wfDesignWrapperRoutes = [
|
|
4
4
|
{
|
|
5
5
|
path: '',
|
|
6
|
-
loadComponent: () => import('./ngx-histaff-alpha-design-wrapper.component-
|
|
6
|
+
loadComponent: () => import('./ngx-histaff-alpha-design-wrapper.component-hBUaZceS.mjs').then(m => m.DesignWrapperComponent),
|
|
7
7
|
canDeactivate: [CanDeactivateGuard],
|
|
8
8
|
children: [
|
|
9
9
|
{
|
|
10
10
|
path: ':id',
|
|
11
11
|
outlet: 'preview',
|
|
12
|
-
loadComponent: () => import('./ngx-histaff-alpha-live-form.component-
|
|
12
|
+
loadComponent: () => import('./ngx-histaff-alpha-live-form.component-x08G6uI3.mjs').then(function (n) { return n.l; }).then(m => m.LiveFormComponent)
|
|
13
13
|
},
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
path: ':id',
|
|
18
|
-
loadComponent: () => import('./ngx-histaff-alpha-live-form.component-
|
|
18
|
+
loadComponent: () => import('./ngx-histaff-alpha-live-form.component-x08G6uI3.mjs').then(function (n) { return n.l; }).then(m => m.LiveFormComponent)
|
|
19
19
|
}
|
|
20
20
|
];
|
|
21
21
|
|
|
22
22
|
export { wfDesignWrapperRoutes };
|
|
23
|
-
//# sourceMappingURL=ngx-histaff-alpha-design-wrapper.route-
|
|
23
|
+
//# sourceMappingURL=ngx-histaff-alpha-design-wrapper.route-DQoOPQge.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-histaff-alpha-design-wrapper.route-
|
|
1
|
+
{"version":3,"file":"ngx-histaff-alpha-design-wrapper.route-DQoOPQge.mjs","sources":["../../../projects/ngx-histaff-alpha/src/lib/app/libraries/core-workflow-builder/design-wrapper/design-wrapper.route.ts"],"sourcesContent":["import { Routes } from '@angular/router';\r\nimport { CanDeactivateGuard } from '../../../guards/can-deactivate.guard';\r\n\r\nexport const wfDesignWrapperRoutes: Routes = [\r\n {\r\n path: '',\r\n loadComponent: () => import('./design-wrapper.component').then(m => m.DesignWrapperComponent),\r\n canDeactivate: [CanDeactivateGuard],\r\n children: [\r\n {\r\n path: ':id',\r\n outlet: 'preview',\r\n loadComponent: () => import('../../core-form-design/live-form/live-form.component').then(m => m.LiveFormComponent)\r\n },\r\n ]\r\n },\r\n {\r\n path: ':id',\r\n loadComponent: () => import('../../core-form-design/live-form/live-form.component').then(m => m.LiveFormComponent)\r\n }\r\n]"],"names":[],"mappings":";;AAGa,MAAA,qBAAqB,GAAW;AACzC,IAAA;AACI,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,aAAa,EAAE,MAAM,OAAO,2DAA4B,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,sBAAsB,CAAC;QAC7F,aAAa,EAAE,CAAC,kBAAkB,CAAC;AACnC,QAAA,QAAQ,EAAE;AACN,YAAA;AACI,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,MAAM,EAAE,SAAS;AACjB,gBAAA,aAAa,EAAE,MAAM,OAAO,sDAAsD,oCAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB;AACpH,aAAA;AACJ;AACJ,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,aAAa,EAAE,MAAM,OAAO,sDAAsD,oCAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB;AACpH;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Component } from '@angular/core';
|
|
3
|
-
import { B as BaseComponent, A as AppService } from './ngx-histaff-alpha-ngx-histaff-alpha-
|
|
3
|
+
import { B as BaseComponent, A as AppService } from './ngx-histaff-alpha-ngx-histaff-alpha-B4dw5BXZ.mjs';
|
|
4
4
|
import { finalize } from 'rxjs';
|
|
5
5
|
|
|
6
6
|
class HrmSchemaComponent extends BaseComponent {
|
|
@@ -36,4 +36,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
36
36
|
}] });
|
|
37
37
|
|
|
38
38
|
export { HrmSchemaComponent };
|
|
39
|
-
//# sourceMappingURL=ngx-histaff-alpha-hrm-schema.component-
|
|
39
|
+
//# sourceMappingURL=ngx-histaff-alpha-hrm-schema.component-BJZOW5Wi.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-histaff-alpha-hrm-schema.component-
|
|
1
|
+
{"version":3,"file":"ngx-histaff-alpha-hrm-schema.component-BJZOW5Wi.mjs","sources":["../../../projects/ngx-histaff-alpha/src/lib/app/root/hrm-schema/hrm-schema.component.ts","../../../projects/ngx-histaff-alpha/src/lib/app/root/hrm-schema/hrm-schema.component.html"],"sourcesContent":["import { AfterViewInit, Component, inject } from '@angular/core';\r\nimport { AppService } from '../../services/app.service';\r\nimport { BaseComponent } from '../../libraries/base-component/base/base.component';\r\nimport { finalize } from 'rxjs';\r\n\r\ninterface SchemaReport {\r\n name: string;\r\n success: boolean;\r\n durationMs: number;\r\n logs: string[];\r\n errors: string[];\r\n}\r\n\r\n@Component({\r\n selector: 'hrm-schema',\r\n imports: [],\r\n templateUrl: './hrm-schema.component.html',\r\n styleUrl: './hrm-schema.component.scss'\r\n})\r\nexport class HrmSchemaComponent extends BaseComponent implements AfterViewInit {\r\n reports: SchemaReport[] = [];\r\n loading: boolean = false;\r\n appService = inject(AppService)\r\n\r\n get maxDuration(): number {\r\n return this.reports.length ? Math.max(...this.reports.map(r => r.durationMs)) : 1;\r\n }\r\n\r\n // Scale bar width as percentage\r\n getWidth(report: SchemaReport): string {\r\n return `${(report.durationMs / this.maxDuration) * 100}%`;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.loading = true;\r\n this.subscriptions.push(\r\n this.appService.get('/api/HrmSchemaEssential/SchemaCheck').pipe(\r\n finalize(() => this.loading = false)\r\n ).subscribe(x => {\r\n if (x.ok && x.status === 200 && x.body?.statusCode === 200) {\r\n this.reports = x.body.innerBody;\r\n }\r\n })\r\n )\r\n })\r\n }\r\n}\r\n","\r\n<div class=\"container-fluid\">\r\n <div class=\"schema-bar-chart\">\r\n @for (r of reports; track $index) {\r\n <div class=\"schema-bar-row\">\r\n <div class=\"schema-label\">{{ r.name }}</div>\r\n <div class=\"schema-bar-wrapper\">\r\n <div class=\"schema-bar\" [class.success]=\"r.success\" [class.fail]=\"!r.success\" [style.width]=\"getWidth(r)\"\r\n [title]=\"r.durationMs + ' ms\\n' + (r.errors.length ? r.errors.join('; ') : 'OK')\">\r\n {{ r.durationMs }} ms\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>"],"names":[],"mappings":";;;;;AAmBM,MAAO,kBAAmB,SAAQ,aAAa,CAAA;AANrD,IAAA,WAAA,GAAA;;QAOE,IAAO,CAAA,OAAA,GAAmB,EAAE;QAC5B,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAyBhC;AAvBC,IAAA,IAAI,WAAW,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC;;;AAInF,IAAA,QAAQ,CAAC,MAAoB,EAAA;AAC3B,QAAA,OAAO,CAAG,EAAA,CAAC,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,IAAI,GAAG,GAAG;;IAG3D,eAAe,GAAA;QACb,UAAU,CAAC,MAAK;AACd,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CACrB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC,IAAI,CAC7D,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,CACrC,CAAC,SAAS,CAAC,CAAC,IAAG;AACd,gBAAA,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,UAAU,KAAK,GAAG,EAAE;oBAC1D,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS;;aAElC,CAAC,CACH;AACH,SAAC,CAAC;;8GA1BO,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,6FCnB/B,4pBAeM,EAAA,MAAA,EAAA,CAAA,sfAAA,CAAA,EAAA,CAAA,CAAA;;2FDIO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,WACb,EAAE,EAAA,QAAA,EAAA,4pBAAA,EAAA,MAAA,EAAA,CAAA,sfAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, signal, computed, isDevMode, inject, HostListener, ChangeDetectionStrategy, Component, output, ChangeDetectorRef, Injector, effect } from '@angular/core';
|
|
3
|
-
import { B as BaseComponent,
|
|
4
|
-
import { catchError, of, finalize, BehaviorSubject, filter, distinctUntilChanged } from 'rxjs';
|
|
3
|
+
import { B as BaseComponent, aa as EnumImageResolverType, m as CoreWorkflowService, o as CoreFormService, b as AlertService, a as AppConfigService, v as alertOptions, M as MultiLanguageService, e as TranslatePipe, I as ImageErrorResolverDirective, ab as NormalizeHumanNamePipe, T as TooltipDirective, ac as CoreIosSwitcherComponent, c as CoreTerminalSpinnerComponent, d as CorePageHeaderComponent, z as DomService, O as CoreParamControlComponent, x as CoreFormDesignService, U as ApplicationHelpService, Z as JsonService, A as AppService, i as EnumFormBaseContolType, W as EnumCorePageEditMode, _ as EnumCoreButtonVNSCode, n as EnumCoreFormControlSeekerSourceType, V as HotKeysDirective, X as CoreFormComponent, a7 as JsonSafePipe } from './ngx-histaff-alpha-ngx-histaff-alpha-B4dw5BXZ.mjs';
|
|
4
|
+
import { catchError, of, finalize, BehaviorSubject, filter, distinctUntilChanged, tap } from 'rxjs';
|
|
5
5
|
import { NgClass, JsonPipe, NgStyle } from '@angular/common';
|
|
6
6
|
import { RouterLink, Router, ActivatedRoute } from '@angular/router';
|
|
7
7
|
import * as i1 from '@angular/forms';
|
|
@@ -355,6 +355,20 @@ class LiveFormComponent extends BaseComponent {
|
|
|
355
355
|
this.$reactMode = signal(false);
|
|
356
356
|
this.$onBehalfMode = computed(() => this.$workflow()?.allowOnBehalf);
|
|
357
357
|
this.$reactInjectedFieldsAdded = signal(false);
|
|
358
|
+
this.$effectiveSections = computed(() => {
|
|
359
|
+
const raw = this.$inputSections();
|
|
360
|
+
// CHÌA KHÓA VÀNG
|
|
361
|
+
//const steps = this.wfs.$currentSteps();
|
|
362
|
+
//const step = steps?.[0]; // Kickoff & React đều đúng
|
|
363
|
+
//if (!step) return raw;
|
|
364
|
+
const formUi = this.$workflowReactContext()?.stepFormConfig?.formUi;
|
|
365
|
+
if (!formUi) {
|
|
366
|
+
console.log("[$effectiveSections computed]: formUi was undefined");
|
|
367
|
+
return raw;
|
|
368
|
+
}
|
|
369
|
+
console.log("[$effectiveSections computed]: Calling applyFormUi()", raw, formUi);
|
|
370
|
+
return this.applyFormUi(raw, formUi);
|
|
371
|
+
});
|
|
358
372
|
// 🔁 Reactive bindings
|
|
359
373
|
this.$inputSections = signal([
|
|
360
374
|
{
|
|
@@ -400,37 +414,15 @@ class LiveFormComponent extends BaseComponent {
|
|
|
400
414
|
effect(() => {
|
|
401
415
|
const context = this.$workflowReactContext();
|
|
402
416
|
const form = this.$form();
|
|
403
|
-
|
|
404
|
-
const ___reasonsField = this.wfs.liveForm?.get('___reasons');
|
|
405
|
-
if (!context || !form || (reactMode && !___reasonsField))
|
|
417
|
+
if (!context || !form)
|
|
406
418
|
return;
|
|
407
419
|
try {
|
|
408
420
|
const attributesJson = context.instance.attributesJson;
|
|
409
421
|
const formValue = JSON.parse(attributesJson);
|
|
410
|
-
const reasons = context.instance.reasons;
|
|
411
|
-
let ___reasons = "";
|
|
412
|
-
try {
|
|
413
|
-
___reasons = JSON.parse(reasons);
|
|
414
|
-
}
|
|
415
|
-
catch (err) {
|
|
416
|
-
if (isDevMode()) {
|
|
417
|
-
this.alertService.error(err?.message || "Error while deserializing 'reasons' value from the instance");
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
try {
|
|
421
|
-
delete formValue['___reason']; // Focus only on new ___reason
|
|
422
|
-
}
|
|
423
|
-
catch (err) {
|
|
424
|
-
if (isDevMode()) {
|
|
425
|
-
this.alertService.error(err?.message || "Error while delete '___reason' value for the attributes");
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
422
|
// 🔑 Ensure FormArrays have correct length BEFORE patching
|
|
429
423
|
this.cfs.ensureFormArraysMatch(this.wfs.liveForm, formValue, this.cfs.formArrayConfigMap);
|
|
424
|
+
console.log("this.wfs.liveForm.patchValue(formValue)", formValue);
|
|
430
425
|
this.wfs.liveForm.patchValue(formValue);
|
|
431
|
-
if (reactMode) {
|
|
432
|
-
___reasonsField.patchValue(___reasons);
|
|
433
|
-
}
|
|
434
426
|
}
|
|
435
427
|
catch (err) {
|
|
436
428
|
if (isDevMode()) {
|
|
@@ -459,7 +451,7 @@ class LiveFormComponent extends BaseComponent {
|
|
|
459
451
|
this.$reactMode.set(true);
|
|
460
452
|
this.clearInjectedFields();
|
|
461
453
|
// this.makeOriginReadonly();
|
|
462
|
-
this.addReactInjectedFields();
|
|
454
|
+
//this.addReactInjectedFields();
|
|
463
455
|
}
|
|
464
456
|
}
|
|
465
457
|
else {
|
|
@@ -533,7 +525,7 @@ class LiveFormComponent extends BaseComponent {
|
|
|
533
525
|
}
|
|
534
526
|
const request = {
|
|
535
527
|
workflowId: this.wfs.$currentFlow()?.id,
|
|
536
|
-
attributes: this.cfs.getAttributesWithWys(this.$form()),
|
|
528
|
+
attributes: this.cfs.getAttributesWithWys(this.$form()),
|
|
537
529
|
___targetEmployees: this.$form()?.get('___targetEmployees')?.getRawValue()
|
|
538
530
|
};
|
|
539
531
|
this.$backendMessage.set('');
|
|
@@ -613,11 +605,9 @@ class LiveFormComponent extends BaseComponent {
|
|
|
613
605
|
if (!this.$designMode() && !this.$previewMode()) {
|
|
614
606
|
if (!!this.workflowId) {
|
|
615
607
|
setTimeout(() => {
|
|
616
|
-
this.$loading.set(true)
|
|
617
|
-
this.subscriptions.push(this.wfs.loadWorkflowWithAfInstance(this.workflowId).pipe(catchError(err => {
|
|
618
|
-
this.$loading.set(false);
|
|
608
|
+
this.subscriptions.push(this.wfs.loadWorkflowWithAfInstance(this.workflowId).pipe(tap(_ => this.$loading.set(true)), catchError(err => {
|
|
619
609
|
return of(err);
|
|
620
|
-
})).subscribe(x => {
|
|
610
|
+
}), finalize(() => this.$loading.set(false))).subscribe(x => {
|
|
621
611
|
this.$loading.set(false);
|
|
622
612
|
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
623
613
|
const workflow = x.body.innerBody;
|
|
@@ -627,15 +617,13 @@ class LiveFormComponent extends BaseComponent {
|
|
|
627
617
|
const instance = this.coreFormDesignService.mapFromAfInstanceDTO(afInstanceDto);
|
|
628
618
|
instance.sections = this.coreFormDesignService.toCoreFormSections(instance.formDesignSections);
|
|
629
619
|
this.$afInstance.set(instance);
|
|
620
|
+
console.log("this.$inputSections being merged wuth:", instance.sections);
|
|
630
621
|
this.$inputSections.set([...instance.sections, ...this.$inputSections()]);
|
|
631
622
|
this.$normalMode.set(instance.normalMode);
|
|
632
623
|
this.$submitApi.set(instance.submitApi);
|
|
633
624
|
this.coreFormDesignService.$afInstance.set(instance);
|
|
634
625
|
this.clearInjectedFields();
|
|
635
|
-
if (this.$reactMode()) {
|
|
636
|
-
this.addReactInjectedFields();
|
|
637
|
-
}
|
|
638
|
-
else {
|
|
626
|
+
if (!this.$reactMode()) {
|
|
639
627
|
this.addKickOffInjectedFields();
|
|
640
628
|
}
|
|
641
629
|
}
|
|
@@ -653,7 +641,7 @@ class LiveFormComponent extends BaseComponent {
|
|
|
653
641
|
this.$submitApi.set(this.coreFormDesignService.$afInstance().submitApi);
|
|
654
642
|
this.clearInjectedFields();
|
|
655
643
|
if (this.$reactMode()) {
|
|
656
|
-
this.addReactInjectedFields();
|
|
644
|
+
//this.addReactInjectedFields();
|
|
657
645
|
}
|
|
658
646
|
else {
|
|
659
647
|
this.addKickOffInjectedFields();
|
|
@@ -664,19 +652,7 @@ class LiveFormComponent extends BaseComponent {
|
|
|
664
652
|
const form = e.formGroup;
|
|
665
653
|
this.$form.set(form);
|
|
666
654
|
this.wfs.liveForm = form;
|
|
667
|
-
if (this.$reactMode()) {
|
|
668
|
-
this.$inputSections().forEach(s => {
|
|
669
|
-
s.rows.forEach(r => {
|
|
670
|
-
r.forEach(c => {
|
|
671
|
-
const toBeDisabled = c.field !== '___reason';
|
|
672
|
-
if (toBeDisabled) {
|
|
673
|
-
form.get(c.field)?.disable();
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
});
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
|
-
else {
|
|
655
|
+
if (!this.$reactMode()) {
|
|
680
656
|
this.wfs.liveForm.get('___submitOnBehalf')?.valueChanges.subscribe(x => {
|
|
681
657
|
const inputSections = this.$inputSections();
|
|
682
658
|
const targetCtrl = this.coreFormService.getFormBaseControlByName(inputSections, '___targetEmployees');
|
|
@@ -684,10 +660,10 @@ class LiveFormComponent extends BaseComponent {
|
|
|
684
660
|
targetCtrl.hidden = !x;
|
|
685
661
|
this.$inputSections.set([...inputSections]);
|
|
686
662
|
// Optional: restore current form values without triggering another valueChanges loop
|
|
687
|
-
const currentValue = this.cfs.getAttributesWithWys(this.wfs.liveForm);
|
|
663
|
+
const currentValue = this.cfs.getAttributesWithWys(this.wfs.liveForm);
|
|
664
|
+
console.log("onLiveFormCreated", currentValue);
|
|
688
665
|
setTimeout(() => {
|
|
689
666
|
this.wfs.liveForm.patchValue({
|
|
690
|
-
...currentValue,
|
|
691
667
|
___submitOnBehalf: x // ensure value stays intact
|
|
692
668
|
}, { emitEvent: false });
|
|
693
669
|
if (!x && targetCtrl) {
|
|
@@ -771,30 +747,6 @@ class LiveFormComponent extends BaseComponent {
|
|
|
771
747
|
]
|
|
772
748
|
]
|
|
773
749
|
});
|
|
774
|
-
sections.push({
|
|
775
|
-
rows: [
|
|
776
|
-
[
|
|
777
|
-
{
|
|
778
|
-
field: "___reason",
|
|
779
|
-
type: "text",
|
|
780
|
-
value: '',
|
|
781
|
-
label: "UI_FORM_CONTROL_LABEL.REASON",
|
|
782
|
-
flexSize: 12,
|
|
783
|
-
controlType: EnumFormBaseContolType.TEXTAREA,
|
|
784
|
-
textareaRows: 5,
|
|
785
|
-
/*
|
|
786
|
-
validators: [
|
|
787
|
-
{
|
|
788
|
-
name: 'required',
|
|
789
|
-
validator: Validators.required,
|
|
790
|
-
errorMessage: EnumTranslateKey.UI_FORM_CONTROL_ERROR_REQUIRED
|
|
791
|
-
}
|
|
792
|
-
],
|
|
793
|
-
*/
|
|
794
|
-
}
|
|
795
|
-
]
|
|
796
|
-
]
|
|
797
|
-
});
|
|
798
750
|
if (!!workflow && !!workflow.allowCustomCc) {
|
|
799
751
|
sections.push({
|
|
800
752
|
rows: [
|
|
@@ -851,66 +803,28 @@ class LiveFormComponent extends BaseComponent {
|
|
|
851
803
|
}
|
|
852
804
|
this.$inputSections.set(sections);
|
|
853
805
|
}
|
|
854
|
-
addReactInjectedFields() {
|
|
855
|
-
if (this.$reactInjectedFieldsAdded())
|
|
856
|
-
return;
|
|
857
|
-
const current = this.$inputSections();
|
|
858
|
-
const sections = [...current];
|
|
859
|
-
sections.push({
|
|
860
|
-
rows: [
|
|
861
|
-
[
|
|
862
|
-
{
|
|
863
|
-
field: "___reasons",
|
|
864
|
-
type: "text",
|
|
865
|
-
value: '',
|
|
866
|
-
label: "UI_FORM_CONTROL_LABEL.REASON_HISTORY",
|
|
867
|
-
flexSize: 12,
|
|
868
|
-
controlType: EnumFormBaseContolType.TEXTAREA,
|
|
869
|
-
textareaRows: 5,
|
|
870
|
-
disabled: true,
|
|
871
|
-
}
|
|
872
|
-
]
|
|
873
|
-
]
|
|
874
|
-
});
|
|
875
|
-
sections.push({
|
|
876
|
-
rows: [
|
|
877
|
-
[
|
|
878
|
-
{
|
|
879
|
-
field: "___reason",
|
|
880
|
-
type: "text",
|
|
881
|
-
value: '',
|
|
882
|
-
label: "UI_FORM_CONTROL_LABEL.REASON",
|
|
883
|
-
flexSize: 12,
|
|
884
|
-
controlType: EnumFormBaseContolType.TEXTAREA,
|
|
885
|
-
textareaRows: 5,
|
|
886
|
-
// validators: [
|
|
887
|
-
// {
|
|
888
|
-
// name: 'required',
|
|
889
|
-
// validator: Validators.required,
|
|
890
|
-
// errorMessage: EnumTranslateKey.UI_FORM_CONTROL_ERROR_REQUIRED
|
|
891
|
-
// }
|
|
892
|
-
// ],
|
|
893
|
-
}
|
|
894
|
-
]
|
|
895
|
-
]
|
|
896
|
-
});
|
|
897
|
-
this.$inputSections.set(sections);
|
|
898
|
-
this.$reactInjectedFieldsAdded.set(true);
|
|
899
|
-
}
|
|
900
806
|
clearInjectedFields() {
|
|
901
|
-
const
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
.
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
807
|
+
const original = this.$inputSections();
|
|
808
|
+
if (!original || !original.length)
|
|
809
|
+
return;
|
|
810
|
+
// Tạo bản sao deep để tránh mutate sai
|
|
811
|
+
const cleaned = original
|
|
812
|
+
.map(section => {
|
|
813
|
+
// deep clone rows
|
|
814
|
+
const newRows = (section.rows || [])
|
|
815
|
+
.map(row => row.filter(ctrl => !ctrl.field.startsWith('___')) // remove injected
|
|
816
|
+
)
|
|
817
|
+
.filter(row => row.length > 0); // remove empty rows
|
|
818
|
+
// Nếu rows rỗng → bỏ luôn section
|
|
819
|
+
if (!newRows.length)
|
|
820
|
+
return null;
|
|
821
|
+
return {
|
|
822
|
+
...section,
|
|
823
|
+
rows: newRows
|
|
824
|
+
};
|
|
825
|
+
})
|
|
826
|
+
.filter(x => x !== null);
|
|
827
|
+
this.$inputSections.set(cleaned);
|
|
914
828
|
}
|
|
915
829
|
react(reactType) {
|
|
916
830
|
const context = this.$workflowReactContext();
|
|
@@ -920,8 +834,9 @@ class LiveFormComponent extends BaseComponent {
|
|
|
920
834
|
}
|
|
921
835
|
const { workflow, instance, step, actor } = context;
|
|
922
836
|
const unitedCorrelationIds = `${workflow.id}___${instance.correlationId}___${step.id}___${actor.id}`;
|
|
837
|
+
const updatedAttributes = this.cfs.getAttributesWithWys(this.$form());
|
|
923
838
|
this.$loading.set(true);
|
|
924
|
-
this.subscriptions.push(this.wfs.react(unitedCorrelationIds, reactType,
|
|
839
|
+
this.subscriptions.push(this.wfs.react(unitedCorrelationIds, reactType, "", updatedAttributes).pipe(catchError(err => {
|
|
925
840
|
this.$loading.set(false);
|
|
926
841
|
return of(err);
|
|
927
842
|
})).subscribe(x => {
|
|
@@ -930,12 +845,57 @@ class LiveFormComponent extends BaseComponent {
|
|
|
930
845
|
}
|
|
931
846
|
}));
|
|
932
847
|
}
|
|
848
|
+
applyFormUi(sections, formUi) {
|
|
849
|
+
if (!sections || !formUi)
|
|
850
|
+
return sections;
|
|
851
|
+
const hidden = formUi.hidden ?? {};
|
|
852
|
+
const readonly = formUi.readonly ?? {};
|
|
853
|
+
const required = formUi.required ?? {};
|
|
854
|
+
console.log("[applyFormUi] hidden", hidden);
|
|
855
|
+
console.log("[applyFormUi] readonly", readonly);
|
|
856
|
+
console.log("[applyFormUi] required", required);
|
|
857
|
+
const sectionsTransformed = sections.map(sec => ({
|
|
858
|
+
...sec,
|
|
859
|
+
rows: sec.rows.map(row => row.map(ctrl => {
|
|
860
|
+
const c = { ...ctrl };
|
|
861
|
+
const key = c.field;
|
|
862
|
+
// 1) Hidden
|
|
863
|
+
if (hidden[key]) {
|
|
864
|
+
c.hidden = true;
|
|
865
|
+
return c;
|
|
866
|
+
}
|
|
867
|
+
// 2) Readonly
|
|
868
|
+
if (readonly[key]) {
|
|
869
|
+
c.readonly = true;
|
|
870
|
+
c.disabled = true;
|
|
871
|
+
}
|
|
872
|
+
// 3) Required
|
|
873
|
+
if (required[key]) {
|
|
874
|
+
c.validators = [
|
|
875
|
+
...(c.validators ?? []),
|
|
876
|
+
{
|
|
877
|
+
name: 'required',
|
|
878
|
+
validator: Validators.required,
|
|
879
|
+
errorMessage: `${c.label ?? c.field} is required`
|
|
880
|
+
}
|
|
881
|
+
];
|
|
882
|
+
}
|
|
883
|
+
else {
|
|
884
|
+
// remove required if exists (optional)
|
|
885
|
+
c.validators = (c.validators ?? []).filter(v => v.name !== 'required');
|
|
886
|
+
}
|
|
887
|
+
return c;
|
|
888
|
+
}))
|
|
889
|
+
}));
|
|
890
|
+
console.log("[applyFormUi] sectionsTransformed", sectionsTransformed);
|
|
891
|
+
return sectionsTransformed;
|
|
892
|
+
}
|
|
933
893
|
ngOnDestroy() {
|
|
934
894
|
this.subscriptions.forEach(x => x?.unsubscribe());
|
|
935
895
|
this.clearInjectedFields();
|
|
936
896
|
}
|
|
937
897
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: LiveFormComponent, deps: [{ token: MultiLanguageService }, { token: CoreFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
938
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: LiveFormComponent, isStandalone: true, selector: "live-form", inputs: { $designMode: { classPropertyName: "$designMode", publicName: "$designMode", isSignal: true, isRequired: false, transformFunction: null }, $forKickOff: { classPropertyName: "$forKickOff", publicName: "$forKickOff", isSignal: true, isRequired: false, transformFunction: null }, $workflowReactContext: { classPropertyName: "$workflowReactContext", publicName: "$workflowReactContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { $onClose: "$onClose" }, usesInheritance: true, ngImport: i0, template: "<div class=\"live-form-container\" [hotKeys]=\"['F3', 'F6', 'Escape']\">\r\n\r\n @if ($normalMode()) {\r\n <div class=\"form-wrapper live-form\" [ngStyle]=\"{\r\n width: !!coreFormDesignService.$afInstance().width ? coreFormDesignService.$afInstance().width + 'px' : 'unset'\r\n }\">\r\n <div class=\"live-form-header\">\r\n <core-page-header [title]=\"coreFormDesignService.$afInstance().captionCode | translate : lang\" [hideButtonGroup]=\"true\"></core-page-header>\r\n </div>\r\n\r\n <core-form\r\n [inputSections]=\"$
|
|
898
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: LiveFormComponent, isStandalone: true, selector: "live-form", inputs: { $designMode: { classPropertyName: "$designMode", publicName: "$designMode", isSignal: true, isRequired: false, transformFunction: null }, $forKickOff: { classPropertyName: "$forKickOff", publicName: "$forKickOff", isSignal: true, isRequired: false, transformFunction: null }, $workflowReactContext: { classPropertyName: "$workflowReactContext", publicName: "$workflowReactContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { $onClose: "$onClose" }, usesInheritance: true, ngImport: i0, template: "<div class=\"live-form-container\" [hotKeys]=\"['F3', 'F6', 'Escape']\">\r\n\r\n @if ($normalMode()) {\r\n <div class=\"form-wrapper live-form\" [ngStyle]=\"{\r\n width: !!coreFormDesignService.$afInstance().width ? coreFormDesignService.$afInstance().width + 'px' : 'unset'\r\n }\">\r\n <div class=\"live-form-header\">\r\n <core-page-header [title]=\"coreFormDesignService.$afInstance().captionCode | translate : lang\" [hideButtonGroup]=\"true\"></core-page-header>\r\n </div>\r\n\r\n <core-form\r\n [inputSections]=\"$effectiveSections()\"\r\n [customFormButtonItems]=\"$customButtons()!\"\r\n [forceCreateNewForm]=\"true\"\r\n [mode$]=\"mode$\"\r\n [hideButtons]=\"$previewMode()\"\r\n [hideCalculatedSection]=\"true\"\r\n [hideDevSector]=\"true\"\r\n [bottomTemplateRef]=\"bottomTemplateRef\"\r\n [buttonGroupTemplateRef]=\"buttonGroupTemplateRef\"\r\n [checkError$]=\"checkError$\"\r\n (onSubmit)=\"onLiveSubmit($event)\"\r\n (onFormCreated)=\"onLiveFormCreated($event)\"\r\n (onCancal)=\"onClose()\"\r\n />\r\n\r\n @if ($previewMode()) {\r\n <div class=\"show-routing-wrapper\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"toggleShowRouting()\">\r\n {{ $showLiveRouting() ? 'Hide Routing' : 'Show Routing' }}\r\n </button>\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"routing-preview-wrapper\" [class.visible]=\"$showLiveRouting()\">\r\n @if ($showLiveRouting()) {\r\n <routing-preview-panel />\r\n }\r\n </div>\r\n\r\n\r\n } @else {\r\n <div class=\"modal-container\">\r\n <div class=\"modal-content-root no-padding\">\r\n\r\n <div class=\"form-wrapper live-form\" [class.d-none]=\"$showLiveRouting()\" [ngStyle]=\"{\r\n width: !!coreFormDesignService.$afInstance().width ? coreFormDesignService.$afInstance().width + 'px' : 'unset'\r\n }\">\r\n\r\n <div class=\"live-form-header\">\r\n <core-page-header [title]=\"coreFormDesignService.$afInstance().captionCode | translate : lang\" [hideButtonGroup]=\"true\" />\r\n <div class=\"preview-close-icon\" (click)=\"onClose()\">\r\n <i class=\"feather-x\"></i>\r\n </div>\r\n </div>\r\n\r\n <core-form\r\n [inputSections]=\"$effectiveSections()\"\r\n [customFormButtonItems]=\"$customButtons()!\"\r\n [forceCreateNewForm]=\"true\"\r\n [hideCalculatedSection]=\"true\"\r\n [mode$]=\"mode$\"\r\n [hideButtons]=\"$previewMode()\"\r\n [bottomTemplateRef]=\"bottomTemplateRef\"\r\n [buttonGroupTemplateRef]=\"buttonGroupTemplateRef\"\r\n [hideDevSector]=\"false\"\r\n [checkError$]=\"checkError$\"\r\n (onSubmit)=\"onLiveSubmit($event)\"\r\n (onFormCreated)=\"onLiveFormCreated($event)\"\r\n (onCancal)=\"onClose()\"\r\n />\r\n\r\n <div class=\"submition-wrapper\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"toggleShowRouting()\">\r\n {{ $showLiveRouting() ? 'Hide Routing' : 'Show Routing' }}\r\n </button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"initialSubmit()\">\r\n Submit \r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"routing-preview-wrapper\" [class.visible]=\"$showLiveRouting()\">\r\n @if ($showLiveRouting()) {\r\n <div class=\"h50\"></div>\r\n <routing-preview-panel [$minWidth]=\"coreFormDesignService.$afInstance().width\"/>\r\n <div class=\"h50\"></div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <ng-template #bottomTemplateRef>\r\n <!-- <pre [ngStyle]=\"{ maxWidth: !!$afInstance()?.width ? $afInstance()?.width! + 'px' : 'unset'}\">{{ $inputSectionsJson() }}</pre> -->\r\n <!-- @if (isDevMode) {\r\n <p class=\"dev-hint\">F3/ESC: Show/Hide afInstance | F6/ESC: Show/Hide Workflow</p>\r\n } -->\r\n @if ($showAfInstanceJson()) {\r\n <pre [ngStyle]=\"{ maxWidth: !!$afInstance()?.width ? $afInstance()?.width! + 'px' : 'unset'}\">{{ $afInstanceJson() }}</pre>\r\n }\r\n @if ($showWfWorkflowJson()) {\r\n <pre [ngStyle]=\"{ maxWidth: !!$afInstance()?.width ? $afInstance()?.width! + 'px' : 'unset'}\">{{ $wfWorkflowJson() }}</pre>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #buttonGroupTemplateRef>\r\n <div class=\"button-group\">\r\n <div class=\"button-group-left\"></div>\r\n <div class=\"button-group-right\">\r\n @if ($reactMode()) {\r\n @if (true) {\r\n <button type=\"button\" class=\"btn btn-secondary\">Cancel</button> \r\n }\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"react('REJECTED')\">Reject</button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"react('APPROVED')\">Approve</button>\r\n } @else {\r\n <button type=\"button\" class=\"btn btn-secondary\">Cancel</button>\r\n <button type=\"button\" class=\"btn btn-primary\">Send Request</button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n</div>", styles: [".live-form-container .modal-container{overflow-y:auto!important;box-sizing:border-box}.live-form-container .form-wrapper.live-form{padding-top:0;padding-bottom:15px;background-color:#fff;position:relative}.live-form-container .form-wrapper.live-form .live-form-header{padding:0 15px}.live-form-container .form-wrapper.live-form .live-form-header .preview-close-icon{position:absolute;right:7px;top:6px;z-index:2;color:gray;cursor:pointer}.live-form-container .form-wrapper.live-form .live-form-header .preview-close-icon i{font-size:18px}.live-form-container .form-wrapper.live-form .submition-wrapper{display:flex;align-items:center;justify-content:flex-end;padding:0 24px;font-size:13px}.live-form-container .form-wrapper.live-form .submition-wrapper button{border-radius:0;font-size:13px}.live-form-container .form-wrapper.live-form .submition-wrapper button:not(:last-child){margin-right:8px}.live-form-container .form-wrapper.live-form .show-routing-wrapper{padding:15px;display:flex;align-items:center;justify-content:flex-end}.live-form-container .form-wrapper.live-form .show-routing-wrapper input{width:120px}.live-form-container .modal-content-root{padding:0;overflow-y:visible;background-color:transparent!important;display:flex;flex-direction:column;align-items:center;justify-content:space-between}.live-form-container pre{background-color:#fff;color:#333;padding:1rem 1.5rem;border-radius:10px;box-shadow:0 2px 6px #00000014;font-family:Fira Code,monospace;font-size:.85rem;word-break:keep-all;overflow-x:auto;line-height:1.5;max-height:500px;overflow-y:auto;margin:0}.live-form-container .dev-hint{font-size:12px;color:#888;background-color:#f9f9f9;padding:6px 12px;margin:8px 0;border-left:4px solid #ccc}.live-form-container .h50{height:50px}.live-form-container .routing-preview-wrapper{overflow:hidden;max-height:0;opacity:0;transform:translateY(-10px);transition:max-height .4s ease-out,opacity .4s ease-out,transform .4s ease-out}.live-form-container .routing-preview-wrapper.visible{max-height:800px;overflow:visible;opacity:1;transform:translateY(0)}.live-form-container .show-routing-wrapper button{height:35px;font-size:13px;border-radius:0;color:#fff}.live-form-container .hidden-requester-selector{position:absolute;width:0;height:0;top:-200px;left:-200px;overflow:visible}.live-form-container .button-group{padding:15px;display:flex;align-items:center;justify-content:flex-end}.live-form-container .button-group button{height:35px;border-radius:0;font-size:13px;margin:0 7.5px;width:120px}.live-form-container .button-group button:last-child{margin-right:0}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: HotKeysDirective, selector: "[hotKeys]", inputs: ["hotKeys"] }, { kind: "component", type: RoutingPreviewPanelComponent, selector: "routing-preview-panel", inputs: ["$minWidth"] }, { kind: "component", type: CorePageHeaderComponent, selector: "core-page-header", inputs: ["instanceNumber", "shownItems", "title", "hideButtonGroup", "htmlTooltipRef"], outputs: ["buttonClick"] }, { kind: "component", type: CoreFormComponent, selector: "core-form", inputs: ["formName", "width", "submitText", "leftInputSections", "leftInputSectionsFlexSize", "inputSections", "mode$", "bottomTemplateRef", "customFormButtonItems", "showCaptionButton", "disableSaveButton", "disableCancelButton", "checkError$", "hideButtons", "forceCreateNewForm", "secondBottomTemplateRef", "hideDevSector", "hideCalculatedSection", "buttonGroupTemplateRef", "wrapEachSectionInAccordion", "gridMode"], outputs: ["onFormCreated", "onFormRefCreated", "onSubmit", "onSave", "onCancal", "buttonClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
939
899
|
}
|
|
940
900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: LiveFormComponent, decorators: [{
|
|
941
901
|
type: Component,
|
|
@@ -947,7 +907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
947
907
|
CorePageHeaderComponent,
|
|
948
908
|
CoreFormComponent,
|
|
949
909
|
TranslatePipe,
|
|
950
|
-
], template: "<div class=\"live-form-container\" [hotKeys]=\"['F3', 'F6', 'Escape']\">\r\n\r\n @if ($normalMode()) {\r\n <div class=\"form-wrapper live-form\" [ngStyle]=\"{\r\n width: !!coreFormDesignService.$afInstance().width ? coreFormDesignService.$afInstance().width + 'px' : 'unset'\r\n }\">\r\n <div class=\"live-form-header\">\r\n <core-page-header [title]=\"coreFormDesignService.$afInstance().captionCode | translate : lang\" [hideButtonGroup]=\"true\"></core-page-header>\r\n </div>\r\n\r\n <core-form\r\n [inputSections]=\"$
|
|
910
|
+
], template: "<div class=\"live-form-container\" [hotKeys]=\"['F3', 'F6', 'Escape']\">\r\n\r\n @if ($normalMode()) {\r\n <div class=\"form-wrapper live-form\" [ngStyle]=\"{\r\n width: !!coreFormDesignService.$afInstance().width ? coreFormDesignService.$afInstance().width + 'px' : 'unset'\r\n }\">\r\n <div class=\"live-form-header\">\r\n <core-page-header [title]=\"coreFormDesignService.$afInstance().captionCode | translate : lang\" [hideButtonGroup]=\"true\"></core-page-header>\r\n </div>\r\n\r\n <core-form\r\n [inputSections]=\"$effectiveSections()\"\r\n [customFormButtonItems]=\"$customButtons()!\"\r\n [forceCreateNewForm]=\"true\"\r\n [mode$]=\"mode$\"\r\n [hideButtons]=\"$previewMode()\"\r\n [hideCalculatedSection]=\"true\"\r\n [hideDevSector]=\"true\"\r\n [bottomTemplateRef]=\"bottomTemplateRef\"\r\n [buttonGroupTemplateRef]=\"buttonGroupTemplateRef\"\r\n [checkError$]=\"checkError$\"\r\n (onSubmit)=\"onLiveSubmit($event)\"\r\n (onFormCreated)=\"onLiveFormCreated($event)\"\r\n (onCancal)=\"onClose()\"\r\n />\r\n\r\n @if ($previewMode()) {\r\n <div class=\"show-routing-wrapper\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"toggleShowRouting()\">\r\n {{ $showLiveRouting() ? 'Hide Routing' : 'Show Routing' }}\r\n </button>\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"routing-preview-wrapper\" [class.visible]=\"$showLiveRouting()\">\r\n @if ($showLiveRouting()) {\r\n <routing-preview-panel />\r\n }\r\n </div>\r\n\r\n\r\n } @else {\r\n <div class=\"modal-container\">\r\n <div class=\"modal-content-root no-padding\">\r\n\r\n <div class=\"form-wrapper live-form\" [class.d-none]=\"$showLiveRouting()\" [ngStyle]=\"{\r\n width: !!coreFormDesignService.$afInstance().width ? coreFormDesignService.$afInstance().width + 'px' : 'unset'\r\n }\">\r\n\r\n <div class=\"live-form-header\">\r\n <core-page-header [title]=\"coreFormDesignService.$afInstance().captionCode | translate : lang\" [hideButtonGroup]=\"true\" />\r\n <div class=\"preview-close-icon\" (click)=\"onClose()\">\r\n <i class=\"feather-x\"></i>\r\n </div>\r\n </div>\r\n\r\n <core-form\r\n [inputSections]=\"$effectiveSections()\"\r\n [customFormButtonItems]=\"$customButtons()!\"\r\n [forceCreateNewForm]=\"true\"\r\n [hideCalculatedSection]=\"true\"\r\n [mode$]=\"mode$\"\r\n [hideButtons]=\"$previewMode()\"\r\n [bottomTemplateRef]=\"bottomTemplateRef\"\r\n [buttonGroupTemplateRef]=\"buttonGroupTemplateRef\"\r\n [hideDevSector]=\"false\"\r\n [checkError$]=\"checkError$\"\r\n (onSubmit)=\"onLiveSubmit($event)\"\r\n (onFormCreated)=\"onLiveFormCreated($event)\"\r\n (onCancal)=\"onClose()\"\r\n />\r\n\r\n <div class=\"submition-wrapper\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"toggleShowRouting()\">\r\n {{ $showLiveRouting() ? 'Hide Routing' : 'Show Routing' }}\r\n </button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"initialSubmit()\">\r\n Submit \r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"routing-preview-wrapper\" [class.visible]=\"$showLiveRouting()\">\r\n @if ($showLiveRouting()) {\r\n <div class=\"h50\"></div>\r\n <routing-preview-panel [$minWidth]=\"coreFormDesignService.$afInstance().width\"/>\r\n <div class=\"h50\"></div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <ng-template #bottomTemplateRef>\r\n <!-- <pre [ngStyle]=\"{ maxWidth: !!$afInstance()?.width ? $afInstance()?.width! + 'px' : 'unset'}\">{{ $inputSectionsJson() }}</pre> -->\r\n <!-- @if (isDevMode) {\r\n <p class=\"dev-hint\">F3/ESC: Show/Hide afInstance | F6/ESC: Show/Hide Workflow</p>\r\n } -->\r\n @if ($showAfInstanceJson()) {\r\n <pre [ngStyle]=\"{ maxWidth: !!$afInstance()?.width ? $afInstance()?.width! + 'px' : 'unset'}\">{{ $afInstanceJson() }}</pre>\r\n }\r\n @if ($showWfWorkflowJson()) {\r\n <pre [ngStyle]=\"{ maxWidth: !!$afInstance()?.width ? $afInstance()?.width! + 'px' : 'unset'}\">{{ $wfWorkflowJson() }}</pre>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #buttonGroupTemplateRef>\r\n <div class=\"button-group\">\r\n <div class=\"button-group-left\"></div>\r\n <div class=\"button-group-right\">\r\n @if ($reactMode()) {\r\n @if (true) {\r\n <button type=\"button\" class=\"btn btn-secondary\">Cancel</button> \r\n }\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"react('REJECTED')\">Reject</button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"react('APPROVED')\">Approve</button>\r\n } @else {\r\n <button type=\"button\" class=\"btn btn-secondary\">Cancel</button>\r\n <button type=\"button\" class=\"btn btn-primary\">Send Request</button>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n</div>", styles: [".live-form-container .modal-container{overflow-y:auto!important;box-sizing:border-box}.live-form-container .form-wrapper.live-form{padding-top:0;padding-bottom:15px;background-color:#fff;position:relative}.live-form-container .form-wrapper.live-form .live-form-header{padding:0 15px}.live-form-container .form-wrapper.live-form .live-form-header .preview-close-icon{position:absolute;right:7px;top:6px;z-index:2;color:gray;cursor:pointer}.live-form-container .form-wrapper.live-form .live-form-header .preview-close-icon i{font-size:18px}.live-form-container .form-wrapper.live-form .submition-wrapper{display:flex;align-items:center;justify-content:flex-end;padding:0 24px;font-size:13px}.live-form-container .form-wrapper.live-form .submition-wrapper button{border-radius:0;font-size:13px}.live-form-container .form-wrapper.live-form .submition-wrapper button:not(:last-child){margin-right:8px}.live-form-container .form-wrapper.live-form .show-routing-wrapper{padding:15px;display:flex;align-items:center;justify-content:flex-end}.live-form-container .form-wrapper.live-form .show-routing-wrapper input{width:120px}.live-form-container .modal-content-root{padding:0;overflow-y:visible;background-color:transparent!important;display:flex;flex-direction:column;align-items:center;justify-content:space-between}.live-form-container pre{background-color:#fff;color:#333;padding:1rem 1.5rem;border-radius:10px;box-shadow:0 2px 6px #00000014;font-family:Fira Code,monospace;font-size:.85rem;word-break:keep-all;overflow-x:auto;line-height:1.5;max-height:500px;overflow-y:auto;margin:0}.live-form-container .dev-hint{font-size:12px;color:#888;background-color:#f9f9f9;padding:6px 12px;margin:8px 0;border-left:4px solid #ccc}.live-form-container .h50{height:50px}.live-form-container .routing-preview-wrapper{overflow:hidden;max-height:0;opacity:0;transform:translateY(-10px);transition:max-height .4s ease-out,opacity .4s ease-out,transform .4s ease-out}.live-form-container .routing-preview-wrapper.visible{max-height:800px;overflow:visible;opacity:1;transform:translateY(0)}.live-form-container .show-routing-wrapper button{height:35px;font-size:13px;border-radius:0;color:#fff}.live-form-container .hidden-requester-selector{position:absolute;width:0;height:0;top:-200px;left:-200px;overflow:visible}.live-form-container .button-group{padding:15px;display:flex;align-items:center;justify-content:flex-end}.live-form-container .button-group button{height:35px;border-radius:0;font-size:13px;margin:0 7.5px;width:120px}.live-form-container .button-group button:last-child{margin-right:0}\n"] }]
|
|
951
911
|
}], ctorParameters: () => [{ type: MultiLanguageService }, { type: CoreFormService }] });
|
|
952
912
|
|
|
953
913
|
var liveForm_component = /*#__PURE__*/Object.freeze({
|
|
@@ -956,4 +916,4 @@ var liveForm_component = /*#__PURE__*/Object.freeze({
|
|
|
956
916
|
});
|
|
957
917
|
|
|
958
918
|
export { LiveFormComponent as L, RoutingPreviewPanelComponent as R, liveForm_component as l };
|
|
959
|
-
//# sourceMappingURL=ngx-histaff-alpha-live-form.component-
|
|
919
|
+
//# sourceMappingURL=ngx-histaff-alpha-live-form.component-x08G6uI3.mjs.map
|