ngx-t-forms-types 0.0.27 → 0.0.29

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.
@@ -32,6 +32,7 @@ export const DefaultInputConfig = {
32
32
  AllFormInputPrimaryKeys.Validators,
33
33
  AllFormInputPrimaryKeys.HintLabel,
34
34
  AllFormInputPrimaryKeys.MatOptions,
35
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
35
36
  ],
36
37
  elementTemplate: {
37
38
  element: ElementTypes.Input,
@@ -60,6 +61,7 @@ export const DefaultInputConfig = {
60
61
  AllFormInputPrimaryKeys.Appearance,
61
62
  AllFormInputPrimaryKeys.FormControlName,
62
63
  AllFormInputPrimaryKeys.Validators, // Assuming Validators is also needed here
64
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
63
65
  ],
64
66
  elementTemplate: {
65
67
  element: ElementTypes.Location,
@@ -94,6 +96,7 @@ export const DefaultInputConfig = {
94
96
  AllFormInputPrimaryKeys.Type,
95
97
  AllFormInputPrimaryKeys.Value,
96
98
  AllFormInputPrimaryKeys.MatOptions,
99
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
97
100
  ],
98
101
  elementTemplate: {
99
102
  element: ElementTypes.AutoCompleteInput,
@@ -130,6 +133,7 @@ export const DefaultInputConfig = {
130
133
  AllFormInputPrimaryKeys.HintLabel,
131
134
  AllFormInputPrimaryKeys.TrueLabel,
132
135
  AllFormInputPrimaryKeys.FalseLabel,
136
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
133
137
  ],
134
138
  elementTemplate: {
135
139
  element: ElementTypes.Toggle,
@@ -176,6 +180,7 @@ export const DefaultInputConfig = {
176
180
  SpecialElementKeys.MatOptionsApiCall,
177
181
  AllFormInputPrimaryKeys.OptionSelectType,
178
182
  AllFormInputPrimaryKeys.AllowMultipleSelection,
183
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
179
184
  ],
180
185
  elementTemplate: {
181
186
  element: ElementTypes.Select,
@@ -219,7 +224,8 @@ export const DefaultInputConfig = {
219
224
  AllFormInputPrimaryKeys.DataType,
220
225
  SpecialElementKeys.MatOptionsApiCall,
221
226
  AllFormInputPrimaryKeys.AllowMultipleSelection,
222
- AllFormInputPrimaryKeys.PaginationSelectionConfig
227
+ AllFormInputPrimaryKeys.PaginationSelectionConfig,
228
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
223
229
  ],
224
230
  elementTemplate: {
225
231
  element: ElementTypes.PaginatedSelectionTable,
@@ -253,6 +259,7 @@ export const DefaultInputConfig = {
253
259
  AllFormInputPrimaryKeys.ColSize,
254
260
  AllFormInputPrimaryKeys.Value,
255
261
  AllFormInputPrimaryKeys.HintLabel,
262
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
256
263
  ],
257
264
  elementTemplate: {
258
265
  element: ElementTypes.IconSelect,
@@ -296,6 +303,7 @@ export const DefaultInputConfig = {
296
303
  FormInputKeys.Autocomplete,
297
304
  FormInputKeys.Placeholder,
298
305
  AllFormInputPrimaryKeys.Wrap,
306
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
299
307
  ],
300
308
  elementTemplate: {
301
309
  element: ElementTypes.Textarea,
@@ -341,6 +349,7 @@ export const DefaultInputConfig = {
341
349
  FormInputKeys.PrefixIcon,
342
350
  FormInputKeys.PrefixText,
343
351
  FormInputKeys.SuffixText,
352
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
344
353
  ],
345
354
  elementTemplate: {
346
355
  element: ElementTypes.DatePicker,
@@ -384,6 +393,7 @@ export const DefaultInputConfig = {
384
393
  FormInputKeys.PrefixIcon,
385
394
  FormInputKeys.PrefixText,
386
395
  FormInputKeys.SuffixText,
396
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
387
397
  ],
388
398
  elementTemplate: {
389
399
  element: ElementTypes.DateRangePicker,
@@ -425,6 +435,7 @@ export const DefaultInputConfig = {
425
435
  AllFormInputPrimaryKeys.Value,
426
436
  AllFormInputPrimaryKeys.FileType,
427
437
  FormInputKeys.Accept,
438
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
428
439
  ],
429
440
  elementTemplate: {
430
441
  element: ElementTypes.FileUpload,
@@ -459,6 +470,7 @@ export const DefaultInputConfig = {
459
470
  AllFormInputPrimaryKeys.Validators,
460
471
  AllFormInputPrimaryKeys.Required,
461
472
  AllFormInputPrimaryKeys.Value,
473
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
462
474
  ],
463
475
  elementTemplate: {
464
476
  element: ElementTypes.Signature,
@@ -548,6 +560,7 @@ export const DefaultInputConfig = {
548
560
  AllFormInputPrimaryKeys.Validators,
549
561
  AllFormInputPrimaryKeys.Required,
550
562
  AllFormInputPrimaryKeys.Value,
563
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
551
564
  ],
552
565
  elementTemplate: {
553
566
  element: ElementTypes.ImageCapture,
@@ -629,6 +642,7 @@ export const DefaultInputConfig = {
629
642
  AllFormInputPrimaryKeys.HintLabel,
630
643
  AllFormInputPrimaryKeys.WorkflowPickerConfig,
631
644
  AllFormInputPrimaryKeys.AllowMultipleSelection,
645
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
632
646
  ],
633
647
  elementTemplate: {
634
648
  element: ElementTypes.WorkflowDocumentPicker,
@@ -663,7 +677,8 @@ export const DefaultInputConfig = {
663
677
  AllFormInputPrimaryKeys.AdjudicationStep,
664
678
  AllFormInputPrimaryKeys.AdjudicationPointTypes,
665
679
  AllFormInputPrimaryKeys.MinLength,
666
- AllFormInputPrimaryKeys.MaxLength
680
+ AllFormInputPrimaryKeys.MaxLength,
681
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
667
682
  ],
668
683
  elementTemplate: {
669
684
  element: ElementTypes.WorkflowAdjudication,
@@ -734,7 +749,8 @@ export const DefaultInputConfig = {
734
749
  AllFormInputPrimaryKeys.MatOptions,
735
750
  AllFormInputPrimaryKeys.FormInputs,
736
751
  AllFormInputPrimaryKeys.HandleLabel,
737
- SpecialElementKeys.MultipleInputAvailableOperations
752
+ SpecialElementKeys.MultipleInputAvailableOperations,
753
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
738
754
  ],
739
755
  elementTemplate: {
740
756
  element: ElementTypes.MultipleInput,
@@ -769,7 +785,8 @@ export const DefaultInputConfig = {
769
785
  AllFormInputPrimaryKeys.Required,
770
786
  AllFormInputPrimaryKeys.Value,
771
787
  AllFormInputPrimaryKeys.HintLabel,
772
- AllFormInputPrimaryKeys.RichTextEditorLibrary
788
+ AllFormInputPrimaryKeys.RichTextEditorLibrary,
789
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
773
790
  ],
774
791
  elementTemplate: {
775
792
  element: ElementTypes.Editor,
@@ -802,7 +819,8 @@ export const DefaultInputConfig = {
802
819
  SpecialElementKeys.ShowAllMcoaSegments,
803
820
  AllFormInputPrimaryKeys.TourContent,
804
821
  AllFormInputPrimaryKeys.MatOptions,
805
- AllFormInputPrimaryKeys.MscoaConfig
822
+ AllFormInputPrimaryKeys.MscoaConfig,
823
+ AllFormInputPrimaryKeys.ConditionalInputConfig,
806
824
  ],
807
825
  elementTemplate: {
808
826
  element: ElementTypes.MscoaSelection,
@@ -40,7 +40,41 @@ export declare enum ElementEditorTypes {
40
40
  /** Opt-in JSON body template ({@link PayloadTemplate}) for a POST value/options fetch. */
41
41
  PayloadTemplate = "payloadTemplate",
42
42
  /** JSON request-header template ({@link HeaderTemplate}) for a value/options fetch (GET and POST alike). */
43
- HeaderTemplate = "headerTemplate"
43
+ HeaderTemplate = "headerTemplate",
44
+ /** JSON query-parameter template ({@link QueryTemplate}) for a value/options fetch (GET and POST alike). */
45
+ QueryTemplate = "queryTemplate",
46
+ /**
47
+ * Single-line text carrying `{{token}}` references, with the `$`-trigger
48
+ * picker over the form's inputs.
49
+ *
50
+ * The same gesture the JSON template editors offer — type `$`, pick a field,
51
+ * get its `{{token}}` inserted — but over plain text rather than JSON. Use it
52
+ * wherever an author writes a short string that should interpolate document
53
+ * values: an email subject, a generated title, a reference format.
54
+ *
55
+ * NOT {@link ElementEditorTypes.Input}: that renders a bare `matInput` with no
56
+ * `$` affordance at all, so an element using it cannot offer the picker no
57
+ * matter what bindings are available.
58
+ */
59
+ TokenTextInput = "tokenTextInput",
60
+ /**
61
+ * Composite editor owning a whole `matOptions.fetch.<slot>` API config:
62
+ * endpoint selection, query parameters, headers, body mapping/template and
63
+ * response mapping in one place. Replaces the seven per-slice rows in the
64
+ * default config; the individual editTypes above remain renderable for
65
+ * host-supplied custom `editorSections`.
66
+ */
67
+ ApiEndpointConfig = "apiEndpointConfig",
68
+ /**
69
+ * Composite editor owning the WHOLE `mscoaConfig` object: accounting basis,
70
+ * account value label, the accrual and cash segment sets, the dual-basis
71
+ * cash-exclusion rules and the counter-account extensions.
72
+ *
73
+ * Replaced eight separate rows that each bound one key. Those keys are still
74
+ * the storage shape — only the authoring surface was unified, into a summary
75
+ * card plus a guided setup dialog.
76
+ */
77
+ MscoaConfig = "mscoaConfigSetup"
44
78
  }
45
79
  export interface ElementEditorConfigInterface {
46
80
  editorSections: Array<ElementEditorConfigSectionInterface>;
@@ -87,6 +121,36 @@ export interface ElementEditorInnerSectionElementInterface {
87
121
  label: string;
88
122
  value: any;
89
123
  }>;
124
+ /**
125
+ * Insertable entries for the `$`-trigger token picker on
126
+ * {@link ElementEditorTypes.TokenTextInput} and
127
+ * {@link ElementEditorTypes.RichTextEditor} elements.
128
+ *
129
+ * INJECTED AT RUNTIME by the host, the same way picker `options` are: the
130
+ * workflow step editor passes `formInputs: []` to `lib-t-dynamic-data-edit`
131
+ * and resolves every picker's option pool onto the element config instead
132
+ * (`ngx-t-workflows/.../workflowDiagramSelectors.ts`, `stepEditorSections$`).
133
+ * When present and non-empty this list wins over anything derived from
134
+ * `formInputs`; when absent the editor falls back to that derivation, which
135
+ * is what the form builder (which DOES pass real `formInputs`) relies on.
136
+ *
137
+ * Structurally identical to the editor components' `EditorBinding` — declared
138
+ * here rather than imported because this package cannot depend on the lib.
139
+ */
140
+ bindings?: ReadonlyArray<{
141
+ /** Human label shown in the menu — never the raw id. */
142
+ label: string;
143
+ /** Exact text inserted at the caret, e.g. `"{{contractType}}"`. */
144
+ insert: string;
145
+ /** Text matched against the `$`-filter; defaults to `label`. */
146
+ searchText?: string;
147
+ /** Optional Material icon name. */
148
+ icon?: string;
149
+ /** Muted second line (field kind, owning step). */
150
+ detail?: string;
151
+ /** Other token contents recognised as this field. */
152
+ aliases?: readonly string[];
153
+ }>;
90
154
  computedErrors?: ValidationError[];
91
155
  min?: number;
92
156
  max?: number;
@@ -35,6 +35,40 @@ export var ElementEditorTypes;
35
35
  ElementEditorTypes["PayloadTemplate"] = "payloadTemplate";
36
36
  /** JSON request-header template ({@link HeaderTemplate}) for a value/options fetch (GET and POST alike). */
37
37
  ElementEditorTypes["HeaderTemplate"] = "headerTemplate";
38
+ /** JSON query-parameter template ({@link QueryTemplate}) for a value/options fetch (GET and POST alike). */
39
+ ElementEditorTypes["QueryTemplate"] = "queryTemplate";
40
+ /**
41
+ * Single-line text carrying `{{token}}` references, with the `$`-trigger
42
+ * picker over the form's inputs.
43
+ *
44
+ * The same gesture the JSON template editors offer — type `$`, pick a field,
45
+ * get its `{{token}}` inserted — but over plain text rather than JSON. Use it
46
+ * wherever an author writes a short string that should interpolate document
47
+ * values: an email subject, a generated title, a reference format.
48
+ *
49
+ * NOT {@link ElementEditorTypes.Input}: that renders a bare `matInput` with no
50
+ * `$` affordance at all, so an element using it cannot offer the picker no
51
+ * matter what bindings are available.
52
+ */
53
+ ElementEditorTypes["TokenTextInput"] = "tokenTextInput";
54
+ /**
55
+ * Composite editor owning a whole `matOptions.fetch.<slot>` API config:
56
+ * endpoint selection, query parameters, headers, body mapping/template and
57
+ * response mapping in one place. Replaces the seven per-slice rows in the
58
+ * default config; the individual editTypes above remain renderable for
59
+ * host-supplied custom `editorSections`.
60
+ */
61
+ ElementEditorTypes["ApiEndpointConfig"] = "apiEndpointConfig";
62
+ /**
63
+ * Composite editor owning the WHOLE `mscoaConfig` object: accounting basis,
64
+ * account value label, the accrual and cash segment sets, the dual-basis
65
+ * cash-exclusion rules and the counter-account extensions.
66
+ *
67
+ * Replaced eight separate rows that each bound one key. Those keys are still
68
+ * the storage shape — only the authoring surface was unified, into a summary
69
+ * card plus a guided setup dialog.
70
+ */
71
+ ElementEditorTypes["MscoaConfig"] = "mscoaConfigSetup";
38
72
  })(ElementEditorTypes || (ElementEditorTypes = {}));
39
73
  // interface TStringExpressionValidationTest{
40
74
  // expression: string;
@@ -1,6 +1,6 @@
1
1
  import { DefaultInputConfig, defaultInputs } from "./DefaultEelement.js";
2
2
  import { DefaultInputConfigInterface } from "./DefaultInputConfigInterface.js";
3
- import { getElementEditorConfig } from "./inputConfig/ElementEditConfig.js";
3
+ import { getElementEditorConfig, MSCOA_ACCOUNT_VALUE_LABEL_OPTIONS, MSCOA_DUAL_CASH_EXCLUSION_RULE_EDITOR } from "./inputConfig/ElementEditConfig.js";
4
4
  import { AllFormInputPrimaryKeys, FormInputKeys, SpecialElementKeys } from "./FormInputKeys.js";
5
5
  import { BlurHandleTypes, ConfigurationValidTestInterface, ElementEditorConfigSectionInterface, ElementEditorInnerSectionElementInterface, ElementEditorTypes } from "./elementEditor.js";
6
6
  import { IWorkflowOption } from "./workflowSelectionConfig.js";
@@ -8,4 +8,4 @@ import { FormBuilderFunctions } from "./FormBuilderCallBackFunctions.js";
8
8
  import { IGetPostmanCollections, IPostmanCollectionConfig } from "./postmanCollection.js";
9
9
  import { DataSources } from "../formInput/APIDataFetchingConfigurationInterface.js";
10
10
  import { IScoaAccount } from "../formInput/IMscoaAccount.js";
11
- export { DefaultInputConfigInterface, BlurHandleTypes, FormInputKeys, ElementEditorTypes, ConfigurationValidTestInterface, ElementEditorInnerSectionElementInterface, SpecialElementKeys, AllFormInputPrimaryKeys, DefaultInputConfig, defaultInputs, getElementEditorConfig, IWorkflowOption, FormBuilderFunctions, IGetPostmanCollections, IPostmanCollectionConfig, DataSources, ElementEditorConfigSectionInterface, IScoaAccount, };
11
+ export { DefaultInputConfigInterface, BlurHandleTypes, FormInputKeys, ElementEditorTypes, ConfigurationValidTestInterface, ElementEditorInnerSectionElementInterface, SpecialElementKeys, AllFormInputPrimaryKeys, DefaultInputConfig, defaultInputs, getElementEditorConfig, MSCOA_ACCOUNT_VALUE_LABEL_OPTIONS, MSCOA_DUAL_CASH_EXCLUSION_RULE_EDITOR, IWorkflowOption, FormBuilderFunctions, IGetPostmanCollections, IPostmanCollectionConfig, DataSources, ElementEditorConfigSectionInterface, IScoaAccount, };
@@ -1,6 +1,6 @@
1
1
  import { DefaultInputConfig, defaultInputs } from "./DefaultEelement.js";
2
- import { getElementEditorConfig } from "./inputConfig/ElementEditConfig.js";
2
+ import { getElementEditorConfig, MSCOA_ACCOUNT_VALUE_LABEL_OPTIONS, MSCOA_DUAL_CASH_EXCLUSION_RULE_EDITOR } from "./inputConfig/ElementEditConfig.js";
3
3
  import { AllFormInputPrimaryKeys, FormInputKeys, SpecialElementKeys } from "./FormInputKeys.js";
4
4
  import { BlurHandleTypes, ElementEditorTypes } from "./elementEditor.js";
5
5
  import { DataSources } from "../formInput/APIDataFetchingConfigurationInterface.js";
6
- export { BlurHandleTypes, FormInputKeys, ElementEditorTypes, SpecialElementKeys, AllFormInputPrimaryKeys, DefaultInputConfig, defaultInputs, getElementEditorConfig, DataSources, };
6
+ export { BlurHandleTypes, FormInputKeys, ElementEditorTypes, SpecialElementKeys, AllFormInputPrimaryKeys, DefaultInputConfig, defaultInputs, getElementEditorConfig, MSCOA_ACCOUNT_VALUE_LABEL_OPTIONS, MSCOA_DUAL_CASH_EXCLUSION_RULE_EDITOR, DataSources, };
@@ -1,3 +1,24 @@
1
- import { ElementEditorConfigInterface } from "../elementEditor.js";
1
+ import { ElementEditorConfigInterface, ElementEditorConfigSectionInterface } from "../elementEditor.js";
2
+ /**
3
+ * Fields an MSCOA account can be displayed by. Chosen once per input and used
4
+ * for every account the picker renders, so an administrator reads the same
5
+ * identifier in the chart that the account carries in the chart of accounts.
6
+ *
7
+ * Exported because the unified MSCOA setup editor renders this list itself;
8
+ * it is the option pool for the `accountValueLabel` picker.
9
+ */
10
+ export declare const MSCOA_ACCOUNT_VALUE_LABEL_OPTIONS: Array<{
11
+ label: string;
12
+ value: string;
13
+ }>;
14
+ /**
15
+ * Per-record editor for one cash-exclusion regex rule
16
+ * (`IDualCashExclusionRule`), rendered by the unified MSCOA setup editor's
17
+ * "Cash rules" panel (Dual basis only).
18
+ *
19
+ * Exported because that editor builds the record-list element around it and
20
+ * fills the segment row's options from the input's own accrual segments.
21
+ */
22
+ export declare const MSCOA_DUAL_CASH_EXCLUSION_RULE_EDITOR: () => Array<ElementEditorConfigSectionInterface>;
2
23
  export declare var ElementConfig: ElementEditorConfigInterface;
3
24
  export declare const getElementEditorConfig: ElementEditorConfigInterface;