ngx-t-forms-types 0.0.35 → 0.0.38

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.
Files changed (47) hide show
  1. package/dist/interfaces/Form/formInterface.d.ts +18 -0
  2. package/dist/interfaces/Form/index.d.ts +2 -2
  3. package/dist/interfaces/FormBuilder/DefaultEelement.js +2 -2
  4. package/dist/interfaces/FormBuilder/FormInputKeys.d.ts +2 -0
  5. package/dist/interfaces/FormBuilder/FormInputKeys.js +2 -0
  6. package/dist/interfaces/FormBuilder/elementEditor.d.ts +8 -0
  7. package/dist/interfaces/FormBuilder/elementEditor.js +8 -0
  8. package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +25 -3
  9. package/dist/interfaces/Import/ImportIdentity.d.ts +132 -1
  10. package/dist/interfaces/Import/ImportRecipe.d.ts +423 -0
  11. package/dist/interfaces/Import/ImportRecipe.js +19 -0
  12. package/dist/interfaces/Import/ImportRowState.d.ts +84 -7
  13. package/dist/interfaces/Import/index.d.ts +4 -2
  14. package/dist/interfaces/Import/index.js +1 -1
  15. package/dist/interfaces/Tower/ITowerFormSteps.d.ts +19 -0
  16. package/dist/interfaces/Tower/index.d.ts +2 -1
  17. package/dist/interfaces/environment/IStoreFunctions.d.ts +42 -2
  18. package/dist/interfaces/environment/environment.d.ts +203 -0
  19. package/dist/interfaces/environment/environment.js +12 -1
  20. package/dist/interfaces/environment/index.d.ts +2 -2
  21. package/dist/interfaces/environment/index.js +2 -1
  22. package/dist/interfaces/formInput/APIDataFetchingConfigurationInterface.d.ts +10 -2
  23. package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +15 -0
  24. package/dist/interfaces/formInput/MinimumInputRequiredInterface.d.ts +14 -0
  25. package/dist/interfaces/formInput/MinimumInputRequiredInterface.js +14 -0
  26. package/dist/interfaces/formInput/calculatedFieldRules.d.ts +31 -1
  27. package/dist/interfaces/formInput/calculatedFieldRules.js +16 -1
  28. package/dist/interfaces/formInput/index.d.ts +2 -2
  29. package/dist/interfaces/formInput/index.js +2 -1
  30. package/dist/interfaces/workflow/DocumentSectionConfigurationsInterface.d.ts +22 -1
  31. package/dist/interfaces/workflow/DocumentSectionConfigurationsInterface.js +6 -0
  32. package/dist/interfaces/workflow/index.d.ts +2 -2
  33. package/dist/schemas/CalculatedFieldRulesSchema.js +2 -1
  34. package/dist/schemas/FormInputSchema.js +9 -1
  35. package/dist/schemas/FormSchema.d.ts +35 -0
  36. package/dist/schemas/FormSchema.js +57 -0
  37. package/dist/schemas/index.d.ts +3 -2
  38. package/dist/schemas/index.js +2 -2
  39. package/dist/schemas/tests/FormInputValidator.spec.js +27 -0
  40. package/dist/skillet/extra-members.d.ts +1 -1
  41. package/dist/skillet/input-members.d.ts +2 -2
  42. package/dist/skillet/input-members.js +2 -1
  43. package/dist/skillet/members/calculated-field.d.ts +4 -4
  44. package/dist/skillet/members/calculated-field.js +6 -5
  45. package/dist/skillet/members/table.d.ts +1 -1
  46. package/dist/skillet/shared-types.js +1 -1
  47. package/package.json +1 -1
@@ -18,8 +18,65 @@ export const FormSchema = Joi.object({
18
18
  submissionHandle: FormSubmissionHandleSchema.required(),
19
19
  formId: Joi.string().optional(),
20
20
  formTitle: Joi.string().required(),
21
+ // Shape only. Whether the description is good enough to save is the builder's
22
+ // rule (`validateFormDescription`), so stored forms and AI drafts that predate it
23
+ // stay valid here.
24
+ formDescription: Joi.string().allow('').optional(),
25
+ formClassifications: Joi.array().items(Joi.string()).optional(),
21
26
  systemDefault: Joi.boolean().optional(),
22
27
  });
