@gcforms/types 1.0.29 → 1.0.31

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/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.31] - 2026-04-23
9
+
10
+ - Add Element properties to support Advanced number inputs
11
+
12
+ ## [1.0.30] - 2026-03-30
13
+
14
+ - Add ValidationInputType as sub-type of HTMLTextInputTypeAttribute
15
+
8
16
  ## [1.0.29] - 2026-03-25
9
17
 
10
18
  - Add ignoreDeprecations
package/dist/index.d.mts CHANGED
@@ -40,6 +40,7 @@ type NextActionRule = {
40
40
  choiceId: string;
41
41
  };
42
42
  type HTMLTextInputTypeAttribute = "text" | "email" | "name" | "number" | "password" | "search" | "tel" | "url";
43
+ type ValidationInputType = HTMLTextInputTypeAttribute | "custom";
43
44
  declare const FormElementTypes: {
44
45
  readonly textField: "textField";
45
46
  readonly textArea: "textArea";
@@ -58,6 +59,7 @@ declare const FormElementTypes: {
58
59
  readonly contact: "contact";
59
60
  readonly combobox: "combobox";
60
61
  readonly formattedDate: "formattedDate";
62
+ readonly numberInput: "numberInput";
61
63
  readonly customJson: "customJson";
62
64
  };
63
65
  type FormElementTypes = (typeof FormElementTypes)[keyof typeof FormElementTypes];
@@ -71,9 +73,13 @@ type ConditionalRule = {
71
73
  };
72
74
  interface ValidationProperties {
73
75
  required: boolean;
74
- type?: HTMLTextInputTypeAttribute;
76
+ type?: ValidationInputType;
75
77
  regex?: string;
76
78
  maxLength?: number;
79
+ minValue?: number;
80
+ maxValue?: number;
81
+ minDigits?: number;
82
+ maxDigits?: number;
77
83
  descriptionEN?: string;
78
84
  descriptionFR?: string;
79
85
  [key: string]: unknown;
@@ -120,6 +126,8 @@ interface ElementProperties {
120
126
  dateFormat?: string;
121
127
  allowNegativeNumbers?: boolean;
122
128
  stepCount?: number;
129
+ currencyCode?: string;
130
+ useThousandsSeparator?: boolean;
123
131
  conditionalRules?: ConditionalRule[];
124
132
  full?: boolean;
125
133
  addressComponents?: AddressComponents | undefined;
@@ -310,4 +318,4 @@ interface AddressCompleteLabels {
310
318
  country: string;
311
319
  }
312
320
 
313
- export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, BetaFormElementTypes, type BrandProperties, type ChoiceRule, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInput, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, type NextActionRule, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationProperties, type dynamicRowType };
321
+ export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, BetaFormElementTypes, type BrandProperties, type ChoiceRule, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInput, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, type NextActionRule, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationInputType, type ValidationProperties, type dynamicRowType };
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ type NextActionRule = {
40
40
  choiceId: string;
41
41
  };
42
42
  type HTMLTextInputTypeAttribute = "text" | "email" | "name" | "number" | "password" | "search" | "tel" | "url";
43
+ type ValidationInputType = HTMLTextInputTypeAttribute | "custom";
43
44
  declare const FormElementTypes: {
44
45
  readonly textField: "textField";
45
46
  readonly textArea: "textArea";
@@ -58,6 +59,7 @@ declare const FormElementTypes: {
58
59
  readonly contact: "contact";
59
60
  readonly combobox: "combobox";
60
61
  readonly formattedDate: "formattedDate";
62
+ readonly numberInput: "numberInput";
61
63
  readonly customJson: "customJson";
62
64
  };
63
65
  type FormElementTypes = (typeof FormElementTypes)[keyof typeof FormElementTypes];
@@ -71,9 +73,13 @@ type ConditionalRule = {
71
73
  };
72
74
  interface ValidationProperties {
73
75
  required: boolean;
74
- type?: HTMLTextInputTypeAttribute;
76
+ type?: ValidationInputType;
75
77
  regex?: string;
76
78
  maxLength?: number;
79
+ minValue?: number;
80
+ maxValue?: number;
81
+ minDigits?: number;
82
+ maxDigits?: number;
77
83
  descriptionEN?: string;
78
84
  descriptionFR?: string;
79
85
  [key: string]: unknown;
@@ -120,6 +126,8 @@ interface ElementProperties {
120
126
  dateFormat?: string;
121
127
  allowNegativeNumbers?: boolean;
122
128
  stepCount?: number;
129
+ currencyCode?: string;
130
+ useThousandsSeparator?: boolean;
123
131
  conditionalRules?: ConditionalRule[];
124
132
  full?: boolean;
125
133
  addressComponents?: AddressComponents | undefined;
@@ -310,4 +318,4 @@ interface AddressCompleteLabels {
310
318
  country: string;
311
319
  }
312
320
 
313
- export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, BetaFormElementTypes, type BrandProperties, type ChoiceRule, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInput, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, type NextActionRule, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationProperties, type dynamicRowType };
321
+ export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, BetaFormElementTypes, type BrandProperties, type ChoiceRule, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInput, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, type NextActionRule, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationInputType, type ValidationProperties, type dynamicRowType };
package/dist/index.js CHANGED
@@ -48,6 +48,7 @@ var FormElementTypes = {
48
48
  contact: "contact",
49
49
  combobox: "combobox",
50
50
  formattedDate: "formattedDate",
51
+ numberInput: "numberInput",
51
52
  customJson: "customJson"
52
53
  };
53
54
  var BetaFormElementTypes = {
package/dist/index.mjs CHANGED
@@ -17,6 +17,7 @@ var FormElementTypes = {
17
17
  contact: "contact",
18
18
  combobox: "combobox",
19
19
  formattedDate: "formattedDate",
20
+ numberInput: "numberInput",
20
21
  customJson: "customJson"
21
22
  };
22
23
  var BetaFormElementTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gcforms/types",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "author": "Canadian Digital Service",
5
5
  "license": "MIT",
6
6
  "publishConfig": {