@alfresco/adf-core 9.1.0-16490451848 → 9.1.0-16491262514
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/adf-core.mjs +48 -30
- package/fesm2022/adf-core.mjs.map +1 -1
- package/lib/form/components/form-base.component.d.ts +19 -7
- package/lib/form/components/widgets/core/form-outcome.model.d.ts +3 -3
- package/lib/form/components/widgets/core/form.model.d.ts +4 -4
- package/lib/form/components/widgets/text/text-mask.component.d.ts +1 -0
- package/package.json +3 -3
package/fesm2022/adf-core.mjs
CHANGED
|
@@ -21814,25 +21814,25 @@ class FormModel {
|
|
|
21814
21814
|
this.isValid = false;
|
|
21815
21815
|
}
|
|
21816
21816
|
parseOutcomes() {
|
|
21817
|
-
if (this.json.fields)
|
|
21818
|
-
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
|
|
21817
|
+
if (!this.json.fields)
|
|
21818
|
+
return;
|
|
21819
|
+
const saveOutcome = new FormOutcomeModel(this, {
|
|
21820
|
+
id: FormModel.SAVE_OUTCOME,
|
|
21821
|
+
name: FormOutcomeModel.SAVE_ACTION,
|
|
21822
|
+
isSystem: true
|
|
21823
|
+
});
|
|
21824
|
+
const completeOutcome = new FormOutcomeModel(this, {
|
|
21825
|
+
id: FormModel.COMPLETE_OUTCOME,
|
|
21826
|
+
name: FormOutcomeModel.COMPLETE_ACTION,
|
|
21827
|
+
isSystem: true
|
|
21828
|
+
});
|
|
21829
|
+
const startProcessOutcome = new FormOutcomeModel(this, {
|
|
21830
|
+
id: FormModel.START_PROCESS_OUTCOME,
|
|
21831
|
+
name: FormOutcomeModel.START_PROCESS_ACTION,
|
|
21832
|
+
isSystem: true
|
|
21833
|
+
});
|
|
21834
|
+
const customOutcomes = (this.json.outcomes ?? []).map((formModel) => new FormOutcomeModel(this, formModel));
|
|
21835
|
+
this.outcomes = [saveOutcome].concat(customOutcomes.length > 0 ? customOutcomes : [completeOutcome, startProcessOutcome]);
|
|
21836
21836
|
}
|
|
21837
21837
|
addValuesNotPresent(valuesToSetIfNotPresent) {
|
|
21838
21838
|
this.fieldsCache.forEach((field) => {
|
|
@@ -21954,7 +21954,7 @@ class FormService {
|
|
|
21954
21954
|
if (!json.fields) {
|
|
21955
21955
|
form.outcomes = [
|
|
21956
21956
|
new FormOutcomeModel(form, {
|
|
21957
|
-
id:
|
|
21957
|
+
id: FormModel.SAVE_OUTCOME,
|
|
21958
21958
|
name: FormOutcomeModel.SAVE_ACTION,
|
|
21959
21959
|
isSystem: true
|
|
21960
21960
|
})
|
|
@@ -23314,6 +23314,9 @@ class InputMaskDirective {
|
|
|
23314
23314
|
this._onChange(this.el.nativeElement.value);
|
|
23315
23315
|
}
|
|
23316
23316
|
}
|
|
23317
|
+
onBlur() {
|
|
23318
|
+
this._onTouched();
|
|
23319
|
+
}
|
|
23317
23320
|
ngOnChanges(changes) {
|
|
23318
23321
|
if (changes['inputMask']?.currentValue['mask']) {
|
|
23319
23322
|
this.inputMask = changes['inputMask'].currentValue;
|
|
@@ -23457,7 +23460,7 @@ class InputMaskDirective {
|
|
|
23457
23460
|
return this.value;
|
|
23458
23461
|
}
|
|
23459
23462
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: InputMaskDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23460
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: InputMaskDirective, isStandalone: true, selector: "[adf-text-mask], [textMask]", inputs: { inputMask: ["textMask", "inputMask"] }, host: { listeners: { "input": "onTextInput($event)", "keyup": "onTextInput($event)" } }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], usesOnChanges: true, ngImport: i0 }); }
|
|
23463
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: InputMaskDirective, isStandalone: true, selector: "[adf-text-mask], [textMask]", inputs: { inputMask: ["textMask", "inputMask"] }, host: { listeners: { "input": "onTextInput($event)", "keyup": "onTextInput($event)", "blur": "onBlur()" } }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], usesOnChanges: true, ngImport: i0 }); }
|
|
23461
23464
|
}
|
|
23462
23465
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: InputMaskDirective, decorators: [{
|
|
23463
23466
|
type: Directive,
|
|
@@ -23474,6 +23477,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
23474
23477
|
}, {
|
|
23475
23478
|
type: HostListener,
|
|
23476
23479
|
args: ['keyup', ['$event']]
|
|
23480
|
+
}], onBlur: [{
|
|
23481
|
+
type: HostListener,
|
|
23482
|
+
args: ['blur']
|
|
23477
23483
|
}] } });
|
|
23478
23484
|
|
|
23479
23485
|
/*!
|
|
@@ -24664,7 +24670,7 @@ class FormBaseComponent {
|
|
|
24664
24670
|
this.showTitle = true;
|
|
24665
24671
|
/** Toggle rendering of the `Complete` outcome button. */
|
|
24666
24672
|
this.showCompleteButton = true;
|
|
24667
|
-
/** If true then the `Complete` outcome button is shown but it will be disabled. */
|
|
24673
|
+
/** If true then the `Complete` outcome button is shown, but it will be disabled. */
|
|
24668
24674
|
this.disableCompleteButton = false;
|
|
24669
24675
|
/** If true then the `Save` outcome button is shown but will be disabled. */
|
|
24670
24676
|
this.disableSaveButton = false;
|
|
@@ -24694,12 +24700,24 @@ class FormBaseComponent {
|
|
|
24694
24700
|
*/
|
|
24695
24701
|
this.formStyle = '';
|
|
24696
24702
|
}
|
|
24697
|
-
|
|
24698
|
-
|
|
24699
|
-
|
|
24703
|
+
/**
|
|
24704
|
+
* @deprecated Use {@link FormModel.SAVE_OUTCOME} instead.
|
|
24705
|
+
*/
|
|
24706
|
+
static { this.SAVE_OUTCOME_ID = FormModel.SAVE_OUTCOME; }
|
|
24707
|
+
/**
|
|
24708
|
+
* @deprecated Use {@link FormModel.COMPLETE_OUTCOME} instead.
|
|
24709
|
+
*/
|
|
24710
|
+
static { this.COMPLETE_OUTCOME_ID = FormModel.COMPLETE_OUTCOME; }
|
|
24711
|
+
/**
|
|
24712
|
+
* @deprecated Use {@link FormModel.START_PROCESS_OUTCOME} instead.
|
|
24713
|
+
*/
|
|
24714
|
+
static { this.START_PROCESS_OUTCOME_ID = FormModel.START_PROCESS_OUTCOME; }
|
|
24700
24715
|
static { this.CUSTOM_OUTCOME_ID = '$custom'; }
|
|
24701
24716
|
static { this.COMPLETE_BUTTON_COLOR = 'primary'; }
|
|
24702
|
-
|
|
24717
|
+
/**
|
|
24718
|
+
* @deprecated Use {@link FormOutcomeModel.COMPLETE_ACTION} instead.
|
|
24719
|
+
*/
|
|
24720
|
+
static { this.COMPLETE_OUTCOME_NAME = FormOutcomeModel.COMPLETE_ACTION; }
|
|
24703
24721
|
get form() {
|
|
24704
24722
|
return this._form;
|
|
24705
24723
|
}
|
|
@@ -24728,7 +24746,7 @@ class FormBaseComponent {
|
|
|
24728
24746
|
return titleEnabled;
|
|
24729
24747
|
}
|
|
24730
24748
|
getColorForOutcome(outcomeName) {
|
|
24731
|
-
return outcomeName ===
|
|
24749
|
+
return outcomeName === FormOutcomeModel.COMPLETE_ACTION ? FormBaseComponent.COMPLETE_BUTTON_COLOR : null;
|
|
24732
24750
|
}
|
|
24733
24751
|
isOutcomeButtonEnabled(outcome) {
|
|
24734
24752
|
if (this.form.readOnly) {
|
|
@@ -24766,18 +24784,18 @@ class FormBaseComponent {
|
|
|
24766
24784
|
return false;
|
|
24767
24785
|
}
|
|
24768
24786
|
if (outcome.isSystem) {
|
|
24769
|
-
if (outcome.id ===
|
|
24787
|
+
if (outcome.id === FormModel.SAVE_OUTCOME) {
|
|
24770
24788
|
this.disableSaveButton = true;
|
|
24771
24789
|
this.saveTaskForm();
|
|
24772
24790
|
return true;
|
|
24773
24791
|
}
|
|
24774
|
-
if (outcome.id ===
|
|
24792
|
+
if (outcome.id === FormModel.COMPLETE_OUTCOME) {
|
|
24775
24793
|
this.disableSaveButton = true;
|
|
24776
24794
|
this.disableCompleteButton = true;
|
|
24777
24795
|
this.completeTaskForm();
|
|
24778
24796
|
return true;
|
|
24779
24797
|
}
|
|
24780
|
-
if (outcome.id ===
|
|
24798
|
+
if (outcome.id === FormModel.START_PROCESS_OUTCOME) {
|
|
24781
24799
|
this.completeTaskForm();
|
|
24782
24800
|
return true;
|
|
24783
24801
|
}
|