ngx-histaff-alpha 6.4.7 → 6.4.9
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-DdDwSM6u.mjs → ngx-histaff-alpha-ai-hint-for-table.component-CKKqdgg7.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-ai-hint-for-table.component-DdDwSM6u.mjs.map → ngx-histaff-alpha-ai-hint-for-table.component-CKKqdgg7.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-form-design.component-CyFCxOF0.mjs → ngx-histaff-alpha-core-form-design.component-BZvtwXkM.mjs} +458 -254
- package/fesm2022/ngx-histaff-alpha-core-form-design.component-BZvtwXkM.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-core-sys-action.component-S0ZpRUXN.mjs → ngx-histaff-alpha-core-sys-action.component-C_VAQLOE.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-sys-action.component-S0ZpRUXN.mjs.map → ngx-histaff-alpha-core-sys-action.component-C_VAQLOE.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-template-editor.component-DdLVaGmB.mjs → ngx-histaff-alpha-core-template-editor.component-DmTad7AG.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-template-editor.component-DdLVaGmB.mjs.map → ngx-histaff-alpha-core-template-editor.component-DmTad7AG.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-toast-loading.component-D7kdGgFZ.mjs → ngx-histaff-alpha-core-toast-loading.component-C3JfOCoY.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-toast-loading.component-D7kdGgFZ.mjs.map → ngx-histaff-alpha-core-toast-loading.component-C3JfOCoY.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-workflow-consume.component-C2MRQLls.mjs → ngx-histaff-alpha-core-workflow-consume.component-BvFyWEqO.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-workflow-consume.component-C2MRQLls.mjs.map → ngx-histaff-alpha-core-workflow-consume.component-BvFyWEqO.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-db-settings.component-BliMPr0A.mjs → ngx-histaff-alpha-db-settings.component-CmO49AZU.mjs} +5 -5
- package/fesm2022/{ngx-histaff-alpha-db-settings.component-BliMPr0A.mjs.map → ngx-histaff-alpha-db-settings.component-CmO49AZU.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.component-Ky5KiJ0p.mjs → ngx-histaff-alpha-design-wrapper.component-BpGl04Dv.mjs} +49 -7
- package/fesm2022/ngx-histaff-alpha-design-wrapper.component-BpGl04Dv.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.route-NqkSYCoA.mjs → ngx-histaff-alpha-design-wrapper.route-D3Lpsk-N.mjs} +5 -5
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.route-NqkSYCoA.mjs.map → ngx-histaff-alpha-design-wrapper.route-D3Lpsk-N.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-hrm-schema.component-B1G4bcjr.mjs → ngx-histaff-alpha-hrm-schema.component-Bd3CdbC_.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-hrm-schema.component-B1G4bcjr.mjs.map → ngx-histaff-alpha-hrm-schema.component-Bd3CdbC_.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-live-form.component-BEq38Xps.mjs → ngx-histaff-alpha-live-form.component-LdFysTvc.mjs} +91 -139
- package/fesm2022/ngx-histaff-alpha-live-form.component-LdFysTvc.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-ngx-histaff-alpha-ls0sZJcJ.mjs → ngx-histaff-alpha-ngx-histaff-alpha-TWTSrQ0J.mjs} +295 -309
- package/fesm2022/ngx-histaff-alpha-ngx-histaff-alpha-TWTSrQ0J.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-simple-chat.component-BajN-snY.mjs → ngx-histaff-alpha-simple-chat.component-Bijz8uoH.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-simple-chat.component-BajN-snY.mjs.map → ngx-histaff-alpha-simple-chat.component-Bijz8uoH.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-template-list.component-BtsN7KE4.mjs → ngx-histaff-alpha-template-list.component-CKNXhE7n.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-template-list.component-BtsN7KE4.mjs.map → ngx-histaff-alpha-template-list.component-CKNXhE7n.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-tracker-studio.component-B-goIeUx.mjs → ngx-histaff-alpha-tracker-studio.component-BLFeI6xO.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-tracker-studio.component-B-goIeUx.mjs.map → ngx-histaff-alpha-tracker-studio.component-BLFeI6xO.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-form-assign.component-Btmiiris.mjs → ngx-histaff-alpha-wf-form-assign.component-nct49SFr.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-wf-form-assign.component-Btmiiris.mjs.map → ngx-histaff-alpha-wf-form-assign.component-nct49SFr.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-global-config.component-C-xap0Tf.mjs → ngx-histaff-alpha-wf-global-config.component-BSuUBIrY.mjs} +18 -2
- package/fesm2022/ngx-histaff-alpha-wf-global-config.component-BSuUBIrY.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-wf-instance-status.component-DnUwQI1R.mjs → ngx-histaff-alpha-wf-instance-status.component-B58W1ZBc.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-wf-instance-status.component-DnUwQI1R.mjs.map → ngx-histaff-alpha-wf-instance-status.component-B58W1ZBc.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-instance-step-react.component-Dng7IbhV.mjs → ngx-histaff-alpha-wf-instance-step-react.component-iyoN_zDV.mjs} +6 -7
- package/fesm2022/ngx-histaff-alpha-wf-instance-step-react.component-iyoN_zDV.mjs.map +1 -0
- package/fesm2022/ngx-histaff-alpha-wf-lab.component-Db5dIgKZ.mjs +130 -0
- package/fesm2022/ngx-histaff-alpha-wf-lab.component-Db5dIgKZ.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/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-CyFCxOF0.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-design-wrapper.component-Ky5KiJ0p.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-jsc0BYaH.mjs +0 -26
- package/fesm2022/ngx-histaff-alpha-form-array-props.component-jsc0BYaH.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-live-form.component-BEq38Xps.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-ngx-histaff-alpha-ls0sZJcJ.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-wf-global-config.component-C-xap0Tf.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-wf-instance-step-react.component-Dng7IbhV.mjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, Component, signal, effect, HostListener, ChangeDetectionStrategy, Injectable, computed, Input, viewChild,
|
|
2
|
+
import { inject, ChangeDetectorRef, Component, signal, effect, HostListener, ChangeDetectionStrategy, Injectable, computed, Input, viewChild, EventEmitter, Output, ViewContainerRef, input, Renderer2, isDevMode } from '@angular/core';
|
|
3
3
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
4
|
-
import { x as CoreFormDesignService, m as CoreWorkflowService, h as BaseEditComponent, b as AlertService, a as AppConfigService,
|
|
4
|
+
import { x as CoreFormDesignService, m as CoreWorkflowService, h as BaseEditComponent, b as AlertService, a as AppConfigService, W as EnumCorePageEditMode, _ as EnumCoreButtonVNSCode, $ as READONLY_WORKFLOW_FIELDS, a0 as noneAutoClosedAlertOptions, j as DialogService, M as MultiLanguageService, d as CorePageHeaderComponent, X as CoreFormComponent, a1 as CoreButtonGroupVnsComponent, e as TranslatePipe, i as EnumFormBaseContolType, B as BaseComponent, E as EnumCoreTablePipeType, g as CoreCheckboxComponent, G as CoreDropdownComponent, n as EnumCoreFormControlSeekerSourceType, a2 as EnumFilterOperator, p as DbService, Q as GptService, v as alertOptions, R as CoreStickerCollectionComponent, P as CoreRadioGroupComponent, T as TooltipDirective, a3 as HtmlTooltipDirective, a4 as CoreControlNoFormArrayComponent, a5 as EnumFormDesignMode, z as DomService, Z as JsonService, U as ApplicationHelpService, a6 as CoreControlComponent, a7 as JsonSafePipe, t as TableCellPipe, V as HotKeysDirective, H as CoreChecklistComponent, K as CoreFormControlSeekerComponent, a8 as CoreAttachmentComponent, J as CoreDatePickerComponent, a9 as CoreMonthSelectorComponent, L as CoreCurrencyInputComponent } from './ngx-histaff-alpha-ngx-histaff-alpha-TWTSrQ0J.mjs';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, FormGroup, FormControl, ReactiveFormsModule, FormArray, Validators } from '@angular/forms';
|
|
7
7
|
import { NgStyle, JsonPipe, AsyncPipe, NgTemplateOutlet } from '@angular/common';
|
|
8
8
|
import { BehaviorSubject, catchError, of, filter, distinctUntilChanged, tap, switchMap } from 'rxjs';
|
|
9
9
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
10
10
|
import { EnumTranslateKey } from 'alpha-global-constants';
|
|
11
|
-
import { L as LiveFormComponent } from './ngx-histaff-alpha-live-form.component-
|
|
12
|
-
import { C as CoreToastLoadingComponent } from './ngx-histaff-alpha-core-toast-loading.component-
|
|
11
|
+
import { L as LiveFormComponent } from './ngx-histaff-alpha-live-form.component-LdFysTvc.mjs';
|
|
12
|
+
import { C as CoreToastLoadingComponent } from './ngx-histaff-alpha-core-toast-loading.component-C3JfOCoY.mjs';
|
|
13
13
|
|
|
14
14
|
const slideFromTopFadeIn = trigger('slideFromTopFadeIn', [
|
|
15
15
|
state('in', style({ opacity: 1, transform: 'translateY(0)' })),
|
|
@@ -421,135 +421,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
421
421
|
], template: "<div class=\"setting-group optional-group\" [ngStyle]=\"{ padding: '15px' }\">\r\n\r\n <div class=\"setting-row optional-bool\">\r\n <label>Readonly</label>\r\n <core-checkbox ngModel ngDefaultControl [ngModel]=\"$control().readonly\" (ngModelChange)=\"setControlProp('readonly', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row optional-bool\">\r\n <label>Hidden</label>\r\n <core-checkbox [ngModel]=\"$control().hidden\" (ngModelChange)=\"setControlProp('hidden', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row optional-bool\">\r\n <label>Disabled</label>\r\n <core-checkbox [ngModel]=\"$control().disabled\" (ngModelChange)=\"setControlProp('disabled', $event)\" /> \r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Hint</label>\r\n <input class=\"form-control\" type=\"text\" [ngModel]=\"$control().hint\" (ngModelChange)=\"setControlProp('hint', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Pipe</label>\r\n <div class=\"control-wrapper\">\r\n <core-dropdown [ngModel]=\"$control().pipe\" (ngModelChange)=\"setControlProp('pipe', $event)\"\r\n [paramMode]=\"true\"\r\n [options$]=\"pipeOptions$\"\r\n >\r\n </core-dropdown>\r\n </div>\r\n </div>\r\n\r\n</div>", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
422
422
|
}] });
|
|
423
423
|
|
|
424
|
-
class
|
|
425
|
-
constructor() {
|
|
426
|
-
this.isNested = false;
|
|
427
|
-
this.vcRef = inject(ViewContainerRef);
|
|
428
|
-
this.as = inject(AlertService);
|
|
429
|
-
}
|
|
430
|
-
set props(value) {
|
|
431
|
-
this._props = value;
|
|
432
|
-
this.assignInputs();
|
|
433
|
-
}
|
|
434
|
-
// constructor() {
|
|
435
|
-
// // 👇 register effect at construction
|
|
436
|
-
// effect(() => {
|
|
437
|
-
// const nested = this.isNested;
|
|
438
|
-
// if (nested && isDevMode()) {
|
|
439
|
-
// this.as.info("$isNested is set to true", noneAutoClosedAlertOptions);
|
|
440
|
-
// }
|
|
441
|
-
// if (this.componentRef && '$isNested' in this.componentRef.instance) {
|
|
442
|
-
// (this.componentRef.instance as any).$isNested.set(nested);
|
|
443
|
-
// // 👇 force child CD so template updates immediately
|
|
444
|
-
// // Because your DropdownPropsComponent is declared with:
|
|
445
|
-
// // changeDetection: ChangeDetectionStrategy.OnPush,
|
|
446
|
-
// // Angular will only re-render when:
|
|
447
|
-
// // An @Input reference changes,
|
|
448
|
-
// // An event originates from the component, or
|
|
449
|
-
// // You manually trigger CD (e.g. cdr.markForCheck()).
|
|
450
|
-
// this.componentRef.changeDetectorRef.markForCheck();
|
|
451
|
-
// }
|
|
452
|
-
// });
|
|
453
|
-
// }
|
|
454
|
-
async ngOnInit() {
|
|
455
|
-
if (this.loadComponent) {
|
|
456
|
-
const componentType = await this.loadComponent();
|
|
457
|
-
this.componentRef = this.vcRef.createComponent(componentType);
|
|
458
|
-
this.assignInputs();
|
|
459
|
-
// forward @Input manually
|
|
460
|
-
this.componentRef.setInput('isNested', this.isNested);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
assignInputs() {
|
|
464
|
-
if (this.componentRef && this._props) {
|
|
465
|
-
Object.assign(this.componentRef.instance, this._props);
|
|
466
|
-
this.componentRef.changeDetectorRef.markForCheck();
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: PropsHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
470
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: PropsHostComponent, isStandalone: true, selector: "props-host", inputs: { loadComponent: "loadComponent", isNested: "isNested", props: "props" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
471
|
-
}
|
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: PropsHostComponent, decorators: [{
|
|
473
|
-
type: Component,
|
|
474
|
-
args: [{
|
|
475
|
-
selector: 'props-host',
|
|
476
|
-
template: '',
|
|
477
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
478
|
-
}]
|
|
479
|
-
}], propDecorators: { loadComponent: [{
|
|
480
|
-
type: Input
|
|
481
|
-
}], isNested: [{
|
|
482
|
-
type: Input
|
|
483
|
-
}], props: [{
|
|
484
|
-
type: Input
|
|
485
|
-
}] } });
|
|
486
|
-
|
|
487
|
-
class AttachmentPropsComponent extends BasePropsComponent {
|
|
488
|
-
constructor() {
|
|
489
|
-
super(...arguments);
|
|
490
|
-
this.$typedField = computed(() => {
|
|
491
|
-
const control = this.$control();
|
|
492
|
-
return AttachmentFieldHelperService.isAttachment(control)
|
|
493
|
-
? control.assignTo || ''
|
|
494
|
-
: control.field;
|
|
495
|
-
});
|
|
496
|
-
}
|
|
497
|
-
setTypedField(val) {
|
|
498
|
-
const control = this.$control();
|
|
499
|
-
const context = this.$formContext();
|
|
500
|
-
if (AttachmentFieldHelperService.isAttachment(control)) {
|
|
501
|
-
AttachmentFieldHelperService.handleFieldNameChangeForAttachment(control, context, val);
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
control.field = val;
|
|
505
|
-
}
|
|
506
|
-
this.patchControl(control, this.isNested);
|
|
507
|
-
}
|
|
508
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AttachmentPropsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
509
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AttachmentPropsComponent, isStandalone: true, selector: "attachment-props", usesInheritance: true, ngImport: i0, template: "<p>attachment-props works!</p>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }); }
|
|
510
|
-
}
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AttachmentPropsComponent, decorators: [{
|
|
512
|
-
type: Component,
|
|
513
|
-
args: [{ selector: 'attachment-props', imports: [], template: "<p>attachment-props works!</p>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
514
|
-
}] });
|
|
515
|
-
|
|
516
|
-
class ChecklistPropsComponent {
|
|
424
|
+
class NumberPropsComponent {
|
|
517
425
|
constructor() {
|
|
518
426
|
this.controlChange = new EventEmitter();
|
|
519
427
|
}
|
|
520
428
|
update() {
|
|
521
429
|
this.controlChange.emit(this.control);
|
|
522
430
|
}
|
|
523
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
524
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
431
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NumberPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
432
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: NumberPropsComponent, isStandalone: true, selector: "number-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<div class=\"number-props-container\" [ngStyle]=\"{ padding: '15px' }\">\r\n\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
525
433
|
}
|
|
526
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NumberPropsComponent, decorators: [{
|
|
527
435
|
type: Component,
|
|
528
|
-
args: [{ selector: '
|
|
436
|
+
args: [{ selector: 'number-props', imports: [NgStyle], template: "<div class=\"number-props-container\" [ngStyle]=\"{ padding: '15px' }\">\r\n\r\n</div>" }]
|
|
529
437
|
}], propDecorators: { control: [{
|
|
530
438
|
type: Input
|
|
531
439
|
}], controlChange: [{
|
|
532
440
|
type: Output
|
|
533
441
|
}] } });
|
|
534
442
|
|
|
535
|
-
class
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
update() {
|
|
540
|
-
this.controlChange.emit(this.control);
|
|
541
|
-
}
|
|
542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DatepickerPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
543
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DatepickerPropsComponent, isStandalone: true, selector: "datepicker-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>datepicker-props works!</p>\r\n", styles: [""] }); }
|
|
443
|
+
class EmailPropsComponent {
|
|
444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: EmailPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: EmailPropsComponent, isStandalone: true, selector: "email-props", ngImport: i0, template: "<p>email-props works!</p>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }); }
|
|
544
446
|
}
|
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: EmailPropsComponent, decorators: [{
|
|
546
448
|
type: Component,
|
|
547
|
-
args: [{ selector: '
|
|
548
|
-
}]
|
|
549
|
-
type: Input
|
|
550
|
-
}], controlChange: [{
|
|
551
|
-
type: Output
|
|
552
|
-
}] } });
|
|
449
|
+
args: [{ selector: 'email-props', imports: [], template: "<p>email-props works!</p>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
450
|
+
}] });
|
|
553
451
|
|
|
554
452
|
class DropdownPropsComponent extends BasePropsComponent {
|
|
555
453
|
constructor() {
|
|
@@ -588,143 +486,349 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
588
486
|
], template: "<div class=\"setting-group dropdown-group\" [ngStyle]=\"{ padding: '15px' }\">\r\n\r\n <div class=\"setting-row optional-bool\">\r\n <label>Use API</label>\r\n <core-checkbox [ngModel]=\"$control().optionApiDriven\" (ngModelChange)=\"setControlProp('optionApiDriven', $event)\" />\r\n </div>\r\n\r\n @if (!!$control().optionApiDriven) {\r\n <div class=\"setting-row\">\r\n <label>API Endpoint</label>\r\n <input class=\"form-control\" type=\"text\" [ngModel]=\"$control().optionApi\" (ngModelChange)=\"setControlProp('optionApi', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>HTTP Verb</label>\r\n <div class=\"control-wrapper\">\r\n <core-dropdown [ngModel]=\"$control().optionHttpVerb\" (ngModelChange)=\"setControlProp('optionHttpVerb', $event)\" [paramMode]=\"true\"\r\n [options$]=\"httpVerbOptions$\">\r\n </core-dropdown>\r\n </div>\r\n </div>\r\n\r\n @if ($control().optionHttpVerb === 'HttpPost') {\r\n <div class=\"setting-row\">\r\n <label>Payload (JSON)</label>\r\n <div class=\"control-wrapper\">\r\n <textarea class=\"form-control\" rows=\"3\" [(ngModel)]=\"jsonPayload\" (ngModelChange)=\"onPayloadJsonBlur()\"></textarea>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"setting-row\">\r\n <label>Value Field</label>\r\n <input class=\"form-control\" type=\"text\" [ngModel]=\"$control().optionValueFrom\" (ngModelChange)=\"setControlProp('optionValueFrom', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Text Field</label>\r\n <input class=\"form-control\" type=\"text\" [ngModel]=\"$control().optionTextFrom\" (ngModelChange)=\"setControlProp('optionTextFrom', $event)\" />\r\n </div>\r\n }\r\n</div>", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
589
487
|
}] });
|
|
590
488
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
489
|
+
class FormArrayPropsComponent extends BasePropsComponent {
|
|
490
|
+
openDesigner() {
|
|
491
|
+
const control = this.coreFormDesignService.$control();
|
|
492
|
+
if (control?.controlType === EnumFormBaseContolType.FORM_ARRAY) {
|
|
493
|
+
this.coreFormDesignService.$fieldSettingPanelOpen.set(false);
|
|
494
|
+
this.coreFormDesignService.$showFormArrayDesign.set(true);
|
|
495
|
+
// Since $nestedDesignSections is of type WritableSignal<ICoreFormSection[] | null>
|
|
496
|
+
// if set (not null), we use @if in parent conponent (CoreFormDesignComponent template)
|
|
497
|
+
// to display a popup containing CoreFormArrayLayoutEditorComponent
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: FormArrayPropsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
501
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: FormArrayPropsComponent, isStandalone: true, selector: "form-array-props", usesInheritance: true, ngImport: i0, template: " <div class=\"mt-3 d-flex d-flex-center\">\r\n <button class=\"btn btn-outline-primary\" (click)=\"openDesigner()\">\r\n Design Nested Layout\r\n </button>\r\n </div>", styles: ["button{width:200px;border-radius:0;font-size:13px}\n"] }); }
|
|
502
|
+
}
|
|
503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: FormArrayPropsComponent, decorators: [{
|
|
504
|
+
type: Component,
|
|
505
|
+
args: [{ selector: 'form-array-props', imports: [], template: " <div class=\"mt-3 d-flex d-flex-center\">\r\n <button class=\"btn btn-outline-primary\" (click)=\"openDesigner()\">\r\n Design Nested Layout\r\n </button>\r\n </div>", styles: ["button{width:200px;border-radius:0;font-size:13px}\n"] }]
|
|
506
|
+
}] });
|
|
595
507
|
|
|
596
|
-
class
|
|
508
|
+
class TextareaPropsComponent {
|
|
597
509
|
constructor() {
|
|
598
510
|
this.controlChange = new EventEmitter();
|
|
599
511
|
}
|
|
600
512
|
update() {
|
|
601
513
|
this.controlChange.emit(this.control);
|
|
602
514
|
}
|
|
603
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
604
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
515
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TextareaPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
516
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: TextareaPropsComponent, isStandalone: true, selector: "textarea-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>textarea-props works!</p>\r\n", styles: [""] }); }
|
|
605
517
|
}
|
|
606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TextareaPropsComponent, decorators: [{
|
|
607
519
|
type: Component,
|
|
608
|
-
args: [{ selector: '
|
|
520
|
+
args: [{ selector: 'textarea-props', imports: [], template: "<p>textarea-props works!</p>\r\n" }]
|
|
609
521
|
}], propDecorators: { control: [{
|
|
610
522
|
type: Input
|
|
611
523
|
}], controlChange: [{
|
|
612
524
|
type: Output
|
|
613
525
|
}] } });
|
|
614
526
|
|
|
615
|
-
class
|
|
527
|
+
class ChecklistPropsComponent {
|
|
616
528
|
constructor() {
|
|
617
529
|
this.controlChange = new EventEmitter();
|
|
618
530
|
}
|
|
619
531
|
update() {
|
|
620
532
|
this.controlChange.emit(this.control);
|
|
621
533
|
}
|
|
622
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
623
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChecklistPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
535
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: ChecklistPropsComponent, isStandalone: true, selector: "checklist-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>checklist-props works!</p>\r\n", styles: [""] }); }
|
|
624
536
|
}
|
|
625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChecklistPropsComponent, decorators: [{
|
|
626
538
|
type: Component,
|
|
627
|
-
args: [{ selector: '
|
|
539
|
+
args: [{ selector: 'checklist-props', imports: [], template: "<p>checklist-props works!</p>\r\n" }]
|
|
628
540
|
}], propDecorators: { control: [{
|
|
629
541
|
type: Input
|
|
630
542
|
}], controlChange: [{
|
|
631
543
|
type: Output
|
|
632
544
|
}] } });
|
|
633
545
|
|
|
634
|
-
class
|
|
546
|
+
class SeekerPropsService {
|
|
547
|
+
constructor() {
|
|
548
|
+
// ============================================================
|
|
549
|
+
// CONSTANT OPTIONS (đưa hết vào service)
|
|
550
|
+
// ============================================================
|
|
551
|
+
this.sourceTypeOptions$ = new BehaviorSubject([
|
|
552
|
+
{ value: EnumCoreFormControlSeekerSourceType.JOB_SEEK, text: 'Job Seek' },
|
|
553
|
+
{ value: EnumCoreFormControlSeekerSourceType.EMPLOYEE_SEEK, text: 'Employee Seek' },
|
|
554
|
+
{ value: EnumCoreFormControlSeekerSourceType.CONTRACT_SEEK, text: 'Contract Seek' },
|
|
555
|
+
{ value: EnumCoreFormControlSeekerSourceType.WORKING_SEEK, text: 'Working Seek' },
|
|
556
|
+
{ value: EnumCoreFormControlSeekerSourceType.WAGE_SEEK, text: 'Wage Seek' },
|
|
557
|
+
{ value: EnumCoreFormControlSeekerSourceType.POSITION_SEEK, text: 'Position Seek' },
|
|
558
|
+
{ value: EnumCoreFormControlSeekerSourceType.POSITION_CONCURRENT_SEEK, text: 'Concurrent Position Seek' },
|
|
559
|
+
// { value: EnumCoreFormControlSeekerSourceType.ORGANIZATION_UNIT_SEEK, text: 'Org Unit Seek' }, // TO DO LATER
|
|
560
|
+
{ value: EnumCoreFormControlSeekerSourceType.COM_UNIT_SEEK, text: 'Company Unit Seek' },
|
|
561
|
+
{ value: EnumCoreFormControlSeekerSourceType.TOPICPICKER, text: 'Topic Picker' },
|
|
562
|
+
{ value: EnumCoreFormControlSeekerSourceType.FORM_SEEK, text: 'Form Seek' },
|
|
563
|
+
]);
|
|
564
|
+
this.filterOperatorOptions$ = new BehaviorSubject([
|
|
565
|
+
{ value: EnumFilterOperator.EQUAL, text: '==' },
|
|
566
|
+
{ value: EnumFilterOperator.NOT_EQUAL, text: '!=' },
|
|
567
|
+
{ value: EnumFilterOperator.GREATER_THAN_OR_EQUAL, text: '>=' },
|
|
568
|
+
{ value: EnumFilterOperator.LESS_THAN_OR_EQUAL, text: '<=' },
|
|
569
|
+
{ value: EnumFilterOperator.GREATER_THAN, text: '>' },
|
|
570
|
+
{ value: EnumFilterOperator.LESS_THAN, text: '<' },
|
|
571
|
+
]);
|
|
572
|
+
}
|
|
573
|
+
// ============================================================
|
|
574
|
+
// HELPERS
|
|
575
|
+
// ============================================================
|
|
576
|
+
extractArray(input) {
|
|
577
|
+
if (!input)
|
|
578
|
+
return [];
|
|
579
|
+
if (input instanceof BehaviorSubject)
|
|
580
|
+
return input.getValue() ?? [];
|
|
581
|
+
return input;
|
|
582
|
+
}
|
|
583
|
+
extractObject(input) {
|
|
584
|
+
if (!input)
|
|
585
|
+
return {};
|
|
586
|
+
if (input instanceof BehaviorSubject)
|
|
587
|
+
return input.getValue();
|
|
588
|
+
return input;
|
|
589
|
+
}
|
|
590
|
+
wrapArray(arr) {
|
|
591
|
+
return new BehaviorSubject(arr);
|
|
592
|
+
}
|
|
593
|
+
wrapObject(obj) {
|
|
594
|
+
return new BehaviorSubject(obj);
|
|
595
|
+
}
|
|
596
|
+
addItem(source, newItem) {
|
|
597
|
+
return [...source, newItem];
|
|
598
|
+
}
|
|
599
|
+
updateItem(source, index, updated) {
|
|
600
|
+
const arr = [...source];
|
|
601
|
+
arr[index] = { ...arr[index], ...updated };
|
|
602
|
+
return arr;
|
|
603
|
+
}
|
|
604
|
+
removeItem(source, index) {
|
|
605
|
+
const arr = [...source];
|
|
606
|
+
arr.splice(index, 1);
|
|
607
|
+
return arr;
|
|
608
|
+
}
|
|
609
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SeekerPropsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
610
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SeekerPropsService, providedIn: 'root' }); }
|
|
611
|
+
}
|
|
612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SeekerPropsService, decorators: [{
|
|
613
|
+
type: Injectable,
|
|
614
|
+
args: [{ providedIn: 'root' }]
|
|
615
|
+
}] });
|
|
616
|
+
|
|
617
|
+
class SeekerPropsComponent extends BasePropsComponent {
|
|
618
|
+
constructor() {
|
|
619
|
+
super(...arguments);
|
|
620
|
+
this.svc = inject(SeekerPropsService);
|
|
621
|
+
// -----------------------------------------------------------
|
|
622
|
+
// BASIC CSV
|
|
623
|
+
// -----------------------------------------------------------
|
|
624
|
+
this.$useTheseColumnsCsv = computed(() => (this.$control()?.useTheseColumns ?? []).join(', '));
|
|
625
|
+
this.$excludedColumnsCsv = computed(() => (this.$control()?.excludedColumns ?? []).join(', '));
|
|
626
|
+
// -----------------------------------------------------------
|
|
627
|
+
// ALSO BIND TO
|
|
628
|
+
// -----------------------------------------------------------
|
|
629
|
+
this.$alsoBind = computed(() => this.svc.extractArray(this.$control()?.alsoBindTo));
|
|
630
|
+
// -----------------------------------------------------------
|
|
631
|
+
// OUTER PARAM (JSON)
|
|
632
|
+
// -----------------------------------------------------------
|
|
633
|
+
this.$outerParam = computed(() => this.svc.extractObject(this.$control()?.___preDefinedOuterParam));
|
|
634
|
+
this.$outerParamJson = computed(() => JSON.stringify(this.$outerParam(), null, 2));
|
|
635
|
+
// -----------------------------------------------------------
|
|
636
|
+
// OUTER FILTER (RuleTree mini)
|
|
637
|
+
// -----------------------------------------------------------
|
|
638
|
+
this.$outerFilter = computed(() => this.svc.extractArray(this.$control()?.___preDefinedOuterFilter));
|
|
639
|
+
// -----------------------------------------------------------
|
|
640
|
+
// EXTENDED COLUMNS
|
|
641
|
+
// -----------------------------------------------------------
|
|
642
|
+
this.$extendedColumns = computed(() => this.svc.extractArray(this.$control()?.multiModeExtendedColumns));
|
|
643
|
+
// -----------------------------------------------------------
|
|
644
|
+
// EXTENDED SECTIONS
|
|
645
|
+
// -----------------------------------------------------------
|
|
646
|
+
this.$extendedSections = computed(() => this.svc.extractArray(this.$control()?.multiModeExtendedSections));
|
|
647
|
+
}
|
|
648
|
+
onUseColumnsChanged(raw) {
|
|
649
|
+
const arr = raw.split(',').map(x => x.trim()).filter(Boolean);
|
|
650
|
+
this.setControlProp('useTheseColumns', arr);
|
|
651
|
+
}
|
|
652
|
+
onExcludedColumnsChanged(raw) {
|
|
653
|
+
const arr = raw.split(',').map(x => x.trim()).filter(Boolean);
|
|
654
|
+
this.setControlProp('excludedColumns', arr);
|
|
655
|
+
}
|
|
656
|
+
addAlsoBindRow() {
|
|
657
|
+
const next = this.svc.addItem(this.$alsoBind(), { takeFrom: '', bindTo: '' });
|
|
658
|
+
this.setControlProp('alsoBindTo', next);
|
|
659
|
+
}
|
|
660
|
+
updateAlsoBindRow(i, key, v) {
|
|
661
|
+
const next = this.svc.updateItem(this.$alsoBind(), i, { [key]: v });
|
|
662
|
+
this.setControlProp('alsoBindTo', next);
|
|
663
|
+
}
|
|
664
|
+
removeAlsoBindRow(i) {
|
|
665
|
+
const next = this.svc.removeItem(this.$alsoBind(), i);
|
|
666
|
+
this.setControlProp('alsoBindTo', next);
|
|
667
|
+
}
|
|
668
|
+
onOuterParamJsonChange(raw) {
|
|
669
|
+
try {
|
|
670
|
+
const parsed = JSON.parse(raw);
|
|
671
|
+
this.setControlProp('preDefinedOuterParam$', this.svc.wrapObject(parsed));
|
|
672
|
+
}
|
|
673
|
+
catch { }
|
|
674
|
+
}
|
|
675
|
+
addOuterFilter() {
|
|
676
|
+
const next = this.svc.addItem(this.$outerFilter(), {
|
|
677
|
+
field: '',
|
|
678
|
+
operator: EnumFilterOperator.EQUAL,
|
|
679
|
+
dateTimeValue: null
|
|
680
|
+
});
|
|
681
|
+
// (1) metadata / design (LƯU JSON)
|
|
682
|
+
this.setControlProp('___preDefinedOuterFilter', next);
|
|
683
|
+
// (2) runtime (KHÔNG LƯU JSON)
|
|
684
|
+
this.$control().preDefinedOuterFilter$?.next(next);
|
|
685
|
+
}
|
|
686
|
+
updateOuterFilter(i, key, v) {
|
|
687
|
+
const next = this.svc.updateItem(this.$outerFilter(), i, { [key]: v });
|
|
688
|
+
this.setControlProp('___preDefinedOuterFilter', next);
|
|
689
|
+
this.$control().preDefinedOuterFilter$?.next(next);
|
|
690
|
+
}
|
|
691
|
+
removeOuterFilter(i) {
|
|
692
|
+
const next = this.svc.removeItem(this.$outerFilter(), i);
|
|
693
|
+
this.setControlProp('___preDefinedOuterFilter', next);
|
|
694
|
+
this.$control().preDefinedOuterFilter$?.next(next);
|
|
695
|
+
}
|
|
696
|
+
addExtendedColumn() {
|
|
697
|
+
const next = this.svc.addItem(this.$extendedColumns(), {
|
|
698
|
+
caption: '',
|
|
699
|
+
field: '',
|
|
700
|
+
type: 'string',
|
|
701
|
+
align: 'left',
|
|
702
|
+
width: 120,
|
|
703
|
+
hidden: false,
|
|
704
|
+
translate: false
|
|
705
|
+
});
|
|
706
|
+
this.setControlProp('multiModeExtendedColumns', next);
|
|
707
|
+
}
|
|
708
|
+
updateExtendedColumn(i, key, v) {
|
|
709
|
+
const next = this.svc.updateItem(this.$extendedColumns(), i, { [key]: v });
|
|
710
|
+
this.setControlProp('multiModeExtendedColumns', next);
|
|
711
|
+
}
|
|
712
|
+
removeExtendedColumn(i) {
|
|
713
|
+
const next = this.svc.removeItem(this.$extendedColumns(), i);
|
|
714
|
+
this.setControlProp('multiModeExtendedColumns', next);
|
|
715
|
+
}
|
|
716
|
+
addExtendedSection() {
|
|
717
|
+
const next = this.svc.addItem(this.$extendedSections(), {
|
|
718
|
+
caption: 'New Section',
|
|
719
|
+
rows: []
|
|
720
|
+
});
|
|
721
|
+
this.setControlProp('multiModeExtendedSections', next);
|
|
722
|
+
}
|
|
723
|
+
updateExtendedSection(i, caption) {
|
|
724
|
+
const next = this.svc.updateItem(this.$extendedSections(), i, { caption });
|
|
725
|
+
this.setControlProp('multiModeExtendedSections', next);
|
|
726
|
+
}
|
|
727
|
+
removeExtendedSection(i) {
|
|
728
|
+
const next = this.svc.removeItem(this.$extendedSections(), i);
|
|
729
|
+
this.setControlProp('multiModeExtendedSections', next);
|
|
730
|
+
}
|
|
731
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SeekerPropsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
732
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SeekerPropsComponent, isStandalone: true, selector: "seeker-props", usesInheritance: true, ngImport: i0, template: "<div class=\"setting-group seeker-group\" [style.padding.px]=\"15\">\r\n\r\n <div class=\"setting-row\">\r\n Basic Settings\r\n </div>\r\n \r\n\r\n <div class=\"setting-row\">\r\n <label>Source Type</label>\r\n <core-dropdown\r\n [options$]=\"svc.sourceTypeOptions$\"\r\n [paramMode]=\"true\"\r\n [ngModel]=\"$control().seekerSourceType\"\r\n (ngModelChange)=\"setControlProp('seekerSourceType', $event)\">\r\n </core-dropdown>\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Multi Mode</label>\r\n <core-checkbox\r\n [ngModel]=\"$control().multiMode\"\r\n (ngModelChange)=\"setControlProp('multiMode', $event)\">\r\n </core-checkbox>\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Hide Org Tree</label>\r\n <core-checkbox\r\n [ngModel]=\"$control().hideOrgTree\"\r\n (ngModelChange)=\"setControlProp('hideOrgTree', $event)\">\r\n </core-checkbox>\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Source Space Height</label>\r\n <input class=\"form-control\"\r\n type=\"number\"\r\n [ngModel]=\"$control().sourceSpaceHeight\"\r\n (ngModelChange)=\"setControlProp('sourceSpaceHeight', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Bound From</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$control().boundFrom\"\r\n (ngModelChange)=\"setControlProp('boundFrom', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Shown From</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$control().shownFrom\"\r\n (ngModelChange)=\"setControlProp('shownFrom', $event)\" />\r\n </div>\r\n\r\n <!-- <div class=\"setting-row\">\r\n <label>Use These Columns (CSV)</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$useTheseColumnsCsv()\"\r\n (ngModelChange)=\"onUseColumnsChanged($event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Excluded Columns (CSV)</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$excludedColumnsCsv()\"\r\n (ngModelChange)=\"onExcludedColumnsChanged($event)\" />\r\n </div> -->\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- ALSO BIND TO -->\r\n <!-- ================================================ -->\r\n <div class=\"setting-row\">\r\n Also Bind To\r\n </div>\r\n \r\n <button class=\"btn-add\" (click)=\"addAlsoBindRow()\">+ Add Mapping</button>\r\n\r\n <table class=\"mini-table\">\r\n <tr>\r\n <th>takeFrom</th>\r\n <th>bindTo</th>\r\n <th></th>\r\n </tr>\r\n\r\n @for (item of $alsoBind(); track $index) {\r\n <tr>\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"item.takeFrom\"\r\n (ngModelChange)=\"updateAlsoBindRow($index, 'takeFrom', $event)\" />\r\n </td>\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"item.bindTo\"\r\n (ngModelChange)=\"updateAlsoBindRow($index, 'bindTo', $event)\" />\r\n </td>\r\n <td>\r\n <button class=\"btn-remove\" (click)=\"removeAlsoBindRow($index)\">x</button>\r\n </td>\r\n </tr>\r\n }\r\n </table>\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- OUTER PARAM -->\r\n <!-- ================================================ -->\r\n <div class=\"setting-row\">\r\n Outer Param JSON\r\n </div>\r\n\r\n <textarea class=\"form-control\"\r\n [style.height.px]=\"140\"\r\n [ngModel]=\"$outerParamJson()\"\r\n (ngModelChange)=\"onOuterParamJsonChange($event)\">\r\n </textarea>\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- OUTER FILTER -->\r\n <!-- ================================================ -->\r\n <div class=\"setting-row\">\r\n Outer Filter (RuleTree Mini)\r\n </div>\r\n\r\n <button class=\"btn-add\" (click)=\"addOuterFilter()\">+ Add Filter</button>\r\n\r\n <table class=\"mini-table\">\r\n <tr>\r\n <th>Field</th>\r\n <th>Operator</th>\r\n <th>Value</th>\r\n <th></th>\r\n </tr>\r\n\r\n @for (f of $outerFilter(); track $index) {\r\n <tr>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"f.field\"\r\n (ngModelChange)=\"updateOuterFilter($index, 'field', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <core-dropdown\r\n [options$]=\"svc.filterOperatorOptions$\"\r\n [ngModel]=\"f.operator\"\r\n [paramMode]=\"true\"\r\n (ngModelChange)=\"updateOuterFilter($index, 'operator', $event)\">\r\n </core-dropdown>\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n type=\"text\"\r\n [ngModel]=\"f.dateTimeValue\"\r\n (ngModelChange)=\"updateOuterFilter($index, 'dateTimeValue', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <button class=\"btn-remove\" (click)=\"removeOuterFilter($index)\">x</button>\r\n </td>\r\n\r\n </tr>\r\n }\r\n </table>\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- EXTENDED COLUMNS -->\r\n <!-- ================================================ -->\r\n <!-- <div class=\"setting-row\">\r\n Extended Columns\r\n </div>\r\n\r\n <button class=\"btn-add\" (click)=\"addExtendedColumn()\">+ Add Column</button>\r\n\r\n <table class=\"mini-table\">\r\n <tr>\r\n <th>Caption</th>\r\n <th>Field</th>\r\n <th>Type</th>\r\n <th>Align</th>\r\n <th>Width</th>\r\n <th>Hidden</th>\r\n <th>Translate</th>\r\n <th></th>\r\n </tr>\r\n\r\n @for (c of $extendedColumns(); track $index) {\r\n <tr>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.caption\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'caption', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.field\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'field', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.type\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'type', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.align\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'align', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input type=\"number\"\r\n class=\"form-control\"\r\n [ngModel]=\"c.width\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'width', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <core-checkbox\r\n [ngModel]=\"c.hidden\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'hidden', $event)\">\r\n </core-checkbox>\r\n </td>\r\n\r\n <td>\r\n <core-checkbox\r\n [ngModel]=\"c.translate\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'translate', $event)\">\r\n </core-checkbox>\r\n </td>\r\n\r\n <td>\r\n <button class=\"btn-remove\" (click)=\"removeExtendedColumn($index)\">x</button>\r\n </td>\r\n\r\n </tr>\r\n }\r\n </table> -->\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- EXTENDED SECTIONS -->\r\n <!-- ================================================ -->\r\n <!-- <div class=\"setting-row\">\r\n Extended Sections\r\n </div>\r\n\r\n <button class=\"btn-add\" (click)=\"addExtendedSection()\">+ Add Section</button>\r\n\r\n @for (s of $extendedSections(); track $index) {\r\n <div class=\"section-box\">\r\n\r\n <div class=\"setting-row\">\r\n <label>Caption</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"s.caption\"\r\n (ngModelChange)=\"updateExtendedSection($index, $event)\" />\r\n </div>\r\n\r\n <button class=\"btn-remove\"\r\n (click)=\"removeExtendedSection($index)\">\r\n Remove\r\n </button>\r\n\r\n </div>\r\n } -->\r\n\r\n</div>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CoreDropdownComponent, selector: "core-dropdown", inputs: ["getByIdObject$", "paramMode", "shownFrom", "options$", "height", "placeholder", "loading", "warningDisable", "clearDisable", "fitHeightWithItemCount", "itemHeight", "optionApiDriven", "optionApi", "optionHttpVerb", "optionHttpPayload", "optionValueFrom", "optionTextFrom"] }, { kind: "component", type: CoreCheckboxComponent, selector: "core-checkbox", inputs: ["text", "tooltipPosition", "tooltip", "inputValue", "disabled"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
733
|
+
}
|
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SeekerPropsComponent, decorators: [{
|
|
735
|
+
type: Component,
|
|
736
|
+
args: [{ selector: 'seeker-props', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
737
|
+
FormsModule,
|
|
738
|
+
CoreDropdownComponent,
|
|
739
|
+
CoreCheckboxComponent,
|
|
740
|
+
], template: "<div class=\"setting-group seeker-group\" [style.padding.px]=\"15\">\r\n\r\n <div class=\"setting-row\">\r\n Basic Settings\r\n </div>\r\n \r\n\r\n <div class=\"setting-row\">\r\n <label>Source Type</label>\r\n <core-dropdown\r\n [options$]=\"svc.sourceTypeOptions$\"\r\n [paramMode]=\"true\"\r\n [ngModel]=\"$control().seekerSourceType\"\r\n (ngModelChange)=\"setControlProp('seekerSourceType', $event)\">\r\n </core-dropdown>\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Multi Mode</label>\r\n <core-checkbox\r\n [ngModel]=\"$control().multiMode\"\r\n (ngModelChange)=\"setControlProp('multiMode', $event)\">\r\n </core-checkbox>\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Hide Org Tree</label>\r\n <core-checkbox\r\n [ngModel]=\"$control().hideOrgTree\"\r\n (ngModelChange)=\"setControlProp('hideOrgTree', $event)\">\r\n </core-checkbox>\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Source Space Height</label>\r\n <input class=\"form-control\"\r\n type=\"number\"\r\n [ngModel]=\"$control().sourceSpaceHeight\"\r\n (ngModelChange)=\"setControlProp('sourceSpaceHeight', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Bound From</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$control().boundFrom\"\r\n (ngModelChange)=\"setControlProp('boundFrom', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Shown From</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$control().shownFrom\"\r\n (ngModelChange)=\"setControlProp('shownFrom', $event)\" />\r\n </div>\r\n\r\n <!-- <div class=\"setting-row\">\r\n <label>Use These Columns (CSV)</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$useTheseColumnsCsv()\"\r\n (ngModelChange)=\"onUseColumnsChanged($event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row\">\r\n <label>Excluded Columns (CSV)</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"$excludedColumnsCsv()\"\r\n (ngModelChange)=\"onExcludedColumnsChanged($event)\" />\r\n </div> -->\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- ALSO BIND TO -->\r\n <!-- ================================================ -->\r\n <div class=\"setting-row\">\r\n Also Bind To\r\n </div>\r\n \r\n <button class=\"btn-add\" (click)=\"addAlsoBindRow()\">+ Add Mapping</button>\r\n\r\n <table class=\"mini-table\">\r\n <tr>\r\n <th>takeFrom</th>\r\n <th>bindTo</th>\r\n <th></th>\r\n </tr>\r\n\r\n @for (item of $alsoBind(); track $index) {\r\n <tr>\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"item.takeFrom\"\r\n (ngModelChange)=\"updateAlsoBindRow($index, 'takeFrom', $event)\" />\r\n </td>\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"item.bindTo\"\r\n (ngModelChange)=\"updateAlsoBindRow($index, 'bindTo', $event)\" />\r\n </td>\r\n <td>\r\n <button class=\"btn-remove\" (click)=\"removeAlsoBindRow($index)\">x</button>\r\n </td>\r\n </tr>\r\n }\r\n </table>\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- OUTER PARAM -->\r\n <!-- ================================================ -->\r\n <div class=\"setting-row\">\r\n Outer Param JSON\r\n </div>\r\n\r\n <textarea class=\"form-control\"\r\n [style.height.px]=\"140\"\r\n [ngModel]=\"$outerParamJson()\"\r\n (ngModelChange)=\"onOuterParamJsonChange($event)\">\r\n </textarea>\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- OUTER FILTER -->\r\n <!-- ================================================ -->\r\n <div class=\"setting-row\">\r\n Outer Filter (RuleTree Mini)\r\n </div>\r\n\r\n <button class=\"btn-add\" (click)=\"addOuterFilter()\">+ Add Filter</button>\r\n\r\n <table class=\"mini-table\">\r\n <tr>\r\n <th>Field</th>\r\n <th>Operator</th>\r\n <th>Value</th>\r\n <th></th>\r\n </tr>\r\n\r\n @for (f of $outerFilter(); track $index) {\r\n <tr>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"f.field\"\r\n (ngModelChange)=\"updateOuterFilter($index, 'field', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <core-dropdown\r\n [options$]=\"svc.filterOperatorOptions$\"\r\n [ngModel]=\"f.operator\"\r\n [paramMode]=\"true\"\r\n (ngModelChange)=\"updateOuterFilter($index, 'operator', $event)\">\r\n </core-dropdown>\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n type=\"text\"\r\n [ngModel]=\"f.dateTimeValue\"\r\n (ngModelChange)=\"updateOuterFilter($index, 'dateTimeValue', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <button class=\"btn-remove\" (click)=\"removeOuterFilter($index)\">x</button>\r\n </td>\r\n\r\n </tr>\r\n }\r\n </table>\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- EXTENDED COLUMNS -->\r\n <!-- ================================================ -->\r\n <!-- <div class=\"setting-row\">\r\n Extended Columns\r\n </div>\r\n\r\n <button class=\"btn-add\" (click)=\"addExtendedColumn()\">+ Add Column</button>\r\n\r\n <table class=\"mini-table\">\r\n <tr>\r\n <th>Caption</th>\r\n <th>Field</th>\r\n <th>Type</th>\r\n <th>Align</th>\r\n <th>Width</th>\r\n <th>Hidden</th>\r\n <th>Translate</th>\r\n <th></th>\r\n </tr>\r\n\r\n @for (c of $extendedColumns(); track $index) {\r\n <tr>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.caption\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'caption', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.field\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'field', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.type\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'type', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input class=\"form-control\"\r\n [ngModel]=\"c.align\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'align', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <input type=\"number\"\r\n class=\"form-control\"\r\n [ngModel]=\"c.width\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'width', $event)\" />\r\n </td>\r\n\r\n <td>\r\n <core-checkbox\r\n [ngModel]=\"c.hidden\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'hidden', $event)\">\r\n </core-checkbox>\r\n </td>\r\n\r\n <td>\r\n <core-checkbox\r\n [ngModel]=\"c.translate\"\r\n (ngModelChange)=\"updateExtendedColumn($index, 'translate', $event)\">\r\n </core-checkbox>\r\n </td>\r\n\r\n <td>\r\n <button class=\"btn-remove\" (click)=\"removeExtendedColumn($index)\">x</button>\r\n </td>\r\n\r\n </tr>\r\n }\r\n </table> -->\r\n\r\n\r\n <!-- ================================================ -->\r\n <!-- EXTENDED SECTIONS -->\r\n <!-- ================================================ -->\r\n <!-- <div class=\"setting-row\">\r\n Extended Sections\r\n </div>\r\n\r\n <button class=\"btn-add\" (click)=\"addExtendedSection()\">+ Add Section</button>\r\n\r\n @for (s of $extendedSections(); track $index) {\r\n <div class=\"section-box\">\r\n\r\n <div class=\"setting-row\">\r\n <label>Caption</label>\r\n <input class=\"form-control\"\r\n [ngModel]=\"s.caption\"\r\n (ngModelChange)=\"updateExtendedSection($index, $event)\" />\r\n </div>\r\n\r\n <button class=\"btn-remove\"\r\n (click)=\"removeExtendedSection($index)\">\r\n Remove\r\n </button>\r\n\r\n </div>\r\n } -->\r\n\r\n</div>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
741
|
+
}] });
|
|
742
|
+
|
|
743
|
+
class DatepickerPropsComponent {
|
|
635
744
|
constructor() {
|
|
636
745
|
this.controlChange = new EventEmitter();
|
|
637
746
|
}
|
|
638
747
|
update() {
|
|
639
748
|
this.controlChange.emit(this.control);
|
|
640
749
|
}
|
|
641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
642
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DatepickerPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
751
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DatepickerPropsComponent, isStandalone: true, selector: "datepicker-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>datepicker-props works!</p>\r\n", styles: [""] }); }
|
|
643
752
|
}
|
|
644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DatepickerPropsComponent, decorators: [{
|
|
645
754
|
type: Component,
|
|
646
|
-
args: [{ selector: '
|
|
755
|
+
args: [{ selector: 'datepicker-props', imports: [], template: "<p>datepicker-props works!</p>\r\n" }]
|
|
647
756
|
}], propDecorators: { control: [{
|
|
648
757
|
type: Input
|
|
649
758
|
}], controlChange: [{
|
|
650
759
|
type: Output
|
|
651
760
|
}] } });
|
|
652
761
|
|
|
653
|
-
class
|
|
762
|
+
class GridBufferPropsComponent {
|
|
654
763
|
constructor() {
|
|
655
764
|
this.controlChange = new EventEmitter();
|
|
656
765
|
}
|
|
657
766
|
update() {
|
|
658
767
|
this.controlChange.emit(this.control);
|
|
659
768
|
}
|
|
660
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
661
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
769
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: GridBufferPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
770
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: GridBufferPropsComponent, isStandalone: true, selector: "grid-buffer-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>grid-buffer-props works!</p>\r\n", styles: [""] }); }
|
|
662
771
|
}
|
|
663
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: GridBufferPropsComponent, decorators: [{
|
|
664
773
|
type: Component,
|
|
665
|
-
args: [{ selector: '
|
|
774
|
+
args: [{ selector: 'grid-buffer-props', imports: [], template: "<p>grid-buffer-props works!</p>\r\n" }]
|
|
666
775
|
}], propDecorators: { control: [{
|
|
667
776
|
type: Input
|
|
668
777
|
}], controlChange: [{
|
|
669
778
|
type: Output
|
|
670
779
|
}] } });
|
|
671
780
|
|
|
672
|
-
|
|
673
|
-
__proto__: null,
|
|
674
|
-
NumberPropsComponent: NumberPropsComponent
|
|
675
|
-
});
|
|
676
|
-
|
|
677
|
-
class RadioGroupPropsComponent {
|
|
781
|
+
class ListPropsComponent {
|
|
678
782
|
constructor() {
|
|
679
783
|
this.controlChange = new EventEmitter();
|
|
680
784
|
}
|
|
681
785
|
update() {
|
|
682
786
|
this.controlChange.emit(this.control);
|
|
683
787
|
}
|
|
684
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
685
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
788
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ListPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
789
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: ListPropsComponent, isStandalone: true, selector: "list-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>list-props works!</p>\r\n", styles: [""] }); }
|
|
686
790
|
}
|
|
687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ListPropsComponent, decorators: [{
|
|
688
792
|
type: Component,
|
|
689
|
-
args: [{ selector: '
|
|
793
|
+
args: [{ selector: 'list-props', imports: [], template: "<p>list-props works!</p>\r\n" }]
|
|
690
794
|
}], propDecorators: { control: [{
|
|
691
795
|
type: Input
|
|
692
796
|
}], controlChange: [{
|
|
693
797
|
type: Output
|
|
694
798
|
}] } });
|
|
695
799
|
|
|
696
|
-
class
|
|
800
|
+
class MccPropsComponent {
|
|
697
801
|
constructor() {
|
|
698
802
|
this.controlChange = new EventEmitter();
|
|
699
803
|
}
|
|
700
804
|
update() {
|
|
701
805
|
this.controlChange.emit(this.control);
|
|
702
806
|
}
|
|
703
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
704
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
807
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MccPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
808
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: MccPropsComponent, isStandalone: true, selector: "mcc-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>mcc-props works!</p>\r\n", styles: [""] }); }
|
|
705
809
|
}
|
|
706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MccPropsComponent, decorators: [{
|
|
707
811
|
type: Component,
|
|
708
|
-
args: [{ selector: '
|
|
812
|
+
args: [{ selector: 'mcc-props', imports: [], template: "<p>mcc-props works!</p>\r\n" }]
|
|
709
813
|
}], propDecorators: { control: [{
|
|
710
814
|
type: Input
|
|
711
815
|
}], controlChange: [{
|
|
712
816
|
type: Output
|
|
713
817
|
}] } });
|
|
714
818
|
|
|
715
|
-
class
|
|
819
|
+
class RadioGroupPropsComponent {
|
|
716
820
|
constructor() {
|
|
717
821
|
this.controlChange = new EventEmitter();
|
|
718
822
|
}
|
|
719
823
|
update() {
|
|
720
824
|
this.controlChange.emit(this.control);
|
|
721
825
|
}
|
|
722
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
723
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type:
|
|
826
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RadioGroupPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
827
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: RadioGroupPropsComponent, isStandalone: true, selector: "radio-group-props", inputs: { control: "control" }, outputs: { controlChange: "controlChange" }, ngImport: i0, template: "<p>radio-group-props works!</p>\r\n", styles: [""] }); }
|
|
724
828
|
}
|
|
725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RadioGroupPropsComponent, decorators: [{
|
|
726
830
|
type: Component,
|
|
727
|
-
args: [{ selector: '
|
|
831
|
+
args: [{ selector: 'radio-group-props', imports: [], template: "<p>radio-group-props works!</p>\r\n" }]
|
|
728
832
|
}], propDecorators: { control: [{
|
|
729
833
|
type: Input
|
|
730
834
|
}], controlChange: [{
|
|
@@ -750,91 +854,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
750
854
|
type: Output
|
|
751
855
|
}] } });
|
|
752
856
|
|
|
753
|
-
class
|
|
754
|
-
constructor(
|
|
755
|
-
super(
|
|
756
|
-
this
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
effect(() => {
|
|
762
|
-
const c = this.$control(); // will re-run when selection changes
|
|
763
|
-
this.syncFromControl();
|
|
857
|
+
class AttachmentPropsComponent extends BasePropsComponent {
|
|
858
|
+
constructor() {
|
|
859
|
+
super(...arguments);
|
|
860
|
+
this.$typedField = computed(() => {
|
|
861
|
+
const control = this.$control();
|
|
862
|
+
return AttachmentFieldHelperService.isAttachment(control)
|
|
863
|
+
? control.assignTo || ''
|
|
864
|
+
: control.field;
|
|
764
865
|
});
|
|
765
866
|
}
|
|
766
|
-
|
|
767
|
-
isChecked(v) {
|
|
768
|
-
return this.$selectedValidators()[v] !== undefined;
|
|
769
|
-
}
|
|
770
|
-
syncFromControl() {
|
|
867
|
+
setTypedField(val) {
|
|
771
868
|
const control = this.$control();
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
validatorMap[v.name] = v;
|
|
776
|
-
}
|
|
777
|
-
this.$selectedValidators.set(validatorMap);
|
|
778
|
-
}
|
|
779
|
-
toggleValidator(v) {
|
|
780
|
-
const current = { ...this.$selectedValidators() };
|
|
781
|
-
const requiresValue = ['minLength', 'maxLength', 'min', 'max', 'pattern'];
|
|
782
|
-
const isAlreadyChecked = !!current[v];
|
|
783
|
-
if (isAlreadyChecked) {
|
|
784
|
-
delete current[v]; // ❌ Remove validator
|
|
785
|
-
}
|
|
786
|
-
else {
|
|
787
|
-
const validator = {
|
|
788
|
-
name: v,
|
|
789
|
-
errorMessage: this.coreFormDesignService.getErrorMessageFor(v),
|
|
790
|
-
validator: this.coreFormDesignService.getValidatorFn(v, null), // stub until value is filled
|
|
791
|
-
value: requiresValue.includes(v) ? '' : true
|
|
792
|
-
};
|
|
793
|
-
current[v] = validator;
|
|
794
|
-
}
|
|
795
|
-
this.$selectedValidators.set(current);
|
|
796
|
-
// ✅ Skip update if validator requires value but it's still empty
|
|
797
|
-
const shouldSkip = !isAlreadyChecked &&
|
|
798
|
-
requiresValue.includes(v) &&
|
|
799
|
-
current[v]?.value === '';
|
|
800
|
-
if (shouldSkip)
|
|
801
|
-
return;
|
|
802
|
-
const validatorArray = this.coreFormDesignService.toIValidatorArray(current);
|
|
803
|
-
this.setControlProp('validators', validatorArray);
|
|
804
|
-
}
|
|
805
|
-
updateValidatorValue(v, raw) {
|
|
806
|
-
const value = raw?.toString().trim();
|
|
807
|
-
const updated = { ...this.$selectedValidators() };
|
|
808
|
-
if (value === '') {
|
|
809
|
-
// 👇 Remove the validator if it was cleared
|
|
810
|
-
delete updated[v];
|
|
869
|
+
const context = this.$formContext();
|
|
870
|
+
if (AttachmentFieldHelperService.isAttachment(control)) {
|
|
871
|
+
AttachmentFieldHelperService.handleFieldNameChangeForAttachment(control, context, val);
|
|
811
872
|
}
|
|
812
873
|
else {
|
|
813
|
-
|
|
814
|
-
updated[v].value = value;
|
|
815
|
-
}
|
|
874
|
+
control.field = val;
|
|
816
875
|
}
|
|
817
|
-
this
|
|
818
|
-
// ✅ Only update the control if it's valid or fully removed
|
|
819
|
-
const validatorArray = this.coreFormDesignService.toIValidatorArray(updated);
|
|
820
|
-
this.setControlProp('validators', validatorArray);
|
|
821
|
-
}
|
|
822
|
-
isReadOnlyValidator(v) {
|
|
823
|
-
return this.$selectedValidators()[v]?.readOnly === true;
|
|
876
|
+
this.patchControl(control, this.isNested);
|
|
824
877
|
}
|
|
825
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
826
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
878
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AttachmentPropsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
879
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AttachmentPropsComponent, isStandalone: true, selector: "attachment-props", usesInheritance: true, ngImport: i0, template: "<p>attachment-props works!</p>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }); }
|
|
827
880
|
}
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type:
|
|
881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AttachmentPropsComponent, decorators: [{
|
|
829
882
|
type: Component,
|
|
830
|
-
args: [{ selector: '
|
|
831
|
-
|
|
832
|
-
FormsModule,
|
|
833
|
-
TranslatePipe,
|
|
834
|
-
TooltipDirective,
|
|
835
|
-
CoreCheckboxComponent
|
|
836
|
-
], template: "<div class=\"setting-group validator-group\" [ngStyle]=\"{ padding: '15px' }\">\r\n @for (v of $availableValidators(); track v) {\r\n <div class=\"setting-row\">\r\n\r\n <label>\r\n {{ v }}\r\n @if (isReadOnlyValidator(v)) {\r\n <i class=\"feather-lock tiny-lock\" title=\"Read-only system validator\"></i>\r\n }\r\n </label>\r\n\r\n <div class=\"control-wrapper\">\r\n <core-checkbox ngModel ngDefaultControl [ngModel]=\"isChecked(v)\" [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'System validator' : ''\" (ngModelChange)=\"toggleValidator(v)\" />\r\n\r\n @if (isChecked(v) && ['minLength', 'maxLength', 'min', 'max'].includes(v)) {\r\n <input class=\"form-control validator-value\" [type]=\"'number'\"\r\n [value]=\"$selectedValidators()[v]?.value || ''\"\r\n (input)=\"updateValidatorValue(v, $any($event.target).value)\"\r\n [placeholder]=\"'Enter value' | translate: lang\" [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'Default validator \u2014 cannot be modified' : ''\" />\r\n }\r\n\r\n @else if (isChecked(v) && v === 'pattern') {\r\n <input class=\"form-control validator-value\" type=\"text\" [value]=\"$selectedValidators()[v]?.value || ''\"\r\n (input)=\"updateValidatorValue(v, $any($event.target).value)\" [placeholder]=\"'Enter regex'\"\r\n [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'Default validator \u2014 cannot be modified' : ''\" />\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
837
|
-
}], ctorParameters: () => [{ type: MultiLanguageService }] });
|
|
883
|
+
args: [{ selector: 'attachment-props', imports: [], template: "<p>attachment-props works!</p>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
884
|
+
}] });
|
|
838
885
|
|
|
839
886
|
class CalculatedPropsComponent extends BasePropsComponent {
|
|
840
887
|
constructor(mls) {
|
|
@@ -1137,6 +1184,150 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1137
1184
|
], template: "<div class=\"setting-group calculated-group\" [ngStyle]=\"{ padding: '15px' }\">\r\n\r\n <div class=\"setting-row evaluation-mode-row\">\r\n <label class=\"setting-label\">Evaluation Mode</label>\r\n <core-radio-group [options$]=\"radioOptions$\" [vertical]=\"true\" [gapY]=\"8\"\r\n [ngModel]=\"fds.$control()?.evaluationMode\" (ngModelChange)=\"setControlProp('evaluationMode', $event)\">\r\n </core-radio-group>\r\n </div>\r\n\r\n <div class=\"setting-row depends-on-row\">\r\n <label class=\"setting-label\">Depends On</label>\r\n <core-sticker-collection [$items]=\"$fields()\" [$shownFrom]=\"'field'\"\r\n [$initialChecked]=\"fds.$control()?.dependsOn || []\" ($checkedChange)=\"setControlProp('dependsOn', $event)\" />\r\n </div>\r\n\r\n <div class=\"setting-row return-type-row\">\r\n <label class=\"setting-label\">Return Type</label>\r\n <select class=\"form-control setting-input\" [ngModel]=\"fds.$control()?.returnType || 'number'\"\r\n (ngModelChange)=\"setControlProp('returnType', $event)\">\r\n <option value=\"boolean\">Boolean</option>\r\n <option value=\"number\">Number</option>\r\n <option value=\"string\">String</option>\r\n <option value=\"number[]\">Number[]</option>\r\n <option value=\"string[]\">String[]</option>\r\n <!-- Omitting 'Date' and 'object' -->\r\n </select>\r\n </div>\r\n\r\n @if (!!fds.$control()?.dependsOn && !!fds.$control()?.dependsOn!.length) {\r\n\r\n\r\n <div class=\"setting-row script-row\">\r\n <label class=\"setting-label\">Script {{ $beingValidated() ? 'is being validated...' : '' }}</label>\r\n <textarea [ngStyle]=\"{ minHeight: '150px', borderRadius: '8px' }\" [readonly]=\"!fds.$control()?.evaluationMode\"\r\n [disabled]=\"!fds.$control()?.evaluationMode\" class=\"form-control\"\r\n [class.form-control-disabled]=\"!fds.$control()?.evaluationMode\" rows=\"20\" [ngModel]=\"fds.$control()?.script\"\r\n (ngModelChange)=\"onScriptChange($event)\" [placeholder]=\"$placeholderForScriptInput()\">\r\n </textarea>\r\n @if (!!$sqlScriptError()) {\r\n <small class=\"text-danger\">{{ $sqlScriptError() }}</small>\r\n }\r\n\r\n\r\n @if (!!fds.$control()?.evaluationMode) {\r\n <div class=\"button-group\">\r\n <button class=\"btn btn-secondary validate-btn\" (click)=\"validateScript($event)\">Validate with AI</button>\r\n <button class=\"btn btn-primary validate-btn\" (click)=\"generateScript()\">\r\n {{ $aiGeneratorOn() ? 'Hide AI Prompt Editor' : 'Show AI Prompt Editor' }}\r\n </button>\r\n </div>\r\n }\r\n\r\n @if ($aiGeneratorOn()) {\r\n <div class=\"sql-generator-panel\">\r\n <div class=\"alert alert-info\" style=\"margin-top: 1rem;\">\r\n <strong>SQL Generator:</strong> Describe what you want the script to do, and AI will generate SQL for you.\r\n </div>\r\n\r\n @if (fds.$control()?.evaluationMode==='sql-query') {\r\n <div class=\"sql-generator-panel mt-4\">\r\n <label class=\"fw-bold mb-2\">Select Related Tables</label>\r\n\r\n <core-sticker-collection [$enableFilter]=\"true\" [$items]=\"wfs.$workflowDbSchema()\" [$shownFrom]=\"'table'\"\r\n [$tooltipFrom]=\"'hintForAi'\" [$initialChecked]=\"[]\" ($checkedChange)=\"tableCheckedChange($event)\">\r\n </core-sticker-collection>\r\n\r\n </div>\r\n }\r\n\r\n @if (!!fds.$control()?.evaluationMode) {\r\n <textarea class=\"form-control\" style=\"min-height: 100px; margin-top: 0.5rem; border-radius: 8px;\"\r\n [(ngModel)]=\"$sqlPrompt\" placeholder=\"e.g., Calculate leave days between FROM_DATE and TO_DATE\">\r\n </textarea>\r\n\r\n <div class=\"mt-2 d-flex gap-2 justify-content-end\">\r\n <button class=\"btn btn-success\" (click)=\"submitScriptPrompt()\">\r\n Generate Script\r\n </button>\r\n </div>\r\n }\r\n\r\n @if ($generatedScript()) {\r\n <div class=\"generated-sql-box mt-3\">\r\n <label class=\"fw-bold\">Generated by AI:</label>\r\n <pre class=\"bg-light p-3 rounded\" style=\"white-space: pre-wrap;\">{{$generatedScript()}}</pre>\r\n <button class=\"btn btn-sm btn-primary mt-2\" (click)=\"applyGeneratedSql()\">Apply to Script</button>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n\r\n\r\n }\r\n\r\n<ng-template #shortHtmlHintForCSharpSyntax>\r\n <div class=\"syntax-hint\">\r\n <strong>Example (C# Expression):</strong>\r\n <pre><code>FullName.ToUpper() + \" #\" + EmployeeCode</code></pre>\r\n <div class=\"note\">\r\n This expression will be evaluated dynamically using <code>DynamicExpresso</code>.<br>\r\n You can return any value from context.\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #shortHtmlHintForSqlSyntax>\r\n <div class=\"syntax-hint\">\r\n <strong>Example (SQL Query):</strong>\r\n <pre><code>SELECT EMPLOYEE_CODE FROM HU_EMPLOYEE WHERE ORG_ID = 123</code></pre>\r\n <div class=\"note\">\r\n Your SQL can return either a single value <em>or</em> a list.<br>\r\n The system will extract data from the <strong>first column of all rows</strong>.<br>\r\n Use standard SQL compatible with your database.\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n</div>", styles: [".setting-row{margin:30px 0}.button-group{margin-top:15px}.button-group button{height:35px;font-size:13px;border-radius:17.5px;margin-right:8px}.setting-divider{margin:1.5rem 0 .75rem;color:#555;border-top:1px dashed #ccc;padding-top:.5rem}.evaluation-mode-row{background-color:#ffecb3;border-radius:8px;width:180px;height:110px;padding:15px}.evaluation-mode-row label{margin-bottom:8px}.script-row{margin:30px 0}.syntax-hint{color:#666;background:#fff;border:1px solid #ccc;border-radius:6px;padding:12px;font-size:13px;max-width:320px;box-shadow:0 2px 6px #0000000d}.syntax-hint pre{margin:8px 0;background-color:#f8f8f8;padding:8px;border-radius:4px;font-family:monospace;white-space:pre-wrap;word-break:break-word}.syntax-hint .note{margin-top:6px;font-size:12px}\n"] }]
|
|
1138
1185
|
}], ctorParameters: () => [{ type: MultiLanguageService }] });
|
|
1139
1186
|
|
|
1187
|
+
const FIELD_SETTING_PROPS_REGISTRY = {
|
|
1188
|
+
'NUMBER': NumberPropsComponent,
|
|
1189
|
+
'EMAIL': EmailPropsComponent,
|
|
1190
|
+
'DROPDOWN': DropdownPropsComponent,
|
|
1191
|
+
'FORM_ARRAY': FormArrayPropsComponent,
|
|
1192
|
+
'TEXTAREA': TextareaPropsComponent,
|
|
1193
|
+
'CHECKLIST': ChecklistPropsComponent,
|
|
1194
|
+
'SEEKER': SeekerPropsComponent,
|
|
1195
|
+
'DATEPICKER': DatepickerPropsComponent,
|
|
1196
|
+
'GRID_BUFFER': GridBufferPropsComponent,
|
|
1197
|
+
'LIST': ListPropsComponent,
|
|
1198
|
+
'MCC': MccPropsComponent,
|
|
1199
|
+
'RADIO_GROUP': RadioGroupPropsComponent,
|
|
1200
|
+
'UPLOADER': UploaderPropsComponent,
|
|
1201
|
+
'ATTACHMENT': AttachmentPropsComponent,
|
|
1202
|
+
'CALCULATED': CalculatedPropsComponent,
|
|
1203
|
+
};
|
|
1204
|
+
|
|
1205
|
+
class PropsHostComponent {
|
|
1206
|
+
constructor() {
|
|
1207
|
+
this.isNested = false;
|
|
1208
|
+
this.props = {};
|
|
1209
|
+
this.vcRef = inject(ViewContainerRef);
|
|
1210
|
+
this.alert = inject(AlertService);
|
|
1211
|
+
}
|
|
1212
|
+
ngOnInit() {
|
|
1213
|
+
const componentType = FIELD_SETTING_PROPS_REGISTRY[this.type];
|
|
1214
|
+
if (!componentType) {
|
|
1215
|
+
this.alert.error(`[PropsHost] Component type '${this.type}' not found in registry.`, noneAutoClosedAlertOptions);
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
this.componentRef = this.vcRef.createComponent(componentType);
|
|
1219
|
+
// truyền props trực tiếp
|
|
1220
|
+
if (this.props) {
|
|
1221
|
+
Object.assign(this.componentRef.instance, this.props);
|
|
1222
|
+
}
|
|
1223
|
+
// truyền isNested nếu có @Input bên con
|
|
1224
|
+
this.componentRef.setInput?.('isNested', this.isNested);
|
|
1225
|
+
this.componentRef.changeDetectorRef.markForCheck();
|
|
1226
|
+
}
|
|
1227
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: PropsHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1228
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: PropsHostComponent, isStandalone: true, selector: "props-host", inputs: { isNested: "isNested", type: "type", props: "props" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1229
|
+
}
|
|
1230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: PropsHostComponent, decorators: [{
|
|
1231
|
+
type: Component,
|
|
1232
|
+
args: [{
|
|
1233
|
+
selector: 'props-host',
|
|
1234
|
+
template: '',
|
|
1235
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1236
|
+
}]
|
|
1237
|
+
}], propDecorators: { isNested: [{
|
|
1238
|
+
type: Input
|
|
1239
|
+
}], type: [{
|
|
1240
|
+
type: Input
|
|
1241
|
+
}], props: [{
|
|
1242
|
+
type: Input
|
|
1243
|
+
}] } });
|
|
1244
|
+
|
|
1245
|
+
class ValidatorEditorComponent extends BasePropsComponent {
|
|
1246
|
+
constructor(mls) {
|
|
1247
|
+
super(mls);
|
|
1248
|
+
this.mls = mls;
|
|
1249
|
+
// 🔹 Computed list based on controlType
|
|
1250
|
+
this.$availableValidators = computed(() => this.coreFormDesignService.getSupportedValidators(this.$control()));
|
|
1251
|
+
// 🔹 Signal for selected validators with their values
|
|
1252
|
+
this.$selectedValidators = signal({});
|
|
1253
|
+
effect(() => {
|
|
1254
|
+
const c = this.$control(); // will re-run when selection changes
|
|
1255
|
+
this.syncFromControl();
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
// ✅ Check if a validator is enabled
|
|
1259
|
+
isChecked(v) {
|
|
1260
|
+
return this.$selectedValidators()[v] !== undefined;
|
|
1261
|
+
}
|
|
1262
|
+
syncFromControl() {
|
|
1263
|
+
const control = this.$control();
|
|
1264
|
+
const validators = control.validators ?? [];
|
|
1265
|
+
const validatorMap = {};
|
|
1266
|
+
for (const v of validators) {
|
|
1267
|
+
validatorMap[v.name] = v;
|
|
1268
|
+
}
|
|
1269
|
+
this.$selectedValidators.set(validatorMap);
|
|
1270
|
+
}
|
|
1271
|
+
toggleValidator(v) {
|
|
1272
|
+
const current = { ...this.$selectedValidators() };
|
|
1273
|
+
const requiresValue = ['minLength', 'maxLength', 'min', 'max', 'pattern'];
|
|
1274
|
+
const isAlreadyChecked = !!current[v];
|
|
1275
|
+
if (isAlreadyChecked) {
|
|
1276
|
+
delete current[v]; // ❌ Remove validator
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
const validator = {
|
|
1280
|
+
name: v,
|
|
1281
|
+
errorMessage: this.coreFormDesignService.getErrorMessageFor(v),
|
|
1282
|
+
validator: this.coreFormDesignService.getValidatorFn(v, null), // stub until value is filled
|
|
1283
|
+
value: requiresValue.includes(v) ? '' : true
|
|
1284
|
+
};
|
|
1285
|
+
current[v] = validator;
|
|
1286
|
+
}
|
|
1287
|
+
this.$selectedValidators.set(current);
|
|
1288
|
+
// ✅ Skip update if validator requires value but it's still empty
|
|
1289
|
+
const shouldSkip = !isAlreadyChecked &&
|
|
1290
|
+
requiresValue.includes(v) &&
|
|
1291
|
+
current[v]?.value === '';
|
|
1292
|
+
if (shouldSkip)
|
|
1293
|
+
return;
|
|
1294
|
+
const validatorArray = this.coreFormDesignService.toIValidatorArray(current);
|
|
1295
|
+
this.setControlProp('validators', validatorArray);
|
|
1296
|
+
}
|
|
1297
|
+
updateValidatorValue(v, raw) {
|
|
1298
|
+
const value = raw?.toString().trim();
|
|
1299
|
+
const updated = { ...this.$selectedValidators() };
|
|
1300
|
+
if (value === '') {
|
|
1301
|
+
// 👇 Remove the validator if it was cleared
|
|
1302
|
+
delete updated[v];
|
|
1303
|
+
}
|
|
1304
|
+
else {
|
|
1305
|
+
if (updated[v]) {
|
|
1306
|
+
updated[v].value = value;
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
this.$selectedValidators.set(updated);
|
|
1310
|
+
// ✅ Only update the control if it's valid or fully removed
|
|
1311
|
+
const validatorArray = this.coreFormDesignService.toIValidatorArray(updated);
|
|
1312
|
+
this.setControlProp('validators', validatorArray);
|
|
1313
|
+
}
|
|
1314
|
+
isReadOnlyValidator(v) {
|
|
1315
|
+
return this.$selectedValidators()[v]?.readOnly === true;
|
|
1316
|
+
}
|
|
1317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ValidatorEditorComponent, deps: [{ token: MultiLanguageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1318
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: ValidatorEditorComponent, isStandalone: true, selector: "validator-editor", usesInheritance: true, ngImport: i0, template: "<div class=\"setting-group validator-group\" [ngStyle]=\"{ padding: '15px' }\">\r\n @for (v of $availableValidators(); track v) {\r\n <div class=\"setting-row\">\r\n\r\n <label>\r\n {{ v }}\r\n @if (isReadOnlyValidator(v)) {\r\n <i class=\"feather-lock tiny-lock\" title=\"Read-only system validator\"></i>\r\n }\r\n </label>\r\n\r\n <div class=\"control-wrapper\">\r\n <core-checkbox ngModel ngDefaultControl [ngModel]=\"isChecked(v)\" [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'System validator' : ''\" (ngModelChange)=\"toggleValidator(v)\" />\r\n\r\n @if (isChecked(v) && ['minLength', 'maxLength', 'min', 'max'].includes(v)) {\r\n <input class=\"form-control validator-value\" [type]=\"'number'\"\r\n [value]=\"$selectedValidators()[v]?.value || ''\"\r\n (input)=\"updateValidatorValue(v, $any($event.target).value)\"\r\n [placeholder]=\"'Enter value' | translate: lang\" [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'Default validator \u2014 cannot be modified' : ''\" />\r\n }\r\n\r\n @else if (isChecked(v) && v === 'pattern') {\r\n <input class=\"form-control validator-value\" type=\"text\" [value]=\"$selectedValidators()[v]?.value || ''\"\r\n (input)=\"updateValidatorValue(v, $any($event.target).value)\" [placeholder]=\"'Enter regex'\"\r\n [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'Default validator \u2014 cannot be modified' : ''\" />\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: TooltipDirective, selector: "[appTooltip]", inputs: ["appTooltip", "showAnyway", "color", "backgroundColor", "position"] }, { kind: "component", type: CoreCheckboxComponent, selector: "core-checkbox", inputs: ["text", "tooltipPosition", "tooltip", "inputValue", "disabled"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1319
|
+
}
|
|
1320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ValidatorEditorComponent, decorators: [{
|
|
1321
|
+
type: Component,
|
|
1322
|
+
args: [{ selector: 'validator-editor', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1323
|
+
NgStyle,
|
|
1324
|
+
FormsModule,
|
|
1325
|
+
TranslatePipe,
|
|
1326
|
+
TooltipDirective,
|
|
1327
|
+
CoreCheckboxComponent
|
|
1328
|
+
], template: "<div class=\"setting-group validator-group\" [ngStyle]=\"{ padding: '15px' }\">\r\n @for (v of $availableValidators(); track v) {\r\n <div class=\"setting-row\">\r\n\r\n <label>\r\n {{ v }}\r\n @if (isReadOnlyValidator(v)) {\r\n <i class=\"feather-lock tiny-lock\" title=\"Read-only system validator\"></i>\r\n }\r\n </label>\r\n\r\n <div class=\"control-wrapper\">\r\n <core-checkbox ngModel ngDefaultControl [ngModel]=\"isChecked(v)\" [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'System validator' : ''\" (ngModelChange)=\"toggleValidator(v)\" />\r\n\r\n @if (isChecked(v) && ['minLength', 'maxLength', 'min', 'max'].includes(v)) {\r\n <input class=\"form-control validator-value\" [type]=\"'number'\"\r\n [value]=\"$selectedValidators()[v]?.value || ''\"\r\n (input)=\"updateValidatorValue(v, $any($event.target).value)\"\r\n [placeholder]=\"'Enter value' | translate: lang\" [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'Default validator \u2014 cannot be modified' : ''\" />\r\n }\r\n\r\n @else if (isChecked(v) && v === 'pattern') {\r\n <input class=\"form-control validator-value\" type=\"text\" [value]=\"$selectedValidators()[v]?.value || ''\"\r\n (input)=\"updateValidatorValue(v, $any($event.target).value)\" [placeholder]=\"'Enter regex'\"\r\n [disabled]=\"isReadOnlyValidator(v)\"\r\n [appTooltip]=\"isReadOnlyValidator(v) ? 'Default validator \u2014 cannot be modified' : ''\" />\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".setting-group{display:flex;flex-direction:column}.setting-row{display:flex;justify-content:flex-start;align-items:center;height:50px}.setting-row label{width:30%}.setting-row .control-wrapper,.setting-row input,.setting-row .readonly-field{width:65%}.setting-row .readonly-field{font-style:italic;color:#666}.setting-row input.validator-value{text-align:right}.setting-row input.validator-value.pattern{text-align:left}.setting-row .control-wrapper{display:flex;align-items:center;justify-content:flex-start}.validator-group .setting-row{justify-content:flex-start}.validator-group .setting-row input{margin-left:15px;width:100%}.tiny-lock{margin-left:6px;font-size:12px;color:#888}\n"] }]
|
|
1329
|
+
}], ctorParameters: () => [{ type: MultiLanguageService }] });
|
|
1330
|
+
|
|
1140
1331
|
class FieldSettingComponent extends BaseComponent {
|
|
1141
1332
|
constructor() {
|
|
1142
1333
|
super(...arguments);
|
|
@@ -1154,13 +1345,30 @@ class FieldSettingComponent extends BaseComponent {
|
|
|
1154
1345
|
});
|
|
1155
1346
|
// 🔹 Context (flat control list)
|
|
1156
1347
|
this.$formContext = computed(() => this.coreFormDesignService.$formContext());
|
|
1157
|
-
this.
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
};
|
|
1348
|
+
this.onParamsChanged = (updated) => this.coreFormDesignService.patchControl(updated, this.$isNested());
|
|
1349
|
+
this.$resolvedType = computed(() => {
|
|
1350
|
+
const ctrl = this.$control();
|
|
1351
|
+
if (!ctrl)
|
|
1352
|
+
return 'UNKNOWN';
|
|
1353
|
+
return this.resolvePropsType(ctrl) ?? 'UNKNOWN';
|
|
1354
|
+
});
|
|
1355
|
+
this.$props = computed(() => {
|
|
1356
|
+
const ctrl = this.$control();
|
|
1357
|
+
if (!ctrl)
|
|
1358
|
+
return null;
|
|
1359
|
+
return {
|
|
1360
|
+
control: ctrl,
|
|
1361
|
+
onChange: this.onParamsChanged
|
|
1362
|
+
};
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
resolvePropsType(control) {
|
|
1366
|
+
console.log("resolvePropsType", control);
|
|
1367
|
+
if (!control)
|
|
1368
|
+
return null;
|
|
1369
|
+
const type = control.controlType?.toUpperCase();
|
|
1370
|
+
console.log("resolvePropsType", type);
|
|
1371
|
+
return FIELD_SETTING_PROPS_REGISTRY[type] ? type : null;
|
|
1164
1372
|
}
|
|
1165
1373
|
// 🔹 Optional trigger for downstream side-effects (no longer emits)
|
|
1166
1374
|
onControlParamsChange() {
|
|
@@ -1209,7 +1417,7 @@ class FieldSettingComponent extends BaseComponent {
|
|
|
1209
1417
|
this.listenerFn();
|
|
1210
1418
|
}
|
|
1211
1419
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: FieldSettingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1212
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: FieldSettingComponent, isStandalone: true, selector: "field-setting", inputs: { $isNested: { classPropertyName: "$isNested", publicName: "$isNested", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"field-setting-container\">\r\n\r\n @if (!!$control()) {\r\n <div class=\"panel-caption-header\">\r\n <div class=\"panel-caption\">\r\n Editing: {{ (!!$control() && $control()!.type !== 'calculated') ? $control()?.controlType + ' - ' : '' }}{{ $control()?.field ||\r\n 'Unnamed' }}\r\n </div>\r\n @if (!$isNested()) {\r\n <div class=\"close-wrapper pointer\" (click)=\"closeFieldSettingPanel()\">\r\n <i class=\"feather-x\"></i>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n <div class=\"field-setting-content\">\r\n\r\n\r\n @if (!!$control() && $control()!.type === 'calculated') {\r\n\r\n <div class=\"group-title mandatory\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Mandatory</div>\r\n </div>\r\n <mandatory-props [isNested]=\"$isNested()\"></mandatory-props>\r\n\r\n <div class=\"group-title calculated\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Calculated Rule<i class=\"feather-help-circle\" [htmlTooltip]=\"aboutCalculatedField\"\r\n [maxWidthUnset]=\"true\"></i></div>\r\n </div>\r\n <calculated-props [isNested]=\"$isNested()\"></calculated-props>\r\n\r\n\r\n } @else {\r\n\r\n <div class=\"group-title mandatory\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Mandatory</div>\r\n </div>\r\n <mandatory-props [isNested]=\"$isNested()\"></mandatory-props>\r\n\r\n <!-- <div class=\"setting-divider\"></div> -->\r\n\r\n @if (!!$control() && $control()!.controlType !== 'FORM_ARRAY') {\r\n <div class=\"group-title optional\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-sliders\"></i>\r\n </div>\r\n <div class=\"group-name\">Optional</div>\r\n </div>\r\n <optional-props [isNested]=\"$isNested()\"></optional-props>\r\n\r\n <!-- <div class=\"setting-divider\"></div> -->\r\n\r\n <div class=\"group-title validators\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-check-square\"></i>\r\n </div>\r\n <div class=\"group-name\">Validators</div>\r\n </div>\r\n <validator-editor [isNested]=\"$isNested()\"></validator-editor>\r\n }\r\n\r\n @if (!!$control() && !($control()!.controlType === 'TEXTBOX' && ['string', 'text', 'email'].includes(($control()!.type ||\r\n '').toLowerCase()))) {\r\n\r\n <div class=\"group-title\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-check-square\"></i>\r\n </div>\r\n <div class=\"group-name\">{{ getFriendlyControlLabel($control()) }} Settings</div>\r\n </div>\r\n\r\n
|
|
1420
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: FieldSettingComponent, isStandalone: true, selector: "field-setting", inputs: { $isNested: { classPropertyName: "$isNested", publicName: "$isNested", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"field-setting-container\">\r\n\r\n @if (!!$control()) {\r\n <div class=\"panel-caption-header\">\r\n <div class=\"panel-caption\">\r\n Editing: {{ (!!$control() && $control()!.type !== 'calculated') ? $control()?.controlType + ' - ' : '' }}{{ $control()?.field ||\r\n 'Unnamed' }}\r\n </div>\r\n @if (!$isNested()) {\r\n <div class=\"close-wrapper pointer\" (click)=\"closeFieldSettingPanel()\">\r\n <i class=\"feather-x\"></i>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n <div class=\"field-setting-content\">\r\n\r\n\r\n @if (!!$control() && $control()!.type === 'calculated') {\r\n\r\n <div class=\"group-title mandatory\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Mandatory</div>\r\n </div>\r\n <mandatory-props [isNested]=\"$isNested()\"></mandatory-props>\r\n\r\n <div class=\"group-title calculated\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Calculated Rule<i class=\"feather-help-circle\" [htmlTooltip]=\"aboutCalculatedField\"\r\n [maxWidthUnset]=\"true\"></i></div>\r\n </div>\r\n <calculated-props [isNested]=\"$isNested()\"></calculated-props>\r\n\r\n\r\n } @else {\r\n\r\n <div class=\"group-title mandatory\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Mandatory</div>\r\n </div>\r\n <mandatory-props [isNested]=\"$isNested()\"></mandatory-props>\r\n\r\n <!-- <div class=\"setting-divider\"></div> -->\r\n\r\n @if (!!$control() && $control()!.controlType !== 'FORM_ARRAY') {\r\n <div class=\"group-title optional\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-sliders\"></i>\r\n </div>\r\n <div class=\"group-name\">Optional</div>\r\n </div>\r\n <optional-props [isNested]=\"$isNested()\"></optional-props>\r\n\r\n <!-- <div class=\"setting-divider\"></div> -->\r\n\r\n <div class=\"group-title validators\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-check-square\"></i>\r\n </div>\r\n <div class=\"group-name\">Validators</div>\r\n </div>\r\n <validator-editor [isNested]=\"$isNested()\"></validator-editor>\r\n }\r\n\r\n @if (!!$control() && !($control()!.controlType === 'TEXTBOX' && ['string', 'text', 'email'].includes(($control()!.type ||\r\n '').toLowerCase()))) {\r\n\r\n <div class=\"group-title\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-check-square\"></i>\r\n </div>\r\n <div class=\"group-name\">{{ getFriendlyControlLabel($control()) }} Settings</div>\r\n </div>\r\n\r\n <props-host \r\n [type]=\"$resolvedType()\"\r\n [props]=\"$props()\"\r\n [isNested]=\"$isNested()\"\r\n ></props-host>\r\n\r\n\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n\r\n\r\n</div>\r\n\r\n<ng-template #aboutCalculatedField>\r\n\r\n <div class=\"calculated-field-rule\" style=\"padding: 1rem; border-radius: 8px; background: #000; width: 800px;\">\r\n <h4 style=\"margin-top: 0; color: #fff;\">Calculated Field Rule</h4>\r\n <p><strong>Calculated fields</strong> are invisible boolean fields evaluated based on form inputs and logic. They\r\n help drive dynamic workflow behavior, such as conditional routing or validation triggers.</p>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Key Properties</h5>\r\n <ul style=\"margin-top: 0;\">\r\n <li><strong>script:</strong> Expression to evaluate (e.g.,\r\n <code>leaveDays > 3 && status == 'Approved'</code>)</li>\r\n <li><strong>evaluationMode:</strong> <code>\"in-memory\"</code> or <code>\"sql-query\"</code></li>\r\n <li><strong>dependsOn[]:</strong> List of field names the script depends on</li>\r\n <li><strong>filterMode:</strong> <code>\"HardBlock\"</code> or <code>\"SoftWarn\"</code></li>\r\n </ul>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Evaluation Modes</h5>\r\n <ul style=\"margin-top: 0;\">\r\n <li>\r\n <strong>in-memory:</strong> Uses <code>DynamicExpresso</code> to evaluate C#-like logic at runtime<br />\r\n <small>Example: <code>leaveType == \"ANNUAL\" && leaveDays < 5</code></small>\r\n </li>\r\n <li>\r\n <strong>sql-query:</strong> Runs backend SQL to evaluate conditions via\r\n <code>SELECT CASE WHEN ... THEN 1 ELSE 0 END</code><br />\r\n <small>Example:\r\n <code>SELECT CASE WHEN QUOTA > 0 THEN 1 ELSE 0 END FROM LEAVE_QUOTA WHERE EMPLOYEE_ID = {{ '@' }}employeeId</code></small>\r\n </li>\r\n </ul>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Use Cases</h5>\r\n <ul style=\"margin-top: 0;\">\r\n <li>Validate complex logic without showing the field</li>\r\n <li>Route to a different workflow branch based on hidden logic</li>\r\n <li>Trigger warning or block submission based on business rules</li>\r\n </ul>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Example</h5>\r\n <pre style=\"color: #eee; padding: 0.5rem 1rem; border-radius: 4px; overflow-x: auto;\">\r\n {{ '{' }}\r\n \"script\": \"leaveDays > 3 && status == 'APPROVED'\",\r\n \"evaluationMode\": \"in-memory\",\r\n \"dependsOn\": [\"leaveDays\", \"status\"],\r\n \"filterMode\": \"HardBlock\"\r\n {{ '}' }}\r\n </pre>\r\n </div>\r\n\r\n\r\n</ng-template>", styles: [".field-setting-container{max-height:100%;overflow-x:hidden;overflow-y:auto}.field-setting-container .field-setting-content{padding:15px}.field-setting-container .panel-caption-header{display:flex;align-items:center;justify-content:space-between;padding:15px;height:60px;background-color:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1f2937}.field-setting-container .panel-caption-header .panel-caption{flex-grow:1}.field-setting-container .panel-caption-header .close-wrapper{display:flex;align-items:center;justify-content:center;background-color:#f1f5f9;width:32px;height:32px;border-radius:50%;cursor:pointer;transition:background-color .2s}.field-setting-container .panel-caption-header .close-wrapper:hover{background-color:#e2e8f0}.field-setting-container .setting-divider{margin:1.5rem 0 .75rem;color:#555;border-top:1px dashed #ccc;padding-top:.5rem}.field-setting-container .group-title{display:flex;height:35px;align-items:center;gap:8px;background-color:#87ceeb;padding:6px 12px;font-weight:600;color:#1f2937;font-size:13px;margin:12px 0 4px;box-shadow:0 1px 2px #0000000d}.field-setting-container .group-title .icon-wrapper{display:flex;align-items:center;justify-content:center;width:18px;height:18px;color:#1f2937}.field-setting-container .group-title .icon-wrapper i{width:16px;height:16px;stroke-width:2}.field-setting-container .group-title.mandatory{background-color:#ffecb3}.field-setting-container .group-title.optional{background-color:#d0f0fd}.field-setting-container .group-title.validators{background-color:#e8f5e9}.field-setting-container .group-title .group-name{flex:1}.field-setting-container .group-title .group-name .feather-help-circle{display:inline-block;margin-left:8px}.field-setting-container .calculated-field-rule{font-family:system-ui,sans-serif;border:1px solid #ccc;padding:1rem;border-radius:8px}.field-setting-container .calculated-field-rule h2{margin-top:0;color:#2b3e50}.field-setting-container .calculated-field-rule pre{background:#eee;padding:.5rem 1rem;border-radius:4px;overflow-x:auto}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: MandatoryPropsComponent, selector: "mandatory-props" }, { kind: "component", type: OptionalPropsComponent, selector: "optional-props" }, { kind: "component", type: ValidatorEditorComponent, selector: "validator-editor" }, { kind: "component", type: PropsHostComponent, selector: "props-host", inputs: ["isNested", "type", "props"] }, { kind: "component", type: CalculatedPropsComponent, selector: "calculated-props" }, { kind: "directive", type: HtmlTooltipDirective, selector: "[htmlTooltip]", inputs: ["htmlTooltip", "tooltipContext", "maxWidthUnset", "backgroundColor", "hold$"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1213
1421
|
}
|
|
1214
1422
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: FieldSettingComponent, decorators: [{
|
|
1215
1423
|
type: Component,
|
|
@@ -1233,8 +1441,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1233
1441
|
TextareaPropsComponent,
|
|
1234
1442
|
UploaderPropsComponent,
|
|
1235
1443
|
CalculatedPropsComponent,
|
|
1236
|
-
HtmlTooltipDirective
|
|
1237
|
-
|
|
1444
|
+
HtmlTooltipDirective,
|
|
1445
|
+
SeekerPropsComponent
|
|
1446
|
+
], template: "<div class=\"field-setting-container\">\r\n\r\n @if (!!$control()) {\r\n <div class=\"panel-caption-header\">\r\n <div class=\"panel-caption\">\r\n Editing: {{ (!!$control() && $control()!.type !== 'calculated') ? $control()?.controlType + ' - ' : '' }}{{ $control()?.field ||\r\n 'Unnamed' }}\r\n </div>\r\n @if (!$isNested()) {\r\n <div class=\"close-wrapper pointer\" (click)=\"closeFieldSettingPanel()\">\r\n <i class=\"feather-x\"></i>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n <div class=\"field-setting-content\">\r\n\r\n\r\n @if (!!$control() && $control()!.type === 'calculated') {\r\n\r\n <div class=\"group-title mandatory\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Mandatory</div>\r\n </div>\r\n <mandatory-props [isNested]=\"$isNested()\"></mandatory-props>\r\n\r\n <div class=\"group-title calculated\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Calculated Rule<i class=\"feather-help-circle\" [htmlTooltip]=\"aboutCalculatedField\"\r\n [maxWidthUnset]=\"true\"></i></div>\r\n </div>\r\n <calculated-props [isNested]=\"$isNested()\"></calculated-props>\r\n\r\n\r\n } @else {\r\n\r\n <div class=\"group-title mandatory\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-lock\"></i>\r\n </div>\r\n <div class=\"group-name\">Mandatory</div>\r\n </div>\r\n <mandatory-props [isNested]=\"$isNested()\"></mandatory-props>\r\n\r\n <!-- <div class=\"setting-divider\"></div> -->\r\n\r\n @if (!!$control() && $control()!.controlType !== 'FORM_ARRAY') {\r\n <div class=\"group-title optional\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-sliders\"></i>\r\n </div>\r\n <div class=\"group-name\">Optional</div>\r\n </div>\r\n <optional-props [isNested]=\"$isNested()\"></optional-props>\r\n\r\n <!-- <div class=\"setting-divider\"></div> -->\r\n\r\n <div class=\"group-title validators\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-check-square\"></i>\r\n </div>\r\n <div class=\"group-name\">Validators</div>\r\n </div>\r\n <validator-editor [isNested]=\"$isNested()\"></validator-editor>\r\n }\r\n\r\n @if (!!$control() && !($control()!.controlType === 'TEXTBOX' && ['string', 'text', 'email'].includes(($control()!.type ||\r\n '').toLowerCase()))) {\r\n\r\n <div class=\"group-title\">\r\n <div class=\"icon-wrapper\">\r\n <i class=\"feather-check-square\"></i>\r\n </div>\r\n <div class=\"group-name\">{{ getFriendlyControlLabel($control()) }} Settings</div>\r\n </div>\r\n\r\n <props-host \r\n [type]=\"$resolvedType()\"\r\n [props]=\"$props()\"\r\n [isNested]=\"$isNested()\"\r\n ></props-host>\r\n\r\n\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n\r\n\r\n</div>\r\n\r\n<ng-template #aboutCalculatedField>\r\n\r\n <div class=\"calculated-field-rule\" style=\"padding: 1rem; border-radius: 8px; background: #000; width: 800px;\">\r\n <h4 style=\"margin-top: 0; color: #fff;\">Calculated Field Rule</h4>\r\n <p><strong>Calculated fields</strong> are invisible boolean fields evaluated based on form inputs and logic. They\r\n help drive dynamic workflow behavior, such as conditional routing or validation triggers.</p>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Key Properties</h5>\r\n <ul style=\"margin-top: 0;\">\r\n <li><strong>script:</strong> Expression to evaluate (e.g.,\r\n <code>leaveDays > 3 && status == 'Approved'</code>)</li>\r\n <li><strong>evaluationMode:</strong> <code>\"in-memory\"</code> or <code>\"sql-query\"</code></li>\r\n <li><strong>dependsOn[]:</strong> List of field names the script depends on</li>\r\n <li><strong>filterMode:</strong> <code>\"HardBlock\"</code> or <code>\"SoftWarn\"</code></li>\r\n </ul>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Evaluation Modes</h5>\r\n <ul style=\"margin-top: 0;\">\r\n <li>\r\n <strong>in-memory:</strong> Uses <code>DynamicExpresso</code> to evaluate C#-like logic at runtime<br />\r\n <small>Example: <code>leaveType == \"ANNUAL\" && leaveDays < 5</code></small>\r\n </li>\r\n <li>\r\n <strong>sql-query:</strong> Runs backend SQL to evaluate conditions via\r\n <code>SELECT CASE WHEN ... THEN 1 ELSE 0 END</code><br />\r\n <small>Example:\r\n <code>SELECT CASE WHEN QUOTA > 0 THEN 1 ELSE 0 END FROM LEAVE_QUOTA WHERE EMPLOYEE_ID = {{ '@' }}employeeId</code></small>\r\n </li>\r\n </ul>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Use Cases</h5>\r\n <ul style=\"margin-top: 0;\">\r\n <li>Validate complex logic without showing the field</li>\r\n <li>Route to a different workflow branch based on hidden logic</li>\r\n <li>Trigger warning or block submission based on business rules</li>\r\n </ul>\r\n\r\n <h5 style=\"margin-bottom: 0.5rem; color: #fff;\">Example</h5>\r\n <pre style=\"color: #eee; padding: 0.5rem 1rem; border-radius: 4px; overflow-x: auto;\">\r\n {{ '{' }}\r\n \"script\": \"leaveDays > 3 && status == 'APPROVED'\",\r\n \"evaluationMode\": \"in-memory\",\r\n \"dependsOn\": [\"leaveDays\", \"status\"],\r\n \"filterMode\": \"HardBlock\"\r\n {{ '}' }}\r\n </pre>\r\n </div>\r\n\r\n\r\n</ng-template>", styles: [".field-setting-container{max-height:100%;overflow-x:hidden;overflow-y:auto}.field-setting-container .field-setting-content{padding:15px}.field-setting-container .panel-caption-header{display:flex;align-items:center;justify-content:space-between;padding:15px;height:60px;background-color:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1f2937}.field-setting-container .panel-caption-header .panel-caption{flex-grow:1}.field-setting-container .panel-caption-header .close-wrapper{display:flex;align-items:center;justify-content:center;background-color:#f1f5f9;width:32px;height:32px;border-radius:50%;cursor:pointer;transition:background-color .2s}.field-setting-container .panel-caption-header .close-wrapper:hover{background-color:#e2e8f0}.field-setting-container .setting-divider{margin:1.5rem 0 .75rem;color:#555;border-top:1px dashed #ccc;padding-top:.5rem}.field-setting-container .group-title{display:flex;height:35px;align-items:center;gap:8px;background-color:#87ceeb;padding:6px 12px;font-weight:600;color:#1f2937;font-size:13px;margin:12px 0 4px;box-shadow:0 1px 2px #0000000d}.field-setting-container .group-title .icon-wrapper{display:flex;align-items:center;justify-content:center;width:18px;height:18px;color:#1f2937}.field-setting-container .group-title .icon-wrapper i{width:16px;height:16px;stroke-width:2}.field-setting-container .group-title.mandatory{background-color:#ffecb3}.field-setting-container .group-title.optional{background-color:#d0f0fd}.field-setting-container .group-title.validators{background-color:#e8f5e9}.field-setting-container .group-title .group-name{flex:1}.field-setting-container .group-title .group-name .feather-help-circle{display:inline-block;margin-left:8px}.field-setting-container .calculated-field-rule{font-family:system-ui,sans-serif;border:1px solid #ccc;padding:1rem;border-radius:8px}.field-setting-container .calculated-field-rule h2{margin-top:0;color:#2b3e50}.field-setting-container .calculated-field-rule pre{background:#eee;padding:.5rem 1rem;border-radius:4px;overflow-x:auto}\n"] }]
|
|
1238
1447
|
}] });
|
|
1239
1448
|
|
|
1240
1449
|
var EnumLeftPanelMode;
|
|
@@ -3263,10 +3472,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
3263
3472
|
], animations: [slideFromTopFadeIn], template: "<div class=\"core-form-design-container fs-13\" [hotKeys]=\"['F3', 'F6', 'Escape']\">\r\n\r\n <core-page-header title=\"UI.COMPONENT_TITLE.WORKFLOW_FORM_DESIGN\" (buttonClick)=\"onCorePageHeaderButtonClicked($event)\"></core-page-header>\r\n \r\n <ng-template #formMetadata>\r\n <form-metadata></form-metadata>\r\n </ng-template>\r\n\r\n <!-- @if (coreFormDesignService.$showFormArrayDesign()) { -->\r\n <div class=\"form-array-layout-editor-wrapper\" [class.open]=\"coreFormDesignService.$showFormArrayDesign()\">\r\n <core-form-array-layout-editor />\r\n </div>\r\n <!-- } -->\r\n\r\n @if (!coreFormDesignService.$isInWorkflowDesign()) {\r\n <aside class=\"af-metadata-overlay\" [@slideFromTopFadeIn]=\"coreFormDesignService.$showFormMetadata() ? 'in' : 'out'\"\r\n [class.shown]=\"coreFormDesignService.$showFormMetadata()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"formMetadata\"></ng-container>\r\n </aside>\r\n }\r\n\r\n <div \r\n class=\"field-setting-panel\" \r\n [class.open]=\"coreFormDesignService.$fieldSettingPanelOpen()\" \r\n [class.calculated-type]=\"coreFormDesignService.$selectedCell()?.control?.type==='calculated'\"\r\n [ngStyle]=\"{ zIndex: $zIndex() }\"\r\n #settingPanel\r\n >\r\n @if (!!(this.coreFormDesignService.$selectedCell())) {\r\n <field-setting [$isNested]=\"false\"></field-setting>\r\n }\r\n </div>\r\n\r\n <div class=\"form-design-left\">\r\n\r\n @switch ($leftPanelMode()) {\r\n @case (enumLeftPanelMode.FieldCollection) {\r\n @for (category of controlCategories; track $index) {\r\n <div class=\"category-name\">\r\n {{ category.name }}\r\n </div>\r\n <ul>\r\n @for (control of category.controls; track $index) {\r\n <li draggable=\"true\" (dragstart)=\"onDragStart($event, control, false)\" [class.full-width]=\"control.controlType === 'SEEKER' || control.controlType === 'ATTACHMENT' || control.controlType === 'GRIDBUFFER'\">\r\n @if (control.controlType === 'GRIDBUFFER') {\r\n <div class=\"grid-buffer-wrapper\">\r\n <core-control [control]=\"control\" [form]=\"form\" [checkError$]=\"checkError$\"></core-control>\r\n </div>\r\n } @else {\r\n <core-control [control]=\"control\" [form]=\"form\" [checkError$]=\"checkError$\"></core-control>\r\n }\r\n </li>\r\n <div class=\"space\"></div>\r\n }\r\n </ul>\r\n }\r\n }\r\n @case (enumLeftPanelMode.Json) {\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"switchJson()\">{{ $jsonMode() }}</button>\r\n @if ($jsonMode()==='selectedField') {\r\n <pre class=\"json-preview\">{{ coreFormDesignService.$controlJson() }}</pre>\r\n } @else {\r\n <pre class=\"json-preview\">{{ coreFormDesignService.$saveLiveJson() }}</pre>\r\n }\r\n \r\n }\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"form-design-right\">\r\n <core-form-design-monitor [$mode]=\"'main'\"></core-form-design-monitor>\r\n <div class=\"h10\"></div>\r\n <core-form-group-editor [$idAsInput]=\"true\" />\r\n </div>\r\n @if ($loading()) {\r\n <core-toast-loading></core-toast-loading>\r\n }\r\n\r\n <ng-template #calculatedFieldsTooltip>\r\n <div style=\"max-width: 280px;\">\r\n <strong>Calculated Fields</strong><br />\r\n <p></p>\r\n These fields are hidden from the form and cannot be edited directly.<br /><br />\r\n - They are computed automatically during workflow execution.<br />\r\n - Each field depends on one or more standard input fields.<br />\r\n - The calculation is evaluated using either an SQL query engine (like <strong>Dapper</strong>) or an in-memory expression engine (like <strong>Dynamic Expresso</strong>).<br /><br />\r\n In both cases, the result is a <code>0</code> or <code>1</code>, representing <strong>false</strong> or <strong>true</strong>.<br /><br />\r\n These results can be used to influence workflow logic, rule trees, or approval paths.\r\n </div>\r\n </ng-template>\r\n \r\n</div>", styles: ["@charset \"UTF-8\";.core-form-design-container{position:relative;height:calc(100vh - var(--size-header-height) - var(--size-layout-block-cell-spacing));width:100%;overflow:hidden;background-color:#eff0f1;font-size:13px}.core-form-design-container .form-array-layout-editor-wrapper{position:fixed;top:10vh;right:-1420px;width:1420px;height:80vh;z-index:99;transition:right .25s ease-out;background-color:#ffebcd;overflow:auto;padding:15px;box-shadow:.4rem 0 2rem #0000002e}.core-form-design-container .form-array-layout-editor-wrapper.open{right:calc((100% - 1420px)/2)}.core-form-design-container .core-button-vns-container{margin-right:8px!important}.core-form-design-container .core-button-vns-container:last-child{background-color:#000;color:#fff;margin-right:0}.core-form-design-container .af-metadata-overlay{position:fixed;top:60px;left:66px;background:#fff;box-shadow:.4rem 0 2rem #0000002e;z-index:1000;width:1214px;height:calc(100vh - 75px);overflow-y:auto;pointer-events:none}.core-form-design-container .af-metadata-overlay.shown{pointer-events:auto}.core-form-design-container *{border-radius:0}.core-form-design-container ul,.core-form-design-container li{padding:0}.core-form-design-container li{max-width:200px}.core-form-design-container ul div.space{display:block;height:15px}.core-form-design-container li.full-width{max-width:100%}.core-form-design-container .field-setting-panel{display:block;position:fixed;width:360px;height:100vh;top:0;right:-360px;background-color:#fff;box-shadow:.4rem 0 2rem #0000002e;transition:right .5s ease-out}.core-form-design-container .field-setting-panel .close-wrapper{width:32px;height:32px;position:absolute;top:15px;right:15px;display:flex;background-color:#848484;border-radius:50%}.core-form-design-container .field-setting-panel .close-wrapper i{width:16px;height:16px;font-size:18px;color:#848484}.core-form-design-container .field-setting-panel .panel-caption{margin-bottom:1rem;padding-bottom:.5rem;border-bottom:1px solid #ddd;width:100%;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}.core-form-design-container .field-setting-panel.calculated-type{width:500px;right:-500px}.core-form-design-container .field-setting-panel.calculated-type textarea{border-radius:8px;height:150px}.core-form-design-container .field-setting-panel.open{right:0}.core-form-design-container .form-design-left{position:absolute;top:var(--size-core-page-header-height);bottom:0;left:0;z-index:1;width:360px;height:calc(100vh - var(--size-header-height) - var(--size-layout-block-cell-spacing));padding:15px;padding-right:calc(15px + var(--size-scrollbar-width));background-color:#87ceeb;overflow-y:hidden}.core-form-design-container .form-design-left .category-name{color:#fff}.core-form-design-container .form-design-left .grid-buffer-wrapper{background-color:#fff;padding:15px}.core-form-design-container .form-design-left ul:last-child{padding-bottom:400px}.core-form-design-container .form-design-left .category-name{margin-bottom:15px}.core-form-design-container .form-design-left .json-preview{background-color:#fff;color:#333;padding:1rem 1.5rem;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;width:330px;height:calc(100vh - 205px)}.core-form-design-container .form-design-left button{height:35px;border-radius:0;margin-bottom:15px;color:#fff;border:none;font-size:13px;background-color:transparent}.core-form-design-container .form-design-left:hover{overflow-y:auto;padding-right:15px}.core-form-design-container .form-design-right{width:100%;height:calc(100vh - var(--size-header-height) - var(--size-layout-block-cell-spacing));padding:15px 15px 15px 375px;overflow-y:auto}.core-form-design-container .form-design-right .h10{height:10px}.core-form-design-container .form-design-right .form-wrapper{width:100%;overflow-y:visible;background-color:#fff}.core-form-design-container .form-design-right .form-wrapper button{margin-left:12px;padding:4px 10px;border:1px solid #ccc;cursor:pointer;transition:all .2s;width:110px}.core-form-design-container .form-design-right .form-wrapper button:hover{background-color:#e4f0ff;border-color:#007bff;color:#007bff}.core-form-design-container .form-design-right .form-wrapper .form-tool-bar{display:flex;align-items:center;justify-content:flex-end}.core-form-design-container .form-design-right .form-wrapper .form-tool-bar>button{width:150px;margin:0}.core-form-design-container .form-design-right .form-wrapper .form-cells{display:flex;flex-direction:column;gap:32px;padding:20px 15px 15px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-section-placeholder{padding:12px 15px;border:1px dashed #ccc;background-color:#fff;box-shadow:0 2px 6px #0000000a}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-section-placeholder .section-header{display:flex;position:relative;align-items:center;justify-content:flex-start;font-weight:600;margin-bottom:12px;color:#333}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-section-placeholder .section-header .section-img{width:34px;height:34px;border-radius:50%;background-color:#d3d3d3;float:left;background-image:url(/assets/images/info.svg);background-repeat:no-repeat;background-position:center;margin-right:8px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-section-placeholder .section-header .section-img.calculated{background-image:url(/assets/images/sql-icon.svg);background-color:transparent;border-radius:0}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-section-placeholder .section-header .section-tool{position:absolute;right:5px;top:6px;display:none;z-index:2;color:gray}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-section-placeholder .section-header .section-tool i{font-size:24px;color:#848484}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-section-placeholder .section-header:hover .section-tool{display:block}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .row-tool-bar{display:flex;align-items:center;justify-content:flex-end;margin-bottom:8px;height:24px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-row{display:flex;gap:15px;margin-bottom:15px;min-height:50px;background-color:#d3d3d3;padding:8px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell{flex:1;min-height:90px;background-color:#fcfcfc;border:1px dashed #ccc;position:relative;padding:20px 10px 10px;transition:border .2s ease-in-out}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell:before{content:attr(data-flex);position:absolute;top:2px;left:4px;font-size:10px;color:#999}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell label.required:after{content:\" *\";color:#ff040b}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell .field-toolbar{position:absolute;right:7px;top:6px;display:none;z-index:2;color:gray}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell .field-toolbar ul{display:flex}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell .field-toolbar ul li div{display:flex;width:24px;height:24px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell .field-toolbar ul li div i{font-size:18px;width:18px;height:18px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell.has-control:hover .field-toolbar{display:flex}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .form-cell.active-drop{border-color:#007bff;background-color:#eef6ff;transition:.2s}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .placeholder{display:flex;align-items:center;justify-content:center;background-color:#fff;color:#007bff;padding:15px 0;width:100%;cursor:default}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .placeholder.calculated{color:#ff4500}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .icon-wrapper{width:24px;height:24px;border-radius:50%;padding:0;cursor:pointer;display:none;color:gray;border:1px solid gray;margin-left:8px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper .icon-wrapper i{font-size:18px;width:18px;height:18px}.core-form-design-container .form-design-right .form-wrapper .form-cells .form-row-wrapper:hover .icon-wrapper{display:flex}.core-form-design-container .form-design-right .form-wrapper .form-cell.selected{background-color:#dff6dd}.core-form-design-container .form-design-right .form-wrapper .merge-toolbar{text-align:center;margin-top:4px}.core-form-design-container .form-design-right .form-wrapper.live-form{padding-bottom:15px}.core-form-design-container .form-design-right .form-wrapper.live-form .live-form-header{padding:0 15px}.core-form-design-container .form-design-right .form-wrapper.live-form .live-form-header .preview-close-icon{position:absolute;right:7px;top:6px;z-index:2;color:gray;cursor:pointer}.core-form-design-container .form-design-right .form-wrapper.live-form .live-form-header .preview-close-icon i{font-size:18px}.core-form-design-container .drop-target{min-height:50px;min-width:50px;border:2px dashed transparent;transition:border .2s ease}.core-form-design-container .drop-target.active-drop{border-color:#007bff;background-color:#eaf4ff}.core-form-design-container .no-padding{padding:0!important}.core-form-design-container .modal-content-root{overflow:visible}\n", ".core-form-container{overflow-x:visible}.core-form-container>form .section{margin-top:var(--size-layout-block-cell-spacing)}.core-form-container>form .section.accordion{margin-bottom:0;cursor:pointer}.core-form-container>form .section.accordion .section-header-label{border:1px solid var(--acc-border-color);background-color:var(--acc-back-ground-color);color:var(--acc-font-color);height:50px;display:flex;align-items:center;justify-content:flex-start;position:relative}.core-form-container>form .section.accordion .section-header-label .section-caption{padding-left:0}.core-form-container>form .section.accordion .section-header-label .rotate-icon{transition:transform .3s ease;width:50px;height:50px;display:flex;align-items:center;justify-content:center;position:absolute;top:0;right:0}.core-form-container>form .section.accordion .section-header-label .rotate-icon.rotated90{transform:rotate(90deg)}.core-form-container>form .section.accordion .section-header-label .rotate-icon i{font-size:24px}.core-form-container>form .section.accordion .section-body{transition:all .3s ease;opacity:1}.core-form-container>form .section.accordion:not(.open) .section-body{overflow:hidden;opacity:0}.core-form-container>form .section.accordion .section-img-wrapper{height:50px;width:50px;display:flex;align-items:center;justify-content:center}.core-form-container>form .section:not(:first-child){margin-top:calc(var(--size-layout-block-cell-spacing) * 2)}.core-form-container>form .section .section-header-label{display:block;height:34px;line-height:34px;margin-bottom:15px;margin-left:12px;width:calc(100% - 24px)}.core-form-container>form .section .section-header-label .section-img-wrapper{position:relative}.core-form-container>form .section .section-header-label .section-img-wrapper .section-img{position:absolute;width:34px;height:34px;border-radius:50%;background-color:#d3d3d3;float:left;background-image:url(/assets/images/info.svg);background-repeat:no-repeat;background-position:center}.core-form-container>form .section .section-header-label .section-img-wrapper .section-img-fixed{position:absolute;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;color:#848484;float:left}.core-form-container>form .section .section-header-label .section-img-wrapper .section-img.calculated{background-image:url(/assets/images/sql-icon.svg);border-radius:0;background-color:transparent}.core-form-container>form .section .section-header-label .section-calc-wrapper{width:34px;height:34px;display:flex;align-items:center;justify-content:center;background-color:#d3d3d3;border-radius:50%}.core-form-container>form .section .section-header-label .section-calc-wrapper i{width:24px;height:24px;font-size:24px;color:#1b4332}.core-form-container>form .section .section-header-label .section-caption{padding-left:40px;font-weight:700;color:#696969}.core-form-container>form .section .section-header-label .section-caption.has-icon-svg{font-weight:400;color:currentcolor}.core-form-container>form .section .section-header-label .with-icon-svg{padding-left:28px!important}.core-form-container .row{margin-left:var(--size-layout-block-cell-spacing) 0px;margin-right:var(--size-layout-block-cell-spacing) 0px}.core-form-container .row .grid-buffer{border:dotted 2px darkgray}.core-form-container .row .button-control{display:flex;align-items:flex-end}.core-form-container .form-row{margin:var(--size-layout-block-cell-spacing) 0px;display:flex;align-items:center;justify-content:center}.core-form-container .form-row>button{cursor:pointer;border-radius:0}.core-form-container .form-row>button:not(:first-child){margin-left:var(--size-layout-block-cell-spacing)}.core-form-container .dev-button{cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:13px;padding:8px;width:120px;border-radius:18px;box-shadow:.4rem 0 2rem #0000002e}.core-form-container .dev-button:not(:last-child){margin-right:15px}.core-form-container .dev-button:first-child{background-color:#dff6dd;border:1px #9fdc9d solid}.core-form-container .dev-button:last-child{background-color:#fff4ce;border:1px #ffda6a solid}.core-form-container .payload-preview{display:block;width:calc(100% - 48px);height:200px;white-space:pre-wrap;overflow-x:hidden;overflow-y:auto;background-color:#dff6dd;padding:24px;margin:24px;color:#333!important;font-family:Fira Code,monospace;font-size:.85rem;word-break:keep-all;line-height:1.5}.core-form-container .payload-preview.validator-preview{background-color:#fff4ce}.core-form-container .bottom-template-wrapper{padding-left:12px;padding-right:12px}.core-form-container .w-100{width:100%}.core-form-container .pr18{padding-right:18px}.core-form-container .section-body-grid{display:grid;grid-template-columns:repeat(12,1fr);grid-auto-rows:min-content;gap:1rem}.core-form-container .section-body-grid .field-col{min-width:0}.core-form-container .core-form-body{padding-bottom:var(--footer-height, 95px)}.core-form-container .core-form-body .section:last-child{margin-bottom:var(--footer-height, 95px)}.core-form-container .core-form-footer{--footer-height: 95px;height:var(--footer-height);position:sticky;bottom:0;background:#fff;border-top:1px solid #ddd;padding:12px 18px;display:flex;justify-content:flex-end;z-index:10}.core-form-container .core-form-footer .buttonGroupCustom{gap:8px}\n", ".core-button-vns-container{height:30px;display:flex;align-items:center;justify-content:center;min-width:30px}.core-button-vns-container .action-wrapper{height:30px!important;width:30px!important;display:flex;align-items:center;justify-content:center}.core-button-vns-container .action-wrapper:has(i:hover){background-color:#e7e7e7;border-radius:50%}.core-button-vns-container .btn-for-form{border:none;border-radius:0;background-color:transparent;color:#000;min-width:120px}.core-button-vns-container button.last-child{background-color:#000;color:#fff}.core-button-vns-container .action-wrapper.last-child{background-color:var(--color-basic-orange);color:#fff;border-radius:50%}.core-button-vns-container .action-wrapper.last-child:hover{background-color:var(--color-basic-orange);box-shadow:0 1rem 3rem #0000002e}.core-button-vns-container .temporary-unavailable{user-select:none;-moz-user-select:none;-webkit-user-select:none;cursor:not-allowed!important;opacity:.5}.core-button-vns-container .temporary-unavailable:hover{background-color:transparent!important}\n"] }]
|
|
3264
3473
|
}], ctorParameters: () => [{ type: MultiLanguageService }] });
|
|
3265
3474
|
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
CoreFormDesignComponent: CoreFormDesignComponent
|
|
3269
|
-
});
|
|
3270
|
-
|
|
3271
|
-
export { BasePropsComponent as B, CoreFormDesignComponent as C, coreFormDesign_component as c };
|
|
3272
|
-
//# sourceMappingURL=ngx-histaff-alpha-core-form-design.component-CyFCxOF0.mjs.map
|
|
3475
|
+
export { CoreFormDesignComponent };
|
|
3476
|
+
//# sourceMappingURL=ngx-histaff-alpha-core-form-design.component-BZvtwXkM.mjs.map
|