@apia/execution 4.0.17 → 4.0.18
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/dist/index.d.ts +29 -28
- package/dist/index.js +53 -15
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -207,6 +207,7 @@ type TApiaFieldCommonProperties = {
|
|
|
207
207
|
name?: string;
|
|
208
208
|
noPrint?: boolean;
|
|
209
209
|
readonly?: boolean;
|
|
210
|
+
readOnly?: boolean;
|
|
210
211
|
rowspan?: number;
|
|
211
212
|
title?: string;
|
|
212
213
|
tooltip?: string;
|
|
@@ -399,7 +400,7 @@ declare function isHtmlResponse(response: AxiosResponse<unknown>): RegExpMatchAr
|
|
|
399
400
|
declare class InvalidSessionException extends Error {
|
|
400
401
|
}
|
|
401
402
|
declare const parseSuccessfulResponse: <LoadType extends Record<string, unknown>>(response: AxiosResponse<string>) => Promise<(ResponseSysMessages & LoadType & {
|
|
402
|
-
onClose?: string
|
|
403
|
+
onClose?: string;
|
|
403
404
|
code?: unknown;
|
|
404
405
|
load?: LoadType | undefined;
|
|
405
406
|
}) | ({
|
|
@@ -637,11 +638,11 @@ type TApiaForm = {
|
|
|
637
638
|
signableForm: boolean;
|
|
638
639
|
};
|
|
639
640
|
|
|
640
|
-
type Comparator<T> = (a: T, b: T) => boolean;
|
|
641
|
-
declare const shallowEqual: Comparator<any>;
|
|
641
|
+
type Comparator$1<T> = (a: T, b: T) => boolean;
|
|
642
|
+
declare const shallowEqual: Comparator$1<any>;
|
|
642
643
|
|
|
643
644
|
type SetValueOptions = Partial<{
|
|
644
|
-
comparator: Comparator<any>;
|
|
645
|
+
comparator: Comparator$1<any>;
|
|
645
646
|
synchronize: boolean;
|
|
646
647
|
}>;
|
|
647
648
|
type FireEventParameters = Record<string, unknown>;
|
|
@@ -760,7 +761,7 @@ declare class CustomComponent {
|
|
|
760
761
|
private _state;
|
|
761
762
|
constructor(definition: TCustomComponentDefinition);
|
|
762
763
|
get state(): DeepReadonly<TCustomComponentState>;
|
|
763
|
-
getAdditional<T>():
|
|
764
|
+
getAdditional<T>(): DeepReadonly<T>;
|
|
764
765
|
init(form: Form): Promise<void>;
|
|
765
766
|
private parseStateObject;
|
|
766
767
|
processResult(res?: TCustomComponentDefaultResponse | null): Promise<void>;
|
|
@@ -782,24 +783,24 @@ declare class Form extends WithProperties<TApiaFormProperties> {
|
|
|
782
783
|
state: {
|
|
783
784
|
isMarkedToSign: boolean;
|
|
784
785
|
};
|
|
785
|
-
protected
|
|
786
|
+
protected _customComponents: Map<string, CustomComponent>;
|
|
786
787
|
protected fieldsById: Map<string, Field<Record<string, any>, TApiaFieldBaseDefinition<Record<string, any>>, {
|
|
787
|
-
definition: Omit<TApiaFieldBaseDefinition<Record<string, any>>,
|
|
788
|
+
definition: Omit<TApiaFieldBaseDefinition<Record<string, any>>, "properties">;
|
|
788
789
|
}>>;
|
|
789
790
|
protected fieldsByName: Map<string, Field<Record<string, any>, TApiaFieldBaseDefinition<Record<string, any>>, {
|
|
790
|
-
definition: Omit<TApiaFieldBaseDefinition<Record<string, any>>,
|
|
791
|
+
definition: Omit<TApiaFieldBaseDefinition<Record<string, any>>, "properties">;
|
|
791
792
|
}>>;
|
|
792
793
|
protected fieldsByAttributeId: Map<string | number, FieldWithAttribute<Record<string, any>, any, TApiaFieldWithAttributeBaseProps<Record<string, any>>>>;
|
|
793
794
|
protected fieldsByAttributeName: Map<string, FieldWithAttribute<Record<string, any>, any, TApiaFieldWithAttributeBaseProps<Record<string, any>>>>;
|
|
794
795
|
protected fieldsGroups: Map<string, Grid>;
|
|
795
796
|
definition: TApiaForm;
|
|
796
797
|
constructor(definition: TApiaForm);
|
|
797
|
-
|
|
798
|
-
openForm(): void;
|
|
799
|
-
getAllFields(): Field<Record<string, any>, TApiaFieldBaseDefinition<Record<string, any>>, {
|
|
798
|
+
get allFields(): Field<Record<string, any>, TApiaFieldBaseDefinition<Record<string, any>>, {
|
|
800
799
|
definition: Omit<TApiaFieldBaseDefinition<Record<string, any>>, "properties">;
|
|
801
800
|
}>[];
|
|
802
|
-
|
|
801
|
+
get customComponents(): Map<string, CustomComponent>;
|
|
802
|
+
closeForm(): void;
|
|
803
|
+
openForm(): void;
|
|
803
804
|
getField(field: string, index?: number): Field<TApiaFieldCommonProperties, TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, {
|
|
804
805
|
definition: Omit<TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, "properties">;
|
|
805
806
|
}> | Field<Record<string, any>, TApiaFieldBaseDefinition<Record<string, any>>, {
|
|
@@ -1117,8 +1118,7 @@ declare class UploaderApi {
|
|
|
1117
1118
|
poolsPermissions: IPoolsPermissions[];
|
|
1118
1119
|
usersPermissions: IUsersPermissions[];
|
|
1119
1120
|
}) => string;
|
|
1120
|
-
protected getConfirmDropModalAdditionalMetadataString: (additionalMetadata: TDocumentMetadata[] | [
|
|
1121
|
-
]) => string;
|
|
1121
|
+
protected getConfirmDropModalAdditionalMetadataString: (additionalMetadata: TDocumentMetadata[] | []) => string;
|
|
1122
1122
|
protected getDeleteDocumentParameters: typeof returnExactlyTheSame;
|
|
1123
1123
|
protected getClearTempFilesParameters: typeof returnExactlyTheSame;
|
|
1124
1124
|
protected getDocumentInfoParameters: typeof returnExactlyTheSame;
|
|
@@ -1148,15 +1148,15 @@ declare class UploaderModalController {
|
|
|
1148
1148
|
api: UploaderApi;
|
|
1149
1149
|
modalConfig: TModalConfig;
|
|
1150
1150
|
conf?: {
|
|
1151
|
-
langId?: number
|
|
1152
|
-
translatingFile?: TUploaderFileInfo
|
|
1153
|
-
versionFile?: TUploaderFileInfo
|
|
1151
|
+
langId?: number;
|
|
1152
|
+
translatingFile?: TUploaderFileInfo;
|
|
1153
|
+
versionFile?: TUploaderFileInfo;
|
|
1154
1154
|
} | undefined;
|
|
1155
1155
|
state: UploaderModalState;
|
|
1156
1156
|
constructor(api: UploaderApi, modalConfig: TModalConfig, conf?: {
|
|
1157
|
-
langId?: number
|
|
1158
|
-
translatingFile?: TUploaderFileInfo
|
|
1159
|
-
versionFile?: TUploaderFileInfo
|
|
1157
|
+
langId?: number;
|
|
1158
|
+
translatingFile?: TUploaderFileInfo;
|
|
1159
|
+
versionFile?: TUploaderFileInfo;
|
|
1160
1160
|
} | undefined);
|
|
1161
1161
|
get allMetadata(): TDocumentMetadata[];
|
|
1162
1162
|
get allowAllType(): "" | "M" | "R";
|
|
@@ -1552,7 +1552,7 @@ declare class File$1 extends TranslatableField<TApiaFileProperties> {
|
|
|
1552
1552
|
init(form: Form): Promise<void>;
|
|
1553
1553
|
validate(): Promise<boolean>;
|
|
1554
1554
|
setValue(_newValue: any, _options?: Partial<{
|
|
1555
|
-
comparator: Comparator<any>;
|
|
1555
|
+
comparator: Comparator$1<any>;
|
|
1556
1556
|
synchronize: boolean;
|
|
1557
1557
|
}> | undefined): Promise<boolean>;
|
|
1558
1558
|
}
|
|
@@ -1740,9 +1740,7 @@ declare class AdditionalCell extends Cell {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
|
|
1742
1742
|
declare class GridCell extends Cell {
|
|
1743
|
-
getField(): Field
|
|
1744
|
-
definition: Omit<TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, "properties">;
|
|
1745
|
-
}>;
|
|
1743
|
+
getField(): Field;
|
|
1746
1744
|
}
|
|
1747
1745
|
|
|
1748
1746
|
declare class HeaderCell extends Cell {
|
|
@@ -1798,7 +1796,7 @@ declare class ModalInput extends FieldWithAttribute<TApiaInputProperties, ModalI
|
|
|
1798
1796
|
constructor({ value, ...definition }: TApiaModalInputDefinition);
|
|
1799
1797
|
fireEvent(eventName: InputEvents): Promise<boolean>;
|
|
1800
1798
|
setValue(newValue: Required<ModalInputValue>, options?: Partial<{
|
|
1801
|
-
comparator: Comparator<any>;
|
|
1799
|
+
comparator: Comparator$1<any>;
|
|
1802
1800
|
synchronize: boolean;
|
|
1803
1801
|
}> | undefined): Promise<boolean>;
|
|
1804
1802
|
setValueFromModalSelection(rowId: string): Promise<void>;
|
|
@@ -2348,7 +2346,7 @@ declare class Execution {
|
|
|
2348
2346
|
get steps(): {
|
|
2349
2347
|
title: string;
|
|
2350
2348
|
stepNumber: number;
|
|
2351
|
-
status: "
|
|
2349
|
+
status: "completed" | "pending" | "current";
|
|
2352
2350
|
}[];
|
|
2353
2351
|
getEntity(): Entity;
|
|
2354
2352
|
getProcess(): Process;
|
|
@@ -2369,7 +2367,7 @@ declare class Execution {
|
|
|
2369
2367
|
getStepTitle(step: number): {
|
|
2370
2368
|
title: string;
|
|
2371
2369
|
stepNumber: number;
|
|
2372
|
-
status: "
|
|
2370
|
+
status: "completed" | "pending" | "current";
|
|
2373
2371
|
} | undefined;
|
|
2374
2372
|
next(): Promise<boolean | Field<TApiaFieldCommonProperties, TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, {
|
|
2375
2373
|
definition: Omit<TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, "properties">;
|
|
@@ -2410,6 +2408,9 @@ declare class Notifications {
|
|
|
2410
2408
|
}, K>) => UnSubscriber;
|
|
2411
2409
|
}
|
|
2412
2410
|
|
|
2411
|
+
type Comparator<T> = (a: T, b: T) => boolean;
|
|
2412
|
+
declare const deepEqual: Comparator<any>;
|
|
2413
|
+
|
|
2413
2414
|
/**
|
|
2414
2415
|
* @public
|
|
2415
2416
|
*
|
|
@@ -3001,5 +3002,5 @@ declare class PasswordField extends ApiaField {
|
|
|
3001
3002
|
constructor(field: Password);
|
|
3002
3003
|
}
|
|
3003
3004
|
|
|
3004
|
-
export { ActionsController, AdditionalCell, ApiaAttribute, ApiaFieldWithAttribute, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, type ComponentEvent, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field, FieldWithAttribute, type FieldWithAttributeState, type FieldsMapping, File$1 as File, FileUploaderField, FlowModal, Form, FormsUploader, Grid, GridCell, GridField, GridPaginated, HeaderCell, Hidden, HiddenField, type IApiaField, type IApiaForm, type IApiaFunctions, type IButton, type IIProperty, type IPoolsPermissions, IProperty, type ISignatureData, type IUsersPermissions, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, Multiple, MultipleField, Notifications, Password, PasswordField, type PossibleValue, Radio, RadioField, type RadioPossibleValue, Select, SelectField, type SelectPossibleValue, ShowConfirmMessage, ShowPathSelection, ShowPoolSelection, ShowSign, ShowSignSelection, StatefulEmitter, type Status, StatusNotification, type TActionButtons, type TAjaxUploadFileStatus, type TAjaxUploadStart, type TApiaButtonProperties, type TApiaCaptchaProperties, type TApiaCheckboxProperties, type TApiaDocumentDefinition, type TApiaEditorProperties, type TApiaFieldBaseDefinition, type TApiaFieldCommonProperties, type TApiaFieldDefinition, type TApiaFieldPossibleValue, type TApiaFieldSizableFieldProperties, type TApiaFieldType, type TApiaFieldValueType, type TApiaFieldWithAttributeBaseProps, type TApiaFieldWithAttributeProperties, type TApiaFileProperties, type TApiaForm, type TApiaFormProperties, type TApiaGridProperties, type TApiaGroupableFieldProperties, type TApiaHiddenProperties, type TApiaImageProperties, type TApiaInputProperties, type TApiaLabelProperties, type TApiaLinkProperties, type TApiaMultipleProperties, type TApiaPasswordProperties, type TApiaRadioProperties, type TApiaSelectProperties, type TApiaTextareaProperties, type TApiaTitleProperties, type TApiaTranslatableFieldProperties, type TApiaTreePossibleValue, type TApiaTreeProperties, type TApiaValuatedFieldProperties, type TConfirmDropModal, type TCusCmpStateRequest, type TCustomComponentDefaultResponse, type TCustomComponentDefinition, type TDocInfo, type TDocType, type TDocumentDownloadHistory, type TDocumentInformation, type TDocumentMetadata, type TDocumentPermission, type TDocumentVersion, type TExecutionConfig, type TFieldEvent, type TFieldScriptEvent, type TFieldScriptEventParameters, type TFieldScriptEvents, type TFieldServerEvent, type TFieldServerEvents, type TFileUploaded, type TFormEventName, type TFormScriptEvent, type TFormScriptEventParameters, type TFormScriptEvents, type TFrmParent, type TModalConfig, type TObservation, type TObservations, type TOnUploadProgress, type TOpenModal, type TProcessDroppedFiles, type TRequireOnlyOne, type TSaveDroppedFilesConf, type TSignaturesData, type TUploadModalOpener, type TUploaderFileInfo, type TUploaderLoadCurrentFunction, type TUploaderLoadCurrentFunctionMessages, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, UploaderModalController, type UploaderModalState, type UploaderState, get, getLabel, isHtmlResponse, isJsonResponse, isXmlResponse, makeApiaUrl, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
|
|
3005
|
+
export { ActionsController, AdditionalCell, ApiaAttribute, ApiaFieldWithAttribute, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, type ComponentEvent, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field, FieldWithAttribute, type FieldWithAttributeState, type FieldsMapping, File$1 as File, FileUploaderField, FlowModal, Form, FormsUploader, Grid, GridCell, GridField, GridPaginated, HeaderCell, Hidden, HiddenField, type IApiaField, type IApiaForm, type IApiaFunctions, type IButton, type IIProperty, type IPoolsPermissions, IProperty, type ISignatureData, type IUsersPermissions, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, Multiple, MultipleField, Notifications, Password, PasswordField, type PossibleValue, Radio, RadioField, type RadioPossibleValue, Select, SelectField, type SelectPossibleValue, ShowConfirmMessage, ShowPathSelection, ShowPoolSelection, ShowSign, ShowSignSelection, StatefulEmitter, type Status, StatusNotification, type TActionButtons, type TAjaxUploadFileStatus, type TAjaxUploadStart, type TApiaButtonProperties, type TApiaCaptchaProperties, type TApiaCheckboxProperties, type TApiaDocumentDefinition, type TApiaEditorProperties, type TApiaFieldBaseDefinition, type TApiaFieldCommonProperties, type TApiaFieldDefinition, type TApiaFieldPossibleValue, type TApiaFieldSizableFieldProperties, type TApiaFieldType, type TApiaFieldValueType, type TApiaFieldWithAttributeBaseProps, type TApiaFieldWithAttributeProperties, type TApiaFileProperties, type TApiaForm, type TApiaFormProperties, type TApiaGridProperties, type TApiaGroupableFieldProperties, type TApiaHiddenProperties, type TApiaImageProperties, type TApiaInputProperties, type TApiaLabelProperties, type TApiaLinkProperties, type TApiaMultipleProperties, type TApiaPasswordProperties, type TApiaRadioProperties, type TApiaSelectProperties, type TApiaTextareaProperties, type TApiaTitleProperties, type TApiaTranslatableFieldProperties, type TApiaTreePossibleValue, type TApiaTreeProperties, type TApiaValuatedFieldProperties, type TConfirmDropModal, type TCusCmpStateRequest, type TCustomComponentDefaultResponse, type TCustomComponentDefinition, type TDocInfo, type TDocType, type TDocumentDownloadHistory, type TDocumentInformation, type TDocumentMetadata, type TDocumentPermission, type TDocumentVersion, type TExecutionConfig, type TFieldEvent, type TFieldScriptEvent, type TFieldScriptEventParameters, type TFieldScriptEvents, type TFieldServerEvent, type TFieldServerEvents, type TFileUploaded, type TFormEventName, type TFormScriptEvent, type TFormScriptEventParameters, type TFormScriptEvents, type TFrmParent, type TModalConfig, type TObservation, type TObservations, type TOnUploadProgress, type TOpenModal, type TProcessDroppedFiles, type TRequireOnlyOne, type TSaveDroppedFilesConf, type TSignaturesData, type TUploadModalOpener, type TUploaderFileInfo, type TUploaderLoadCurrentFunction, type TUploaderLoadCurrentFunctionMessages, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, UploaderModalController, type UploaderModalState, type UploaderState, deepEqual, get, getLabel, isHtmlResponse, isJsonResponse, isXmlResponse, makeApiaUrl, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
|
|
3005
3006
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,42 @@ import { Cell, TableController, Row, FocusControllerPlugin } from '@apia/table2'
|
|
|
7
7
|
import { makeApiaUrl as makeApiaUrl$1, ApiaApi } from '@apia/api';
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
|
|
10
|
+
const deepEqual = (a, b) => {
|
|
11
|
+
if (Object.is(a, b))
|
|
12
|
+
return true;
|
|
13
|
+
if (!Object.is(a, b) && typeof a !== typeof b) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
if (typeof a === "object") {
|
|
17
|
+
if (Array.isArray(a)) {
|
|
18
|
+
if (!Array.isArray(b) || a.length !== b.length) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
for (let i = 0; i < a.length; i++) {
|
|
22
|
+
if (!deepEqual(a[i], b[i])) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
} else if (a && b) {
|
|
28
|
+
for (const [key, value] of Object.entries(a)) {
|
|
29
|
+
if (!deepEqual(value, b[key])) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
for (const [key, value] of Object.entries(b)) {
|
|
34
|
+
if (!deepEqual(value, a[key])) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
} else if (a && !b || !a && b) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return a === b;
|
|
44
|
+
};
|
|
45
|
+
|
|
10
46
|
var __defProp$q = Object.defineProperty;
|
|
11
47
|
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
48
|
var __publicField$q = (obj, key, value) => {
|
|
@@ -4020,10 +4056,10 @@ class CustomComponent {
|
|
|
4020
4056
|
}
|
|
4021
4057
|
}
|
|
4022
4058
|
getStringValue(attName) {
|
|
4023
|
-
return this._state.attributes[attName]
|
|
4059
|
+
return this._state.attributes[attName]?.join();
|
|
4024
4060
|
}
|
|
4025
4061
|
getValue(attName, index = 0) {
|
|
4026
|
-
return this._state.attributes[attName][index];
|
|
4062
|
+
return this._state.attributes[attName]?.[index];
|
|
4027
4063
|
}
|
|
4028
4064
|
async setValue(attName, value, index) {
|
|
4029
4065
|
this._state.isLoading = true;
|
|
@@ -4086,7 +4122,7 @@ let Form$1 = class Form extends WithProperties {
|
|
|
4086
4122
|
super(props);
|
|
4087
4123
|
__publicField$b(this, "fields");
|
|
4088
4124
|
__publicField$b(this, "state", { isMarkedToSign: false });
|
|
4089
|
-
__publicField$b(this, "
|
|
4125
|
+
__publicField$b(this, "_customComponents", /* @__PURE__ */ new Map());
|
|
4090
4126
|
__publicField$b(this, "fieldsById", /* @__PURE__ */ new Map());
|
|
4091
4127
|
__publicField$b(this, "fieldsByName", /* @__PURE__ */ new Map());
|
|
4092
4128
|
__publicField$b(this, "fieldsByAttributeId", /* @__PURE__ */ new Map());
|
|
@@ -4098,7 +4134,9 @@ let Form$1 = class Form extends WithProperties {
|
|
|
4098
4134
|
__publicField$b(this, "cucCmpByAttName", /* @__PURE__ */ new Map());
|
|
4099
4135
|
__publicField$b(this, "mustRenderFields", []);
|
|
4100
4136
|
makeObservable(this, {
|
|
4101
|
-
state: observable
|
|
4137
|
+
state: observable,
|
|
4138
|
+
allFields: computed,
|
|
4139
|
+
customComponents: computed
|
|
4102
4140
|
});
|
|
4103
4141
|
this.definition = definition;
|
|
4104
4142
|
this.fields = arrayOrArray(definition.field).sort((a, b) => {
|
|
@@ -4114,18 +4152,18 @@ let Form$1 = class Form extends WithProperties {
|
|
|
4114
4152
|
});
|
|
4115
4153
|
this.state.isMarkedToSign = this.definition.markedToSign;
|
|
4116
4154
|
}
|
|
4155
|
+
get allFields() {
|
|
4156
|
+
return [...this.fieldsById.values()];
|
|
4157
|
+
}
|
|
4158
|
+
get customComponents() {
|
|
4159
|
+
return this._customComponents;
|
|
4160
|
+
}
|
|
4117
4161
|
closeForm() {
|
|
4118
4162
|
this.properties.prpFrmClosed = true;
|
|
4119
4163
|
}
|
|
4120
4164
|
openForm() {
|
|
4121
4165
|
this.properties.prpFrmClosed = false;
|
|
4122
4166
|
}
|
|
4123
|
-
getAllFields() {
|
|
4124
|
-
return [...this.fieldsById.values()];
|
|
4125
|
-
}
|
|
4126
|
-
getCustomComponents() {
|
|
4127
|
-
return [...this.customComponents.values()];
|
|
4128
|
-
}
|
|
4129
4167
|
getField(field, index) {
|
|
4130
4168
|
const found = this.getFieldById(field) || this.getFieldByName(field) || this.getFieldByAttributeId(field) || this.getFieldByAttributeName(field);
|
|
4131
4169
|
if (found) {
|
|
@@ -4188,7 +4226,7 @@ let Form$1 = class Form extends WithProperties {
|
|
|
4188
4226
|
return void 0;
|
|
4189
4227
|
}
|
|
4190
4228
|
getHiddenFields() {
|
|
4191
|
-
return this.
|
|
4229
|
+
return this.allFields.filter((c) => c.getProperty("visibilityHidden"));
|
|
4192
4230
|
}
|
|
4193
4231
|
async markFormToSign() {
|
|
4194
4232
|
void post(
|
|
@@ -4254,7 +4292,7 @@ let Form$1 = class Form extends WithProperties {
|
|
|
4254
4292
|
for await (const customComponent of cusFields) {
|
|
4255
4293
|
const cc = new CustomComponent(customComponent);
|
|
4256
4294
|
await cc.init(this);
|
|
4257
|
-
this.
|
|
4295
|
+
this._customComponents.set(customComponent.id, cc);
|
|
4258
4296
|
arrayOrArray(customComponent.state.state.attribute).forEach((a) => {
|
|
4259
4297
|
this.cucCmpByAttId.set(Number.parseInt(String(a.attId)), cc);
|
|
4260
4298
|
this.cucCmpByAttName.set(a.attName, cc);
|
|
@@ -4302,7 +4340,7 @@ let Form$1 = class Form extends WithProperties {
|
|
|
4302
4340
|
async validate() {
|
|
4303
4341
|
let isValid = true;
|
|
4304
4342
|
let firstInvalid = null;
|
|
4305
|
-
for await (const field of this.
|
|
4343
|
+
for await (const field of this.allFields) {
|
|
4306
4344
|
if (field instanceof Grid) {
|
|
4307
4345
|
const result = await field.validate();
|
|
4308
4346
|
if (result !== true && !firstInvalid) {
|
|
@@ -6178,7 +6216,7 @@ class AssistantController {
|
|
|
6178
6216
|
const formsMap = {};
|
|
6179
6217
|
const windowForms = Execution.instance.getAllForms();
|
|
6180
6218
|
windowForms.map((f) => {
|
|
6181
|
-
f.
|
|
6219
|
+
f.allFields.map((fi) => {
|
|
6182
6220
|
const actualFi = fi;
|
|
6183
6221
|
const actualName = actualFi?.getProperty("name") || actualFi.getProperty("ariaLabel") || actualFi.getProperty("title");
|
|
6184
6222
|
if (actualName) {
|
|
@@ -8359,5 +8397,5 @@ class StatusNotification extends Notification {
|
|
|
8359
8397
|
}
|
|
8360
8398
|
}
|
|
8361
8399
|
|
|
8362
|
-
export { ActionsController, AdditionalCell, ApiaAttribute, ApiaFieldWithAttribute, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field$1 as Field, FieldWithAttribute, File, FileUploaderField, FlowModal, Form$1 as Form, FormsUploader, Grid, GridCell, GridField, GridPaginated, HeaderCell, Hidden, HiddenField, IProperty, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, Multiple, MultipleField, Notifications, Password, PasswordField, Radio, RadioField, Select, SelectField, ShowConfirmMessage, ShowPathSelection, ShowPoolSelection, ShowSign, ShowSignSelection, StatefulEmitter, StatusNotification, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, UploaderModalController, get, getLabel, isHtmlResponse, isJsonResponse, isXmlResponse, makeApiaUrl, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
|
|
8400
|
+
export { ActionsController, AdditionalCell, ApiaAttribute, ApiaFieldWithAttribute, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field$1 as Field, FieldWithAttribute, File, FileUploaderField, FlowModal, Form$1 as Form, FormsUploader, Grid, GridCell, GridField, GridPaginated, HeaderCell, Hidden, HiddenField, IProperty, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, Multiple, MultipleField, Notifications, Password, PasswordField, Radio, RadioField, Select, SelectField, ShowConfirmMessage, ShowPathSelection, ShowPoolSelection, ShowSign, ShowSignSelection, StatefulEmitter, StatusNotification, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, UploaderModalController, deepEqual, get, getLabel, isHtmlResponse, isJsonResponse, isXmlResponse, makeApiaUrl, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
|
|
8363
8401
|
//# sourceMappingURL=index.js.map
|