@abgov/ui-components-common 1.2.0 → 1.2.1-alpha.1

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 (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +47 -45
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var A=Object.defineProperty;var p=r=>{throw TypeError(r)};var v=(r,t,e)=>t in r?A(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var u=(r,t,e)=>v(r,typeof t!="symbol"?t+"":t,e),M=(r,t,e)=>t.has(r)||p("Cannot "+e);var y=(r,t,e)=>t.has(r)?p("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e);var g=(r,t,e)=>(M(r,t,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class S{constructor(t){u(this,"validators");this.validators=t||{}}add(t,...e){this.validators[t]=e}validate(t){const e={};return Object.entries(this.validators).forEach(([a,i])=>{const n=i.map(s=>s(t[a])).find(s=>!!s);n&&(e[a]=n)}),e}}function E(){return[f("Day is required"),h({min:1,max:31,minMsg:"Day must be between 1 and 31",maxMsg:"Day must be between 1 and 31"})]}function N(){return[f("Month is required"),h({min:0,max:11,minMsg:"Month must be between Jan and Dec",maxMsg:"Month must be between Jan and Dec"})]}function w(){const r=new Date().getFullYear();return[f("Year is required"),h({min:1900,max:r,minMsg:"Year must be greater than 1900",maxMsg:`Year must be less than ${r}`})]}function f(r){return t=>(r=r||"Required",typeof t=="number"&&!isNaN(t)||t?"":r)}function D(r){const t=new RegExp(/^\+?[\d-() ]{10,18}$/);return c(t,r||"Invalid phone number")}function _(r){const t=new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);return c(t,r||"Invalid email address")}function R(){return r=>{if(!r)return"";const t="121212121".split("").map(i=>parseInt(i)),e=r.replace(/\D/g,"");return e.length!==9?"SIN must contain 9 numbers":e.split("").map(i=>parseInt(i)).map((i,n)=>{const s=i*t[n];return s<10?s:`${s}`.split("").map(o=>parseInt(o)).reduce((o,m)=>o+m,0)}).reduce((i,n)=>i+n,0)%10===0?"":"Invalid SIN"}}function $(){return c(/^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][ -]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,"Invalid postal code")}function c(r,t){return e=>!e||e.match(r)?"":t}function x({invalidMsg:r,minMsg:t,maxMsg:e,min:a,max:i}={}){return n=>{let s=new Date(-1);return`${n||""}`.length===0?"":(typeof n=="string"&&(s=new Date(n)),typeof n=="number"&&(s=new Date(n)),n.toDateString&&(s=n),s.getDate()===-1?r||"Invalid date":a&&s<a?t||`Must be after ${a}`:i&&s>i?e||`Must be before ${i}`:"")}}function h({invalidTypeMsg:r,minMsg:t,maxMsg:e,min:a=-Number.MAX_VALUE,max:i=Number.MAX_VALUE}={}){return n=>{let s=Number.MAX_VALUE;return`${n??""}`.length===0?"":(typeof n=="string"&&(s=parseFloat(n)),typeof n=="number"&&(s=n),isNaN(s)?r||"Must be a numeric value":s>i?e||`Must be less than or equal to ${i}`:s<a?t||`Must be greater than or equal to ${a}`:"")}}function I({invalidTypeMsg:r,minMsg:t,maxMsg:e,min:a=-Number.MAX_VALUE,max:i=Number.MAX_VALUE}){return n=>`${n||""}`.length===0?"":typeof n!="string"?r||"Invalid type":n.length>i?e||`Must be less than ${i} characters`:n.length<a?t||`Must be greater than ${a} characters`:""}var d,L,V;class C{constructor(t){y(this,d);u(this,"state");u(this,"_formData");u(this,"_formRef");this.type=t}init(t){if(this._formRef){console.warn("init: form element has already been set");return}this._formRef=t.detail.el,this.state={uuid:crypto.randomUUID(),form:{},history:[],editting:"",status:"not-started"}}initList(t){this._formRef=t.detail.el,this.state=[]}initState(t,e){l(this._formRef,"external::init:state",t),e&&setTimeout(e,200)}updateListState(t){const e=t.detail;Array.isArray(e.data)&&(this.state=e.data)}updateObjectState(t){var a,i;if(Array.isArray(this.state))return;const e=t.detail;e.type==="list"?this.state={...this.state,form:{...((a=this.state)==null?void 0:a.form)||{},[e.id]:e.data}}:this.state={...this.state,form:{...((i=this.state)==null?void 0:i.form)||{},...e.data.form},history:e.data.history}}getStateList(){return this.state?Array.isArray(this.state)?this.state.length===0?[]:this.state.map(t=>Object.values(t.form).filter(e=>{var a;return((a=e==null?void 0:e.data)==null?void 0:a.type)==="details"}).map(e=>{var a;return e.data.type==="details"&&((a=e.data)==null?void 0:a.fieldsets)||{}}).reduce((e,a)=>{for(const[i,n]of Object.entries(a))e[i]=n.value;return e},{})):(console.warn("Utils:getStateList: unable to update the state of a non-multi form type",this.state),[]):[]}getStateValue(t,e){if(Array.isArray(this.state))return console.error("getStateValue: unable to update the state of a multi form type"),"";if(!this.state)return console.error("getStateValue: state has not yet been set"),"";const a=this.state.form[t].data;return a.type!=="details"?"":a.fieldsets[e].value}continueTo(t){if(!t){console.error("continueTo [name] is undefined");return}l(this._formRef,"external::continue",{next:t})}validate(t,e,a){var o;const{el:i,state:n}=e.detail,s=(o=n==null?void 0:n[t])==null?void 0:o.value;window.scrollTo({top:0,behavior:"smooth"});for(const m of a){const b=m(s);if(g(this,d,V).call(this,i,t,b),b)return[!1,""]}return[!0,s]}edit(t){l(this._formRef,"external::alter:state",{index:t,operation:"edit"})}remove(t){l(this._formRef,"external::alter:state",{index:t,operation:"remove"})}clean(t){return t.history.reduce((e,a)=>(e[a]=t.form[a],e),{})}}d=new WeakSet,L=function(t){var e;Array.isArray(t.data)&&(Array.isArray(this.state)||(this.state={...this.state,form:{...((e=this.state)==null?void 0:e.form)||{},[t.id]:t.data}}))},V=function(t,e,a){t.dispatchEvent(new CustomEvent("msg",{composed:!0,detail:{action:"external::set:error",data:{name:e,msg:a}}}))};function q(r,t,e,a){if(!r){console.error("dispatch element is null");return}r.dispatchEvent(new CustomEvent(t,{composed:!0,bubbles:a==null?void 0:a.bubbles,detail:e}))}function l(r,t,e,a){if(!r){console.error("dispatch element is null");return}r.dispatchEvent(new CustomEvent("msg",{composed:!0,bubbles:a==null?void 0:a.bubbles,detail:{action:t,data:e}}))}exports.FormValidator=S;exports.PublicFormController=C;exports.SINValidator=R;exports.birthDayValidator=E;exports.birthMonthValidator=N;exports.birthYearValidator=w;exports.dateValidator=x;exports.dispatch=q;exports.emailValidator=_;exports.lengthValidator=I;exports.numericValidator=h;exports.phoneNumberValidator=D;exports.postalCodeValidator=$;exports.regexValidator=c;exports.relay=l;exports.requiredValidator=f;
1
+ "use strict";var v=Object.defineProperty;var p=r=>{throw TypeError(r)};var M=(r,t,e)=>t in r?v(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var u=(r,t,e)=>M(r,typeof t!="symbol"?t+"":t,e),S=(r,t,e)=>t.has(r)||p("Cannot "+e);var y=(r,t,e)=>t.has(r)?p("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e);var g=(r,t,e)=>(S(r,t,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class N{constructor(t){u(this,"validators");this.validators=t||{}}add(t,...e){this.validators[t]=e}validate(t){const e={};return Object.entries(this.validators).forEach(([a,n])=>{const i=n.map(s=>s(t[a])).find(s=>!!s);i&&(e[a]=i)}),e}}function E(){return[c("Day is required"),m({min:1,max:31,minMsg:"Day must be between 1 and 31",maxMsg:"Day must be between 1 and 31"})]}function w(){return[c("Month is required"),m({min:0,max:11,minMsg:"Month must be between Jan and Dec",maxMsg:"Month must be between Jan and Dec"})]}function D(){const r=new Date().getFullYear();return[c("Year is required"),m({min:1900,max:r,minMsg:"Year must be greater than 1900",maxMsg:`Year must be less than ${r}`})]}function c(r){return t=>(r=r||"Required",typeof t=="number"&&!isNaN(t)||t?"":r)}function _(r){const t=new RegExp(/^\+?[\d-() ]{10,18}$/);return h(t,r||"Invalid phone number")}function R(r){const t=new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);return h(t,r||"Invalid email address")}function $(){return r=>{if(!r)return"";const t="121212121".split("").map(n=>parseInt(n)),e=r.replace(/\D/g,"");return e.length!==9?"SIN must contain 9 numbers":e.split("").map(n=>parseInt(n)).map((n,i)=>{const s=n*t[i];return s<10?s:`${s}`.split("").map(o=>parseInt(o)).reduce((o,f)=>o+f,0)}).reduce((n,i)=>n+i,0)%10===0?"":"Invalid SIN"}}function x(){return h(/^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][ -]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,"Invalid postal code")}function h(r,t){return e=>!e||e.match(r)?"":t}function I({invalidMsg:r,minMsg:t,maxMsg:e,min:a,max:n}={}){return i=>{let s=new Date(-1);return`${i||""}`.length===0?"":(typeof i=="string"&&(s=new Date(i)),typeof i=="number"&&(s=new Date(i)),i.toDateString&&(s=i),s.getDate()===-1?r||"Invalid date":a&&s<a?t||`Must be after ${a}`:n&&s>n?e||`Must be before ${n}`:"")}}function m({invalidTypeMsg:r,minMsg:t,maxMsg:e,min:a=-Number.MAX_VALUE,max:n=Number.MAX_VALUE}={}){return i=>{let s=Number.MAX_VALUE;return`${i??""}`.length===0?"":(typeof i=="string"&&(s=parseFloat(i)),typeof i=="number"&&(s=i),isNaN(s)?r||"Must be a numeric value":s>n?e||`Must be less than or equal to ${n}`:s<a?t||`Must be greater than or equal to ${a}`:"")}}function C({invalidTypeMsg:r,minMsg:t,maxMsg:e,min:a=-Number.MAX_VALUE,max:n=Number.MAX_VALUE}){return i=>`${i||""}`.length===0?"":typeof i!="string"?r||"Invalid type":i.length>n?e||`Must be less than ${n} characters`:i.length<a?t||`Must be greater than ${a} characters`:""}var d,q,V;class L{constructor(t){y(this,d);u(this,"state");u(this,"_formData");u(this,"_formRef");this.type=t}init(t){if(this._formRef){console.warn("init: form element has already been set");return}this._formRef=t.detail.el,this.state={uuid:crypto.randomUUID(),form:{},history:[],editting:"",status:"not-started"}}initList(t){this._formRef=t.detail.el,this.state=[]}initState(t,e){l(this._formRef,"external::init:state",t),typeof t=="string"?this.state=JSON.parse(t):Array.isArray(t)||(this.state=t),e&&setTimeout(e,200)}updateListState(t){const e=t.detail;Array.isArray(e.data)&&(this.state=e.data)}updateObjectState(t){var a,n;if(Array.isArray(this.state))return;const e=t.detail;e.type==="list"?this.state={...this.state,form:{...((a=this.state)==null?void 0:a.form)||{},[e.id]:e.data}}:this.state={...this.state,...e.data,form:{...((n=this.state)==null?void 0:n.form)||{},...e.data.form},history:e.data.history}}getStateList(){return this.state?Array.isArray(this.state)?this.state.length===0?[]:this.state.map(t=>Object.values(t.form).filter(e=>{var a;return((a=e==null?void 0:e.data)==null?void 0:a.type)==="details"}).map(e=>{var a;return e.data.type==="details"&&((a=e.data)==null?void 0:a.fieldsets)||{}}).reduce((e,a)=>{for(const[n,i]of Object.entries(a))e[n]=i.value;return e},{})):(console.warn("Utils:getStateList: unable to update the state of a non-multi form type",this.state),[]):[]}getStateValue(t,e){if(Array.isArray(this.state))return console.error("getStateValue: unable to update the state of a multi form type"),"";if(!this.state)return console.error("getStateValue: state has not yet been set"),"";const a=this.state.form[t].data;return a.type!=="details"?"":a.fieldsets[e].value}continueTo(t){if(!t){console.error("continueTo [name] is undefined");return}l(this._formRef,"external::continue",{next:t})}validate(t,e,a){var f;const{el:n,state:i,cancelled:s}=e.detail,o=(f=i==null?void 0:i[t])==null?void 0:f.value;if(window.scrollTo({top:0,behavior:"smooth"}),s)return[!0,o];for(const A of a){const b=A(o);if(g(this,d,V).call(this,n,t,b),b)return[!1,""]}return[!0,o]}edit(t){l(this._formRef,"external::alter:state",{index:t,operation:"edit"})}remove(t){l(this._formRef,"external::alter:state",{index:t,operation:"remove"})}clean(t){return t.history.reduce((e,a)=>(e[a]=t.form[a],e),{})}}d=new WeakSet,q=function(t){var e;Array.isArray(t.data)&&(Array.isArray(this.state)||(this.state={...this.state,form:{...((e=this.state)==null?void 0:e.form)||{},[t.id]:t.data}}))},V=function(t,e,a){t.dispatchEvent(new CustomEvent("msg",{composed:!0,detail:{action:"external::set:error",data:{name:e,msg:a}}}))};function T(r,t,e,a){if(!r){console.error("dispatch element is null");return}r.dispatchEvent(new CustomEvent(t,{composed:!0,bubbles:a==null?void 0:a.bubbles,detail:e}))}function l(r,t,e,a){if(!r){console.error("dispatch element is null");return}r.dispatchEvent(new CustomEvent("msg",{composed:!0,bubbles:a==null?void 0:a.bubbles,detail:{action:t,data:e}}))}exports.FormValidator=N;exports.PublicFormController=L;exports.SINValidator=$;exports.birthDayValidator=E;exports.birthMonthValidator=w;exports.birthYearValidator=D;exports.dateValidator=I;exports.dispatch=T;exports.emailValidator=R;exports.lengthValidator=C;exports.numericValidator=m;exports.phoneNumberValidator=_;exports.postalCodeValidator=x;exports.regexValidator=h;exports.relay=l;exports.requiredValidator=c;
package/index.js CHANGED
@@ -1,12 +1,12 @@
1
- var V = Object.defineProperty;
1
+ var v = Object.defineProperty;
2
2
  var p = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var v = (r, t, e) => t in r ? V(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
6
- var u = (r, t, e) => v(r, typeof t != "symbol" ? t + "" : t, e), M = (r, t, e) => t.has(r) || p("Cannot " + e);
5
+ var M = (r, t, e) => t in r ? v(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
6
+ var u = (r, t, e) => M(r, typeof t != "symbol" ? t + "" : t, e), S = (r, t, e) => t.has(r) || p("Cannot " + e);
7
7
  var y = (r, t, e) => t.has(r) ? p("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e);
8
- var g = (r, t, e) => (M(r, t, "access private method"), e);
9
- class w {
8
+ var g = (r, t, e) => (S(r, t, "access private method"), e);
9
+ class N {
10
10
  constructor(t) {
11
11
  u(this, "validators");
12
12
  this.validators = t || {};
@@ -22,7 +22,7 @@ class w {
22
22
  }), e;
23
23
  }
24
24
  }
25
- function N() {
25
+ function _() {
26
26
  return [
27
27
  c("Day is required"),
28
28
  m({
@@ -33,7 +33,7 @@ function N() {
33
33
  })
34
34
  ];
35
35
  }
36
- function _() {
36
+ function D() {
37
37
  return [
38
38
  c("Month is required"),
39
39
  m({
@@ -44,7 +44,7 @@ function _() {
44
44
  })
45
45
  ];
46
46
  }
47
- function D() {
47
+ function R() {
48
48
  const r = (/* @__PURE__ */ new Date()).getFullYear();
49
49
  return [
50
50
  c("Year is required"),
@@ -59,27 +59,27 @@ function D() {
59
59
  function c(r) {
60
60
  return (t) => (r = r || "Required", typeof t == "number" && !isNaN(t) || t ? "" : r);
61
61
  }
62
- function R(r) {
62
+ function $(r) {
63
63
  const t = new RegExp(/^\+?[\d-() ]{10,18}$/);
64
64
  return h(t, r || "Invalid phone number");
65
65
  }
66
- function $(r) {
66
+ function x(r) {
67
67
  const t = new RegExp(
68
68
  /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
69
69
  );
70
70
  return h(t, r || "Invalid email address");
71
71
  }
72
- function x() {
72
+ function I() {
73
73
  return (r) => {
74
74
  if (!r) return "";
75
75
  const t = "121212121".split("").map((i) => parseInt(i)), e = r.replace(/\D/g, "");
76
76
  return e.length !== 9 ? "SIN must contain 9 numbers" : e.split("").map((i) => parseInt(i)).map((i, n) => {
77
77
  const s = i * t[n];
78
- return s < 10 ? s : `${s}`.split("").map((o) => parseInt(o)).reduce((o, d) => o + d, 0);
78
+ return s < 10 ? s : `${s}`.split("").map((o) => parseInt(o)).reduce((o, l) => o + l, 0);
79
79
  }).reduce((i, n) => i + n, 0) % 10 === 0 ? "" : "Invalid SIN";
80
80
  };
81
81
  }
82
- function I() {
82
+ function L() {
83
83
  return h(
84
84
  /^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][ -]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,
85
85
  "Invalid postal code"
@@ -88,7 +88,7 @@ function I() {
88
88
  function h(r, t) {
89
89
  return (e) => !e || e.match(r) ? "" : t;
90
90
  }
91
- function L({
91
+ function C({
92
92
  invalidMsg: r,
93
93
  minMsg: t,
94
94
  maxMsg: e,
@@ -112,7 +112,7 @@ function m({
112
112
  return `${n ?? ""}`.length === 0 ? "" : (typeof n == "string" && (s = parseFloat(n)), typeof n == "number" && (s = n), isNaN(s) ? r || "Must be a numeric value" : s > i ? e || `Must be less than or equal to ${i}` : s < a ? t || `Must be greater than or equal to ${a}` : "");
113
113
  };
114
114
  }
115
- function C({
115
+ function U({
116
116
  invalidTypeMsg: r,
117
117
  minMsg: t,
118
118
  maxMsg: e,
@@ -121,10 +121,10 @@ function C({
121
121
  }) {
122
122
  return (n) => `${n || ""}`.length === 0 ? "" : typeof n != "string" ? r || "Invalid type" : n.length > i ? e || `Must be less than ${i} characters` : n.length < a ? t || `Must be greater than ${a} characters` : "";
123
123
  }
124
- var l, S, A;
125
- class U {
124
+ var f, E, A;
125
+ class q {
126
126
  constructor(t) {
127
- y(this, l);
127
+ y(this, f);
128
128
  u(this, "state");
129
129
  u(this, "_formData");
130
130
  u(this, "_formRef");
@@ -149,7 +149,7 @@ class U {
149
149
  }
150
150
  // Public method to allow for the initialization of the state
151
151
  initState(t, e) {
152
- f(this._formRef, "external::init:state", t), e && setTimeout(e, 200);
152
+ d(this._formRef, "external::init:state", t), typeof t == "string" ? this.state = JSON.parse(t) : Array.isArray(t) || (this.state = t), e && setTimeout(e, 200);
153
153
  }
154
154
  updateListState(t) {
155
155
  const e = t.detail;
@@ -165,6 +165,7 @@ class U {
165
165
  form: { ...((a = this.state) == null ? void 0 : a.form) || {}, [e.id]: e.data }
166
166
  } : this.state = {
167
167
  ...this.state,
168
+ ...e.data,
168
169
  form: { ...((i = this.state) == null ? void 0 : i.form) || {}, ...e.data.form },
169
170
  history: e.data.history
170
171
  };
@@ -222,32 +223,33 @@ class U {
222
223
  console.error("continueTo [name] is undefined");
223
224
  return;
224
225
  }
225
- f(this._formRef, "external::continue", { next: t });
226
+ d(this._formRef, "external::continue", { next: t });
226
227
  }
227
228
  // Public method to perform validation and send the appropriate messages to the form elements
228
229
  validate(t, e, a) {
229
- var o;
230
- const { el: i, state: n } = e.detail, s = (o = n == null ? void 0 : n[t]) == null ? void 0 : o.value;
231
- window.scrollTo({ top: 0, behavior: "smooth" });
232
- for (const d of a) {
233
- const b = d(s);
234
- if (g(this, l, A).call(this, i, t, b), b)
230
+ var l;
231
+ const { el: i, state: n, cancelled: s } = e.detail, o = (l = n == null ? void 0 : n[t]) == null ? void 0 : l.value;
232
+ if (window.scrollTo({ top: 0, behavior: "smooth" }), s)
233
+ return [!0, o];
234
+ for (const V of a) {
235
+ const b = V(o);
236
+ if (g(this, f, A).call(this, i, t, b), b)
235
237
  return [!1, ""];
236
238
  }
237
- return [!0, s];
239
+ return [!0, o];
238
240
  }
239
241
  edit(t) {
240
- f(this._formRef, "external::alter:state", { index: t, operation: "edit" });
242
+ d(this._formRef, "external::alter:state", { index: t, operation: "edit" });
241
243
  }
242
244
  remove(t) {
243
- f(this._formRef, "external::alter:state", { index: t, operation: "remove" });
245
+ d(this._formRef, "external::alter:state", { index: t, operation: "remove" });
244
246
  }
245
247
  // removes any data collected that doesn't correspond with the final history path
246
248
  clean(t) {
247
249
  return t.history.reduce((e, a) => (e[a] = t.form[a], e), {});
248
250
  }
249
251
  }
250
- l = new WeakSet(), S = function(t) {
252
+ f = new WeakSet(), E = function(t) {
251
253
  var e;
252
254
  Array.isArray(t.data) && (Array.isArray(this.state) || (this.state = {
253
255
  ...this.state,
@@ -271,7 +273,7 @@ A = function(t, e, a) {
271
273
  })
272
274
  );
273
275
  };
274
- function q(r, t, e, a) {
276
+ function T(r, t, e, a) {
275
277
  if (!r) {
276
278
  console.error("dispatch element is null");
277
279
  return;
@@ -284,7 +286,7 @@ function q(r, t, e, a) {
284
286
  })
285
287
  );
286
288
  }
287
- function f(r, t, e, a) {
289
+ function d(r, t, e, a) {
288
290
  if (!r) {
289
291
  console.error("dispatch element is null");
290
292
  return;
@@ -301,20 +303,20 @@ function f(r, t, e, a) {
301
303
  );
302
304
  }
303
305
  export {
304
- w as FormValidator,
305
- U as PublicFormController,
306
- x as SINValidator,
307
- N as birthDayValidator,
308
- _ as birthMonthValidator,
309
- D as birthYearValidator,
310
- L as dateValidator,
311
- q as dispatch,
312
- $ as emailValidator,
313
- C as lengthValidator,
306
+ N as FormValidator,
307
+ q as PublicFormController,
308
+ I as SINValidator,
309
+ _ as birthDayValidator,
310
+ D as birthMonthValidator,
311
+ R as birthYearValidator,
312
+ C as dateValidator,
313
+ T as dispatch,
314
+ x as emailValidator,
315
+ U as lengthValidator,
314
316
  m as numericValidator,
315
- R as phoneNumberValidator,
316
- I as postalCodeValidator,
317
+ $ as phoneNumberValidator,
318
+ L as postalCodeValidator,
317
319
  h as regexValidator,
318
- f as relay,
320
+ d as relay,
319
321
  c as requiredValidator
320
322
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/ui-components-common",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-alpha.1",
4
4
  "bugs": {
5
5
  "url": "https://github.com/GovAlta/ui-components/issues"
6
6
  },