@apia/execution 4.0.25 → 4.0.27

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 CHANGED
@@ -1,9 +1,10 @@
1
1
  import { AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  import { IStringifyOptions } from 'qs';
3
3
  import { TableController, Row, Cell, CellState } from '@apia/table2-controller';
4
- import { DeepReadonly, EventEmitter as EventEmitter$1, TApiaLoad, TApiaFunction, Mutex, TApiaLoadForm } from '@apia/util';
4
+ import { DeepReadonly, EventEmitter as EventEmitter$1, TApiaLoad, TApiaFunction, TApiaLoadForm, Mutex } from '@apia/util';
5
5
  import { MobXTree } from '@apia/tree2-controller';
6
- import { ButtonProps } from 'theme-ui';
6
+ import * as _apia_scheduler_controller from '@apia/scheduler-controller';
7
+ import { TScheduleResult, Scheduler } from '@apia/scheduler-controller';
7
8
 
8
9
  type TApiaButtonDefinition = TApiaFieldBaseDefinition<TApiaButtonProperties> & {
9
10
  fieldType: 'button';
@@ -320,6 +321,7 @@ type TApiaSchedulerProperties = TApiaFieldCommonProperties & TApiaValuatedFieldP
320
321
  };
321
322
  type TApiaLabelProperties = TApiaFieldCommonProperties & TApiaValuatedFieldProperties & TApiaGroupableFieldProperties & {
322
323
  underlined?: boolean;
324
+ value?: string;
323
325
  };
324
326
  type TApiaLinkProperties = TApiaFieldCommonProperties & TApiaValuatedFieldProperties & TApiaGroupableFieldProperties & {
325
327
  url?: string;
@@ -359,7 +361,9 @@ type TApiaTextareaProperties = TApiaFieldCommonProperties & TApiaTranslatableFie
359
361
  placeHolder?: string;
360
362
  title?: string;
361
363
  };
362
- type TApiaTitleProperties = TApiaFieldCommonProperties & TApiaValuatedFieldProperties & {};
364
+ type TApiaTitleProperties = TApiaFieldCommonProperties & TApiaValuatedFieldProperties & {
365
+ value?: string;
366
+ };
363
367
  type TApiaTreeProperties = TApiaFieldCommonProperties & TApiaFieldWithAttributeProperties & TApiaFieldSizableFieldProperties & {
364
368
  height?: string;
365
369
  leafIcon?: string;
@@ -371,6 +375,12 @@ type TApiaTreeProperties = TApiaFieldCommonProperties & TApiaFieldWithAttributeP
371
375
  autoFocus?: string;
372
376
  };
373
377
 
378
+ type TParseXmlBehavior = {
379
+ avoidTrimXml?: boolean;
380
+ avoidNormalize?: boolean;
381
+ };
382
+ declare const parseXml: <T = Record<string, unknown>>(xml: XMLDocument | string, behaveConfig?: TParseXmlBehavior) => T;
383
+
374
384
  interface TApiaMessage {
375
385
  label?: string;
376
386
  title: string;
@@ -396,9 +406,10 @@ interface IApiaApiRequestConfig {
396
406
  axiosConfig?: AxiosRequestConfig;
397
407
  stringifyOptions?: IStringifyOptions;
398
408
  }
399
- interface IApiaApiPostConfig<DataType> extends IApiaApiRequestConfig {
409
+ interface IApiaApiPostConfig<DataType> extends IApiaApiRequestConfig, TParseXmlBehavior {
400
410
  postData?: DataType;
401
411
  postDataTreatment?: 'stringify';
412
+ allowAfterFinish?: boolean;
402
413
  }
403
414
 
404
415
  type TFormEventName = 'onLoad' | 'onSubmit' | 'onReload' | 'onBeforePrint' | 'onAfterPrint';
@@ -468,6 +479,7 @@ type TCustomComponentDefinition = {
468
479
  label: string;
469
480
  properties: ComponentProperties;
470
481
  event: ComponentEvent[];
482
+ error_while_processing?: string;
471
483
  state: {
472
484
  state: TCusCmpStateRequest;
473
485
  };
@@ -579,6 +591,7 @@ declare class WithProperties<Props extends Record<string, any>> {
579
591
  properties: Props;
580
592
  private parentGrid;
581
593
  constructor(initialState?: Props);
594
+ getParentGrid(): Grid | null;
582
595
  getProperty<K extends keyof Props>(propName: K): Props[K];
583
596
  setProperty<K extends keyof Props>(propName: K, propValue: SetStateAction<Props[K]>): void;
584
597
  setParentGrid(grid: Grid): this;
@@ -618,6 +631,7 @@ type TCustomComponentState = {
618
631
  attributes: Record<string, any[]>;
619
632
  properties: Record<string, any>;
620
633
  additional: any;
634
+ component: any;
621
635
  };
622
636
  declare class CustomComponent {
623
637
  #private;
@@ -648,6 +662,7 @@ declare class CustomComponent {
648
662
  sendMessage<T extends Record<string, unknown> = Record<string, unknown>>(payload: any): Promise<(T & {
649
663
  success: boolean;
650
664
  }) | undefined>;
665
+ download(attName: string, index: number): Promise<void>;
651
666
  upload(attName: string, file: File, options?: {
652
667
  onUploadProgress?: (percent: number) => unknown;
653
668
  params?: Record<string, any>;
@@ -657,6 +672,7 @@ declare class CustomComponent {
657
672
  } & {
658
673
  success: boolean;
659
674
  }) | undefined>;
675
+ setState<K extends keyof TCustomComponentState>(prop: K, value: TCustomComponentState[K]): void;
660
676
  }
661
677
 
662
678
  declare class Form extends WithProperties<TApiaFormProperties> {
@@ -716,10 +732,10 @@ declare class Form extends WithProperties<TApiaFormProperties> {
716
732
  private cucCmpByAttId;
717
733
  private cucCmpByFldId;
718
734
  private cucCmpByAttName;
735
+ private mustRenderFields;
719
736
  getCustomComponentByFldId(fldId: number): CustomComponent | undefined;
720
737
  getCustomComponentByAttId(attId: number): CustomComponent | undefined;
721
738
  getCustomComponentByAttName(attName: string): CustomComponent | undefined;
722
- private mustRenderFields;
723
739
  addFieldToRender(fldId: string, fldIndex?: number): void;
724
740
  markFieldAsRendered(fldId: string, fldIndex?: number): void;
725
741
  init(): Promise<void>;
@@ -744,6 +760,7 @@ declare class Translation {
744
760
  cancelTranslation(): void;
745
761
  readTranslations(url: string): Promise<void>;
746
762
  reset(): void;
763
+ deleteTranslation(): void;
747
764
  setTempValue(str: string): void;
748
765
  submitTranslation(value: string, url: string): void;
749
766
  get langId(): string;
@@ -763,6 +780,7 @@ declare abstract class TranslatableField<FieldProps extends TApiaTranslatableFie
763
780
  private getLanguages;
764
781
  init(form: Form): Promise<void>;
765
782
  cancelTranslations(): void;
783
+ deleteTranslations(): void;
766
784
  changeLanguage(langId: string): Promise<void>;
767
785
  getTranslation(id: string): Translation | undefined;
768
786
  getCurrentTranslation(): Translation | undefined;
@@ -770,6 +788,12 @@ declare abstract class TranslatableField<FieldProps extends TApiaTranslatableFie
770
788
  submitTranslations(): void;
771
789
  syncTranslation(): Promise<void>;
772
790
  validate(): Promise<boolean>;
791
+ setValue(newValue: ValueType, options?: Partial<{
792
+ comparator: Comparator$1<any>;
793
+ format: 'd/m/Y' | 'apia';
794
+ markAsDirty: boolean;
795
+ synchronize: boolean;
796
+ }> | undefined): Promise<boolean>;
773
797
  }
774
798
 
775
799
  type FieldConstructor = new (definition: any) => Field<any, any, any> | FieldWithAttribute<any, any, any> | TranslatableField<any, any, any>;
@@ -808,9 +832,11 @@ declare class Notifications {
808
832
  closeTab(): void;
809
833
  getAll(): Notification<NotificationDefinition>[];
810
834
  getById(id: string | number): Notification<NotificationDefinition> | undefined;
835
+ kill(): void;
811
836
  remove(notification: string | number | Notification): void;
812
- on: <K extends "closeTab" | "notification">(event: K, cb: Callback<{
837
+ on: <K extends "closeTab" | "kill" | "notification">(event: K, cb: Callback<{
813
838
  closeTab: null;
839
+ kill: null;
814
840
  notification: Notification;
815
841
  }, K>) => UnSubscriber;
816
842
  }
@@ -1005,7 +1031,7 @@ declare class UploaderApi extends EventEmitter$1<{
1005
1031
  docId: string;
1006
1032
  docTypeId: number | string;
1007
1033
  }>, additionalProps?: Record<string, unknown>): Promise<void>;
1008
- saveDroppedFiles(unprocessedFiles: File[], conf?: TSaveDroppedFilesConf): Promise<void>;
1034
+ saveDroppedFiles(unprocessedFiles: File[], conf?: TSaveDroppedFilesConf): Promise<boolean>;
1009
1035
  checkWebDavLock(docId: string): Promise<unknown>;
1010
1036
  checkSignature(file: TUploaderFileInfo): Promise<TApiaApiAxiosResponse<({
1011
1037
  markedToSign: boolean;
@@ -1020,7 +1046,7 @@ declare class UploaderApi extends EventEmitter$1<{
1020
1046
  }): Promise<void>;
1021
1047
  versionFileInfo(file: TUploaderFileInfo): Promise<void>;
1022
1048
  pickFileById(id: string): Promise<void>;
1023
- markFileToSign(id: string, langId?: number): Promise<void>;
1049
+ markFileToSign(id: string, langId?: string): Promise<void>;
1024
1050
  /**
1025
1051
  * Por el momento realiza la descarga de todos los archivos
1026
1052
  * que estén subidos.
@@ -1105,6 +1131,7 @@ declare class UploaderModalController {
1105
1131
  addFiles(files: File[]): void;
1106
1132
  addDirectoryFile(file: TApiaDocumentDefinition): void;
1107
1133
  changeDocType(docTypeId: string): Promise<void>;
1134
+ clearDirectoryFile(): void;
1108
1135
  clearFile(name: string): void;
1109
1136
  clearFiles(): void;
1110
1137
  clearState(): void;
@@ -1131,6 +1158,7 @@ type UploaderModalState = {
1131
1158
  docFolder?: number;
1132
1159
  docExpDate?: string;
1133
1160
  description: string;
1161
+ isReadonly?: boolean;
1134
1162
  permissions: {
1135
1163
  allowAllType: 'M' | 'R' | '';
1136
1164
  users: IUsersPermissions[];
@@ -1476,7 +1504,7 @@ declare class FormsUploader extends UploaderApi {
1476
1504
  downloadDocument(fileId: string): Promise<void>;
1477
1505
  loadCurrentDocuments(): Promise<void>;
1478
1506
  parseFileDefinition: (file: TFileUploaded) => TUploaderFileInfo;
1479
- saveDroppedFiles(unprocessedFiles: File[], conf?: TSaveDroppedFilesConf | undefined): Promise<void>;
1507
+ saveDroppedFiles(unprocessedFiles: File[], conf?: TSaveDroppedFilesConf | undefined): Promise<boolean>;
1480
1508
  }
1481
1509
 
1482
1510
  declare class Process {
@@ -1663,6 +1691,14 @@ declare abstract class FlowModal<T extends {
1663
1691
  abstract confirm(result: T): Promise<Status | FlowModal<any>>;
1664
1692
  }
1665
1693
 
1694
+ declare enum ExecutionState {
1695
+ RUNNING = 0,
1696
+ LOADING = 1,
1697
+ FINISHED = 2,
1698
+ RENDERING = 3,
1699
+ CONFIRMING = 4,
1700
+ FINISHED_WITH_ERROR = 5
1701
+ }
1666
1702
  type TOnClose = 'clearEvalPath' | 'confirmOkOnClose' | 'confirmOkOnCloseSplash' | 'confirmOkOnSaveSplash' | 'releaseOkOnClose' | null;
1667
1703
  type TErrMessage = {
1668
1704
  message: {
@@ -1697,13 +1733,123 @@ type TFetchTaskActionResponse = {
1697
1733
  };
1698
1734
  };
1699
1735
 
1700
- declare enum ExecutionState {
1701
- RUNNING = 0,
1702
- LOADING = 1,
1703
- FINISHED = 2,
1704
- RENDERING = 3,
1705
- CONFIRMING = 4
1736
+ type TCheckWizardResponse = {
1737
+ url: string;
1738
+ };
1739
+ type TFetchConfirmPathResponse = {
1740
+ onClose?: string;
1741
+ sysMessages?: {
1742
+ message?: {
1743
+ text: string;
1744
+ };
1745
+ };
1746
+ pathSelection?: boolean | null;
1747
+ groupSelection?: boolean | null;
1748
+ load?: TApiaLoadForm & {
1749
+ type: 'form' | 'text' | 'table' | 'function';
1750
+ canClose: boolean;
1751
+ text?: {
1752
+ closeAll: string;
1753
+ title: string;
1754
+ addClass: string;
1755
+ label: string;
1756
+ content?: string;
1757
+ };
1758
+ };
1759
+ actions?: {
1760
+ action: {
1761
+ toDo: 'functionTimedCall';
1762
+ param: [number, string];
1763
+ };
1764
+ };
1765
+ };
1766
+ type TItemTreeObj = {
1767
+ id: string;
1768
+ name: string;
1769
+ level: number;
1770
+ value: boolean;
1771
+ type: TPathType;
1772
+ isOn: boolean;
1773
+ };
1774
+ type TPathType = 'OR' | 'XOR' | 'AND';
1775
+
1776
+ declare class ShowPathSelection extends FlowModal<{
1777
+ confirmed: boolean;
1778
+ path: string;
1779
+ }> {
1780
+ fetchResult: TApiaLoadForm['form'];
1781
+ confirm: (result: {
1782
+ confirmed: boolean;
1783
+ path: string;
1784
+ }) => Promise<Status | FlowModal<any>>;
1785
+ state: {
1786
+ disabledParents: TItemTreeObj | TItemTreeObj[] | null;
1787
+ groupSelectionObj: TFetchConfirmPathResponse | null;
1788
+ };
1789
+ constructor(fetchResult: TApiaLoadForm['form'], confirm: (result: {
1790
+ confirmed: boolean;
1791
+ path: string;
1792
+ }) => Promise<Status | FlowModal<any>>);
1793
+ setDisabledParent(treeItem: TItemTreeObj): void;
1794
+ clearPaths(): void;
1795
+ showGroupsSelection(fetchConfirmPathResponse: TFetchConfirmPathResponse): void;
1796
+ updateDisabledList(itemObj: TItemTreeObj, itemArr: TItemTreeObj[]): TItemTreeObj[];
1797
+ }
1798
+
1799
+ declare class ShowPoolSelection extends FlowModal<{
1800
+ confirmed: boolean;
1801
+ group: string;
1802
+ }> {
1803
+ fetchResult: TApiaLoadForm['form'];
1804
+ confirm: (result: {
1805
+ confirmed: boolean;
1806
+ group: string;
1807
+ }) => Promise<Status>;
1808
+ constructor(fetchResult: TApiaLoadForm['form'], confirm: (result: {
1809
+ confirmed: boolean;
1810
+ group: string;
1811
+ }) => Promise<Status>);
1812
+ }
1813
+
1814
+ declare class ShowSignSelection extends FlowModal<{
1815
+ confirmed: boolean;
1816
+ signed: boolean;
1817
+ }> {
1818
+ fetchResult: any;
1819
+ confirm: (result: {
1820
+ confirmed: boolean;
1821
+ signed: boolean;
1822
+ }) => Promise<Status>;
1823
+ constructor(fetchResult: any, confirm: (result: {
1824
+ confirmed: boolean;
1825
+ signed: boolean;
1826
+ }) => Promise<Status>);
1706
1827
  }
1828
+
1829
+ declare class ShowConfirmMessage extends FlowModal<{
1830
+ confirmed: boolean;
1831
+ }> {
1832
+ fetchResult: any;
1833
+ confirm: (result: {
1834
+ confirmed: boolean;
1835
+ }) => Promise<Status>;
1836
+ constructor(fetchResult: any, confirm: (result: {
1837
+ confirmed: boolean;
1838
+ }) => Promise<Status>);
1839
+ }
1840
+
1841
+ declare class ShowSign extends FlowModal<{
1842
+ confirmed: boolean;
1843
+ }> {
1844
+ fetchResult: any;
1845
+ confirm: (result: {
1846
+ confirmed: boolean;
1847
+ }) => Promise<Status>;
1848
+ constructor(fetchResult: any, confirm: (result: {
1849
+ confirmed: boolean;
1850
+ }) => Promise<Status>);
1851
+ }
1852
+
1707
1853
  type TExecutionConfig = {
1708
1854
  canConfirm: boolean;
1709
1855
  canGoBack: boolean;
@@ -1720,6 +1866,10 @@ type TExecutionEnvironment = {
1720
1866
  window: Window;
1721
1867
  document: Document;
1722
1868
  headers: any;
1869
+ properties?: {
1870
+ taskName: string;
1871
+ processName: string;
1872
+ };
1723
1873
  };
1724
1874
  declare class Execution extends EventEmitter$1<{
1725
1875
  confirm: null;
@@ -1736,6 +1886,7 @@ declare class Execution extends EventEmitter$1<{
1736
1886
  private _currentStep;
1737
1887
  private _stepCount;
1738
1888
  readonly notifications: Notifications;
1889
+ private lastModalReturn;
1739
1890
  constructor(environment: TExecutionEnvironment);
1740
1891
  protected formsById: {
1741
1892
  E: Map<string, Form>;
@@ -1779,9 +1930,12 @@ declare class Execution extends EventEmitter$1<{
1779
1930
  doBack(): Promise<false | undefined>;
1780
1931
  doConfirm(status?: Status): Promise<boolean | FlowModal<any> | Field>;
1781
1932
  doFree(): Promise<TApiaApiAxiosResponse<(TFetchTaskActionResponse & ResponseSysMessages) | null> | null>;
1782
- doNext(): Promise<boolean | Field<TApiaFieldCommonProperties, TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, {
1933
+ doNext(result?: {
1934
+ confirmed: boolean;
1935
+ signed: boolean;
1936
+ }): Promise<boolean | Field<TApiaFieldCommonProperties, TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, {
1783
1937
  definition: Omit<TApiaFieldBaseDefinition<TApiaFieldCommonProperties>, "properties">;
1784
- }> | undefined>;
1938
+ }> | ShowSignSelection | undefined>;
1785
1939
  doPrint(): Promise<void>;
1786
1940
  doSave(): Promise<TApiaApiAxiosResponse<(TFetchTaskActionResponse & ResponseSysMessages) | null> | undefined>;
1787
1941
  getStepTitle(step: number): {
@@ -1789,9 +1943,15 @@ declare class Execution extends EventEmitter$1<{
1789
1943
  stepNumber: number;
1790
1944
  status: "completed" | "pending" | "current";
1791
1945
  } | undefined;
1946
+ /**
1947
+ * Ends the current session
1948
+ */
1949
+ kill(): void;
1792
1950
  viewDocs(): Promise<(Record<string, unknown> & ResponseSysMessages) | undefined>;
1793
1951
  setStepTitle(stepNumber: number, stepTitle: string): void;
1794
1952
  validate(): Promise<true | Field>;
1953
+ setLastModalReturn(value: string[]): void;
1954
+ getLastModalReturn(): string[];
1795
1955
  private fireEvents;
1796
1956
  }
1797
1957
 
@@ -1808,7 +1968,7 @@ declare function isXmlResponse(response: AxiosResponse<unknown>): RegExpMatchArr
1808
1968
  declare function isHtmlResponse(response: AxiosResponse<unknown>): RegExpMatchArray | null;
1809
1969
  declare class InvalidSessionException extends Error {
1810
1970
  }
1811
- declare const parseSuccessfulResponse: <LoadType extends Record<string, unknown>>(execution: Execution, response: AxiosResponse<string>) => Promise<(ResponseSysMessages & LoadType & {
1971
+ declare const parseSuccessfulResponse: <LoadType extends Record<string, unknown>, DataType = unknown>(execution: Execution, response: AxiosResponse<string>, behaveConfig?: IApiaApiPostConfig<DataType>) => Promise<(ResponseSysMessages & LoadType & {
1812
1972
  onClose?: string;
1813
1973
  code?: unknown;
1814
1974
  load?: LoadType | undefined;
@@ -2024,7 +2184,7 @@ interface IButton {
2024
2184
  action: Promise<() => unknown> | string;
2025
2185
  id: TActionButtons;
2026
2186
  }
2027
- type TActionButtons = 'VIEW_DOCS' | 'CLOSE' | 'DELEGATE' | 'CLOSE' | 'CONFIRM' | 'NEXT' | 'PRINT' | 'PREVIOUS' | 'RELEASE' | 'SAVE' | 'SIGN' | 'SHARE';
2187
+ type TActionButtons = 'sbtEjeDoc' | 'btnClose' | 'lblExeDelegar' | 'btnCon' | 'btnSig' | 'btnStaPri' | 'btnAnt' | 'btnEjeLib' | 'btnGua' | 'SIGN' | 'lblShareMsg';
2028
2188
  type TApiaFieldType = 'area' | 'button' | 'captcha' | 'check' | 'editor' | 'file' | 'grid' | 'hidden' | 'href' | 'image' | 'input' | 'label' | 'multiple' | 'password' | 'radio' | 'select' | 'title' | 'tree' | 'form';
2029
2189
  type PossibleValue = {
2030
2190
  value: string | number;
@@ -2079,7 +2239,7 @@ declare class ApiaFunctions implements IApiaFunctions {
2079
2239
  getAllForms(): IApiaForm[];
2080
2240
  getAllFormsByType(type: 'P' | 'E'): IApiaForm[];
2081
2241
  getAttField(attType: 'P' | 'E', attId: string): IApiaField | IApiaField[] | undefined;
2082
- getButtonAction(id: number | string): TActionButtons;
2242
+ getButtonAction(id: number | string): "sbtEjeDoc" | "btnClose" | "lblExeDelegar" | "btnCon" | "btnSig" | "btnStaPri" | "btnAnt" | "btnEjeLib" | "btnGua" | "lblShareMsg";
2083
2243
  getCurrentLanguageCode(): string | null;
2084
2244
  getCurrentProcessName(): string | null;
2085
2245
  getCurrentStep(): number | null;
@@ -2124,7 +2284,7 @@ declare class ActionsController {
2124
2284
 
2125
2285
  declare class ApiaForm implements IApiaForm {
2126
2286
  #private;
2127
- execution: Execution;
2287
+ private execution;
2128
2288
  constructor(execution: Execution, form: Form);
2129
2289
  getFrmParent(): string;
2130
2290
  getFrmId(): string | null;
@@ -2156,20 +2316,20 @@ declare abstract class ApiaField<Props extends TApiaFieldCommonProperties = TApi
2156
2316
  isInGrid(): boolean;
2157
2317
  }
2158
2318
 
2319
+ interface TTextFieldProperties extends TApiaFieldCommonProperties {
2320
+ value?: string;
2321
+ }
2159
2322
  interface IButtonField extends IApiaField {
2160
2323
  fireClickEvent(): void;
2161
2324
  getValue(): string | null;
2162
2325
  }
2163
- declare class ButtonField extends ApiaField implements IButtonField {
2326
+ declare class ButtonField extends ApiaField<TTextFieldProperties> implements IButtonField {
2164
2327
  #private;
2165
2328
  constructor(execution: Execution, field: Button);
2166
2329
  fireClickEvent(): void;
2167
2330
  getValue(): string | null;
2168
2331
  clearValue(): void;
2169
- }
2170
-
2171
- type TEditorField = IApiaField;
2172
- declare class EditorField extends ApiaField implements TEditorField {
2332
+ setValue(value: string): void;
2173
2333
  }
2174
2334
 
2175
2335
  declare class ApiaAttribute {
@@ -2192,6 +2352,10 @@ declare class ApiaFieldWithAttribute<T = string | boolean> extends ApiaField {
2192
2352
  getProperty<K extends keyof TApiaFieldWithAttributeProperties>(name: K): TApiaFieldWithAttributeProperties[K];
2193
2353
  }
2194
2354
 
2355
+ type TEditorField = IApiaField;
2356
+ declare class EditorField extends ApiaFieldWithAttribute implements TEditorField {
2357
+ }
2358
+
2195
2359
  type TOptionsMap$2 = Map<string, PossibleValue>;
2196
2360
  type TOptionsAsArray = PossibleValue[];
2197
2361
  declare class SelectField extends ApiaFieldWithAttribute<string | number | (string | number)[]> {
@@ -2283,10 +2447,11 @@ declare class LinkField extends ApiaField implements ILinkField {
2283
2447
  interface ITextField extends IApiaField {
2284
2448
  getLabel(): void;
2285
2449
  }
2286
- declare class TextField extends ApiaField implements ITextField {
2450
+ declare class TextField extends ApiaField<TTextFieldProperties> implements ITextField {
2287
2451
  #private;
2288
2452
  constructor(execution: Execution, field: Field);
2289
2453
  getLabel(): void;
2454
+ setValue(value: string): void;
2290
2455
  }
2291
2456
 
2292
2457
  declare class GridField extends ApiaField<TApiaGridProperties> {
@@ -2421,7 +2586,7 @@ declare class Editor extends TranslatableField<TApiaEditorProperties, string> {
2421
2586
  protected isValidValue(): boolean;
2422
2587
  }
2423
2588
 
2424
- declare class File$1 extends TranslatableField<TApiaFileProperties> {
2589
+ declare class File$1 extends FieldWithAttribute<TApiaFileProperties> {
2425
2590
  uploader: FormsUploader;
2426
2591
  init(form: Form): Promise<void>;
2427
2592
  validate(): Promise<boolean>;
@@ -2699,12 +2864,14 @@ type ModalInputValue = {
2699
2864
  storeValue?: string;
2700
2865
  };
2701
2866
  declare class ModalInput extends FieldWithAttribute<TApiaInputProperties, ModalInputValue> {
2867
+ isLoading: boolean;
2702
2868
  constructor({ value, ...definition }: TApiaModalInputDefinition);
2703
2869
  fireEvent(eventName: InputEvents): Promise<boolean>;
2704
2870
  protected hasValue(): boolean;
2705
2871
  setValueFromInputWrite(value: string): Promise<void>;
2706
2872
  setValueFromModalSelection(rowId: string): Promise<void>;
2707
2873
  validate(): Promise<boolean>;
2874
+ setValue(newValue: any, options?: SetValueOptions): Promise<boolean>;
2708
2875
  protected getSynchronizePostConfiguration(value: ModalInputValue): IApiaApiPostConfig<any>;
2709
2876
  }
2710
2877
 
@@ -2763,100 +2930,11 @@ declare class Tree extends FieldWithAttribute<TApiaTreeProperties, TTreeValue[],
2763
2930
  }> | undefined): Promise<boolean>;
2764
2931
  }
2765
2932
 
2766
- type TSchedulerState = {
2767
- data?: TScheduleResult;
2768
- initialProps: IScheduleInitialProps;
2769
- url?: string;
2770
- selectedCell?: string | null;
2771
- focusStage?: string;
2772
- stageList?: string[];
2773
- selectedDay?: ISelectedDay;
2774
- stageData: IStage[];
2775
- isStageMounted: Record<string, boolean>;
2776
- validation: FieldValidationState;
2777
- isLoading?: 'NotLoading' | 'Today' | 'LastWeek' | 'DateInput' | 'NextWeek' | 'DeleteWeek';
2778
- };
2779
- type TSelectedDateResponse = {
2780
- success: boolean;
2781
- };
2782
- type TTskSchHour = {
2783
- hour: string;
2784
- disabled: boolean;
2785
- value: string;
2786
- };
2787
- type TTskSchDay = {
2788
- type: string;
2789
- day: string;
2790
- tskSchHour?: TTskSchHour | TTskSchHour[];
2791
- isDisabled?: boolean;
2792
- };
2793
- type TScheduleResult = {
2794
- calId: string;
2795
- mode: string;
2796
- overassign: string;
2797
- weekNotConfigured: boolean;
2798
- frec: string;
2799
- tskSchId: string;
2800
- mondayWeek: string;
2801
- success: boolean;
2802
- tskSchDay: TTskSchDay | TTskSchDay[];
2803
- };
2804
- interface IScheduleInitialProps {
2805
- schId: string;
2806
- proId: string;
2807
- proVerId: string;
2808
- tskId: string;
2809
- showDisponibility: string;
2810
- showAttributes: string;
2811
- }
2812
- interface ILabelSelectedDay {
2813
- hour: string;
2814
- day?: string | undefined;
2815
- }
2816
- interface ISelectedDay {
2817
- hour?: string;
2818
- day?: string;
2819
- mondayWeek?: string;
2820
- dayNumber?: number;
2821
- morningOrAfternoonSelected?: number | null;
2822
- }
2823
- interface IStage {
2824
- name: string;
2825
- buttons?: IStageButton[];
2826
- }
2827
- interface IStageButton extends ButtonProps {
2828
- label: string;
2829
- title: string;
2830
- action: () => unknown;
2831
- isDisabled?: boolean;
2832
- value?: string;
2833
- isSelectedSelector: () => boolean;
2834
- }
2835
- type TSchInfoResult = {
2836
- pro_instances: {
2837
- pro_instance: TProcesses;
2838
- };
2839
- };
2840
- type TProcesses = {
2841
- id: number;
2842
- attributes: {
2843
- attribute: {
2844
- title: string;
2845
- value: string;
2846
- }[];
2847
- };
2848
- }[];
2849
-
2850
- declare function getCurrentDate(): string;
2851
- interface ISchedulerStore {
2852
- }
2853
- declare class Scheduler extends Field<TApiaSchedulerProperties> {
2854
- state: TSchedulerState;
2855
- private inited;
2856
- protected readonly tableController: TableController;
2933
+ declare class SchedulerField extends Field<TApiaSchedulerProperties> {
2934
+ private _schedController;
2857
2935
  constructor(definition: TApiaFieldBaseDefinition<TApiaSchedulerProperties>);
2858
- get controller(): TableController;
2859
- get initialProperties(): {
2936
+ deleteDate(): Promise<boolean>;
2937
+ get parsedInitialProperties(): {
2860
2938
  schId: string;
2861
2939
  proId: string;
2862
2940
  proVerId: string;
@@ -2865,24 +2943,10 @@ declare class Scheduler extends Field<TApiaSchedulerProperties> {
2865
2943
  showAttributes: string;
2866
2944
  };
2867
2945
  init(form: Form): Promise<void>;
2868
- loadWeek(weekDay?: string): Promise<void>;
2869
- private parseRows;
2870
- private isMorningTime;
2871
- setState(newState: Partial<TSchedulerState>): void;
2872
- setDay(day: ISelectedDay): void;
2873
- setStage({ index, newStage }: {
2874
- index: number;
2875
- newStage: IStage;
2876
- }): void;
2877
- syncStage(day: TTskSchDay, hour: number): void;
2878
- makeDaysStage(data?: TScheduleResult): void;
2879
- private makeMorningOrAfternoonStage;
2880
- private makeHoursStage;
2881
- deleteDate(): Promise<void>;
2882
- goNextWeek(): Promise<void>;
2883
- goPreviousWeek(): Promise<void>;
2884
- parsedDateLabel: () => string;
2885
- getSchedulerColumns(data: TScheduleResult | null): CellState[];
2946
+ loadWeek(weekDay: string, schId: string, proId: string, proVerId: string, tskId: string): Promise<(TScheduleResult & ResponseSysMessages) | null>;
2947
+ loadInfo(schId: string, weekDay: string, dayNumber: number, hour: string): Promise<_apia_scheduler_controller.TProcesses>;
2948
+ markDay(weekDay: string, hour: string, dayNumber: number): Promise<void>;
2949
+ get schedController(): Scheduler;
2886
2950
  }
2887
2951
 
2888
2952
  declare const IProperty: {
@@ -3187,126 +3251,7 @@ declare function getLabel(execution: Execution, label: string, replacers?: Parti
3187
3251
  tooltip: string;
3188
3252
  };
3189
3253
 
3190
- declare const parseXml: <T = Record<string, unknown>>(xml: XMLDocument | string) => T;
3191
-
3192
3254
  declare function parseFakeJSON<T extends Record<string, unknown>>(str: string): T;
3193
3255
 
3194
- type TCheckWizardResponse = {
3195
- url: string;
3196
- };
3197
- type TFetchConfirmPathResponse = {
3198
- onClose?: string;
3199
- sysMessages?: {
3200
- message?: {
3201
- text: string;
3202
- };
3203
- };
3204
- pathSelection?: boolean | null;
3205
- groupSelection?: boolean | null;
3206
- load?: TApiaLoadForm & {
3207
- type: 'form' | 'text' | 'table' | 'function';
3208
- canClose: boolean;
3209
- text?: {
3210
- closeAll: string;
3211
- title: string;
3212
- addClass: string;
3213
- label: string;
3214
- content?: string;
3215
- };
3216
- };
3217
- actions?: {
3218
- action: {
3219
- toDo: 'functionTimedCall';
3220
- param: [number, string];
3221
- };
3222
- };
3223
- };
3224
- type TItemTreeObj = {
3225
- id: string;
3226
- name: string;
3227
- level: number;
3228
- value: boolean;
3229
- type: TPathType;
3230
- isOn: boolean;
3231
- };
3232
- type TPathType = 'OR' | 'XOR' | 'AND';
3233
-
3234
- declare class ShowPathSelection extends FlowModal<{
3235
- confirmed: boolean;
3236
- path: string;
3237
- }> {
3238
- fetchResult: TApiaLoadForm['form'];
3239
- confirm: (result: {
3240
- confirmed: boolean;
3241
- path: string;
3242
- }) => Promise<Status | FlowModal<any>>;
3243
- state: {
3244
- disabledParents: TItemTreeObj | TItemTreeObj[] | null;
3245
- groupSelectionObj: TFetchConfirmPathResponse | null;
3246
- };
3247
- constructor(fetchResult: TApiaLoadForm['form'], confirm: (result: {
3248
- confirmed: boolean;
3249
- path: string;
3250
- }) => Promise<Status | FlowModal<any>>);
3251
- setDisabledParent(treeItem: TItemTreeObj): void;
3252
- clearPaths(): void;
3253
- showGroupsSelection(fetchConfirmPathResponse: TFetchConfirmPathResponse): void;
3254
- updateDisabledList(itemObj: TItemTreeObj, itemArr: TItemTreeObj[]): TItemTreeObj[];
3255
- }
3256
-
3257
- declare class ShowPoolSelection extends FlowModal<{
3258
- confirmed: boolean;
3259
- group: string;
3260
- }> {
3261
- fetchResult: TApiaLoadForm['form'];
3262
- confirm: (result: {
3263
- confirmed: boolean;
3264
- group: string;
3265
- }) => Promise<Status>;
3266
- constructor(fetchResult: TApiaLoadForm['form'], confirm: (result: {
3267
- confirmed: boolean;
3268
- group: string;
3269
- }) => Promise<Status>);
3270
- }
3271
-
3272
- declare class ShowSignSelection extends FlowModal<{
3273
- confirmed: boolean;
3274
- signed: boolean;
3275
- }> {
3276
- fetchResult: any;
3277
- confirm: (result: {
3278
- confirmed: boolean;
3279
- signed: boolean;
3280
- }) => Promise<Status>;
3281
- constructor(fetchResult: any, confirm: (result: {
3282
- confirmed: boolean;
3283
- signed: boolean;
3284
- }) => Promise<Status>);
3285
- }
3286
-
3287
- declare class ShowConfirmMessage extends FlowModal<{
3288
- confirmed: boolean;
3289
- }> {
3290
- fetchResult: any;
3291
- confirm: (result: {
3292
- confirmed: boolean;
3293
- }) => Promise<Status>;
3294
- constructor(fetchResult: any, confirm: (result: {
3295
- confirmed: boolean;
3296
- }) => Promise<Status>);
3297
- }
3298
-
3299
- declare class ShowSign extends FlowModal<{
3300
- confirmed: boolean;
3301
- }> {
3302
- fetchResult: any;
3303
- confirm: (result: {
3304
- confirmed: boolean;
3305
- }) => Promise<Status>;
3306
- constructor(fetchResult: any, confirm: (result: {
3307
- confirmed: boolean;
3308
- }) => Promise<Status>);
3309
- }
3310
-
3311
- export { ActionsController, AdditionalCell, ApiaAttribute, ApiaField, ApiaFieldWithAttribute, ApiaForm, 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 ILabelSelectedDay, type IPoolsPermissions, IProperty, type IScheduleInitialProps, type ISchedulerStore, type ISelectedDay, type ISignatureData, type IStage, type IStageButton, type IUsersPermissions, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, ModalInputField, Multiple, MultipleField, Notifications, Password, PasswordField, type PossibleValue, Radio, RadioField, type RadioPossibleValue, Scheduler, 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 TApiaSchedulerProperties, type TApiaSelectProperties, type TApiaTextareaProperties, type TApiaTitleProperties, type TApiaTranslatableFieldProperties, type TApiaTreePossibleValue, type TApiaTreeProperties, type TApiaValuatedFieldProperties, type TCheckWizardResponse, 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 TFetchConfirmPathResponse, 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 TItemTreeObj, type TModalConfig, type TObservation, type TObservations, type TOnUploadProgress, type TPathType, type TProcessDroppedFiles, type TProcesses, type TRequireOnlyOne, type TSaveDroppedFilesConf, type TSchInfoResult, type TScheduleResult, type TSchedulerState, type TSelectedDateResponse, type TSignaturesData, type TTskSchDay, type TTskSchHour, type TUploadModalOpener, type TUploaderFileInfo, type TUploaderLoadCurrentFunction, type TUploaderLoadCurrentFunctionMessages, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, UploaderModalController, type UploaderModalState, type UploaderState, createNewField, deepEqual, get, getCurrentDate, getLabel, isHtmlResponse, isJsonResponse, isOneClickUploadEnabled, isXmlResponse, makeApiaUrl, parseFakeJSON, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
3256
+ export { ActionsController, AdditionalCell, ApiaAttribute, ApiaField, ApiaFieldWithAttribute, ApiaForm, 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, ModalInputField, Multiple, MultipleField, Notifications, Password, PasswordField, type PossibleValue, Radio, RadioField, type RadioPossibleValue, SchedulerField, 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 TApiaSchedulerProperties, type TApiaSelectProperties, type TApiaTextareaProperties, type TApiaTitleProperties, type TApiaTranslatableFieldProperties, type TApiaTreePossibleValue, type TApiaTreeProperties, type TApiaValuatedFieldProperties, type TCheckWizardResponse, 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 TFetchConfirmPathResponse, 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 TItemTreeObj, type TModalConfig, type TObservation, type TObservations, type TOnUploadProgress, type TPathType, 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, createNewField, deepEqual, get, getLabel, isHtmlResponse, isJsonResponse, isOneClickUploadEnabled, isXmlResponse, makeApiaUrl, parseFakeJSON, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
3312
3257
  //# sourceMappingURL=index.d.ts.map