28
+ /**
29
+ * Fewest words a form description may have — one full sentence — see
30
+ * `validateFormDescription`.
31
+ */
32
+ export const FORM_DESCRIPTION_MIN_WORDS = 10;
33
+ /** Most paragraphs a form description may have — see `validateFormDescription`. */
34
+ export const FORM_DESCRIPTION_MAX_PARAGRAPHS = 2;
35
+ /**
36
+ * Counts the words and paragraphs of a form description. Paragraphs are separated
37
+ * by a blank line (whitespace-only lines count as blank); a single line break stays
38
+ * inside its paragraph.
39
+ *
40
+ * @param text The description; `undefined`/`null` count as empty.
41
+ * @returns The counts — both `0` for blank text.
42
+ */
43
+ export function measureFormDescription(text) {
44
+ const normalised = (text ?? '').replace(/\r\n?/g, '\n').trim();
45
+ if (!normalised)
46
+ return { words: 0, paragraphs: 0 };
47
+ return {
48
+ words: normalised.split(/\s+/).filter(Boolean).length,
49
+ paragraphs: normalised.split(/\n[^\S\n]*\n\s*/).filter(p => p.trim().length > 0).length,
50
+ };
51
+ }
52
+ /**
53
+ * The rule a form description must pass before the builder saves the form: present,
54
+ * at least `FORM_DESCRIPTION_MIN_WORDS` words, at most `FORM_DESCRIPTION_MAX_PARAGRAPHS`
55
+ * paragraphs.
56
+ *
57
+ * @param text The description; `undefined`/`null` count as missing.
58
+ * @returns One entry per broken rule, keyed `formDescription`; empty when it passes.
59
+ */
60
+ export function validateFormDescription(text) {
61
+ const { words, paragraphs } = measureFormDescription(text);
62
+ if (words === 0) {
63
+ return [{ key: 'formDescription', message: 'A form description is required' }];
64
+ }
65
+ const errors = [];
66
+ if (words < FORM_DESCRIPTION_MIN_WORDS) {
67
+ errors.push({
68
+ key: 'formDescription',
69
+ message: `The form description needs at least ${FORM_DESCRIPTION_MIN_WORDS} words (it has ${words})`,
70
+ });
71
+ }
72
+ if (paragraphs > FORM_DESCRIPTION_MAX_PARAGRAPHS) {
73
+ errors.push({
74
+ key: 'formDescription',
75
+ message: `The form description can have at most ${FORM_DESCRIPTION_MAX_PARAGRAPHS} paragraphs (it has ${paragraphs})`,
76
+ });
77
+ }
78
+ return errors;
79
+ }
23
80
  export const DatabaseFormSchema = Joi.object({
24
81
  _id: Joi.string().required(),
25
82
  systemDefault: Joi.boolean().required(),
@@ -1,5 +1,6 @@
1
1
  import { validateCalculatedFieldRules } from "./CalculatedFieldRulesSchema.js";
2
2
  import { formColumnInputsSchema, validateFormColumnInputs, validateFormColumnInputsWithRequired } from "./FormInputSchema.js";
3
- import { DatabaseFormSchema, FormSchema, validateApiDataFetchingConfiguration, validateForm, validateFormSlide } from "./FormSchema.js";
3
+ import { DatabaseFormSchema, FORM_DESCRIPTION_MAX_PARAGRAPHS, FORM_DESCRIPTION_MIN_WORDS, FormDescriptionMeasure, FormSchema, measureFormDescription, validateApiDataFetchingConfiguration, validateForm, validateFormDescription, validateFormSlide } from "./FormSchema.js";
4
4
  import { MscoaInputConfigSchema, validateMscoaInputConfig } from "./MscoaConfigSchema.js";
5
- export { FormSchema, DatabaseFormSchema, formColumnInputsSchema, validateCalculatedFieldRules, validateFormColumnInputs, validateFormSlide, validateFormColumnInputsWithRequired, validateForm, validateApiDataFetchingConfiguration, MscoaInputConfigSchema, validateMscoaInputConfig };
5
+ export { FormSchema, DatabaseFormSchema, formColumnInputsSchema, validateCalculatedFieldRules, validateFormColumnInputs, validateFormSlide, validateFormColumnInputsWithRequired, validateForm, validateApiDataFetchingConfiguration, MscoaInputConfigSchema, validateMscoaInputConfig, FORM_DESCRIPTION_MIN_WORDS, FORM_DESCRIPTION_MAX_PARAGRAPHS, measureFormDescription, validateFormDescription };
6
+ export type { FormDescriptionMeasure };
@@ -1,5 +1,5 @@
1
1
  import { validateCalculatedFieldRules } from "./CalculatedFieldRulesSchema.js";
2
2
  import { formColumnInputsSchema, validateFormColumnInputs, validateFormColumnInputsWithRequired } from "./FormInputSchema.js";
3
- import { DatabaseFormSchema, FormSchema, validateApiDataFetchingConfiguration, validateForm, validateFormSlide } from "./FormSchema.js";
3
+ import { DatabaseFormSchema, FORM_DESCRIPTION_MAX_PARAGRAPHS, FORM_DESCRIPTION_MIN_WORDS, FormSchema, measureFormDescription, validateApiDataFetchingConfiguration, validateForm, validateFormDescription, validateFormSlide } from "./FormSchema.js";
4
4
  import { MscoaInputConfigSchema, validateMscoaInputConfig } from "./MscoaConfigSchema.js";
5
- export { FormSchema, DatabaseFormSchema, formColumnInputsSchema, validateCalculatedFieldRules, validateFormColumnInputs, validateFormSlide, validateFormColumnInputsWithRequired, validateForm, validateApiDataFetchingConfiguration, MscoaInputConfigSchema, validateMscoaInputConfig };
5
+ export { FormSchema, DatabaseFormSchema, formColumnInputsSchema, validateCalculatedFieldRules, validateFormColumnInputs, validateFormSlide, validateFormColumnInputsWithRequired, validateForm, validateApiDataFetchingConfiguration, MscoaInputConfigSchema, validateMscoaInputConfig, FORM_DESCRIPTION_MIN_WORDS, FORM_DESCRIPTION_MAX_PARAGRAPHS, measureFormDescription, validateFormDescription };
@@ -1,5 +1,6 @@
1
1
  import { AllFormInputPrimaryKeys, } from '../../interfaces/FormBuilder/index.js';
2
2
  import { ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from '../../interfaces/formInput/index.js';
3
+ import { validateCalculatedFieldRules } from '../CalculatedFieldRulesSchema.js';
3
4
  import { formColumnInputsSchema } from '../FormInputSchema.js';
4
5
  //ng test ngx-t-forms --include='projects/ngx-t-forms/src/lib/schemas/tests/FormInputValidator.spec.ts'
5
6
  describe('FormInputValidator', () => {
@@ -60,4 +61,30 @@ describe('FormInputValidator', () => {
60
61
  const result = formColumnInputsSchema.validate(invalidEnumInput);
61
62
  expect(result.error).toBeDefined();
62
63
  });
64
+ describe('number precision', () => {
65
+ const amount = (rounding) => ({
66
+ [AllFormInputPrimaryKeys.Element]: ElementTypes.Input,
67
+ [AllFormInputPrimaryKeys.ColSize]: 6,
68
+ [AllFormInputPrimaryKeys.Label]: 'Amount',
69
+ [AllFormInputPrimaryKeys.FormControlName]: 'amount',
70
+ [AllFormInputPrimaryKeys.Appearance]: 'outline',
71
+ [AllFormInputPrimaryKeys.Required]: false,
72
+ [AllFormInputPrimaryKeys.DataType]: InputDataTypes.Number,
73
+ [AllFormInputPrimaryKeys.Type]: InputTypes.Number,
74
+ [AllFormInputPrimaryKeys.Pipe]: { pipeType: InputPipeTypes.Currency, param: 'ZAR', rounding },
75
+ });
76
+ it('accepts every rounding strategy on the number pipe', () => {
77
+ for (const rounding of ['ROUND', 'FLOOR', 'CEIL', 'HALF_EVEN']) {
78
+ expect(formColumnInputsSchema.validate(amount(rounding)).error).toBeUndefined();
79
+ }
80
+ });
81
+ it('rejects a rounding strategy the library does not know', () => {
82
+ expect(formColumnInputsSchema.validate(amount('HALF_DOWN')).error).toBeDefined();
83
+ });
84
+ it('accepts banker\'s rounding on calculated-field rules', () => {
85
+ const rules = { formula: '{a} * 2', variables: [], decimalPlaces: 2, roundingMode: 'HALF_EVEN' };
86
+ expect(validateCalculatedFieldRules(rules).error).toBeUndefined();
87
+ expect(validateCalculatedFieldRules({ ...rules, roundingMode: 'TRUNCATE' }).error).toBeDefined();
88
+ });
89
+ });
63
90
  });
@@ -90,7 +90,7 @@ export declare const extraDraftMemberSchemas: {
90
90
  tableCell: boolean | null;
91
91
  }>>;
92
92
  decimalPlaces: import("@hashbrownai/core/src/schema/base").SchemaForUnion<number | null>;
93
- roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"FLOOR" | "CEIL" | "ROUND" | null>;
93
+ roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"ROUND" | "FLOOR" | "CEIL" | "HALF_EVEN" | null>;
94
94
  getFormulaFromAFormInput: import("@hashbrownai/core/src/schema/base").SchemaForUnion<boolean | null>;
95
95
  formControlWithFormula: import("@hashbrownai/core/src/schema/base").SchemaForUnion<string | null>;
96
96
  }>;
@@ -54,7 +54,7 @@ type MemberValue<K extends AllFormInputPrimaryKeys> = K extends keyof FormColumn
54
54
  * runtime state the form owns while it is open. These are excluded from
55
55
  * generation schemas entirely and stitched in afterwards.
56
56
  */
57
- export declare const SYSTEM_OWNED_INPUT_MEMBERS: readonly [AllFormInputPrimaryKeys.Id, AllFormInputPrimaryKeys.SectionId, AllFormInputPrimaryKeys.SystemDefault, AllFormInputPrimaryKeys.Status, AllFormInputPrimaryKeys.ValueUpdatedAt, AllFormInputPrimaryKeys.TemporaryHint, AllFormInputPrimaryKeys.FormIsOpen, AllFormInputPrimaryKeys.MultipleInputInEditId, AllFormInputPrimaryKeys.CanReload];
57
+ export declare const SYSTEM_OWNED_INPUT_MEMBERS: readonly [AllFormInputPrimaryKeys.Id, AllFormInputPrimaryKeys.SectionId, AllFormInputPrimaryKeys.SystemDefault, AllFormInputPrimaryKeys.Status, AllFormInputPrimaryKeys.ValueUpdatedAt, AllFormInputPrimaryKeys.TemporaryHint, AllFormInputPrimaryKeys.FormIsOpen, AllFormInputPrimaryKeys.MultipleInputInEditId, AllFormInputPrimaryKeys.CanReload, AllFormInputPrimaryKeys.OptionsSearch];
58
58
  /**
59
59
  * Members kept only so stored forms keep deserialising. They are excluded from
60
60
  * generation entirely: a model must never author a property the codebase has
@@ -191,7 +191,7 @@ export declare const draftMemberSchemas: {
191
191
  tableCell: boolean | null;
192
192
  }>>;
193
193
  decimalPlaces: import("@hashbrownai/core/src/schema/base").SchemaForUnion<number | null>;
194
- roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"FLOOR" | "CEIL" | "ROUND" | null>;
194
+ roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"ROUND" | "FLOOR" | "CEIL" | "HALF_EVEN" | null>;
195
195
  getFormulaFromAFormInput: import("@hashbrownai/core/src/schema/base").SchemaForUnion<boolean | null>;
196
196
  formControlWithFormula: import("@hashbrownai/core/src/schema/base").SchemaForUnion<string | null>;
197
197
  }>;
@@ -26,6 +26,7 @@ export const SYSTEM_OWNED_INPUT_MEMBERS = [
26
26
  AllFormInputPrimaryKeys.FormIsOpen,
27
27
  AllFormInputPrimaryKeys.MultipleInputInEditId,
28
28
  AllFormInputPrimaryKeys.CanReload,
29
+ AllFormInputPrimaryKeys.OptionsSearch,
29
30
  ];
30
31
  /**
31
32
  * Members kept only so stored forms keep deserialising. They are excluded from
@@ -166,7 +167,7 @@ export const inputMemberSchemas = {
166
167
  [AllFormInputPrimaryKeys.Accept]: s.string(describe('Accepted upload types as an HTML accept attribute, for example ".pdf,.docx" or "image/*". Match it to the documents actually expected, and name the accepted types in the hint as well.', AllFormInputPrimaryKeys.Accept)),
167
168
  [AllFormInputPrimaryKeys.HandleLabel]: s.string(describe("The text of the button that adds a row to an item list. Name the action — 'Add item', 'Add attendee' — not the default 'Add to list'.", AllFormInputPrimaryKeys.HandleLabel)),
168
169
  // --- display transform ----------------------------------------------------
169
- [AllFormInputPrimaryKeys.Pipe]: s.object(describe('A display transform applied when the value is shown back to the user: currency for an amount, percent for a rate, date for a date. Presentation only; the stored value is unchanged.', AllFormInputPrimaryKeys.Pipe), {
170
+ [AllFormInputPrimaryKeys.Pipe]: s.object(describe("How the value is presented: currency for an amount, percent for a rate, date for a date. The numeric formats also fix the precision the value is kept at — currency rounds to the currency's minor unit with banker's rounding, decimal to the given places, integer to none — and that rounded value is what is saved; every other format is presentation only.", AllFormInputPrimaryKeys.Pipe), {
170
171
  pipeType: inputPipeTypeSchema,
171
172
  param: s.string('The pipe argument, such as a date format like "dd MMM yyyy" or a currency code like "ZAR".'),
172
173
  }),
@@ -1,5 +1,5 @@
1
1
  import { s } from '@hashbrownai/core';
2
- import type { CalculatedFieldRules } from '../../interfaces/formInput/calculatedFieldRules.js';
2
+ import { type CalculatedFieldRules } from '../../interfaces/formInput/calculatedFieldRules.js';
3
3
  import { CalculationFunctions } from '../../interfaces/formInput/calculationVariableInterface.js';
4
4
  /**
5
5
  * The `calculatedFieldRules` member: a value computed from other fields rather
@@ -43,8 +43,8 @@ import { CalculationFunctions } from '../../interfaces/formInput/calculationVari
43
43
  * annotates the same `parentInputId` + `function` pair as "Multiple-input
44
44
  * (list) bindings", which is the distinction drawn.
45
45
  */
46
- /** `roundingMode` is a string union with no runtime enum to derive from. */
47
- export declare const ROUNDING_MODE_VALUES: readonly ["FLOOR", "CEIL", "ROUND"];
46
+ /** The rounding strategies, from the one list `roundingMode` is typed by. */
47
+ export declare const ROUNDING_MODE_VALUES: readonly ["ROUND", "FLOOR", "CEIL", "HALF_EVEN"];
48
48
  interface VariableCommonDraft {
49
49
  /** The token this variable is referenced by inside `formula`. */
50
50
  variable: string;
@@ -126,7 +126,7 @@ export declare const calculatedFieldRulesDraftSchema: s.ObjectType<{
126
126
  tableCell: boolean | null;
127
127
  }>>;
128
128
  decimalPlaces: import("@hashbrownai/core/src/schema/base").SchemaForUnion<number | null>;
129
- roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"FLOOR" | "CEIL" | "ROUND" | null>;
129
+ roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"ROUND" | "FLOOR" | "CEIL" | "HALF_EVEN" | null>;
130
130
  getFormulaFromAFormInput: import("@hashbrownai/core/src/schema/base").SchemaForUnion<boolean | null>;
131
131
  formControlWithFormula: import("@hashbrownai/core/src/schema/base").SchemaForUnion<string | null>;
132
132
  }>;
@@ -1,6 +1,7 @@
1
1
  import { s } from '@hashbrownai/core';
2
+ import { ROUNDING_MODES } from '../../interfaces/formInput/calculatedFieldRules.js';
2
3
  import { CalculationFunctions } from '../../interfaces/formInput/calculationVariableInterface.js';
3
- import { enumValues, exhaustive, optional } from '../internal/coupling.js';
4
+ import { enumValues, optional } from '../internal/coupling.js';
4
5
  /**
5
6
  * The `calculatedFieldRules` member: a value computed from other fields rather
6
7
  * than typed by the user.
@@ -43,8 +44,8 @@ import { enumValues, exhaustive, optional } from '../internal/coupling.js';
43
44
  * annotates the same `parentInputId` + `function` pair as "Multiple-input
44
45
  * (list) bindings", which is the distinction drawn.
45
46
  */
46
- /** `roundingMode` is a string union with no runtime enum to derive from. */
47
- export const ROUNDING_MODE_VALUES = exhaustive()(['FLOOR', 'CEIL', 'ROUND']);
47
+ /** The rounding strategies, from the one list `roundingMode` is typed by. */
48
+ export const ROUNDING_MODE_VALUES = ROUNDING_MODES;
48
49
  // --- schema -----------------------------------------------------------------
49
50
  const variableToken = s.string('The name this variable is referenced by inside the formula. Keep it short and lower case, and spell it identically in the formula.', { pattern: '^[a-zA-Z][a-zA-Z0-9_]*$' });
50
51
  const variableLabel = s.string('A human-readable name for this variable, shown when the formula is explained back to an administrator.');
@@ -88,8 +89,8 @@ export const calculationVariableDraftSchema = s.anyOf([
88
89
  export const calculatedFieldRulesDraftSchema = s.object('How this field computes its value from other fields on the form, so the user never types a figure the system can work out: a line total, VAT, an age. Whenever a total, average, minimum, maximum or count over an item list is used anywhere else — a decision gate, a validator, another formula, a list column, the next person — it must be a calculated field like this one on the form itself, aggregating the list; the roll-up shown beneath the list is for the user only.', {
89
90
  formula: s.string('The arithmetic expression, written using the variable names declared below and nothing else. Every name in the formula must be declared as a variable, and every declared variable should appear in the formula.'),
90
91
  variables: s.array('The fields the formula reads, one entry per variable name used in it.', calculationVariableDraftSchema, { minItems: 1 }),
91
- decimalPlaces: optional(s.integer('How many decimal places the result is rounded to: 2 for money, 0 for a count.', { minimum: 0 })),
92
- roundingMode: optional(s.enumeration("How the result is rounded at that precision: 'ROUND' to the nearest, which is right for money; 'FLOOR' or 'CEIL' only when the business rule says round down or up.", [...ROUNDING_MODE_VALUES])),
92
+ decimalPlaces: optional(s.integer('How many decimal places the result is rounded to: 2 for money, 0 for a count. The rounded result is what is saved and shown.', { minimum: 0 })),
93
+ roundingMode: optional(s.enumeration("How the result is rounded at that precision. 'HALF_EVEN' is banker's rounding (a tie goes to the even neighbour), the default for money and what a currency-formatted field uses when this is unset; 'ROUND' rounds a tie away from zero; 'FLOOR' or 'CEIL' only when the business rule says round down or up.", [...ROUNDING_MODE_VALUES])),
93
94
  getFormulaFromAFormInput: optional(s.boolean('Whether the formula is read from another field on the form at runtime instead of being fixed here. Leave unset unless the form genuinely lets a user supply the formula.')),
94
95
  formControlWithFormula: optional(s.string('The formControlName of the field supplying the formula. Only meaningful when the formula is read from a form input.')),
95
96
  });
@@ -130,7 +130,7 @@ export declare const tableConfigSchema: s.ObjectType<{
130
130
  tableCell: boolean | null;
131
131
  }>>;
132
132
  decimalPlaces: import("@hashbrownai/core/src/schema/base").SchemaForUnion<number | null>;
133
- roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"FLOOR" | "CEIL" | "ROUND" | null>;
133
+ roundingMode: import("@hashbrownai/core/src/schema/base").SchemaForUnion<"ROUND" | "FLOOR" | "CEIL" | "HALF_EVEN" | null>;
134
134
  getFormulaFromAFormInput: import("@hashbrownai/core/src/schema/base").SchemaForUnion<boolean | null>;
135
135
  formControlWithFormula: import("@hashbrownai/core/src/schema/base").SchemaForUnion<string | null>;
136
136
  }>;
@@ -58,7 +58,7 @@ export const TEXTAREA_WRAP_VALUES = exhaustive()([
58
58
  'soft',
59
59
  ]);
60
60
  export const textareaWrapSchema = s.enumeration(describe("How a textarea wraps long lines when the form is submitted. 'soft' leaves the text unchanged; 'hard' inserts real newlines at the wrap points.", 'wrap'), [...TEXTAREA_WRAP_VALUES]);
61
- export const inputPipeTypeSchema = s.enumeration(describe('A display transform applied to the value when it is shown back to the user. This is presentation only and never changes the stored value.', 'pipe', 'pipeType'), enumValues(InputPipeTypes));
61
+ export const inputPipeTypeSchema = s.enumeration(describe("How the value is presented. 'currency', 'decimal' and 'integer' also round the stored value to their precision (currency with banker's rounding); the other transforms are presentation only.", 'pipe', 'pipeType'), enumValues(InputPipeTypes));
62
62
  export const richTextEditorTypeSchema = s.enumeration(describe('Which rich-text editor library backs an editor element.', 'richTextEditorLibrary'), enumValues(RichTextEditorType));
63
63
  export const inputFileTypeSchema = s.enumeration(describe("The kind of upload a file control accepts: 'file' for a document such as a quote, an invoice or a certificate; 'captureImage' for a photo taken on the phone camera; 'image' for a picture from disk.", 'fileType'), enumValues(InputFileType));
64
64
  // --- Data sourcing ----------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-t-forms-types",
3
- "version": "0.0.35",
3
+ "version": "0.0.38",
4
4
  "description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
5
5
  "keywords": [
6
6
  "typings",