diff --git a/docs/assets/ActionChip-73b76eea.js b/docs/assets/ActionChip-5afeb099.js similarity index 55% rename from docs/assets/ActionChip-73b76eea.js rename to docs/assets/ActionChip-5afeb099.js index c3ace86f..fb57d88f 100644 --- a/docs/assets/ActionChip-73b76eea.js +++ b/docs/assets/ActionChip-5afeb099.js @@ -1,2 +1,2 @@ -var _=Object.defineProperty;var m=(t,e,a)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var n=(t,e,a)=>(m(t,typeof e!="symbol"?e+"":e,a),a);import{V as d}from"./vue.esm-b1e57a2f.js";import{C as u,P as E,n as v}from"./_plugin-vue2_normalizer-b11a0120.js";var D=(t=>(t.ADDED="ADDED",t.ADDRESS_CHANGED="ADDRESS CHANGED",t.CORRECTED="CORRECTED",t.EDITED="EDITED",t.EMAIL_CHANGED="EMAIL CHANGED",t.NAME_CHANGED="NAME CHANGED",t.REMOVED="REMOVED",t.REPLACED="REPLACED",t))(D||{}),f=Object.defineProperty,A=Object.getOwnPropertyDescriptor,c=(t,e,a,r)=>{for(var o=r>1?void 0:r?A(e,a):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,a,o):s(o))||o);return r&&o&&f(e,a,o),o};let l=class extends d{constructor(){super(...arguments);n(this,"actionableItem");n(this,"editedLabel");n(this,"ActionTypes",D)}};c([E({default:{}})],l.prototype,"actionableItem",2);c([E({default:"EDITED"})],l.prototype,"editedLabel",2);l=c([u({})],l);var C=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("div",[e.actionableItem.action===e.ActionTypes.ADDED?a("v-chip",{attrs:{id:"added-chip","x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" ADDED ")]):e._e(),e.actionableItem.action===e.ActionTypes.EDITED?a("v-chip",{attrs:{id:"edited-chip","x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" "+e._s(e.editedLabel)+" ")]):e._e(),e.actionableItem.action===e.ActionTypes.REMOVED?a("v-chip",{attrs:{id:"removed-chip","x-small":"",label:"",color:"#E0E0E0","text-color":"#212529"}},[e._v(" REMOVED ")]):e._e()],1)},h=[],p=v(l,C,h,!1,null,null,null,null);const N=p.exports;p.exports.__docgenInfo={exportName:"default",displayName:"ActionChip",description:"",tags:{},props:[{name:"actionableItem",tags:{},type:{name:"ActionableItemIF"},defaultValue:{func:!1,value:"{}"}},{name:"editedLabel",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'EDITED'"}}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/action-chip/ActionChip.vue"]};export{D as A,N as a}; -//# sourceMappingURL=ActionChip-73b76eea.js.map +var _=Object.defineProperty;var d=(t,e,a)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var n=(t,e,a)=>(d(t,typeof e!="symbol"?e+"":e,a),a);import{V as m}from"./vue.esm-b1e57a2f.js";import{C as u,P as E,n as f}from"./_plugin-vue2_normalizer-b11a0120.js";var D=(t=>(t.ADDED="ADDED",t.ADDRESS_CHANGED="ADDRESS CHANGED",t.CORRECTED="CORRECTED",t.EDITED="EDITED",t.EMAIL_CHANGED="EMAIL CHANGED",t.NAME_CHANGED="NAME CHANGED",t.REMOVED="REMOVED",t.REPLACED="REPLACED",t))(D||{}),v=Object.defineProperty,A=Object.getOwnPropertyDescriptor,s=(t,e,a,r)=>{for(var o=r>1?void 0:r?A(e,a):e,i=t.length-1,c;i>=0;i--)(c=t[i])&&(o=(r?c(e,a,o):c(o))||o);return r&&o&&v(e,a,o),o};let l=class extends m{constructor(){super(...arguments);n(this,"actionableItem");n(this,"editedLabel");n(this,"ActionTypes",D)}};s([E({default:{}})],l.prototype,"actionableItem",2);s([E({default:"EDITED"})],l.prototype,"editedLabel",2);l=s([u({})],l);var C=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("div",[e.actionableItem.action===e.ActionTypes.ADDED?a("v-chip",{attrs:{id:"added-chip","x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" ADDED ")]):e._e(),e.actionableItem.action===e.ActionTypes.EDITED?a("v-chip",{attrs:{id:"edited-chip","x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" "+e._s(e.editedLabel)+" ")]):e._e(),e.actionableItem.action===e.ActionTypes.REMOVED?a("v-chip",{attrs:{id:"removed-chip","x-small":"",label:"",color:"#E0E0E0","text-color":"#212529"}},[e._v(" REMOVED ")]):e._e()],1)},h=[],p=f(l,C,h,!1,null,null,null,null);const N=p.exports;p.exports.__docgenInfo={exportName:"default",displayName:"ActionChip",description:"",tags:{},props:[{name:"actionableItem",tags:{},type:{name:"ActionableItemIF"},defaultValue:{func:!1,value:"{}"}},{name:"editedLabel",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'EDITED'"}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/action-chip/ActionChip.vue"]};export{D as A,N as a}; +//# sourceMappingURL=ActionChip-5afeb099.js.map diff --git a/docs/assets/ActionChip-73b76eea.js.map b/docs/assets/ActionChip-5afeb099.js.map similarity index 97% rename from docs/assets/ActionChip-73b76eea.js.map rename to docs/assets/ActionChip-5afeb099.js.map index 02724059..4db98b39 100644 --- a/docs/assets/ActionChip-73b76eea.js.map +++ b/docs/assets/ActionChip-5afeb099.js.map @@ -1 +1 @@ -{"version":3,"file":"ActionChip-73b76eea.js","sources":["../../src/enums/action-types.ts","../../src/components/action-chip/ActionChip.vue"],"sourcesContent":["/**\n * Enums for action types, used by:\n * - Action Chip (shared component)\n * - Name Translations (Edit UI)\n * - People And Roles (Edit UI)\n * - Share Structure (shared component and Edit UI)\n */\nexport enum ActionTypes {\n ADDED = 'ADDED',\n ADDRESS_CHANGED = 'ADDRESS CHANGED',\n CORRECTED = 'CORRECTED',\n EDITED = 'EDITED',\n EMAIL_CHANGED = 'EMAIL CHANGED',\n NAME_CHANGED = 'NAME CHANGED',\n REMOVED = 'REMOVED',\n REPLACED = 'REPLACED'\n}\n","\n\n\n"],"names":["ActionTypes","ActionChip","Vue","__publicField","__decorateClass","Prop","Component"],"mappings":"0RAOY,IAAAA,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,gBAAkB,kBAClBA,EAAA,UAAY,YACZA,EAAA,OAAS,SACTA,EAAA,cAAgB,gBAChBA,EAAA,aAAe,eACfA,EAAA,QAAU,UACVA,EAAA,SAAW,WARDA,IAAAA,GAAA,CAAA,CAAA,8LCmCZ,IAAAC,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,uBAEAA,EAAA,oBAGAA,EAAA,mBAAAH,GACA,EANAI,EAAA,CAAAC,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EADAJ,EACA,UAAA,iBAAA,CAAA,EAEAG,EAAA,CAAAC,EAAA,CAAA,QAAA,SAAA,CAAA,EAHAJ,EAGA,UAAA,cAAA,CAAA,EAHAA,EAAAG,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAL,CAAA"} \ No newline at end of file +{"version":3,"file":"ActionChip-5afeb099.js","sources":["../../src/enums/action-types.ts","../../src/components/action-chip/ActionChip.vue"],"sourcesContent":["/**\n * Enums for action types, used by:\n * - Action Chip (shared component)\n * - Name Translations (Edit UI)\n * - People And Roles (Edit UI)\n * - Share Structure (shared component and Edit UI)\n */\nexport enum ActionTypes {\n ADDED = 'ADDED',\n ADDRESS_CHANGED = 'ADDRESS CHANGED',\n CORRECTED = 'CORRECTED',\n EDITED = 'EDITED',\n EMAIL_CHANGED = 'EMAIL CHANGED',\n NAME_CHANGED = 'NAME CHANGED',\n REMOVED = 'REMOVED',\n REPLACED = 'REPLACED'\n}\n","\n\n\n"],"names":["ActionTypes","ActionChip","Vue","__publicField","__decorateClass","Prop","Component"],"mappings":"0RAOY,IAAAA,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,gBAAkB,kBAClBA,EAAA,UAAY,YACZA,EAAA,OAAS,SACTA,EAAA,cAAgB,gBAChBA,EAAA,aAAe,eACfA,EAAA,QAAU,UACVA,EAAA,SAAW,WARDA,IAAAA,GAAA,CAAA,CAAA,8LCmCZ,IAAAC,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,uBAEAA,EAAA,oBAGAA,EAAA,mBAAAH,GACA,EANAI,EAAA,CAAAC,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EADAJ,EACA,UAAA,iBAAA,CAAA,EAEAG,EAAA,CAAAC,EAAA,CAAA,QAAA,SAAA,CAAA,EAHAJ,EAGA,UAAA,cAAA,CAAA,EAHAA,EAAAG,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAL,CAAA"} \ No newline at end of file diff --git a/docs/assets/ActionChip.stories-87d18713.js b/docs/assets/ActionChip.stories-1a32d606.js similarity index 95% rename from docs/assets/ActionChip.stories-87d18713.js rename to docs/assets/ActionChip.stories-1a32d606.js index 5f6678cf..844a5835 100644 --- a/docs/assets/ActionChip.stories-87d18713.js +++ b/docs/assets/ActionChip.stories-1a32d606.js @@ -1,4 +1,4 @@ -import{A as a,a as T}from"./ActionChip-73b76eea.js";import{V as h}from"./vuetify-b9fb25b0.js";import"./vue.esm-b1e57a2f.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./_commonjsHelpers-de833af9.js";const k={title:"component/ActionChip"},s=(E,{argTypes:v})=>({vuetify:new h({iconfont:"mdi"}),props:Object.keys(v),components:{ActionChip:T},template:''}),C={action:a.ADDED},w={action:a.REMOVED},A={action:a.EDITED},e=s.bind({});e.args={actionableItem:C};const o=s.bind({});o.args={actionableItem:w};const t=s.bind({});t.args={actionableItem:A,editedLabel:"CHANGED"};const r=s.bind({});r.args={actionableItem:A,editedLabel:"CORRECTED"};var i,c,p;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`(args, { +import{A as a,a as T}from"./ActionChip-5afeb099.js";import{V as h}from"./vuetify-b9fb25b0.js";import"./vue.esm-b1e57a2f.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./_commonjsHelpers-de833af9.js";const k={title:"component/ActionChip"},s=(E,{argTypes:v})=>({vuetify:new h({iconfont:"mdi"}),props:Object.keys(v),components:{ActionChip:T},template:''}),C={action:a.ADDED},w={action:a.REMOVED},A={action:a.EDITED},e=s.bind({});e.args={actionableItem:C};const o=s.bind({});o.args={actionableItem:w};const t=s.bind({});t.args={actionableItem:A,editedLabel:"CHANGED"};const r=s.bind({});r.args={actionableItem:A,editedLabel:"CORRECTED"};var i,c,p;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`(args, { argTypes }) => ({ vuetify: new Vuetify({ @@ -43,4 +43,4 @@ import{A as a,a as T}from"./ActionChip-73b76eea.js";import{V as h}from"./vuetify }, template: '' // $props comes from args below })`,...(f=(u=r.parameters)==null?void 0:u.docs)==null?void 0:f.source}}};const I=["added","removed","editedAlteration","editedCorrection"];export{I as __namedExportsOrder,e as added,k as default,t as editedAlteration,r as editedCorrection,o as removed}; -//# sourceMappingURL=ActionChip.stories-87d18713.js.map +//# sourceMappingURL=ActionChip.stories-1a32d606.js.map diff --git a/docs/assets/ActionChip.stories-87d18713.js.map b/docs/assets/ActionChip.stories-1a32d606.js.map similarity index 58% rename from docs/assets/ActionChip.stories-87d18713.js.map rename to docs/assets/ActionChip.stories-1a32d606.js.map index e7e309bf..e902db1d 100644 --- a/docs/assets/ActionChip.stories-87d18713.js.map +++ b/docs/assets/ActionChip.stories-1a32d606.js.map @@ -1 +1 @@ -{"version":3,"file":"ActionChip.stories-87d18713.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"ActionChip.stories-1a32d606.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/ApprovalType.stories-11cee397.css b/docs/assets/ApprovalType.stories-11cee397.css deleted file mode 100644 index 6414ff47..00000000 --- a/docs/assets/ApprovalType.stories-11cee397.css +++ /dev/null @@ -1 +0,0 @@ -[data-v-01a2b9cc] .v-card__actions{justify-content:flex-end}[data-v-01a2b9cc] .v-input .v-label,[data-v-01a2b9cc] .theme--light.v-input input{font-weight:400;color:#495057} diff --git a/docs/assets/ApprovalType.stories-48b70947.js.map b/docs/assets/ApprovalType.stories-48b70947.js.map deleted file mode 100644 index 411efc9e..00000000 --- a/docs/assets/ApprovalType.stories-48b70947.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ApprovalType.stories-48b70947.js","sources":["../../src/enums/approval-types.ts","../../src/components/approval-type/ApprovalType.vue"],"sourcesContent":["/** Restoration approval types. */\nexport enum ApprovalTypes {\n VIA_COURT_ORDER = 'courtOrder',\n VIA_REGISTRAR = 'registrar'\n}\n","\n\n\n\n\n"],"names":["ApprovalTypes","ApprovalType","Vue","__publicField","v","status","event","option","noticeDate","applicationDate","__decorateClass","Prop","Emit","Component","DatePicker"],"mappings":"qdACY,IAAAA,GAAAA,IACVA,EAAA,gBAAkB,aAClBA,EAAA,cAAgB,YAFNA,IAAAA,GAAA,CAAA,CAAA,8LCgHZ,IAAAC,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,cAKAA,EAAA,yBAGAA,EAAA,4BAGAA,EAAA,mBAGAA,EAAA,yBAGAA,EAAA,mBAGAA,EAAA,wBAGAA,EAAA,uBAGAA,EAAA,0BAGAA,EAAA,4BAAA,IACAA,EAAA,aAAA,IACAA,EAAA,4BAAA,IACAA,EAAA,sBAAA,IACAA,EAAA,2BAAA,IAGAA,EAAA,qBAAAH,GAGAG,EAAA,uBAAA,CAAAC,GAAA,CAAA,CAAAA,GAAA,kBAAA,GAGAD,EAAA,0BAAA,CACAC,GAAA,CAAAA,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,CAAAA,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,CAAAA,GAAA,EAAAA,EAAA,OAAA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000000..0e7db90e --- /dev/null +++ b/docs/assets/ApprovalType.stories-7ebc78bd.css @@ -0,0 +1 @@ +[data-v-6d543a84] .v-card__actions{justify-content:flex-end}[data-v-6d543a84] .v-input .v-label,[data-v-6d543a84] .theme--light.v-input input{font-weight:400;color:#495057} diff --git a/docs/assets/ApprovalType.stories-48b70947.js b/docs/assets/ApprovalType.stories-d422646b.js similarity index 58% rename from docs/assets/ApprovalType.stories-48b70947.js rename to docs/assets/ApprovalType.stories-d422646b.js index 7bd62644..c91bed8f 100644 --- a/docs/assets/ApprovalType.stories-48b70947.js +++ b/docs/assets/ApprovalType.stories-d422646b.js @@ -1,6 +1,6 @@ -var z=Object.defineProperty;var q=(o,t,e)=>t in o?z(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var a=(o,t,e)=>(q(o,typeof t!="symbol"?t+"":t,e),e);import{V as H}from"./vue.esm-b1e57a2f.js";import{C as J,P as n,E as h,n as K}from"./_plugin-vue2_normalizer-b11a0120.js";import{D as L}from"./DatePicker-bfb2acbc.js";import"./Watch-62f8b699.js";import"./validation-mixin-2ad1b825.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var p=(o=>(o.VIA_COURT_ORDER="courtOrder",o.VIA_REGISTRAR="registrar",o))(p||{}),M=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,i=(o,t,e,r)=>{for(var l=r>1?void 0:r?Q(t,e):t,R=o.length-1,T;R>=0;R--)(T=o[R])&&(l=(r?T(t,e,l):T(l))||l);return r&&l&&M(t,e,l),l};let s=class extends H{constructor(){super(...arguments);a(this,"$refs");a(this,"courtOrderNumber");a(this,"approvedByRegistrar");a(this,"filingType");a(this,"isCourtOrderOnly");a(this,"noticeDate");a(this,"applicationDate");a(this,"invalidSection");a(this,"isCourtOrderRadio");a(this,"courtOrderNumberText","");a(this,"valid",!1);a(this,"approvalTypeSelected","");a(this,"noticeDateText","");a(this,"applicationDateText","");a(this,"ApprovalTypes",p);a(this,"datePickerRules",[e=>!!e||"Date is required"]);a(this,"courtOrderNumRules",[e=>!e||!/^\s/g.test(e)||"Invalid spaces",e=>!e||!/\s$/g.test(e)||"Invalid spaces",e=>!e||!(e.length<5)||"Court order number is invalid",e=>!e||!(e.length>20)||"Court order number is invalid",e=>!!e||"A Court Order number is required"])}mounted(){this.approvedByRegistrar?(this.courtOrderNumberText="",this.approvalTypeSelected=p.VIA_REGISTRAR):this.courtOrderNumber?(this.courtOrderNumberText=this.courtOrderNumber,this.approvalTypeSelected=p.VIA_COURT_ORDER):this.radioButtonChanged(""),this.isCourtOrderRadio||(this.approvalTypeSelected=p.VIA_COURT_ORDER)}validate(){if(this.approvalTypeSelected===p.VIA_COURT_ORDER){let e=this.$refs.courtNumRef.validate();return this.$emit("valid",e),e}else if(this.approvalTypeSelected===p.VIA_REGISTRAR){let e=!!this.noticeDateText&&!!this.applicationDateText;return this.$emit("valid",e),e}else return!1}emitValidationError(e){this.$emit("valid",!e)}radioButtonChanged(e){e===p.VIA_REGISTRAR?(this.courtOrderNumberText="",this.courtOrderNumberChanged("")):e===p.VIA_COURT_ORDER?(this.noticeDateChanged(""),this.applicationDateChanged(""),this.$emit("valid",!1)):this.$emit("valid",!1)}courtOrderNumberChanged(e){this.validate()}getRadioText(e){return e===p.VIA_COURT_ORDER&&this.isCourtOrderRadio?`This ${this.filingType} is approved by court order.`:e===p.VIA_COURT_ORDER&&!this.isCourtOrderRadio?"Enter a Court Order number, as the restoration of this company was ordered by the court:":e===p.VIA_REGISTRAR?`This ${this.filingType} is approved by registrar.`:"[error]"}noticeDateChanged(e){return this.noticeDateText=e,this.validate(),e}applicationDateChanged(e){return this.applicationDateText=e,this.validate(),e}};i([n({default:""})],s.prototype,"courtOrderNumber",2);i([n({default:!1})],s.prototype,"approvedByRegistrar",2);i([n({default:"restoration"})],s.prototype,"filingType",2);i([n({default:!1})],s.prototype,"isCourtOrderOnly",2);i([n({default:""})],s.prototype,"noticeDate",2);i([n({default:""})],s.prototype,"applicationDate",2);i([n({default:!1})],s.prototype,"invalidSection",2);i([n({default:!0})],s.prototype,"isCourtOrderRadio",2);i([h("radioButtonChange")],s.prototype,"radioButtonChanged",1);i([h("courtNumberChange")],s.prototype,"courtOrderNumberChanged",1);i([h("update:noticeDate")],s.prototype,"noticeDateChanged",1);i([h("update:applicationDate")],s.prototype,"applicationDateChanged",1);s=i([J({components:{DatePicker:L}})],s);var X=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{attrs:{id:"approval-type"}},[e("v-row",{attrs:{"no-gutters":""}},[e("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[e("label",{class:{"error-text":t.invalidSection}},[t._v("Approval Type")])]),e("v-col",{staticClass:"mt-n4",attrs:{cols:"12",sm:"9"}},[e("v-radio-group",{staticClass:"payment-group pt-0",on:{change:t.radioButtonChanged},model:{value:t.approvalTypeSelected,callback:function(r){t.approvalTypeSelected=r},expression:"approvalTypeSelected"}},[t.isCourtOrderRadio?[e("v-radio",{staticClass:"mb-0",attrs:{id:"court-order-radio",label:t.getRadioText(t.ApprovalTypes.VIA_COURT_ORDER),value:t.ApprovalTypes.VIA_COURT_ORDER}})]:[e("span",{staticClass:"v-label ml-2"},[t._v(t._s(t.getRadioText(t.ApprovalTypes.VIA_COURT_ORDER)))])],e("v-form",{ref:"courtNumRef",staticClass:"mt-8 ml-2",attrs:{id:"court-num-form"},model:{value:t.valid,callback:function(r){t.valid=r},expression:"valid"}},[e("v-expand-transition",{staticClass:"pb-0 mb-0"},[t.approvalTypeSelected===t.ApprovalTypes.VIA_COURT_ORDER?e("v-text-field",{attrs:{id:"court-order-number-input",label:"Court Order Number",rules:t.courtOrderNumRules,"hide-details":"auto",filled:""},on:{input:t.courtOrderNumberChanged,"update:error":function(r){return t.emitValidationError(r)}},model:{value:t.courtOrderNumberText,callback:function(r){t.courtOrderNumberText=r},expression:"courtOrderNumberText"}}):t._e()],1)],1),t.isCourtOrderOnly?t._e():e("v-radio",{staticClass:"mb-n5 pt-2",attrs:{id:"registrar-radio",label:t.getRadioText(t.ApprovalTypes.VIA_REGISTRAR),value:t.ApprovalTypes.VIA_REGISTRAR}}),e("v-expand-transition",[t.approvalTypeSelected===t.ApprovalTypes.VIA_REGISTRAR?e("div",{attrs:{flat:""}},[e("div",{staticClass:"ml-8 mt-3"},[e("span",{staticClass:"v-label"},[t._v("Enter the date the Notice of the Application for Restoration was published in the BC Gazette: ")]),e("DatePicker",{ref:"noticeDateRef",staticClass:"mt-2",attrs:{id:"date-picker-notice",title:"Select Date",nudgeRight:150,initialValue:t.noticeDate,inputRules:t.datePickerRules},on:{emitDateSync:function(r){return t.noticeDateChanged(r)}}})],1),e("div",{staticClass:"ml-8"},[e("span",{staticClass:"v-label"},[t._v("Enter the date the Application for Restoration was mailed to the company:")]),e("DatePicker",{ref:"applicationDateRef",staticClass:"mt-2",attrs:{id:"date-picker-application",title:"Select Date",nudgeRight:150,initialValue:t.applicationDate,inputRules:t.datePickerRules},on:{emitDateSync:function(r){return t.applicationDateChanged(r)}}})],1)]):t._e()])],2)],1)],1)],1)},Y=[],F=K(s,X,Y,!1,null,"01a2b9cc",null,null);const Z=F.exports;F.exports.__docgenInfo={exportName:"default",displayName:"ApprovalType",description:"",tags:{},props:[{name:"courtOrderNumber",tags:{},description:"Draft court order number.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"approvedByRegistrar",tags:{},description:"Whether approved by the registrar.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"filingType",tags:{},description:"filing name used in radio options.",type:{name:"string"},defaultValue:{func:!1,value:"'restoration'"}},{name:"isCourtOrderOnly",tags:{},description:"Show only the court order option; remove via registrar option.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"noticeDate",tags:{},description:"Draft notice date.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"applicationDate",tags:{},description:"Draft application date.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"invalidSection",tags:{},description:"Whether this section is invalid.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isCourtOrderRadio",tags:{},description:"Whether the display of court order section is a radio button.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}}],events:[{name:"valid",type:{names:["undefined"]}},{name:"radioButtonChange"},{name:"courtNumberChange"},{name:"update:noticeDate",description:`Emit the date the notice of the application for restoration was published in the BC Gazette. +var z=Object.defineProperty;var q=(o,t,e)=>t in o?z(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var a=(o,t,e)=>(q(o,typeof t!="symbol"?t+"":t,e),e);import{V as H}from"./vue.esm-b1e57a2f.js";import{C as J,P as n,E as h,n as K}from"./_plugin-vue2_normalizer-b11a0120.js";import{D as L}from"./DatePicker-6653e1e3.js";import"./Watch-62f8b699.js";import"./validation-mixin-e5d1d708.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var p=(o=>(o.VIA_COURT_ORDER="courtOrder",o.VIA_REGISTRAR="registrar",o))(p||{}),M=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,i=(o,t,e,r)=>{for(var l=r>1?void 0:r?Q(t,e):t,R=o.length-1,T;R>=0;R--)(T=o[R])&&(l=(r?T(t,e,l):T(l))||l);return r&&l&&M(t,e,l),l};let s=class extends H{constructor(){super(...arguments);a(this,"$refs");a(this,"courtOrderNumber");a(this,"approvedByRegistrar");a(this,"filingType");a(this,"isCourtOrderOnly");a(this,"noticeDate");a(this,"applicationDate");a(this,"invalidSection");a(this,"isCourtOrderRadio");a(this,"courtOrderNumberText","");a(this,"valid",!1);a(this,"approvalTypeSelected","");a(this,"noticeDateText","");a(this,"applicationDateText","");a(this,"ApprovalTypes",p);a(this,"datePickerRules",[e=>!!e||"Date is required"]);a(this,"courtOrderNumRules",[e=>!e||!/^\s/g.test(e)||"Invalid spaces",e=>!e||!/\s$/g.test(e)||"Invalid spaces",e=>!e||!(e.length<5)||"Court order number is invalid",e=>!e||!(e.length>20)||"Court order number is invalid",e=>!!e||"A Court Order number is required"])}mounted(){this.approvedByRegistrar?(this.courtOrderNumberText="",this.approvalTypeSelected=p.VIA_REGISTRAR):this.courtOrderNumber?(this.courtOrderNumberText=this.courtOrderNumber,this.approvalTypeSelected=p.VIA_COURT_ORDER):this.radioButtonChanged(""),this.isCourtOrderRadio||(this.approvalTypeSelected=p.VIA_COURT_ORDER)}validate(){if(this.approvalTypeSelected===p.VIA_COURT_ORDER){let e=this.$refs.courtNumRef.validate();return this.$emit("valid",e),e}else if(this.approvalTypeSelected===p.VIA_REGISTRAR){let e=!!this.noticeDateText&&!!this.applicationDateText;return this.$emit("valid",e),e}else return!1}emitValidationError(e){this.$emit("valid",!e)}radioButtonChanged(e){e===p.VIA_REGISTRAR?(this.courtOrderNumberText="",this.courtOrderNumberChanged("")):e===p.VIA_COURT_ORDER?(this.noticeDateChanged(""),this.applicationDateChanged(""),this.$emit("valid",!1)):this.$emit("valid",!1)}courtOrderNumberChanged(e){this.validate()}getRadioText(e){return e===p.VIA_COURT_ORDER&&this.isCourtOrderRadio?`This ${this.filingType} is approved by court order.`:e===p.VIA_COURT_ORDER&&!this.isCourtOrderRadio?"Enter a Court Order number, as the restoration of this company was ordered by the court:":e===p.VIA_REGISTRAR?`This ${this.filingType} is approved by registrar.`:"[error]"}noticeDateChanged(e){return this.noticeDateText=e,this.validate(),e}applicationDateChanged(e){return this.applicationDateText=e,this.validate(),e}};i([n({default:""})],s.prototype,"courtOrderNumber",2);i([n({default:!1})],s.prototype,"approvedByRegistrar",2);i([n({default:"restoration"})],s.prototype,"filingType",2);i([n({default:!1})],s.prototype,"isCourtOrderOnly",2);i([n({default:""})],s.prototype,"noticeDate",2);i([n({default:""})],s.prototype,"applicationDate",2);i([n({default:!1})],s.prototype,"invalidSection",2);i([n({default:!0})],s.prototype,"isCourtOrderRadio",2);i([h("radioButtonChange")],s.prototype,"radioButtonChanged",1);i([h("courtNumberChange")],s.prototype,"courtOrderNumberChanged",1);i([h("update:noticeDate")],s.prototype,"noticeDateChanged",1);i([h("update:applicationDate")],s.prototype,"applicationDateChanged",1);s=i([J({components:{DatePicker:L}})],s);var X=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{attrs:{id:"approval-type"}},[e("v-row",{attrs:{"no-gutters":""}},[e("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[e("label",{class:{"error-text":t.invalidSection}},[t._v("Approval Type")])]),e("v-col",{staticClass:"mt-n4",attrs:{cols:"12",sm:"9"}},[e("v-radio-group",{staticClass:"payment-group pt-0",on:{change:t.radioButtonChanged},model:{value:t.approvalTypeSelected,callback:function(r){t.approvalTypeSelected=r},expression:"approvalTypeSelected"}},[t.isCourtOrderRadio?[e("v-radio",{staticClass:"mb-n3",attrs:{id:"court-order-radio",label:t.getRadioText(t.ApprovalTypes.VIA_COURT_ORDER),value:t.ApprovalTypes.VIA_COURT_ORDER}})]:[e("span",{staticClass:"v-label ml-2 mb-2"},[t._v(t._s(t.getRadioText(t.ApprovalTypes.VIA_COURT_ORDER)))])],e("v-form",{ref:"courtNumRef",staticClass:"mt-8 ml-2",attrs:{id:"court-num-form"},model:{value:t.valid,callback:function(r){t.valid=r},expression:"valid"}},[e("v-expand-transition",{staticClass:"pb-0 mb-0"},[t.approvalTypeSelected===t.ApprovalTypes.VIA_COURT_ORDER?e("v-text-field",{attrs:{id:"court-order-number-input",label:"Court Order Number",rules:t.courtOrderNumRules,"hide-details":"auto",filled:""},on:{input:t.courtOrderNumberChanged,"update:error":function(r){return t.emitValidationError(r)}},model:{value:t.courtOrderNumberText,callback:function(r){t.courtOrderNumberText=r},expression:"courtOrderNumberText"}}):t._e()],1)],1),t.isCourtOrderOnly?t._e():e("v-radio",{staticClass:"mb-n5 pt-2",attrs:{id:"registrar-radio",label:t.getRadioText(t.ApprovalTypes.VIA_REGISTRAR),value:t.ApprovalTypes.VIA_REGISTRAR}}),e("v-expand-transition",[t.approvalTypeSelected===t.ApprovalTypes.VIA_REGISTRAR?e("div",{attrs:{flat:""}},[e("div",{staticClass:"ml-8 mt-3"},[e("span",{staticClass:"v-label"},[t._v("Enter the date the Notice of the Application for Restoration was published in the BC Gazette: ")]),e("DatePicker",{ref:"noticeDateRef",staticClass:"mt-2",attrs:{id:"date-picker-notice",title:"Select Date",nudgeRight:150,initialValue:t.noticeDate,inputRules:t.datePickerRules},on:{emitDateSync:function(r){return t.noticeDateChanged(r)}}})],1),e("div",{staticClass:"ml-8"},[e("span",{staticClass:"v-label"},[t._v("Enter the date the Application for Restoration was mailed to the company:")]),e("DatePicker",{ref:"applicationDateRef",staticClass:"mt-2",attrs:{id:"date-picker-application",title:"Select Date",nudgeRight:150,initialValue:t.applicationDate,inputRules:t.datePickerRules},on:{emitDateSync:function(r){return t.applicationDateChanged(r)}}})],1)]):t._e()])],2)],1)],1)],1)},Y=[],F=K(s,X,Y,!1,null,"6d543a84",null,null);const Z=F.exports;F.exports.__docgenInfo={exportName:"default",displayName:"ApprovalType",description:"",tags:{},props:[{name:"courtOrderNumber",tags:{},description:"Draft court order number.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"approvedByRegistrar",tags:{},description:"Whether approved by the registrar.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"filingType",tags:{},description:"filing name used in radio options.",type:{name:"string"},defaultValue:{func:!1,value:"'restoration'"}},{name:"isCourtOrderOnly",tags:{},description:"Show only the court order option; remove via registrar option.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"noticeDate",tags:{},description:"Draft notice date.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"applicationDate",tags:{},description:"Draft application date.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"invalidSection",tags:{},description:"Whether this section is invalid.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isCourtOrderRadio",tags:{},description:"Whether the display of court order section is a radio button.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}}],events:[{name:"valid",type:{names:["undefined"]}},{name:"radioButtonChange"},{name:"courtNumberChange"},{name:"update:noticeDate",description:`Emit the date the notice of the application for restoration was published in the BC Gazette. Validate that a date was successfully selected.`,properties:[{type:{names:["mixed"]},name:"noticeDate",description:"is the date that was selected (if any)"}],tags:[{title:"param",type:{name:"mixed"},name:"noticeDate",description:"is the date that was selected (if any)"}]},{name:"update:applicationDate",description:`Emit the date the application for restoration was mailed to the company. -Validate that a date was successfully selected.`,properties:[{type:{names:["mixed"]},name:"applicationDate",description:"is the date that was selected (if any)"}],tags:[{title:"param",type:{name:"mixed"},name:"applicationDate",description:"is the date that was selected (if any)"}]}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/approval-type/ApprovalType.vue"]};const le={title:"component/ApprovalType"},d=(o,{argTypes:t})=>({props:Object.keys(t),components:{ApprovalType:Z},template:''}),c=d.bind({});c.args={};const u=d.bind({});u.args={isCourtOrderOnly:!0};const m=d.bind({});m.args={filingType:"conversion to full restoration"};const v=d.bind({});v.args={approvedByRegistrar:!0};const f=d.bind({});f.args={courtOrderNumber:"99-1234567"};const y=d.bind({});y.args={approvedByRegistrar:!0,noticeDate:"2023-02-02",applicationDate:"2023-01-15"};const g=d.bind({});g.args={courtOrderNumber:"99-1234567",isExtension:!0,isCourtOrderOnly:!0,isCourtOrderRadio:!1};var b,O,C;c.parameters={...c.parameters,docs:{...(b=c.parameters)==null?void 0:b.docs,source:{originalSource:`(args, { +Validate that a date was successfully selected.`,properties:[{type:{names:["mixed"]},name:"applicationDate",description:"is the date that was selected (if any)"}],tags:[{title:"param",type:{name:"mixed"},name:"applicationDate",description:"is the date that was selected (if any)"}]}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/approval-type/ApprovalType.vue"]};const le={title:"component/ApprovalType"},d=(o,{argTypes:t})=>({props:Object.keys(t),components:{ApprovalType:Z},template:''}),c=d.bind({});c.args={};const u=d.bind({});u.args={isCourtOrderOnly:!0};const m=d.bind({});m.args={filingType:"conversion to full restoration"};const f=d.bind({});f.args={approvedByRegistrar:!0};const v=d.bind({});v.args={courtOrderNumber:"99-1234567"};const y=d.bind({});y.args={approvedByRegistrar:!0,noticeDate:"2023-02-02",applicationDate:"2023-01-15"};const g=d.bind({});g.args={courtOrderNumber:"99-1234567",isExtension:!0,isCourtOrderOnly:!0,isCourtOrderRadio:!1};var O,b,C;c.parameters={...c.parameters,docs:{...(O=c.parameters)==null?void 0:O.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -8,7 +8,7 @@ Validate that a date was successfully selected.`,properties:[{type:{names:["mixe ApprovalType }, template: '' // $props comes from args below -})`,...(C=(O=c.parameters)==null?void 0:O.docs)==null?void 0:C.source}}};var _,D,A;u.parameters={...u.parameters,docs:{...(_=u.parameters)==null?void 0:_.docs,source:{originalSource:`(args, { +})`,...(C=(b=c.parameters)==null?void 0:b.docs)==null?void 0:C.source}}};var _,D,A;u.parameters={...u.parameters,docs:{...(_=u.parameters)==null?void 0:_.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -24,7 +24,7 @@ Validate that a date was successfully selected.`,properties:[{type:{names:["mixe ApprovalType }, template: '' // $props comes from args below -})`,...(S=(x=m.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var E,I,N;v.parameters={...v.parameters,docs:{...(E=v.parameters)==null?void 0:E.docs,source:{originalSource:`(args, { +})`,...(S=(x=m.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var E,I,N;f.parameters={...f.parameters,docs:{...(E=f.parameters)==null?void 0:E.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -32,7 +32,7 @@ Validate that a date was successfully selected.`,properties:[{type:{names:["mixe ApprovalType }, template: '' // $props comes from args below -})`,...(N=(I=v.parameters)==null?void 0:I.docs)==null?void 0:N.source}}};var $,w,k;f.parameters={...f.parameters,docs:{...($=f.parameters)==null?void 0:$.docs,source:{originalSource:`(args, { +})`,...(N=(I=f.parameters)==null?void 0:I.docs)==null?void 0:N.source}}};var $,w,k;v.parameters={...v.parameters,docs:{...($=v.parameters)==null?void 0:$.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -40,7 +40,7 @@ Validate that a date was successfully selected.`,properties:[{type:{names:["mixe ApprovalType }, template: '' // $props comes from args below -})`,...(k=(w=f.parameters)==null?void 0:w.docs)==null?void 0:k.source}}};var B,P,U;y.parameters={...y.parameters,docs:{...(B=y.parameters)==null?void 0:B.docs,source:{originalSource:`(args, { +})`,...(k=(w=v.parameters)==null?void 0:w.docs)==null?void 0:k.source}}};var B,P,U;y.parameters={...y.parameters,docs:{...(B=y.parameters)==null?void 0:B.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -56,5 +56,5 @@ Validate that a date was successfully selected.`,properties:[{type:{names:["mixe ApprovalType }, template: '' // $props comes from args below -})`,...(W=(G=g.parameters)==null?void 0:G.docs)==null?void 0:W.source}}};const de=["Default","defaultCourtOrderOnly","conversionToFullRestoration","draftViaRegistrar","draftViaCourtOrder","draftViaRegistrarWithDates","draftExtensionWithCourtOrder"];export{c as Default,de as __namedExportsOrder,m as conversionToFullRestoration,le as default,u as defaultCourtOrderOnly,g as draftExtensionWithCourtOrder,f as draftViaCourtOrder,v as draftViaRegistrar,y as draftViaRegistrarWithDates}; -//# sourceMappingURL=ApprovalType.stories-48b70947.js.map +})`,...(W=(G=g.parameters)==null?void 0:G.docs)==null?void 0:W.source}}};const de=["Default","defaultCourtOrderOnly","conversionToFullRestoration","draftViaRegistrar","draftViaCourtOrder","draftViaRegistrarWithDates","draftExtensionWithCourtOrder"];export{c as Default,de as __namedExportsOrder,m as conversionToFullRestoration,le as default,u as defaultCourtOrderOnly,g as draftExtensionWithCourtOrder,v as draftViaCourtOrder,f as draftViaRegistrar,y as draftViaRegistrarWithDates}; +//# sourceMappingURL=ApprovalType.stories-d422646b.js.map diff --git a/docs/assets/ApprovalType.stories-d422646b.js.map b/docs/assets/ApprovalType.stories-d422646b.js.map new file mode 100644 index 00000000..27423ed2 --- /dev/null +++ b/docs/assets/ApprovalType.stories-d422646b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ApprovalType.stories-d422646b.js","sources":["../../src/enums/approval-types.ts","../../src/components/approval-type/ApprovalType.vue"],"sourcesContent":["/** Restoration approval types. */\nexport enum ApprovalTypes {\n VIA_COURT_ORDER = 'courtOrder',\n VIA_REGISTRAR = 'registrar'\n}\n","\n\n\n\n\n"],"names":["ApprovalTypes","ApprovalType","Vue","__publicField","v","status","event","option","noticeDate","applicationDate","__decorateClass","Prop","Emit","Component","DatePicker"],"mappings":"qdACY,IAAAA,GAAAA,IACVA,EAAA,gBAAkB,aAClBA,EAAA,cAAgB,YAFNA,IAAAA,GAAA,CAAA,CAAA,8LCgHZ,IAAAC,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,cAKAA,EAAA,yBAGAA,EAAA,4BAGAA,EAAA,mBAGAA,EAAA,yBAGAA,EAAA,mBAGAA,EAAA,wBAGAA,EAAA,uBAGAA,EAAA,0BAGAA,EAAA,4BAAA,IACAA,EAAA,aAAA,IACAA,EAAA,4BAAA,IACAA,EAAA,sBAAA,IACAA,EAAA,2BAAA,IAGAA,EAAA,qBAAAH,GAGAG,EAAA,uBAAA,CAAAC,GAAA,CAAA,CAAAA,GAAA,kBAAA,GAGAD,EAAA,0BAAA,CACAC,GAAA,CAAAA,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,CAAAA,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,CAAAA,GAAA,EAAAA,EAAA,OAAA,IAAA,gCACAA,GAAA,CAAAA,GAAA,EAAAA,EAAA,OAAA,KAAA,gCACAA,GAAA,CAAA,CAAAA,GAAA,kCAAA,GAIA,SAAA,CAEA,KAAA,qBACA,KAAA,qBAAA,GACA,KAAA,qBAAAJ,EAAA,eACA,KAAA,kBACA,KAAA,qBAAA,KAAA,iBACA,KAAA,qBAAAA,EAAA,iBAGA,KAAA,m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,CAAA,EAGAS,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAhBAV,EAgBA,UAAA,mBAAA,CAAA,EAGAS,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAnBAV,EAmBA,UAAA,aAAA,CAAA,EAGAS,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAtBAV,EAsBA,UAAA,kBAAA,CAAA,EAGAS,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAzBAV,EAyBA,UAAA,iBAAA,CAAA,EAGAS,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EA5BAV,EA4BA,UAAA,oBAAA,CAAA,EAiEAS,EAAA,CADAE,EAAA,mBAAA,CAAA,EA5FAX,EA6FA,UAAA,qBAAA,CAAA,EAiBAS,EAAA,CAFAE,EAAA,mBAAA,CAAA,EA5GAX,EA8GA,UAAA,0BAAA,CAAA,EAsBAS,EAAA,CADAE,EAAA,mBAAA,CAAA,EAnIAX,EAoIA,UAAA,oBAAA,CAAA,EAYAS,EAAA,CADAE,EAAA,wBAAA,CAAA,EA/IAX,EAgJA,UAAA,yBAAA,CAAA,EAhJAA,EAAAS,EAAA,CALAG,EAAA,CACA,WAAA,CACA,WAAAC,CACA,CAAA,CACA,CAAA,EACAb,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/BaseAddress-416de270.js b/docs/assets/BaseAddress-416de270.js deleted file mode 100644 index 7f754b3e..00000000 --- a/docs/assets/BaseAddress-416de270.js +++ /dev/null @@ -1,15 +0,0 @@ -var X=Object.defineProperty;var ee=(r,e,s)=>e in r?X(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s;var m=(r,e,s)=>(ee(r,typeof e!="symbol"?e+"":e,s),s);import{V as se}from"./vue.esm-b1e57a2f.js";import{p as re}from"./params-036f571e.js";import{c as te,m as ae,C as de,P as f,E as W,n as ne}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as p}from"./Watch-62f8b699.js";import{l as ie}from"./lodash-f6b38868.js";import{V as K,C as Y}from"./validation-mixin-2ad1b825.js";var a={},A={},d={},L={};Object.defineProperty(L,"__esModule",{value:!0});var oe=re.withParams;L.default=oe;Object.defineProperty(d,"__esModule",{value:!0});d.regex=d.ref=d.len=d.req=d.withParams=void 0;var le=L,G=ue(le);function ue(r){return r&&r.__esModule?r:{default:r}}d.withParams=G.default;var ce=d.req=function(e){if(Array.isArray(e))return!!e.length;if(e==null||e===!1)return!1;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(var s in e)return!0;return!1}return!!String(e).length};d.len=function(e){return Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length};d.ref=function(e,s,t){return typeof e=="function"?e.call(s,t):t[e]};d.regex=function(e,s){return(0,G.default)({type:e},function(t){return!ce(t)||s.test(t)})};Object.defineProperty(A,"__esModule",{value:!0});var me=d;A.default=(0,me.regex)("alpha",/^[a-zA-Z]*$/);var b={};Object.defineProperty(b,"__esModule",{value:!0});var fe=d;b.default=(0,fe.regex)("alphaNum",/^[a-zA-Z0-9]*$/);var x={};Object.defineProperty(x,"__esModule",{value:!0});var pe=d;x.default=(0,pe.regex)("numeric",/^[0-9]*$/);var P={};Object.defineProperty(P,"__esModule",{value:!0});var U=d;P.default=function(r,e){return(0,U.withParams)({type:"between",min:r,max:e},function(s){return!(0,U.req)(s)||(!/\s/.test(s)||s instanceof Date)&&+r<=+s&&+e>=+s})};var w={};Object.defineProperty(w,"__esModule",{value:!0});var he=d,ve=/(^$|^(([^<>()[\]\\.,;:\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,}))$)/;w.default=(0,he.regex)("email",ve);var R={};Object.defineProperty(R,"__esModule",{value:!0});var k=d;R.default=(0,k.withParams)({type:"ipAddress"},function(r){if(!(0,k.req)(r))return!0;if(typeof r!="string")return!1;var e=r.split(".");return e.length===4&&e.every(_e)});var _e=function(e){if(e.length>3||e.length===0||e[0]==="0"&&e!=="0"||!e.match(/^\d+$/))return!1;var s=+e|0;return s>=0&&s<=255},q={};Object.defineProperty(q,"__esModule",{value:!0});var E=d;q.default=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return(0,E.withParams)({type:"macAddress"},function(e){if(!(0,E.req)(e))return!0;if(typeof e!="string")return!1;var s=typeof r=="string"&&r!==""?e.split(r):e.length===12||e.length===16?e.match(/.{2}/g):null;return s!==null&&(s.length===6||s.length===8)&&s.every(ye)})};var ye=function(e){return e.toLowerCase().match(/^[0-9a-f]{2}$/)},$={};Object.defineProperty($,"__esModule",{value:!0});var _=d;$.default=function(r){return(0,_.withParams)({type:"maxLength",max:r},function(e){return!(0,_.req)(e)||(0,_.len)(e)<=r})};var O={};Object.defineProperty(O,"__esModule",{value:!0});var y=d;O.default=function(r){return(0,y.withParams)({type:"minLength",min:r},function(e){return!(0,y.req)(e)||(0,y.len)(e)>=r})};var I={};Object.defineProperty(I,"__esModule",{value:!0});var T=d;I.default=(0,T.withParams)({type:"required"},T.req);var V={};Object.defineProperty(V,"__esModule",{value:!0});var g=d;V.default=function(r){return(0,g.withParams)({type:"requiredIf",prop:r},function(e,s){return(0,g.ref)(r,this,s)?(0,g.req)(e):!0})};var M={};Object.defineProperty(M,"__esModule",{value:!0});var C=d;M.default=function(r){return(0,C.withParams)({type:"requiredUnless",prop:r},function(e,s){return(0,C.ref)(r,this,s)?!0:(0,C.req)(e)})};var j={};Object.defineProperty(j,"__esModule",{value:!0});var Z=d;j.default=function(r){return(0,Z.withParams)({type:"sameAs",eq:r},function(e,s){return e===(0,Z.ref)(r,this,s)})};var S={};Object.defineProperty(S,"__esModule",{value:!0});var ge=d,Ce=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i;S.default=(0,ge.regex)("url",Ce);var N={};Object.defineProperty(N,"__esModule",{value:!0});var Ae=d;N.default=function(){for(var r=arguments.length,e=Array(r),s=0;s0&&e.reduce(function(h,v){return h||v.apply(t,c)},!1)})};var B={};Object.defineProperty(B,"__esModule",{value:!0});var Le=d;B.default=function(){for(var r=arguments.length,e=Array(r),s=0;s0&&e.reduce(function(h,v){return h&&v.apply(t,c)},!0)})};var z={};Object.defineProperty(z,"__esModule",{value:!0});var F=d;z.default=function(r){return(0,F.withParams)({type:"minValue",min:r},function(e){return!(0,F.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+r})};var D={};Object.defineProperty(D,"__esModule",{value:!0});var H=d;D.default=function(r){return(0,H.withParams)({type:"maxValue",max:r},function(e){return!(0,H.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+r})};Object.defineProperty(a,"__esModule",{value:!0});a.maxValue=a.minValue=a.and=a.or=a.url=a.sameAs=a.requiredUnless=a.requiredIf=J=a.required=a.minLength=ds=a.maxLength=a.macAddress=a.ipAddress=a.email=a.between=a.numeric=a.alphaNum=a.alpha=void 0;var be=A,xe=n(be),Pe=b,we=n(Pe),Re=x,qe=n(Re),$e=P,Oe=n($e),Ie=w,Ve=n(Ie),Me=R,je=n(Me),Se=q,Ne=n(Se),Be=$,ze=n(Be),De=O,Ue=n(De),ke=I,Ee=n(ke),Te=V,Ze=n(Te),Fe=M,He=n(Fe),We=j,Ke=n(We),Ye=S,Ge=n(Ye),Je=N,Qe=n(Je),Xe=B,es=n(Xe),ss=z,rs=n(ss),ts=D,as=n(ts);function n(r){return r&&r.__esModule?r:{default:r}}a.alpha=xe.default;a.alphaNum=we.default;a.numeric=qe.default;a.between=Oe.default;a.email=Ve.default;a.ipAddress=je.default;a.macAddress=Ne.default;var ds=a.maxLength=ze.default;a.minLength=Ue.default;var J=a.required=Ee.default;a.requiredIf=Ze.default;a.requiredUnless=He.default;a.sameAs=Ke.default;a.url=Ge.default;a.or=Qe.default;a.and=es.default;a.minValue=rs.default;a.maxValue=as.default;const ns=function(){const r=this.$vnode.componentOptions.Ctor.options.__validations||{},e={};for(const s in r){if(!r.hasOwnProperty(s))continue;let t=r[s];s==="__validations__"&&(t=this[t]),typeof t=="function"&&(t=t.call(this)),s==="__validations__"?Object.assign(e,t):e[s]=t}return e};function is(){return te((r,e)=>{r.__validations||(r.__validations={}),r.__validations.__validations__=e,r.validations=ns})}var os=Object.defineProperty,ls=Object.getOwnPropertyDescriptor,u=(r,e,s,t)=>{for(var o=t>1?void 0:t?ls(e,s):e,c=r.length-1,i;c>=0;c--)(i=r[c])&&(o=(t?i(e,s,o):i(o))||o);return t&&o&&os(e,s,o),o};let l=class extends ae(K,Y){constructor(){super(...arguments);m(this,"address");m(this,"editing");m(this,"schema");m(this,"noPoBox");m(this,"addressLocal",{});m(this,"schemaLocal",{});m(this,"uniqueId",ie.uniqueId());m(this,"spaceRules",[s=>!/^\s/g.test(s)||"Invalid spaces",s=>!/\s$/g.test(s)||"Invalid spaces",s=>!/\s\s/g.test(s)||"Invalid word spacing"])}validations(){return{addressLocal:{...this.schemaLocal}}}resetRegion(){this.addressLocal.addressRegion=""}get streetAddressId(){return`street-address-${this.uniqueId}`}addressCountryId(){return`address-country-${this.uniqueId}`}get addressCountry(){return this.addressLocal.addressCountry}get streetAddressAdditionalLabel(){return"Additional Street Address"+(this.isSchemaRequired("streetAddressAdditional")?"":" (Optional)")}get streetAddressLabel(){return"Street Address"+(this.isSchemaRequired("streetAddress")?"":" (Optional)")}get addressCityLabel(){return"City"+(this.isSchemaRequired("addressCity")?"":" (Optional)")}get addressRegionLabel(){let s,t=this.isSchemaRequired("addressRegion");return this.addressLocal.addressCountry==="CA"?(s="Province",t=!0):this.addressLocal.addressCountry==="US"?(s="State",t=!0):s="Province/State",s+(t?"":" (Optional)")}get postalCodeLabel(){let s;return this.addressLocal.addressCountry==="US"?s="Zip Code":s="Postal Code",s+(this.isSchemaRequired("postalCode")?"":" (Optional)")}get addressCountryLabel(){return"Country"+(this.isSchemaRequired("addressCountry")?"":" (Optional)")}get deliveryInstructionsLabel(){return"Delivery Instructions"+(this.isSchemaRequired("deliveryInstructions")?"":" (Optional)")}get streetAddressHint(){return this.noPoBox?"Address cannot be a PO Box":""}isSchemaRequired(s){return!!(this.schemaLocal&&this.schemaLocal[s]&&this.schemaLocal[s].required)}get rules(){return this.createVuetifyRulesObject("addressLocal")}emitAddress(s){}emitValid(s){}onSchemaChanged(){this.schemaLocal={...this.schema}}onAddressChanged(){this.addressLocal={...this.address}}onAddressCountryChanged(){if(this.schema)if(this.useCountryRegions(this.addressLocal.addressCountry)){const s={...this.schema.addressRegion,required:J};this.schemaLocal={...this.schema,addressRegion:s}}else{const{required:s,...t}=this.schema.addressRegion;this.schemaLocal={...this.schema,addressRegion:t}}}onAddressLocalChanged(){this.emitAddress(this.addressLocal),this.emitValid(!this.$v.$invalid)}useCountryRegions(s){return s==="CA"||s==="US"}enableAddressComplete(){const s=window.pca,t=window.addressCompleteKey;if(!s||!t){console.log("AddressComplete not initialized due to missing script and/or key");return}window.currentAddressComplete&&window.currentAddressComplete.destroy(),window.currentAddressComplete=this.createAddressComplete(s,t)}createAddressComplete(s,t){const o=[{element:this.streetAddressId,field:"Line1",mode:s.fieldMode.SEARCH},{element:this.addressCountryId,field:"CountryName",mode:s.fieldMode.COUNTRY}],c={key:t},i=new s.Address(o,c);return i.listen("populate",this.addressCompletePopulate),i}addressCompletePopulate(s){const t={};t.streetAddress=s.Line1||"N/A",t.streetAddressAdditional=this.combineLines(this.combineLines(s.Line2,s.Line3),this.combineLines(s.Line4,s.Line5)),t.addressCity=s.City,this.useCountryRegions(s.CountryIso2)?t.addressRegion=s.ProvinceCode:(t.addressRegion=null,t.streetAddressAdditional=this.combineLines(t.streetAddressAdditional,s.ProvinceName)),t.postalCode=s.PostalCode,t.addressCountry=s.CountryIso2,this.addressLocal=t,se.nextTick(()=>{this.$refs.addressForm.validate()})}combineLines(s,t){return s?t?s+` -`+t:s:t}};u([is()],l.prototype,"validations",1);u([f({default:()=>({streetAddress:"",streetAddressAdditional:"",addressCity:"",addressRegion:"",postalCode:"",addressCountry:"",deliveryInstructions:""})})],l.prototype,"address",2);u([f({default:!1})],l.prototype,"editing",2);u([f({default:null})],l.prototype,"schema",2);u([f({default:!1})],l.prototype,"noPoBox",2);u([W("update:address")],l.prototype,"emitAddress",1);u([W("valid")],l.prototype,"emitValid",1);u([p("schema",{deep:!0,immediate:!0})],l.prototype,"onSchemaChanged",1);u([p("address",{deep:!0,immediate:!0})],l.prototype,"onAddressChanged",1);u([p("addressCountry")],l.prototype,"onAddressCountryChanged",1);u([p("addressLocal",{deep:!0,immediate:!0})],l.prototype,"onAddressLocalChanged",1);l=u([de({mixins:[K,Y]})],l);var us=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{staticClass:"base-address"},[s("v-expand-transition",[e.editing?e._e():s("div",{staticClass:"address-block"},[s("div",{staticClass:"address-block__info pre-line"},[s("div",{staticClass:"address-block__info-row street-address"},[e._v(" "+e._s(e.addressLocal.streetAddress)+" ")]),s("div",{staticClass:"address-block__info-row street-address-additional"},[e._v(" "+e._s(e.addressLocal.streetAddressAdditional)+" ")]),s("div",{staticClass:"address-block__info-row"},[s("span",{staticClass:"address-city"},[e._v(e._s(e.addressLocal.addressCity))]),e.addressLocal.addressRegion?[s("span",{staticClass:"address-region"},[e._v(" "+e._s(e.addressLocal.addressRegion))])]:e._e(),e.addressLocal.postalCode?[s("span",{staticClass:"postal-code"},[e._v(" "+e._s(e.addressLocal.postalCode))])]:e._e()],2),s("div",{staticClass:"address-block__info-row address-country"},[e._v(" "+e._s(e.getCountryName(e.addressCountry))+" ")]),e.addressLocal.deliveryInstructions?[s("div",{staticClass:"address-block__info-row delivery-instructions mt-5 font-italic"},[e._v(" "+e._s(e.addressLocal.deliveryInstructions)+" ")])]:e._e()],2)])]),s("v-expand-transition",[e.editing?s("v-form",{ref:"addressForm",attrs:{name:"address-form","lazy-validation":""}},[s("div",{staticClass:"form__row"},[s("v-text-field",{staticClass:"street-address",attrs:{id:e.streetAddressId,autocomplete:"chrome-off",name:Math.random(),filled:"",hint:e.streetAddressHint,"persistent-hint":"",label:e.streetAddressLabel,rules:[...e.rules.streetAddress,...e.spaceRules]},on:{"~keypress":function(t){return e.enableAddressComplete()},click:function(t){return e.enableAddressComplete()}},model:{value:e.addressLocal.streetAddress,callback:function(t){e.$set(e.addressLocal,"streetAddress",t)},expression:"addressLocal.streetAddress"}})],1),s("div",{staticClass:"form__row"},[s("v-textarea",{staticClass:"street-address-additional",attrs:{"auto-grow":"",filled:"",label:e.streetAddressAdditionalLabel,rows:"1",rules:[...e.rules.streetAddressAdditional,...e.spaceRules]},model:{value:e.addressLocal.streetAddressAdditional,callback:function(t){e.$set(e.addressLocal,"streetAddressAdditional",t)},expression:"addressLocal.streetAddressAdditional"}})],1),s("div",{staticClass:"form__row three-column"},[s("v-text-field",{staticClass:"item address-city",attrs:{filled:"",label:e.addressCityLabel,rules:[...e.rules.addressCity,...e.spaceRules]},model:{value:e.addressLocal.addressCity,callback:function(t){e.$set(e.addressLocal,"addressCity",t)},expression:"addressLocal.addressCity"}}),e.useCountryRegions(e.addressCountry)?s("v-select",{staticClass:"item address-region",attrs:{filled:"","menu-props":{maxHeight:"40rem"},label:e.addressRegionLabel,"item-text":"name","item-value":"short",items:e.getCountryRegions(e.addressCountry),rules:[...e.rules.addressRegion,...e.spaceRules]},model:{value:e.addressLocal.addressRegion,callback:function(t){e.$set(e.addressLocal,"addressRegion",t)},expression:"addressLocal.addressRegion"}}):s("v-text-field",{staticClass:"item address-region",attrs:{filled:"",label:e.addressRegionLabel,rules:[...e.rules.addressRegion,...e.spaceRules]},model:{value:e.addressLocal.addressRegion,callback:function(t){e.$set(e.addressLocal,"addressRegion",t)},expression:"addressLocal.addressRegion"}}),s("v-text-field",{staticClass:"item postal-code",attrs:{filled:"",label:e.postalCodeLabel,rules:[...e.rules.postalCode,...e.spaceRules]},model:{value:e.addressLocal.postalCode,callback:function(t){e.$set(e.addressLocal,"postalCode",t)},expression:"addressLocal.postalCode"}})],1),s("div",{staticClass:"form__row"},[s("v-select",{staticClass:"address-country",attrs:{filled:"",label:e.addressCountryLabel,"menu-props":"auto","item-text":"name","item-value":"code",items:e.getCountries(),rules:[...e.rules.addressCountry,...e.spaceRules]},on:{change:function(t){return e.resetRegion()}},model:{value:e.addressLocal.addressCountry,callback:function(t){e.$set(e.addressLocal,"addressCountry",t)},expression:"addressLocal.addressCountry"}}),s("input",{attrs:{id:e.addressCountryId,type:"hidden"},domProps:{value:e.addressCountry}})],1),s("div",{staticClass:"form__row"},[s("v-textarea",{staticClass:"delivery-instructions",attrs:{"auto-grow":"",filled:"",label:e.deliveryInstructionsLabel,rows:"2",rules:[...e.rules.deliveryInstructions,...e.spaceRules]},model:{value:e.addressLocal.deliveryInstructions,callback:function(t){e.$set(e.addressLocal,"deliveryInstructions",t)},expression:"addressLocal.deliveryInstructions"}})],1)]):e._e()],1)],1)},cs=[],Q=ne(l,us,cs,!1,null,"ff66b22e",null,null);const Cs=Q.exports;Q.exports.__docgenInfo={description:`The component for displaying and editing an address. -Vuelidate is used to implement the validation rules (eg, what 'required' means and whether it's satisfied). -Vuetify is used to display any validation errors/styling. -Optionally uses Canada Post AddressComplete (aka Postal Code Anywhere - PCA) for address lookup.`,tags:{},exportName:"default",displayName:"BaseAddress",props:[{name:"address",tags:{},description:`The address to be displayed/edited. -Default is "empty address" in case parent doesn't provide it (eg, for new address).`,type:{name:"object"},defaultValue:{func:!0,value:`() => ({ - streetAddress: '', - streetAddressAdditional: '', - addressCity: '', - addressRegion: '', - postalCode: '', - addressCountry: '', - deliveryInstructions: '' -})`}},{name:"editing",tags:{},description:"Whether the address should be shown in editing mode (true) or display mode (false).",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"schema",tags:{},description:"The address schema containing Vuelidate rules.",type:{name:"any"},defaultValue:{func:!1,value:"null"}},{name:"noPoBox",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"update:address",description:'Emits an update message for the address prop, so that the caller can ".sync" with it.'},{name:"valid",description:"Emits the validity of the address entered by the user."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/base-address/BaseAddress.vue","/home/severin/repos/bcrs-shared-components/src/mixins/countries-provinces-mixin.ts","/home/severin/repos/bcrs-shared-components/src/mixins/validation-mixin.ts"]};export{Cs as B,ds as m,J as r}; -//# sourceMappingURL=BaseAddress-416de270.js.map diff --git a/docs/assets/BaseAddress-416de270.js.map b/docs/assets/BaseAddress-416de270.js.map deleted file mode 100644 index a4e5d8fe..00000000 --- a/docs/assets/BaseAddress-416de270.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseAddress-416de270.js","sources":["../../node_modules/vuelidate/lib/withParams.js","../../node_modules/vuelidate/lib/validators/common.js","../../node_modules/vuelidate/lib/validators/alpha.js","../../node_modules/vuelidate/lib/validators/alphaNum.js","../../node_modules/vuelidate/lib/validators/numeric.js","../../node_modules/vuelidate/lib/validators/between.js","../../node_modules/vuelidate/lib/validators/email.js","../../node_modules/vuelidate/lib/validators/ipAddress.js","../../node_modules/vuelidate/lib/validators/macAddress.js","../../node_modules/vuelidate/lib/validators/maxLength.js","../../node_modules/vuelidate/lib/validators/minLength.js","../../node_modules/vuelidate/lib/validators/required.js","../../node_modules/vuelidate/lib/validators/requiredIf.js","../../node_modules/vuelidate/lib/validators/requiredUnless.js","../../node_modules/vuelidate/lib/validators/sameAs.js","../../node_modules/vuelidate/lib/validators/url.js","../../node_modules/vuelidate/lib/validators/or.js","../../node_modules/vuelidate/lib/validators/and.js","../../node_modules/vuelidate/lib/validators/minValue.js","../../node_modules/vuelidate/lib/validators/maxValue.js","../../node_modules/vuelidate/lib/validators/index.js","../../node_modules/vuelidate-property-decorators/dist/vuelidate-decorators.js","../../src/components/base-address/BaseAddress.vue"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/* istanbul ignore next */\nvar withParams = 'lib' === 'web' ? require('./withParamsBrowser').withParams : require('./params').withParams;\n\nexports.default = withParams;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.regex = exports.ref = exports.len = exports.req = exports.withParams = undefined;\n\nvar _withParams = require('../withParams');\n\nvar _withParams2 = _interopRequireDefault(_withParams);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.withParams = _withParams2.default;\n\n// \"required\" core, used in almost every validator to allow empty values\n\nvar req = exports.req = function req(value) {\n if (Array.isArray(value)) return !!value.length;\n if (value === undefined || value === null || value === false) {\n return false;\n }\n\n if (value instanceof Date) {\n // invalid date won't pass\n return !isNaN(value.getTime());\n }\n\n if (typeof value === 'object') {\n for (var _ in value) {\n return true;\n }return false;\n }\n\n return !!String(value).length;\n};\n\n// get length in type-agnostic way\nvar len = exports.len = function len(value) {\n if (Array.isArray(value)) return value.length;\n if (typeof value === 'object') {\n return Object.keys(value).length;\n }\n return String(value).length;\n};\n\n// resolve referenced value\nvar ref = exports.ref = function ref(reference, vm, parentVm) {\n return typeof reference === 'function' ? reference.call(vm, parentVm) : parentVm[reference];\n};\n\n// regex based validator template\nvar regex = exports.regex = function regex(type, expr) {\n return (0, _withParams2.default)({ type: type }, function (value) {\n return !req(value) || expr.test(value);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.regex)('alpha', /^[a-zA-Z]*$/);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.regex)('alphaNum', /^[a-zA-Z0-9]*$/);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.regex)('numeric', /^[0-9]*$/);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (min, max) {\n return (0, _common.withParams)({ type: 'between', min: min, max: max }, function (value) {\n return !(0, _common.req)(value) || (!/\\s/.test(value) || value instanceof Date) && +min <= +value && +max >= +value;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nvar emailRegex = /(^$|^(([^<>()[\\]\\\\.,;:\\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,}))$)/;\n\nexports.default = (0, _common.regex)('email', emailRegex);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.withParams)({ type: 'ipAddress' }, function (value) {\n if (!(0, _common.req)(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n var nibbles = value.split('.');\n return nibbles.length === 4 && nibbles.every(nibbleValid);\n});\n\n\nvar nibbleValid = function nibbleValid(nibble) {\n if (nibble.length > 3 || nibble.length === 0) {\n return false;\n }\n\n if (nibble[0] === '0' && nibble !== '0') {\n return false;\n }\n\n if (!nibble.match(/^\\d+$/)) {\n return false;\n }\n\n var numeric = +nibble | 0;\n return numeric >= 0 && numeric <= 255;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function () {\n var separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ':';\n return (0, _common.withParams)({ type: 'macAddress' }, function (value) {\n if (!(0, _common.req)(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n var parts = typeof separator === 'string' && separator !== '' ? value.split(separator) : value.length === 12 || value.length === 16 ? value.match(/.{2}/g) : null;\n\n return parts !== null && (parts.length === 6 || parts.length === 8) && parts.every(hexValid);\n });\n};\n\nvar hexValid = function hexValid(hex) {\n return hex.toLowerCase().match(/^[0-9a-f]{2}$/);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (length) {\n return (0, _common.withParams)({ type: 'maxLength', max: length }, function (value) {\n return !(0, _common.req)(value) || (0, _common.len)(value) <= length;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (length) {\n return (0, _common.withParams)({ type: 'minLength', min: length }, function (value) {\n return !(0, _common.req)(value) || (0, _common.len)(value) >= length;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.withParams)({ type: 'required' }, _common.req);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (prop) {\n return (0, _common.withParams)({ type: 'requiredIf', prop: prop }, function (value, parentVm) {\n return (0, _common.ref)(prop, this, parentVm) ? (0, _common.req)(value) : true;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (prop) {\n return (0, _common.withParams)({ type: 'requiredUnless', prop: prop }, function (value, parentVm) {\n return !(0, _common.ref)(prop, this, parentVm) ? (0, _common.req)(value) : true;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (equalTo) {\n return (0, _common.withParams)({ type: 'sameAs', eq: equalTo }, function (value, parentVm) {\n return value === (0, _common.ref)(equalTo, this, parentVm);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nvar urlRegex = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\n\nexports.default = (0, _common.regex)('url', urlRegex);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function () {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n return (0, _common.withParams)({ type: 'or' }, function () {\n var _this = this;\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.length > 0 && validators.reduce(function (valid, fn) {\n return valid || fn.apply(_this, args);\n }, false);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function () {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n return (0, _common.withParams)({ type: 'and' }, function () {\n var _this = this;\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.length > 0 && validators.reduce(function (valid, fn) {\n return valid && fn.apply(_this, args);\n }, true);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (min) {\n return (0, _common.withParams)({ type: 'minValue', min: min }, function (value) {\n return !(0, _common.req)(value) || (!/\\s/.test(value) || value instanceof Date) && +value >= +min;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (max) {\n return (0, _common.withParams)({ type: 'maxValue', max: max }, function (value) {\n return !(0, _common.req)(value) || (!/\\s/.test(value) || value instanceof Date) && +value <= +max;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.maxValue = exports.minValue = exports.and = exports.or = exports.url = exports.sameAs = exports.requiredUnless = exports.requiredIf = exports.required = exports.minLength = exports.maxLength = exports.macAddress = exports.ipAddress = exports.email = exports.between = exports.numeric = exports.alphaNum = exports.alpha = undefined;\n\nvar _alpha = require('./alpha');\n\nvar _alpha2 = _interopRequireDefault(_alpha);\n\nvar _alphaNum = require('./alphaNum');\n\nvar _alphaNum2 = _interopRequireDefault(_alphaNum);\n\nvar _numeric = require('./numeric');\n\nvar _numeric2 = _interopRequireDefault(_numeric);\n\nvar _between = require('./between');\n\nvar _between2 = _interopRequireDefault(_between);\n\nvar _email = require('./email');\n\nvar _email2 = _interopRequireDefault(_email);\n\nvar _ipAddress = require('./ipAddress');\n\nvar _ipAddress2 = _interopRequireDefault(_ipAddress);\n\nvar _macAddress = require('./macAddress');\n\nvar _macAddress2 = _interopRequireDefault(_macAddress);\n\nvar _maxLength = require('./maxLength');\n\nvar _maxLength2 = _interopRequireDefault(_maxLength);\n\nvar _minLength = require('./minLength');\n\nvar _minLength2 = _interopRequireDefault(_minLength);\n\nvar _required = require('./required');\n\nvar _required2 = _interopRequireDefault(_required);\n\nvar _requiredIf = require('./requiredIf');\n\nvar _requiredIf2 = _interopRequireDefault(_requiredIf);\n\nvar _requiredUnless = require('./requiredUnless');\n\nvar _requiredUnless2 = _interopRequireDefault(_requiredUnless);\n\nvar _sameAs = require('./sameAs');\n\nvar _sameAs2 = _interopRequireDefault(_sameAs);\n\nvar _url = require('./url');\n\nvar _url2 = _interopRequireDefault(_url);\n\nvar _or = require('./or');\n\nvar _or2 = _interopRequireDefault(_or);\n\nvar _and = require('./and');\n\nvar _and2 = _interopRequireDefault(_and);\n\nvar _minValue = require('./minValue');\n\nvar _minValue2 = _interopRequireDefault(_minValue);\n\nvar _maxValue = require('./maxValue');\n\nvar _maxValue2 = _interopRequireDefault(_maxValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.alpha = _alpha2.default;\nexports.alphaNum = _alphaNum2.default;\nexports.numeric = _numeric2.default;\nexports.between = _between2.default;\nexports.email = _email2.default;\nexports.ipAddress = _ipAddress2.default;\nexports.macAddress = _macAddress2.default;\nexports.maxLength = _maxLength2.default;\nexports.minLength = _minLength2.default;\nexports.required = _required2.default;\nexports.requiredIf = _requiredIf2.default;\nexports.requiredUnless = _requiredUnless2.default;\nexports.sameAs = _sameAs2.default;\nexports.url = _url2.default;\nexports.or = _or2.default;\nexports.and = _and2.default;\nexports.minValue = _minValue2.default;\nexports.maxValue = _maxValue2.default;","/** vuelidate-property-decorators MIT LICENSE copyright 2019 Mirek Simek\n *\n * https://github.com/mesemus/vuelidate-property-decorators\n *\n **/\nimport { createDecorator, mixins } from 'vue-class-component';\n\nconst validationCreator = function () {\n const validations = this.$vnode.componentOptions.Ctor.options.__validations || {};\n const ret = {};\n\n for (const k in validations) {\n if (!validations.hasOwnProperty(k)) continue;\n let val = validations[k];\n\n if (k === '__validations__') {\n val = this[val];\n }\n\n if (typeof val === \"function\") {\n val = val.call(this);\n }\n\n if (k === '__validations__') {\n Object.assign(ret, val);\n } else {\n ret[k] = val;\n }\n }\n\n return ret;\n};\n/**\n * decorator for validations for all fields. Usage:\n *\n * import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';\n * import {required} from 'vuelidate/lib/validators'\n *\n * @Component({})\n * class Blah extends Vue {\n *\n * name = '';\n *\n * @Validations()\n * validations = {\n * name: {required},\n * }\n * }\n *\n *\n * Template:\n *\n * \n *\n * validations may be a function which gets \"this\" pointing to the component instance:\n *\n * @Validations()\n * validations() {\n * return {\n * // something with this.\n * }\n * }\n *\n */\n\n\nexport function Validations() {\n return createDecorator((componentOptions, k) => {\n if (!componentOptions.__validations) {\n componentOptions.__validations = {};\n }\n\n componentOptions.__validations['__validations__'] = k;\n componentOptions.validations = validationCreator;\n });\n}\n/**\n * decorator for a validation on a single field. Usage:\n *\n * import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';\n * import {required} from 'vuelidate/lib/validators'\n *\n * @Component({})\n * class Blah extends Vue {\n *\n * @Validate({required}})\n * name = '';\n *\n * }\n *\n * Template:\n *\n * \n *\n * validation options may be a function which gets \"this\" pointing to the component instance:\n *\n * @Validate(() => ({'minLen': minLength(this.dynamicMinLength) }) )\n * name = ''\n */\n\nexport function Validate(rules) {\n return createDecorator((componentOptions, k) => {\n if (!componentOptions.__validations) {\n componentOptions.__validations = {};\n }\n\n componentOptions.__validations[k] = rules;\n componentOptions.validations = validationCreator;\n });\n}","//\n// Copyright © 2020 Province of British Columbia\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n// the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on\n// an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n//\n\n\n\n\n\n\n"],"names":["withParams_1","withParams","require$$0","common","_withParams","_withParams2","_interopRequireDefault","obj","req","value","_","reference","vm","parentVm","type","expr","alpha","_common","alphaNum","numeric","between","min","max","email","emailRegex","ipAddress","nibbles","nibbleValid","nibble","macAddress","separator","parts","hexValid","hex","maxLength","length","minLength","required","requiredIf","prop","requiredUnless","sameAs","equalTo","url","urlRegex","or","_len","validators","_key","_this","_len2","args","_key2","valid","fn","and","minValue","maxValue","_alpha","_alpha2","_alphaNum","require$$1","_alphaNum2","_numeric","require$$2","_numeric2","_between","require$$3","_between2","_email","require$$4","_email2","_ipAddress","require$$5","_ipAddress2","_macAddress","require$$6","_macAddress2","_maxLength","require$$7","_maxLength2","_minLength","require$$8","_minLength2","_required","require$$9","_required2","_requiredIf","require$$10","_requiredIf2","_requiredUnless","require$$11","_requiredUnless2","_sameAs","require$$12","_sameAs2","_url","require$$13","_url2","_or","require$$14","_or2","_and","require$$15","_and2","_minValue","require$$16","_minValue2","_maxValue","require$$17","_maxValue2","validationCreator","validations","ret","k","val","Validations","createDecorator","componentOptions","BaseAddress","Mixins","ValidationMixin","CountriesProvincesMixin","__publicField","uniqueId","v","label","address","addressRegion","code","pca","key","fields","options","addressComplete","newAddressLocal","Vue","line1","line2","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"ogBAEA,OAAO,eAAeA,EAAS,aAAc,CAC3C,MAAO,EACT,CAAC,EAED,IAAIC,GAA2EC,GAAoB,WAEnGF,EAAA,QAAkBC,GCNlB,OAAO,eAAeE,EAAS,aAAc,CAC3C,MAAO,EACT,CAAC,EACYA,EAAA,MAAcA,EAAA,IAAcA,EAAA,UAAiBA,EAAA,WAAqB,OAE/E,IAAIC,G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} \ No newline at end of file diff --git a/docs/assets/BaseAddress-53c7b609.js b/docs/assets/BaseAddress-53c7b609.js new file mode 100644 index 00000000..c33aacd7 --- /dev/null +++ b/docs/assets/BaseAddress-53c7b609.js @@ -0,0 +1,15 @@ +var X=Object.defineProperty;var ee=(t,e,s)=>e in t?X(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var f=(t,e,s)=>(ee(t,typeof e!="symbol"?e+"":e,s),s);import{V as se}from"./vue.esm-b1e57a2f.js";import{p as te}from"./params-036f571e.js";import{c as re,m as ae,C as de,P as m,E as W,n as ne}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as p}from"./Watch-62f8b699.js";import{l as ie}from"./lodash-f6b38868.js";import{V as K,C as Y}from"./validation-mixin-e5d1d708.js";var a={},A={},d={},L={};Object.defineProperty(L,"__esModule",{value:!0});var oe=te.withParams;L.default=oe;Object.defineProperty(d,"__esModule",{value:!0});d.regex=d.ref=d.len=d.req=d.withParams=void 0;var le=L,G=ue(le);function ue(t){return t&&t.__esModule?t:{default:t}}d.withParams=G.default;var ce=d.req=function(e){if(Array.isArray(e))return!!e.length;if(e==null||e===!1)return!1;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(var s in e)return!0;return!1}return!!String(e).length};d.len=function(e){return Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length};d.ref=function(e,s,r){return typeof e=="function"?e.call(s,r):r[e]};d.regex=function(e,s){return(0,G.default)({type:e},function(r){return!ce(r)||s.test(r)})};Object.defineProperty(A,"__esModule",{value:!0});var fe=d;A.default=(0,fe.regex)("alpha",/^[a-zA-Z]*$/);var b={};Object.defineProperty(b,"__esModule",{value:!0});var me=d;b.default=(0,me.regex)("alphaNum",/^[a-zA-Z0-9]*$/);var x={};Object.defineProperty(x,"__esModule",{value:!0});var pe=d;x.default=(0,pe.regex)("numeric",/^[0-9]*$/);var P={};Object.defineProperty(P,"__esModule",{value:!0});var k=d;P.default=function(t,e){return(0,k.withParams)({type:"between",min:t,max:e},function(s){return!(0,k.req)(s)||(!/\s/.test(s)||s instanceof Date)&&+t<=+s&&+e>=+s})};var w={};Object.defineProperty(w,"__esModule",{value:!0});var he=d,ve=/(^$|^(([^<>()[\]\\.,;:\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,}))$)/;w.default=(0,he.regex)("email",ve);var R={};Object.defineProperty(R,"__esModule",{value:!0});var T=d;R.default=(0,T.withParams)({type:"ipAddress"},function(t){if(!(0,T.req)(t))return!0;if(typeof t!="string")return!1;var e=t.split(".");return e.length===4&&e.every(_e)});var _e=function(e){if(e.length>3||e.length===0||e[0]==="0"&&e!=="0"||!e.match(/^\d+$/))return!1;var s=+e|0;return s>=0&&s<=255},q={};Object.defineProperty(q,"__esModule",{value:!0});var U=d;q.default=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return(0,U.withParams)({type:"macAddress"},function(e){if(!(0,U.req)(e))return!0;if(typeof e!="string")return!1;var s=typeof t=="string"&&t!==""?e.split(t):e.length===12||e.length===16?e.match(/.{2}/g):null;return s!==null&&(s.length===6||s.length===8)&&s.every(ye)})};var ye=function(e){return e.toLowerCase().match(/^[0-9a-f]{2}$/)},$={};Object.defineProperty($,"__esModule",{value:!0});var _=d;$.default=function(t){return(0,_.withParams)({type:"maxLength",max:t},function(e){return!(0,_.req)(e)||(0,_.len)(e)<=t})};var I={};Object.defineProperty(I,"__esModule",{value:!0});var y=d;I.default=function(t){return(0,y.withParams)({type:"minLength",min:t},function(e){return!(0,y.req)(e)||(0,y.len)(e)>=t})};var O={};Object.defineProperty(O,"__esModule",{value:!0});var E=d;O.default=(0,E.withParams)({type:"required"},E.req);var V={};Object.defineProperty(V,"__esModule",{value:!0});var g=d;V.default=function(t){return(0,g.withParams)({type:"requiredIf",prop:t},function(e,s){return(0,g.ref)(t,this,s)?(0,g.req)(e):!0})};var M={};Object.defineProperty(M,"__esModule",{value:!0});var C=d;M.default=function(t){return(0,C.withParams)({type:"requiredUnless",prop:t},function(e,s){return(0,C.ref)(t,this,s)?!0:(0,C.req)(e)})};var S={};Object.defineProperty(S,"__esModule",{value:!0});var Z=d;S.default=function(t){return(0,Z.withParams)({type:"sameAs",eq:t},function(e,s){return e===(0,Z.ref)(t,this,s)})};var j={};Object.defineProperty(j,"__esModule",{value:!0});var ge=d,Ce=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i;j.default=(0,ge.regex)("url",Ce);var B={};Object.defineProperty(B,"__esModule",{value:!0});var Ae=d;B.default=function(){for(var t=arguments.length,e=Array(t),s=0;s0&&e.reduce(function(h,v){return h||v.apply(r,c)},!1)})};var N={};Object.defineProperty(N,"__esModule",{value:!0});var Le=d;N.default=function(){for(var t=arguments.length,e=Array(t),s=0;s0&&e.reduce(function(h,v){return h&&v.apply(r,c)},!0)})};var z={};Object.defineProperty(z,"__esModule",{value:!0});var F=d;z.default=function(t){return(0,F.withParams)({type:"minValue",min:t},function(e){return!(0,F.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t})};var D={};Object.defineProperty(D,"__esModule",{value:!0});var H=d;D.default=function(t){return(0,H.withParams)({type:"maxValue",max:t},function(e){return!(0,H.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+t})};Object.defineProperty(a,"__esModule",{value:!0});a.maxValue=a.minValue=a.and=a.or=a.url=a.sameAs=a.requiredUnless=a.requiredIf=J=a.required=a.minLength=ds=a.maxLength=a.macAddress=a.ipAddress=a.email=a.between=a.numeric=a.alphaNum=a.alpha=void 0;var be=A,xe=n(be),Pe=b,we=n(Pe),Re=x,qe=n(Re),$e=P,Ie=n($e),Oe=w,Ve=n(Oe),Me=R,Se=n(Me),je=q,Be=n(je),Ne=$,ze=n(Ne),De=I,ke=n(De),Te=O,Ue=n(Te),Ee=V,Ze=n(Ee),Fe=M,He=n(Fe),We=S,Ke=n(We),Ye=j,Ge=n(Ye),Je=B,Qe=n(Je),Xe=N,es=n(Xe),ss=z,ts=n(ss),rs=D,as=n(rs);function n(t){return t&&t.__esModule?t:{default:t}}a.alpha=xe.default;a.alphaNum=we.default;a.numeric=qe.default;a.between=Ie.default;a.email=Ve.default;a.ipAddress=Se.default;a.macAddress=Be.default;var ds=a.maxLength=ze.default;a.minLength=ke.default;var J=a.required=Ue.default;a.requiredIf=Ze.default;a.requiredUnless=He.default;a.sameAs=Ke.default;a.url=Ge.default;a.or=Qe.default;a.and=es.default;a.minValue=ts.default;a.maxValue=as.default;const ns=function(){const t=this.$vnode.componentOptions.Ctor.options.__validations||{},e={};for(const s in t){if(!t.hasOwnProperty(s))continue;let r=t[s];s==="__validations__"&&(r=this[r]),typeof r=="function"&&(r=r.call(this)),s==="__validations__"?Object.assign(e,r):e[s]=r}return e};function is(){return re((t,e)=>{t.__validations||(t.__validations={}),t.__validations.__validations__=e,t.validations=ns})}var os=Object.defineProperty,ls=Object.getOwnPropertyDescriptor,u=(t,e,s,r)=>{for(var l=r>1?void 0:r?ls(e,s):e,c=t.length-1,i;c>=0;c--)(i=t[c])&&(l=(r?i(e,s,l):i(l))||l);return r&&l&&os(e,s,l),l};let o=class extends ae(K,Y){constructor(){super(...arguments);f(this,"address");f(this,"editing");f(this,"schema");f(this,"noPoBox");f(this,"deliveryInstructionsText");f(this,"excludeBC");f(this,"addressLocal",{});f(this,"schemaLocal",{});f(this,"uniqueId",ie.uniqueId());f(this,"spaceRules",[s=>!/^\s/g.test(s)||"Invalid spaces",s=>!/\s$/g.test(s)||"Invalid spaces",s=>!/\s\s/g.test(s)||"Invalid word spacing"])}validations(){return{addressLocal:{...this.schemaLocal}}}resetRegion(){this.addressLocal.addressRegion=""}get streetAddressId(){return`street-address-${this.uniqueId}`}addressCountryId(){return`address-country-${this.uniqueId}`}get addressCountry(){return this.addressLocal.addressCountry}get isAddressCountryCanadaAndExcludeBc(){return this.addressLocal.addressCountry==="CA"&&this.excludeBC}get streetAddressAdditionalLabel(){return"Additional Street Address"+(this.isSchemaRequired("streetAddressAdditional")?"":" (Optional)")}get streetAddressLabel(){return"Street Address"+(this.isSchemaRequired("streetAddress")?"":" (Optional)")}get addressCityLabel(){return"City"+(this.isSchemaRequired("addressCity")?"":" (Optional)")}get addressRegionLabel(){let s,r=this.isSchemaRequired("addressRegion");return this.addressLocal.addressCountry==="CA"?(s="Province",r=!0):this.addressLocal.addressCountry==="US"?(s="State",r=!0):s="Province/State",s+(r?"":" (Optional)")}get postalCodeLabel(){let s;return this.addressLocal.addressCountry==="US"?s="Zip Code":s="Postal Code",s+(this.isSchemaRequired("postalCode")?"":" (Optional)")}get addressCountryLabel(){return"Country"+(this.isSchemaRequired("addressCountry")?"":" (Optional)")}get deliveryInstructionsLabel(){return this.deliveryInstructionsText?this.deliveryInstructionsText+(this.isSchemaRequired("deliveryInstructions")?"":" (Optional)"):"Delivery Instructions"+(this.isSchemaRequired("deliveryInstructions")?"":" (Optional)")}get streetAddressHint(){return this.noPoBox?"Address cannot be a PO Box":""}isSchemaRequired(s){return!!(this.schemaLocal&&this.schemaLocal[s]&&this.schemaLocal[s].required)}get rules(){return this.createVuetifyRulesObject("addressLocal")}emitAddress(s){}emitValid(s){}onSchemaChanged(){this.schemaLocal={...this.schema}}onAddressChanged(){this.addressLocal={...this.address}}onAddressCountryChanged(){if(this.schema)if(this.useCountryRegions(this.addressLocal.addressCountry)){const s={...this.schema.addressRegion,required:J};this.schemaLocal={...this.schema,addressRegion:s}}else{const{required:s,...r}=this.schema.addressRegion;this.schemaLocal={...this.schema,addressRegion:r}}}onAddressLocalChanged(){this.emitAddress(this.addressLocal),this.emitValid(!this.$v.$invalid)}useCountryRegions(s){return s==="CA"||s==="US"}enableAddressComplete(){const s=window.pca,r=window.addressCompleteKey;if(!s||!r){console.log("AddressComplete not initialized due to missing script and/or key");return}window.currentAddressComplete&&window.currentAddressComplete.destroy(),window.currentAddressComplete=this.createAddressComplete(s,r)}createAddressComplete(s,r){const l=[{element:this.streetAddressId,field:"Line1",mode:s.fieldMode.SEARCH},{element:this.addressCountryId,field:"CountryName",mode:s.fieldMode.COUNTRY}],c={key:r},i=new s.Address(l,c);return i.listen("populate",this.addressCompletePopulate),i}addressCompletePopulate(s){const r={};r.streetAddress=s.Line1||"N/A",r.streetAddressAdditional=this.combineLines(this.combineLines(s.Line2,s.Line3),this.combineLines(s.Line4,s.Line5)),r.addressCity=s.City,this.useCountryRegions(s.CountryIso2)?r.addressRegion=s.ProvinceCode:(r.addressRegion=null,r.streetAddressAdditional=this.combineLines(r.streetAddressAdditional,s.ProvinceName)),r.postalCode=s.PostalCode,r.addressCountry=s.CountryIso2,this.addressLocal=r,se.nextTick(()=>{this.$refs.addressForm.validate()})}combineLines(s,r){return s?r?s+` +`+r:s:r}};u([is()],o.prototype,"validations",1);u([m({default:()=>({streetAddress:"",streetAddressAdditional:"",addressCity:"",addressRegion:"",postalCode:"",addressCountry:"",deliveryInstructions:""})})],o.prototype,"address",2);u([m({default:!1})],o.prototype,"editing",2);u([m({default:null})],o.prototype,"schema",2);u([m({default:!1})],o.prototype,"noPoBox",2);u([m({default:""})],o.prototype,"deliveryInstructionsText",2);u([m({default:!1})],o.prototype,"excludeBC",2);u([W("update:address")],o.prototype,"emitAddress",1);u([W("valid")],o.prototype,"emitValid",1);u([p("schema",{deep:!0,immediate:!0})],o.prototype,"onSchemaChanged",1);u([p("address",{deep:!0,immediate:!0})],o.prototype,"onAddressChanged",1);u([p("addressCountry")],o.prototype,"onAddressCountryChanged",1);u([p("addressLocal",{deep:!0,immediate:!0})],o.prototype,"onAddressLocalChanged",1);o=u([de({mixins:[K,Y]})],o);var us=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{staticClass:"base-address"},[s("v-expand-transition",[e.editing?e._e():s("div",{staticClass:"address-block"},[s("div",{staticClass:"address-block__info pre-line"},[s("div",{staticClass:"address-block__info-row street-address"},[e._v(" "+e._s(e.addressLocal.streetAddress)+" ")]),s("div",{staticClass:"address-block__info-row street-address-additional"},[e._v(" "+e._s(e.addressLocal.streetAddressAdditional)+" ")]),s("div",{staticClass:"address-block__info-row"},[s("span",{staticClass:"address-city"},[e._v(e._s(e.addressLocal.addressCity))]),e.addressLocal.addressRegion?[s("span",{staticClass:"address-region"},[e._v(" "+e._s(e.addressLocal.addressRegion))])]:e._e(),e.addressLocal.postalCode?[s("span",{staticClass:"postal-code"},[e._v(" "+e._s(e.addressLocal.postalCode))])]:e._e()],2),s("div",{staticClass:"address-block__info-row address-country"},[e._v(" "+e._s(e.getCountryName(e.addressCountry))+" ")]),e.addressLocal.deliveryInstructions?[s("div",{staticClass:"address-block__info-row delivery-instructions mt-5 font-italic"},[e._v(" "+e._s(e.addressLocal.deliveryInstructions)+" ")])]:e._e()],2)])]),s("v-expand-transition",[e.editing?s("v-form",{ref:"addressForm",attrs:{name:"address-form","lazy-validation":""}},[s("div",{staticClass:"form__row"},[s("v-text-field",{staticClass:"street-address",attrs:{id:e.streetAddressId,autocomplete:"chrome-off",name:Math.random(),filled:"",hint:e.streetAddressHint,"persistent-hint":"",label:e.streetAddressLabel,rules:[...e.rules.streetAddress,...e.spaceRules]},on:{"~keypress":function(r){return e.enableAddressComplete()},click:function(r){return e.enableAddressComplete()}},model:{value:e.addressLocal.streetAddress,callback:function(r){e.$set(e.addressLocal,"streetAddress",r)},expression:"addressLocal.streetAddress"}})],1),s("div",{staticClass:"form__row"},[s("v-textarea",{staticClass:"street-address-additional",attrs:{"auto-grow":"",filled:"",label:e.streetAddressAdditionalLabel,rows:"1",rules:[...e.rules.streetAddressAdditional,...e.spaceRules]},model:{value:e.addressLocal.streetAddressAdditional,callback:function(r){e.$set(e.addressLocal,"streetAddressAdditional",r)},expression:"addressLocal.streetAddressAdditional"}})],1),s("div",{staticClass:"form__row three-column"},[s("v-text-field",{staticClass:"item address-city",attrs:{filled:"",label:e.addressCityLabel,rules:[...e.rules.addressCity,...e.spaceRules]},model:{value:e.addressLocal.addressCity,callback:function(r){e.$set(e.addressLocal,"addressCity",r)},expression:"addressLocal.addressCity"}}),e.useCountryRegions(e.addressCountry)?s("v-select",{staticClass:"item address-region",attrs:{filled:"","menu-props":{maxHeight:"40rem"},label:e.addressRegionLabel,"item-text":"name","item-value":"short",items:e.isAddressCountryCanadaAndExcludeBc?e.getCanadaRegionsExcludeBC():e.getCountryRegions(e.addressCountry),rules:[...e.rules.addressRegion,...e.spaceRules]},model:{value:e.addressLocal.addressRegion,callback:function(r){e.$set(e.addressLocal,"addressRegion",r)},expression:"addressLocal.addressRegion"}}):s("v-text-field",{staticClass:"item address-region",attrs:{filled:"",label:e.addressRegionLabel,rules:[...e.rules.addressRegion,...e.spaceRules]},model:{value:e.addressLocal.addressRegion,callback:function(r){e.$set(e.addressLocal,"addressRegion",r)},expression:"addressLocal.addressRegion"}}),s("v-text-field",{staticClass:"item postal-code",attrs:{filled:"",label:e.postalCodeLabel,rules:[...e.rules.postalCode,...e.spaceRules]},model:{value:e.addressLocal.postalCode,callback:function(r){e.$set(e.addressLocal,"postalCode",r)},expression:"addressLocal.postalCode"}})],1),s("div",{staticClass:"form__row"},[s("v-select",{staticClass:"address-country",attrs:{filled:"",label:e.addressCountryLabel,"menu-props":"auto","item-text":"name","item-value":"code",items:e.getCountries(),rules:[...e.rules.addressCountry,...e.spaceRules]},on:{change:function(r){return e.resetRegion()}},model:{value:e.addressLocal.addressCountry,callback:function(r){e.$set(e.addressLocal,"addressCountry",r)},expression:"addressLocal.addressCountry"}}),s("input",{attrs:{id:e.addressCountryId,type:"hidden"},domProps:{value:e.addressCountry}})],1),s("div",{staticClass:"form__row"},[s("v-textarea",{staticClass:"delivery-instructions",attrs:{"auto-grow":"",filled:"",label:e.deliveryInstructionsLabel,rows:"2",rules:[...e.rules.deliveryInstructions,...e.spaceRules]},model:{value:e.addressLocal.deliveryInstructions,callback:function(r){e.$set(e.addressLocal,"deliveryInstructions",r)},expression:"addressLocal.deliveryInstructions"}})],1)]):e._e()],1)],1)},cs=[],Q=ne(o,us,cs,!1,null,"a4cf4ec2",null,null);const Cs=Q.exports;Q.exports.__docgenInfo={description:`The component for displaying and editing an address. +Vuelidate is used to implement the validation rules (eg, what 'required' means and whether it's satisfied). +Vuetify is used to display any validation errors/styling. +Optionally uses Canada Post AddressComplete (aka Postal Code Anywhere - PCA) for address lookup.`,tags:{},exportName:"default",displayName:"BaseAddress",props:[{name:"address",tags:{},description:`The address to be displayed/edited. +Default is "empty address" in case parent doesn't provide it (eg, for new address).`,type:{name:"object"},defaultValue:{func:!0,value:`() => ({ + streetAddress: '', + streetAddressAdditional: '', + addressCity: '', + addressRegion: '', + postalCode: '', + addressCountry: '', + deliveryInstructions: '' +})`}},{name:"editing",tags:{},description:"Whether the address should be shown in editing mode (true) or display mode (false).",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"schema",tags:{},description:"The address schema containing Vuelidate rules.",type:{name:"any"},defaultValue:{func:!1,value:"null"}},{name:"noPoBox",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"deliveryInstructionsText",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"excludeBC",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"update:address",description:'Emits an update message for the address prop, so that the caller can ".sync" with it.'},{name:"valid",description:"Emits the validity of the address entered by the user."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/base-address/BaseAddress.vue","/home/kdeodhar/gitRepo/bcrs-shared-components/src/mixins/countries-provinces-mixin.ts","/home/kdeodhar/gitRepo/bcrs-shared-components/src/mixins/validation-mixin.ts"]};export{Cs as B,ds as m,J as r}; +//# sourceMappingURL=BaseAddress-53c7b609.js.map diff --git a/docs/assets/BaseAddress-53c7b609.js.map b/docs/assets/BaseAddress-53c7b609.js.map new file mode 100644 index 00000000..64fcf2ff --- /dev/null +++ b/docs/assets/BaseAddress-53c7b609.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BaseAddress-53c7b609.js","sources":["../../node_modules/vuelidate/lib/withParams.js","../../node_modules/vuelidate/lib/validators/common.js","../../node_modules/vuelidate/lib/validators/alpha.js","../../node_modules/vuelidate/lib/validators/alphaNum.js","../../node_modules/vuelidate/lib/validators/numeric.js","../../node_modules/vuelidate/lib/validators/between.js","../../node_modules/vuelidate/lib/validators/email.js","../../node_modules/vuelidate/lib/validators/ipAddress.js","../../node_modules/vuelidate/lib/validators/macAddress.js","../../node_modules/vuelidate/lib/validators/maxLength.js","../../node_modules/vuelidate/lib/validators/minLength.js","../../node_modules/vuelidate/lib/validators/required.js","../../node_modules/vuelidate/lib/validators/requiredIf.js","../../node_modules/vuelidate/lib/validators/requiredUnless.js","../../node_modules/vuelidate/lib/validators/sameAs.js","../../node_modules/vuelidate/lib/validators/url.js","../../node_modules/vuelidate/lib/validators/or.js","../../node_modules/vuelidate/lib/validators/and.js","../../node_modules/vuelidate/lib/validators/minValue.js","../../node_modules/vuelidate/lib/validators/maxValue.js","../../node_modules/vuelidate/lib/validators/index.js","../../node_modules/vuelidate-property-decorators/dist/vuelidate-decorators.js","../../src/components/base-address/BaseAddress.vue"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/* istanbul ignore next */\nvar withParams = 'lib' === 'web' ? require('./withParamsBrowser').withParams : require('./params').withParams;\n\nexports.default = withParams;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.regex = exports.ref = exports.len = exports.req = exports.withParams = undefined;\n\nvar _withParams = require('../withParams');\n\nvar _withParams2 = _interopRequireDefault(_withParams);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.withParams = _withParams2.default;\n\n// \"required\" core, used in almost every validator to allow empty values\n\nvar req = exports.req = function req(value) {\n if (Array.isArray(value)) return !!value.length;\n if (value === undefined || value === null || value === false) {\n return false;\n }\n\n if (value instanceof Date) {\n // invalid date won't pass\n return !isNaN(value.getTime());\n }\n\n if (typeof value === 'object') {\n for (var _ in value) {\n return true;\n }return false;\n }\n\n return !!String(value).length;\n};\n\n// get length in type-agnostic way\nvar len = exports.len = function len(value) {\n if (Array.isArray(value)) return value.length;\n if (typeof value === 'object') {\n return Object.keys(value).length;\n }\n return String(value).length;\n};\n\n// resolve referenced value\nvar ref = exports.ref = function ref(reference, vm, parentVm) {\n return typeof reference === 'function' ? reference.call(vm, parentVm) : parentVm[reference];\n};\n\n// regex based validator template\nvar regex = exports.regex = function regex(type, expr) {\n return (0, _withParams2.default)({ type: type }, function (value) {\n return !req(value) || expr.test(value);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.regex)('alpha', /^[a-zA-Z]*$/);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.regex)('alphaNum', /^[a-zA-Z0-9]*$/);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.regex)('numeric', /^[0-9]*$/);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (min, max) {\n return (0, _common.withParams)({ type: 'between', min: min, max: max }, function (value) {\n return !(0, _common.req)(value) || (!/\\s/.test(value) || value instanceof Date) && +min <= +value && +max >= +value;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nvar emailRegex = /(^$|^(([^<>()[\\]\\\\.,;:\\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,}))$)/;\n\nexports.default = (0, _common.regex)('email', emailRegex);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.withParams)({ type: 'ipAddress' }, function (value) {\n if (!(0, _common.req)(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n var nibbles = value.split('.');\n return nibbles.length === 4 && nibbles.every(nibbleValid);\n});\n\n\nvar nibbleValid = function nibbleValid(nibble) {\n if (nibble.length > 3 || nibble.length === 0) {\n return false;\n }\n\n if (nibble[0] === '0' && nibble !== '0') {\n return false;\n }\n\n if (!nibble.match(/^\\d+$/)) {\n return false;\n }\n\n var numeric = +nibble | 0;\n return numeric >= 0 && numeric <= 255;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function () {\n var separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ':';\n return (0, _common.withParams)({ type: 'macAddress' }, function (value) {\n if (!(0, _common.req)(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n var parts = typeof separator === 'string' && separator !== '' ? value.split(separator) : value.length === 12 || value.length === 16 ? value.match(/.{2}/g) : null;\n\n return parts !== null && (parts.length === 6 || parts.length === 8) && parts.every(hexValid);\n });\n};\n\nvar hexValid = function hexValid(hex) {\n return hex.toLowerCase().match(/^[0-9a-f]{2}$/);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (length) {\n return (0, _common.withParams)({ type: 'maxLength', max: length }, function (value) {\n return !(0, _common.req)(value) || (0, _common.len)(value) <= length;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (length) {\n return (0, _common.withParams)({ type: 'minLength', min: length }, function (value) {\n return !(0, _common.req)(value) || (0, _common.len)(value) >= length;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = (0, _common.withParams)({ type: 'required' }, _common.req);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (prop) {\n return (0, _common.withParams)({ type: 'requiredIf', prop: prop }, function (value, parentVm) {\n return (0, _common.ref)(prop, this, parentVm) ? (0, _common.req)(value) : true;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (prop) {\n return (0, _common.withParams)({ type: 'requiredUnless', prop: prop }, function (value, parentVm) {\n return !(0, _common.ref)(prop, this, parentVm) ? (0, _common.req)(value) : true;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (equalTo) {\n return (0, _common.withParams)({ type: 'sameAs', eq: equalTo }, function (value, parentVm) {\n return value === (0, _common.ref)(equalTo, this, parentVm);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nvar urlRegex = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\n\nexports.default = (0, _common.regex)('url', urlRegex);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function () {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n return (0, _common.withParams)({ type: 'or' }, function () {\n var _this = this;\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.length > 0 && validators.reduce(function (valid, fn) {\n return valid || fn.apply(_this, args);\n }, false);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function () {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n return (0, _common.withParams)({ type: 'and' }, function () {\n var _this = this;\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.length > 0 && validators.reduce(function (valid, fn) {\n return valid && fn.apply(_this, args);\n }, true);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (min) {\n return (0, _common.withParams)({ type: 'minValue', min: min }, function (value) {\n return !(0, _common.req)(value) || (!/\\s/.test(value) || value instanceof Date) && +value >= +min;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _common = require('./common');\n\nexports.default = function (max) {\n return (0, _common.withParams)({ type: 'maxValue', max: max }, function (value) {\n return !(0, _common.req)(value) || (!/\\s/.test(value) || value instanceof Date) && +value <= +max;\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.maxValue = exports.minValue = exports.and = exports.or = exports.url = exports.sameAs = exports.requiredUnless = exports.requiredIf = exports.required = exports.minLength = exports.maxLength = exports.macAddress = exports.ipAddress = exports.email = exports.between = exports.numeric = exports.alphaNum = exports.alpha = undefined;\n\nvar _alpha = require('./alpha');\n\nvar _alpha2 = _interopRequireDefault(_alpha);\n\nvar _alphaNum = require('./alphaNum');\n\nvar _alphaNum2 = _interopRequireDefault(_alphaNum);\n\nvar _numeric = require('./numeric');\n\nvar _numeric2 = _interopRequireDefault(_numeric);\n\nvar _between = require('./between');\n\nvar _between2 = _interopRequireDefault(_between);\n\nvar _email = require('./email');\n\nvar _email2 = _interopRequireDefault(_email);\n\nvar _ipAddress = require('./ipAddress');\n\nvar _ipAddress2 = _interopRequireDefault(_ipAddress);\n\nvar _macAddress = require('./macAddress');\n\nvar _macAddress2 = _interopRequireDefault(_macAddress);\n\nvar _maxLength = require('./maxLength');\n\nvar _maxLength2 = _interopRequireDefault(_maxLength);\n\nvar _minLength = require('./minLength');\n\nvar _minLength2 = _interopRequireDefault(_minLength);\n\nvar _required = require('./required');\n\nvar _required2 = _interopRequireDefault(_required);\n\nvar _requiredIf = require('./requiredIf');\n\nvar _requiredIf2 = _interopRequireDefault(_requiredIf);\n\nvar _requiredUnless = require('./requiredUnless');\n\nvar _requiredUnless2 = _interopRequireDefault(_requiredUnless);\n\nvar _sameAs = require('./sameAs');\n\nvar _sameAs2 = _interopRequireDefault(_sameAs);\n\nvar _url = require('./url');\n\nvar _url2 = _interopRequireDefault(_url);\n\nvar _or = require('./or');\n\nvar _or2 = _interopRequireDefault(_or);\n\nvar _and = require('./and');\n\nvar _and2 = _interopRequireDefault(_and);\n\nvar _minValue = require('./minValue');\n\nvar _minValue2 = _interopRequireDefault(_minValue);\n\nvar _maxValue = require('./maxValue');\n\nvar _maxValue2 = _interopRequireDefault(_maxValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.alpha = _alpha2.default;\nexports.alphaNum = _alphaNum2.default;\nexports.numeric = _numeric2.default;\nexports.between = _between2.default;\nexports.email = _email2.default;\nexports.ipAddress = _ipAddress2.default;\nexports.macAddress = _macAddress2.default;\nexports.maxLength = _maxLength2.default;\nexports.minLength = _minLength2.default;\nexports.required = _required2.default;\nexports.requiredIf = _requiredIf2.default;\nexports.requiredUnless = _requiredUnless2.default;\nexports.sameAs = _sameAs2.default;\nexports.url = _url2.default;\nexports.or = _or2.default;\nexports.and = _and2.default;\nexports.minValue = _minValue2.default;\nexports.maxValue = _maxValue2.default;","/** vuelidate-property-decorators MIT LICENSE copyright 2019 Mirek Simek\n *\n * https://github.com/mesemus/vuelidate-property-decorators\n *\n **/\nimport { createDecorator, mixins } from 'vue-class-component';\n\nconst validationCreator = function () {\n const validations = this.$vnode.componentOptions.Ctor.options.__validations || {};\n const ret = {};\n\n for (const k in validations) {\n if (!validations.hasOwnProperty(k)) continue;\n let val = validations[k];\n\n if (k === '__validations__') {\n val = this[val];\n }\n\n if (typeof val === \"function\") {\n val = val.call(this);\n }\n\n if (k === '__validations__') {\n Object.assign(ret, val);\n } else {\n ret[k] = val;\n }\n }\n\n return ret;\n};\n/**\n * decorator for validations for all fields. Usage:\n *\n * import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';\n * import {required} from 'vuelidate/lib/validators'\n *\n * @Component({})\n * class Blah extends Vue {\n *\n * name = '';\n *\n * @Validations()\n * validations = {\n * name: {required},\n * }\n * }\n *\n *\n * Template:\n *\n * \n *\n * validations may be a function which gets \"this\" pointing to the component instance:\n *\n * @Validations()\n * validations() {\n * return {\n * // something with this.\n * }\n * }\n *\n */\n\n\nexport function Validations() {\n return createDecorator((componentOptions, k) => {\n if (!componentOptions.__validations) {\n componentOptions.__validations = {};\n }\n\n componentOptions.__validations['__validations__'] = k;\n componentOptions.validations = validationCreator;\n });\n}\n/**\n * decorator for a validation on a single field. Usage:\n *\n * import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';\n * import {required} from 'vuelidate/lib/validators'\n *\n * @Component({})\n * class Blah extends Vue {\n *\n * @Validate({required}})\n * name = '';\n *\n * }\n *\n * Template:\n *\n * \n *\n * validation options may be a function which gets \"this\" pointing to the component instance:\n *\n * @Validate(() => ({'minLen': minLength(this.dynamicMinLength) }) )\n * name = ''\n */\n\nexport function Validate(rules) {\n return createDecorator((componentOptions, k) => {\n if (!componentOptions.__validations) {\n componentOptions.__validations = {};\n }\n\n componentOptions.__validations[k] = rules;\n componentOptions.validations = validationCreator;\n });\n}","//\n// Copyright © 2020 Province of British Columbia\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n// the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on\n// an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n//\n\n\n\n\n\n\n"],"names":["withParams_1","withParams","require$$0","common","_withParams","_withParams2","_interopRequireDefault","obj","req","value","_","reference","vm","parentVm","type","expr","alpha","_common","alphaNum","numeric","between","min","max","email","emailRegex","ipAddress","nibbles","nibbleValid","nibble","macAddress","separator","parts","hexValid","hex","maxLength","length","minLength","required","requiredIf","prop","requiredUnless","sameAs","equalTo","url","urlRegex","or","_len","validators","_key","_this","_len2","args","_key2","valid","fn","and","minValue","maxValue","_alpha","_alpha2","_alphaNum","require$$1","_alphaNum2","_numeric","require$$2","_numeric2","_between","require$$3","_between2","_email","require$$4","_email2","_ipAddress","require$$5","_ipAddress2","_macAddress","require$$6","_macAddress2","_maxLength","require$$7","_maxLength2","_minLength","require$$8","_minLength2","_required","require$$9","_required2","_requiredIf","require$$10","_requiredIf2","_requiredUnless","require$$11","_requiredUnless2","_sameAs","require$$12","_sameAs2","_url","require$$13","_url2","_or","require$$14","_or2","_and","require$$15","_and2","_minValue","require$$16","_minValue2","_maxValue","require$$17","_maxValue2","validationCreator","validations","ret","k","val","Validations","createDecorator","componentOptions","BaseAddress","Mixins","ValidationMixin","CountriesProvincesMixin","__publicField","uniqueId","v","label","address","addressRegion","code","pca","key","fields","options","addressComplete","newAddressLocal","Vue","line1","line2","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"ogBAEA,OAAO,eAAeA,EAAS,aAAc,CAC3C,MAAO,EACT,CAAC,EAED,IAAIC,GAA2EC,GAAoB,WAEnGF,EAAA,QAAkBC,GCNlB,OAAO,eAAeE,EAAS,aAAc,CAC3C,MAAO,EACT,CAAC,EACYA,EAAA,MAAcA,EAAA,IAAcA,EAAA,UAAiBA,EAAA,WAAqB,OAE/E,IAAIC,GAAcF,EAEdG,EAAeC,GAAuBF,EAAW,EAErD,SAASE,GAAuBC,EAAK,CAAE,OAAOA,GAAOA,EAAI,WAAaA,EAAM,CAAE,QAASA,CAAG,CAAK,CAE/FJ,EAAA,WAAqBE,EAAa,QAIlC,IAAIG,GAAiBL,EAAA,IAAG,SAAaM,EAAO,CAC1C,GAAI,MAAM,QAAQA,CAAK,EAAG,MAAO,CAAC,CAACA,EAAM,OACzC,GAA2BA,GAAU,MAAQA,IAAU,GACrD,MAAO,GAGT,GAAIA,aAAiB,KAEnB,MAAO,CAAC,MAAMA,EAAM,QAAS,CAAA,EAG/B,GAAI,OAAOA,GAAU,SAAU,CAC7B,QAASC,KAAKD,EACZ,MAAO,GACR,MAAO,EACT,CAED,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GAAA,CAAA,EA5BArB,EA6BA,UAAA,UAAA,CAAA,EAIAoB,EAAA,CADAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAhCArB,EAiCA,UAAA,SAAA,CAAA,EAGAoB,EAAA,CADAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAnCArB,EAoCA,UAAA,UAAA,CAAA,EAGAoB,EAAA,CADAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAtCArB,EAuCA,UAAA,2BAAA,CAAA,EAGAoB,EAAA,CADAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAzCArB,EA0CA,UAAA,YAAA,CAAA,EAuHAoB,EAAA,CADAE,EAAA,gBAAA,CAAA,EAhKAtB,EAiKA,UAAA,cAAA,CAAA,EAIAoB,EAAA,CADAE,EAAA,OAAA,CAAA,EApKAtB,EAqKA,UAAA,YAAA,CAAA,EAOAoB,EAAA,CADAG,EAAA,SAAA,CAAA,KAAA,GAAA,UAAA,GAAA,CAAA,EA3KAvB,EA4KA,UAAA,kBAAA,CAAA,EASAoB,EAAA,CADAG,EAAA,UAAA,CAAA,KAAA,GAAA,UAAA,GAAA,CAAA,EApLAvB,EAqLA,UAAA,mBAAA,CAAA,EAQAoB,EAAA,CADAG,EAAA,gBAAA,CAAA,EA5LAvB,EA6LA,UAAA,0BAAA,CAAA,EAsBAoB,EAAA,CADAG,EAAA,eAAA,CAAA,KAAA,GAAA,UAAA,GAAA,CAAA,EAlNAvB,EAmNA,UAAA,wBAAA,CAAA,EAnNAA,EAAAoB,EAAA,CAHAI,GAAA,CACA,OAAA,CAAAtB,EAAAC,CAAA,CAAA,CACA,CAAA,EACAH,CAAA;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]} \ No newline at end of file diff --git a/docs/assets/BaseAddress-619d466e.css b/docs/assets/BaseAddress-619d466e.css new file mode 100644 index 00000000..84c2aad9 --- /dev/null +++ b/docs/assets/BaseAddress-619d466e.css @@ -0,0 +1 @@ +.address-block[data-v-a4cf4ec2]{display:flex}.address-block__info[data-v-a4cf4ec2]{flex:1 1 auto}.address-block__info-row[data-v-a4cf4ec2]{color:#495057}.form__row.three-column[data-v-a4cf4ec2]{align-items:stretch;display:flex;flex-flow:row nowrap;margin-left:-.5rem;margin-right:-.5rem}.form__row.three-column .item[data-v-a4cf4ec2]{flex:1 1 auto;flex-basis:0;margin-left:.5rem;margin-right:.5rem}[data-v-a4cf4ec2] .v-label{color:#495057;font-size:1rem;font-weight:400}[data-v-a4cf4ec2] .v-input input{color:#212529}.pre-line[data-v-a4cf4ec2]{white-space:pre-line}.v-select.v-input--is-readonly[data-v-a4cf4ec2],.v-text-field.v-input--is-readonly[data-v-a4cf4ec2]{pointer-events:none}.v-select.v-input--is-readonly[data-v-a4cf4ec2] .v-label,.v-text-field.v-input--is-readonly[data-v-a4cf4ec2] .v-label,.v-select.v-input--is-readonly[data-v-a4cf4ec2] .v-select__selection,.v-text-field.v-input--is-readonly[data-v-a4cf4ec2] .v-select__selection{color:#00000061}.v-select.v-input--is-readonly[data-v-a4cf4ec2] .v-icon,.v-text-field.v-input--is-readonly[data-v-a4cf4ec2] .v-icon{color:#00000061!important;opacity:.6} diff --git a/docs/assets/BaseAddress-9fa63d05.css b/docs/assets/BaseAddress-9fa63d05.css deleted file mode 100644 index 15e08816..00000000 --- a/docs/assets/BaseAddress-9fa63d05.css +++ /dev/null @@ -1 +0,0 @@ -.address-block[data-v-ff66b22e]{display:flex}.address-block__info[data-v-ff66b22e]{flex:1 1 auto}.address-block__info-row[data-v-ff66b22e]{color:#495057}.form__row.three-column[data-v-ff66b22e]{align-items:stretch;display:flex;flex-flow:row nowrap;margin-left:-.5rem;margin-right:-.5rem}.form__row.three-column .item[data-v-ff66b22e]{flex:1 1 auto;flex-basis:0;margin-left:.5rem;margin-right:.5rem}[data-v-ff66b22e] .v-label{color:#495057;font-size:1rem;font-weight:400}[data-v-ff66b22e] .v-input input{color:#212529}.pre-line[data-v-ff66b22e]{white-space:pre-line}.v-select.v-input--is-readonly[data-v-ff66b22e],.v-text-field.v-input--is-readonly[data-v-ff66b22e]{pointer-events:none}.v-select.v-input--is-readonly[data-v-ff66b22e] .v-label,.v-text-field.v-input--is-readonly[data-v-ff66b22e] .v-label,.v-select.v-input--is-readonly[data-v-ff66b22e] .v-select__selection,.v-text-field.v-input--is-readonly[data-v-ff66b22e] .v-select__selection{color:#00000061}.v-select.v-input--is-readonly[data-v-ff66b22e] .v-icon,.v-text-field.v-input--is-readonly[data-v-ff66b22e] .v-icon{color:#00000061!important;opacity:.6} diff --git a/docs/assets/BaseAddress.stories-d4807c35.js b/docs/assets/BaseAddress.stories-c8be0a4b.js similarity index 91% rename from docs/assets/BaseAddress.stories-d4807c35.js rename to docs/assets/BaseAddress.stories-c8be0a4b.js index 4b7a0b48..66e64fcd 100644 --- a/docs/assets/BaseAddress.stories-d4807c35.js +++ b/docs/assets/BaseAddress.stories-c8be0a4b.js @@ -1,4 +1,4 @@ -import{r as t,m as e,B as l}from"./BaseAddress-416de270.js";import{V as u}from"./vuetify-b9fb25b0.js";import"./vue.esm-b1e57a2f.js";import"./params-036f571e.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./Watch-62f8b699.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";import"./validation-mixin-2ad1b825.js";const V={title:"component/BaseAddress"},p={streetAddress:{required:t,maxLength:e(50)},streetAddressAdditional:{maxLength:e(50)},addressCity:{required:t,maxLength:e(40)},addressCountry:{required:t},addressRegion:{maxLength:e(2)},postalCode:{required:t,maxLength:e(15)},deliveryInstructions:{maxLength:e(80)}},c=(y,{argTypes:g})=>({vuetify:new u({iconfont:"mdi"}),props:Object.keys(g),components:{BaseAddress:l},template:''}),s=c.bind({});s.args={editing:!0,schema:p,address:{}};const r=c.bind({});r.args={editing:!0,schema:p,address:{streetAddress:"1234 Sesame Street",streetAddressAdditional:"4th Floor",addressCity:"Victoria",addressRegion:"British Columbia",addressCountry:"Canada",postalCode:"V8N 1A1",deliveryInstructions:"Leave at front door"},noPoBox:!0};var a,o,d;s.parameters={...s.parameters,docs:{...(a=s.parameters)==null?void 0:a.docs,source:{originalSource:`(args, { +import{r as t,m as e,B as l}from"./BaseAddress-53c7b609.js";import{V as u}from"./vuetify-b9fb25b0.js";import"./vue.esm-b1e57a2f.js";import"./params-036f571e.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./Watch-62f8b699.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";import"./validation-mixin-e5d1d708.js";const V={title:"component/BaseAddress"},p={streetAddress:{required:t,maxLength:e(50)},streetAddressAdditional:{maxLength:e(50)},addressCity:{required:t,maxLength:e(40)},addressCountry:{required:t},addressRegion:{maxLength:e(2)},postalCode:{required:t,maxLength:e(15)},deliveryInstructions:{maxLength:e(80)}},c=(y,{argTypes:g})=>({vuetify:new u({iconfont:"mdi"}),props:Object.keys(g),components:{BaseAddress:l},template:''}),s=c.bind({});s.args={editing:!0,schema:p,address:{}};const r=c.bind({});r.args={editing:!0,schema:p,address:{streetAddress:"1234 Sesame Street",streetAddressAdditional:"4th Floor",addressCity:"Victoria",addressRegion:"British Columbia",addressCountry:"Canada",postalCode:"V8N 1A1",deliveryInstructions:"Leave at front door"},noPoBox:!0};var a,o,d;s.parameters={...s.parameters,docs:{...(a=s.parameters)==null?void 0:a.docs,source:{originalSource:`(args, { argTypes }) => ({ vuetify: new Vuetify({ @@ -21,4 +21,4 @@ import{r as t,m as e,B as l}from"./BaseAddress-416de270.js";import{V as u}from". }, template: '' // $props comes from args below })`,...(m=(i=r.parameters)==null?void 0:i.docs)==null?void 0:m.source}}};const w=["DefaultBaseAddress","FilledInBaseAddress"];export{s as DefaultBaseAddress,r as FilledInBaseAddress,w as __namedExportsOrder,V as default}; -//# sourceMappingURL=BaseAddress.stories-d4807c35.js.map +//# sourceMappingURL=BaseAddress.stories-c8be0a4b.js.map diff --git a/docs/assets/BaseAddress.stories-d4807c35.js.map b/docs/assets/BaseAddress.stories-c8be0a4b.js.map similarity index 52% rename from docs/assets/BaseAddress.stories-d4807c35.js.map rename to docs/assets/BaseAddress.stories-c8be0a4b.js.map index 35cd2f0d..a0178f70 100644 --- a/docs/assets/BaseAddress.stories-d4807c35.js.map +++ b/docs/assets/BaseAddress.stories-c8be0a4b.js.map @@ -1 +1 @@ -{"version":3,"file":"BaseAddress.stories-d4807c35.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"BaseAddress.stories-c8be0a4b.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/Breadcrumb.stories-d1ab30fc.js b/docs/assets/Breadcrumb.stories-9e60a27e.js similarity index 79% rename from docs/assets/Breadcrumb.stories-d1ab30fc.js rename to docs/assets/Breadcrumb.stories-9e60a27e.js index bc576468..9e8654cc 100644 --- a/docs/assets/Breadcrumb.stories-d1ab30fc.js +++ b/docs/assets/Breadcrumb.stories-9e60a27e.js @@ -3,7 +3,7 @@ Example breadcrumb: { text: My Dashboard, to: { name: Routes.DASHBOARD } -}`,type:{name:"Array",elements:[{name:"BreadcrumbIF"}]},defaultValue:{func:!0,value:"() => []"}}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/breadcrumb/Breadcrumb.vue"]};const z={title:"component/Breadcrumb"},d=(s,{argTypes:r})=>({props:Object.keys(r),components:{Breadcrumb:F},template:''}),n=d.bind({});n.args={breadcrumbs:[{text:"BC Registries Dashboard"}]};const m=d.bind({});m.args={breadcrumbs:[{text:"BC Registries Dashboard",to:{name:"/?path=/story/component-breadcrumb--home-route"}},{text:"BC12345678"}]};const b=d.bind({});b.args={breadcrumbs:[{text:"BC Registries Dashboard",to:{name:"component-breadcrumb--navigation-route"}},{text:"BC12345678",to:{name:"/?path=/story/component-breadcrumb--base-route"}},{text:"some route"}]};var v,_,g;n.parameters={...n.parameters,docs:{...(v=n.parameters)==null?void 0:v.docs,source:{originalSource:`(args, { +}`,type:{name:"Array",elements:[{name:"BreadcrumbIF"}]},defaultValue:{func:!0,value:"() => []"}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/breadcrumb/Breadcrumb.vue"]};const z={title:"component/Breadcrumb"},d=(s,{argTypes:r})=>({props:Object.keys(r),components:{Breadcrumb:F},template:''}),n=d.bind({});n.args={breadcrumbs:[{text:"BC Registries Dashboard"}]};const m=d.bind({});m.args={breadcrumbs:[{text:"BC Registries Dashboard",to:{name:"/?path=/story/component-breadcrumb--home-route"}},{text:"BC12345678"}]};const b=d.bind({});b.args={breadcrumbs:[{text:"BC Registries Dashboard",to:{name:"component-breadcrumb--navigation-route"}},{text:"BC12345678",to:{name:"/?path=/story/component-breadcrumb--base-route"}},{text:"some route"}]};var v,_,g;n.parameters={...n.parameters,docs:{...(v=n.parameters)==null?void 0:v.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -28,4 +28,4 @@ Example breadcrumb: }, template: '' // $props comes from args below })`,...(C=(B=b.parameters)==null?void 0:B.docs)==null?void 0:C.source}}};const H=["homeRoute","baseRoute","navigationRoute"];export{H as __namedExportsOrder,m as baseRoute,z as default,n as homeRoute,b as navigationRoute}; -//# sourceMappingURL=Breadcrumb.stories-d1ab30fc.js.map +//# sourceMappingURL=Breadcrumb.stories-9e60a27e.js.map diff --git a/docs/assets/Breadcrumb.stories-d1ab30fc.js.map b/docs/assets/Breadcrumb.stories-9e60a27e.js.map similarity index 98% rename from docs/assets/Breadcrumb.stories-d1ab30fc.js.map rename to docs/assets/Breadcrumb.stories-9e60a27e.js.map index 9061954b..09876a6c 100644 --- a/docs/assets/Breadcrumb.stories-d1ab30fc.js.map +++ b/docs/assets/Breadcrumb.stories-9e60a27e.js.map @@ -1 +1 @@ -{"version":3,"file":"Breadcrumb.stories-d1ab30fc.js","sources":["../../src/components/breadcrumb/Breadcrumb.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["Breadcrumb","Vue","__publicField","routeIndex","item","_a","_b","_c","__decorateClass","Prop","Component"],"mappings":"0dAsEA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAQAC,EAAA,oBAOA,IAAA,SAAA,WACA,MAAAC,EAAA,KAAA,YAAA,UAAAC,GAAA,SAAA,QAAAC,EAAAD,EAAA,KAAA,YAAAC,EAAA,UAAAC,EAAA,KAAA,SAAA,YAAAA,EAAA,MAAA,EACA,QAAAD,EAAA,KAAA,YAAAF,EAAA,CAAA,IAAA,YAAAE,EAAA,SAAAE,GAAAD,EAAA,KAAA,YAAAH,EAAA,CAAA,IAAA,YAAAG,EAAA,KAAA,YAAAC,EAAA,KACA,CAGA,cAAAH,EAAA,SACA,QAAAC,EAAA,KAAA,SAAA,YAAAA,EAAA,UAAAC,EAAAF,GAAA,YAAAA,EAAA,KAAA,YAAAE,EAAA,KACA,CACA,EAhBAE,EAAA,CAAAC,EAAA,CAAA,QAAA,IAAA,CAAA,EAAA,CAAA,EARAT,EAQA,UAAA,cAAA,CAAA,EARAA,EAAAQ,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Breadcrumb.stories-9e60a27e.js","sources":["../../src/components/breadcrumb/Breadcrumb.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["Breadcrumb","Vue","__publicField","routeIndex","item","_a","_b","_c","__decorateClass","Prop","Component"],"mappings":"0dAsEA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAQAC,EAAA,oBAOA,IAAA,SAAA,WACA,MAAAC,EAAA,KAAA,YAAA,UAAAC,GAAA,SAAA,QAAAC,EAAAD,EAAA,KAAA,YAAAC,EAAA,UAAAC,EAAA,KAAA,SAAA,YAAAA,EAAA,MAAA,EACA,QAAAD,EAAA,KAAA,YAAAF,EAAA,CAAA,IAAA,YAAAE,EAAA,SAAAE,GAAAD,EAAA,KAAA,YAAAH,EAAA,CAAA,IAAA,YAAAG,EAAA,KAAA,YAAAC,EAAA,KACA,CAGA,cAAAH,EAAA,SACA,QAAAC,EAAA,KAAA,SAAA,YAAAA,EAAA,UAAAC,EAAAF,GAAA,YAAAA,EAAA,KAAA,YAAAE,EAAA,KACA,CACA,EAhBAE,EAAA,CAAAC,EAAA,CAAA,QAAA,IAAA,CAAA,EAAA,CAAA,EARAT,EAQA,UAAA,cAAA,CAAA,EARAA,EAAAQ,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/BusinessLookup.stories-a2dfe0b4.js b/docs/assets/BusinessLookup.stories-2a9df937.js similarity index 87% rename from docs/assets/BusinessLookup.stories-a2dfe0b4.js rename to docs/assets/BusinessLookup.stories-2a9df937.js index 86d353eb..224ec803 100644 --- a/docs/assets/BusinessLookup.stories-a2dfe0b4.js +++ b/docs/assets/BusinessLookup.stories-2a9df937.js @@ -1,4 +1,4 @@ -var g=Object.defineProperty;var y=(o,e,s)=>e in o?g(o,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[e]=s;var i=(o,e,s)=>(y(o,typeof e!="symbol"?e+"":e,s),s);import{V as k}from"./vue.esm-b1e57a2f.js";import{C as L,P as u,E as m,n as C}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as h}from"./Watch-62f8b699.js";import{l as S}from"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var N=Object.defineProperty,E=Object.getOwnPropertyDescriptor,r=(o,e,s,t)=>{for(var a=t>1?void 0:t?E(e,s):e,p=o.length-1,c;p>=0;p--)(c=o[p])&&(a=(t?c(e,s,a):c(a))||a);return t&&a&&N(e,s,a),a},B=(o=>(o.INITIAL="initial",o.SEARCHING="searching",o.SHOW_RESULTS="show results",o.NO_RESULTS="no results",o.SUMMARY="summary",o))(B||{});let n=class extends k{constructor(){super(...arguments);i(this,"showErrors");i(this,"businessLookup");i(this,"BusinessLookupServices");i(this,"hasBusinessLookupChanges");i(this,"editableBusinessName");i(this,"searchStatus");i(this,"States",B);i(this,"state","initial");i(this,"searchResults",[]);i(this,"selectedBusiness",null);i(this,"businessLookupRules",[s=>!!s||"Business is required"]);i(this,"businessNameRules",[s=>!!(s!=null&&s.trim())||"Business or corporation name is required",s=>(s==null?void 0:s.length)<=150||"Cannot exceed 150 characters"]);i(this,"onSearchInputDebounced",S.debounce(async(s,t)=>{(t==null?void 0:t.length)>2?(s.state="searching",s.searchResults=await s.BusinessLookupServices.search(t,s.searchStatus).catch(()=>[]),s.state=s.searchResults.length>0?"show results":"no results"):(s.searchResults=[],s.state="initial")},600))}get identifier(){return this.businessLookup.identifier}get businessName(){return this.businessLookup.name}get businessNumber(){return this.businessLookup.bn||""}get haveBusiness(){return!!this.identifier&&(!!this.businessName||this.editableBusinessName)}get isFormValid(){return this.haveBusiness&&this.state==="summary"}setBusinessName(s){const t=s==null?void 0:s.trim();this.onSelectedBusiness({...this.businessLookup,name:t})}onSearchInput(s){this.onSearchInputDebounced(this,s)}onSelectedBusiness(s){s&&(this.setBusiness(s),this.selectedBusiness=null)}onHaveBusinessChanged(s){this.state=s?"summary":"initial"}onIsFormValidChanged(s){this.emitValid(s)}setBusiness(s){}emitUndo(){}emitValid(s){}};r([u({required:!0})],n.prototype,"showErrors",2);r([u({required:!0})],n.prototype,"businessLookup",2);r([u({required:!0})],n.prototype,"BusinessLookupServices",2);r([u({default:!1})],n.prototype,"hasBusinessLookupChanges",2);r([u({default:!1})],n.prototype,"editableBusinessName",2);r([u({default:"ACTIVE"})],n.prototype,"searchStatus",2);r([h("selectedBusiness")],n.prototype,"onSelectedBusiness",1);r([h("haveBusiness",{immediate:!0})],n.prototype,"onHaveBusinessChanged",1);r([h("isFormValid")],n.prototype,"onIsFormValidChanged",1);r([m("setBusiness")],n.prototype,"setBusiness",1);r([m("undoBusiness")],n.prototype,"emitUndo",1);r([m("valid")],n.prototype,"emitValid",1);n=r([L({})],n);var x=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{attrs:{id:"business-lookup"}},[e.state!==e.States.SUMMARY?s("div",[s("v-autocomplete",{staticClass:"mt-5",attrs:{filled:"","no-filter":"","append-icon":"","return-object":"",autocomplete:"chrome-off","menu-props":"{ maxHeight: 380 }",label:"Business or Corporation Name or Incorporation Number","item-text":"identifier",name:Math.random(),rules:e.showErrors?e.businessLookupRules:[],items:e.searchResults,loading:e.state==e.States.SEARCHING,"hide-no-data":e.state!=e.States.NO_RESULTS},on:{"update:search-input":function(t){return e.onSearchInput(t)}},scopedSlots:e._u([{key:"selection",fn:function(){},proxy:!0},{key:"no-data",fn:function(){return[s("v-list-item",[s("div",[e._v("No matches found.")])])]},proxy:!0},{key:"item",fn:function({item:t}){return[s("v-row",{staticClass:"business-lookup-result pt-1"},[s("v-col",{attrs:{cols:"2"}},[s("div",{staticClass:"result-identifier"},[e._v(" "+e._s(t.identifier)+" ")])]),s("v-col",{attrs:{cols:"10"}},[s("div",{staticClass:"result-name"},[e._v(" "+e._s(t.name)+" ")]),s("div",{staticClass:"result-bn"},[e._v(" "+e._s(t.bn)+" ")])])],1)]}}],null,!1,2512664218),model:{value:e.selectedBusiness,callback:function(t){e.selectedBusiness=t},expression:"selectedBusiness"}})],1):e._e(),e.state===e.States.SUMMARY&&e.haveBusiness?s("div",{staticClass:"summary-block mt-5"},[s("v-row",{attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"10"}},[s("v-row",{attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"12"}},[e.editableBusinessName?s("div",{staticClass:"d-flex align-center"},[s("label",[e._v("Business or Corporation Name:")]),s("v-text-field",{staticClass:"mx-4 mr-md-0",attrs:{id:"organization-name",dense:"",filled:"","hide-details":"auto",rules:e.businessNameRules,value:e.businessName},on:{input:function(t){return e.setBusinessName(t)}}})],1):[s("label",[e._v("Name: ")]),s("span",[e._v(e._s(e.businessName))])]],2)],1),s("v-row",{staticClass:"mt-1",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"12"}},[s("label",[e._v("Incorporation Number: ")]),s("span",[e._v(e._s(e.identifier))])])],1),s("v-row",{staticClass:"mt-1",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"12"}},[s("label",[e._v("Business Number: ")]),s("span",[e._v(e._s(e.businessNumber))])])],1)],1),s("v-col",{attrs:{cols:"2"}},[s("div",{attrs:{id:"bl-more-actions"}},[s("v-btn",{attrs:{id:"bl-undo-btn",text:"",color:"primary"},on:{click:function(t){return e.emitUndo()}}},[s("v-icon",{attrs:{small:""}},[e._v(" mdi-undo ")]),s("span",[e._v("Undo")])],1)],1)])],1)],1):e._e()])},R=[],_=C(n,x,R,!1,null,"d6c0c489",null,null);const w=_.exports;_.exports.__docgenInfo={exportName:"default",displayName:"BusinessLookup",description:"",tags:{},props:[{name:"showErrors",tags:{},description:"Whether to show errors.",type:{name:"boolean"},required:!0},{name:"businessLookup",tags:{},description:"The BusinessLookup object.",type:{name:"BusinessLookupIF"},required:!0},{name:"BusinessLookupServices",tags:{},description:"Class for BusinessLookup services.",type:{name:"any"},required:!0},{name:"hasBusinessLookupChanges",tags:{},description:"Whether to display Change features.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editableBusinessName",tags:{},description:"Whether to allow editing of business name.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"searchStatus",tags:{},description:"Business status to search for (eg, ACTIVE or HISTORICAL or '' to match all.",type:{name:"string"},defaultValue:{func:!1,value:"'ACTIVE'"}}],events:[{name:"setBusiness",description:"Emits event to update the Business object."},{name:"undoBusiness",description:"Emits event to undo the selected business."},{name:"valid",description:"Emits event to update this component's validity."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/business-lookup/BusinessLookup.vue"]};const F={title:"component/BusinessLookup"},I=(o,{argTypes:e})=>({props:Object.keys(e),components:{BusinessLookup:w},template:''}),d={identifier:"BC1234567",name:"Test Business Name"};class V{static async search(e){return Promise.resolve([d])}}const l=I.bind({});l.args={showErrors:!1,businessLookup:{identifier:d.identifier,name:d.name},BusinessLookupServices:V,hasBusinessLookupChanges:!0};var v,f,b;l.parameters={...l.parameters,docs:{...(v=l.parameters)==null?void 0:v.docs,source:{originalSource:`(args, { +var g=Object.defineProperty;var y=(o,e,s)=>e in o?g(o,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[e]=s;var i=(o,e,s)=>(y(o,typeof e!="symbol"?e+"":e,s),s);import{V as k}from"./vue.esm-b1e57a2f.js";import{C as L,P as u,E as m,n as C}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as h}from"./Watch-62f8b699.js";import{l as S}from"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var N=Object.defineProperty,E=Object.getOwnPropertyDescriptor,r=(o,e,s,t)=>{for(var a=t>1?void 0:t?E(e,s):e,p=o.length-1,c;p>=0;p--)(c=o[p])&&(a=(t?c(e,s,a):c(a))||a);return t&&a&&N(e,s,a),a},B=(o=>(o.INITIAL="initial",o.SEARCHING="searching",o.SHOW_RESULTS="show results",o.NO_RESULTS="no results",o.SUMMARY="summary",o))(B||{});let n=class extends k{constructor(){super(...arguments);i(this,"showErrors");i(this,"businessLookup");i(this,"BusinessLookupServices");i(this,"hasBusinessLookupChanges");i(this,"editableBusinessName");i(this,"searchStatus");i(this,"States",B);i(this,"state","initial");i(this,"searchResults",[]);i(this,"selectedBusiness",null);i(this,"businessLookupRules",[s=>!!s||"Business is required"]);i(this,"businessNameRules",[s=>!!(s!=null&&s.trim())||"Business or corporation name is required",s=>(s==null?void 0:s.length)<=150||"Cannot exceed 150 characters"]);i(this,"onSearchInputDebounced",S.debounce(async(s,t)=>{(t==null?void 0:t.length)>2?(s.state="searching",s.searchResults=await s.BusinessLookupServices.search(t,s.searchStatus).catch(()=>[]),s.state=s.searchResults.length>0?"show results":"no results"):(s.searchResults=[],s.state="initial")},600))}get identifier(){return this.businessLookup.identifier}get businessName(){return this.businessLookup.name}get businessNumber(){return this.businessLookup.bn||""}get haveBusiness(){return!!this.identifier&&(!!this.businessName||this.editableBusinessName)}get isFormValid(){return this.haveBusiness&&this.state==="summary"}setBusinessName(s){const t=s==null?void 0:s.trim();this.onSelectedBusiness({...this.businessLookup,name:t})}onSearchInput(s){this.onSearchInputDebounced(this,s)}onSelectedBusiness(s){s&&(this.setBusiness(s),this.selectedBusiness=null)}onHaveBusinessChanged(s){this.state=s?"summary":"initial"}onIsFormValidChanged(s){this.emitValid(s)}setBusiness(s){}emitUndo(){}emitValid(s){}};r([u({required:!0})],n.prototype,"showErrors",2);r([u({required:!0})],n.prototype,"businessLookup",2);r([u({required:!0})],n.prototype,"BusinessLookupServices",2);r([u({default:!1})],n.prototype,"hasBusinessLookupChanges",2);r([u({default:!1})],n.prototype,"editableBusinessName",2);r([u({default:"ACTIVE"})],n.prototype,"searchStatus",2);r([h("selectedBusiness")],n.prototype,"onSelectedBusiness",1);r([h("haveBusiness",{immediate:!0})],n.prototype,"onHaveBusinessChanged",1);r([h("isFormValid")],n.prototype,"onIsFormValidChanged",1);r([m("setBusiness")],n.prototype,"setBusiness",1);r([m("undoBusiness")],n.prototype,"emitUndo",1);r([m("valid")],n.prototype,"emitValid",1);n=r([L({})],n);var R=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{attrs:{id:"business-lookup"}},[e.state!==e.States.SUMMARY?s("div",[s("v-autocomplete",{staticClass:"mt-5",attrs:{filled:"","no-filter":"","append-icon":"","return-object":"",autocomplete:"chrome-off","menu-props":"{ maxHeight: 380 }",label:"Business or Corporation Name or Incorporation Number","item-text":"identifier",name:Math.random(),rules:e.showErrors?e.businessLookupRules:[],items:e.searchResults,loading:e.state==e.States.SEARCHING,"hide-no-data":e.state!=e.States.NO_RESULTS},on:{"update:search-input":function(t){return e.onSearchInput(t)}},scopedSlots:e._u([{key:"selection",fn:function(){},proxy:!0},{key:"no-data",fn:function(){return[s("v-list-item",[s("div",[e._v("No matches found.")])])]},proxy:!0},{key:"item",fn:function({item:t}){return[s("v-row",{staticClass:"business-lookup-result pt-1"},[s("v-col",{attrs:{cols:"2"}},[s("div",{staticClass:"result-identifier"},[e._v(" "+e._s(t.identifier)+" ")])]),s("v-col",{attrs:{cols:"10"}},[s("div",{staticClass:"result-name"},[e._v(" "+e._s(t.name)+" ")]),s("div",{staticClass:"result-bn"},[e._v(" "+e._s(t.bn)+" ")])])],1)]}}],null,!1,2512664218),model:{value:e.selectedBusiness,callback:function(t){e.selectedBusiness=t},expression:"selectedBusiness"}})],1):e._e(),e.state===e.States.SUMMARY&&e.haveBusiness?s("div",{staticClass:"summary-block mt-5"},[s("v-row",{attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"10"}},[s("v-row",{attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"12"}},[e.editableBusinessName?s("div",{staticClass:"d-flex align-center"},[s("label",[e._v("Business or Corporation Name:")]),s("v-text-field",{staticClass:"mx-4 mr-md-0",attrs:{id:"organization-name",dense:"",filled:"","hide-details":"auto",rules:e.businessNameRules,value:e.businessName},on:{input:function(t){return e.setBusinessName(t)}}})],1):[s("label",[e._v("Name: ")]),s("span",[e._v(e._s(e.businessName))])]],2)],1),s("v-row",{staticClass:"mt-1",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"12"}},[s("label",[e._v("Incorporation Number: ")]),s("span",[e._v(e._s(e.identifier))])])],1),s("v-row",{staticClass:"mt-1",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"12"}},[s("label",[e._v("Business Number: ")]),s("span",[e._v(e._s(e.businessNumber))])])],1)],1),s("v-col",{attrs:{cols:"2"}},[s("div",{attrs:{id:"bl-more-actions"}},[s("v-btn",{attrs:{id:"bl-undo-btn",text:"",color:"primary"},on:{click:function(t){return e.emitUndo()}}},[s("v-icon",{attrs:{small:""}},[e._v(" mdi-undo ")]),s("span",[e._v("Undo")])],1)],1)])],1)],1):e._e()])},x=[],_=C(n,R,x,!1,null,"d6c0c489",null,null);const w=_.exports;_.exports.__docgenInfo={exportName:"default",displayName:"BusinessLookup",description:"",tags:{},props:[{name:"showErrors",tags:{},description:"Whether to show errors.",type:{name:"boolean"},required:!0},{name:"businessLookup",tags:{},description:"The BusinessLookup object.",type:{name:"BusinessLookupIF"},required:!0},{name:"BusinessLookupServices",tags:{},description:"Class for BusinessLookup services.",type:{name:"any"},required:!0},{name:"hasBusinessLookupChanges",tags:{},description:"Whether to display Change features.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editableBusinessName",tags:{},description:"Whether to allow editing of business name.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"searchStatus",tags:{},description:"Business status to search for (eg, ACTIVE or HISTORICAL or '' to match all.",type:{name:"string"},defaultValue:{func:!1,value:"'ACTIVE'"}}],events:[{name:"setBusiness",description:"Emits event to update the Business object."},{name:"undoBusiness",description:"Emits event to undo the selected business."},{name:"valid",description:"Emits event to update this component's validity."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/business-lookup/BusinessLookup.vue"]};const F={title:"component/BusinessLookup"},I=(o,{argTypes:e})=>({props:Object.keys(e),components:{BusinessLookup:w},template:''}),d={identifier:"BC1234567",name:"Test Business Name"};class V{static async search(e){return Promise.resolve([d])}}const l=I.bind({});l.args={showErrors:!1,businessLookup:{identifier:d.identifier,name:d.name},BusinessLookupServices:V,hasBusinessLookupChanges:!0};var f,v,b;l.parameters={...l.parameters,docs:{...(f=l.parameters)==null?void 0:f.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -6,5 +6,5 @@ var g=Object.defineProperty;var y=(o,e,s)=>e in o?g(o,e,{enumerable:!0,configura BusinessLookup }, template: '' // $props comes from args below -})`,...(b=(f=l.parameters)==null?void 0:f.docs)==null?void 0:b.source}}};const H=["Default"];export{l as Default,H as __namedExportsOrder,F as default}; -//# sourceMappingURL=BusinessLookup.stories-a2dfe0b4.js.map +})`,...(b=(v=l.parameters)==null?void 0:v.docs)==null?void 0:b.source}}};const H=["Default"];export{l as Default,H as __namedExportsOrder,F as default}; +//# sourceMappingURL=BusinessLookup.stories-2a9df937.js.map diff --git a/docs/assets/BusinessLookup.stories-a2dfe0b4.js.map b/docs/assets/BusinessLookup.stories-2a9df937.js.map similarity index 99% rename from docs/assets/BusinessLookup.stories-a2dfe0b4.js.map rename to docs/assets/BusinessLookup.stories-2a9df937.js.map index 7c24e093..5bfe099a 100644 --- a/docs/assets/BusinessLookup.stories-a2dfe0b4.js.map +++ b/docs/assets/BusinessLookup.stories-2a9df937.js.map @@ -1 +1 @@ -{"version":3,"file":"BusinessLookup.stories-a2dfe0b4.js","sources":["../../src/components/business-lookup/BusinessLookup.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["e","t","module","this","r","n","a","o","i","u","s","c","f","ContactInfo","Vue","__publicField","label","v","isEditing","contactInfo","__decorateClass","Prop","Watch","Emit","Component","mask"],"mappings":"saAAC,SAASA,EAAEC,EAAE,CAAmDC,EAAe,QAAAD,EAAC,CAAsH,GAAGE,GAAK,UAAU,CAAC,OAAO,SAASH,EAAE,CAAC,SAASC,EAAEG,EAAE,CAAC,GAAGC,EAAED,CAAC,EAAE,OAAOC,EAAED,CAAC,EAAE,QAAQ,IAAIE,EAAED,EAAED,CAAC,EAAE,CAAC,EAAEA,EAAE,EAAE,GAAG,QAAQ,CAAE,CAAA,EAAE,OAAOJ,EAAEI,CAAC,EAAE,KAAKE,EAAE,QAAQA,EAAEA,EAAE,QAAQL,CAAC,EAAEK,EAAE,EAAE,GAAGA,EAAE,OAAO,CAAC,IAAID,EAAE,CAAE,EAAC,OAAOJ,EAAE,EAAED,EAAEC,EAAE,EAAEI,EAAEJ,EAAE,EAAE,SAASD,EAAE,CAAC,OAAOA,CAAC,EAAEC,EAAE,EAAE,SAASD,EAAEK,EAAED,EAAE,CAACH,EAAE,EAAED,EAAEK,CAAC,GAAG,OAAO,eAAeL,EAAEK,EAAE,CAAC,aAAa,GAAG,WAAW,GAA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,UAAA,+BAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,oBAAA,CAAA,EAhBAR,EAgBA,UAAA,eAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAnBAR,EAmBA,UAAA,YAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,EAtBAR,EAsBA,UAAA,YAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,EAzBAR,EAyBA,UAAA,cAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EA5BAR,EA4BA,UAAA,iBAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EA/BAR,EA+BA,UAAA,uBAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAlCAR,EAkCA,UAAA,iBAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EArCAR,EAqCA,UAAA,gBAAA,CAAA,EA0EAO,EAAA,CADAE,EAAA,kBAAA,CAAA,KAAA,GAAA,UAAA,GAAA,CAAA,EA9GAT,EA+GA,UAAA,wBAAA,CAAA,EAQAO,EAAA,CAHAE,EAAA,YAAA,CAAA,UAAA,GAAA,EACAC,EAAA,kBAAA,CAAA,EArHAV,EAuHA,UAAA,gBAAA,CAAA,EAIAO,EAAA,CAFAG,EAAA,mBAAA,CAAA,EAzHAV,EA2HA,UAAA,kBAAA,CAAA,EA3HAA,EAAAO,EAAA,CAHAI,GAAA,CACA,WAAA,CAAAC,KAAAA,GAAAA,IAAA,CAAA,CACA,CAAA,EACAZ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/docs/assets/CorrectName.stories-12fcb717.js b/docs/assets/CorrectName.stories-12fcb717.js new file mode 100644 index 00000000..68f56870 --- /dev/null +++ b/docs/assets/CorrectName.stories-12fcb717.js @@ -0,0 +1,24 @@ +var W=Object.defineProperty;var Y=(r,t,e)=>t in r?W(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var n=(r,t,e)=>(Y(r,typeof t!="symbol"?t+"":t,e),e);import{V as x}from"./vue.esm-b1e57a2f.js";import{c as z,E as l,C as R,P as s,n as q,m as G}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as v}from"./Watch-62f8b699.js";import{C as V,G as O}from"./corp-type-module-8edd1173.js";import{C as K}from"./ConfirmDialog-428577e9.js";import{N as Z}from"./validation-mixin-e5d1d708.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";function H(r){return typeof r!="function"||!r.managed&&!r.managedReactive}function J(r){var t=function(){var e=this,a=typeof r=="function"?r.call(this):r;a=Object.create(a||null),a[g]=Object.create(this[g]||{});for(var o in t.managed)a[t.managed[o]]=this[o];var i=function(T){a[t.managedReactive[T]]=m[T],Object.defineProperty(a[g],t.managedReactive[T],{enumerable:!0,configurable:!0,get:function(){return e[T]}})},m=this;for(var o in t.managedReactive)i(o);return a};return t.managed={},t.managedReactive={},t}var g="__reactiveInject__";function Q(r){Array.isArray(r.inject)||(r.inject=r.inject||{},r.inject[g]={from:g,default:{}})}function S(r){return z(function(t,e){var a=t.provide;Q(t),H(a)&&(a=t.provide=J(a)),a.managed[e]=r||e})}var _=(r=>(r.CORRECT_NAME="correct-name",r.CORRECT_NAME_TO_NUMBER="correct-name-to-number",r.CORRECT_NEW_NR="correct-new-nr",r))(_||{}),X=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,h=(r,t,e,a)=>{for(var o=a>1?void 0:a?ee(t,e):t,i=r.length-1,m;i>=0;i--)(m=r[i])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&X(t,e,o),o};let d=class extends x{constructor(){super(...arguments);n(this,"$refs");n(this,"companyName");n(this,"formType");n(this,"validate");n(this,"formValid",!1);n(this,"textfield","")}get companyNameRules(){return[e=>!!e||" A company name is required",e=>e!==this.companyName||" Enter a new company name"]}onCompanyNameChanged(e){this.textfield=e}onSubmit(){this.formType===_.CORRECT_NAME&&(this.emitCompanyName(this.textfield),this.emitSaved(!0))}onValidate(e){e?this.$refs.form.validate():this.$refs.form.resetValidation()}emitValid(){return this.formValid}emitSaved(e){}emitCompanyName(e){}};h([s({required:!0})],d.prototype,"companyName",2);h([s({required:!0})],d.prototype,"formType",2);h([s({required:!0})],d.prototype,"validate",2);h([S()],d.prototype,"formValid",2);h([S()],d.prototype,"textfield",2);h([v("companyName",{immediate:!0})],d.prototype,"onCompanyNameChanged",1);h([v("formType")],d.prototype,"onSubmit",1);h([v("validate")],d.prototype,"onValidate",1);h([v("formValid"),l("valid")],d.prototype,"emitValid",1);h([l("saved")],d.prototype,"emitSaved",1);h([l("update:companyName")],d.prototype,"emitCompanyName",1);d=h([R({})],d);var te=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-form",{ref:"form",attrs:{id:"correct-company-name-form"},model:{value:t.formValid,callback:function(a){t.formValid=a},expression:"formValid"}},[e("v-row",{attrs:{"no-gutters":""}},[e("v-col",[e("v-text-field",{staticClass:"mb-n3",attrs:{id:"company-name-textfield",filled:"",rules:t.companyNameRules},model:{value:t.textfield,callback:function(a){t.textfield=a},expression:"textfield"}})],1)],1)],1)},ae=[],F=q(d,te,ae,!1,null,null,null,null);const D=F.exports;F.exports.__docgenInfo={exportName:"default",displayName:"CorrectCompanyName",description:"",tags:{},props:[{name:"companyName",tags:{},type:{name:"string"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"validate",tags:{},type:{name:"boolean"},required:!0}],events:[{name:"saved",description:"Inform parent that the process is complete."},{name:"update:companyName",description:"Inform parent of updated company name."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/correct-name/CorrectCompanyName.vue"]};var re=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,N=(r,t,e,a)=>{for(var o=a>1?void 0:a?ne(t,e):t,i=r.length-1,m;i>=0;i--)(m=r[i])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&re(t,e,o),o};let y=class extends x{constructor(){super(...arguments);n(this,"$refs");n(this,"businessId");n(this,"entityType");n(this,"formType");n(this,"validate");n(this,"checkbox",!1);n(this,"formValid",!1)}get numberedName(){var a;const e=((a=this.businessId)==null?void 0:a.substring(2))||"Unknown";switch(this.entityType){case V.BC_ULC_COMPANY:return`${e} B.C. UNLIMITED LIABILITY COMPANY`;case V.BC_CCC:return`${e} B.C. COMMUNITY CONTRIBUTION COMPANY LTD.`;default:return`${e} B.C. LTD.`}}onSubmit(){this.formType===_.CORRECT_NAME_TO_NUMBER&&(this.emitCompanyName(this.numberedName),this.emitSaved(!0))}onValidate(e){e?this.$refs.form.validate():this.$refs.form.resetValidation()}emitValid(){return this.formValid}emitSaved(e){}emitCompanyName(e){}};N([s({required:!0})],y.prototype,"businessId",2);N([s({required:!0})],y.prototype,"entityType",2);N([s({required:!0})],y.prototype,"formType",2);N([s({required:!0})],y.prototype,"validate",2);N([v("formType")],y.prototype,"onSubmit",1);N([v("validate")],y.prototype,"onValidate",1);N([v("formValid"),l("valid")],y.prototype,"emitValid",1);N([l("saved")],y.prototype,"emitSaved",1);N([l("update:companyName")],y.prototype,"emitCompanyName",1);y=N([R({})],y);var oe=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-form",{ref:"form",attrs:{id:"correct-name-to-number-form"},model:{value:t.formValid,callback:function(a){t.formValid=a},expression:"formValid"}},[e("v-row",{attrs:{"no-gutters":""}},[e("v-col",[e("v-checkbox",{staticClass:"mb-n5",attrs:{id:"correct-name-to-number-checkbox",label:`Change the company name to ${t.numberedName}`,rules:[a=>a]},model:{value:t.checkbox,callback:function(a){t.checkbox=a},expression:"checkbox"}})],1)],1)],1)},ie=[],j=q(y,oe,ie,!1,null,"d115bbb7",null,null);const M=j.exports;j.exports.__docgenInfo={exportName:"default",displayName:"CorrectNameToNumber",description:"",tags:{},props:[{name:"businessId",tags:{},type:{name:"string"},required:!0},{name:"entityType",tags:{},type:{name:"CorpTypeCd"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"validate",tags:{},type:{name:"boolean"},required:!0}],events:[{name:"saved",description:"Inform parent that the process is complete."},{name:"update:companyName",description:"Inform parent of updated company name."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/correct-name/CorrectNameToNumber.vue"]};var se=Object.defineProperty,me=Object.getOwnPropertyDescriptor,f=(r,t,e,a)=>{for(var o=a>1?void 0:a?me(t,e):t,i=r.length-1,m;i>=0;i--)(m=r[i])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&se(t,e,o),o};let c=class extends G(Z){constructor(){super(...arguments);n(this,"$refs");n(this,"businessId");n(this,"entityType");n(this,"fetchAndValidateNr");n(this,"formType");n(this,"nameRequest");n(this,"validate");n(this,"applicantEmail","");n(this,"applicantPhone","");n(this,"formValid",!1);n(this,"nrNumber","");n(this,"nrNumRules",[e=>!!e||"Name Request Number is required",e=>this.isValidNrNumber(e)||"Name Request Number is invalid"]);n(this,"phoneRules",[e=>!/^\s/g.test(e)||"Invalid spaces",e=>!/\s$/g.test(e)||"Invalid spaces",e=>!((e==null?void 0:e.length)>12)||"Phone number is invalid"]);n(this,"emailRules",[e=>!/^\s/g.test(e)||"Invalid spaces",e=>!/\s$/g.test(e)||"Invalid spaces",e=>this.isValidEmail(e)||"Email is invalid"])}get componentValid(){return this.formValid&&!!this.nrNumber&&(!!this.applicantPhone||!!this.applicantEmail)}isValidNrNumber(e){return new RegExp(/^(NR )\d{7}$/).test(e)}isValidEmail(e){return(e==null?void 0:e.length)<1||this.applicantPhone&&e?!0: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,}))$/).test(e)}async onSubmit(){if(this.formType===_.CORRECT_NEW_NR)try{const e=await this.fetchAndValidateNr(this.nrNumber,this.businessId,this.applicantPhone,this.applicantEmail);if(this.entityType!==e.legalType){this.$refs.form.resetValidation(),this.emitSaved(!1);const a=O(e.legalType),o=O(this.entityType),i=`

This ${a} Name Request does not match the current business type ${o}. + +The Name Request type must match the business type before you can continue.

`;await this.showConfirmDialog(this.$refs.confirm,"Name Request Type Does Not Match Business Type",i)}else this.emitNameRequest(e),this.emitCompanyName(this.getNrApprovedName(e)),this.emitSaved(!0)}catch(e){alert(e.message),this.$refs.form.resetValidation(),this.emitSaved(!1)}}onValidate(e){e?this.$refs.form.validate():this.$refs.form.resetValidation()}emitValid(){return this.componentValid}emitSaved(e){}emitCompanyName(e){}emitNameRequest(e){}async showConfirmDialog(e,a,o){return e.open(a,o,{width:"45rem",persistent:!0,yes:"OK",no:null,cancel:null}).catch(()=>!1)}};f([s({required:!0})],c.prototype,"businessId",2);f([s({required:!0})],c.prototype,"entityType",2);f([s({required:!0})],c.prototype,"fetchAndValidateNr",2);f([s({required:!0})],c.prototype,"formType",2);f([s({required:!0})],c.prototype,"nameRequest",2);f([s({required:!0})],c.prototype,"validate",2);f([v("formType")],c.prototype,"onSubmit",1);f([v("validate")],c.prototype,"onValidate",1);f([v("componentValid"),l("valid")],c.prototype,"emitValid",1);f([l("saved")],c.prototype,"emitSaved",1);f([l("update:companyName")],c.prototype,"emitCompanyName",1);f([l("update:nameRequest")],c.prototype,"emitNameRequest",1);c=f([R({components:{ConfirmDialogShared:K}})],c);var pe=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-form",{ref:"form",attrs:{id:"correct-name-request-form","lazy-validation":""},model:{value:t.formValid,callback:function(a){t.formValid=a},expression:"formValid"}},[e("ConfirmDialogShared",{ref:"confirm",attrs:{attach:"#app"}}),e("v-row",{attrs:{"no-gutters":""}},[e("v-col",{staticClass:"mt-3",attrs:{cols:"1"}},[e("v-chip",{staticClass:"step-icon",attrs:{outlined:""}},[t._v(" 1 ")])],1),e("v-col",[e("v-text-field",{staticClass:"text-input-field",attrs:{id:"nr-number",filled:"","persistent-hint":"",label:"Enter the NR Number",hint:"Example: NR 1234567",rules:t.nrNumRules},on:{keyup:function(a){t.nrNumber=t.nrNumber.toUpperCase()}},model:{value:t.nrNumber,callback:function(a){t.nrNumber=a},expression:"nrNumber"}})],1)],1),e("v-row",{staticClass:"mt-4 mb-n1",attrs:{"no-gutters":""}},[e("v-col",{staticClass:"mt-3",attrs:{cols:"1"}},[e("v-chip",{staticClass:"step-icon",attrs:{outlined:""}},[t._v(" 2 ")])],1),e("v-col",{attrs:{cols:"5"}},[e("v-text-field",{staticClass:"text-input-field",attrs:{id:"applicant-phone",filled:"","persistent-hint":"",label:"Applicant's Phone Number",hint:"Example: 555-555-5555",type:"tel",rules:t.phoneRules},model:{value:t.applicantPhone,callback:function(a){t.applicantPhone=a},expression:"applicantPhone"}})],1),e("div",{staticClass:"ma-5"},[t._v(" or ")]),e("v-col",[e("v-text-field",{staticClass:"text-input-field",attrs:{id:"applicant-email",filled:"","persistent-hint":"",label:"Applicant's Notification Email",hint:"Example: name@email.com",type:"email",rules:t.emailRules},model:{value:t.applicantEmail,callback:function(a){t.applicantEmail=a},expression:"applicantEmail"}})],1)],1)],1)},ce=[],B=q(c,pe,ce,!1,null,"dafd5a27",null,null);const L=B.exports;B.exports.__docgenInfo={description:"Mixin that provides some useful Name Request utilities.",tags:{},exportName:"default",displayName:"CorrectNameRequest",props:[{name:"businessId",tags:{},type:{name:"string"},required:!0},{name:"entityType",tags:{},type:{name:"CorpTypeCd"},required:!0},{name:"fetchAndValidateNr",tags:{},type:{name:"TSFunctionType"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"nameRequest",tags:{},type:{name:"NameRequestIF"},required:!0},{name:"validate",tags:{},type:{name:"boolean"},required:!0}],events:[{name:"saved",description:"Inform parent that the process is complete."},{name:"update:companyName",description:"Inform parent of updated company name."},{name:"update:nameRequest",description:"Inform parent of updated name request object."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/correct-name/CorrectNameRequest.vue","/home/kdeodhar/gitRepo/bcrs-shared-components/src/mixins/name-request-mixin.ts"]};var le=Object.defineProperty,de=Object.getOwnPropertyDescriptor,u=(r,t,e,a)=>{for(var o=a>1?void 0:a?de(t,e):t,i=r.length-1,m;i>=0;i--)(m=r[i])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&le(t,e,o),o};let p=class extends x{constructor(){super(...arguments);n(this,"actionTxt");n(this,"businessId");n(this,"companyName");n(this,"correctionNameChoices");n(this,"entityType");n(this,"fetchAndValidateNr");n(this,"formType");n(this,"nameRequest");n(this,"displayedOptions",[]);n(this,"panel",null);n(this,"currentFormType",null);n(this,"isLoading",!1);n(this,"isSubComponentValid",!1);n(this,"validate",!1);n(this,"correctionNameOptions",[{id:_.CORRECT_NAME,title:"Edit the company name",description:"Correct typographical errors in the existing company name.",component:D},{id:_.CORRECT_NAME_TO_NUMBER,title:"Use the incorporation number as the name",description:null,component:M},{id:_.CORRECT_NEW_NR,title:"Use a new name request number",description:"Enter the new Name Request Number (e.g., NR 1234567) and either the applicant phone number OR the applicant email that was used when the name was requested.",component:L}])}mounted(){this.displayedOptions=this.correctionNameOptions.filter(e=>this.correctionNameChoices.includes(e.id)),this.isOneOption&&(this.panel=0,this.currentFormType=this.displayedOptions[0].id)}get isOneOption(){return this.correctionNameChoices.length===1}submitNameCorrection(){this.isSubComponentValid?(this.isLoading=!0,this.emitFormType(this.currentFormType),this.validate=!1):this.validate=!0}identifyForm(e){this.currentFormType=e,this.isSubComponentValid=!1}emitCancel(){this.validate=!1,this.panel=null}emitSaved(e){return this.isLoading=!1,this.emitFormType(null),e&&(this.panel=null),e}emitCompanyName(e){}emitFormType(e){}emitNameRequest(e){}};u([s({default:null})],p.prototype,"actionTxt",2);u([s({required:!0})],p.prototype,"businessId",2);u([s({required:!0})],p.prototype,"companyName",2);u([s({default:()=>[]})],p.prototype,"correctionNameChoices",2);u([s({required:!0})],p.prototype,"entityType",2);u([s({required:!0})],p.prototype,"fetchAndValidateNr",2);u([s({required:!0})],p.prototype,"formType",2);u([s({required:!0})],p.prototype,"nameRequest",2);u([l("cancel")],p.prototype,"emitCancel",1);u([l("saved")],p.prototype,"emitSaved",1);u([l("update:companyName")],p.prototype,"emitCompanyName",1);u([l("update:formType")],p.prototype,"emitFormType",1);u([l("update:nameRequest")],p.prototype,"emitNameRequest",1);p=u([R({components:{CorrectCompanyName:D,CorrectNameToNumber:M,CorrectNameRequest:L}})],p);var ue=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-container",{staticClass:"pa-0 pr-4",attrs:{id:"correct-name-options"}},[t.isOneOption?t._e():e("p",{staticClass:"info-text mb-5 pb-5 bottom-border"},[t._v(" You can "+t._s(t.actionTxt||"correct the company name")+" in one of the following ways: ")]),e("v-expansion-panels",{staticClass:"bottom-border",attrs:{accordion:""},model:{value:t.panel,callback:function(a){t.panel=a},expression:"panel"}},t._l(t.displayedOptions,function(a,o){return e("v-expansion-panel",{key:o,staticClass:"mb-4",attrs:{id:`x-panel-${a.id}`,disabled:t.isOneOption},on:{click:function(i){return t.identifyForm(a.id)}}},[e("v-expansion-panel-header",{class:{"name-options-header":t.isOneOption},scopedSlots:t._u([{key:"actions",fn:function(){return[e("v-icon",{attrs:{color:"primary"}},[t._v(" mdi-menu-down ")])]},proxy:!0}],null,!0)},[e("span",{staticClass:"names-option-title"},[t._v(t._s(a.title))])]),e("v-expansion-panel-content",{staticClass:"name-options-content pt-4"},[a.description?e("div",{staticClass:"info-text mb-4",attrs:{color:"primary"}},[t._v(" "+t._s(a.description)+" ")]):t._e(),e(a.component,{key:a.id,tag:"component",attrs:{businessId:t.businessId,companyName:t.companyName,entityType:t.entityType,fetchAndValidateNr:t.fetchAndValidateNr,formType:t.formType,nameRequest:t.nameRequest,validate:t.validate},on:{saved:function(i){return t.emitSaved(i)},"update:nameRequest":function(i){return t.emitNameRequest(i)},"update:companyName":function(i){return t.emitCompanyName(i)},valid:function(i){t.isSubComponentValid=i}}})],1)],1)}),1),e("div",{staticClass:"action-btns"},[e("v-btn",{attrs:{id:"done-btn",large:"",color:"primary",loading:t.isLoading},on:{click:function(a){return t.submitNameCorrection()}}},[e("span",[t._v("Done")])]),e("v-btn",{attrs:{id:"cancel-btn",large:"",outlined:"",color:"primary"},on:{click:function(a){return t.emitCancel()}}},[e("span",[t._v("Cancel")])])],1)],1)},fe=[],k=q(p,ue,fe,!1,null,"862e35a8",null,null);const ye=k.exports;k.exports.__docgenInfo={description:`Operation: +1. To initialize this component option list, pass in an array of id's of the components you want to display. + I.e., ['correct-new-nr', 'correct-name', 'correct-name-to-number'] +2. If this options list is only passed one value the option panel will be open by default. +3. The parent component will have to watch for the 'save' and 'cancel' events and handle them accordingly.`,tags:{},exportName:"default",displayName:"CorrectName",props:[{name:"actionTxt",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"businessId",tags:{},type:{name:"string"},required:!0},{name:"companyName",tags:{},type:{name:"string"},required:!0},{name:"correctionNameChoices",tags:{},type:{name:"Array",elements:[{name:"CorrectNameOptions"}]},defaultValue:{func:!0,value:"() => []"}},{name:"entityType",tags:{},type:{name:"CorpTypeCd"},required:!0},{name:"fetchAndValidateNr",tags:{},type:{name:"TSFunctionType"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"nameRequest",tags:{},type:{name:"NameRequestIF"},required:!0}],events:[{name:"cancel",description:"When Cancel button is clicked, informs parent that name correction is cancelled."},{name:"saved",description:"Inform parent that name correction process is done."},{name:"update:companyName",description:"Inform parent of updated company name."},{name:"update:formType",description:"Inform parent of updated form type."},{name:"update:nameRequest",description:"Inform parent of updated name request object."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/correct-name/CorrectName.vue"]};const $e={title:"component/CorrectName"},U=(r,{argTypes:t})=>({props:Object.keys(t),components:{CorrectName:ye},template:''}),C=U.bind({});C.args={businessId:"BC1234567",entityType:"BC",nameRequest:{},companyName:"Old Company Name",fetchAndValidateNr:()=>{},correctionNameChoices:["correct-name"]};const b=U.bind({});b.args={businessId:"BC1234567",entityType:"BC",nameRequest:{},companyName:"Old Company Name",fetchAndValidateNr:()=>{},correctionNameChoices:["correct-name-to-number","correct-new-nr"]};var $,I,E;C.parameters={...C.parameters,docs:{...($=C.parameters)==null?void 0:$.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + CorrectName + }, + template: '' // $props comes from args below +})`,...(E=(I=C.parameters)==null?void 0:I.docs)==null?void 0:E.source}}};var w,P,A;b.parameters={...b.parameters,docs:{...(w=b.parameters)==null?void 0:w.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + CorrectName + }, + template: '' // $props comes from args below +})`,...(A=(P=b.parameters)==null?void 0:P.docs)==null?void 0:A.source}}};const Ie=["correctName","correctNameNR"];export{Ie as __namedExportsOrder,C as correctName,b as correctNameNR,$e as default}; +//# sourceMappingURL=CorrectName.stories-12fcb717.js.map diff --git a/docs/assets/CorrectName.stories-8dafa4c8.js.map b/docs/assets/CorrectName.stories-12fcb717.js.map similarity index 99% rename from docs/assets/CorrectName.stories-8dafa4c8.js.map rename to docs/assets/CorrectName.stories-12fcb717.js.map index 67948022..e16def3d 100644 --- a/docs/assets/CorrectName.stories-8dafa4c8.js.map +++ b/docs/assets/CorrectName.stories-12fcb717.js.map @@ -1 +1 @@ -{"version":3,"file":"CorrectName.stories-8dafa4c8.js","sources":["../../node_modules/vue-property-decorator/lib/helpers/provideInject.js","../../node_modules/vue-property-decorator/lib/decorators/Provide.js","../../src/enums/correct-name-options.ts","../../src/components/correct-name/CorrectCompanyName.vue","../../src/components/correct-name/CorrectNameToNumber.vue","../../src/components/correct-name/CorrectNameRequest.vue","../../src/components/correct-name/CorrectName.vue"],"sourcesContent":["export function needToProduceProvide(original) {\n return (typeof original !== 'function' ||\n (!original.managed && !original.managedReactive));\n}\nexport function produceProvide(original) {\n var provide = function () {\n var _this = this;\n var rv = typeof original === 'function' ? original.call(this) : original;\n rv = Object.create(rv || null);\n // set reactive services (propagates previous services if necessary)\n rv[reactiveInjectKey] = Object.create(this[reactiveInjectKey] || {});\n for (var i in provide.managed) {\n rv[provide.managed[i]] = this[i];\n }\n var _loop_1 = function (i) {\n rv[provide.managedReactive[i]] = this_1[i]; // Duplicates the behavior of `@Provide`\n Object.defineProperty(rv[reactiveInjectKey], provide.managedReactive[i], {\n enumerable: true,\n configurable: true,\n get: function () { return _this[i]; },\n });\n };\n var this_1 = this;\n for (var i in provide.managedReactive) {\n _loop_1(i);\n }\n return rv;\n };\n provide.managed = {};\n provide.managedReactive = {};\n return provide;\n}\n/** Used for keying reactive provide/inject properties */\nexport var reactiveInjectKey = '__reactiveInject__';\nexport function inheritInjected(componentOptions) {\n // inject parent reactive services (if any)\n if (!Array.isArray(componentOptions.inject)) {\n componentOptions.inject = componentOptions.inject || {};\n componentOptions.inject[reactiveInjectKey] = {\n from: reactiveInjectKey,\n default: {},\n };\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { inheritInjected, needToProduceProvide, produceProvide, } from '../helpers/provideInject';\n/**\n * decorator of a provide\n * @param key key\n * @return PropertyDecorator | void\n */\nexport function Provide(key) {\n return createDecorator(function (componentOptions, k) {\n var provide = componentOptions.provide;\n inheritInjected(componentOptions);\n if (needToProduceProvide(provide)) {\n provide = componentOptions.provide = produceProvide(provide);\n }\n provide.managed[k] = key || k;\n });\n}\n","export enum CorrectNameOptions {\n CORRECT_NAME = 'correct-name',\n CORRECT_NAME_TO_NUMBER = 'correct-name-to-number',\n CORRECT_NEW_NR = 'correct-new-nr'\n}\n","\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["needToProduceProvide","original","produceProvide","provide","_this","rv","reactiveInjectKey","i","_loop_1","this_1","inheritInjected","componentOptions","Provide","key","createDecorator","k","CorrectNameOptions","CorrectCompanyName","Vue","__publicField","v","val","name","__decorateClass","Prop","Watch","Emit","Component","CorrectNameToNumber","id","_a","CorpTypeCd","CorrectNameRequest","Mixins","NameRequestMixin","value","nr","nrFullDescription","GetCorpFullDescription","entityFullDescription","dialogContent","error","nameRequest","ref","title","message","ConfirmDialogShared","CorrectName","option","type","saved","formType"],"mappings":"wjBAAO,SAASA,EAAqBC,EAAU,CAC3C,OAAQ,OAAOA,GAAa,YACvB,CAACA,EAAS,SAAW,CAACA,EAAS,eACxC,CACO,SAASC,EAAeD,EAAU,CACrC,IAAIE,EAAU,UAAY,CACtB,IAAIC,EAAQ,KACRC,EAAK,OAAOJ,GAAa,WAAaA,EAAS,KAAK,IAAI,EAAIA,EAChEI,EAAK,OAAO,OAAOA,GAAM,IAAI,EAE7BA,EAAGC,CAAiB,EAAI,OAAO,OAAO,KAAKA,CAAiB,GAAK,CAAA,CAAE,EACnE,QAASC,KAAKJ,EAAQ,QAClBE,EAAGF,EAAQ,QAAQI,CAAC,CAAC,EAAI,KAAKA,CAAC,EAEnC,IAAIC,EAAU,SAAUD,EAAG,CACvBF,EAAGF,EAAQ,gBAAgBI,CAAC,CAAC,EAAIE,EAAOF,CAAC,EACzC,OAAO,eAAeF,EAAGC,CAAiB,EAAGH,EAAQ,gBAAgBI,CAAC,EAAG,CACrE,WAAY,GACZ,aAAc,GACd,IAAK,UAAY,CAAE,OAAOH,EAAMG,CAAC,CAAI,CACrD,CAAa,CACb,EACYE,EAAS,KACb,QAASF,KAAKJ,EAAQ,gBAClBK,EAAQD,CAAC,EAEb,OAAOF,CACf,EACI,OAAAF,EAAQ,QAAU,GAClBA,EAAQ,gBAAkB,GACnBA,CACX,CAEO,IAAIG,EAAoB,qBACxB,SAASI,EAAgBC,EAAkB,CAEzC,MAAM,QAAQA,EAAiB,MAAM,IACtCA,EAAiB,OAASA,EAAiB,QAAU,CAAA,EACrDA,EAAiB,OAAOL,CAAiB,EAAI,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sources":["../../node_modules/vue-property-decorator/lib/helpers/provideInject.js","../../node_modules/vue-property-decorator/lib/decorators/Provide.js","../../src/enums/correct-name-options.ts","../../src/components/correct-name/CorrectCompanyName.vue","../../src/components/correct-name/CorrectNameToNumber.vue","../../src/components/correct-name/CorrectNameRequest.vue","../../src/components/correct-name/CorrectName.vue"],"sourcesContent":["export function needToProduceProvide(original) {\n return (typeof original !== 'function' ||\n (!original.managed && !original.managedReactive));\n}\nexport function produceProvide(original) {\n var provide = function () {\n var _this = this;\n var rv = typeof original === 'function' ? original.call(this) : original;\n rv = Object.create(rv || null);\n // set reactive services (propagates previous services if necessary)\n rv[reactiveInjectKey] = Object.create(this[reactiveInjectKey] || {});\n for (var i in provide.managed) {\n rv[provide.managed[i]] = this[i];\n }\n var _loop_1 = function (i) {\n rv[provide.managedReactive[i]] = this_1[i]; // Duplicates the behavior of `@Provide`\n Object.defineProperty(rv[reactiveInjectKey], provide.managedReactive[i], {\n enumerable: true,\n configurable: true,\n get: function () { return _this[i]; },\n });\n };\n var this_1 = this;\n for (var i in provide.managedReactive) {\n _loop_1(i);\n }\n return rv;\n };\n provide.managed = {};\n provide.managedReactive = {};\n return provide;\n}\n/** Used for keying reactive provide/inject properties */\nexport var reactiveInjectKey = '__reactiveInject__';\nexport function inheritInjected(componentOptions) {\n // inject parent reactive services (if any)\n if (!Array.isArray(componentOptions.inject)) {\n componentOptions.inject = componentOptions.inject || {};\n componentOptions.inject[reactiveInjectKey] = {\n from: reactiveInjectKey,\n default: {},\n };\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { inheritInjected, needToProduceProvide, produceProvide, } from '../helpers/provideInject';\n/**\n * decorator of a provide\n * @param key key\n * @return PropertyDecorator | void\n */\nexport function Provide(key) {\n return createDecorator(function (componentOptions, k) {\n var provide = componentOptions.provide;\n inheritInjected(componentOptions);\n if (needToProduceProvide(provide)) {\n provide = componentOptions.provide = produceProvide(provide);\n }\n provide.managed[k] = key || k;\n });\n}\n","export enum CorrectNameOptions {\n CORRECT_NAME = 'correct-name',\n CORRECT_NAME_TO_NUMBER = 'correct-name-to-number',\n CORRECT_NEW_NR = 'correct-new-nr'\n}\n","\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["needToProduceProvide","original","produceProvide","provide","_this","rv","reactiveInjectKey","i","_loop_1","this_1","inheritInjected","componentOptions","Provide","key","createDecorator","k","CorrectNameOptions","CorrectCompanyName","Vue","__publicField","v","val","name","__decorateClass","Prop","Watch","Emit","Component","CorrectNameToNumber","id","_a","CorpTypeCd","CorrectNameRequest","Mixins","NameRequestMixin","value","nr","nrFullDescription","GetCorpFullDescription","entityFullDescription","dialogContent","error","nameRequest","ref","title","message","ConfirmDialogShared","CorrectName","option","type","saved","formType"],"mappings":"wjBAAO,SAASA,EAAqBC,EAAU,CAC3C,OAAQ,OAAOA,GAAa,YACvB,CAACA,EAAS,SAAW,CAACA,EAAS,eACxC,CACO,SAASC,EAAeD,EAAU,CACrC,IAAIE,EAAU,UAAY,CACtB,IAAIC,EAAQ,KACRC,EAAK,OAAOJ,GAAa,WAAaA,EAAS,KAAK,IAAI,EAAIA,EAChEI,EAAK,OAAO,OAAOA,GAAM,IAAI,EAE7BA,EAAGC,CAAiB,EAAI,OAAO,OAAO,KAAKA,CAAiB,GAAK,CAAA,CAAE,EACnE,QAASC,KAAKJ,EAAQ,QAClBE,EAAGF,EAAQ,QAAQI,CAAC,CAAC,EAAI,KAAKA,CAAC,EAEnC,IAAIC,EAAU,SAAUD,EAAG,CACvBF,EAAGF,EAAQ,gBAAgBI,CAAC,CAAC,EAAIE,EAAOF,CAAC,EACzC,OAAO,eAAeF,EAAGC,CAAiB,EAAGH,EAAQ,gBAAgBI,CAAC,EAAG,CACrE,WAAY,GACZ,aAAc,GACd,IAAK,UAAY,CAAE,OAAOH,EAAMG,CAAC,CAAI,CACrD,CAAa,CACb,EACYE,EAAS,KACb,QAASF,KAAKJ,EAAQ,gBAClBK,EAAQD,CAAC,EAEb,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,UAAA,kBAAA,CAAA,EAxGAA,EAAAxB,EAAA,CAPAI,EAAA,CACA,WAAA,CACA,mBAAAV,EACA,oBAAAW,EACA,mBAAAI,CACA,CAAA,CACA,CAAA,EACAe,CAAA;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/docs/assets/CorrectName.stories-8dafa4c8.js b/docs/assets/CorrectName.stories-8dafa4c8.js deleted file mode 100644 index 77be9edf..00000000 --- a/docs/assets/CorrectName.stories-8dafa4c8.js +++ /dev/null @@ -1,24 +0,0 @@ -var W=Object.defineProperty;var Y=(r,t,e)=>t in r?W(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var n=(r,t,e)=>(Y(r,typeof t!="symbol"?t+"":t,e),e);import{V as x}from"./vue.esm-b1e57a2f.js";import{c as z,E as l,C as R,P as i,n as q,m as G}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as h}from"./Watch-62f8b699.js";import{C as V,G as O}from"./corp-type-module-8edd1173.js";import{C as K}from"./ConfirmDialog-9091213f.js";import{N as Z}from"./validation-mixin-2ad1b825.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";function H(r){return typeof r!="function"||!r.managed&&!r.managedReactive}function J(r){var t=function(){var e=this,a=typeof r=="function"?r.call(this):r;a=Object.create(a||null),a[g]=Object.create(this[g]||{});for(var o in t.managed)a[t.managed[o]]=this[o];var s=function(T){a[t.managedReactive[T]]=m[T],Object.defineProperty(a[g],t.managedReactive[T],{enumerable:!0,configurable:!0,get:function(){return e[T]}})},m=this;for(var o in t.managedReactive)s(o);return a};return t.managed={},t.managedReactive={},t}var g="__reactiveInject__";function Q(r){Array.isArray(r.inject)||(r.inject=r.inject||{},r.inject[g]={from:g,default:{}})}function S(r){return z(function(t,e){var a=t.provide;Q(t),H(a)&&(a=t.provide=J(a)),a.managed[e]=r||e})}var _=(r=>(r.CORRECT_NAME="correct-name",r.CORRECT_NAME_TO_NUMBER="correct-name-to-number",r.CORRECT_NEW_NR="correct-new-nr",r))(_||{}),X=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,v=(r,t,e,a)=>{for(var o=a>1?void 0:a?ee(t,e):t,s=r.length-1,m;s>=0;s--)(m=r[s])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&X(t,e,o),o};let d=class extends x{constructor(){super(...arguments);n(this,"$refs");n(this,"companyName");n(this,"formType");n(this,"validate");n(this,"formValid",!1);n(this,"textfield","")}get companyNameRules(){return[e=>!!e||" A company name is required",e=>e!==this.companyName||" Enter a new company name"]}onCompanyNameChanged(e){this.textfield=e}onSubmit(){this.formType===_.CORRECT_NAME&&(this.emitCompanyName(this.textfield),this.emitSaved(!0))}onValidate(e){e?this.$refs.form.validate():this.$refs.form.resetValidation()}emitValid(){return this.formValid}emitSaved(e){}emitCompanyName(e){}};v([i({required:!0})],d.prototype,"companyName",2);v([i({required:!0})],d.prototype,"formType",2);v([i({required:!0})],d.prototype,"validate",2);v([S()],d.prototype,"formValid",2);v([S()],d.prototype,"textfield",2);v([h("companyName",{immediate:!0})],d.prototype,"onCompanyNameChanged",1);v([h("formType")],d.prototype,"onSubmit",1);v([h("validate")],d.prototype,"onValidate",1);v([h("formValid"),l("valid")],d.prototype,"emitValid",1);v([l("saved")],d.prototype,"emitSaved",1);v([l("update:companyName")],d.prototype,"emitCompanyName",1);d=v([R({})],d);var te=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-form",{ref:"form",attrs:{id:"correct-company-name-form"},model:{value:t.formValid,callback:function(a){t.formValid=a},expression:"formValid"}},[e("v-row",{attrs:{"no-gutters":""}},[e("v-col",[e("v-text-field",{staticClass:"mb-n3",attrs:{id:"company-name-textfield",filled:"",rules:t.companyNameRules},model:{value:t.textfield,callback:function(a){t.textfield=a},expression:"textfield"}})],1)],1)],1)},ae=[],F=q(d,te,ae,!1,null,null,null,null);const D=F.exports;F.exports.__docgenInfo={exportName:"default",displayName:"CorrectCompanyName",description:"",tags:{},props:[{name:"companyName",tags:{},type:{name:"string"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"validate",tags:{},type:{name:"boolean"},required:!0}],events:[{name:"saved",description:"Inform parent that the process is complete."},{name:"update:companyName",description:"Inform parent of updated company name."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/correct-name/CorrectCompanyName.vue"]};var re=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,N=(r,t,e,a)=>{for(var o=a>1?void 0:a?ne(t,e):t,s=r.length-1,m;s>=0;s--)(m=r[s])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&re(t,e,o),o};let y=class extends x{constructor(){super(...arguments);n(this,"$refs");n(this,"businessId");n(this,"entityType");n(this,"formType");n(this,"validate");n(this,"checkbox",!1);n(this,"formValid",!1)}get numberedName(){var a;const e=((a=this.businessId)==null?void 0:a.substring(2))||"Unknown";switch(this.entityType){case V.BC_ULC_COMPANY:return`${e} B.C. UNLIMITED LIABILITY COMPANY`;case V.BC_CCC:return`${e} B.C. COMMUNITY CONTRIBUTION COMPANY LTD.`;default:return`${e} B.C. LTD.`}}onSubmit(){this.formType===_.CORRECT_NAME_TO_NUMBER&&(this.emitCompanyName(this.numberedName),this.emitSaved(!0))}onValidate(e){e?this.$refs.form.validate():this.$refs.form.resetValidation()}emitValid(){return this.formValid}emitSaved(e){}emitCompanyName(e){}};N([i({required:!0})],y.prototype,"businessId",2);N([i({required:!0})],y.prototype,"entityType",2);N([i({required:!0})],y.prototype,"formType",2);N([i({required:!0})],y.prototype,"validate",2);N([h("formType")],y.prototype,"onSubmit",1);N([h("validate")],y.prototype,"onValidate",1);N([h("formValid"),l("valid")],y.prototype,"emitValid",1);N([l("saved")],y.prototype,"emitSaved",1);N([l("update:companyName")],y.prototype,"emitCompanyName",1);y=N([R({})],y);var oe=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-form",{ref:"form",attrs:{id:"correct-name-to-number-form"},model:{value:t.formValid,callback:function(a){t.formValid=a},expression:"formValid"}},[e("v-row",{attrs:{"no-gutters":""}},[e("v-col",[e("v-checkbox",{staticClass:"mb-n5",attrs:{id:"correct-name-to-number-checkbox",label:`Change the company name to ${t.numberedName}`,rules:[a=>a]},model:{value:t.checkbox,callback:function(a){t.checkbox=a},expression:"checkbox"}})],1)],1)],1)},se=[],j=q(y,oe,se,!1,null,"d115bbb7",null,null);const M=j.exports;j.exports.__docgenInfo={exportName:"default",displayName:"CorrectNameToNumber",description:"",tags:{},props:[{name:"businessId",tags:{},type:{name:"string"},required:!0},{name:"entityType",tags:{},type:{name:"CorpTypeCd"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"validate",tags:{},type:{name:"boolean"},required:!0}],events:[{name:"saved",description:"Inform parent that the process is complete."},{name:"update:companyName",description:"Inform parent of updated company name."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/correct-name/CorrectNameToNumber.vue"]};var ie=Object.defineProperty,me=Object.getOwnPropertyDescriptor,f=(r,t,e,a)=>{for(var o=a>1?void 0:a?me(t,e):t,s=r.length-1,m;s>=0;s--)(m=r[s])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&ie(t,e,o),o};let c=class extends G(Z){constructor(){super(...arguments);n(this,"$refs");n(this,"businessId");n(this,"entityType");n(this,"fetchAndValidateNr");n(this,"formType");n(this,"nameRequest");n(this,"validate");n(this,"applicantEmail","");n(this,"applicantPhone","");n(this,"formValid",!1);n(this,"nrNumber","");n(this,"nrNumRules",[e=>!!e||"Name Request Number is required",e=>this.isValidNrNumber(e)||"Name Request Number is invalid"]);n(this,"phoneRules",[e=>!/^\s/g.test(e)||"Invalid spaces",e=>!/\s$/g.test(e)||"Invalid spaces",e=>!((e==null?void 0:e.length)>12)||"Phone number is invalid"]);n(this,"emailRules",[e=>!/^\s/g.test(e)||"Invalid spaces",e=>!/\s$/g.test(e)||"Invalid spaces",e=>this.isValidEmail(e)||"Email is invalid"])}get componentValid(){return this.formValid&&!!this.nrNumber&&(!!this.applicantPhone||!!this.applicantEmail)}isValidNrNumber(e){return new RegExp(/^(NR )\d{7}$/).test(e)}isValidEmail(e){return(e==null?void 0:e.length)<1||this.applicantPhone&&e?!0: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,}))$/).test(e)}async onSubmit(){if(this.formType===_.CORRECT_NEW_NR)try{const e=await this.fetchAndValidateNr(this.nrNumber,this.businessId,this.applicantPhone,this.applicantEmail);if(this.entityType!==e.legalType){this.$refs.form.resetValidation(),this.emitSaved(!1);const a=O(e.legalType),o=O(this.entityType),s=`

This ${a} Name Request does not match the current business type ${o}. - -The Name Request type must match the business type before you can continue.

`;await this.showConfirmDialog(this.$refs.confirm,"Name Request Type Does Not Match Business Type",s)}else this.emitNameRequest(e),this.emitCompanyName(this.getNrApprovedName(e)),this.emitSaved(!0)}catch(e){alert(e.message),this.$refs.form.resetValidation(),this.emitSaved(!1)}}onValidate(e){e?this.$refs.form.validate():this.$refs.form.resetValidation()}emitValid(){return this.componentValid}emitSaved(e){}emitCompanyName(e){}emitNameRequest(e){}async showConfirmDialog(e,a,o){return e.open(a,o,{width:"45rem",persistent:!0,yes:"OK",no:null,cancel:null}).catch(()=>!1)}};f([i({required:!0})],c.prototype,"businessId",2);f([i({required:!0})],c.prototype,"entityType",2);f([i({required:!0})],c.prototype,"fetchAndValidateNr",2);f([i({required:!0})],c.prototype,"formType",2);f([i({required:!0})],c.prototype,"nameRequest",2);f([i({required:!0})],c.prototype,"validate",2);f([h("formType")],c.prototype,"onSubmit",1);f([h("validate")],c.prototype,"onValidate",1);f([h("componentValid"),l("valid")],c.prototype,"emitValid",1);f([l("saved")],c.prototype,"emitSaved",1);f([l("update:companyName")],c.prototype,"emitCompanyName",1);f([l("update:nameRequest")],c.prototype,"emitNameRequest",1);c=f([R({components:{ConfirmDialogShared:K}})],c);var pe=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-form",{ref:"form",attrs:{id:"correct-name-request-form","lazy-validation":""},model:{value:t.formValid,callback:function(a){t.formValid=a},expression:"formValid"}},[e("ConfirmDialogShared",{ref:"confirm",attrs:{attach:"#app"}}),e("v-row",{attrs:{"no-gutters":""}},[e("v-col",{staticClass:"mt-3",attrs:{cols:"1"}},[e("v-chip",{staticClass:"step-icon",attrs:{outlined:""}},[t._v(" 1 ")])],1),e("v-col",[e("v-text-field",{staticClass:"text-input-field",attrs:{id:"nr-number",filled:"","persistent-hint":"",label:"Enter the NR Number",hint:"Example: NR 1234567",rules:t.nrNumRules},on:{keyup:function(a){t.nrNumber=t.nrNumber.toUpperCase()}},model:{value:t.nrNumber,callback:function(a){t.nrNumber=a},expression:"nrNumber"}})],1)],1),e("v-row",{staticClass:"mt-4 mb-n1",attrs:{"no-gutters":""}},[e("v-col",{staticClass:"mt-3",attrs:{cols:"1"}},[e("v-chip",{staticClass:"step-icon",attrs:{outlined:""}},[t._v(" 2 ")])],1),e("v-col",{attrs:{cols:"5"}},[e("v-text-field",{staticClass:"text-input-field",attrs:{id:"applicant-phone",filled:"","persistent-hint":"",label:"Applicant's Phone Number",hint:"Example: 555-555-5555",type:"tel",rules:t.phoneRules},model:{value:t.applicantPhone,callback:function(a){t.applicantPhone=a},expression:"applicantPhone"}})],1),e("div",{staticClass:"ma-5"},[t._v(" or ")]),e("v-col",[e("v-text-field",{staticClass:"text-input-field",attrs:{id:"applicant-email",filled:"","persistent-hint":"",label:"Applicant's Notification Email",hint:"Example: name@email.com",type:"email",rules:t.emailRules},model:{value:t.applicantEmail,callback:function(a){t.applicantEmail=a},expression:"applicantEmail"}})],1)],1)],1)},ce=[],B=q(c,pe,ce,!1,null,"dafd5a27",null,null);const L=B.exports;B.exports.__docgenInfo={description:"Mixin that provides some useful Name Request utilities.",tags:{},exportName:"default",displayName:"CorrectNameRequest",props:[{name:"businessId",tags:{},type:{name:"string"},required:!0},{name:"entityType",tags:{},type:{name:"CorpTypeCd"},required:!0},{name:"fetchAndValidateNr",tags:{},type:{name:"TSFunctionType"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"nameRequest",tags:{},type:{name:"NameRequestIF"},required:!0},{name:"validate",tags:{},type:{name:"boolean"},required:!0}],events:[{name:"saved",description:"Inform parent that the process is complete."},{name:"update:companyName",description:"Inform parent of updated company name."},{name:"update:nameRequest",description:"Inform parent of updated name request object."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/correct-name/CorrectNameRequest.vue","/home/severin/repos/bcrs-shared-components/src/mixins/name-request-mixin.ts"]};var le=Object.defineProperty,de=Object.getOwnPropertyDescriptor,u=(r,t,e,a)=>{for(var o=a>1?void 0:a?de(t,e):t,s=r.length-1,m;s>=0;s--)(m=r[s])&&(o=(a?m(t,e,o):m(o))||o);return a&&o&&le(t,e,o),o};let p=class extends x{constructor(){super(...arguments);n(this,"actionTxt");n(this,"businessId");n(this,"companyName");n(this,"correctionNameChoices");n(this,"entityType");n(this,"fetchAndValidateNr");n(this,"formType");n(this,"nameRequest");n(this,"displayedOptions",[]);n(this,"panel",null);n(this,"currentFormType",null);n(this,"isLoading",!1);n(this,"isSubComponentValid",!1);n(this,"validate",!1);n(this,"correctionNameOptions",[{id:_.CORRECT_NAME,title:"Edit the company name",description:"Correct typographical errors in the existing company name.",component:D},{id:_.CORRECT_NAME_TO_NUMBER,title:"Use the incorporation number as the name",description:null,component:M},{id:_.CORRECT_NEW_NR,title:"Use a new name request number",description:"Enter the new Name Request Number (e.g., NR 1234567) and either the applicant phone number OR the applicant email that was used when the name was requested.",component:L}])}mounted(){this.displayedOptions=this.correctionNameOptions.filter(e=>this.correctionNameChoices.includes(e.id)),this.isOneOption&&(this.panel=0,this.currentFormType=this.displayedOptions[0].id)}get isOneOption(){return this.correctionNameChoices.length===1}submitNameCorrection(){this.isSubComponentValid?(this.isLoading=!0,this.emitFormType(this.currentFormType),this.validate=!1):this.validate=!0}identifyForm(e){this.currentFormType=e,this.isSubComponentValid=!1}emitCancel(){this.validate=!1,this.panel=null}emitSaved(e){return this.isLoading=!1,this.emitFormType(null),e&&(this.panel=null),e}emitCompanyName(e){}emitFormType(e){}emitNameRequest(e){}};u([i({default:null})],p.prototype,"actionTxt",2);u([i({required:!0})],p.prototype,"businessId",2);u([i({required:!0})],p.prototype,"companyName",2);u([i({default:()=>[]})],p.prototype,"correctionNameChoices",2);u([i({required:!0})],p.prototype,"entityType",2);u([i({required:!0})],p.prototype,"fetchAndValidateNr",2);u([i({required:!0})],p.prototype,"formType",2);u([i({required:!0})],p.prototype,"nameRequest",2);u([l("cancel")],p.prototype,"emitCancel",1);u([l("saved")],p.prototype,"emitSaved",1);u([l("update:companyName")],p.prototype,"emitCompanyName",1);u([l("update:formType")],p.prototype,"emitFormType",1);u([l("update:nameRequest")],p.prototype,"emitNameRequest",1);p=u([R({components:{CorrectCompanyName:D,CorrectNameToNumber:M,CorrectNameRequest:L}})],p);var ue=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-container",{staticClass:"pa-0 pr-4",attrs:{id:"correct-name-options"}},[t.isOneOption?t._e():e("p",{staticClass:"info-text mb-5 pb-5 bottom-border"},[t._v(" You can "+t._s(t.actionTxt||"correct the company name")+" in one of the following ways: ")]),e("v-expansion-panels",{staticClass:"bottom-border",attrs:{accordion:""},model:{value:t.panel,callback:function(a){t.panel=a},expression:"panel"}},t._l(t.displayedOptions,function(a,o){return e("v-expansion-panel",{key:o,staticClass:"mb-4",attrs:{id:`x-panel-${a.id}`,disabled:t.isOneOption},on:{click:function(s){return t.identifyForm(a.id)}}},[e("v-expansion-panel-header",{class:{"name-options-header":t.isOneOption},scopedSlots:t._u([{key:"actions",fn:function(){return[e("v-icon",{attrs:{color:"primary"}},[t._v(" mdi-menu-down ")])]},proxy:!0}],null,!0)},[e("span",{staticClass:"names-option-title"},[t._v(t._s(a.title))])]),e("v-expansion-panel-content",{staticClass:"name-options-content pt-4"},[a.description?e("div",{staticClass:"info-text mb-4",attrs:{color:"primary"}},[t._v(" "+t._s(a.description)+" ")]):t._e(),e(a.component,{key:a.id,tag:"component",attrs:{businessId:t.businessId,companyName:t.companyName,entityType:t.entityType,fetchAndValidateNr:t.fetchAndValidateNr,formType:t.formType,nameRequest:t.nameRequest,validate:t.validate},on:{saved:function(s){return t.emitSaved(s)},"update:nameRequest":function(s){return t.emitNameRequest(s)},"update:companyName":function(s){return t.emitCompanyName(s)},valid:function(s){t.isSubComponentValid=s}}})],1)],1)}),1),e("div",{staticClass:"action-btns"},[e("v-btn",{attrs:{id:"done-btn",large:"",color:"primary",loading:t.isLoading},on:{click:function(a){return t.submitNameCorrection()}}},[e("span",[t._v("Done")])]),e("v-btn",{attrs:{id:"cancel-btn",large:"",outlined:"",color:"primary"},on:{click:function(a){return t.emitCancel()}}},[e("span",[t._v("Cancel")])])],1)],1)},fe=[],U=q(p,ue,fe,!1,null,"862e35a8",null,null);const ye=U.exports;U.exports.__docgenInfo={description:`Operation: -1. To initialize this component option list, pass in an array of id's of the components you want to display. - I.e., ['correct-new-nr', 'correct-name', 'correct-name-to-number'] -2. If this options list is only passed one value the option panel will be open by default. -3. The parent component will have to watch for the 'save' and 'cancel' events and handle them accordingly.`,tags:{},exportName:"default",displayName:"CorrectName",props:[{name:"actionTxt",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"businessId",tags:{},type:{name:"string"},required:!0},{name:"companyName",tags:{},type:{name:"string"},required:!0},{name:"correctionNameChoices",tags:{},type:{name:"Array",elements:[{name:"CorrectNameOptions"}]},defaultValue:{func:!0,value:"() => []"}},{name:"entityType",tags:{},type:{name:"CorpTypeCd"},required:!0},{name:"fetchAndValidateNr",tags:{},type:{name:"TSFunctionType"},required:!0},{name:"formType",tags:{},type:{name:"CorrectNameOptions"},required:!0},{name:"nameRequest",tags:{},type:{name:"NameRequestIF"},required:!0}],events:[{name:"cancel",description:"When Cancel button is clicked, informs parent that name correction is cancelled."},{name:"saved",description:"Inform parent that name correction process is done."},{name:"update:companyName",description:"Inform parent of updated company name."},{name:"update:formType",description:"Inform parent of updated form type."},{name:"update:nameRequest",description:"Inform parent of updated name request object."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/correct-name/CorrectName.vue"]};const $e={title:"component/CorrectName"},k=(r,{argTypes:t})=>({props:Object.keys(t),components:{CorrectName:ye},template:''}),C=k.bind({});C.args={businessId:"BC1234567",entityType:"BC",nameRequest:{},companyName:"Old Company Name",fetchAndValidateNr:()=>{},correctionNameChoices:["correct-name"]};const b=k.bind({});b.args={businessId:"BC1234567",entityType:"BC",nameRequest:{},companyName:"Old Company Name",fetchAndValidateNr:()=>{},correctionNameChoices:["correct-name-to-number","correct-new-nr"]};var $,I,E;C.parameters={...C.parameters,docs:{...($=C.parameters)==null?void 0:$.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - CorrectName - }, - template: '' // $props comes from args below -})`,...(E=(I=C.parameters)==null?void 0:I.docs)==null?void 0:E.source}}};var w,P,A;b.parameters={...b.parameters,docs:{...(w=b.parameters)==null?void 0:w.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - CorrectName - }, - template: '' // $props comes from args below -})`,...(A=(P=b.parameters)==null?void 0:P.docs)==null?void 0:A.source}}};const Ie=["correctName","correctNameNR"];export{Ie as __namedExportsOrder,C as correctName,b as correctNameNR,$e as default}; -//# sourceMappingURL=CorrectName.stories-8dafa4c8.js.map diff --git a/docs/assets/CourtOrderPoa.stories-749ea04f.js b/docs/assets/CourtOrderPoa.stories-0de39944.js similarity index 86% rename from docs/assets/CourtOrderPoa.stories-749ea04f.js rename to docs/assets/CourtOrderPoa.stories-0de39944.js index af711a66..c0f24c28 100644 --- a/docs/assets/CourtOrderPoa.stories-749ea04f.js +++ b/docs/assets/CourtOrderPoa.stories-0de39944.js @@ -1,4 +1,4 @@ -var C=Object.defineProperty;var P=(a,e,r)=>e in a?C(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r;var o=(a,e,r)=>(P(a,typeof e!="symbol"?e+"":e,r),r);import{V as A}from"./vue.esm-b1e57a2f.js";import{E as f,C as x,P as m,n as R}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as n}from"./Watch-62f8b699.js";var D=Object.defineProperty,S=Object.getOwnPropertyDescriptor,u=(a,e,r,s)=>{for(var l=s>1?void 0:s?S(e,r):e,c=a.length-1,p;c>=0;c--)(p=a[c])&&(l=(s?p(e,r,l):p(l))||l);return s&&l&&D(e,r,l),l};let t=class extends A{constructor(){super(...arguments);o(this,"$refs");o(this,"draftCourtOrderNumber");o(this,"hasDraftPlanOfArrangement");o(this,"invalidSection");o(this,"displaySideLabels");o(this,"courtOrderNumberRequired");o(this,"courtOrderNumber","");o(this,"courtOrderNumRules",[]);o(this,"planOfArrangement",!1);o(this,"valid",!1)}mounted(){this.draftCourtOrderNumber&&(this.courtOrderNumber=this.draftCourtOrderNumber),this.hasDraftPlanOfArrangement&&(this.planOfArrangement=this.hasDraftPlanOfArrangement)}clearValidations(){this.courtOrderNumRules=[],this.$refs.courtNumRef.resetValidation()}validate(){return this.$refs.courtNumRef.validate()}validateCourtNum(){this.courtOrderNumRules=[r=>!r||!/^\s/g.test(r)||"Invalid spaces",r=>!r||!/\s$/g.test(r)||"Invalid spaces",r=>!r||!(r.length<5)||"Court order number is invalid",r=>!r||!(r.length>20)||"Court order number is invalid"],(this.courtOrderNumberRequired||this.planOfArrangement)&&this.courtOrderNumRules.push(r=>!!r||"A Court Order number is required"),this.$refs.courtNumRef.validate()}emitCourtNumber(){return this.courtOrderNumber}emitPoa(){return this.planOfArrangement}emitValid(){return this.valid}};u([m({default:""})],t.prototype,"draftCourtOrderNumber",2);u([m({default:!1})],t.prototype,"hasDraftPlanOfArrangement",2);u([m({default:!1})],t.prototype,"invalidSection",2);u([m({default:!0})],t.prototype,"displaySideLabels",2);u([m({default:!1})],t.prototype,"courtOrderNumberRequired",2);u([n("planOfArrangement"),n("courtOrderNumber"),n("courtOrderNumberRequired")],t.prototype,"validateCourtNum",1);u([n("courtOrderNumber"),f("emitCourtNumber")],t.prototype,"emitCourtNumber",1);u([n("planOfArrangement"),f("emitPoa")],t.prototype,"emitPoa",1);u([n("valid"),f("emitValid")],t.prototype,"emitValid",1);t=u([x({})],t);var V=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{attrs:{id:"court-order-poa"}},[r("v-row",{attrs:{"no-gutters":""}},[e.displaySideLabels?r("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[r("label",{class:{"error-text":e.invalidSection},attrs:{id:"court-order-label"}},[e._v("Court Order Number")])]):e._e(),r("v-col",{attrs:{cols:"12",sm:e.displaySideLabels?9:12}},[r("v-form",{ref:"courtNumRef",attrs:{id:"court-num-form"},model:{value:e.valid,callback:function(s){e.valid=s},expression:"valid"}},[r("v-text-field",{attrs:{id:"court-order-number-input",label:"Court Order Number",rules:e.courtOrderNumRules,filled:""},model:{value:e.courtOrderNumber,callback:function(s){e.courtOrderNumber=s},expression:"courtOrderNumber"}})],1)],1)],1),r("v-row",{attrs:{"no-gutters":""}},[e.displaySideLabels?r("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[r("label",{attrs:{id:"poa-label"}},[e._v("Plan of Arrangement")])]):e._e(),r("v-col",{attrs:{cols:"12",sm:e.displaySideLabels?9:12}},[r("v-checkbox",{staticClass:"mt-0 pt-0",attrs:{id:"plan-of-arrangement-checkbox","hide-details":"",label:"This filing is pursuant to a Plan of Arrangement"},model:{value:e.planOfArrangement,callback:function(s){e.planOfArrangement=s},expression:"planOfArrangement"}})],1)],1)],1)},$=[],_=R(t,V,$,!1,null,"a8c1acf0",null,null);const q=_.exports;_.exports.__docgenInfo={exportName:"default",displayName:"CourtOrderPoa",description:"",tags:{},props:[{name:"draftCourtOrderNumber",tags:{},description:"Draft court order number.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"hasDraftPlanOfArrangement",tags:{},description:"Draft plan of arrangement.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Prompt Error.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"displaySideLabels",tags:{},description:"Display side labels.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"courtOrderNumberRequired",tags:{},description:"Whether court order number is required regardless plan of arrangement.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/court-order-poa/CourtOrderPoa.vue"]};const k={title:"component/CourtOrderPoa"},y=(a,{argTypes:e})=>({props:Object.keys(e),components:{CourtOrderPoa:q},template:''}),d=y.bind({});d.args={validate:!1};const i=y.bind({});i.args={draftCourtOrderNumber:"1234-56789",hasDraftPlanOfArrangement:!0};var b,O,v;d.parameters={...d.parameters,docs:{...(b=d.parameters)==null?void 0:b.docs,source:{originalSource:`(args, { +var C=Object.defineProperty;var P=(a,e,r)=>e in a?C(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r;var o=(a,e,r)=>(P(a,typeof e!="symbol"?e+"":e,r),r);import{V as A}from"./vue.esm-b1e57a2f.js";import{E as f,C as R,P as m,n as x}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as n}from"./Watch-62f8b699.js";var D=Object.defineProperty,S=Object.getOwnPropertyDescriptor,u=(a,e,r,s)=>{for(var l=s>1?void 0:s?S(e,r):e,c=a.length-1,p;c>=0;c--)(p=a[c])&&(l=(s?p(e,r,l):p(l))||l);return s&&l&&D(e,r,l),l};let t=class extends A{constructor(){super(...arguments);o(this,"$refs");o(this,"draftCourtOrderNumber");o(this,"hasDraftPlanOfArrangement");o(this,"invalidSection");o(this,"displaySideLabels");o(this,"courtOrderNumberRequired");o(this,"courtOrderNumber","");o(this,"courtOrderNumRules",[]);o(this,"planOfArrangement",!1);o(this,"valid",!1)}mounted(){this.draftCourtOrderNumber&&(this.courtOrderNumber=this.draftCourtOrderNumber),this.hasDraftPlanOfArrangement&&(this.planOfArrangement=this.hasDraftPlanOfArrangement)}clearValidations(){this.courtOrderNumRules=[],this.$refs.courtNumRef.resetValidation()}validate(){return this.$refs.courtNumRef.validate()}validateCourtNum(){this.courtOrderNumRules=[r=>!r||!/^\s/g.test(r)||"Invalid spaces",r=>!r||!/\s$/g.test(r)||"Invalid spaces",r=>!r||!(r.length<5)||"Court order number is invalid",r=>!r||!(r.length>20)||"Court order number is invalid"],(this.courtOrderNumberRequired||this.planOfArrangement)&&this.courtOrderNumRules.push(r=>!!r||"A Court Order number is required"),this.$refs.courtNumRef.validate()}emitCourtNumber(){return this.courtOrderNumber}emitPoa(){return this.planOfArrangement}emitValid(){return this.valid}};u([m({default:""})],t.prototype,"draftCourtOrderNumber",2);u([m({default:!1})],t.prototype,"hasDraftPlanOfArrangement",2);u([m({default:!1})],t.prototype,"invalidSection",2);u([m({default:!0})],t.prototype,"displaySideLabels",2);u([m({default:!1})],t.prototype,"courtOrderNumberRequired",2);u([n("planOfArrangement"),n("courtOrderNumber"),n("courtOrderNumberRequired")],t.prototype,"validateCourtNum",1);u([n("courtOrderNumber"),f("emitCourtNumber")],t.prototype,"emitCourtNumber",1);u([n("planOfArrangement"),f("emitPoa")],t.prototype,"emitPoa",1);u([n("valid"),f("emitValid")],t.prototype,"emitValid",1);t=u([R({})],t);var V=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{attrs:{id:"court-order-poa"}},[r("v-row",{attrs:{"no-gutters":""}},[e.displaySideLabels?r("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[r("label",{class:{"error-text":e.invalidSection},attrs:{id:"court-order-label"}},[e._v("Court Order Number")])]):e._e(),r("v-col",{attrs:{cols:"12",sm:e.displaySideLabels?9:12}},[r("v-form",{ref:"courtNumRef",attrs:{id:"court-num-form"},model:{value:e.valid,callback:function(s){e.valid=s},expression:"valid"}},[r("v-text-field",{attrs:{id:"court-order-number-input",label:"Court Order Number",rules:e.courtOrderNumRules,filled:""},model:{value:e.courtOrderNumber,callback:function(s){e.courtOrderNumber=s},expression:"courtOrderNumber"}})],1)],1)],1),r("v-row",{attrs:{"no-gutters":""}},[e.displaySideLabels?r("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[r("label",{attrs:{id:"poa-label"}},[e._v("Plan of Arrangement")])]):e._e(),r("v-col",{attrs:{cols:"12",sm:e.displaySideLabels?9:12}},[r("v-checkbox",{staticClass:"mt-0 pt-0",attrs:{id:"plan-of-arrangement-checkbox","hide-details":"",label:"This filing is pursuant to a Plan of Arrangement"},model:{value:e.planOfArrangement,callback:function(s){e.planOfArrangement=s},expression:"planOfArrangement"}})],1)],1)],1)},$=[],_=x(t,V,$,!1,null,"a8c1acf0",null,null);const q=_.exports;_.exports.__docgenInfo={exportName:"default",displayName:"CourtOrderPoa",description:"",tags:{},props:[{name:"draftCourtOrderNumber",tags:{},description:"Draft court order number.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"hasDraftPlanOfArrangement",tags:{},description:"Draft plan of arrangement.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Prompt Error.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"displaySideLabels",tags:{},description:"Display side labels.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"courtOrderNumberRequired",tags:{},description:"Whether court order number is required regardless plan of arrangement.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/court-order-poa/CourtOrderPoa.vue"]};const E={title:"component/CourtOrderPoa"},y=(a,{argTypes:e})=>({props:Object.keys(e),components:{CourtOrderPoa:q},template:''}),d=y.bind({});d.args={validate:!1};const i=y.bind({});i.args={draftCourtOrderNumber:"1234-56789",hasDraftPlanOfArrangement:!0};var b,O,v;d.parameters={...d.parameters,docs:{...(b=d.parameters)==null?void 0:b.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -14,5 +14,5 @@ var C=Object.defineProperty;var P=(a,e,r)=>e in a?C(a,e,{enumerable:!0,configura CourtOrderPoa }, template: '' // $props comes from args below -})`,...(N=(h=i.parameters)==null?void 0:h.docs)==null?void 0:N.source}}};const I=["courtOrderPoa","courtOrderPoaDraft"];export{I as __namedExportsOrder,d as courtOrderPoa,i as courtOrderPoaDraft,k as default}; -//# sourceMappingURL=CourtOrderPoa.stories-749ea04f.js.map +})`,...(N=(h=i.parameters)==null?void 0:h.docs)==null?void 0:N.source}}};const I=["courtOrderPoa","courtOrderPoaDraft"];export{I as __namedExportsOrder,d as courtOrderPoa,i as courtOrderPoaDraft,E as default}; +//# sourceMappingURL=CourtOrderPoa.stories-0de39944.js.map diff --git a/docs/assets/CourtOrderPoa.stories-749ea04f.js.map b/docs/assets/CourtOrderPoa.stories-0de39944.js.map similarity index 99% rename from docs/assets/CourtOrderPoa.stories-749ea04f.js.map rename to docs/assets/CourtOrderPoa.stories-0de39944.js.map index 68b01819..edef0090 100644 --- a/docs/assets/CourtOrderPoa.stories-749ea04f.js.map +++ b/docs/assets/CourtOrderPoa.stories-0de39944.js.map @@ -1 +1 @@ -{"version":3,"file":"CourtOrderPoa.stories-749ea04f.js","sources":["../../src/components/court-order-poa/CourtOrderPoa.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["CourtOrderPoa","Vue","__publicField","v","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ygBAgEA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,cAKAA,EAAA,8BAGAA,EAAA,kCAGAA,EAAA,uBAGAA,EAAA,0BAGAA,EAAA,iCAGAA,EAAA,wBAAA,IACAA,EAAA,0BAAA,CAAA,GACAA,EAAA,yBAAA,IACAA,EAAA,aAAA,IAGA,SAAA,CAEA,KAAA,wBAAA,KAAA,iBAAA,KAAA,uBACA,KAAA,4B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EA,UAAA,kBAAA,CAAA,EAKAI,EAAA,CAFAE,EAAA,mBAAA,EACAC,EAAA,SAAA,CAAA,EArEAP,EAsEA,UAAA,UAAA,CAAA,EAMAI,EAAA,CAFAE,EAAA,OAAA,EACAC,EAAA,WAAA,CAAA,EA3EAP,EA4EA,UAAA,YAAA,CAAA,EA5EAA,EAAAI,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAR,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"CourtOrderPoa.stories-0de39944.js","sources":["../../src/components/court-order-poa/CourtOrderPoa.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["CourtOrderPoa","Vue","__publicField","v","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ygBAgEA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,cAKAA,EAAA,8BAGAA,EAAA,kCAGAA,EAAA,uBAGAA,EAAA,0BAGAA,EAAA,iCAGAA,EAAA,wBAAA,IACAA,EAAA,0BAAA,CAAA,GACAA,EAAA,yBAAA,IACAA,EAAA,aAAA,IAGA,SAAA,CAEA,KAAA,wBAAA,KAAA,iBAAA,KAAA,uBACA,KAAA,4BAAA,KAAA,kBAAA,KAAA,0BACA,CAGA,kBAAA,CACA,KAAA,mBAAA,GACA,KAAA,MAAA,YAAA,iBACA,CAGA,UAAA,CACA,OAAA,KAAA,MAAA,YAAA,SAAA,CACA,CAKA,kBAAA,CAEA,KAAA,mBAAA,CACAC,GAAA,CAAAA,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,CAAAA,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,CAAAA,GAAA,EAAAA,EAAA,OAAA,IAAA,gCACAA,GAAA,CAAAA,GAAA,EAAAA,EAAA,OAAA,KAAA,+BAAA,GAEA,KAAA,0BAAA,KAAA,oBACA,KAAA,mBAAA,KAAAA,GAAA,CAAA,CAAAA,GAAA,kCAAA,EAEA,KAAA,MAAA,YAAA,UACA,CAKA,iBAAA,CAAA,OAAA,KAAA,gBAAA,CAKA,SAAA,CACA,OAAA,KAAA,iBACA,CAIA,WAAA,CACA,OAAA,KAAA,KACA,CACA,EAxEAC,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAPAL,EAOA,UAAA,wBAAA,CAAA,EAGAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAVAL,EAUA,UAAA,4BAAA,CAAA,EAGAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAbAL,EAaA,UAAA,iBAAA,CAAA,EAGAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAhBAL,EAgBA,UAAA,oBAAA,CAAA,EAGAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAnBAL,EAmBA,UAAA,2BAAA,CAAA,EA6BAI,EAAA,CAHAE,EAAA,mBAAA,EACAA,EAAA,kBAAA,EACAA,EAAA,0BAAA,CAAA,EA/CAN,EAgDA,UAAA,mBAAA,CAAA,EAiBAI,EAAA,CAFAE,EAAA,kBAAA,EACAC,EAAA,iBAAA,CAAA,EAhEAP,EAiEA,UAAA,kBAAA,CAAA,EAKAI,EAAA,CAFAE,EAAA,mBAAA,EACAC,EAAA,SAAA,CAAA,EArEAP,EAsEA,UAAA,UAAA,CAAA,EAMAI,EAAA,CAFAE,EAAA,OAAA,EACAC,EAAA,WAAA,CAAA,EA3EAP,EA4EA,UAAA,YAAA,CAAA,EA5EAA,EAAAI,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAR,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/DatePicker-bfb2acbc.js b/docs/assets/DatePicker-6653e1e3.js similarity index 90% rename from docs/assets/DatePicker-bfb2acbc.js rename to docs/assets/DatePicker-6653e1e3.js index 08e53402..0d0c3fea 100644 --- a/docs/assets/DatePicker-bfb2acbc.js +++ b/docs/assets/DatePicker-6653e1e3.js @@ -1,6 +1,6 @@ -var f=Object.defineProperty;var y=(o,e,t)=>e in o?f(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var l=(o,e,t)=>(y(o,typeof e!="symbol"?e+"":e,t),t);import{m as g,E as u,C as h,P as i,n as v}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as p}from"./Watch-62f8b699.js";import{D as x}from"./validation-mixin-2ad1b825.js";var D=Object.defineProperty,_=Object.getOwnPropertyDescriptor,n=(o,e,t,r)=>{for(var s=r>1?void 0:r?_(e,t):e,d=o.length-1,c;d>=0;d--)(c=o[d])&&(s=(r?c(e,t,s):c(s))||s);return r&&s&&D(e,t,s),s};let a=class extends g(x){constructor(){super(...arguments);l(this,"$refs");l(this,"attach");l(this,"title");l(this,"errorMsg");l(this,"inputRules");l(this,"disablePicker");l(this,"initialValue");l(this,"minDate");l(this,"maxDate");l(this,"nudgeTop");l(this,"nudgeBottom");l(this,"nudgeRight");l(this,"nudgeLeft");l(this,"hint");l(this,"persistentHint");l(this,"clearable");l(this,"dateText",null);l(this,"displayPicker",!1)}clearDate(){this.dateText="",this.displayPicker=!1}validateForm(){return this.$refs.form.validate()}isDateValid(){var t,r;return(r=(t=this.$refs)==null?void 0:t.dateTextField)==null?void 0:r.valid}created(){this.dateText=this.initialValue}get displayDate(){return this.yyyyMmDdToPacificDate(this.dateText,!0)}get enableSelector(){return!this.displayPicker&&!this.disablePicker}emitDate(t){this.displayPicker=!1}emitCancel(){this.clearDate()}emitClear(){this.clearDate()}emitDateSync(t){return this.dateText}hidePicker(){this.displayPicker=!1}};n([i({default:null})],a.prototype,"attach",2);n([i({default:""})],a.prototype,"title",2);n([i({default:null})],a.prototype,"errorMsg",2);n([i({default:()=>[]})],a.prototype,"inputRules",2);n([i({default:!1})],a.prototype,"disablePicker",2);n([i({default:""})],a.prototype,"initialValue",2);n([i({default:""})],a.prototype,"minDate",2);n([i({default:""})],a.prototype,"maxDate",2);n([i({default:null})],a.prototype,"nudgeTop",2);n([i({default:null})],a.prototype,"nudgeBottom",2);n([i({default:null})],a.prototype,"nudgeRight",2);n([i({default:null})],a.prototype,"nudgeLeft",2);n([i({default:""})],a.prototype,"hint",2);n([i({default:!1})],a.prototype,"persistentHint",2);n([i({default:!1})],a.prototype,"clearable",2);n([u("emitDate")],a.prototype,"emitDate",1);n([u("emitCancel")],a.prototype,"emitCancel",1);n([u("emitClear")],a.prototype,"emitClear",1);n([p("dateText"),u("emitDateSync")],a.prototype,"emitDateSync",1);n([p("$route")],a.prototype,"hidePicker",1);a=n([h({})],a);var k=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("v-form",{ref:"form",staticClass:"date-picker-form",attrs:{attach:e.attach}},[t("v-menu",{attrs:{"close-on-click":!1,"close-on-content-click":!1,"nudge-top":e.nudgeTop,"nudge-bottom":e.nudgeBottom,"nudge-left":e.nudgeLeft,"nudge-right":e.nudgeRight,transition:"scale-transition","offset-y":"",bottom:"","min-width":"290"},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t("span",e._g({class:{"date-text-field-pointer":e.enableSelector}},e.enableSelector&&r),[t("v-text-field",{ref:"dateTextField",attrs:{id:"date-text-field","append-icon":"mdi-calendar",autocomplete:"chrome-off",clearable:e.clearable,"error-messages":e.errorMsg,error:!!e.errorMsg,value:e.displayDate,label:e.title,name:Math.random(),rules:e.inputRules,disabled:e.disablePicker,hint:e.hint,"persistent-hint":e.persistentHint,readonly:"",filled:""},on:{"click:clear":function(s){return e.emitClear()},keydown:function(s){return s.preventDefault()},keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.emitDate(e.dateText)}}})],1)]}}]),model:{value:e.displayPicker,callback:function(r){e.displayPicker=r},expression:"displayPicker"}},[t("v-date-picker",{attrs:{id:"date-picker-calendar",width:"490",min:e.minDate,max:e.maxDate},scopedSlots:e._u([{key:"default",fn:function(){return[t("div",[t("v-btn",{attrs:{id:"btn-done",text:"",color:"primary"},on:{click:function(r){return e.emitDate(e.dateText)}}},[t("strong",[e._v("OK")])]),t("v-btn",{attrs:{id:"btn-cancel",text:"",color:"primary"},on:{click:function(r){return e.emitCancel()}}},[e._v(" Cancel ")])],1)]},proxy:!0}]),model:{value:e.dateText,callback:function(r){e.dateText=r},expression:"dateText"}})],1)],1)},b=[],m=v(a,k,b,!1,null,"091973d0",null,null);const R=m.exports;m.exports.__docgenInfo={description:`This is a local, minimal mixin containing only the methods needed for the shared +var f=Object.defineProperty;var y=(o,e,t)=>e in o?f(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var l=(o,e,t)=>(y(o,typeof e!="symbol"?e+"":e,t),t);import{m as g,E as u,C as h,P as i,n as v}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as p}from"./Watch-62f8b699.js";import{D as x}from"./validation-mixin-e5d1d708.js";var k=Object.defineProperty,D=Object.getOwnPropertyDescriptor,n=(o,e,t,r)=>{for(var s=r>1?void 0:r?D(e,t):e,d=o.length-1,c;d>=0;d--)(c=o[d])&&(s=(r?c(e,t,s):c(s))||s);return r&&s&&k(e,t,s),s};let a=class extends g(x){constructor(){super(...arguments);l(this,"$refs");l(this,"attach");l(this,"title");l(this,"errorMsg");l(this,"inputRules");l(this,"disablePicker");l(this,"initialValue");l(this,"minDate");l(this,"maxDate");l(this,"nudgeTop");l(this,"nudgeBottom");l(this,"nudgeRight");l(this,"nudgeLeft");l(this,"hint");l(this,"persistentHint");l(this,"clearable");l(this,"dateText",null);l(this,"displayPicker",!1)}clearDate(){this.dateText="",this.displayPicker=!1}validateForm(){return this.$refs.form.validate()}isDateValid(){var t,r;return(r=(t=this.$refs)==null?void 0:t.dateTextField)==null?void 0:r.valid}created(){this.dateText=this.initialValue}get displayDate(){return this.yyyyMmDdToPacificDate(this.dateText,!0)}get enableSelector(){return!this.displayPicker&&!this.disablePicker}emitDate(t){this.displayPicker=!1}emitCancel(){this.clearDate()}emitClear(){this.clearDate()}emitDateSync(t){return this.dateText}hidePicker(){this.displayPicker=!1}};n([i({default:null})],a.prototype,"attach",2);n([i({default:""})],a.prototype,"title",2);n([i({default:null})],a.prototype,"errorMsg",2);n([i({default:()=>[]})],a.prototype,"inputRules",2);n([i({default:!1})],a.prototype,"disablePicker",2);n([i({default:""})],a.prototype,"initialValue",2);n([i({default:""})],a.prototype,"minDate",2);n([i({default:""})],a.prototype,"maxDate",2);n([i({default:null})],a.prototype,"nudgeTop",2);n([i({default:null})],a.prototype,"nudgeBottom",2);n([i({default:null})],a.prototype,"nudgeRight",2);n([i({default:null})],a.prototype,"nudgeLeft",2);n([i({default:""})],a.prototype,"hint",2);n([i({default:!1})],a.prototype,"persistentHint",2);n([i({default:!1})],a.prototype,"clearable",2);n([u("emitDate")],a.prototype,"emitDate",1);n([u("emitCancel")],a.prototype,"emitCancel",1);n([u("emitClear")],a.prototype,"emitClear",1);n([p("dateText"),u("emitDateSync")],a.prototype,"emitDateSync",1);n([p("$route")],a.prototype,"hidePicker",1);a=n([h({})],a);var _=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("v-form",{ref:"form",staticClass:"date-picker-form",attrs:{attach:e.attach}},[t("v-menu",{attrs:{"close-on-click":!1,"close-on-content-click":!1,"nudge-top":e.nudgeTop,"nudge-bottom":e.nudgeBottom,"nudge-left":e.nudgeLeft,"nudge-right":e.nudgeRight,transition:"scale-transition","offset-y":"",bottom:"","min-width":"290"},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t("span",e._g({class:{"date-text-field-pointer":e.enableSelector}},e.enableSelector&&r),[t("v-text-field",{ref:"dateTextField",attrs:{id:"date-text-field","append-icon":"mdi-calendar",autocomplete:"chrome-off",clearable:e.clearable,"error-messages":e.errorMsg,error:!!e.errorMsg,value:e.displayDate,label:e.title,name:Math.random(),rules:e.inputRules,disabled:e.disablePicker,hint:e.hint,"persistent-hint":e.persistentHint,readonly:"",filled:""},on:{"click:clear":function(s){return e.emitClear()},keydown:function(s){return s.preventDefault()},keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.emitDate(e.dateText)}}})],1)]}}]),model:{value:e.displayPicker,callback:function(r){e.displayPicker=r},expression:"displayPicker"}},[t("v-date-picker",{attrs:{id:"date-picker-calendar",width:"490",min:e.minDate,max:e.maxDate},scopedSlots:e._u([{key:"default",fn:function(){return[t("div",[t("v-btn",{attrs:{id:"btn-done",text:"",color:"primary"},on:{click:function(r){return e.emitDate(e.dateText)}}},[t("strong",[e._v("OK")])]),t("v-btn",{attrs:{id:"btn-cancel",text:"",color:"primary"},on:{click:function(r){return e.emitCancel()}}},[e._v(" Cancel ")])],1)]},proxy:!0}]),model:{value:e.dateText,callback:function(r){e.dateText=r},expression:"dateText"}})],1)],1)},b=[],m=v(a,_,b,!1,null,"091973d0",null,null);const S=m.exports;m.exports.__docgenInfo={description:`This is a local, minimal mixin containing only the methods needed for the shared components when they run within this project (ie, in Storybook). When imported into an app project, the shared components should use the mixins -local to that project.`,tags:{},exportName:"default",displayName:"DatePicker",props:[{name:"attach",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"title",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"errorMsg",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"inputRules",tags:{},type:{name:"Array",elements:[{name:"TSFunctionType"}]},defaultValue:{func:!0,value:"() => []"}},{name:"disablePicker",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"initialValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"minDate",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"maxDate",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"nudgeTop",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"nudgeBottom",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"nudgeRight",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"nudgeLeft",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"hint",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"persistentHint",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"clearable",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"emitDate",description:"Emit date to add or remove."},{name:"emitCancel",description:"Emit cancel event and clear the date."},{name:"emitClear",description:"Emit clear event and clear the date."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/date-picker/DatePicker.vue","/home/severin/repos/bcrs-shared-components/src/mixins/date-mixin.ts"]};export{R as D}; -//# sourceMappingURL=DatePicker-bfb2acbc.js.map +local to that project.`,tags:{},exportName:"default",displayName:"DatePicker",props:[{name:"attach",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"title",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"errorMsg",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"inputRules",tags:{},type:{name:"Array",elements:[{name:"TSFunctionType"}]},defaultValue:{func:!0,value:"() => []"}},{name:"disablePicker",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"initialValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"minDate",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"maxDate",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"nudgeTop",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"nudgeBottom",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"nudgeRight",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"nudgeLeft",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"hint",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"persistentHint",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"clearable",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"emitDate",description:"Emit date to add or remove."},{name:"emitCancel",description:"Emit cancel event and clear the date."},{name:"emitClear",description:"Emit clear event and clear the date."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/date-picker/DatePicker.vue","/home/kdeodhar/gitRepo/bcrs-shared-components/src/mixins/date-mixin.ts"]};export{S as D}; +//# sourceMappingURL=DatePicker-6653e1e3.js.map diff --git a/docs/assets/DatePicker-bfb2acbc.js.map b/docs/assets/DatePicker-6653e1e3.js.map similarity index 99% rename from docs/assets/DatePicker-bfb2acbc.js.map rename to docs/assets/DatePicker-6653e1e3.js.map index b72a9e3d..9e190445 100644 --- a/docs/assets/DatePicker-bfb2acbc.js.map +++ b/docs/assets/DatePicker-6653e1e3.js.map @@ -1 +1 @@ -{"version":3,"file":"DatePicker-bfb2acbc.js","sources":["../../src/components/date-picker/DatePicker.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["DatePicker","Mixins","DateMixin","__publicField","_b","_a","date","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"yhBAqFA,IAAAA,EAAA,cAAAC,EAAAC,CAAA,CAAA,CAAA,kCAEAC,EAAA,cAKAA,EAAA,eACAA,EAAA,cACAA,EAAA,iBACAA,EAAA,mBACAA,EAAA,sBACAA,EAAA,qBACAA,EAAA,gBACAA,EAAA,gBACAA,EAAA,iBACAA,EAAA,oBACAA,EAAA,mBACAA,EAAA,kBACAA,EAAA,aACAA,EAAA,uBACAA,EAAA,kBAEAA,EAAA,gBAAA,MACAA,EAAA,qBAAA,IAGA,WAAA,CACA,KAAA,SAAA,GACA,KAAA,cAAA,EACA,CAGA,cAAA,CACA,OAAA,KAAA,MAAA,KAAA,SAAA,CACA,CAGA,aAAA,SACA,OAAAC,GAAAC,EAAA,KAAA,QAAA,YAAAA,EAAA,gBAAA,YAAAD,EAAA,KACA,CAGA,SAAA,CACA,KAAA,SAAA,KAAA,YACA,CAG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AAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAlBAR,EAkBA,UAAA,YAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAnBAR,EAmBA,UAAA,OAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EApBAR,EAoBA,UAAA,iBAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EArBAR,EAqBA,UAAA,YAAA,CAAA,EAuCAO,EAAA,CAFAE,EAAA,UAAA,CAAA,EA1DAT,EA4DA,UAAA,WAAA,CAAA,EAMAO,EAAA,CADAE,EAAA,YAAA,CAAA,EAjEAT,EAkEA,UAAA,aAAA,CAAA,EAMAO,EAAA,CADAE,EAAA,WAAA,CAAA,EAvEAT,EAwEA,UAAA,YAAA,CAAA,EAOAO,EAAA,CAHAG,EAAA,UAAA,EACAD,EAAA,cAAA,CAAA,EA7EAT,EA+EA,UAAA,eAAA,CAAA,EAKAO,EAAA,CADAG,EAAA,QAAA,CAAA,EAnFAV,EAoFA,UAAA,aAAA,CAAA,EApFAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;"} \ No newline at end of file +{"version":3,"file":"DatePicker-6653e1e3.js","sources":["../../src/components/date-picker/DatePicker.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["DatePicker","Mixins","DateMixin","__publicField","_b","_a","date","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"yhBAqFA,IAAAA,EAAA,cAAAC,EAAAC,CAAA,CAAA,CAAA,kCAEAC,EAAA,cAKAA,EAAA,eACAA,EAAA,cACAA,EAAA,iBACAA,EAAA,mBACAA,EAAA,sBACAA,EAAA,qBACAA,EAAA,gBACAA,EAAA,gBACAA,EAAA,iBACAA,EAAA,oBACAA,EAAA,mBACAA,EAAA,kBACAA,EAAA,aACAA,EAAA,uBACAA,EAAA,kBAEAA,EAAA,gBAAA,MACAA,EAAA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EAAA,CAAA,QAAA,KAAA,CAAA,EAfAR,EAeA,UAAA,WAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAhBAR,EAgBA,UAAA,cAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAjBAR,EAiBA,UAAA,aAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAlBAR,EAkBA,UAAA,YAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAnBAR,EAmBA,UAAA,OAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EApBAR,EAoBA,UAAA,iBAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EArBAR,EAqBA,UAAA,YAAA,CAAA,EAuCAO,EAAA,CAFAE,EAAA,UAAA,CAAA,EA1DAT,EA4DA,UAAA,WAAA,CAAA,EAMAO,EAAA,CADAE,EAAA,YAAA,CAAA,EAjEAT,EAkEA,UAAA,aAAA,CAAA,EAMAO,EAAA,CADAE,EAAA,WAAA,CAAA,EAvEAT,EAwEA,UAAA,YAAA,CAAA,EAOAO,EAAA,CAHAG,EAAA,UAAA,EACAD,EAAA,cAAA,CAAA,EA7EAT,EA+EA,UAAA,eAAA,CAAA,EAKAO,EAAA,CADAG,EAAA,QAAA,CAAA,EAnFAV,EAoFA,UAAA,aAAA,CAAA,EApFAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;"} \ No newline at end of file diff --git a/docs/assets/DatePicker.stories-31ff8cca.js b/docs/assets/DatePicker.stories-f669cf41.js similarity index 95% rename from docs/assets/DatePicker.stories-31ff8cca.js rename to docs/assets/DatePicker.stories-f669cf41.js index 6c3ecd9a..a6fc4b80 100644 --- a/docs/assets/DatePicker.stories-31ff8cca.js +++ b/docs/assets/DatePicker.stories-f669cf41.js @@ -1,4 +1,4 @@ -import{D as v}from"./DatePicker-bfb2acbc.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./vue.esm-b1e57a2f.js";import"./Watch-62f8b699.js";import"./validation-mixin-2ad1b825.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";const C={title:"component/DatePicker"},M="2021-03-01",w="2021-06-01",e=(B,{argTypes:x})=>({props:Object.keys(x),components:{DatePicker:v},template:''}),r=e.bind({});r.args={title:"Date",errorMsg:"",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const t=e.bind({});t.args={title:"Date",errorMsg:"You have some validation errors",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const a=e.bind({});a.args={title:"Date with rules",errorMsg:"",inputRules:[],disablePicker:!1,minDate:M,maxDate:w,nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const s=e.bind({});s.args={title:"Date with initial value",initialValue:"2021-11-18",errorMsg:"",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const o=e.bind({});o.args={title:"Date",errorMsg:"",hint:"this is a hint.",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0,persistentHint:!0};const i=e.bind({});i.args={title:"Date clearable",errorMsg:"",hint:"",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0,persistentHint:!0,clearable:!0};var p,c,n;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(args, { +import{D as v}from"./DatePicker-6653e1e3.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./vue.esm-b1e57a2f.js";import"./Watch-62f8b699.js";import"./validation-mixin-e5d1d708.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";const C={title:"component/DatePicker"},M="2021-03-01",w="2021-06-01",e=(B,{argTypes:x})=>({props:Object.keys(x),components:{DatePicker:v},template:''}),r=e.bind({});r.args={title:"Date",errorMsg:"",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const t=e.bind({});t.args={title:"Date",errorMsg:"You have some validation errors",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const a=e.bind({});a.args={title:"Date with rules",errorMsg:"",inputRules:[],disablePicker:!1,minDate:M,maxDate:w,nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const s=e.bind({});s.args={title:"Date with initial value",initialValue:"2021-11-18",errorMsg:"",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0};const o=e.bind({});o.args={title:"Date",errorMsg:"",hint:"this is a hint.",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0,persistentHint:!0};const i=e.bind({});i.args={title:"Date clearable",errorMsg:"",hint:"",inputRules:[],disablePicker:!1,minDate:"",maxDate:"",nudgeTop:0,nudgeBottom:0,nudgeRight:0,nudgeLeft:0,persistentHint:!0,clearable:!0};var p,c,n;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -47,4 +47,4 @@ import{D as v}from"./DatePicker-bfb2acbc.js";import"./_plugin-vue2_normalizer-b1 }, template: '' // $props comes from args below })`,...(R=($=i.parameters)==null?void 0:$.docs)==null?void 0:R.source}}};const I=["datePickerBaseline","datePickerError","datePickerMinMax","datePickerInitialValue","datePickerHint","datePickerClearable"];export{I as __namedExportsOrder,r as datePickerBaseline,i as datePickerClearable,t as datePickerError,o as datePickerHint,s as datePickerInitialValue,a as datePickerMinMax,C as default}; -//# sourceMappingURL=DatePicker.stories-31ff8cca.js.map +//# sourceMappingURL=DatePicker.stories-f669cf41.js.map diff --git a/docs/assets/DatePicker.stories-31ff8cca.js.map b/docs/assets/DatePicker.stories-f669cf41.js.map similarity index 59% rename from docs/assets/DatePicker.stories-31ff8cca.js.map rename to docs/assets/DatePicker.stories-f669cf41.js.map index d8b257b2..f9c6fef2 100644 --- a/docs/assets/DatePicker.stories-31ff8cca.js.map +++ b/docs/assets/DatePicker.stories-f669cf41.js.map @@ -1 +1 @@ -{"version":3,"file":"DatePicker.stories-31ff8cca.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"DatePicker.stories-f669cf41.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/DetailComment.stories-1b95fe08.js b/docs/assets/DetailComment.stories-e5078357.js similarity index 78% rename from docs/assets/DetailComment.stories-1b95fe08.js rename to docs/assets/DetailComment.stories-e5078357.js index 9bb2b661..7f8aeae6 100644 --- a/docs/assets/DetailComment.stories-1b95fe08.js +++ b/docs/assets/DetailComment.stories-e5078357.js @@ -1,4 +1,4 @@ -var b=Object.defineProperty;var V=(o,e,t)=>e in o?b(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var s=(o,e,t)=>(V(o,typeof e!="symbol"?e+"":e,t),t);import{V as w}from"./vue.esm-b1e57a2f.js";import{C as D,P as i,E as _,n as S}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as L}from"./Watch-62f8b699.js";import{l as O}from"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var P=Object.defineProperty,A=Object.getOwnPropertyDescriptor,n=(o,e,t,r)=>{for(var l=r>1?void 0:r?A(e,t):e,u=o.length-1,d;u>=0;u--)(d=o[u])&&(l=(r?d(e,t,l):d(l))||l);return r&&l&&P(e,t,l),l};let a=class extends w{constructor(){super(...arguments);s(this,"value");s(this,"placeholder");s(this,"maxLength");s(this,"autofocus");s(this,"rowCount");s(this,"textAreaStyle");s(this,"onValueChanged",O.debounce(t=>{this.emitValid(t)},300))}get rules(){return[t=>t&&t.trim().length>0||"Detail is required.",t=>t&&t.length<=this.maxLength||"Maximum characters exceeded."]}resetValidation(){this.$refs.textarea.resetValidation()}created(){this.emitValid(this.value)}isStyle(t){return this.textAreaStyle.toLowerCase()===t.toLowerCase()}emitInput(t){}emitValid(t){return this.rules.every(r=>r(t)===!0)}};n([i({default:""})],a.prototype,"value",2);n([i({default:""})],a.prototype,"placeholder",2);n([i({default:4096})],a.prototype,"maxLength",2);n([i({default:!1})],a.prototype,"autofocus",2);n([i({default:5})],a.prototype,"rowCount",2);n([i({default:"outlined"})],a.prototype,"textAreaStyle",2);n([L("value")],a.prototype,"onValueChanged",2);n([_("input")],a.prototype,"emitInput",1);n([_("valid")],a.prototype,"emitValid",1);a=n([D({})],a);var $=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("v-card",{attrs:{id:"detail-comment-container",flat:""}},[t("v-textarea",{ref:"textarea",attrs:{id:"detail-comment-textarea",outlined:e.isStyle("outlined"),filled:e.isStyle("filled"),"auto-grow":"",rows:e.rowCount,counter:e.maxLength,rules:e.rules,value:e.value,placeholder:e.placeholder,autofocus:e.autofocus},on:{input:function(r){return e.emitInput(r)}}})],1)},E=[],x=S(a,$,E,!1,null,"03f8bbd7",null,null);const j=x.exports;x.exports.__docgenInfo={exportName:"default",displayName:"DetailComment",description:"",tags:{},props:[{name:"value",tags:{},description:"Comment (v-model) passed into this component (required).",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"placeholder",tags:{},description:"Placeholder passed into this component (optional).",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"maxLength",tags:{},description:"Max Length passed into this component (optional).",type:{name:"number"},defaultValue:{func:!1,value:"4096"}},{name:"autofocus",tags:{},description:"Autofocus passed into this component (optional).",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"rowCount",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"5"}},{name:"textAreaStyle",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'outlined'"}}],events:[{name:"input",description:"Emits an event with the changed comment (ie, updated v-model)."},{name:"valid",description:"Emits an event indicating whether or not this component is valid."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/detail-comment/DetailComment.vue"]};const z={title:"component/DetailComment"},C=(o,{argTypes:e})=>({props:Object.keys(e),components:{DetailComment:j},template:''}),m=C.bind({});m.args={placeholder:"Provide a detail comment",textAreaStyle:"outlined",maxLength:4096};const p=C.bind({});p.args={placeholder:"Provide a detail comment",textAreaStyle:"filled",maxLength:1e3,rowCount:2};var c,f,h;m.parameters={...m.parameters,docs:{...(c=m.parameters)==null?void 0:c.docs,source:{originalSource:`(args, { +var b=Object.defineProperty;var V=(o,e,t)=>e in o?b(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var s=(o,e,t)=>(V(o,typeof e!="symbol"?e+"":e,t),t);import{V as w}from"./vue.esm-b1e57a2f.js";import{C as D,P as i,E as _,n as S}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as L}from"./Watch-62f8b699.js";import{l as O}from"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var P=Object.defineProperty,A=Object.getOwnPropertyDescriptor,n=(o,e,t,r)=>{for(var l=r>1?void 0:r?A(e,t):e,u=o.length-1,d;u>=0;u--)(d=o[u])&&(l=(r?d(e,t,l):d(l))||l);return r&&l&&P(e,t,l),l};let a=class extends w{constructor(){super(...arguments);s(this,"value");s(this,"placeholder");s(this,"maxLength");s(this,"autofocus");s(this,"rowCount");s(this,"textAreaStyle");s(this,"onValueChanged",O.debounce(t=>{this.emitValid(t)},300))}get rules(){return[t=>t&&t.trim().length>0||"Detail is required.",t=>t&&t.length<=this.maxLength||"Maximum characters exceeded."]}resetValidation(){this.$refs.textarea.resetValidation()}created(){this.emitValid(this.value)}isStyle(t){return this.textAreaStyle.toLowerCase()===t.toLowerCase()}emitInput(t){}emitValid(t){return this.rules.every(r=>r(t)===!0)}};n([i({default:""})],a.prototype,"value",2);n([i({default:""})],a.prototype,"placeholder",2);n([i({default:4096})],a.prototype,"maxLength",2);n([i({default:!1})],a.prototype,"autofocus",2);n([i({default:5})],a.prototype,"rowCount",2);n([i({default:"outlined"})],a.prototype,"textAreaStyle",2);n([L("value")],a.prototype,"onValueChanged",2);n([_("input")],a.prototype,"emitInput",1);n([_("valid")],a.prototype,"emitValid",1);a=n([D({})],a);var $=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("v-card",{attrs:{id:"detail-comment-container",flat:""}},[t("v-textarea",{ref:"textarea",attrs:{id:"detail-comment-textarea",outlined:e.isStyle("outlined"),filled:e.isStyle("filled"),"auto-grow":"",rows:e.rowCount,counter:e.maxLength,rules:e.rules,value:e.value,placeholder:e.placeholder,autofocus:e.autofocus},on:{input:function(r){return e.emitInput(r)}}})],1)},E=[],x=S(a,$,E,!1,null,"03f8bbd7",null,null);const j=x.exports;x.exports.__docgenInfo={exportName:"default",displayName:"DetailComment",description:"",tags:{},props:[{name:"value",tags:{},description:"Comment (v-model) passed into this component (required).",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"placeholder",tags:{},description:"Placeholder passed into this component (optional).",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"maxLength",tags:{},description:"Max Length passed into this component (optional).",type:{name:"number"},defaultValue:{func:!1,value:"4096"}},{name:"autofocus",tags:{},description:"Autofocus passed into this component (optional).",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"rowCount",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"5"}},{name:"textAreaStyle",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'outlined'"}}],events:[{name:"input",description:"Emits an event with the changed comment (ie, updated v-model)."},{name:"valid",description:"Emits an event indicating whether or not this component is valid."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/detail-comment/DetailComment.vue"]};const W={title:"component/DetailComment"},C=(o,{argTypes:e})=>({props:Object.keys(e),components:{DetailComment:j},template:''}),m=C.bind({});m.args={placeholder:"Provide a detail comment",textAreaStyle:"outlined",maxLength:4096};const p=C.bind({});p.args={placeholder:"Provide a detail comment",textAreaStyle:"filled",maxLength:1e3,rowCount:2};var c,f,h;m.parameters={...m.parameters,docs:{...(c=m.parameters)==null?void 0:c.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -6,7 +6,7 @@ var b=Object.defineProperty;var V=(o,e,t)=>e in o?b(o,e,{enumerable:!0,configura DetailComment }, template: '' // $props comes from args below -})`,...(h=(f=m.parameters)==null?void 0:f.docs)==null?void 0:h.source}}};var v,g,y;p.parameters={...p.parameters,docs:{...(v=p.parameters)==null?void 0:v.docs,source:{originalSource:`(args, { +})`,...(h=(f=m.parameters)==null?void 0:f.docs)==null?void 0:h.source}}};var g,v,y;p.parameters={...p.parameters,docs:{...(g=p.parameters)==null?void 0:g.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -14,5 +14,5 @@ var b=Object.defineProperty;var V=(o,e,t)=>e in o?b(o,e,{enumerable:!0,configura DetailComment }, template: '' // $props comes from args below -})`,...(y=(g=p.parameters)==null?void 0:g.docs)==null?void 0:y.source}}};const R=["Outlined","Filled"];export{p as Filled,m as Outlined,R as __namedExportsOrder,z as default}; -//# sourceMappingURL=DetailComment.stories-1b95fe08.js.map +})`,...(y=(v=p.parameters)==null?void 0:v.docs)==null?void 0:y.source}}};const z=["Outlined","Filled"];export{p as Filled,m as Outlined,z as __namedExportsOrder,W as default}; +//# sourceMappingURL=DetailComment.stories-e5078357.js.map diff --git a/docs/assets/DetailComment.stories-1b95fe08.js.map b/docs/assets/DetailComment.stories-e5078357.js.map similarity index 98% rename from docs/assets/DetailComment.stories-1b95fe08.js.map rename to docs/assets/DetailComment.stories-e5078357.js.map index 9cf67a35..a51b3bd0 100644 --- a/docs/assets/DetailComment.stories-1b95fe08.js.map +++ b/docs/assets/DetailComment.stories-e5078357.js.map @@ -1 +1 @@ -{"version":3,"file":"DetailComment.stories-1b95fe08.js","sources":["../../src/components/detail-comment/DetailComment.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["DetailComment","Vue","__publicField","debounce","val","style","rule","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ylBA4BA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAiBAC,EAAA,cAGAA,EAAA,oBAGAA,EAAA,kBAGAA,EAAA,kBAEAA,EAAA,iBAEAA,EAAA,sBAiBAA,EAAA,sBAAAC,EAAAA,SAAAC,GAAA,CACA,KAAA,UAAAA,CAAA,GACA,GAAA,GA/CA,IAAA,OAAA,CAGA,MAAA,IACAA,GAAAA,EAAA,KAAA,EAAA,OAAA,GAAA,sBACAA,GAAAA,GAAAA,EAAA,QAAA,KAAA,WAAA,8BAAA,CAEA,CAGA,iBAAA,CACA,KAAA,MAAA,SAAA,iBACA,CAmBA,SAAA,CAEA,KAAA,UAAA,KAAA,KAAA,CACA,CAEA,QAAAC,EAAA,CACA,OAAA,KAAA,cAAA,YAAA,IAAAA,EAAA,YAAA,CACA,CAcA,UAAAD,EAAA,CAAA,CAIA,UAAAA,EAAA,CAEA,OAAA,KAAA,MAAA,SAAAE,EAAAF,CAAA,IAAA,EAAA,CACA,CACA,EA7CAG,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAjBAR,EAiBA,UAAA,QAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EApBAR,EAoBA,UAAA,cAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAvBAR,EAuBA,UAAA,YAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EA1BAR,EA0BA,UAAA,YAAA,CAAA,EAEAO,EAAA,CAAAC,EAAA,CAAA,QAAA,EAAA,CAAA,EA5BAR,EA4BA,UAAA,WAAA,CAAA,EAEAO,EAAA,CAAAC,EAAA,CAAA,QAAA,WAAA,CAAA,EA9BAR,EA8BA,UAAA,gBAAA,CAAA,EAiBAO,EAAA,CADAE,EAAA,OAAA,CAAA,EA9CAT,EA+CA,UAAA,iBAAA,CAAA,EAOAO,EAAA,CAFAG,EAAA,OAAA,CAAA,EApDAV,EAsDA,UAAA,YAAA,CAAA,EAIAO,EAAA,CADAG,EAAA,OAAA,CAAA,EAzDAV,EA0DA,UAAA,YAAA,CAAA,EA1DAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"DetailComment.stories-e5078357.js","sources":["../../src/components/detail-comment/DetailComment.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["DetailComment","Vue","__publicField","debounce","val","style","rule","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ylBA4BA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAiBAC,EAAA,cAGAA,EAAA,oBAGAA,EAAA,kBAGAA,EAAA,kBAEAA,EAAA,iBAEAA,EAAA,sBAiBAA,EAAA,sBAAAC,EAAAA,SAAAC,GAAA,CACA,KAAA,UAAAA,CAAA,GACA,GAAA,GA/CA,IAAA,OAAA,CAGA,MAAA,IACAA,GAAAA,EAAA,KAAA,EAAA,OAAA,GAAA,sBACAA,GAAAA,GAAAA,EAAA,QAAA,KAAA,WAAA,8BAAA,CAEA,CAGA,iBAAA,CACA,KAAA,MAAA,SAAA,iBACA,CAmBA,SAAA,CAEA,KAAA,UAAA,KAAA,KAAA,CACA,CAEA,QAAAC,EAAA,CACA,OAAA,KAAA,cAAA,YAAA,IAAAA,EAAA,YAAA,CACA,CAcA,UAAAD,EAAA,CAAA,CAIA,UAAAA,EAAA,CAEA,OAAA,KAAA,MAAA,SAAAE,EAAAF,CAAA,IAAA,EAAA,CACA,CACA,EA7CAG,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAjBAR,EAiBA,UAAA,QAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EApBAR,EAoBA,UAAA,cAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAvBAR,EAuBA,UAAA,YAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EA1BAR,EA0BA,UAAA,YAAA,CAAA,EAEAO,EAAA,CAAAC,EAAA,CAAA,QAAA,EAAA,CAAA,EA5BAR,EA4BA,UAAA,WAAA,CAAA,EAEAO,EAAA,CAAAC,EAAA,CAAA,QAAA,WAAA,CAAA,EA9BAR,EA8BA,UAAA,gBAAA,CAAA,EAiBAO,EAAA,CADAE,EAAA,OAAA,CAAA,EA9CAT,EA+CA,UAAA,iBAAA,CAAA,EAOAO,EAAA,CAFAG,EAAA,OAAA,CAAA,EApDAV,EAsDA,UAAA,YAAA,CAAA,EAIAO,EAAA,CADAG,EAAA,OAAA,CAAA,EAzDAV,EA0DA,UAAA,YAAA,CAAA,EA1DAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/DocumentDelivery.stories-b5a62892.js b/docs/assets/DocumentDelivery.stories-b5a62892.js new file mode 100644 index 00000000..1726f9b9 --- /dev/null +++ b/docs/assets/DocumentDelivery.stories-b5a62892.js @@ -0,0 +1,18 @@ +var h=Object.defineProperty;var V=(i,t,a)=>t in i?h(i,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[t]=a;var o=(i,t,a)=>(V(i,typeof t!="symbol"?t+"":t,a),a);import{V as P}from"./vue.esm-b1e57a2f.js";import{C as x,P as s,E,n as D}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as O}from"./Watch-62f8b699.js";var w=Object.defineProperty,L=Object.getOwnPropertyDescriptor,l=(i,t,a,n)=>{for(var r=n>1?void 0:n?L(t,a):t,p=i.length-1,d;p>=0;p--)(d=i[p])&&(r=(n?d(t,a,r):d(r))||r);return n&&r&&w(t,a,r),r};let e=class extends P{constructor(){super(...arguments);o(this,"contactLabel");o(this,"contactValue");o(this,"showCustodianEmail");o(this,"custodianEmail");o(this,"additionalLabel");o(this,"additionalValue");o(this,"showCompletingParty");o(this,"editableCompletingParty");o(this,"completingPartyEmail");o(this,"documentOptionalEmail");o(this,"invalidSection");o(this,"optionalEmail","");o(this,"entityEmailRules",[a=>!/^\s/g.test(a)||"Invalid spaces",a=>!/\s$/g.test(a)||"Invalid spaces",a=>this.validateEmailFormat(a)||"Enter valid email address"])}mounted(){this.optionalEmail=this.documentOptionalEmail}validateEmailFormat(a){return a?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,}))$/).test(a):!0}onOptionalEmailChanged(a){this.validateEmailFormat(a)?(this.emitOptionalEmail(),this.emitValid(!0)):this.emitValid(!1)}emitOptionalEmail(){return this.optionalEmail}emitValid(a){return a}};l([s({required:!0})],e.prototype,"contactLabel",2);l([s({default:null})],e.prototype,"contactValue",2);l([s({default:!1})],e.prototype,"showCustodianEmail",2);l([s({default:null})],e.prototype,"custodianEmail",2);l([s({default:null})],e.prototype,"additionalLabel",2);l([s({default:null})],e.prototype,"additionalValue",2);l([s({default:!0})],e.prototype,"showCompletingParty",2);l([s({default:!1})],e.prototype,"editableCompletingParty",2);l([s({default:null})],e.prototype,"completingPartyEmail",2);l([s({default:null})],e.prototype,"documentOptionalEmail",2);l([s({default:!1})],e.prototype,"invalidSection",2);l([O("optionalEmail")],e.prototype,"onOptionalEmailChanged",1);l([E("update:optionalEmail")],e.prototype,"emitOptionalEmail",1);l([E("valid")],e.prototype,"emitValid",1);e=l([x({})],e);var A=function(){var t=this,a=t._self._c;return t._self._setupProxy,a("div",{attrs:{id:"document-delivery"}},[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[a("label",{staticClass:"title-label"},[t._v(t._s(t.contactLabel))])]),a("v-col",{attrs:{cols:"12",sm:"9"}},[a("span",{attrs:{id:"contact-value"}},[t._v(t._s(t.contactValue||"(Not entered)"))])])],1),t.showCustodianEmail?a("v-row",{staticClass:"pt-5",attrs:{"no-gutters":""}},[a("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[a("label",{staticClass:"title-label"},[t._v("Custodian of Records")])]),a("v-col",{attrs:{cols:"12",sm:"9"}},[a("span",{attrs:{id:"custodian-email"}},[t._v(t._s(t.custodianEmail||"(Not entered)"))])])],1):t._e(),t.additionalLabel?a("v-row",{staticClass:"pt-5",attrs:{"no-gutters":""}},[a("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[a("label",{staticClass:"title-label"},[t._v(t._s(t.additionalLabel))])]),a("v-col",{attrs:{cols:"12",sm:"9"}},[a("span",{attrs:{id:"additional-value"}},[t._v(t._s(t.additionalValue||"(Not entered)"))])])],1):t._e(),t.showCompletingParty?a("v-row",{staticClass:"pt-5",attrs:{"no-gutters":""}},[a("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[a("label",{staticClass:"title-label",class:{"error-text":t.invalidSection}},[t._v(" Completing Party ")])]),t.editableCompletingParty?a("v-col",{attrs:{cols:"12",sm:"9"}},[a("v-text-field",{staticClass:"text-input-field",attrs:{id:"optionalEmail",filled:"","persistent-hint":"","validate-on-blur":"",label:"Client Email Address (Optional)",hint:"Example: name@email.com",rules:t.entityEmailRules},model:{value:t.optionalEmail,callback:function(n){t.optionalEmail=n},expression:"optionalEmail"}})],1):a("v-col",{attrs:{cols:"12",sm:"9"}},[a("span",{attrs:{id:"completing-party-email"}},[t._v(t._s(t.completingPartyEmail||"(Not entered)"))])])],1):t._e()],1)},R=[],b=D(e,A,R,!1,null,"2c028e01",null,null);const S=b.exports;b.exports.__docgenInfo={exportName:"default",displayName:"DocumentDelivery",description:"",tags:{},props:[{name:"contactLabel",tags:{},type:{name:"string"},required:!0},{name:"contactValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"showCustodianEmail",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"custodianEmail",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"additionalLabel",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"additionalValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"showCompletingParty",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"editableCompletingParty",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"completingPartyEmail",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"documentOptionalEmail",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"invalidSection",tags:{},description:"Whether to display invalid section styling.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"update:optionalEmail"},{name:"valid"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/document-delivery/DocumentDelivery.vue"]};const I={title:"component/DocumentDelivery"},C=(i,{argTypes:t})=>({props:Object.keys(t),components:{DocumentDelivery:S},template:''}),m=C.bind({});m.args={contactLabel:"Contact",contactValue:"contact@example.com",editableCompletingParty:!1,completingPartyEmail:"completing.party@example.com",showCustodianEmail:!0,custodianEmail:"custodian@example.com",additionalLabel:"Additional",additionalValue:"additional1@example.com, additional2@example.com",invalidSection:!1};const c=C.bind({});c.args={contactLabel:"Contact",contactValue:"contact@example.com",editableCompletingParty:!0,documentOptionalEmail:"optional@example.com",showCustodianEmail:!0,custodianEmail:"custodian@example.com",additionalLabel:"Additional",additionalValue:"additional1@example.com, additional2@example.com",invalidSection:!1};var u,v,f;m.parameters={...m.parameters,docs:{...(u=m.parameters)==null?void 0:u.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + DocumentDelivery + }, + template: '' // $props comes from args below +})`,...(f=(v=m.parameters)==null?void 0:v.docs)==null?void 0:f.source}}};var y,g,_;c.parameters={...c.parameters,docs:{...(y=c.parameters)==null?void 0:y.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + DocumentDelivery + }, + template: '' // $props comes from args below +})`,...(_=(g=c.parameters)==null?void 0:g.docs)==null?void 0:_.source}}};const z=["Default","EditableCompletingParty"];export{m as Default,c as EditableCompletingParty,z as __namedExportsOrder,I as default}; +//# sourceMappingURL=DocumentDelivery.stories-b5a62892.js.map diff --git a/docs/assets/DocumentDelivery.stories-b922a043.js.map b/docs/assets/DocumentDelivery.stories-b5a62892.js.map similarity index 99% rename from docs/assets/DocumentDelivery.stories-b922a043.js.map rename to docs/assets/DocumentDelivery.stories-b5a62892.js.map index 86e2f1a3..41ba5d40 100644 --- a/docs/assets/DocumentDelivery.stories-b922a043.js.map +++ b/docs/assets/DocumentDelivery.stories-b5a62892.js.map @@ -1 +1 @@ -{"version":3,"file":"DocumentDelivery.stories-b922a043.js","sources":["../../src/components/document-delivery/DocumentDelivery.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["DocumentDelivery","Vue","__publicField","v","value","val","valid","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ogBAgHA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,qBACAA,EAAA,qBAGAA,EAAA,2BACAA,EAAA,uBAGAA,EAAA,wBACAA,EAAA,wBAGAA,EAAA,4BACAA,EAAA,gCACAA,EAAA,6BAC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hBAR,EAgBA,UAAA,uBAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAjBAR,EAiBA,UAAA,wBAAA,CAAA,EAGAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EApBAR,EAoBA,UAAA,iBAAA,CAAA,EA4BAO,EAAA,CADAE,EAAA,eAAA,CAAA,EA/CAT,EAgDA,UAAA,yBAAA,CAAA,EAUAO,EAAA,CADAG,EAAA,sBAAA,CAAA,EAzDAV,EA0DA,UAAA,oBAAA,CAAA,EAKAO,EAAA,CADAG,EAAA,OAAA,CAAA,EA9DAV,EA+DA,UAAA,YAAA,CAAA,EA/DAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"DocumentDelivery.stories-b5a62892.js","sources":["../../src/components/document-delivery/DocumentDelivery.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["DocumentDelivery","Vue","__publicField","v","value","val","valid","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ogBAgHA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,qBACAA,EAAA,qBAGAA,EAAA,2BACAA,EAAA,uBAGAA,EAAA,wBACAA,EAAA,wBAGAA,EAAA,4BACAA,EAAA,gCACAA,EAAA,6BACAA,EAAA,8BAGAA,EAAA,uBAGAA,EAAA,qBAAA,IAEAA,EAAA,wBAAA,CACAC,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,CAAA,OAAA,KAAAA,CAAA,GAAA,iBACAA,GAAA,KAAA,oBAAAA,CAAA,GAAA,2BAAA,GAIA,SAAA,CACA,KAAA,cAAA,KAAA,qBACA,CAEA,oBAAAC,EAAA,CAEA,OAAAA,EAIA,IAAA,OAAA,sJAAA,EACA,KAAAA,CAAA,EAJA,EAMA,CAGA,uBAAAC,EAAA,CACA,KAAA,oBAAAA,CAAA,GAC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CAAA,EA9DAV,EA+DA,UAAA,YAAA,CAAA,EA/DAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/DocumentDelivery.stories-b922a043.js b/docs/assets/DocumentDelivery.stories-b922a043.js deleted file mode 100644 index cacd8ee6..00000000 --- a/docs/assets/DocumentDelivery.stories-b922a043.js +++ /dev/null @@ -1,18 +0,0 @@ -var V=Object.defineProperty;var h=(i,e,t)=>e in i?V(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var o=(i,e,t)=>(h(i,typeof e!="symbol"?e+"":e,t),t);import{V as P}from"./vue.esm-b1e57a2f.js";import{C as x,P as s,E,n as D}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as O}from"./Watch-62f8b699.js";var w=Object.defineProperty,L=Object.getOwnPropertyDescriptor,l=(i,e,t,n)=>{for(var r=n>1?void 0:n?L(e,t):e,p=i.length-1,d;p>=0;p--)(d=i[p])&&(r=(n?d(e,t,r):d(r))||r);return n&&r&&w(e,t,r),r};let a=class extends P{constructor(){super(...arguments);o(this,"contactLabel");o(this,"contactValue");o(this,"showCustodianEmail");o(this,"custodianEmail");o(this,"additionalLabel");o(this,"additionalValue");o(this,"showCompletingParty");o(this,"editableCompletingParty");o(this,"completingPartyEmail");o(this,"documentOptionalEmail");o(this,"invalidSection");o(this,"optionalEmail","");o(this,"entityEmailRules",[t=>!/^\s/g.test(t)||"Invalid spaces",t=>!/\s$/g.test(t)||"Invalid spaces",t=>this.validateEmailFormat(t)||"Enter valid email address"])}mounted(){this.optionalEmail=this.documentOptionalEmail}validateEmailFormat(t){return 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,}))$/).test(t):!0}onOptionalEmailChanged(t){this.validateEmailFormat(t)?(this.emitOptionalEmail(),this.emitValid(!0)):this.emitValid(!1)}emitOptionalEmail(){return this.optionalEmail}emitValid(t){return t}};l([s({required:!0})],a.prototype,"contactLabel",2);l([s({default:null})],a.prototype,"contactValue",2);l([s({default:!1})],a.prototype,"showCustodianEmail",2);l([s({default:null})],a.prototype,"custodianEmail",2);l([s({default:null})],a.prototype,"additionalLabel",2);l([s({default:null})],a.prototype,"additionalValue",2);l([s({default:!0})],a.prototype,"showCompletingParty",2);l([s({default:!1})],a.prototype,"editableCompletingParty",2);l([s({default:null})],a.prototype,"completingPartyEmail",2);l([s({default:null})],a.prototype,"documentOptionalEmail",2);l([s({default:!1})],a.prototype,"invalidSection",2);l([O("optionalEmail")],a.prototype,"onOptionalEmailChanged",1);l([E("update:optionalEmail")],a.prototype,"emitOptionalEmail",1);l([E("valid")],a.prototype,"emitValid",1);a=l([x({})],a);var A=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{attrs:{id:"document-delivery"}},[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[t("label",{staticClass:"title-label"},[e._v(e._s(e.contactLabel))])]),t("v-col",{attrs:{cols:"12",sm:"9"}},[t("span",{attrs:{id:"contact-value"}},[e._v(e._s(e.contactValue||"(Not entered)"))])])],1),e.showCustodianEmail?t("v-row",{staticClass:"pt-5",attrs:{"no-gutters":""}},[t("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[t("label",{staticClass:"title-label"},[e._v("Custodian of Records")])]),t("v-col",{attrs:{cols:"12",sm:"9"}},[t("span",{attrs:{id:"custodian-email"}},[e._v(e._s(e.custodianEmail||"(Not entered)"))])])],1):e._e(),e.additionalLabel?t("v-row",{staticClass:"pt-5",attrs:{"no-gutters":""}},[t("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[t("label",{staticClass:"title-label"},[e._v(e._s(e.additionalLabel))])]),t("v-col",{attrs:{cols:"12",sm:"9"}},[t("span",{attrs:{id:"additional-value"}},[e._v(e._s(e.additionalValue||"(Not entered)"))])])],1):e._e(),e.showCompletingParty?t("v-row",{staticClass:"pt-5",attrs:{"no-gutters":""}},[t("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[t("label",{staticClass:"title-label",class:{"error-text":e.invalidSection}},[e._v(" Completing Party ")])]),e.editableCompletingParty?t("v-col",{attrs:{cols:"12",sm:"9"}},[t("v-text-field",{staticClass:"text-input-field",attrs:{id:"optionalEmail",filled:"","persistent-hint":"","validate-on-blur":"",label:"Client Email Address (Optional)",hint:"Example: name@email.com",rules:e.entityEmailRules},model:{value:e.optionalEmail,callback:function(n){e.optionalEmail=n},expression:"optionalEmail"}})],1):t("v-col",{attrs:{cols:"12",sm:"9"}},[t("span",{attrs:{id:"completing-party-email"}},[e._v(e._s(e.completingPartyEmail||"(Not entered)"))])])],1):e._e()],1)},S=[],b=D(a,A,S,!1,null,"2c028e01",null,null);const $=b.exports;b.exports.__docgenInfo={exportName:"default",displayName:"DocumentDelivery",description:"",tags:{},props:[{name:"contactLabel",tags:{},type:{name:"string"},required:!0},{name:"contactValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"showCustodianEmail",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"custodianEmail",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"additionalLabel",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"additionalValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"showCompletingParty",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"editableCompletingParty",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"completingPartyEmail",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"documentOptionalEmail",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"invalidSection",tags:{},description:"Whether to display invalid section styling.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"update:optionalEmail"},{name:"valid"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/document-delivery/DocumentDelivery.vue"]};const I={title:"component/DocumentDelivery"},C=(i,{argTypes:e})=>({props:Object.keys(e),components:{DocumentDelivery:$},template:''}),m=C.bind({});m.args={contactLabel:"Contact",contactValue:"contact@example.com",editableCompletingParty:!1,completingPartyEmail:"completing.party@example.com",showCustodianEmail:!0,custodianEmail:"custodian@example.com",additionalLabel:"Additional",additionalValue:"additional1@example.com, additional2@example.com",invalidSection:!1};const c=C.bind({});c.args={contactLabel:"Contact",contactValue:"contact@example.com",editableCompletingParty:!0,documentOptionalEmail:"optional@example.com",showCustodianEmail:!0,custodianEmail:"custodian@example.com",additionalLabel:"Additional",additionalValue:"additional1@example.com, additional2@example.com",invalidSection:!1};var u,v,f;m.parameters={...m.parameters,docs:{...(u=m.parameters)==null?void 0:u.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - DocumentDelivery - }, - template: '' // $props comes from args below -})`,...(f=(v=m.parameters)==null?void 0:v.docs)==null?void 0:f.source}}};var y,g,_;c.parameters={...c.parameters,docs:{...(y=c.parameters)==null?void 0:y.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - DocumentDelivery - }, - template: '' // $props comes from args below -})`,...(_=(g=c.parameters)==null?void 0:g.docs)==null?void 0:_.source}}};const z=["Default","EditableCompletingParty"];export{m as Default,c as EditableCompletingParty,z as __namedExportsOrder,I as default}; -//# sourceMappingURL=DocumentDelivery.stories-b922a043.js.map diff --git a/docs/assets/EffectiveDateTime.stories-e7f8de6c.js b/docs/assets/EffectiveDateTime.stories-71eb1d6f.js similarity index 88% rename from docs/assets/EffectiveDateTime.stories-e7f8de6c.js rename to docs/assets/EffectiveDateTime.stories-71eb1d6f.js index b384ea97..9bf3f476 100644 --- a/docs/assets/EffectiveDateTime.stories-e7f8de6c.js +++ b/docs/assets/EffectiveDateTime.stories-71eb1d6f.js @@ -1,8 +1,8 @@ -var _=Object.defineProperty;var x=(n,t,e)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(x(n,typeof t!="symbol"?t+"":t,e),e);import{V as v}from"./vue.esm-b1e57a2f.js";import{m as b,C,P as d,E as h,n as I}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as l}from"./Watch-62f8b699.js";import{D as P}from"./DatePicker-bfb2acbc.js";import{D as M}from"./validation-mixin-2ad1b825.js";import{V}from"./vuetify-b9fb25b0.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var m=(n=>(n.FUTURE_EFFECTIVE="futureEffective",n.IMMEDIATE="immediate",n))(m||{}),S=Object.defineProperty,U=Object.getOwnPropertyDescriptor,o=(n,t,e,i)=>{for(var a=i>1?void 0:i?U(t,e):t,c=n.length-1,f;c>=0;c--)(f=n[c])&&(a=(i?f(t,e,a):f(a))||a);return i&&a&&S(t,e,a),a};let r=class extends b(M){constructor(){super(...arguments);s(this,"MIN_DIFF_MINUTES",3);s(this,"MAX_DIFF_DAYS",10);s(this,"$refs");s(this,"parseInitial");s(this,"currentJsDate");s(this,"effectiveDateTime");s(this,"isAppValidate");s(this,"EffectiveDateTypes",m);s(this,"isImmediate",!1);s(this,"isFutureEffective",!1);s(this,"minDate",null);s(this,"maxDate",null);s(this,"effectiveDateType",null);s(this,"datePicker","");s(this,"dateText","");s(this,"selectHour",[]);s(this,"selectMinute",[]);s(this,"selectPeriod","am");s(this,"hours",[...Array(12).keys()].map(e=>(e+1).toString()));s(this,"minutes",[...Array(60).keys()].map(e=>e.toString().padStart(2,"0")));s(this,"timePeriod",["am","pm"])}get dateRules(){if(this.isFutureEffective&&this.isAppValidate){const e=this.dateToPacificDate(this.minDate,!0),i=this.dateToPacificDate(this.maxDate,!0);return[a=>!!a||"Select date",a=>this.isValidDateRange(a)||`Date must be between ${e} and ${i}`]}return[]}isValidDateRange(e){let i=new Date(e);i=new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate());const a=new Date(this.minDate.getFullYear(),this.minDate.getMonth(),this.minDate.getDate()),c=new Date(this.maxDate.getFullYear(),this.maxDate.getMonth(),this.maxDate.getDate());return i>=a&&i<=c}get hourRules(){return this.isFutureEffective&&this.isAppValidate?[e=>e.length>0||"Select hour",e=>/^([1-9]|1[012])$/.test(e)||""]:[]}get minuteRules(){return this.isFutureEffective&&this.isAppValidate?[e=>e.length>0||"Select minute",e=>/^([0-5]?[0-9])$/.test(e)||""]:[]}get isUnderTime(){if(this.effectiveDateTime.effectiveDate){const e=new Date(this.effectiveDateTime.effectiveDate);return e.setSeconds(59,999),e.getTime()this.maxDate.getTime()}return!1}mounted(){this.parseInitial&&this.parseInitialEffectiveDateTime()}parseInitialEffectiveDateTime(){this.isFutureEffective=this.effectiveDateTime.isFutureEffective,this.isFutureEffective===!0?this.effectiveDateType=m.FUTURE_EFFECTIVE:this.isFutureEffective===!1?this.effectiveDateType=m.IMMEDIATE:this.effectiveDateType=null;const e=this.effectiveDateTime.effectiveDate,i=e&&new Date(e);if(i){let a=i.getHours();const c=i.getMinutes(),f=a<12?"am":"pm";a>12?a-=12:a===0&&(a=12),this.dateText=this.dateToYyyyMmDd(i),this.selectHour=[a.toString()],this.selectMinute=[c.toString().padStart(2,"0")],this.selectPeriod=f}}async constructAndUpdate(){await v.nextTick();const e=this.$refs.datePickerRef.validateForm(),i=this.$refs.form.validate();if(e&&i&&this.selectHour.length&&this.selectMinute.length){const a=+this.dateText.slice(0,4),c=+this.dateText.slice(5,7)-1,f=+this.dateText.slice(8,10);let p=+this.selectHour;const y=+this.selectMinute;this.selectPeriod==="am"&&+this.selectHour==12&&(p=0),this.selectPeriod==="pm"&&+this.selectHour!=12&&(p+=12);const F=this.createUtcDate(a,c,f,p,y);this.emitEffectiveDate(F)}this.emitValid()}onCurrentJsDateChanged(e){if(e){const i=new Date;i.setTime(e.getTime()+this.MIN_DIFF_MINUTES*60*1e3),this.minDate=i;const a=new Date;a.setTime(e.getTime()+this.MAX_DIFF_DAYS*24*60*60*1e3),this.maxDate=a,this.emitValid()}}onDatePickerChanged(e){this.dateText=e}onDateTextChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onSelectHourChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onSelectMinuteChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onSelectPeriodChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onEffectiveDateTypeChanged(e){this.isImmediate=e===m.IMMEDIATE,this.isFutureEffective=e===m.FUTURE_EFFECTIVE,this.isImmediate&&(this.datePicker="",this.dateText="",this.selectHour=[],this.selectMinute=[],this.selectPeriod="am",this.$refs.datePickerRef.clearDate()),this.emitIsFutureEffective(this.isFutureEffective),this.emitEffectiveDate(null),this.emitValid()}emitIsFutureEffective(e){}emitEffectiveDate(e){}async emitValid(){const e=this.isFutureEffective?!!this.dateText:!0;await v.nextTick();const i=this.$refs.datePickerRef.validateForm(),a=this.$refs.form.validate();return this.isImmediate||!!this.effectiveDateType&&i&&a&&!!this.selectHour.length&&!!this.selectMinute.length&&!this.isUnderTime&&!this.isOverTime&&e}};o([d({default:!1})],r.prototype,"parseInitial",2);o([d()],r.prototype,"currentJsDate",2);o([d()],r.prototype,"effectiveDateTime",2);o([d()],r.prototype,"isAppValidate",2);o([l("currentJsDate",{immediate:!0})],r.prototype,"onCurrentJsDateChanged",1);o([l("datePicker")],r.prototype,"onDatePickerChanged",1);o([l("dateText")],r.prototype,"onDateTextChanged",1);o([l("selectHour")],r.prototype,"onSelectHourChanged",1);o([l("selectMinute")],r.prototype,"onSelectMinuteChanged",1);o([l("selectPeriod")],r.prototype,"onSelectPeriodChanged",1);o([l("effectiveDateType")],r.prototype,"onEffectiveDateTypeChanged",1);o([h("isFutureEffective")],r.prototype,"emitIsFutureEffective",1);o([h("effectiveDate")],r.prototype,"emitEffectiveDate",1);o([h("valid")],r.prototype,"emitValid",1);r=o([C({components:{DatePicker:P}})],r);var A=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-card",{attrs:{id:"effective-date-time-box",flat:""}},[e("v-radio-group",{staticClass:"pt-0 mt-0",attrs:{column:""},model:{value:t.effectiveDateType,callback:function(i){t.effectiveDateType=i},expression:"effectiveDateType"}},[e("v-radio",{attrs:{label:"Immediate (date and time of filing)",value:t.EffectiveDateTypes.IMMEDIATE}}),e("v-radio",{attrs:{label:"A date and time in the future",value:t.EffectiveDateTypes.FUTURE_EFFECTIVE}})],1),e("v-form",{ref:"form",staticClass:"date-time-selectors"},[e("DatePicker",{ref:"datePickerRef",attrs:{title:"Date","nudge-right":"40",inputRules:t.dateRules,disablePicker:t.effectiveDateType!==t.EffectiveDateTypes.FUTURE_EFFECTIVE,minDate:t.dateToYyyyMmDd(t.minDate),maxDate:t.dateToYyyyMmDd(t.maxDate)},on:{emitDate:function(i){t.dateText=i},emitCancel:function(i){t.dateText=""}}}),e("v-row",[e("v-col",{attrs:{cols:"12",sm:"6",md:"3"}},[e("v-combobox",{ref:"hourSelector",staticClass:"mr-1",attrs:{id:"hour-selector",filled:"",label:"Hour",items:t.hours,disabled:!t.isFutureEffective,rules:t.hourRules},model:{value:t.selectHour,callback:function(i){t.selectHour=i},expression:"selectHour"}})],1),e("span",{staticClass:"time-colon",class:{disabled:!t.isFutureEffective}},[t._v(":")]),e("v-col",{attrs:{cols:"12",sm:"6",md:"3"}},[e("v-combobox",{ref:"minuteSelector",staticClass:"ml-1",attrs:{id:"minute-selector",filled:"",label:"Minute",items:t.minutes,disabled:!t.isFutureEffective,rules:t.minuteRules},model:{value:t.selectMinute,callback:function(i){t.selectMinute=i},expression:"selectMinute"}})],1),e("v-col",{attrs:{cols:"12",sm:"6",md:"3"}},[e("v-select",{attrs:{id:"period-selector",filled:"",items:t.timePeriod,disabled:!t.isFutureEffective},model:{value:t.selectPeriod,callback:function(i){t.selectPeriod=i},expression:"selectPeriod"}})],1),e("v-col",{staticClass:"label-col",attrs:{cols:"12",sm:"6",md:"3"}},[e("span",{staticClass:"time-zone-label",class:{disabled:!t.isFutureEffective}},[t._v("Pacific time")])])],1),t.isFutureEffective&&t.dateText&&t.selectHour.length>0&&t.selectMinute.length>0?e("v-row",[e("v-col",{staticClass:"validation-alert"},[t.isUnderTime?e("p",{staticClass:"validation-alert-msg"},[t._v(" The time must be at least "+t._s(t.dateToPacificTime(t.minDate))+" for the selected date ")]):t._e(),t.isOverTime?e("p",{staticClass:"validation-alert-msg"},[t._v(" The time must be at most "+t._s(t.dateToPacificTime(t.maxDate))+" for the selected date ")]):t._e()])],1):t._e()],1)],1)},w=[],g=I(r,A,w,!1,null,"8731f544",null,null);const R=g.exports;g.exports.__docgenInfo={description:`This is a local, minimal mixin containing only the methods needed for the shared +var _=Object.defineProperty;var x=(n,t,e)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(x(n,typeof t!="symbol"?t+"":t,e),e);import{V as v}from"./vue.esm-b1e57a2f.js";import{m as b,C,P as u,E as h,n as I}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as l}from"./Watch-62f8b699.js";import{D as P}from"./DatePicker-6653e1e3.js";import{D as M}from"./validation-mixin-e5d1d708.js";import{V}from"./vuetify-b9fb25b0.js";import"./lodash-f6b38868.js";import"./_commonjsHelpers-de833af9.js";var m=(n=>(n.FUTURE_EFFECTIVE="futureEffective",n.IMMEDIATE="immediate",n))(m||{}),S=Object.defineProperty,U=Object.getOwnPropertyDescriptor,o=(n,t,e,i)=>{for(var a=i>1?void 0:i?U(t,e):t,c=n.length-1,f;c>=0;c--)(f=n[c])&&(a=(i?f(t,e,a):f(a))||a);return i&&a&&S(t,e,a),a};let r=class extends b(M){constructor(){super(...arguments);s(this,"MIN_DIFF_MINUTES",3);s(this,"MAX_DIFF_DAYS",10);s(this,"$refs");s(this,"parseInitial");s(this,"currentJsDate");s(this,"effectiveDateTime");s(this,"isAppValidate");s(this,"EffectiveDateTypes",m);s(this,"isImmediate",!1);s(this,"isFutureEffective",!1);s(this,"minDate",null);s(this,"maxDate",null);s(this,"effectiveDateType",null);s(this,"datePicker","");s(this,"dateText","");s(this,"selectHour",[]);s(this,"selectMinute",[]);s(this,"selectPeriod","am");s(this,"hours",[...Array(12).keys()].map(e=>(e+1).toString()));s(this,"minutes",[...Array(60).keys()].map(e=>e.toString().padStart(2,"0")));s(this,"timePeriod",["am","pm"])}get dateRules(){if(this.isFutureEffective&&this.isAppValidate){const e=this.dateToPacificDate(this.minDate,!0),i=this.dateToPacificDate(this.maxDate,!0);return[a=>!!a||"Select date",a=>this.isValidDateRange(a)||`Date must be between ${e} and ${i}`]}return[]}isValidDateRange(e){let i=new Date(e);i=new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate());const a=new Date(this.minDate.getFullYear(),this.minDate.getMonth(),this.minDate.getDate()),c=new Date(this.maxDate.getFullYear(),this.maxDate.getMonth(),this.maxDate.getDate());return i>=a&&i<=c}get hourRules(){return this.isFutureEffective&&this.isAppValidate?[e=>e.length>0||"Select hour",e=>/^([1-9]|1[012])$/.test(e)||""]:[]}get minuteRules(){return this.isFutureEffective&&this.isAppValidate?[e=>e.length>0||"Select minute",e=>/^([0-5]?[0-9])$/.test(e)||""]:[]}get isUnderTime(){if(this.effectiveDateTime.effectiveDate){const e=new Date(this.effectiveDateTime.effectiveDate);return e.setSeconds(59,999),e.getTime()this.maxDate.getTime()}return!1}mounted(){this.parseInitial&&this.parseInitialEffectiveDateTime()}parseInitialEffectiveDateTime(){this.isFutureEffective=this.effectiveDateTime.isFutureEffective,this.isFutureEffective===!0?this.effectiveDateType=m.FUTURE_EFFECTIVE:this.isFutureEffective===!1?this.effectiveDateType=m.IMMEDIATE:this.effectiveDateType=null;const e=this.effectiveDateTime.effectiveDate,i=e&&new Date(e);if(i){let a=i.getHours();const c=i.getMinutes(),f=a<12?"am":"pm";a>12?a-=12:a===0&&(a=12),this.dateText=this.dateToYyyyMmDd(i),this.selectHour=[a.toString()],this.selectMinute=[c.toString().padStart(2,"0")],this.selectPeriod=f}}async constructAndUpdate(){await v.nextTick();const e=this.$refs.datePickerRef.validateForm(),i=this.$refs.form.validate();if(e&&i&&this.selectHour.length&&this.selectMinute.length){const a=+this.dateText.slice(0,4),c=+this.dateText.slice(5,7)-1,f=+this.dateText.slice(8,10);let p=+this.selectHour;const y=+this.selectMinute;this.selectPeriod==="am"&&+this.selectHour==12&&(p=0),this.selectPeriod==="pm"&&+this.selectHour!=12&&(p+=12);const F=this.createUtcDate(a,c,f,p,y);this.emitEffectiveDate(F)}this.emitValid()}onCurrentJsDateChanged(e){if(e){const i=new Date;i.setTime(e.getTime()+this.MIN_DIFF_MINUTES*60*1e3),this.minDate=i;const a=new Date;a.setTime(e.getTime()+this.MAX_DIFF_DAYS*24*60*60*1e3),this.maxDate=a,this.emitValid()}}onDatePickerChanged(e){this.dateText=e}onDateTextChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onSelectHourChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onSelectMinuteChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onSelectPeriodChanged(e){this.isFutureEffective&&this.constructAndUpdate()}onEffectiveDateTypeChanged(e){this.isImmediate=e===m.IMMEDIATE,this.isFutureEffective=e===m.FUTURE_EFFECTIVE,this.isImmediate&&(this.datePicker="",this.dateText="",this.selectHour=[],this.selectMinute=[],this.selectPeriod="am",this.$refs.datePickerRef.clearDate()),this.emitIsFutureEffective(this.isFutureEffective),this.emitEffectiveDate(null),this.emitValid()}emitIsFutureEffective(e){}emitEffectiveDate(e){}async emitValid(){const e=this.isFutureEffective?!!this.dateText:!0;await v.nextTick();const i=this.$refs.datePickerRef.validateForm(),a=this.$refs.form.validate();return this.isImmediate||!!this.effectiveDateType&&i&&a&&!!this.selectHour.length&&!!this.selectMinute.length&&!this.isUnderTime&&!this.isOverTime&&e}};o([u({default:!1})],r.prototype,"parseInitial",2);o([u()],r.prototype,"currentJsDate",2);o([u()],r.prototype,"effectiveDateTime",2);o([u()],r.prototype,"isAppValidate",2);o([l("currentJsDate",{immediate:!0})],r.prototype,"onCurrentJsDateChanged",1);o([l("datePicker")],r.prototype,"onDatePickerChanged",1);o([l("dateText")],r.prototype,"onDateTextChanged",1);o([l("selectHour")],r.prototype,"onSelectHourChanged",1);o([l("selectMinute")],r.prototype,"onSelectMinuteChanged",1);o([l("selectPeriod")],r.prototype,"onSelectPeriodChanged",1);o([l("effectiveDateType")],r.prototype,"onEffectiveDateTypeChanged",1);o([h("isFutureEffective")],r.prototype,"emitIsFutureEffective",1);o([h("effectiveDate")],r.prototype,"emitEffectiveDate",1);o([h("valid")],r.prototype,"emitValid",1);r=o([C({components:{DatePicker:P}})],r);var A=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("v-card",{attrs:{id:"effective-date-time-box",flat:""}},[e("v-radio-group",{staticClass:"pt-0 mt-0",attrs:{column:""},model:{value:t.effectiveDateType,callback:function(i){t.effectiveDateType=i},expression:"effectiveDateType"}},[e("v-radio",{attrs:{label:"Immediate (date and time of filing)",value:t.EffectiveDateTypes.IMMEDIATE}}),e("v-radio",{attrs:{label:"A date and time in the future",value:t.EffectiveDateTypes.FUTURE_EFFECTIVE}})],1),e("v-form",{ref:"form",staticClass:"date-time-selectors"},[e("DatePicker",{ref:"datePickerRef",attrs:{title:"Date","nudge-right":"40",inputRules:t.dateRules,disablePicker:t.effectiveDateType!==t.EffectiveDateTypes.FUTURE_EFFECTIVE,minDate:t.dateToYyyyMmDd(t.minDate),maxDate:t.dateToYyyyMmDd(t.maxDate)},on:{emitDate:function(i){t.dateText=i},emitCancel:function(i){t.dateText=""}}}),e("v-row",[e("v-col",{attrs:{cols:"12",sm:"6",md:"3"}},[e("v-combobox",{ref:"hourSelector",staticClass:"mr-1",attrs:{id:"hour-selector",filled:"",label:"Hour",items:t.hours,disabled:!t.isFutureEffective,rules:t.hourRules},model:{value:t.selectHour,callback:function(i){t.selectHour=i},expression:"selectHour"}})],1),e("span",{staticClass:"time-colon",class:{disabled:!t.isFutureEffective}},[t._v(":")]),e("v-col",{attrs:{cols:"12",sm:"6",md:"3"}},[e("v-combobox",{ref:"minuteSelector",staticClass:"ml-1",attrs:{id:"minute-selector",filled:"",label:"Minute",items:t.minutes,disabled:!t.isFutureEffective,rules:t.minuteRules},model:{value:t.selectMinute,callback:function(i){t.selectMinute=i},expression:"selectMinute"}})],1),e("v-col",{attrs:{cols:"12",sm:"6",md:"3"}},[e("v-select",{attrs:{id:"period-selector",filled:"",items:t.timePeriod,disabled:!t.isFutureEffective},model:{value:t.selectPeriod,callback:function(i){t.selectPeriod=i},expression:"selectPeriod"}})],1),e("v-col",{staticClass:"label-col",attrs:{cols:"12",sm:"6",md:"3"}},[e("span",{staticClass:"time-zone-label",class:{disabled:!t.isFutureEffective}},[t._v("Pacific time")])])],1),t.isFutureEffective&&t.dateText&&t.selectHour.length>0&&t.selectMinute.length>0?e("v-row",[e("v-col",{staticClass:"validation-alert"},[t.isUnderTime?e("p",{staticClass:"validation-alert-msg"},[t._v(" The time must be at least "+t._s(t.dateToPacificTime(t.minDate))+" for the selected date ")]):t._e(),t.isOverTime?e("p",{staticClass:"validation-alert-msg"},[t._v(" The time must be at most "+t._s(t.dateToPacificTime(t.maxDate))+" for the selected date ")]):t._e()])],1):t._e()],1)],1)},w=[],g=I(r,A,w,!1,null,"8731f544",null,null);const R=g.exports;g.exports.__docgenInfo={description:`This is a local, minimal mixin containing only the methods needed for the shared components when they run within this project (ie, in Storybook). When imported into an app project, the shared components should use the mixins -local to that project.`,tags:{},exportName:"default",displayName:"EffectiveDateTime",props:[{name:"parseInitial",tags:{},description:"Whether to parse the initial effective date-time into the controls.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"currentJsDate",tags:{},description:"Current JS date, expected to be passed in periodically.",type:{name:"Date"}},{name:"effectiveDateTime",tags:{},description:"Effective Date Time object, for initial config.",type:{name:"EffectiveDateTimeIF"}},{name:"isAppValidate",tags:{},description:"Whether to perform validation.",type:{name:"boolean"}}],events:[{name:"isFutureEffective"},{name:"effectiveDate"},{name:"valid"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/effective-date-time/EffectiveDateTime.vue","/home/severin/repos/bcrs-shared-components/src/mixins/date-mixin.ts"]};const q={title:"component/EffectiveDateTime"},k=(n,{argTypes:t})=>({vuetify:new V({iconfont:"mdi"}),props:Object.keys(t),components:{EffectiveDateTime:R},template:''}),u=k.bind({});u.args={parseInitial:!0,currentJsDate:new Date,effectiveDateTime:{valid:!1,isFutureEffective:null,effectiveDate:null},isAppValidate:!1};var D,T,E;u.parameters={...u.parameters,docs:{...(D=u.parameters)==null?void 0:D.docs,source:{originalSource:`(args, { +local to that project.`,tags:{},exportName:"default",displayName:"EffectiveDateTime",props:[{name:"parseInitial",tags:{},description:"Whether to parse the initial effective date-time into the controls.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"currentJsDate",tags:{},description:"Current JS date, expected to be passed in periodically.",type:{name:"Date"}},{name:"effectiveDateTime",tags:{},description:"Effective Date Time object, for initial config.",type:{name:"EffectiveDateTimeIF"}},{name:"isAppValidate",tags:{},description:"Whether to perform validation.",type:{name:"boolean"}}],events:[{name:"isFutureEffective"},{name:"effectiveDate"},{name:"valid"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/effective-date-time/EffectiveDateTime.vue","/home/kdeodhar/gitRepo/bcrs-shared-components/src/mixins/date-mixin.ts"]};const q={title:"component/EffectiveDateTime"},k=(n,{argTypes:t})=>({vuetify:new V({iconfont:"mdi"}),props:Object.keys(t),components:{EffectiveDateTime:R},template:''}),d=k.bind({});d.args={parseInitial:!0,currentJsDate:new Date,effectiveDateTime:{valid:!1,isFutureEffective:null,effectiveDate:null},isAppValidate:!1};var D,T,E;d.parameters={...d.parameters,docs:{...(D=d.parameters)==null?void 0:D.docs,source:{originalSource:`(args, { argTypes }) => ({ vuetify: new Vuetify({ @@ -13,5 +13,5 @@ local to that project.`,tags:{},exportName:"default",displayName:"EffectiveDateT EffectiveDateTime }, template: '' // $props comes from args below -})`,...(E=(T=u.parameters)==null?void 0:T.docs)==null?void 0:E.source}}};const B=["Default"];export{u as Default,B as __namedExportsOrder,q as default}; -//# sourceMappingURL=EffectiveDateTime.stories-e7f8de6c.js.map +})`,...(E=(T=d.parameters)==null?void 0:T.docs)==null?void 0:E.source}}};const B=["Default"];export{d as Default,B as __namedExportsOrder,q as default}; +//# sourceMappingURL=EffectiveDateTime.stories-71eb1d6f.js.map diff --git a/docs/assets/EffectiveDateTime.stories-e7f8de6c.js.map b/docs/assets/EffectiveDateTime.stories-71eb1d6f.js.map similarity index 99% rename from docs/assets/EffectiveDateTime.stories-e7f8de6c.js.map rename to docs/assets/EffectiveDateTime.stories-71eb1d6f.js.map index dbbb919e..cb4dcc9a 100644 --- a/docs/assets/EffectiveDateTime.stories-e7f8de6c.js.map +++ b/docs/assets/EffectiveDateTime.stories-71eb1d6f.js.map @@ -1 +1 @@ -{"version":3,"file":"EffectiveDateTime.stories-e7f8de6c.js","sources":["../../src/enums/effective-date-types.ts","../../src/components/effective-date-time/EffectiveDateTime.vue"],"sourcesContent":["export enum EffectiveDateTypes {\n FUTURE_EFFECTIVE = 'futureEffective',\n IMMEDIATE = 'immediate'\n}\n","\n\n\n\n\n"],"names":["EffectiveDateTypes","EffectiveDateTime","Mixins","DateMixin","__publicField","num","minDateStr","maxDateStr","v","date","minDay","maxDay","effectiveDate","hour","minute","period","Vue","isDateValid","isTimeValid","year","month","hours","minutes","dateTime","val","minDate","maxDate","validDateText","__decorateClass","Prop","Watch","Emit","Component","DatePicker"],"mappings":"ohBAAY,IAAAA,GAAAA,IACVA,EAAA,iBAAmB,kBACnBA,EAAA,UAAY,YAFFA,IAAAA,GAAA,CAAA,CAAA,8LC4IZ,IAAAC,EAAA,cAAAC,EAAAC,CAAA,CAAA,CAAA,kCACAC,EAAA,wBAAA,GAC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AmPA,UAAA,sBAAA,CAAA,EAOA2B,EAAA,CADAE,EAAA,cAAA,CAAA,EAzPA7B,EA0PA,UAAA,wBAAA,CAAA,EAOA2B,EAAA,CADAE,EAAA,cAAA,CAAA,EAhQA7B,EAiQA,UAAA,wBAAA,CAAA,EAOA2B,EAAA,CADAE,EAAA,mBAAA,CAAA,EAvQA7B,EAwQA,UAAA,6BAAA,CAAA,EAqBA2B,EAAA,CADAG,EAAA,mBAAA,CAAA,EA5RA9B,EA6RA,UAAA,wBAAA,CAAA,EAGA2B,EAAA,CADAG,EAAA,eAAA,CAAA,EA/RA9B,EAgSA,UAAA,oBAAA,CAAA,EAGA2B,EAAA,CADAG,EAAA,OAAA,CAAA,EAlSA9B,EAmSA,UAAA,YAAA,CAAA,EAnSAA,EAAA2B,EAAA,CALAI,EAAA,CACA,WAAA,CACA,WAAAC,CACA,CAAA,CACA,CAAA,EACAhC,CAAA;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"EffectiveDateTime.stories-71eb1d6f.js","sources":["../../src/enums/effective-date-types.ts","../../src/components/effective-date-time/EffectiveDateTime.vue"],"sourcesContent":["export enum EffectiveDateTypes {\n FUTURE_EFFECTIVE = 'futureEffective',\n IMMEDIATE = 'immediate'\n}\n","\n\n\n\n\n"],"names":["EffectiveDateTypes","EffectiveDateTime","Mixins","DateMixin","__publicField","num","minDateStr","maxDateStr","v","date","minDay","maxDay","effectiveDate","hour","minute","period","Vue","isDateValid","isTimeValid","year","month","hours","minutes","dateTime","val","minDate","maxDate","validDateText","__decorateClass","Prop","Watch","Emit","Component","DatePicker"],"mappings":"ohBAAY,IAAAA,GAAAA,IACVA,EAAA,iBAAmB,kBACnBA,EAAA,UAAY,YAFFA,IAAAA,GAAA,CAAA,CAAA,8LC4IZ,IAAAC,EAAA,cAAAC,EAAAC,CAAA,CAAA,CAAA,kCACAC,EAAA,wBAAA,GACAA,EAAA,qBAAA,IAGAA,EAAA,cAQAA,EAAA,qBAGAA,EAAA,s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AAA,EAzPA7B,EA0PA,UAAA,wBAAA,CAAA,EAOA2B,EAAA,CADAE,EAAA,cAAA,CAAA,EAhQA7B,EAiQA,UAAA,wBAAA,CAAA,EAOA2B,EAAA,CADAE,EAAA,mBAAA,CAAA,EAvQA7B,EAwQA,UAAA,6BAAA,CAAA,EAqBA2B,EAAA,CADAG,EAAA,mBAAA,CAAA,EA5RA9B,EA6RA,UAAA,wBAAA,CAAA,EAGA2B,EAAA,CADAG,EAAA,eAAA,CAAA,EA/RA9B,EAgSA,UAAA,oBAAA,CAAA,EAGA2B,EAAA,CADAG,EAAA,OAAA,CAAA,EAlSA9B,EAmSA,UAAA,YAAA,CAAA,EAnSAA,EAAA2B,EAAA,CALAI,EAAA,CACA,WAAA,CACA,WAAAC,CACA,CAAA,CACA,CAAA,EACAhC,CAAA;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/ExpandableHelp.stories-12517aed.js b/docs/assets/ExpandableHelp.stories-12517aed.js deleted file mode 100644 index 1cd55a4d..00000000 --- a/docs/assets/ExpandableHelp.stories-12517aed.js +++ /dev/null @@ -1,18 +0,0 @@ -var h=Object.defineProperty;var v=(a,e,l)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[e]=l;var c=(a,e,l)=>(v(a,typeof e!="symbol"?e+"":e,l),l);import{V as g}from"./vue.esm-b1e57a2f.js";import{C as u,P as x,n as f}from"./_plugin-vue2_normalizer-b11a0120.js";var H=Object.defineProperty,y=Object.getOwnPropertyDescriptor,b=(a,e,l,t)=>{for(var p=t>1?void 0:t?y(e,l):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(p=(t?r(e,l,p):r(p))||p);return t&&p&&H(e,l,p),p};let s=class extends g{constructor(){super(...arguments);c(this,"helpToggle",!1);c(this,"helpLabel")}};b([x({default:"Show Help"})],s.prototype,"helpLabel",2);s=b([u({})],s);var T=function(){var e=this,l=e._self._c;return e._self._setupProxy,l("div",{staticClass:"expandable-help"},[l("div",{staticClass:"help-btn top mb-8"},[l("v-icon",{attrs:{color:"primary"}},[e._v(" mdi-help-circle-outline ")]),l("span",{staticClass:"pl-2 help-label",on:{click:function(t){e.helpToggle=!e.helpToggle}}},[e._v(e._s(e.helpToggle?"Hide Help":e.helpLabel))])],1),l("v-expand-transition",[l("div",{directives:[{name:"show",rawName:"v-show",value:e.helpToggle,expression:"helpToggle"}],staticClass:"help-section pa-6 my-3 mb-8"},[e._t("content"),l("div",{staticClass:"help-btn bottom text-right d-flex",on:{click:function(t){e.helpToggle=!e.helpToggle}}},[e._v(" Hide Help ")])],2)])],1)},w=[],_=f(s,T,w,!1,null,"326bad48",null,null);const C=_.exports;_.exports.__docgenInfo={exportName:"default",displayName:"ExpandableHelp",description:"",tags:{},props:[{name:"helpLabel",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'Show Help'"}}],slots:[{name:"content"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/expandable-help/ExpandableHelp.vue"]};const S={title:"component/ExpandableHelp"},E=(a,{argTypes:e})=>({props:Object.keys(e),components:{ExpandableHelp:C},template:` - - - ({ - props: Object.keys(argTypes), - components: { - ExpandableHelp - }, - // $props comes from args below - template: \` - - - \n
\n \n \n mdi-help-circle-outline\n \n {{ !helpToggle ? helpLabel : 'Hide Help' }}\n
\n\n \n \n \n \n Hide Help\n \n \n \n \n\n\n\n\n\n"],"names":["ExpandableHelp","Vue","__publicField","__decorateClass","Prop","Component"],"mappings":"0dAoCA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,kBAAA,IAEAA,EAAA,kBACA,EADAC,EAAA,CAAAC,EAAA,CAAA,QAAA,YAAA,CAAA,EAHAJ,EAGA,UAAA,YAAA,CAAA,EAHAA,EAAAG,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAL,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/ExpandableHelp.stories-34261a19.css b/docs/assets/ExpandableHelp.stories-34261a19.css new file mode 100644 index 00000000..1f8372d9 --- /dev/null +++ b/docs/assets/ExpandableHelp.stories-34261a19.css @@ -0,0 +1 @@ +.help-btn[data-v-d6b17343],.help-label[data-v-d6b17343]{cursor:pointer}.help-btn[data-v-d6b17343]{color:#1669bb;text-decoration:underline}.v-icon[data-v-d6b17343]{margin-top:-3px}.help-section[data-v-d6b17343]{border-top:1px dashed #495057;border-bottom:1px dashed #495057} diff --git a/docs/assets/ExpandableHelp.stories-80e68528.js b/docs/assets/ExpandableHelp.stories-80e68528.js new file mode 100644 index 00000000..1b36a28c --- /dev/null +++ b/docs/assets/ExpandableHelp.stories-80e68528.js @@ -0,0 +1,18 @@ +var b=Object.defineProperty;var v=(a,e,l)=>e in a?b(a,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[e]=l;var c=(a,e,l)=>(v(a,typeof e!="symbol"?e+"":e,l),l);import{V as g}from"./vue.esm-b1e57a2f.js";import{C as u,P as f,n as x}from"./_plugin-vue2_normalizer-b11a0120.js";var H=Object.defineProperty,y=Object.getOwnPropertyDescriptor,_=(a,e,l,t)=>{for(var p=t>1?void 0:t?y(e,l):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(p=(t?r(e,l,p):r(p))||p);return t&&p&&H(e,l,p),p};let s=class extends g{constructor(){super(...arguments);c(this,"helpLabel");c(this,"helpToggle",!1)}};_([f({default:"Show Help"})],s.prototype,"helpLabel",2);s=_([u({})],s);var T=function(){var e=this,l=e._self._c;return e._self._setupProxy,l("div",{staticClass:"expandable-help"},[l("div",{staticClass:"help-btn top",on:{click:function(t){e.helpToggle=!e.helpToggle}}},[l("v-icon",{attrs:{color:"primary"}},[e._v(" mdi-help-circle-outline ")]),l("span",{staticClass:"pl-2 help-label"},[e._v(e._s(e.helpToggle?"Hide Help":e.helpLabel))])],1),l("v-expand-transition",[l("div",{directives:[{name:"show",rawName:"v-show",value:e.helpToggle,expression:"helpToggle"}],staticClass:"help-section mt-3 pa-6"},[e._t("content"),l("div",{staticClass:"d-flex justify-end"},[l("div",{staticClass:"help-btn bottom",on:{click:function(t){e.helpToggle=!e.helpToggle}}},[l("span",[e._v("Hide Help")])])])],2)])],1)},C=[],h=x(s,T,C,!1,null,"d6b17343",null,null);const w=h.exports;h.exports.__docgenInfo={exportName:"default",displayName:"ExpandableHelp",description:"",tags:{},props:[{name:"helpLabel",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'Show Help'"}}],slots:[{name:"content"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/expandable-help/ExpandableHelp.vue"]};const L={title:"component/ExpandableHelp"},E=(a,{argTypes:e})=>({props:Object.keys(e),components:{ExpandableHelp:w},template:` + + + ({ + props: Object.keys(argTypes), + components: { + ExpandableHelp + }, + // $props comes from args below + template: \` + + + \n
\n \n \n \n mdi-help-circle-outline\n \n {{ !helpToggle ? helpLabel : 'Hide Help' }}\n
\n\n \n \n \n \n\n \n
\n \n Hide Help\n
\n \n \n
\n \n\n\n\n\n\n"],"names":["ExpandableHelp","Vue","__publicField","__decorateClass","Prop","Component"],"mappings":"0dAwCA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,kBAEAA,EAAA,kBAAA,IACA,EAHAC,EAAA,CAAAC,EAAA,CAAA,QAAA,YAAA,CAAA,EADAJ,EACA,UAAA,YAAA,CAAA,EADAA,EAAAG,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAL,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/ExpandableHelp.stories-92f45370.css b/docs/assets/ExpandableHelp.stories-92f45370.css deleted file mode 100644 index b32230bc..00000000 --- a/docs/assets/ExpandableHelp.stories-92f45370.css +++ /dev/null @@ -1 +0,0 @@ -.help-label[data-v-326bad48],.help-btn[data-v-326bad48]{cursor:pointer}.help-btn[data-v-326bad48]{color:#1669bb}.v-icon[data-v-326bad48]{margin-top:-3px}.help-section[data-v-326bad48]{border-top:1px dashed #495057;border-bottom:1px dashed #495057}.help-btn.bottom[data-v-326bad48]{font-size:#1669bb;text-decoration:underline;display:flex;direction:rtl} diff --git a/docs/assets/FeeSummary.stories-84e7dc79.js b/docs/assets/FeeSummary.stories-84e7dc79.js deleted file mode 100644 index 1b5832e6..00000000 --- a/docs/assets/FeeSummary.stories-84e7dc79.js +++ /dev/null @@ -1,18 +0,0 @@ -var W=Object.defineProperty;var Y=(e,t,r)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var n=(e,t,r)=>(Y(e,typeof t!="symbol"?t+"":t,r),r);import{V as d}from"./vue.esm-b1e57a2f.js";import{C as L,P as l,E as U,n as S}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as j}from"./Watch-62f8b699.js";import{A as T}from"./index-2b7fa976.js";import{C as q}from"./corp-type-module-8edd1173.js";import"./_commonjsHelpers-de833af9.js";var F=(e=>(e[e.BACK=0]="BACK",e[e.CANCEL=1]="CANCEL",e[e.CONFIRM=2]="CONFIRM",e[e.SAVE_RESUME_LATER=3]="SAVE_RESUME_LATER",e))(F||{}),D=(e=>(e.ADDRESS_CHANGE_BC="BCADD",e.ADDRESS_CHANGE_OT="OTADD",e.AFFIDAVIT="AFDVT",e.ALTERATION="ALTER",e.ALTERATION_BC_TO_ULC="NOALU",e.ANNUAL_REPORT_BC="BCANN",e.ANNUAL_REPORT_OT="OTANN",e.CHANGE_OF_REGISTRATION="FMCHANGE",e.CONSENT_CONTINUATION_OUT="CONTO",e.CONTINUATION_OUT="COUTI",e.CORRECTION="CRCTN",e.DIRECTOR_CHANGE_BC="BCCDR",e.DIRECTOR_CHANGE_OT="OTCDR",e.DISSOLUTION_ADMINISTRATIVE="DIS_ADMIN",e.DISSOLUTION_COURT_ORDERED_LIQUIDATION="DIS_COLQD",e.DISSOLUTION_INVOLUNTARY="DIS_INVOL",e.DISSOLUTION_RESTORED_IN_ERROR="DIS_RSTR",e.DISSOLUTION_VOLUNTARY="DIS_VOL",e.DISSOLUTION_VOLUNTARY_LIQUIDATION="DIS_LQD",e.FM_CHANGE="FMCHANGE",e.FM_CONVERSION="FMCONV",e.FM_CORRECTION="FMCORR",e.FREE_DIRECTOR_CHANGE_BC="BCFDR",e.FREE_DIRECTOR_CHANGE_OT="OTFDR",e.INCORPORATION_BC="BCINC",e.INCORPORATION_BEN="BCINC",e.INCORPORATION_CC="BCINC",e.INCORPORATION_CP="OTINC",e.INCORPORATION_ULC="BCINC",e.REGISTRATION_GP="FRREG",e.REGISTRATION_SP="FRREG",e.RESTORATION_FULL="RESTF",e.RESTORATION_LIMITED="RESTL",e.RESTORATION_LTD_EXTEND="RESXL",e.RESTORATION_LTD_TO_FULL="RESXF",e.SPECIAL_RESOLUTION="SPRLN",e.SPECIAL_RESOLUTION_NAME_CHANGE="OTCON",e))(D||{}),_=(e=>(e.KeyCloakToken="KEYCLOAK_TOKEN",e.KeyCloakRefreshToken="KEYCLOAK_REFRESH_TOKEN",e.KeyCloakIdToken="KEYCLOAK_ID_TOKEN",e.ApiConfigKey="AUTH_API_CONFIG",e.PreventStorageSync="PREVENT_STORAGE_SYNC",e.LaunchDarklyFlags="LD_FLAGS",e.CurrentAccount="CURRENT_ACCOUNT",e.AuthApiUrl="AUTH_API_URL",e.AuthWebUrl="AUTH_WEB_URL",e.StatusApiUrl="STATUS_API_URL",e.WhatsNew="WHATS_NEW",e.SessionSynced="SESSION_SYNCED",e.RegistryHomeUrl="REGISTRY_HOME_URL",e.NameRequestUrl="NAME_REQUEST_URL",e.PprWebUrl="PPR_WEB_URL",e.SiteminderLogoutUrl="SITEMINDER_LOGOUT_URL",e.BusinessIdentifierKey="BUSINESS_ID",e.ExtraProvincialUser="EXTRAPROVINCIAL_USER",e.InvitationToken="INV_TOKEN",e.PaginationOptions="PAGINATION_OPTIONS",e.PaginationNumberOfItems="PAGINATION_NUMBER_OF_ITEMS",e.OrgSearchFilter="ORG_SEARCH_FILTER",e.PendingAccountsSearchFilter="PENDING_ACCOUNTS_SEARCH_FILTER",e.RejectedAccountsSearchFilter="REJECTED_ACCOUNTS_SEARCH_FILTER",e.FasWebUrl="FAS_WEB_URL",e.AffidavitNeeded="AFFIDAVIT_NEEDED",e.GOVN_USER="AUTH_GOVN_USER",e.PayApiUrl="PAY_API_URL",e))(_||{});function u(e){return e?e.trim().replace(/\/+$/,""):""}class O{static addToSession(t,r){sessionStorage.setItem(t,r)}static getFromSession(t){return sessionStorage.getItem(t)}static removeFromSession(t){sessionStorage.removeItem(t)}static clearSession(){sessionStorage.clear()}static getStatusAPIUrl(){return u(sessionStorage.getItem(_.StatusApiUrl)||"")}static getAuthAPIUrl(){return u(sessionStorage.getItem(_.AuthApiUrl)||"")}static getAuthContextPath(){return u(sessionStorage.getItem(_.AuthWebUrl)||"")}static getRegistryHomeURL(){return u(sessionStorage.getItem(_.RegistryHomeUrl)||"")}static getNameRequestURL(){return u(sessionStorage.getItem(_.NameRequestUrl)||"")}static getPprWebURL(){return u(sessionStorage.getItem(_.PprWebUrl)||"")}static setKeycloakConfigUrl(t){this.keycloakConfigUrl=t}static getKeycloakConfigUrl(){return this.keycloakConfigUrl}}n(O,"keycloakConfigUrl","");const A={getFee(e,t){const r=O.getFromSession(_.KeyCloakToken),a=JSON.parse(O.getFromSession(_.CurrentAccount)||"{}").id||0;e.length<1&&Promise.resolve();const s=[];for(const o of e){o.filingTypeCode||Promise.resolve();const i=z(o,t);s.push(T.get(i,{headers:{Authorization:`Bearer ${r}`,"Account-Id":a}}))}return T.all(s).then(T.spread((...o)=>o.map(i=>i.data).map(i=>{const E=e.find(H=>H.filingTypeCode===i.filingTypeCode),x=E&&E.filingDescription?E.filingDescription:i.filingType,w=i.filingFees,G=i.priorityFees||0,$=i.futureEffectiveFees||0,k=i.serviceFees||0,B=i.total||0;return{fee:w,filingType:x,priorityFees:G,futureEffectiveFees:$,serviceFees:k,total:B}}))).catch(o=>{switch(o.response&&o.response.status){case 400:console.log("%c FeeModule-ERROR: Probably fee code mismatch %s","color: red; font-size: 13px",JSON.stringify(e));break;case 500:console.log("%c FeeModule-ERROR: Probably invalid Token %s","color: red; font-size: 13px",JSON.stringify(e));break;default:console.log("%c FeeModule-ERROR: Probably unknown Error %s","color: red; font-size: 13px",JSON.stringify(e))}return[]})}},z=(e,t)=>{const r=[];e.waiveFees&&r.push(`waiveFees=${!!e.waiveFees}`),e.priority&&r.push(`priority=${!!e.priority}`),e.futureEffective&&r.push(`futureEffective=${!!e.futureEffective}`);let a=`${t}fees/${e.entityType}/${e.filingTypeCode}`;return r.length&&(a+=`?${r.join("&")}`),a};var J=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,m=(e,t,r,a)=>{for(var s=a>1?void 0:a?Q(t,r):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(s=(a?i(t,r,s):i(s))||s);return a&&s&&J(t,r,s),s};let p=class extends d{constructor(){super(...arguments);n(this,"filingData");n(this,"payURL");n(this,"filingLabel");n(this,"fees",[]);n(this,"fetchError","")}mounted(){A.getFee(this.filingData,this.payURL).then(r=>{this.fetchError="",this.fees=r||[],this.fees=this.fees.filter(a=>this.totalFilingFees>0&&a.fee||this.totalFilingFees===0),this.emitTotalFee(this.totalFilingFees)}).catch(r=>{this.fetchError="Error fetching fees"+r})}get totalFilingFees(){return this.fees.reduce((r,a)=>r+a.total,0)}onFilingDataChanged(r,a){A.getFee(this.filingData,this.payURL).then(s=>{this.fetchError="",this.fees=s,this.emitTotalFee(this.totalFilingFees)}).catch(s=>{this.fetchError="Error fetching fees"+s})}emitTotalFee(r){}};m([l({default:()=>[]})],p.prototype,"filingData",2);m([l({default:""})],p.prototype,"payURL",2);m([l()],p.prototype,"filingLabel",2);m([j("filingData")],p.prototype,"onFilingDataChanged",1);m([U("total-fee")],p.prototype,"emitTotalFee",1);p=m([L({})],p);var X=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("v-card",[r("header",{staticClass:"font-weight-bold px-3 py-3"},[t._t("header",function(){return[t._v(" Fee Summary ")]})],2),r("div",{directives:[{name:"show",rawName:"v-show",value:t.fetchError,expression:"fetchError"}]},[r("v-alert",{attrs:{color:"error",icon:"warning",outlined:""}},[t._v(" "+t._s(t.fetchError)+" ")])],1),r("v-slide-y-transition",{directives:[{name:"show",rawName:"v-show",value:!t.fetchError,expression:"!fetchError"}],staticClass:"fee-list",attrs:{group:"",tag:"ul"}},t._l(t.fees,function(a){return r("div",{key:a.filingType},[r("li",{staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name"},[t._v(" "+t._s(t.filingLabel?t.filingLabel:a.filingType)+" ")]),a.fee>0?r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.fee))+" ")]):r("div",{staticClass:"fee-list__item-value"},[t._v(" No Fee ")])]),a.priorityFees?r("li",{key:a.filingType+"-priority",staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name pl-3"},[t._v(" Priority Fee ")]),r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.priorityFees))+" ")])]):t._e(),a.futureEffectiveFees?r("li",{key:a.filingType+"-futureEffective",staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name pl-3"},[t._v(" Future Effective Fee ")]),r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.futureEffectiveFees))+" ")])]):t._e(),a.serviceFees?r("li",{key:a.filingType+"-transaction",staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name pl-3"},[t._v(" Service Fee ")]),r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.serviceFees))+" ")])]):t._e()])}),0),r("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetchError,expression:"!fetchError"}],staticClass:"container fee-total"},[r("div",{staticClass:"fee-total__name"},[t._v(" Total Fees ")]),r("div",{staticClass:"fee-total__currency"},[t._v(" CAD ")]),r("div",{staticClass:"fee-total__value"},[r("v-slide-y-reverse-transition",{attrs:{name:"slide",mode:"out-in"}},[r("div",[t._v(" "+t._s(t._f("currency")(t.totalFilingFees))+" ")])])],1)])],1)},Z=[],b=S(p,X,Z,!1,null,"db9d5a93",null,null);const K=b.exports;b.exports.__docgenInfo={exportName:"default",displayName:"SbcFeeSummary",description:"",tags:{},props:[{name:"filingData",tags:{},type:{name:"Array",elements:[{name:"FilingData"}]},defaultValue:{func:!0,value:"() => []"}},{name:"payURL",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"filingLabel",tags:{},type:{name:"string"}}],events:[{name:"total-fee"}],slots:[{name:"header"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/fee-summary/SbcFeeSummary.vue"]};var ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,f=(e,t,r,a)=>{for(var s=a>1?void 0:a?te(t,r):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(s=(a?i(t,r,s):i(s))||s);return a&&s&&ee(t,r,s),s};let c=class extends d{constructor(){super(...arguments);n(this,"FeeSummaryActions",F);n(this,"filingData");n(this,"payApiUrl");n(this,"hasConflicts");n(this,"isLoading");n(this,"confirmLabel");n(this,"errorMessage");n(this,"isSummaryMode")}emitAction(r){}};f([l({default:()=>[]})],c.prototype,"filingData",2);f([l({default:""})],c.prototype,"payApiUrl",2);f([l({default:!1})],c.prototype,"hasConflicts",2);f([l({default:!1})],c.prototype,"isLoading",2);f([l({default:"Confirm"})],c.prototype,"confirmLabel",2);f([l({default:""})],c.prototype,"errorMessage",2);f([l({default:!1})],c.prototype,"isSummaryMode",2);f([U("action")],c.prototype,"emitAction",1);c=f([L({components:{SbcFeeSummary:K}})],c);var re=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("aside",{attrs:{id:"fee-summary"}},[r("sbc-fee-summary",{attrs:{filingData:[...t.filingData],payURL:t.payApiUrl}}),r("v-row",{attrs:{"no-gutters":""}},[t.isSummaryMode?r("v-col",{staticClass:"pt-3 pr-3"},[r("v-btn",{attrs:{id:"back-btn",large:"",loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.BACK)}}},[r("span",[r("v-icon",[t._v("mdi-chevron-left")]),t._v("Back")],1)])],1):t._e(),r("v-col",{staticClass:"pt-3"},[r("v-btn",{attrs:{id:"cancel-btn",large:"",loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.CANCEL)}}},[r("span",[t._v("Cancel")])])],1),r("v-col",{staticClass:"pt-3"},[r("v-btn",{attrs:{id:"save-resume-later-btn",large:"",loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.SAVE_RESUME_LATER)}}},[r("span",[t._v("Save and Resume Later")])])],1),r("v-col",{staticClass:"pt-3"},[r("v-btn",{attrs:{id:"confirm-btn",large:"",disabled:t.hasConflicts,loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.CONFIRM)}}},[r("span",[t._v(t._s(t.confirmLabel)),r("v-icon",[t._v("mdi-chevron-right")])],1)])],1)],1),t.errorMessage?r("div",{staticClass:"error-msg pre-wrap mt-1",domProps:{innerHTML:t._s(t.errorMessage)}}):t._e()],1)},ae=[],P=S(c,re,ae,!1,null,"f5b2597d",null,null);const se=P.exports;P.exports.__docgenInfo={exportName:"default",displayName:"FeeSummary",description:"",tags:{},props:[{name:"filingData",tags:{},description:"Filing information to calculate fees.",type:{name:"Array",elements:[{name:"FilingDataIF"}]},defaultValue:{func:!0,value:"() => []"}},{name:"payApiUrl",tags:{},description:"URL for Sbc Fee Summary component to get fees.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"hasConflicts",tags:{},description:"Indicator that something isn't valid.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isLoading",tags:{},description:"Indicator that there is a request in progress.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"confirmLabel",tags:{},description:"Label for Confirm button.",type:{name:"string"},defaultValue:{func:!1,value:"'Confirm'"}},{name:"errorMessage",tags:{},description:"Message to display if there is an error.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"isSummaryMode",tags:{},description:"Prop to indicate summary mode.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"action",description:"Emit action event."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/fee-summary/FeeSummary.vue"]};d.filter("currency",e=>`$${e}`);const me={title:"component/FeeSummary"},M=(e,{argTypes:t})=>({props:Object.keys(t),components:{FeeSummary:se},template:'
'}),V=[{filingTypeCode:D.ALTERATION,entityType:q.CORPORATION,priority:!1}],v=M.bind({});v.args={filingData:V,payApiUrl:"https://pay-api-dev.apps.silver.devops.gov.bc.ca/api/v1/",hasConflicts:!1,isLoading:!1,confirmLabel:"Continue",errorMessage:""};const R=M.bind({});R.args={filingData:V,payApiUrl:"https://pay-api-dev.apps.silver.devops.gov.bc.ca/api/v1/",hasConflicts:!1,isLoading:!1,confirmLabel:"File and Pay",errorMessage:"",isSummaryMode:!0};var N,y,C;v.parameters={...v.parameters,docs:{...(N=v.parameters)==null?void 0:N.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - FeeSummary - }, - template: '
' // $props comes from args below -})`,...(C=(y=v.parameters)==null?void 0:y.docs)==null?void 0:C.source}}};var I,h,g;R.parameters={...R.parameters,docs:{...(I=R.parameters)==null?void 0:I.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - FeeSummary - }, - template: '
' // $props comes from args below -})`,...(g=(h=R.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};const ve=["Default","summaryMode"];export{v as Default,ve as __namedExportsOrder,me as default,R as summaryMode}; -//# sourceMappingURL=FeeSummary.stories-84e7dc79.js.map diff --git a/docs/assets/FeeSummary.stories-84e7dc79.js.map b/docs/assets/FeeSummary.stories-84e7dc79.js.map deleted file mode 100644 index fd78cf4a..00000000 --- a/docs/assets/FeeSummary.stories-84e7dc79.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FeeSummary.stories-84e7dc79.js","sources":["../../src/enums/fee-summary-actions.ts","../../src/enums/filing-codes.ts","../../src/enums/sbc-common-components-constants.ts","../../src/utils/common-util.ts","../../src/utils/config-helper.ts","../../src/services/fee-services.ts","../../src/components/fee-summary/SbcFeeSummary.vue","../../src/components/fee-summary/FeeSummary.vue"],"sourcesContent":["export enum FeeSummaryActions {\n BACK,\n CANCEL,\n CONFIRM,\n SAVE_RESUME_LATER\n}\n","/** Filing codes to send to pay. */\nexport enum FilingCodes {\n ADDRESS_CHANGE_BC = 'BCADD', // BCOMP - Change of Address\n ADDRESS_CHANGE_OT = 'OTADD', // Others - Change of Address\n AFFIDAVIT = 'AFDVT',\n ALTERATION = 'ALTER',\n ALTERATION_BC_TO_ULC = 'NOALU', // More expensive for BC to ULC.\n ANNUAL_REPORT_BC = 'BCANN', // BCOMP - Annual Report\n ANNUAL_REPORT_OT = 'OTANN', // Others - Annual Report\n CHANGE_OF_REGISTRATION = 'FMCHANGE',\n CONSENT_CONTINUATION_OUT = 'CONTO', // All entity types\n CONTINUATION_OUT = 'COUTI', // All entity types\n CORRECTION = 'CRCTN', // Correction - for both BCOMP and Others\n DIRECTOR_CHANGE_BC = 'BCCDR', // BCOMP - Change of Directors\n DIRECTOR_CHANGE_OT = 'OTCDR', // Others - Change of Directors\n DISSOLUTION_ADMINISTRATIVE = 'DIS_ADMIN',\n DISSOLUTION_COURT_ORDERED_LIQUIDATION = 'DIS_COLQD',\n DISSOLUTION_INVOLUNTARY = 'DIS_INVOL',\n DISSOLUTION_RESTORED_IN_ERROR = 'DIS_RSTR',\n DISSOLUTION_VOLUNTARY = 'DIS_VOL',\n DISSOLUTION_VOLUNTARY_LIQUIDATION = 'DIS_LQD',\n FM_CHANGE = 'FMCHANGE',\n FM_CONVERSION = 'FMCONV',\n FM_CORRECTION = 'FMCORR',\n FREE_DIRECTOR_CHANGE_BC = 'BCFDR', // bCOMP - Free Change of Directors\n FREE_DIRECTOR_CHANGE_OT = 'OTFDR', // Others - Free Change of Directors\n INCORPORATION_BC = 'BCINC',\n INCORPORATION_BEN = 'BCINC',\n INCORPORATION_CC = 'BCINC',\n INCORPORATION_CP = 'OTINC',\n INCORPORATION_ULC = 'BCINC',\n REGISTRATION_GP = 'FRREG',\n REGISTRATION_SP = 'FRREG',\n RESTORATION_FULL = 'RESTF', // for BC/BEN/CC/ULC\n RESTORATION_LIMITED = 'RESTL', // for BC/BEN/CC/ULC\n RESTORATION_LTD_EXTEND = 'RESXL', // for BC/BEN/CC/ULC\n RESTORATION_LTD_TO_FULL = 'RESXF', // for BC/BEN/CC/ULC\n SPECIAL_RESOLUTION = 'SPRLN',\n SPECIAL_RESOLUTION_NAME_CHANGE = 'OTCON'\n}\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL',\n BusinessIdentifierKey = 'BUSINESS_ID',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n InvitationToken = 'INV_TOKEN',\n PaginationOptions = 'PAGINATION_OPTIONS',\n PaginationNumberOfItems = 'PAGINATION_NUMBER_OF_ITEMS',\n OrgSearchFilter = 'ORG_SEARCH_FILTER',\n PendingAccountsSearchFilter = 'PENDING_ACCOUNTS_SEARCH_FILTER',\n RejectedAccountsSearchFilter = 'REJECTED_ACCOUNTS_SEARCH_FILTER',\n FasWebUrl = 'FAS_WEB_URL',\n AffidavitNeeded = 'AFFIDAVIT_NEEDED',\n GOVN_USER='AUTH_GOVN_USER',\n PayApiUrl = 'PAY_API_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n UNLINKED_PREMIUM = 'UNLINKED_PREMIUM', // premium accounts without bcol linking\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AdminEdit = 'admin_edit',\n BnEdit = 'bn_edit',\n Staff = 'staff',\n Public = 'public_user',\n Edit = 'edit',\n Basic = 'basic',\n StaffCreateAccounts = 'create_accounts',\n StaffManageAccounts = 'manage_accounts',\n AnonymousUser = 'anonymous_user',\n StaffViewAccounts = 'view_accounts',\n Tester = 'tester',\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n StaffSuspendAccounts = 'suspend_accounts',\n GOVMAccountUser = 'gov_account_user',\n ManageGlCodes = 'manage_gl_codes',\n FasSearch = 'fas_search',\n ViewAllTransactions = 'view_all_transactions'\n}\n\nexport enum Pages {\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard',\n USER_PROFILE = 'userprofile',\n CREATE_ACCOUNT = 'setup-account',\n CREATE_GOVM_ACCOUNT = 'setup-govm-account',\n UPDATE_ACCOUNT = 'update-account',\n CREATE_NON_BCSC_ACCOUNT = 'setup-non-bcsc-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n PENDING_APPROVAL = 'pendingapproval',\n MAIN = 'account',\n SIGNIN = 'signin',\n SIGNOUT = 'signout',\n CREATE_USER_PROFILE = 'createuserprofile',\n SEARCH_BUSINESS = 'searchbusiness',\n USER_PROFILE_TERMS = 'userprofileterms',\n USER_PROFILE_TERMS_DECLINE = 'unauthorizedtermsdecline',\n HOME = 'home',\n SETUP_ACCOUNT_NON_BCSC = 'nonbcsc-info',\n SETUP_ACCOUNT_NON_BCSC_INSTRUCTIONS = 'instructions',\n SETUP_ACCOUNT_NON_BCSC_DOWNLOAD = 'download',\n ACCOUNT_FREEZE_UNLOCK = 'account-freeze-nsf',\n ACCOUNT_FREEZE = 'account-freeze',\n ACCOUNT_UNLOCK_SUCCESS = 'account-unlock-success',\n ACCOUNT_SETTINGS = 'settings',\n EDIT_ACCOUNT_TYPE= '/change-account',\n STAFF_DASHBOARD_OLD= '/searchbusiness',\n STAFF_SETUP_ACCOUNT = 'staff-setup-account',\n CONFIRM_TOKEN = 'confirmtoken',\n ADMIN = '/admin',\n ADMIN_DASHBOARD = '/admin/dashboard',\n STAFF = '/staff',\n STAFF_DASHBOARD = '/staff/dashboard',\n STAFF_DASHBOARD_ACTIVE = '/staff/dashboard/active',\n STAFF_DASHBOARD_REVIEW = '/staff/dashboard/review',\n STAFF_DASHBOARD_REJECTED = '/staff/dashboard/rejected',\n STAFF_DASHBOARD_INVITATIONS = '/staff/dashboard/invitations',\n STAFF_DASHBOARD_SUSPENDED = '/staff/dashboard/suspended',\n MAKE_PAD_PAYMENT = '/make-cc-payment/',\n STAFF_GOVM_SETUP_ACCOUNT = '/staff-govm-setup-account',\n SETUP_GOVM_ACCOUNT_SUCCESS='setup-govm-account-success',\n DUPLICATE_ACCOUNT_WARNING='/duplicate-account-warning',\n AFFIDAVIT_COMPLETE = 'upload-affidavit',\n LOGIN = 'login'\n}\n\nexport enum AccountStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n REJECTED = 'REJECTED',\n PENDING_STAFF_REVIEW = 'PENDING_STAFF_REVIEW',\n PENDING_ACTIVATION = 'PENDING_ACTIVATION',\n NSF_SUSPENDED = 'NSF_SUSPENDED',\n SUSPENDED = 'SUSPENDED',\n PENDING_INVITE_ACCEPT = 'PENDING_INVITE_ACCEPT'\n}\n\n// keep in sync with the pay-api invoice status enum\nexport enum InvoiceStatus {\n APPROVED = 'APPROVED',\n CANCELLED = 'CANCELLED',\n CREATED = 'CREATED',\n CREDITED = 'CREDITED',\n COMPLETED = 'COMPLETED', // NOTE: this === PAID value (api alters it from PAID to COMPLETED in postdump)\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n DELETED = 'DELETED',\n PAID = 'PAID',\n PARTIAL = 'PARTIAL_PAID',\n PENDING = 'PENDING',\n REFUND_REQUESTED = 'REFUND_REQUESTED',\n REFUNDED = 'REFUNDED',\n SETTLEMENT_SCHEDULED = 'SETTLEMENT_SCHED',\n UPDATE_REVENUE_ACCOUNT = 'GL_UPDATED',\n UPDATE_REVENUE_ACCOUNT_REFUND = 'GL_UPDATED_REFUND'\n}\n\nexport enum AffiliationTypes {\n NAME_REQUEST ='Name Request',\n INCORPORATION_APPLICATION = 'Incorporation Application',\n CORPORATION = 'Corporation',\n REGISTRATION = 'Registration'\n}\n\nexport enum FilingTypes {\n INCORPORATION_APPLICATION = 'incorporationApplication',\n REGISTRATION = 'registration'\n}\n\nexport enum LearFilingTypes {\n AMALGAMATION = 'Amalgamation',\n INCORPORATION = 'Incorporation',\n REGISTRATION = 'Registration'\n}\n\n// NB: Corp Type is sometimes called Legal Type\n// see also https://github.com/bcgov/bcrs-shared-components/blob/main/src/modules/corp-type-module/corp-type-module.ts\nexport enum CorpTypes {\n // actual corp types\n BC_CCC = 'CC',\n BC_COMPANY = 'BC',\n BC_ULC_COMPANY = 'ULC',\n BENEFIT_COMPANY = 'BEN',\n COOP = 'CP',\n PARTNERSHIP = 'GP',\n SOLE_PROP = 'SP',\n\n // overloaded values\n INCORPORATION_APPLICATION = 'TMP',\n NAME_REQUEST = 'NR',\n REGISTRATION = 'RTMP'\n}\n\nexport enum NrState {\n APPROVED = 'APPROVED',\n DRAFT = 'DRAFT',\n HOLD = 'HOLD',\n REJECTED = 'REJECTED',\n CONDITION = 'CONDITION',\n CONDITIONAL = 'CONDITIONAL',\n REFUND_REQUESTED = 'REFUND_REQUESTED',\n CANCELLED = 'CANCELLED',\n EXPIRED = 'EXPIRED',\n CONSUMED = 'CONSUMED',\n PROCESSING = 'PROCESSING'\n}\n\nexport enum NrDisplayStates {\n APPROVED = 'Approved',\n HOLD = 'Pending Staff Review',\n DRAFT = 'Draft',\n REJECTED = 'Rejected',\n CONDITIONAL = 'Conditional Approval',\n REFUND_REQUESTED = 'Cancelled, Refund Requested',\n CANCELLED = 'Cancelled',\n EXPIRED = 'Expired',\n CONSUMED = 'Consumed',\n PROCESSING = 'Processing'\n}\n\nexport enum NrConditionalStates {\n RECEIVED = 'R',\n WAIVED = 'N',\n REQUIRED = 'Y',\n}\n\nexport enum NrTargetTypes {\n LEAR = 'lear',\n COLIN = 'colin',\n ONESTOP = 'onestop'\n}\n\nexport enum NrEntityType {\n // BC Entity Types:\n BC = 'BC', // Benefit Company\n CC = 'CC', // Community Contribution Company\n CP = 'CP', // Cooperative Association\n CR = 'CR', // BC Limited Company\n DBA = 'DBA',\n FI = 'FI',\n FR = 'FR',\n GP = 'GP',\n LL = 'LL',\n LP = 'LP',\n PA = 'PA',\n PAR = 'PAR',\n SO = 'SO',\n UL = 'UL', // Unlimited Liability Company\n\n // XPRO Entity Types:\n RLC = 'RLC',\n XCP = 'XCP',\n XCR = 'XCR',\n XLL = 'XLL',\n XLP = 'XLP',\n XSO = 'XSO',\n XUL = 'XUL',\n\n INFO = 'INFO', // special value for sub-menu\n}\n\nexport enum BusinessState {\n ACTIVE = 'Active',\n DRAFT = 'Draft'\n}\n\nexport enum AccessType {\n REGULAR = 'REGULAR',\n EXTRA_PROVINCIAL = 'EXTRA_PROVINCIAL',\n ANONYMOUS = 'ANONYMOUS',\n REGULAR_BCEID = 'REGULAR_BCEID',\n GOVM = 'GOVM',\n GOVN = 'GOVN'\n}\n\nexport enum Permission {\n REMOVE_BUSINESS = 'REMOVE_BUSINESS',\n CHANGE_ADDRESS = 'CHANGE_ADDRESS',\n VIEW_ADDRESS = 'VIEW_ADDRESS',\n CHANGE_ORG_NAME = 'CHANGE_ORG_NAME',\n INVITE_MEMBERS = 'INVITE_MEMBERS',\n CHANGE_ACCOUNT_TYPE = 'CHANGE_ACCOUNT_TYPE',\n CHANGE_ROLE = 'CHANGE_ROLE',\n RESET_PASSWORD = 'RESET_PASSWORD',\n VIEW_ACCOUNT = 'VIEW_ACCOUNT',\n TRANSACTION_HISTORY = 'TRANSACTION_HISTORY',\n MANAGE_STATEMENTS = 'MANAGE_STATEMENTS',\n VIEW_PAYMENT_METHODS = 'VIEW_PAYMENT_METHODS',\n VIEW_ADMIN_CONTACT = 'VIEW_ADMIN_CONTACT',\n RESET_OTP = 'RESET_OTP',\n MAKE_PAYMENT = 'MAKE_PAYMENT',\n GENERATE_INVOICE = 'GENERATE_INVOICE',\n VIEW_AUTH_OPTIONS = 'VIEW_AUTH_OPTIONS',\n CHANGE_AUTH_OPTIONS = 'CHANGE_AUTH_OPTIONS',\n EDIT_REQUEST_PRODUCT_PACKAGE = 'EDIT_REQUEST_PRODUCT_PACKAGE',\n VIEW_ACTIVITYLOG = 'VIEW_ACTIVITYLOG',\n VIEW_REQUEST_PRODUCT_PACKAGE='VIEW_REQUEST_PRODUCT_PACKAGE',\n DEACTIVATE_ACCOUNT='DEACTIVATE_ACCOUNT',\n VIEW_USER_LOGINSOURCE='VIEW_USER_LOGINSOURCE',\n EDIT_BUSINESS_INFO = 'EDIT_BUSINESS_INFO',\n VIEW_DEVELOPER_ACCESS = 'VIEW_DEVELOPER_ACCESS',\n}\n\nexport enum LDFlags {\n AuthLearnMore = 'auth-options-learn-more',\n PaymentTypeAccountCreation = 'payment-type-in-account-creation',\n LinkToNewNameRequestApp ='link-to-new-name-request-app',\n EnableMandatoryAddress = 'enable-mandatory-address',\n EnableGovmInvite = 'enable-govm-account-invite',\n HideProductPackage = 'hide-product-packages',\n EnableOrgNameAutoComplete = 'enable-org-name-auto-complete',\n IaSupportedEntities = 'ia-supported-entities',\n EnableFasDashboard = 'enable-fas-dashboard',\n DisableGovNAccountCreation='disable-govn-account',\n EnableBcCccUlc = 'enable-bc-ccc-ulc',\n ProductBusSearchStatus = 'product-BUSINESS_SEARCH-status',\n ProductBusSearchPremTooltip = 'product-BUSINESS_SEARCH-prem-tooltip',\n ProductCSOStatus = 'product-CSO-status',\n ProductWillsStatus = 'product-VS-status',\n ProductSiteRegistryStatus = 'product-ESRA-status',\n ProductBCAStatus = 'product-BCA-status',\n BusSearchLink = 'bus-search-staff-link',\n EnableDetailsFilter = 'enable-transactions-detail-filter',\n SentryEnable = 'sentry-enable',\n BannerText = 'banner-text'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE'\n}\n\nexport enum SearchFilterCodes {\n DATERANGE = 'daterange',\n USERNAME = 'username',\n ACCOUNTNAME = 'accountname',\n FOLIONUMBER = 'folio'\n}\n\nexport enum PaymentTypes {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n CREDIT_CARD = 'CC',\n BCOL = 'DRAWDOWN',\n DIRECT_PAY = 'DIRECT_PAY',\n EFT = 'EFT',\n INTERNAL = 'INTERNAL',\n NO_FEE = 'NO_FEE',\n ONLINE_BANKING = 'ONLINE_BANKING',\n PAD = 'PAD',\n EJV = 'EJV',\n WIRE = 'WIRE'\n}\n\nexport enum paymentErrorType {\n GENERIC_ERROR = 'GENERIC_ERROR',\n PAYMENT_CANCELLED = 'PAYMENT_CANCELLED',\n DECLINED= 'DECLINED',\n INVALID_CARD_NUMBER = 'INVALID_CARD_NUMBER',\n DECLINED_EXPIRED_CARD = 'DECLINED_EXPIRED_CARD',\n DUPLICATE_ORDER_NUMBER = 'DUPLICATE_ORDER_NUMBER',\n TRANSACTION_TIMEOUT_NO_DEVICE = 'TRANSACTION_TIMEOUT_NO_DEVICE',\n VALIDATION_ERROR = 'VALIDATION_ERROR',\n}\n\nexport enum StaffCreateAccountsTypes {\n DIRECTOR_SEARCH = 'DIRECTOR_SEARCH',\n GOVM_BUSINESS = 'GOVM_BUSINESS'\n}\n\nexport enum ProductStatus {\n NOT_SUBSCRIBED = 'NOT_SUBSCRIBED',\n PENDING_STAFF_REVIEW = 'PENDING_STAFF_REVIEW',\n ACTIVE = 'ACTIVE',\n REJECTED = 'REJECTED',\n}\n\nexport enum TaskRelationshipType {\n ORG = 'ORG',\n PRODUCT = 'PRODUCT',\n USER = 'USER'\n}\n\nexport enum TaskRelationshipStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n REJECTED = 'REJECTED',\n PENDING_STAFF_REVIEW = 'PENDING_STAFF_REVIEW',\n PENDING_ACTIVATION = 'PENDING_ACTIVATION',\n PENDING_INVITE_ACCEPT = 'PENDING_INVITE_ACCEPT',\n HOLD = 'HOLD'\n}\n\nexport enum TaskStatus {\n OPEN = 'OPEN',\n COMPLETED = 'COMPLETED',\n HOLD = 'HOLD'\n}\n\nexport enum TaskType {\n NEW_ACCOUNT_STAFF_REVIEW = 'New Account',\n GOVM_REVIEW = 'GovM',\n GOVN_REVIEW = 'GovN',\n BCEID_ADMIN_REVIEW = 'BCeID Admin'\n}\n\nexport enum TaskAction {\n AFFIDAVIT_REVIEW = 'AFFIDAVIT_REVIEW',\n ACCOUNT_REVIEW = 'ACCOUNT_REVIEW',\n PRODUCT_REVIEW = 'PRODUCT_REVIEW'\n}\n\nexport enum FeeCodes {\n PPR_CHANGE_OR_AMENDMENT = 'TRF'\n}\n\nexport enum DisplayModeValues{\n VIEW_ONLY = 'VIEW_ONLY'\n}\n\nexport enum OnholdOrRejectCode {\n ONHOLD = 'On Hold',\n REJECTED = 'Reject Account'\n}\n\nexport const ORG_AUTO_COMPLETE_MAX_RESULTS_COUNT = 5\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account']\n\nexport const DEACTIVATE_ACCOUNT_MESSAGE : Map = new Map([\n ['OUTSTANDING_CREDIT', 'deactivateCreditAccountMsg'],\n ['TRANSACTIONS_IN_PROGRESS', 'deactivateActiveTransactionsMsg'],\n ['DEFAULT', 'deactivateGenericMsg']\n])\n\nexport enum AffidavitStatus {\n PENDING = 'PENDING',\n APPROVED = 'APPROVED',\n REJECTED = 'REJECTED',\n INACTIVE = 'INACTIVE'\n}\n\nexport enum AffidavitNumberStatus {\n PENDING = 'Pending'\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus',\n UPDATE_ACCESS_TYPE = 'updateAccessType'\n}\n\nexport enum RequestTrackerType {\n InformCRA = 'INFORM_CRA',\n ChangeDeliveryAddress = 'CHANGE_DELIVERY_ADDRESS',\n ChangeMailingAddress = 'CHANGE_MAILING_ADDRESS',\n ChangeName = 'CHANGE_NAME',\n ChangeStatus = 'CHANGE_STATUS',\n ChangeParty = 'CHANGE_PARTY',\n}\n\nexport enum Product {\n BCA = 'BCA',\n BUSINESS = 'BUSINESS',\n BUSINESS_SEARCH = 'BUSINESS_SEARCH',\n CSO = 'CSO',\n ESRA = 'ESRA',\n MHR = 'MHR',\n PPR = 'PPR',\n RPPR = 'RPPR',\n RPT = 'RPT',\n VS = 'VS'\n}\n\nexport enum EntityAlertTypes {\n FROZEN = 'FROZEN',\n BADSTANDING = 'BAD_STANDING',\n LIQUIDATION = 'LIQUIDATION',\n DISSOLUTION = 'DISSOLUTION',\n PROCESSING = 'PROCESSING',\n EXPIRED = 'EXPIRED'\n}\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from '../enums/sbc-common-components-constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from '@/enums/sbc-common-components-constants'\nimport { trimTrailingSlashURL } from '@/utils/common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","import Axios from 'axios'\nimport { Fee, FilingData, PayData } from '@/interfaces'\nimport ConfigHelper from '@/utils/config-helper'\nimport { SessionStorageKeys } from '@/enums/sbc-common-components-constants'\n\n// sample Microcks URLs =\n// https://mock-lear-tools.pathfinder.gov.bc.ca/rest/SBC+Pay+API+Reference/1.0.1/api/v1/fees/CP/OTANN\n// https://mock-lear-tools.pathfinder.gov.bc.ca/rest/SBC+Pay+API+Reference/1.0.1/api/v1/fees/CP/OTADD\nconst API_URL = 'https://pay-api-dev.pathfinder.gov.bc.ca/api/v1/fees'\n\nexport default {\n getFee (filingData: FilingData[], payApiUrl: string) : Promise {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n const accountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || 0\n\n if (filingData.length < 1) {\n Promise.resolve()\n }\n\n const promises = []\n for (const filing of filingData) {\n if (!filing.filingTypeCode) {\n Promise.resolve()\n }\n const url = prepareUrl(filing, payApiUrl)\n promises.push(Axios.get(url, { headers: { Authorization: `Bearer ${token}`, 'Account-Id': accountId } }))\n }\n\n return Axios.all(promises)\n .then(Axios.spread((...args) => {\n // customise the response here\n return args\n .map(response => response.data as PayData)\n .map(data => {\n const filingDatum = filingData.find(fd => fd.filingTypeCode === data.filingTypeCode)\n // default the title if client hasn't passed this on\n const filingType = (filingDatum && filingDatum.filingDescription)\n ? filingDatum.filingDescription\n : data.filingType\n const fee = data.filingFees\n const priorityFees = (data.priorityFees) || 0\n const futureEffectiveFees = (data.futureEffectiveFees) || 0\n const serviceFees = (data.serviceFees) || 0\n const total = (data.total) || 0\n return { fee, filingType, priorityFees, futureEffectiveFees, serviceFees, total } as Fee\n })\n }))\n .catch(error => {\n switch (error.response && error.response.status) {\n case 400:\n // eslint-disable-next-line no-console\n console.log('%c FeeModule-ERROR: Probably fee code mismatch %s', 'color: red; font-size: 13px',\n JSON.stringify(filingData))\n break\n case 500:\n // eslint-disable-next-line no-console\n console.log('%c FeeModule-ERROR: Probably invalid Token %s', 'color: red; font-size: 13px',\n JSON.stringify(filingData))\n break\n default:\n // eslint-disable-next-line no-console\n console.log('%c FeeModule-ERROR: Probably unknown Error %s', 'color: red; font-size: 13px',\n JSON.stringify(filingData))\n }\n return []\n })\n }\n}\n\nconst prepareUrl = (filing: FilingData, payApiUrl: string) => {\n const queryParams = []\n if (filing.waiveFees) {\n queryParams.push(`waiveFees=${!!filing.waiveFees}`)\n }\n if (filing.priority) {\n queryParams.push(`priority=${!!filing.priority}`)\n }\n if (filing.futureEffective) {\n queryParams.push(`futureEffective=${!!filing.futureEffective}`)\n }\n let url = `${payApiUrl}fees/${filing.entityType}/${filing.filingTypeCode}`\n if (queryParams.length) {\n url += `?${queryParams.join('&')}`\n }\n return url\n}\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["FeeSummaryActions","FeeSummaryActions2","FilingCodes","SessionStorageKeys","trimTrailingSlashURL","url","ConfigHelper","key","value","keycloakConfigUrl","__publicField","FeeServices","filingData","payApiUrl","token","accountId","promises","filing","prepareUrl","Axios","args","response","data","filingDatum","fd","filingType","fee","priorityFees","futureEffectiveFees","serviceFees","total","error","queryParams","SbcFeeSummary","Vue","f","acc","item","val","oldVal","__decorateClass","Prop","Watch","Emit","Component","FeeSummary","action"],"mappings":"2cAAY,IAAAA,GAAAA,IACVA,EAAAC,EAAA,KAAA,CAAA,EAAA,OACAD,EAAAC,EAAA,OAAA,CAAA,EAAA,SACAD,EAAAC,EAAA,QAAA,CAAA,EAAA,UACAD,EAAAC,EAAA,kBAAA,CAAA,EAAA,oBAJUD,IAAAA,GAAA,CAAA,CAAA,ECCAE,GAAAA,IACVA,EAAA,kBAAoB,QACpBA,EAAA,kBAAoB,QACpBA,EAAA,UAAY,QACZA,EAAA,WAAa,QACbA,EAAA,qBAAuB,QACvBA,EAAA,iBAAmB,QACnBA,EAAA,iBAAmB,QACnBA,EAAA,uBAAyB,WACzBA,EAAA,yBAA2B,QAC3BA,EAAA,iBAAmB,QACnBA,EAAA,WAAa,QACbA,EAAA,mBAAqB,QACrBA,EAAA,mBAAqB,QACrBA,EAAA,2BAA6B,YAC7BA,EAAA,sCAAwC,YACxCA,EAAA,wBAA0B,YAC1BA,EAAA,8BAAgC,WAChCA,EAAA,sBAAwB,UACxBA,EAAA,kCAAoC,UACpCA,EAAA,UAAY,WACZA,EAAA,cAAgB,SAChBA,EAAA,cAAgB,SAChBA,EAAA,wBAA0B,QAC1BA,EAAA,wBAA0B,QAC1BA,EAAA,iBAAmB,QACnBA,EAAA,kBAAoB,QACpBA,EAAA,iBAAmB,QACnBA,EAAA,iBAAmB,QACnBA,EAAA,kBAAoB,Q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,EAAA,kBAGAA,EAAA,qBAGAA,EAAA,qBAGAA,EAAA,sBAKA,WAAAoC,EAAA,CAAA,CACA,EAxBAN,EAAA,CAAAC,EAAA,CAAA,QAAA,IAAA,CAAA,EAAA,CAAA,EAJAI,EAIA,UAAA,aAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAPAI,EAOA,UAAA,YAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAVAI,EAUA,UAAA,eAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAbAI,EAaA,UAAA,YAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,UAAA,CAAA,EAhBAI,EAgBA,UAAA,eAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAnBAI,EAmBA,UAAA,eAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAtBAI,EAsBA,UAAA,gBAAA,CAAA,EAKAL,EAAA,CAFAG,EAAA,QAAA,CAAA,EAzBAE,EA2BA,UAAA,aAAA,CAAA,EA3BAA,EAAAL,EAAA,CAHAI,EAAA,CACA,WAAA,CAAA,cAAAX,CAAA,CAAA,CACA,CAAA,EACAY,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/FeeSummary.stories-e90c5128.js b/docs/assets/FeeSummary.stories-e90c5128.js new file mode 100644 index 00000000..b16cc569 --- /dev/null +++ b/docs/assets/FeeSummary.stories-e90c5128.js @@ -0,0 +1,18 @@ +var W=Object.defineProperty;var Y=(e,t,r)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var n=(e,t,r)=>(Y(e,typeof t!="symbol"?t+"":t,r),r);import{V as d}from"./vue.esm-b1e57a2f.js";import{C as L,P as l,E as U,n as S}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as j}from"./Watch-62f8b699.js";import{A as T}from"./index-2b7fa976.js";import{C as q}from"./corp-type-module-8edd1173.js";import"./_commonjsHelpers-de833af9.js";var D=(e=>(e[e.BACK=0]="BACK",e[e.CANCEL=1]="CANCEL",e[e.CONFIRM=2]="CONFIRM",e[e.SAVE_RESUME_LATER=3]="SAVE_RESUME_LATER",e))(D||{}),F=(e=>(e.ADDRESS_CHANGE_BC="BCADD",e.ADDRESS_CHANGE_OT="OTADD",e.AGM_EXTENSION="AGMDT",e.AGM_LOCATION_CHG="AGMLC",e.AFFIDAVIT="AFDVT",e.ALTERATION="ALTER",e.ALTERATION_BC_TO_ULC="NOALU",e.ANNUAL_REPORT_BC="BCANN",e.ANNUAL_REPORT_OT="OTANN",e.CHANGE_OF_REGISTRATION="FMCHANGE",e.CONSENT_CONTINUATION_OUT="CONTO",e.CONTINUATION_OUT="COUTI",e.CORRECTION="CRCTN",e.DIRECTOR_CHANGE_BC="BCCDR",e.DIRECTOR_CHANGE_OT="OTCDR",e.DISSOLUTION_ADMINISTRATIVE="DIS_ADMIN",e.DISSOLUTION_COURT_ORDERED_LIQUIDATION="DIS_COLQD",e.DISSOLUTION_INVOLUNTARY="DIS_INVOL",e.DISSOLUTION_RESTORED_IN_ERROR="DIS_RSTR",e.DISSOLUTION_VOLUNTARY="DIS_VOL",e.DISSOLUTION_VOLUNTARY_LIQUIDATION="DIS_LQD",e.FM_CHANGE="FMCHANGE",e.FM_CONVERSION="FMCONV",e.FM_CORRECTION="FMCORR",e.FREE_DIRECTOR_CHANGE_BC="BCFDR",e.FREE_DIRECTOR_CHANGE_OT="OTFDR",e.INCORPORATION_BC="BCINC",e.INCORPORATION_BEN="BCINC",e.INCORPORATION_CC="BCINC",e.INCORPORATION_CP="OTINC",e.INCORPORATION_ULC="BCINC",e.REGISTRATION_GP="FRREG",e.REGISTRATION_SP="FRREG",e.RESTORATION_FULL="RESTF",e.RESTORATION_LIMITED="RESTL",e.RESTORATION_LTD_EXTEND="RESXL",e.RESTORATION_LTD_TO_FULL="RESXF",e.SPECIAL_RESOLUTION="SPRLN",e.SPECIAL_RESOLUTION_NAME_CHANGE="OTCON",e))(F||{}),_=(e=>(e.KeyCloakToken="KEYCLOAK_TOKEN",e.KeyCloakRefreshToken="KEYCLOAK_REFRESH_TOKEN",e.KeyCloakIdToken="KEYCLOAK_ID_TOKEN",e.ApiConfigKey="AUTH_API_CONFIG",e.PreventStorageSync="PREVENT_STORAGE_SYNC",e.LaunchDarklyFlags="LD_FLAGS",e.CurrentAccount="CURRENT_ACCOUNT",e.AuthApiUrl="AUTH_API_URL",e.AuthWebUrl="AUTH_WEB_URL",e.StatusApiUrl="STATUS_API_URL",e.WhatsNew="WHATS_NEW",e.SessionSynced="SESSION_SYNCED",e.RegistryHomeUrl="REGISTRY_HOME_URL",e.NameRequestUrl="NAME_REQUEST_URL",e.PprWebUrl="PPR_WEB_URL",e.SiteminderLogoutUrl="SITEMINDER_LOGOUT_URL",e.BusinessIdentifierKey="BUSINESS_ID",e.ExtraProvincialUser="EXTRAPROVINCIAL_USER",e.InvitationToken="INV_TOKEN",e.PaginationOptions="PAGINATION_OPTIONS",e.PaginationNumberOfItems="PAGINATION_NUMBER_OF_ITEMS",e.OrgSearchFilter="ORG_SEARCH_FILTER",e.PendingAccountsSearchFilter="PENDING_ACCOUNTS_SEARCH_FILTER",e.RejectedAccountsSearchFilter="REJECTED_ACCOUNTS_SEARCH_FILTER",e.FasWebUrl="FAS_WEB_URL",e.AffidavitNeeded="AFFIDAVIT_NEEDED",e.GOVN_USER="AUTH_GOVN_USER",e.PayApiUrl="PAY_API_URL",e))(_||{});function u(e){return e?e.trim().replace(/\/+$/,""):""}class O{static addToSession(t,r){sessionStorage.setItem(t,r)}static getFromSession(t){return sessionStorage.getItem(t)}static removeFromSession(t){sessionStorage.removeItem(t)}static clearSession(){sessionStorage.clear()}static getStatusAPIUrl(){return u(sessionStorage.getItem(_.StatusApiUrl)||"")}static getAuthAPIUrl(){return u(sessionStorage.getItem(_.AuthApiUrl)||"")}static getAuthContextPath(){return u(sessionStorage.getItem(_.AuthWebUrl)||"")}static getRegistryHomeURL(){return u(sessionStorage.getItem(_.RegistryHomeUrl)||"")}static getNameRequestURL(){return u(sessionStorage.getItem(_.NameRequestUrl)||"")}static getPprWebURL(){return u(sessionStorage.getItem(_.PprWebUrl)||"")}static setKeycloakConfigUrl(t){this.keycloakConfigUrl=t}static getKeycloakConfigUrl(){return this.keycloakConfigUrl}}n(O,"keycloakConfigUrl","");const A={getFee(e,t){const r=O.getFromSession(_.KeyCloakToken),a=JSON.parse(O.getFromSession(_.CurrentAccount)||"{}").id||0;e.length<1&&Promise.resolve();const s=[];for(const o of e){o.filingTypeCode||Promise.resolve();const i=z(o,t);s.push(T.get(i,{headers:{Authorization:`Bearer ${r}`,"Account-Id":a}}))}return T.all(s).then(T.spread((...o)=>o.map(i=>i.data).map(i=>{const E=e.find(H=>H.filingTypeCode===i.filingTypeCode),V=E&&E.filingDescription?E.filingDescription:i.filingType,x=i.filingFees,k=i.priorityFees||0,w=i.futureEffectiveFees||0,$=i.serviceFees||0,B=i.total||0;return{fee:x,filingType:V,priorityFees:k,futureEffectiveFees:w,serviceFees:$,total:B}}))).catch(o=>{switch(o.response&&o.response.status){case 400:console.log("%c FeeModule-ERROR: Probably fee code mismatch %s","color: red; font-size: 13px",JSON.stringify(e));break;case 500:console.log("%c FeeModule-ERROR: Probably invalid Token %s","color: red; font-size: 13px",JSON.stringify(e));break;default:console.log("%c FeeModule-ERROR: Probably unknown Error %s","color: red; font-size: 13px",JSON.stringify(e))}return[]})}},z=(e,t)=>{const r=[];e.waiveFees&&r.push(`waiveFees=${!!e.waiveFees}`),e.priority&&r.push(`priority=${!!e.priority}`),e.futureEffective&&r.push(`futureEffective=${!!e.futureEffective}`);let a=`${t}fees/${e.entityType}/${e.filingTypeCode}`;return r.length&&(a+=`?${r.join("&")}`),a};var J=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,m=(e,t,r,a)=>{for(var s=a>1?void 0:a?Q(t,r):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(s=(a?i(t,r,s):i(s))||s);return a&&s&&J(t,r,s),s};let p=class extends d{constructor(){super(...arguments);n(this,"filingData");n(this,"payURL");n(this,"filingLabel");n(this,"fees",[]);n(this,"fetchError","")}mounted(){A.getFee(this.filingData,this.payURL).then(r=>{this.fetchError="",this.fees=r||[],this.fees=this.fees.filter(a=>this.totalFilingFees>0&&a.fee||this.totalFilingFees===0),this.emitTotalFee(this.totalFilingFees)}).catch(r=>{this.fetchError="Error fetching fees"+r})}get totalFilingFees(){return this.fees.reduce((r,a)=>r+a.total,0)}onFilingDataChanged(r,a){A.getFee(this.filingData,this.payURL).then(s=>{this.fetchError="",this.fees=s,this.emitTotalFee(this.totalFilingFees)}).catch(s=>{this.fetchError="Error fetching fees"+s})}emitTotalFee(r){}};m([l({default:()=>[]})],p.prototype,"filingData",2);m([l({default:""})],p.prototype,"payURL",2);m([l()],p.prototype,"filingLabel",2);m([j("filingData")],p.prototype,"onFilingDataChanged",1);m([U("total-fee")],p.prototype,"emitTotalFee",1);p=m([L({})],p);var X=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("v-card",[r("header",{staticClass:"font-weight-bold px-3 py-3"},[t._t("header",function(){return[t._v(" Fee Summary ")]})],2),r("div",{directives:[{name:"show",rawName:"v-show",value:t.fetchError,expression:"fetchError"}]},[r("v-alert",{attrs:{color:"error",icon:"warning",outlined:""}},[t._v(" "+t._s(t.fetchError)+" ")])],1),r("v-slide-y-transition",{directives:[{name:"show",rawName:"v-show",value:!t.fetchError,expression:"!fetchError"}],staticClass:"fee-list",attrs:{group:"",tag:"ul"}},t._l(t.fees,function(a){return r("div",{key:a.filingType},[r("li",{staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name"},[t._v(" "+t._s(t.filingLabel?t.filingLabel:a.filingType)+" ")]),a.fee>0?r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.fee))+" ")]):r("div",{staticClass:"fee-list__item-value"},[t._v(" No Fee ")])]),a.priorityFees?r("li",{key:a.filingType+"-priority",staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name pl-3"},[t._v(" Priority Fee ")]),r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.priorityFees))+" ")])]):t._e(),a.futureEffectiveFees?r("li",{key:a.filingType+"-futureEffective",staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name pl-3"},[t._v(" Future Effective Fee ")]),r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.futureEffectiveFees))+" ")])]):t._e(),a.serviceFees?r("li",{key:a.filingType+"-transaction",staticClass:"container fee-list__item"},[r("div",{staticClass:"fee-list__item-name pl-3"},[t._v(" Service Fee ")]),r("div",{staticClass:"fee-list__item-value"},[t._v(" "+t._s(t._f("currency")(a.serviceFees))+" ")])]):t._e()])}),0),r("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetchError,expression:"!fetchError"}],staticClass:"container fee-total"},[r("div",{staticClass:"fee-total__name"},[t._v(" Total Fees ")]),r("div",{staticClass:"fee-total__currency"},[t._v(" CAD ")]),r("div",{staticClass:"fee-total__value"},[r("v-slide-y-reverse-transition",{attrs:{name:"slide",mode:"out-in"}},[r("div",[t._v(" "+t._s(t._f("currency")(t.totalFilingFees))+" ")])])],1)])],1)},Z=[],b=S(p,X,Z,!1,null,"db9d5a93",null,null);const K=b.exports;b.exports.__docgenInfo={exportName:"default",displayName:"SbcFeeSummary",description:"",tags:{},props:[{name:"filingData",tags:{},type:{name:"Array",elements:[{name:"FilingData"}]},defaultValue:{func:!0,value:"() => []"}},{name:"payURL",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"filingLabel",tags:{},type:{name:"string"}}],events:[{name:"total-fee"}],slots:[{name:"header"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/fee-summary/SbcFeeSummary.vue"]};var ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,f=(e,t,r,a)=>{for(var s=a>1?void 0:a?te(t,r):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(s=(a?i(t,r,s):i(s))||s);return a&&s&&ee(t,r,s),s};let c=class extends d{constructor(){super(...arguments);n(this,"FeeSummaryActions",D);n(this,"filingData");n(this,"payApiUrl");n(this,"hasConflicts");n(this,"isLoading");n(this,"confirmLabel");n(this,"errorMessage");n(this,"isSummaryMode")}emitAction(r){}};f([l({default:()=>[]})],c.prototype,"filingData",2);f([l({default:""})],c.prototype,"payApiUrl",2);f([l({default:!1})],c.prototype,"hasConflicts",2);f([l({default:!1})],c.prototype,"isLoading",2);f([l({default:"Confirm"})],c.prototype,"confirmLabel",2);f([l({default:""})],c.prototype,"errorMessage",2);f([l({default:!1})],c.prototype,"isSummaryMode",2);f([U("action")],c.prototype,"emitAction",1);c=f([L({components:{SbcFeeSummary:K}})],c);var re=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("aside",{attrs:{id:"fee-summary"}},[r("sbc-fee-summary",{attrs:{filingData:[...t.filingData],payURL:t.payApiUrl}}),r("v-row",{attrs:{"no-gutters":""}},[t.isSummaryMode?r("v-col",{staticClass:"pt-3 pr-3"},[r("v-btn",{attrs:{id:"back-btn",large:"",loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.BACK)}}},[r("span",[r("v-icon",[t._v("mdi-chevron-left")]),t._v("Back")],1)])],1):t._e(),r("v-col",{staticClass:"pt-3"},[r("v-btn",{attrs:{id:"cancel-btn",large:"",loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.CANCEL)}}},[r("span",[t._v("Cancel")])])],1),r("v-col",{staticClass:"pt-3"},[r("v-btn",{attrs:{id:"save-resume-later-btn",large:"",loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.SAVE_RESUME_LATER)}}},[r("span",[t._v("Save and Resume Later")])])],1),r("v-col",{staticClass:"pt-3"},[r("v-btn",{attrs:{id:"confirm-btn",large:"",disabled:t.hasConflicts,loading:t.isLoading},on:{click:function(a){return t.emitAction(t.FeeSummaryActions.CONFIRM)}}},[r("span",[t._v(t._s(t.confirmLabel)),r("v-icon",[t._v("mdi-chevron-right")])],1)])],1)],1),t.errorMessage?r("div",{staticClass:"error-msg pre-wrap mt-1",domProps:{innerHTML:t._s(t.errorMessage)}}):t._e()],1)},ae=[],P=S(c,re,ae,!1,null,"f5b2597d",null,null);const se=P.exports;P.exports.__docgenInfo={exportName:"default",displayName:"FeeSummary",description:"",tags:{},props:[{name:"filingData",tags:{},description:"Filing information to calculate fees.",type:{name:"Array",elements:[{name:"FilingDataIF"}]},defaultValue:{func:!0,value:"() => []"}},{name:"payApiUrl",tags:{},description:"URL for Sbc Fee Summary component to get fees.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"hasConflicts",tags:{},description:"Indicator that something isn't valid.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isLoading",tags:{},description:"Indicator that there is a request in progress.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"confirmLabel",tags:{},description:"Label for Confirm button.",type:{name:"string"},defaultValue:{func:!1,value:"'Confirm'"}},{name:"errorMessage",tags:{},description:"Message to display if there is an error.",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"isSummaryMode",tags:{},description:"Prop to indicate summary mode.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"action",description:"Emit action event."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/fee-summary/FeeSummary.vue"]};d.filter("currency",e=>`$${e}`);const me={title:"component/FeeSummary"},M=(e,{argTypes:t})=>({props:Object.keys(t),components:{FeeSummary:se},template:'
'}),G=[{filingTypeCode:F.ALTERATION,entityType:q.CORPORATION,priority:!1}],v=M.bind({});v.args={filingData:G,payApiUrl:"https://pay-api-dev.apps.silver.devops.gov.bc.ca/api/v1/",hasConflicts:!1,isLoading:!1,confirmLabel:"Continue",errorMessage:""};const R=M.bind({});R.args={filingData:G,payApiUrl:"https://pay-api-dev.apps.silver.devops.gov.bc.ca/api/v1/",hasConflicts:!1,isLoading:!1,confirmLabel:"File and Pay",errorMessage:"",isSummaryMode:!0};var N,y,C;v.parameters={...v.parameters,docs:{...(N=v.parameters)==null?void 0:N.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + FeeSummary + }, + template: '
' // $props comes from args below +})`,...(C=(y=v.parameters)==null?void 0:y.docs)==null?void 0:C.source}}};var I,h,g;R.parameters={...R.parameters,docs:{...(I=R.parameters)==null?void 0:I.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + FeeSummary + }, + template: '
' // $props comes from args below +})`,...(g=(h=R.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};const ve=["Default","summaryMode"];export{v as Default,ve as __namedExportsOrder,me as default,R as summaryMode}; +//# sourceMappingURL=FeeSummary.stories-e90c5128.js.map diff --git a/docs/assets/FeeSummary.stories-e90c5128.js.map b/docs/assets/FeeSummary.stories-e90c5128.js.map new file mode 100644 index 00000000..42bf85e5 --- /dev/null +++ b/docs/assets/FeeSummary.stories-e90c5128.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FeeSummary.stories-e90c5128.js","sources":["../../src/enums/fee-summary-actions.ts","../../src/enums/filing-codes.ts","../../src/enums/sbc-common-components-constants.ts","../../src/utils/common-util.ts","../../src/utils/config-helper.ts","../../src/services/fee-services.ts","../../src/components/fee-summary/SbcFeeSummary.vue","../../src/components/fee-summary/FeeSummary.vue"],"sourcesContent":["export enum FeeSummaryActions {\n BACK,\n CANCEL,\n CONFIRM,\n SAVE_RESUME_LATER\n}\n","/** Filing codes to send to pay. */\nexport enum FilingCodes {\n ADDRESS_CHANGE_BC = 'BCADD', // BCOMP - Change of Address\n ADDRESS_CHANGE_OT = 'OTADD', // Others - Change of Address\n AGM_EXTENSION = 'AGMDT',\n AGM_LOCATION_CHG = 'AGMLC',\n AFFIDAVIT = 'AFDVT',\n ALTERATION = 'ALTER',\n ALTERATION_BC_TO_ULC = 'NOALU', // More expensive for BC to ULC.\n ANNUAL_REPORT_BC = 'BCANN', // BCOMP - Annual Report\n ANNUAL_REPORT_OT = 'OTANN', // Others - Annual Report\n CHANGE_OF_REGISTRATION = 'FMCHANGE',\n CONSENT_CONTINUATION_OUT = 'CONTO', // All entity types\n CONTINUATION_OUT = 'COUTI', // All entity types\n CORRECTION = 'CRCTN', // Correction - for both BCOMP and Others\n DIRECTOR_CHANGE_BC = 'BCCDR', // BCOMP - Change of Directors\n DIRECTOR_CHANGE_OT = 'OTCDR', // Others - Change of Directors\n DISSOLUTION_ADMINISTRATIVE = 'DIS_ADMIN',\n DISSOLUTION_COURT_ORDERED_LIQUIDATION = 'DIS_COLQD',\n DISSOLUTION_INVOLUNTARY = 'DIS_INVOL',\n DISSOLUTION_RESTORED_IN_ERROR = 'DIS_RSTR',\n DISSOLUTION_VOLUNTARY = 'DIS_VOL',\n DISSOLUTION_VOLUNTARY_LIQUIDATION = 'DIS_LQD',\n FM_CHANGE = 'FMCHANGE',\n FM_CONVERSION = 'FMCONV',\n FM_CORRECTION = 'FMCORR',\n FREE_DIRECTOR_CHANGE_BC = 'BCFDR', // bCOMP - Free Change of Directors\n FREE_DIRECTOR_CHANGE_OT = 'OTFDR', // Others - Free Change of Directors\n INCORPORATION_BC = 'BCINC',\n INCORPORATION_BEN = 'BCINC',\n INCORPORATION_CC = 'BCINC',\n INCORPORATION_CP = 'OTINC',\n INCORPORATION_ULC = 'BCINC',\n REGISTRATION_GP = 'FRREG',\n REGISTRATION_SP = 'FRREG',\n RESTORATION_FULL = 'RESTF', // for BC/BEN/CC/ULC\n RESTORATION_LIMITED = 'RESTL', // for BC/BEN/CC/ULC\n RESTORATION_LTD_EXTEND = 'RESXL', // for BC/BEN/CC/ULC\n RESTORATION_LTD_TO_FULL = 'RESXF', // for BC/BEN/CC/ULC\n SPECIAL_RESOLUTION = 'SPRLN',\n SPECIAL_RESOLUTION_NAME_CHANGE = 'OTCON'\n}\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL',\n BusinessIdentifierKey = 'BUSINESS_ID',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n InvitationToken = 'INV_TOKEN',\n PaginationOptions = 'PAGINATION_OPTIONS',\n PaginationNumberOfItems = 'PAGINATION_NUMBER_OF_ITEMS',\n OrgSearchFilter = 'ORG_SEARCH_FILTER',\n PendingAccountsSearchFilter = 'PENDING_ACCOUNTS_SEARCH_FILTER',\n RejectedAccountsSearchFilter = 'REJECTED_ACCOUNTS_SEARCH_FILTER',\n FasWebUrl = 'FAS_WEB_URL',\n AffidavitNeeded = 'AFFIDAVIT_NEEDED',\n GOVN_USER='AUTH_GOVN_USER',\n PayApiUrl = 'PAY_API_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n UNLINKED_PREMIUM = 'UNLINKED_PREMIUM', // premium accounts without bcol linking\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AdminEdit = 'admin_edit',\n BnEdit = 'bn_edit',\n Staff = 'staff',\n Public = 'public_user',\n Edit = 'edit',\n Basic = 'basic',\n StaffCreateAccounts = 'create_accounts',\n StaffManageAccounts = 'manage_accounts',\n AnonymousUser = 'anonymous_user',\n StaffViewAccounts = 'view_accounts',\n Tester = 'tester',\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n StaffSuspendAccounts = 'suspend_accounts',\n GOVMAccountUser = 'gov_account_user',\n ManageGlCodes = 'manage_gl_codes',\n FasSearch = 'fas_search',\n ViewAllTransactions = 'view_all_transactions'\n}\n\nexport enum Pages {\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard',\n USER_PROFILE = 'userprofile',\n CREATE_ACCOUNT = 'setup-account',\n CREATE_GOVM_ACCOUNT = 'setup-govm-account',\n UPDATE_ACCOUNT = 'update-account',\n CREATE_NON_BCSC_ACCOUNT = 'setup-non-bcsc-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n PENDING_APPROVAL = 'pendingapproval',\n MAIN = 'account',\n SIGNIN = 'signin',\n SIGNOUT = 'signout',\n CREATE_USER_PROFILE = 'createuserprofile',\n SEARCH_BUSINESS = 'searchbusiness',\n USER_PROFILE_TERMS = 'userprofileterms',\n USER_PROFILE_TERMS_DECLINE = 'unauthorizedtermsdecline',\n HOME = 'home',\n SETUP_ACCOUNT_NON_BCSC = 'nonbcsc-info',\n SETUP_ACCOUNT_NON_BCSC_INSTRUCTIONS = 'instructions',\n SETUP_ACCOUNT_NON_BCSC_DOWNLOAD = 'download',\n ACCOUNT_FREEZE_UNLOCK = 'account-freeze-nsf',\n ACCOUNT_FREEZE = 'account-freeze',\n ACCOUNT_UNLOCK_SUCCESS = 'account-unlock-success',\n ACCOUNT_SETTINGS = 'settings',\n EDIT_ACCOUNT_TYPE= '/change-account',\n STAFF_DASHBOARD_OLD= '/searchbusiness',\n STAFF_SETUP_ACCOUNT = 'staff-setup-account',\n CONFIRM_TOKEN = 'confirmtoken',\n ADMIN = '/admin',\n ADMIN_DASHBOARD = '/admin/dashboard',\n STAFF = '/staff',\n STAFF_DASHBOARD = '/staff/dashboard',\n STAFF_DASHBOARD_ACTIVE = '/staff/dashboard/active',\n STAFF_DASHBOARD_REVIEW = '/staff/dashboard/review',\n STAFF_DASHBOARD_REJECTED = '/staff/dashboard/rejected',\n STAFF_DASHBOARD_INVITATIONS = '/staff/dashboard/invitations',\n STAFF_DASHBOARD_SUSPENDED = '/staff/dashboard/suspended',\n MAKE_PAD_PAYMENT = '/make-cc-payment/',\n STAFF_GOVM_SETUP_ACCOUNT = '/staff-govm-setup-account',\n SETUP_GOVM_ACCOUNT_SUCCESS='setup-govm-account-success',\n DUPLICATE_ACCOUNT_WARNING='/duplicate-account-warning',\n AFFIDAVIT_COMPLETE = 'upload-affidavit',\n LOGIN = 'login'\n}\n\nexport enum AccountStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n REJECTED = 'REJECTED',\n PENDING_STAFF_REVIEW = 'PENDING_STAFF_REVIEW',\n PENDING_ACTIVATION = 'PENDING_ACTIVATION',\n NSF_SUSPENDED = 'NSF_SUSPENDED',\n SUSPENDED = 'SUSPENDED',\n PENDING_INVITE_ACCEPT = 'PENDING_INVITE_ACCEPT'\n}\n\n// keep in sync with the pay-api invoice status enum\nexport enum InvoiceStatus {\n APPROVED = 'APPROVED',\n CANCELLED = 'CANCELLED',\n CREATED = 'CREATED',\n CREDITED = 'CREDITED',\n COMPLETED = 'COMPLETED', // NOTE: this === PAID value (api alters it from PAID to COMPLETED in postdump)\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n DELETED = 'DELETED',\n PAID = 'PAID',\n PARTIAL = 'PARTIAL_PAID',\n PENDING = 'PENDING',\n REFUND_REQUESTED = 'REFUND_REQUESTED',\n REFUNDED = 'REFUNDED',\n SETTLEMENT_SCHEDULED = 'SETTLEMENT_SCHED',\n UPDATE_REVENUE_ACCOUNT = 'GL_UPDATED',\n UPDATE_REVENUE_ACCOUNT_REFUND = 'GL_UPDATED_REFUND'\n}\n\nexport enum AffiliationTypes {\n NAME_REQUEST ='Name Request',\n INCORPORATION_APPLICATION = 'Incorporation Application',\n CORPORATION = 'Corporation',\n REGISTRATION = 'Registration'\n}\n\nexport enum FilingTypes {\n INCORPORATION_APPLICATION = 'incorporationApplication',\n REGISTRATION = 'registration'\n}\n\nexport enum LearFilingTypes {\n AMALGAMATION = 'Amalgamation',\n INCORPORATION = 'Incorporation',\n REGISTRATION = 'Registration'\n}\n\n// NB: Corp Type is sometimes called Legal Type\n// see also https://github.com/bcgov/bcrs-shared-components/blob/main/src/modules/corp-type-module/corp-type-module.ts\nexport enum CorpTypes {\n // actual corp types\n BC_CCC = 'CC',\n BC_COMPANY = 'BC',\n BC_ULC_COMPANY = 'ULC',\n BENEFIT_COMPANY = 'BEN',\n COOP = 'CP',\n PARTNERSHIP = 'GP',\n SOLE_PROP = 'SP',\n\n // overloaded values\n INCORPORATION_APPLICATION = 'TMP',\n NAME_REQUEST = 'NR',\n REGISTRATION = 'RTMP'\n}\n\nexport enum NrState {\n APPROVED = 'APPROVED',\n DRAFT = 'DRAFT',\n HOLD = 'HOLD',\n REJECTED = 'REJECTED',\n CONDITION = 'CONDITION',\n CONDITIONAL = 'CONDITIONAL',\n REFUND_REQUESTED = 'REFUND_REQUESTED',\n CANCELLED = 'CANCELLED',\n EXPIRED = 'EXPIRED',\n CONSUMED = 'CONSUMED',\n PROCESSING = 'PROCESSING'\n}\n\nexport enum NrDisplayStates {\n APPROVED = 'Approved',\n HOLD = 'Pending Staff Review',\n DRAFT = 'Draft',\n REJECTED = 'Rejected',\n CONDITIONAL = 'Conditional Approval',\n REFUND_REQUESTED = 'Cancelled, Refund Requested',\n CANCELLED = 'Cancelled',\n EXPIRED = 'Expired',\n CONSUMED = 'Consumed',\n PROCESSING = 'Processing'\n}\n\nexport enum NrConditionalStates {\n RECEIVED = 'R',\n WAIVED = 'N',\n REQUIRED = 'Y',\n}\n\nexport enum NrTargetTypes {\n LEAR = 'lear',\n COLIN = 'colin',\n ONESTOP = 'onestop'\n}\n\nexport enum NrEntityType {\n // BC Entity Types:\n BC = 'BC', // Benefit Company\n CC = 'CC', // Community Contribution Company\n CP = 'CP', // Cooperative Association\n CR = 'CR', // BC Limited Company\n DBA = 'DBA',\n FI = 'FI',\n FR = 'FR',\n GP = 'GP',\n LL = 'LL',\n LP = 'LP',\n PA = 'PA',\n PAR = 'PAR',\n SO = 'SO',\n UL = 'UL', // Unlimited Liability Company\n\n // XPRO Entity Types:\n RLC = 'RLC',\n XCP = 'XCP',\n XCR = 'XCR',\n XLL = 'XLL',\n XLP = 'XLP',\n XSO = 'XSO',\n XUL = 'XUL',\n\n INFO = 'INFO', // special value for sub-menu\n}\n\nexport enum BusinessState {\n ACTIVE = 'Active',\n DRAFT = 'Draft'\n}\n\nexport enum AccessType {\n REGULAR = 'REGULAR',\n EXTRA_PROVINCIAL = 'EXTRA_PROVINCIAL',\n ANONYMOUS = 'ANONYMOUS',\n REGULAR_BCEID = 'REGULAR_BCEID',\n GOVM = 'GOVM',\n GOVN = 'GOVN'\n}\n\nexport enum Permission {\n REMOVE_BUSINESS = 'REMOVE_BUSINESS',\n CHANGE_ADDRESS = 'CHANGE_ADDRESS',\n VIEW_ADDRESS = 'VIEW_ADDRESS',\n CHANGE_ORG_NAME = 'CHANGE_ORG_NAME',\n INVITE_MEMBERS = 'INVITE_MEMBERS',\n CHANGE_ACCOUNT_TYPE = 'CHANGE_ACCOUNT_TYPE',\n CHANGE_ROLE = 'CHANGE_ROLE',\n RESET_PASSWORD = 'RESET_PASSWORD',\n VIEW_ACCOUNT = 'VIEW_ACCOUNT',\n TRANSACTION_HISTORY = 'TRANSACTION_HISTORY',\n MANAGE_STATEMENTS = 'MANAGE_STATEMENTS',\n VIEW_PAYMENT_METHODS = 'VIEW_PAYMENT_METHODS',\n VIEW_ADMIN_CONTACT = 'VIEW_ADMIN_CONTACT',\n RESET_OTP = 'RESET_OTP',\n MAKE_PAYMENT = 'MAKE_PAYMENT',\n GENERATE_INVOICE = 'GENERATE_INVOICE',\n VIEW_AUTH_OPTIONS = 'VIEW_AUTH_OPTIONS',\n CHANGE_AUTH_OPTIONS = 'CHANGE_AUTH_OPTIONS',\n EDIT_REQUEST_PRODUCT_PACKAGE = 'EDIT_REQUEST_PRODUCT_PACKAGE',\n VIEW_ACTIVITYLOG = 'VIEW_ACTIVITYLOG',\n VIEW_REQUEST_PRODUCT_PACKAGE='VIEW_REQUEST_PRODUCT_PACKAGE',\n DEACTIVATE_ACCOUNT='DEACTIVATE_ACCOUNT',\n VIEW_USER_LOGINSOURCE='VIEW_USER_LOGINSOURCE',\n EDIT_BUSINESS_INFO = 'EDIT_BUSINESS_INFO',\n VIEW_DEVELOPER_ACCESS = 'VIEW_DEVELOPER_ACCESS',\n}\n\nexport enum LDFlags {\n AuthLearnMore = 'auth-options-learn-more',\n PaymentTypeAccountCreation = 'payment-type-in-account-creation',\n LinkToNewNameRequestApp ='link-to-new-name-request-app',\n EnableMandatoryAddress = 'enable-mandatory-address',\n EnableGovmInvite = 'enable-govm-account-invite',\n HideProductPackage = 'hide-product-packages',\n EnableOrgNameAutoComplete = 'enable-org-name-auto-complete',\n IaSupportedEntities = 'ia-supported-entities',\n EnableFasDashboard = 'enable-fas-dashboard',\n DisableGovNAccountCreation='disable-govn-account',\n EnableBcCccUlc = 'enable-bc-ccc-ulc',\n ProductBusSearchStatus = 'product-BUSINESS_SEARCH-status',\n ProductBusSearchPremTooltip = 'product-BUSINESS_SEARCH-prem-tooltip',\n ProductCSOStatus = 'product-CSO-status',\n ProductWillsStatus = 'product-VS-status',\n ProductSiteRegistryStatus = 'product-ESRA-status',\n ProductBCAStatus = 'product-BCA-status',\n BusSearchLink = 'bus-search-staff-link',\n EnableDetailsFilter = 'enable-transactions-detail-filter',\n SentryEnable = 'sentry-enable',\n BannerText = 'banner-text'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE'\n}\n\nexport enum SearchFilterCodes {\n DATERANGE = 'daterange',\n USERNAME = 'username',\n ACCOUNTNAME = 'accountname',\n FOLIONUMBER = 'folio'\n}\n\nexport enum PaymentTypes {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n CREDIT_CARD = 'CC',\n BCOL = 'DRAWDOWN',\n DIRECT_PAY = 'DIRECT_PAY',\n EFT = 'EFT',\n INTERNAL = 'INTERNAL',\n NO_FEE = 'NO_FEE',\n ONLINE_BANKING = 'ONLINE_BANKING',\n PAD = 'PAD',\n EJV = 'EJV',\n WIRE = 'WIRE'\n}\n\nexport enum paymentErrorType {\n GENERIC_ERROR = 'GENERIC_ERROR',\n PAYMENT_CANCELLED = 'PAYMENT_CANCELLED',\n DECLINED= 'DECLINED',\n INVALID_CARD_NUMBER = 'INVALID_CARD_NUMBER',\n DECLINED_EXPIRED_CARD = 'DECLINED_EXPIRED_CARD',\n DUPLICATE_ORDER_NUMBER = 'DUPLICATE_ORDER_NUMBER',\n TRANSACTION_TIMEOUT_NO_DEVICE = 'TRANSACTION_TIMEOUT_NO_DEVICE',\n VALIDATION_ERROR = 'VALIDATION_ERROR',\n}\n\nexport enum StaffCreateAccountsTypes {\n DIRECTOR_SEARCH = 'DIRECTOR_SEARCH',\n GOVM_BUSINESS = 'GOVM_BUSINESS'\n}\n\nexport enum ProductStatus {\n NOT_SUBSCRIBED = 'NOT_SUBSCRIBED',\n PENDING_STAFF_REVIEW = 'PENDING_STAFF_REVIEW',\n ACTIVE = 'ACTIVE',\n REJECTED = 'REJECTED',\n}\n\nexport enum TaskRelationshipType {\n ORG = 'ORG',\n PRODUCT = 'PRODUCT',\n USER = 'USER'\n}\n\nexport enum TaskRelationshipStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n REJECTED = 'REJECTED',\n PENDING_STAFF_REVIEW = 'PENDING_STAFF_REVIEW',\n PENDING_ACTIVATION = 'PENDING_ACTIVATION',\n PENDING_INVITE_ACCEPT = 'PENDING_INVITE_ACCEPT',\n HOLD = 'HOLD'\n}\n\nexport enum TaskStatus {\n OPEN = 'OPEN',\n COMPLETED = 'COMPLETED',\n HOLD = 'HOLD'\n}\n\nexport enum TaskType {\n NEW_ACCOUNT_STAFF_REVIEW = 'New Account',\n GOVM_REVIEW = 'GovM',\n GOVN_REVIEW = 'GovN',\n BCEID_ADMIN_REVIEW = 'BCeID Admin'\n}\n\nexport enum TaskAction {\n AFFIDAVIT_REVIEW = 'AFFIDAVIT_REVIEW',\n ACCOUNT_REVIEW = 'ACCOUNT_REVIEW',\n PRODUCT_REVIEW = 'PRODUCT_REVIEW'\n}\n\nexport enum FeeCodes {\n PPR_CHANGE_OR_AMENDMENT = 'TRF'\n}\n\nexport enum DisplayModeValues{\n VIEW_ONLY = 'VIEW_ONLY'\n}\n\nexport enum OnholdOrRejectCode {\n ONHOLD = 'On Hold',\n REJECTED = 'Reject Account'\n}\n\nexport const ORG_AUTO_COMPLETE_MAX_RESULTS_COUNT = 5\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account']\n\nexport const DEACTIVATE_ACCOUNT_MESSAGE : Map = new Map([\n ['OUTSTANDING_CREDIT', 'deactivateCreditAccountMsg'],\n ['TRANSACTIONS_IN_PROGRESS', 'deactivateActiveTransactionsMsg'],\n ['DEFAULT', 'deactivateGenericMsg']\n])\n\nexport enum AffidavitStatus {\n PENDING = 'PENDING',\n APPROVED = 'APPROVED',\n REJECTED = 'REJECTED',\n INACTIVE = 'INACTIVE'\n}\n\nexport enum AffidavitNumberStatus {\n PENDING = 'Pending'\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus',\n UPDATE_ACCESS_TYPE = 'updateAccessType'\n}\n\nexport enum RequestTrackerType {\n InformCRA = 'INFORM_CRA',\n ChangeDeliveryAddress = 'CHANGE_DELIVERY_ADDRESS',\n ChangeMailingAddress = 'CHANGE_MAILING_ADDRESS',\n ChangeName = 'CHANGE_NAME',\n ChangeStatus = 'CHANGE_STATUS',\n ChangeParty = 'CHANGE_PARTY',\n}\n\nexport enum Product {\n BCA = 'BCA',\n BUSINESS = 'BUSINESS',\n BUSINESS_SEARCH = 'BUSINESS_SEARCH',\n CSO = 'CSO',\n ESRA = 'ESRA',\n MHR = 'MHR',\n PPR = 'PPR',\n RPPR = 'RPPR',\n RPT = 'RPT',\n VS = 'VS'\n}\n\nexport enum EntityAlertTypes {\n FROZEN = 'FROZEN',\n BADSTANDING = 'BAD_STANDING',\n LIQUIDATION = 'LIQUIDATION',\n DISSOLUTION = 'DISSOLUTION',\n PROCESSING = 'PROCESSING',\n EXPIRED = 'EXPIRED'\n}\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from '../enums/sbc-common-components-constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from '@/enums/sbc-common-components-constants'\nimport { trimTrailingSlashURL } from '@/utils/common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","import Axios from 'axios'\nimport { Fee, FilingData, PayData } from '@/interfaces'\nimport ConfigHelper from '@/utils/config-helper'\nimport { SessionStorageKeys } from '@/enums/sbc-common-components-constants'\n\n// sample Microcks URLs =\n// https://mock-lear-tools.pathfinder.gov.bc.ca/rest/SBC+Pay+API+Reference/1.0.1/api/v1/fees/CP/OTANN\n// https://mock-lear-tools.pathfinder.gov.bc.ca/rest/SBC+Pay+API+Reference/1.0.1/api/v1/fees/CP/OTADD\nconst API_URL = 'https://pay-api-dev.pathfinder.gov.bc.ca/api/v1/fees'\n\nexport default {\n getFee (filingData: FilingData[], payApiUrl: string) : Promise {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n const accountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || 0\n\n if (filingData.length < 1) {\n Promise.resolve()\n }\n\n const promises = []\n for (const filing of filingData) {\n if (!filing.filingTypeCode) {\n Promise.resolve()\n }\n const url = prepareUrl(filing, payApiUrl)\n promises.push(Axios.get(url, { headers: { Authorization: `Bearer ${token}`, 'Account-Id': accountId } }))\n }\n\n return Axios.all(promises)\n .then(Axios.spread((...args) => {\n // customise the response here\n return args\n .map(response => response.data as PayData)\n .map(data => {\n const filingDatum = filingData.find(fd => fd.filingTypeCode === data.filingTypeCode)\n // default the title if client hasn't passed this on\n const filingType = (filingDatum && filingDatum.filingDescription)\n ? filingDatum.filingDescription\n : data.filingType\n const fee = data.filingFees\n const priorityFees = (data.priorityFees) || 0\n const futureEffectiveFees = (data.futureEffectiveFees) || 0\n const serviceFees = (data.serviceFees) || 0\n const total = (data.total) || 0\n return { fee, filingType, priorityFees, futureEffectiveFees, serviceFees, total } as Fee\n })\n }))\n .catch(error => {\n switch (error.response && error.response.status) {\n case 400:\n // eslint-disable-next-line no-console\n console.log('%c FeeModule-ERROR: Probably fee code mismatch %s', 'color: red; font-size: 13px',\n JSON.stringify(filingData))\n break\n case 500:\n // eslint-disable-next-line no-console\n console.log('%c FeeModule-ERROR: Probably invalid Token %s', 'color: red; font-size: 13px',\n JSON.stringify(filingData))\n break\n default:\n // eslint-disable-next-line no-console\n console.log('%c FeeModule-ERROR: Probably unknown Error %s', 'color: red; font-size: 13px',\n JSON.stringify(filingData))\n }\n return []\n })\n }\n}\n\nconst prepareUrl = (filing: FilingData, payApiUrl: string) => {\n const queryParams = []\n if (filing.waiveFees) {\n queryParams.push(`waiveFees=${!!filing.waiveFees}`)\n }\n if (filing.priority) {\n queryParams.push(`priority=${!!filing.priority}`)\n }\n if (filing.futureEffective) {\n queryParams.push(`futureEffective=${!!filing.futureEffective}`)\n }\n let url = `${payApiUrl}fees/${filing.entityType}/${filing.filingTypeCode}`\n if (queryParams.length) {\n url += `?${queryParams.join('&')}`\n }\n return url\n}\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["FeeSummaryActions","FeeSummaryActions2","FilingCodes","SessionStorageKeys","trimTrailingSlashURL","url","ConfigHelper","key","value","keycloakConfigUrl","__publicField","FeeServices","filingData","payApiUrl","token","accountId","promises","filing","prepareUrl","Axios","args","response","data","filingDatum","fd","filingType","fee","priorityFees","futureEffectiveFees","serviceFees","total","error","queryParams","SbcFeeSummary","Vue","f","acc","item","val","oldVal","__decorateClass","Prop","Watch","Emit","Component","FeeSummary","action"],"mappings":"2cAAY,IAAAA,GAAAA,IACVA,EAAAC,EAAA,KAAA,CAAA,EAAA,OACAD,EAAAC,EAAA,OAAA,CAAA,EAAA,SACAD,EAAAC,EAAA,QAAA,CAAA,EAAA,UACAD,EAAAC,EAAA,kBAAA,CAAA,EAAA,oBAJUD,IAAAA,GAAA,CAAA,CAAA,ECCAE,GAAAA,IACVA,EAAA,kBAAoB,QACpBA,EAAA,kBAAoB,QACpBA,EAAA,cAAgB,QAChBA,EAAA,iBAAmB,QACnBA,EAAA,UAAY,QACZA,EAAA,WAAa,QACbA,EAAA,qBAAuB,QACvBA,EAAA,iBAAmB,QACnBA,EAAA,iBAAmB,QACnBA,EAAA,uBAAyB,WACzBA,EAAA,yBAA2B,QAC3BA,EAAA,iBAAmB,QACnBA,EAAA,WAAa,QACbA,EAAA,mBAAqB,QACrBA,EAAA,mBAAqB,QACrBA,EAAA,2BAA6B,YAC7BA,EAAA,sCAAwC,YACxCA,EAAA,wBAA0B,YAC1BA,EAAA,8BAAgC,WAChCA,EAAA,sBAAwB,UACxBA,EAAA,kCAAoC,UACpCA,EAAA,UAAY,WACZA,EAAA,cAAgB,SAChBA,EAAA,cAAgB,SAChBA,EAAA,wBAA0B,QAC1BA,EAAA,wBAA0B,QAC1BA,EAAA,iBAAmB,QACnBA,EAAA,kBAAoB,QACpBA,EAAA,iBAAmB,QACnBA,EAAA,iBAAmB,QACnBA,EAAA,kBAAoB,QACpBA,EAAA,gBAAkB,QAClBA,EAAA,gBAAkB,QAClBA,EAAA,iBAAmB,QACnBA,EAAA,oBAAsB,QACtBA,EAAA,uBAAyB,QACzBA,EAAA,wBAA0B,QAC1BA,EAAA,mBAAqB,QACrBA,EAAA,+BAAiC,QAvCvBA,IAAAA,GAAA,CAAA,CAAA,ECDAC,GAAAA,IACVA,EAAA,cAAgB,iBAChBA,EAAA,qBAAuB,yBAC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,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAVAI,EAUA,UAAA,eAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAbAI,EAaA,UAAA,YAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,UAAA,CAAA,EAhBAI,EAgBA,UAAA,eAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAnBAI,EAmBA,UAAA,eAAA,CAAA,EAGAL,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAtBAI,EAsBA,UAAA,gBAAA,CAAA,EAKAL,EAAA,CAFAG,EAAA,QAAA,CAAA,EAzBAE,EA2BA,UAAA,aAAA,CAAA,EA3BAA,EAAAL,EAAA,CAHAI,EAAA,CACA,WAAA,CAAA,cAAAX,CAAA,CAAA,CACA,CAAA,EACAY,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/FolioNumber.stories-99b64f01.js b/docs/assets/FolioNumber.stories-9ad4d3a6.js similarity index 84% rename from docs/assets/FolioNumber.stories-99b64f01.js rename to docs/assets/FolioNumber.stories-9ad4d3a6.js index 2fbf90b9..da8ae9a9 100644 --- a/docs/assets/FolioNumber.stories-99b64f01.js +++ b/docs/assets/FolioNumber.stories-9ad4d3a6.js @@ -1,4 +1,4 @@ -var E=Object.defineProperty;var x=(i,e,o)=>e in i?E(i,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[e]=o;var a=(i,e,o)=>(x(i,typeof e!="symbol"?e+"":e,o),o);import{V as L}from"./vue.esm-b1e57a2f.js";import{E as f,C as S,P as l,n as $}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as V}from"./Watch-62f8b699.js";var A=Object.defineProperty,O=Object.getOwnPropertyDescriptor,n=(i,e,o,t)=>{for(var r=t>1?void 0:t?O(e,o):e,m=i.length-1,p;m>=0;m--)(p=i[m])&&(r=(t?p(e,o,r):p(r))||r);return t&&r&&A(e,o,r),r};let s=class extends L{constructor(){super(...arguments);a(this,"initialValue");a(this,"originalValue");a(this,"hideActions");a(this,"editLabel");a(this,"editedLabel");a(this,"invalidSection");a(this,"isEditing",!1);a(this,"formValid",!1);a(this,"folioNumber","");a(this,"dropdown",!1);a(this,"rules",[o=>!o||o.length<=30||"Maximum 30 characters reached"])}get hasFolioNumberChanged(){const o=this.folioNumber||null,t=this.originalValue||null;return o!==t}onUndoClicked(){this.folioNumber=this.originalValue,this.emitNewFolioNumber(),this.emitHaveChanges(),this.isEditing=!1}onFormSubmit(){this.formValid&&(this.emitNewFolioNumber(),this.emitHaveChanges(),this.isEditing=!1)}onCancelClicked(){this.folioNumber=this.initialValue,this.isEditing=!1}onInitialValueChanged(){this.folioNumber=this.initialValue}emitNewFolioNumber(){return this.folioNumber}emitHaveChanges(){return this.hasFolioNumberChanged}emitIsEditing(o){}};n([l({default:null})],s.prototype,"initialValue",2);n([l({default:null})],s.prototype,"originalValue",2);n([l({default:!1})],s.prototype,"hideActions",2);n([l()],s.prototype,"editLabel",2);n([l()],s.prototype,"editedLabel",2);n([l({default:!1})],s.prototype,"invalidSection",2);n([V("initialValue",{deep:!0,immediate:!0})],s.prototype,"onInitialValueChanged",1);n([f("newFolioNumber")],s.prototype,"emitNewFolioNumber",1);n([f("haveChanges")],s.prototype,"emitHaveChanges",1);n([V("isEditing"),f("isEditing")],s.prototype,"emitIsEditing",1);s=n([S({})],s);var P=function(){var e=this,o=e._self._c;return e._self._setupProxy,o("div",{attrs:{id:"folio-number"}},[e.isEditing?o("v-form",{attrs:{id:"edit-folio-number"},on:{submit:function(t){return t.preventDefault(),e.onFormSubmit()}},model:{value:e.formValid,callback:function(t){e.formValid=t},expression:"formValid"}},[o("v-row",{attrs:{"no-gutters":""}},[o("v-col",{attrs:{cols:"3"}},[o("label",{class:{"error-text":e.invalidSection}},[o("strong",[e._v("Business Folio or"),o("br"),e._v("Reference Number")])])]),o("v-col",{attrs:{cols:"9"}})],1),o("v-row",{attrs:{"no-gutters":""}},[o("v-col",{attrs:{cols:"3"}}),o("v-col",{staticClass:"my-4",attrs:{cols:"9"}},[o("p",[e._v(" This is the Folio or Reference Number for this business for your own tracking purposes. There is no fee to change this number. Any changes made will be applied immediately. ")])])],1),o("v-row",{attrs:{"no-gutters":""}},[o("v-col",{attrs:{cols:"3"}}),o("v-col",{attrs:{cols:"9"}},[o("v-text-field",{attrs:{id:"folio-number-input",filled:"","persistent-hint":"",autocomplete:"chrome-off",label:"Folio or Reference Number (Optional)",name:Math.random(),rules:e.rules},model:{value:e.folioNumber,callback:function(t){e.folioNumber=t},expression:"folioNumber"}})],1)],1),o("v-row",{attrs:{"no-gutters":""}},[o("v-col",[o("div",{staticClass:"form-actions"},[o("v-btn",{staticClass:"save-button",attrs:{large:"",color:"primary",type:"submit",value:"Submit"}},[o("span",[e._v("Save")])]),o("v-btn",{staticClass:"cancel-button",attrs:{large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[o("span",[e._v("Cancel")])])],1)])],1)],1):o("v-row",{attrs:{id:"display-folio-number","no-gutters":""}},[o("v-col",{attrs:{cols:"3"}},[o("label",{staticClass:"reference-number-label"},[o("div",[e._v("Business Folio or"),o("br"),e._v("Reference Number")]),e.hasFolioNumberChanged?o("v-chip",{attrs:{"x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" "+e._s(e.editedLabel)+" ")]):e._e()],1)]),o("v-col",{attrs:{cols:e.hideActions?"9":"7"}},[o("div",{attrs:{id:"folio-number-readonly"}},[e._v(" "+e._s(e.folioNumber?e.folioNumber:"None")+" ")])]),e.hideActions?e._e():o("v-col",{staticClass:"mt-n2",attrs:{cols:"2"}},[o("div",{staticClass:"edit-actions mr-4"},[e.hasFolioNumberChanged?o("v-btn",{staticClass:"undo-button",attrs:{text:"",color:"primary"},on:{click:function(t){return e.onUndoClicked()}}},[o("v-icon",{attrs:{small:""}},[e._v(" mdi-undo ")]),o("span",[e._v("Undo")])],1):o("v-tooltip",{attrs:{top:"","nudge-right":"3","content-class":"top-tooltip",transition:"fade-transition"},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[o("v-btn",e._g({staticClass:"edit-button",attrs:{text:"",color:"primary"},on:{click:function(r){e.isEditing=!0}}},t),[o("v-icon",{attrs:{small:""}},[e._v(" mdi-pencil ")]),o("span",[e._v(e._s(e.editLabel))])],1)]}}],null,!1,3261953394)},[o("span",[e._v("No fee to change")])]),e.hasFolioNumberChanged?o("span",{staticClass:"drop-down-actions"},[o("v-menu",{attrs:{"offset-y":"",left:"","nudge-bottom":"4"},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[o("v-btn",e._g({staticClass:"more-button",attrs:{text:"",small:"",color:"primary"}},t),[o("v-icon",[e._v(e._s(e.dropdown?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!1,3067832248),model:{value:e.dropdown,callback:function(t){e.dropdown=t},expression:"dropdown"}},[o("v-list",[o("v-list-item",{staticClass:"v-list-item change-button",on:{click:function(t){e.isEditing=!0,e.dropdown=!1}}},[o("v-list-item-subtitle",[o("v-icon",{attrs:{small:"",color:"primary"}},[e._v("mdi-pencil")]),o("span",{staticClass:"drop-down-action ml-1"},[e._v("Change")])],1)],1)],1)],1)],1):e._e()],1)])],1)],1)},T=[],k=$(s,P,T,!1,null,"27d9dbbd",null,null);const I=k.exports;k.exports.__docgenInfo={exportName:"default",displayName:"FolioNumber",description:"",tags:{},props:[{name:"initialValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"originalValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"hideActions",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editLabel",tags:{},type:{name:"string"}},{name:"editedLabel",tags:{},type:{name:"string"}},{name:"invalidSection",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"newFolioNumber",description:"Informs parent of new folio number."},{name:"haveChanges",description:"Informs parent whether we have changes."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/folio-number/FolioNumber.vue"]};const B={title:"component/FolioNumber"},b=(i,{argTypes:e})=>({props:Object.keys(e),components:{FolioNumber:I},template:` +var E=Object.defineProperty;var x=(i,e,o)=>e in i?E(i,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[e]=o;var s=(i,e,o)=>(x(i,typeof e!="symbol"?e+"":e,o),o);import{V as L}from"./vue.esm-b1e57a2f.js";import{E as f,C as S,P as l,n as $}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as V}from"./Watch-62f8b699.js";var A=Object.defineProperty,O=Object.getOwnPropertyDescriptor,n=(i,e,o,t)=>{for(var r=t>1?void 0:t?O(e,o):e,m=i.length-1,p;m>=0;m--)(p=i[m])&&(r=(t?p(e,o,r):p(r))||r);return t&&r&&A(e,o,r),r};let a=class extends L{constructor(){super(...arguments);s(this,"initialValue");s(this,"originalValue");s(this,"hideActions");s(this,"editLabel");s(this,"editedLabel");s(this,"invalidSection");s(this,"isEditing",!1);s(this,"formValid",!1);s(this,"folioNumber","");s(this,"dropdown",!1);s(this,"rules",[o=>!o||o.length<=30||"Maximum 30 characters reached"])}get hasFolioNumberChanged(){const o=this.folioNumber||null,t=this.originalValue||null;return o!==t}onUndoClicked(){this.folioNumber=this.originalValue,this.emitNewFolioNumber(),this.emitHaveChanges(),this.isEditing=!1}onFormSubmit(){this.formValid&&(this.emitNewFolioNumber(),this.emitHaveChanges(),this.isEditing=!1)}onCancelClicked(){this.folioNumber=this.initialValue,this.isEditing=!1}onInitialValueChanged(){this.folioNumber=this.initialValue}emitNewFolioNumber(){return this.folioNumber}emitHaveChanges(){return this.hasFolioNumberChanged}emitIsEditing(o){}};n([l({default:null})],a.prototype,"initialValue",2);n([l({default:null})],a.prototype,"originalValue",2);n([l({default:!1})],a.prototype,"hideActions",2);n([l()],a.prototype,"editLabel",2);n([l()],a.prototype,"editedLabel",2);n([l({default:!1})],a.prototype,"invalidSection",2);n([V("initialValue",{deep:!0,immediate:!0})],a.prototype,"onInitialValueChanged",1);n([f("newFolioNumber")],a.prototype,"emitNewFolioNumber",1);n([f("haveChanges")],a.prototype,"emitHaveChanges",1);n([V("isEditing"),f("isEditing")],a.prototype,"emitIsEditing",1);a=n([S({})],a);var P=function(){var e=this,o=e._self._c;return e._self._setupProxy,o("div",{attrs:{id:"folio-number"}},[e.isEditing?o("v-form",{attrs:{id:"edit-folio-number"},on:{submit:function(t){return t.preventDefault(),e.onFormSubmit()}},model:{value:e.formValid,callback:function(t){e.formValid=t},expression:"formValid"}},[o("v-row",{attrs:{"no-gutters":""}},[o("v-col",{attrs:{cols:"3"}},[o("label",{class:{"error-text":e.invalidSection}},[o("strong",[e._v("Business Folio or"),o("br"),e._v("Reference Number")])])]),o("v-col",{attrs:{cols:"9"}})],1),o("v-row",{attrs:{"no-gutters":""}},[o("v-col",{attrs:{cols:"3"}}),o("v-col",{staticClass:"my-4",attrs:{cols:"9"}},[o("p",[e._v(" This is the Folio or Reference Number for this business for your own tracking purposes. There is no fee to change this number. Any changes made will be applied immediately. ")])])],1),o("v-row",{attrs:{"no-gutters":""}},[o("v-col",{attrs:{cols:"3"}}),o("v-col",{attrs:{cols:"9"}},[o("v-text-field",{attrs:{id:"folio-number-input",filled:"","persistent-hint":"",autocomplete:"chrome-off",label:"Folio or Reference Number (Optional)",name:Math.random(),rules:e.rules},model:{value:e.folioNumber,callback:function(t){e.folioNumber=t},expression:"folioNumber"}})],1)],1),o("v-row",{attrs:{"no-gutters":""}},[o("v-col",[o("div",{staticClass:"form-actions"},[o("v-btn",{staticClass:"save-button",attrs:{large:"",color:"primary",type:"submit",value:"Submit"}},[o("span",[e._v("Save")])]),o("v-btn",{staticClass:"cancel-button",attrs:{large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[o("span",[e._v("Cancel")])])],1)])],1)],1):o("v-row",{attrs:{id:"display-folio-number","no-gutters":""}},[o("v-col",{attrs:{cols:"3"}},[o("label",{staticClass:"reference-number-label"},[o("div",[e._v("Business Folio or"),o("br"),e._v("Reference Number")]),e.hasFolioNumberChanged?o("v-chip",{attrs:{"x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" "+e._s(e.editedLabel)+" ")]):e._e()],1)]),o("v-col",{attrs:{cols:e.hideActions?"9":"7"}},[o("div",{attrs:{id:"folio-number-readonly"}},[e._v(" "+e._s(e.folioNumber?e.folioNumber:"None")+" ")])]),e.hideActions?e._e():o("v-col",{staticClass:"mt-n2",attrs:{cols:"2"}},[o("div",{staticClass:"edit-actions mr-4"},[e.hasFolioNumberChanged?o("v-btn",{staticClass:"undo-button",attrs:{text:"",color:"primary"},on:{click:function(t){return e.onUndoClicked()}}},[o("v-icon",{attrs:{small:""}},[e._v(" mdi-undo ")]),o("span",[e._v("Undo")])],1):o("v-tooltip",{attrs:{top:"","nudge-right":"3","content-class":"top-tooltip",transition:"fade-transition"},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[o("v-btn",e._g({staticClass:"edit-button",attrs:{text:"",color:"primary"},on:{click:function(r){e.isEditing=!0}}},t),[o("v-icon",{attrs:{small:""}},[e._v(" mdi-pencil ")]),o("span",[e._v(e._s(e.editLabel))])],1)]}}],null,!1,3261953394)},[o("span",[e._v("No fee to change")])]),e.hasFolioNumberChanged?o("span",{staticClass:"drop-down-actions"},[o("v-menu",{attrs:{"offset-y":"",left:"","nudge-bottom":"4"},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[o("v-btn",e._g({staticClass:"more-button",attrs:{text:"",small:"",color:"primary"}},t),[o("v-icon",[e._v(e._s(e.dropdown?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!1,3067832248),model:{value:e.dropdown,callback:function(t){e.dropdown=t},expression:"dropdown"}},[o("v-list",[o("v-list-item",{staticClass:"v-list-item change-button",on:{click:function(t){e.isEditing=!0,e.dropdown=!1}}},[o("v-list-item-subtitle",[o("v-icon",{attrs:{small:"",color:"primary"}},[e._v("mdi-pencil")]),o("span",{staticClass:"drop-down-action ml-1"},[e._v("Change")])],1)],1)],1)],1)],1):e._e()],1)])],1)],1)},T=[],k=$(a,P,T,!1,null,"27d9dbbd",null,null);const I=k.exports;k.exports.__docgenInfo={exportName:"default",displayName:"FolioNumber",description:"",tags:{},props:[{name:"initialValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"originalValue",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"hideActions",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editLabel",tags:{},type:{name:"string"}},{name:"editedLabel",tags:{},type:{name:"string"}},{name:"invalidSection",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"newFolioNumber",description:"Informs parent of new folio number."},{name:"haveChanges",description:"Informs parent whether we have changes."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/folio-number/FolioNumber.vue"]};const B={title:"component/FolioNumber"},b=(i,{argTypes:e})=>({props:Object.keys(e),components:{FolioNumber:I},template:`
@@ -42,4 +42,4 @@ var E=Object.defineProperty;var x=(i,e,o)=>e in i?E(i,e,{enumerable:!0,configura \` })`,...(F=(w=d.parameters)==null?void 0:w.docs)==null?void 0:F.source}}};const U=["folioNumberNoProps","folioNumberWithData","folioNumberHideActions"];export{U as __namedExportsOrder,B as default,d as folioNumberHideActions,c as folioNumberNoProps,u as folioNumberWithData}; -//# sourceMappingURL=FolioNumber.stories-99b64f01.js.map +//# sourceMappingURL=FolioNumber.stories-9ad4d3a6.js.map diff --git a/docs/assets/FolioNumber.stories-99b64f01.js.map b/docs/assets/FolioNumber.stories-9ad4d3a6.js.map similarity index 99% rename from docs/assets/FolioNumber.stories-99b64f01.js.map rename to docs/assets/FolioNumber.stories-9ad4d3a6.js.map index 9bcc75b6..eb2e9552 100644 --- a/docs/assets/FolioNumber.stories-99b64f01.js.map +++ b/docs/assets/FolioNumber.stories-9ad4d3a6.js.map @@ -1 +1 @@ -{"version":3,"file":"FolioNumber.stories-99b64f01.js","sources":["../../src/components/folio-number/FolioNumber.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["FolioNumber","Vue","__publicField","v","fn","ov","val","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ygBAqMA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,qBACAA,EAAA,sBACAA,EAAA,oBACAA,EAAA,kBACAA,EAAA,oBACAA,EAAA,uBAGAA,EAAA,iBAAA,IACAA,EAAA,iBAAA,IACAA,EAAA,mBAAA,IACAA,EAAA,gBAAA,IAGAA,EAAA,aAAA,CACAC,GAAA,CAAAA,GAAAA,EAAA,QAAA,IAAA,+BAAA,GAIA,IAAA,uBAAA,CACA,MAAAC,EAAA,KAAA,aAAA,KACAC,EAAA,KAAA,eAAA,KACA,OAAAD,IAAAC,CACA,CAGA,eAAA,CACA,KAAA,YAAA,KAAA,cACA,KAAA,mBAAA,EACA,KAAA,gBAAA,EACA,KAAA,UAAA,EACA,CAGA,cAAA,CACA,KAAA,YACA,KAAA,mBAAA,EACA,KAAA,gBAAA,EACA,KAAA,UAAA,GAEA,CAGA,iBAAA,CACA,KAAA,YAAA,KAAA,aACA,KAAA,UAAA,EACA,CAIA,uBAAA,CACA,KAAA,YAAA,KAAA,YACA,CAIA,oBAAA,CACA,OAAA,KAAA,WACA,CAIA,iBAAA,CACA,OAAA,KAAA,qBACA,CAMA,cAAAC,EAAA,CAAA,CACA,EAvEAC,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAFAR,EAEA,UAAA,eAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAHAR,EAGA,UAAA,gBAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAJAR,EAIA,UAAA,cAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,EALAR,EAKA,UAAA,YAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,EANAR,EAMA,UAAA,cAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAPAR,EAOA,UAAA,iBAAA,CAAA,EA6CAO,EAAA,CADAE,EAAA,eAAA,CAAA,KAAA,GAAA,UAAA,GAAA,CAAA,EAnDAT,EAoDA,UAAA,wBAAA,CAAA,EAMAO,EAAA,CADAG,EAAA,gBAAA,CAAA,EAzDAV,EA0DA,UAAA,qBAAA,CAAA,EAMAO,EAAA,CADAG,EAAA,aAAA,CAAA,EA/DAV,EAgEA,UAAA,kBAAA,CAAA,EAQAO,EAAA,CAHAE,EAAA,WAAA,EACAC,EAAA,WAAA,CAAA,EAtEAV,EAwEA,UAAA,gBAAA,CAAA,EAxEAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"FolioNumber.stories-9ad4d3a6.js","sources":["../../src/components/folio-number/FolioNumber.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["FolioNumber","Vue","__publicField","v","fn","ov","val","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ygBAqMA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,qBACAA,EAAA,sBACAA,EAAA,oBACAA,EAAA,kBACAA,EAAA,oBACAA,EAAA,uBAGAA,EAAA,iBAAA,IACAA,EAAA,iBAAA,IACAA,EAAA,mBAAA,IACAA,EAAA,gBAAA,IAGAA,EAAA,aAAA,CACAC,GAAA,CAAAA,GAAAA,EAAA,QAAA,IAAA,+BAAA,GAIA,IAAA,uBAAA,CACA,MAAAC,EAAA,KAAA,aAAA,KACAC,EAAA,KAAA,eAAA,KACA,OAAAD,IAAAC,CACA,CAGA,eAAA,CACA,KAAA,YAAA,KAAA,cACA,KAAA,mBAAA,EACA,KAAA,gBAAA,EACA,KAAA,UAAA,EACA,CAGA,cAAA,CACA,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NumberInput-cf343253.js similarity index 59% rename from docs/assets/FolioNumberInput-d9d8b85a.js rename to docs/assets/FolioNumberInput-cf343253.js index 511a9f0f..8a9241c5 100644 --- a/docs/assets/FolioNumberInput-d9d8b85a.js +++ b/docs/assets/FolioNumberInput-cf343253.js @@ -1,2 +1,2 @@ -var c=Object.defineProperty;var v=(t,e,o)=>e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var s=(t,e,o)=>(v(t,typeof e!="symbol"?e+"":e,o),o);import{V as b}from"./vue.esm-b1e57a2f.js";import{C as F,P as u,E as f,n as h}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as d}from"./Watch-62f8b699.js";var N=Object.defineProperty,_=Object.getOwnPropertyDescriptor,r=(t,e,o,i)=>{for(var a=i>1?void 0:i?_(e,o):e,n=t.length-1,m;n>=0;n--)(m=t[n])&&(a=(i?m(e,o,a):m(a))||a);return i&&a&&N(e,o,a),a};let l=class extends b{constructor(){super(...arguments);s(this,"$refs");s(this,"validate");s(this,"folioNumber");s(this,"disabled");s(this,"folioFormValid",!1)}get folioNumberRules(){return[o=>!o||!this.validate||o.length<=50||"Cannot exceed 50 characters"]}emitValid(){return this.folioFormValid}emitFocus(o){}emitFolioNumber(o){}validateField(){this.validate&&(this.validateFolioNumber(),this.emitValid())}resetFolioNumber(){this.$refs.folioForm.reset()}resetFolioNumberValidation(){this.$refs.folioForm.resetValidation()}validateFolioNumber(){return this.$refs.folioForm.validate()}};r([u({default:!1})],l.prototype,"validate",2);r([u({default:null})],l.prototype,"folioNumber",2);r([u({default:!1})],l.prototype,"disabled",2);r([f("valid")],l.prototype,"emitValid",1);r([f("focus")],l.prototype,"emitFocus",1);r([f("emitFolioNumber")],l.prototype,"emitFolioNumber",1);r([d("folioFormValid"),d("validate")],l.prototype,"validateField",1);l=r([F({})],l);var V=function(){var e=this,o=e._self._c;return e._self._setupProxy,o("v-form",{ref:"folioForm",attrs:{id:"folio-number-form"},model:{value:e.folioFormValid,callback:function(i){e.folioFormValid=i},expression:"folioFormValid"}},[o("v-text-field",{attrs:{id:"folio-number-textfield",filled:"",label:"Folio Number (Optional)",value:e.folioNumber,rules:e.folioNumberRules,disabled:e.disabled,autocomplete:"chrome-off",name:Math.random()},on:{input:function(i){return e.emitFolioNumber(i)},focus:function(i){return e.emitFocus(i)}}})],1)},y=[],p=h(l,V,y,!1,null,null,null,null);const E=p.exports;p.exports.__docgenInfo={exportName:"default",displayName:"FolioNumberInput",description:"",tags:{},props:[{name:"validate",tags:{},description:"Whether to validate the fields.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"folioNumber",tags:{},description:"Folio Number prop.",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"disabled",tags:{},description:"Disabled prop.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"valid",description:"Emits an event indicating whether or not this component is valid."},{name:"focus",description:"Emits an event indicating whether or not this component is focused."},{name:"emitFolioNumber",description:"Emits an event to update the Folio Number."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/folio-number-input/FolioNumberInput.vue"]};export{E as F}; -//# sourceMappingURL=FolioNumberInput-d9d8b85a.js.map +var c=Object.defineProperty;var b=(t,e,o)=>e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var n=(t,e,o)=>(b(t,typeof e!="symbol"?e+"":e,o),o);import{V as v}from"./vue.esm-b1e57a2f.js";import{C as F,P as u,E as d,n as h}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as f}from"./Watch-62f8b699.js";var N=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(t,e,o,i)=>{for(var r=i>1?void 0:i?_(e,o):e,s=t.length-1,m;s>=0;s--)(m=t[s])&&(r=(i?m(e,o,r):m(r))||r);return i&&r&&N(e,o,r),r};let l=class extends v{constructor(){super(...arguments);n(this,"$refs");n(this,"validate");n(this,"folioNumber");n(this,"disabled");n(this,"folioFormValid",!1)}get folioNumberRules(){return[o=>!o||!this.validate||o.length<=50||"Cannot exceed 50 characters"]}emitValid(){return this.folioFormValid}emitFocus(o){}emitFolioNumber(o){}validateField(){this.validate&&(this.validateFolioNumber(),this.emitValid())}resetFolioNumber(){this.$refs.folioForm.reset()}resetFolioNumberValidation(){this.$refs.folioForm.resetValidation()}validateFolioNumber(){return this.$refs.folioForm.validate()}};a([u({default:!1})],l.prototype,"validate",2);a([u({default:null})],l.prototype,"folioNumber",2);a([u({default:!1})],l.prototype,"disabled",2);a([d("valid")],l.prototype,"emitValid",1);a([d("focus")],l.prototype,"emitFocus",1);a([d("emitFolioNumber")],l.prototype,"emitFolioNumber",1);a([f("folioFormValid"),f("validate")],l.prototype,"validateField",1);l=a([F({})],l);var V=function(){var e=this,o=e._self._c;return e._self._setupProxy,o("v-form",{ref:"folioForm",attrs:{id:"folio-number-form"},model:{value:e.folioFormValid,callback:function(i){e.folioFormValid=i},expression:"folioFormValid"}},[o("v-text-field",{attrs:{id:"folio-number-textfield",filled:"",label:"Folio Number (Optional)",value:e.folioNumber,rules:e.folioNumberRules,disabled:e.disabled,autocomplete:"chrome-off",name:Math.random()},on:{input:function(i){return e.emitFolioNumber(i)},focus:function(i){return e.emitFocus(i)}}})],1)},y=[],p=h(l,V,y,!1,null,null,null,null);const E=p.exports;p.exports.__docgenInfo={exportName:"default",displayName:"FolioNumberInput",description:"",tags:{},props:[{name:"validate",tags:{},description:"Whether to validate the fields.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"folioNumber",tags:{},description:"Folio Number prop.",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"disabled",tags:{},description:"Disabled prop.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"valid",description:"Emits an event indicating whether or not this component is valid."},{name:"focus",description:"Emits an event indicating whether or not this component is focused."},{name:"emitFolioNumber",description:"Emits an event to update the Folio Number."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/folio-number-input/FolioNumberInput.vue"]};export{E as F}; +//# sourceMappingURL=FolioNumberInput-cf343253.js.map diff --git a/docs/assets/FolioNumberInput-d9d8b85a.js.map b/docs/assets/FolioNumberInput-cf343253.js.map similarity index 98% rename from docs/assets/FolioNumberInput-d9d8b85a.js.map rename to docs/assets/FolioNumberInput-cf343253.js.map index 3b2b2370..9a96ad60 100644 --- a/docs/assets/FolioNumberInput-d9d8b85a.js.map +++ b/docs/assets/FolioNumberInput-cf343253.js.map @@ -1 +1 @@ -{"version":3,"file":"FolioNumberInput-d9d8b85a.js","sources":["../../src/components/folio-number-input/FolioNumberInput.vue"],"sourcesContent":["\n\n\n"],"names":["FolioNumberInput","Vue","__publicField","v","val","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"ygBA4BA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,cAKAA,EAAA,iBAGAA,EAAA,oBAGAA,EAAA,iBAGAA,EAAA,sBAAA,IAGA,IAAA,kBAAA,CACA,MAAA,CACAC,GAAA,CAAAA,GAAA,CAAA,KAAA,UAAAA,EAAA,QAAA,IAAA,6BAAA,CAEA,CAIA,WAAA,CACA,OAAA,KAAA,cACA,CAKA,UAAAC,EAAA,CAAA,CAKA,gBAAAA,EAAA,CAAA,CAKA,eAAA,CACA,KAAA,WACA,KAAA,oBAAA,EACA,KAAA,UAAA,EAEA,CAMA,kBAAA,CACA,KAAA,MAAA,UAAA,OACA,CAMA,4BAAA,CACA,KAAA,MAAA,UAAA,iBACA,CAOA,qBAAA,CACA,OAAA,KAAA,MAAA,UAAA,SAAA,CACA,CACA,EApEAC,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EANAN,EAMA,UAAA,WAAA,CAAA,EAGAK,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EATAN,EASA,UAAA,cAAA,CAAA,EAGAK,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAZAN,EAYA,UAAA,WAAA,CAAA,EAcAK,EAAA,CADAE,EAAA,OAAA,CAAA,EAzBAP,EA0BA,UAAA,YAAA,CAAA,EAOAK,EAAA,CAFAE,EAAA,OAAA,CAAA,EA/BAP,EAiCA,UAAA,YAAA,CAAA,EAKAK,EAAA,CAFAE,EAAA,iBAAA,CAAA,EApCAP,EAsCA,UAAA,kBAAA,CAAA,EAKAK,EAAA,CAFAG,EAAA,gBAAA,EACAA,EAAA,UAAA,CAAA,EA1CAR,EA2CA,UAAA,gBAAA,CAAA,EA3CAA,EAAAK,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAT,CAAA"} \ No newline at end of file +{"version":3,"file":"FolioNumberInput-cf343253.js","sources":["../../src/components/folio-number-input/FolioNumberInput.vue"],"sourcesContent":["\n\n\n"],"names":["FolioNumberInput","Vue","__publicField","v","val","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"ygBA4BA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,cAKAA,EAAA,iBAGAA,EAAA,oBAGAA,EAAA,iBAGAA,EAAA,sBAAA,IAGA,IAAA,kBAAA,CACA,MAAA,CACAC,GAAA,CAAAA,GAAA,CAAA,KAAA,UAAAA,EAAA,QAAA,IAAA,6BAAA,CAEA,CAIA,WAAA,CACA,OAAA,KAAA,cACA,CAKA,UAAAC,EAAA,CAAA,CAKA,gBAAAA,EAAA,CAAA,CAKA,eAAA,CACA,KAAA,WACA,KAAA,oBAAA,EACA,KAAA,UAAA,EAEA,CAMA,kBAAA,CACA,KAAA,MAAA,UAAA,OACA,CAMA,4BAAA,CACA,KAAA,MAAA,UAAA,iBACA,CAOA,qBAAA,CACA,OAAA,KAAA,MAAA,UAAA,SAAA,CACA,CACA,EApEAC,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EANAN,EAMA,UAAA,WAAA,CAAA,EAGAK,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EATAN,EASA,UAAA,cAAA,CAAA,EAGAK,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAZAN,EAYA,UAAA,WAAA,CAAA,EAcAK,EAAA,CADAE,EAAA,OAAA,CAAA,EAzBAP,EA0BA,UAAA,YAAA,CAAA,EAOAK,EAAA,CAFAE,EAAA,OAAA,CAAA,EA/BAP,EAiCA,UAAA,YAAA,CAAA,EAKAK,EAAA,CAFAE,EAAA,iBAAA,CAAA,EApCAP,EAsCA,UAAA,kBAAA,CAAA,EAKAK,EAAA,CAFAG,EAAA,gBAAA,EACAA,EAAA,UAAA,CAAA,EA1CAR,EA2CA,UAAA,gBAAA,CAAA,EA3CAA,EAAAK,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAT,CAAA"} \ No newline at end of file diff --git a/docs/assets/FolioNumberInput.stories-bd7c59aa.js b/docs/assets/FolioNumberInput.stories-a41ce4c0.js similarity index 86% rename from docs/assets/FolioNumberInput.stories-bd7c59aa.js rename to docs/assets/FolioNumberInput.stories-a41ce4c0.js index e18ab7ec..1f059dce 100644 --- a/docs/assets/FolioNumberInput.stories-bd7c59aa.js +++ b/docs/assets/FolioNumberInput.stories-a41ce4c0.js @@ -1,4 +1,4 @@ -import{F as s}from"./FolioNumberInput-d9d8b85a.js";import"./vue.esm-b1e57a2f.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./Watch-62f8b699.js";const l={title:"component/FolioNumberInput"},a=(m,{argTypes:p})=>({props:Object.keys(p),components:{FolioNumberInput:s},template:''}),o=a.bind({});o.args={folioNumber:"01234567890123456789012345678901234567890123456789ABC@123/*!$ ..."};var e,r,t;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`(args, { +import{F as s}from"./FolioNumberInput-cf343253.js";import"./vue.esm-b1e57a2f.js";import"./_plugin-vue2_normalizer-b11a0120.js";import"./Watch-62f8b699.js";const l={title:"component/FolioNumberInput"},a=(m,{argTypes:p})=>({props:Object.keys(p),components:{FolioNumberInput:s},template:''}),o=a.bind({});o.args={folioNumber:"01234567890123456789012345678901234567890123456789ABC@123/*!$ ..."};var e,r,t;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -7,4 +7,4 @@ import{F as s}from"./FolioNumberInput-d9d8b85a.js";import"./vue.esm-b1e57a2f.js" }, template: '' // $props comes from args below })`,...(t=(r=o.parameters)==null?void 0:r.docs)==null?void 0:t.source}}};const b=["Default"];export{o as Default,b as __namedExportsOrder,l as default}; -//# sourceMappingURL=FolioNumberInput.stories-bd7c59aa.js.map +//# sourceMappingURL=FolioNumberInput.stories-a41ce4c0.js.map diff --git a/docs/assets/FolioNumberInput.stories-a41ce4c0.js.map b/docs/assets/FolioNumberInput.stories-a41ce4c0.js.map new file mode 100644 index 00000000..39adccf3 --- /dev/null +++ b/docs/assets/FolioNumberInput.stories-a41ce4c0.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FolioNumberInput.stories-a41ce4c0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/FolioNumberInput.stories-bd7c59aa.js.map b/docs/assets/FolioNumberInput.stories-bd7c59aa.js.map deleted file mode 100644 index e609dc3e..00000000 --- a/docs/assets/FolioNumberInput.stories-bd7c59aa.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FolioNumberInput.stories-bd7c59aa.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/GenesysWebMessage.stories-030008ef.js b/docs/assets/GenesysWebMessage.stories-31eadc0d.js similarity index 75% rename from docs/assets/GenesysWebMessage.stories-030008ef.js rename to docs/assets/GenesysWebMessage.stories-31eadc0d.js index a05531ed..d696eb5c 100644 --- a/docs/assets/GenesysWebMessage.stories-030008ef.js +++ b/docs/assets/GenesysWebMessage.stories-31eadc0d.js @@ -1,4 +1,4 @@ -var K=Object.defineProperty;var R=(t,s,e)=>s in t?K(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var c=(t,s,e)=>(R(t,typeof s!="symbol"?s+"":s,e),e);import{V as w}from"./vue.esm-b1e57a2f.js";import{C as G,P as i,n as P}from"./_plugin-vue2_normalizer-b11a0120.js";var M=Object.defineProperty,W=Object.getOwnPropertyDescriptor,y=(t,s,e,n)=>{for(var r=n>1?void 0:n?W(s,e):s,p=t.length-1,a;p>=0;p--)(a=t[p])&&(r=(n?a(s,e,r):a(r))||r);return n&&r&&M(s,e,r),r};let o=class extends w{constructor(){super(...arguments);c(this,"genesysURL");c(this,"environmentKey");c(this,"deploymentKey")}mounted(){this.genesysURL&&this.environmentKey&&this.deploymentKey!=="0"&&this.initWebMsg(window,"Genesys",this.genesysURL,{environment:this.environmentKey,deploymentId:this.deploymentKey},null)}beforeDestroy(){localStorage.removeItem("_actmu")}initWebMsg(e,n,r,p,a){e._genesysJs=n,e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},e[n].t=new Date().getTime(),e[n].c=p,a=document.createElement("script"),a.async=1,a.src=r,a.charset="utf-8",document.head.appendChild(a),localStorage.removeItem("_actmu")}};y([i({default:null})],o.prototype,"genesysURL",2);y([i({default:null})],o.prototype,"environmentKey",2);y([i({default:"0"})],o.prototype,"deploymentKey",2);o=y([G({})],o);var L=function(){var s=this,e=s._self._c;return s._self._setupProxy,e("div",{staticClass:"d-none"})},U=[],_=P(o,L,U,!1,null,null,null,null);const O=_.exports;_.exports.__docgenInfo={description:"",tags:{property:[{title:"property",type:{name:"string"},name:"genesysURL",description:"the URL to the genesys library"},{title:"property",type:{name:"string"},name:"environmentKey",description:"the environment key (ID)"},{title:"property",type:{name:"string"},name:"deploymentKey",description:"the deployment key (ID)"}]},exportName:"default",displayName:"GenesysWebMessage",props:[{name:"genesysURL",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"environmentKey",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"deploymentKey",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'0'"}}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/genesys-web-message/GenesysWebMessage.vue"]};const I={title:"component/GenesysWebMessage"},h=(t,{argTypes:s})=>({props:Object.keys(s),components:{GenesysWebMessage:O},template:''}),m=h.bind({});m.args={genesysURL:"https://apps.cac1.pure.cloud/genesys-bootstrap/genesys.min.js",environmentKey:"cac1",deploymentKey:"5c012aaa-1f17-4d0b-8da2-bea9c1133d5d"};const l=h.bind({});l.args={genesysURL:"https://apps.cac1.pure.cloud/genesys-bootstrap/genesys.min.js",environmentKey:"cac1",deploymentKey:"42ed05f4-d545-436b-ba2c-94b66ed3396f"};var d,u,g;m.parameters={...m.parameters,docs:{...(d=m.parameters)==null?void 0:d.docs,source:{originalSource:`(args, { +var K=Object.defineProperty;var R=(t,s,e)=>s in t?K(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var c=(t,s,e)=>(R(t,typeof s!="symbol"?s+"":s,e),e);import{V as w}from"./vue.esm-b1e57a2f.js";import{C as G,P as i,n as P}from"./_plugin-vue2_normalizer-b11a0120.js";var M=Object.defineProperty,W=Object.getOwnPropertyDescriptor,y=(t,s,e,n)=>{for(var r=n>1?void 0:n?W(s,e):s,p=t.length-1,a;p>=0;p--)(a=t[p])&&(r=(n?a(s,e,r):a(r))||r);return n&&r&&M(s,e,r),r};let o=class extends w{constructor(){super(...arguments);c(this,"genesysURL");c(this,"environmentKey");c(this,"deploymentKey")}mounted(){this.genesysURL&&this.environmentKey&&this.deploymentKey!=="0"&&this.initWebMsg(window,"Genesys",this.genesysURL,{environment:this.environmentKey,deploymentId:this.deploymentKey},null)}beforeDestroy(){localStorage.removeItem("_actmu")}initWebMsg(e,n,r,p,a){e._genesysJs=n,e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},e[n].t=new Date().getTime(),e[n].c=p,a=document.createElement("script"),a.async=1,a.src=r,a.charset="utf-8",document.head.appendChild(a),localStorage.removeItem("_actmu")}};y([i({default:null})],o.prototype,"genesysURL",2);y([i({default:null})],o.prototype,"environmentKey",2);y([i({default:"0"})],o.prototype,"deploymentKey",2);o=y([G({})],o);var L=function(){var s=this,e=s._self._c;return s._self._setupProxy,e("div",{staticClass:"d-none"})},U=[],_=P(o,L,U,!1,null,null,null,null);const O=_.exports;_.exports.__docgenInfo={description:"",tags:{property:[{title:"property",type:{name:"string"},name:"genesysURL",description:"the URL to the genesys library"},{title:"property",type:{name:"string"},name:"environmentKey",description:"the environment key (ID)"},{title:"property",type:{name:"string"},name:"deploymentKey",description:"the deployment key (ID)"}]},exportName:"default",displayName:"GenesysWebMessage",props:[{name:"genesysURL",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"environmentKey",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"deploymentKey",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'0'"}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/genesys-web-message/GenesysWebMessage.vue"]};const I={title:"component/GenesysWebMessage"},h=(t,{argTypes:s})=>({props:Object.keys(s),components:{GenesysWebMessage:O},template:''}),m=h.bind({});m.args={genesysURL:"https://apps.cac1.pure.cloud/genesys-bootstrap/genesys.min.js",environmentKey:"cac1",deploymentKey:"5c012aaa-1f17-4d0b-8da2-bea9c1133d5d"};const l=h.bind({});l.args={genesysURL:"https://apps.cac1.pure.cloud/genesys-bootstrap/genesys.min.js",environmentKey:"cac1",deploymentKey:"42ed05f4-d545-436b-ba2c-94b66ed3396f"};var d,g,u;m.parameters={...m.parameters,docs:{...(d=m.parameters)==null?void 0:d.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -6,7 +6,7 @@ var K=Object.defineProperty;var R=(t,s,e)=>s in t?K(t,s,{enumerable:!0,configura GenesysWebMessage }, template: '' // $props comes from args below -})`,...(g=(u=m.parameters)==null?void 0:u.docs)==null?void 0:g.source}}};var f,b,v;l.parameters={...l.parameters,docs:{...(f=l.parameters)==null?void 0:f.docs,source:{originalSource:`(args, { +})`,...(u=(g=m.parameters)==null?void 0:g.docs)==null?void 0:u.source}}};var f,b,v;l.parameters={...l.parameters,docs:{...(f=l.parameters)==null?void 0:f.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -15,4 +15,4 @@ var K=Object.defineProperty;var R=(t,s,e)=>s in t?K(t,s,{enumerable:!0,configura }, template: '' // $props comes from args below })`,...(v=(b=l.parameters)==null?void 0:b.docs)==null?void 0:v.source}}};const S=["nameRequest","SPGP"];export{l as SPGP,S as __namedExportsOrder,I as default,m as nameRequest}; -//# sourceMappingURL=GenesysWebMessage.stories-030008ef.js.map +//# sourceMappingURL=GenesysWebMessage.stories-31eadc0d.js.map diff --git a/docs/assets/GenesysWebMessage.stories-030008ef.js.map b/docs/assets/GenesysWebMessage.stories-31eadc0d.js.map similarity index 97% rename from docs/assets/GenesysWebMessage.stories-030008ef.js.map rename to docs/assets/GenesysWebMessage.stories-31eadc0d.js.map index f85c7407..210a81a0 100644 --- a/docs/assets/GenesysWebMessage.stories-030008ef.js.map +++ b/docs/assets/GenesysWebMessage.stories-31eadc0d.js.map @@ -1 +1 @@ -{"version":3,"file":"GenesysWebMessage.stories-030008ef.js","sources":["../../src/components/genesys-web-message/GenesysWebMessage.vue"],"sourcesContent":["\n\n\n"],"names":["GenesysWebMessage","Vue","__publicField","g","e","n","es","ys","__decorateClass","Prop","Component"],"mappings":"0dAeA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,mBAEAA,EAAA,uBAEAA,EAAA,sBAEA,SAAA,CACA,KAAA,YAAA,KAAA,gBAAA,KAAA,gBAAA,KACA,KAAA,WACA,OACA,UACA,KAAA,WACA,CACA,YAAA,KAAA,eACA,aAAA,KAAA,aACA,EACA,IAAA,CAGA,CAGA,eAAA,CACA,aAAA,WAAA,QAAA,CACA,CAWA,WAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,CACAJ,EAAA,WAAAC,EACAD,EAAAC,CAAA,EAAAD,EAAAC,CAAA,GAAA,UAAA,EACAD,EAAAC,CAAA,EAAA,EAAAD,EAAAC,CAAA,EAAA,GAAA,CAAA,GAAA,KAAA,SAAA,CAAA,EAEAD,EAAAC,CAAA,EAAA,EAAA,IAAA,KAAA,EAAA,UACAD,EAAAC,CAAA,EAAA,EAAAE,EACAC,EAAA,SAAA,cAAA,QAAA,EACAA,EAAA,MAAA,EACAA,EAAA,IAAAF,EACAE,EAAA,QAAA,QACA,SAAA,KAAA,YAAAA,CAAA,EACA,aAAA,WAAA,QAAA,CACA,CACA,EAjDAC,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EADAT,EACA,UAAA,aAAA,CAAA,EAEAQ,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAHAT,EAGA,UAAA,iBAAA,CAAA,EAEAQ,EAAA,CAAAC,EAAA,CAAA,QAAA,IAAA,CAAA,EALAT,EAKA,UAAA,gBAAA,CAAA,EALAA,EAAAQ,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAV,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"GenesysWebMessage.stories-31eadc0d.js","sources":["../../src/components/genesys-web-message/GenesysWebMessage.vue"],"sourcesContent":["\n\n\n"],"names":["GenesysWebMessage","Vue","__publicField","g","e","n","es","ys","__decorateClass","Prop","Component"],"mappings":"0dAeA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,mBAEAA,EAAA,uBAEAA,EAAA,sBAEA,SAAA,CACA,KAAA,YAAA,KAAA,gBAAA,KAAA,gBAAA,KACA,KAAA,WACA,OACA,UACA,KAAA,WACA,CACA,YAAA,KAAA,eACA,aAAA,KAAA,aACA,EACA,IAAA,CAGA,CAGA,eAAA,CACA,aAAA,WAAA,QAAA,CACA,CAWA,WAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,CACAJ,EAAA,WAAAC,EACAD,EAAAC,CAAA,EAAAD,EAAAC,CAAA,GAAA,UAAA,EACAD,EAAAC,CAAA,EAAA,EAAAD,EAAAC,CAAA,EAAA,GAAA,CAAA,GAAA,KAAA,SAAA,CAAA,EAEAD,EAAAC,CAAA,EAAA,EAAA,IAAA,KAAA,EAAA,UACAD,EAAAC,CAAA,EAAA,EAAAE,EACAC,EAAA,SAAA,cAAA,QAAA,EACAA,EAAA,MAAA,EACAA,EAAA,IAAAF,EACAE,EAAA,QAAA,QACA,SAAA,KAAA,YAAAA,CAAA,EACA,aAAA,WAAA,QAAA,CACA,CACA,EAjDAC,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EADAT,EACA,UAAA,aAAA,CAAA,EAEAQ,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAHAT,EAGA,UAAA,iBAAA,CAAA,EAEAQ,EAAA,CAAAC,EAAA,CAAA,QAAA,IAAA,CAAA,EALAT,EAKA,UAAA,gBAAA,CAAA,EALAA,EAAAQ,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAV,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/HelpBusinessNumber.stories-81ef09cb.js b/docs/assets/HelpBusinessNumber.stories-5c863aaa.js similarity index 89% rename from docs/assets/HelpBusinessNumber.stories-81ef09cb.js rename to docs/assets/HelpBusinessNumber.stories-5c863aaa.js index 930a4c8c..30c45ede 100644 --- a/docs/assets/HelpBusinessNumber.stories-81ef09cb.js +++ b/docs/assets/HelpBusinessNumber.stories-5c863aaa.js @@ -1,4 +1,4 @@ -var _=Object.defineProperty;var b=(a,e,s)=>e in a?_(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var t=(a,e,s)=>(b(a,typeof e!="symbol"?e+"":e,s),s);import{V as f}from"./vue.esm-b1e57a2f.js";import{C as y,P as d,n as g}from"./_plugin-vue2_normalizer-b11a0120.js";var P=Object.defineProperty,T=Object.getOwnPropertyDescriptor,u=(a,e,s,n)=>{for(var r=n>1?void 0:n?T(e,s):e,l=a.length-1,p;l>=0;l--)(p=a[l])&&(r=(n?p(e,s,r):p(r))||r);return n&&r&&P(e,s,r),r};let i=class extends f{constructor(){super(...arguments);t(this,"isTypeSoleProp");t(this,"isTypePartnership");t(this,"Header","Help with Business Number");t(this,"ProgramAccountUrl","https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/registering-your-business/you-need-a-business-number-a-program-account.html");t(this,"BusNumInfoUrl","https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/businesses-incorporated-companies/business-number");t(this,"helpToggle",!1)}};u([d({default:!1})],i.prototype,"isTypeSoleProp",2);u([d({default:!1})],i.prototype,"isTypePartnership",2);i=u([y({})],i);var C=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{attrs:{id:"help-business-number"}},[s("div",{staticClass:"help-btn",on:{click:function(n){e.helpToggle=!e.helpToggle}}},[s("v-icon",{attrs:{color:"primary"}},[e._v(" mdi-help-circle-outline ")]),e.helpToggle?s("span",{staticClass:"pl-2"},[e._v("Hide Help")]):s("span",{staticClass:"pl-2"},[e._v(e._s(e.Header))])],1),s("v-expand-transition",[e.helpToggle?s("section",{staticClass:"help-section"},[s("header",{staticClass:"help-header"},[s("h2",{staticClass:"py-4 px-0"},[e._v(" "+e._s(e.Header)+" ")])]),s("p",{staticClass:"my-4"},[e._v(" The supplied business number will be used to link this registration with "),s("a",{attrs:{href:e.ProgramAccountUrl,target:"_blank"}},[e._v(" a program account by Canada Revenue Agency "),s("v-icon",{attrs:{dense:"",color:"primary"}},[e._v("mdi-open-in-new")])],1),e._v(". "),e.isTypeSoleProp?s("span",[e._v(" You will have a business number if the sole proprietorship you are registering already has one of the following accounts: ")]):e._e(),e.isTypePartnership?s("span",[e._v(" You will have a business number if the firm you are registering already has one of the following accounts: ")]):e._e()]),s("ul",{staticClass:"bulleted-list"},[s("li",[e._v("Goods and services tax/harmonized sales tax (GST/HST)")]),s("li",[e._v("Payroll deductions")]),s("li",[e._v("Import/export")]),s("li",[e._v("Provincial sales tax (PST)")]),s("li",[e._v("WorkSafeBC")])]),s("p",{staticClass:"my-4"},[e._v(" You can find your business number on the correspondence sent to you for the accounts listed above. ")]),e.isTypeSoleProp?[s("p",{staticClass:"my-4"},[e._v(" You may also have a business number that you can use for this registration if the following applies: ")]),s("ul",{staticClass:"bulleted-list"},[s("li",[e._v(" You are an individual registering a sole proprietorship: you may already have a business number if you have previously registered a sole proprietorship (in any province) as an individual. ")])])]:e._e(),s("p",{staticClass:"my-4"},[e._v(" Please contact the Canada Revenue Agency (CRA) at "),s("a",{attrs:{href:"tel:+1-800-959-5525"}},[e._v("1-800-959-5525")]),e._v(" if you have forgotten or can't find your business number. ")]),s("p",{staticClass:"my-4"},[e._v(" To learn more, "),s("a",{attrs:{href:e.BusNumInfoUrl,target:"_blank"}},[e._v(" visit the Business Number information page "),s("v-icon",{attrs:{dense:"",color:"primary"}},[e._v("mdi-open-in-new")])],1),e._v(". ")]),s("div",{staticClass:"help-btn bottom",on:{click:function(n){e.helpToggle=!e.helpToggle}}},[e._v(" Hide Help ")])],2):e._e()])],1)},w=[],h=g(i,C,w,!1,null,"6f2bda98",null,null);const H=h.exports;h.exports.__docgenInfo={exportName:"default",displayName:"HelpBusinessNumber",description:"",tags:{},props:[{name:"isTypeSoleProp",tags:{},description:"Whether this is a Sole Proprietorship entity.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isTypePartnership",tags:{},description:"Whether this is a General Partnership entity.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/help-business-number/HelpBusinessNumber.vue"]};const $={title:"component/HelpBusinessNumber"},x=(a,{argTypes:e})=>({props:Object.keys(e),components:{HelpBusinessNumber:H},template:''}),o=x.bind({});o.args={isTypeSoleProp:!1,isTypePartnership:!1};var c,m,v;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`(args, { +var _=Object.defineProperty;var b=(a,e,s)=>e in a?_(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var t=(a,e,s)=>(b(a,typeof e!="symbol"?e+"":e,s),s);import{V as f}from"./vue.esm-b1e57a2f.js";import{C as y,P as d,n as g}from"./_plugin-vue2_normalizer-b11a0120.js";var P=Object.defineProperty,T=Object.getOwnPropertyDescriptor,u=(a,e,s,n)=>{for(var r=n>1?void 0:n?T(e,s):e,l=a.length-1,p;l>=0;l--)(p=a[l])&&(r=(n?p(e,s,r):p(r))||r);return n&&r&&P(e,s,r),r};let i=class extends f{constructor(){super(...arguments);t(this,"isTypeSoleProp");t(this,"isTypePartnership");t(this,"Header","Help with Business Number");t(this,"ProgramAccountUrl","https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/registering-your-business/you-need-a-business-number-a-program-account.html");t(this,"BusNumInfoUrl","https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/businesses-incorporated-companies/business-number");t(this,"helpToggle",!1)}};u([d({default:!1})],i.prototype,"isTypeSoleProp",2);u([d({default:!1})],i.prototype,"isTypePartnership",2);i=u([y({})],i);var C=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{attrs:{id:"help-business-number"}},[s("div",{staticClass:"help-btn",on:{click:function(n){e.helpToggle=!e.helpToggle}}},[s("v-icon",{attrs:{color:"primary"}},[e._v(" mdi-help-circle-outline ")]),e.helpToggle?s("span",{staticClass:"pl-2"},[e._v("Hide Help")]):s("span",{staticClass:"pl-2"},[e._v(e._s(e.Header))])],1),s("v-expand-transition",[e.helpToggle?s("section",{staticClass:"help-section"},[s("header",{staticClass:"help-header"},[s("h2",{staticClass:"py-4 px-0"},[e._v(" "+e._s(e.Header)+" ")])]),s("p",{staticClass:"my-4"},[e._v(" The supplied business number will be used to link this registration with "),s("a",{attrs:{href:e.ProgramAccountUrl,target:"_blank"}},[e._v(" a program account by Canada Revenue Agency "),s("v-icon",{attrs:{dense:"",color:"primary"}},[e._v("mdi-open-in-new")])],1),e._v(". "),e.isTypeSoleProp?s("span",[e._v(" You will have a business number if the sole proprietorship you are registering already has one of the following accounts: ")]):e._e(),e.isTypePartnership?s("span",[e._v(" You will have a business number if the firm you are registering already has one of the following accounts: ")]):e._e()]),s("ul",{staticClass:"bulleted-list"},[s("li",[e._v("Goods and services tax/harmonized sales tax (GST/HST)")]),s("li",[e._v("Payroll deductions")]),s("li",[e._v("Import/export")]),s("li",[e._v("Provincial sales tax (PST)")]),s("li",[e._v("WorkSafeBC")])]),s("p",{staticClass:"my-4"},[e._v(" You can find your business number on the correspondence sent to you for the accounts listed above. ")]),e.isTypeSoleProp?[s("p",{staticClass:"my-4"},[e._v(" You may also have a business number that you can use for this registration if the following applies: ")]),s("ul",{staticClass:"bulleted-list"},[s("li",[e._v(" You are an individual registering a sole proprietorship: you may already have a business number if you have previously registered a sole proprietorship (in any province) as an individual. ")])])]:e._e(),s("p",{staticClass:"my-4"},[e._v(" Please contact the Canada Revenue Agency (CRA) at "),s("a",{attrs:{href:"tel:+1-800-959-5525"}},[e._v("1-800-959-5525")]),e._v(" if you have forgotten or can't find your business number. ")]),s("p",{staticClass:"my-4"},[e._v(" To learn more, "),s("a",{attrs:{href:e.BusNumInfoUrl,target:"_blank"}},[e._v(" visit the Business Number information page "),s("v-icon",{attrs:{dense:"",color:"primary"}},[e._v("mdi-open-in-new")])],1),e._v(". ")]),s("div",{staticClass:"help-btn bottom",on:{click:function(n){e.helpToggle=!e.helpToggle}}},[e._v(" Hide Help ")])],2):e._e()])],1)},w=[],h=g(i,C,w,!1,null,"6f2bda98",null,null);const H=h.exports;h.exports.__docgenInfo={exportName:"default",displayName:"HelpBusinessNumber",description:"",tags:{},props:[{name:"isTypeSoleProp",tags:{},description:"Whether this is a Sole Proprietorship entity.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isTypePartnership",tags:{},description:"Whether this is a General Partnership entity.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/help-business-number/HelpBusinessNumber.vue"]};const $={title:"component/HelpBusinessNumber"},x=(a,{argTypes:e})=>({props:Object.keys(e),components:{HelpBusinessNumber:H},template:''}),o=x.bind({});o.args={isTypeSoleProp:!1,isTypePartnership:!1};var c,m,v;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -7,4 +7,4 @@ var _=Object.defineProperty;var b=(a,e,s)=>e in a?_(a,e,{enumerable:!0,configura }, template: '' // $props comes from args below })`,...(v=(m=o.parameters)==null?void 0:m.docs)==null?void 0:v.source}}};const A=["Default"];export{o as Default,A as __namedExportsOrder,$ as default}; -//# sourceMappingURL=HelpBusinessNumber.stories-81ef09cb.js.map +//# sourceMappingURL=HelpBusinessNumber.stories-5c863aaa.js.map diff --git a/docs/assets/HelpBusinessNumber.stories-81ef09cb.js.map b/docs/assets/HelpBusinessNumber.stories-5c863aaa.js.map similarity index 98% rename from docs/assets/HelpBusinessNumber.stories-81ef09cb.js.map rename to docs/assets/HelpBusinessNumber.stories-5c863aaa.js.map index 3d200e59..6588af71 100644 --- a/docs/assets/HelpBusinessNumber.stories-81ef09cb.js.map +++ b/docs/assets/HelpBusinessNumber.stories-5c863aaa.js.map @@ -1 +1 @@ -{"version":3,"file":"HelpBusinessNumber.stories-81ef09cb.js","sources":["../../src/components/help-business-number/HelpBusinessNumber.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["HelpBusinessNumber","Vue","__publicField","__decorateClass","Prop","Component"],"mappings":"0dAoHA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,uBAGAA,EAAA,0BAEAA,EAAA,cAAA,6BACAA,EAAA,yBAAA,sJAEAA,EAAA,qBAAA,0JAIAA,EAAA,kBAAA,IACA,EAbAC,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAFAJ,EAEA,UAAA,iBAAA,CAAA,EAGAG,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EALAJ,EAKA,UAAA,oBAAA,CAAA,EALAA,EAAAG,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAL,CAAA;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"HelpBusinessNumber.stories-5c863aaa.js","sources":["../../src/components/help-business-number/HelpBusinessNumber.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["HelpBusinessNumber","Vue","__publicField","__decorateClass","Prop","Component"],"mappings":"0dAoHA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,uBAGAA,EAAA,0BAEAA,EAAA,cAAA,6BACAA,EAAA,yBAAA,sJAEAA,EAAA,qBAAA,0JAIAA,EAAA,kBAAA,IACA,EAbAC,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAFAJ,EAEA,UAAA,iBAAA,CAAA,EAGAG,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EALAJ,EAKA,UAAA,oBAAA,CAAA,EALAA,EAAAG,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAL,CAAA;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/LimitedRestorationPanel.stories-ce534c73.js b/docs/assets/LimitedRestorationPanel.stories-9177da6e.js similarity index 81% rename from docs/assets/LimitedRestorationPanel.stories-ce534c73.js rename to docs/assets/LimitedRestorationPanel.stories-9177da6e.js index 7f928874..37af3b9f 100644 --- a/docs/assets/LimitedRestorationPanel.stories-ce534c73.js +++ b/docs/assets/LimitedRestorationPanel.stories-9177da6e.js @@ -1,4 +1,4 @@ -var L=Object.defineProperty;var N=(o,e,t)=>e in o?L(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var n=(o,e,t)=>(N(o,typeof e!="symbol"?e+"":e,t),t);import{V as T}from"./vue.esm-b1e57a2f.js";import{C as S,P as C,E as $,n as j}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as E}from"./Watch-62f8b699.js";var D=Object.defineProperty,F=Object.getOwnPropertyDescriptor,i=(o,e,t,s)=>{for(var r=s>1?void 0:s?F(e,t):e,c=o.length-1,h;c>=0;c--)(h=o[c])&&(r=(s?h(e,t,r):h(r))||r);return s&&r&&D(e,t,r),r};let a=class extends T{constructor(){super(...arguments);n(this,"$refs");n(this,"months");n(this,"maxNumberOfMonths");n(this,"radioValue","");n(this,"inputValue","")}get monthsRules(){return[t=>+t>0&&+t<=this.maxNumberOfMonths||"Must be between 1 and "+this.maxNumberOfMonths,t=>+t%1===0||"Must be a whole number"]}mounted(){[24,18,12,6].includes(this.months)?this.radioValue=this.months.toString():(this.radioValue="customMonths",this.inputValue=this.months.toString())}async onMonthsInput(t){if(t!==null){await this.$nextTick();const s=this.$refs.monthsRef.validate();this.emitValid(s),s&&this.emitMonths(Number(this.inputValue))}}onRadioValueChanged(){this.radioValue!=="customMonths"?(this.$refs.monthsRef.reset(),this.emitMonths(Number(this.radioValue)),this.emitValid(!0)):this.inputValue||this.emitValid(!1)}emitMonths(t){}emitValid(t){}};i([C({required:!0})],a.prototype,"months",2);i([C({default:24})],a.prototype,"maxNumberOfMonths",2);i([E("radioValue")],a.prototype,"onRadioValueChanged",1);i([$("months")],a.prototype,"emitMonths",1);i([$("valid")],a.prototype,"emitValid",1);a=i([S({})],a);var k=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("v-radio-group",{staticClass:"mt-0 pt-0 ml-8",attrs:{mandatory:""},model:{value:e.radioValue,callback:function(s){e.radioValue=s},expression:"radioValue"}},[t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-24",label:"2 years",value:"24"}}),t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-18",label:"18 months",value:"18"}}),t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-12",label:"12 months",value:"12"}}),t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-6",label:"6 months",value:"6"}}),t("v-row",{staticClass:"ml-0 mt-0 radio-button pt-2"},[t("v-radio",{staticClass:"mt-n4",attrs:{id:"radio-custom",value:"customMonths"}}),t("v-form",{ref:"monthsRef"},[t("v-text-field",{staticClass:"text-field-months",attrs:{id:"text-field-months",type:"number",dense:"",filled:"","hide-spin-buttons":"",rules:e.monthsRules,disabled:e.radioValue!=="customMonths"},on:{input:function(s){return e.onMonthsInput(s)}},model:{value:e.inputValue,callback:function(s){e.inputValue=s},expression:"inputValue"}})],1),t("span",{staticClass:"ml-2 mt-2 month-text"},[e._v("month(s)")])],1)],1)},I=[],w=j(a,k,I,!1,null,"288397b7",null,null);const q=w.exports;w.exports.__docgenInfo={exportName:"default",displayName:"LimitedRestorationPanel",description:"",tags:{},props:[{name:"months",tags:{},type:{name:"number"},required:!0},{name:"maxNumberOfMonths",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"24"}}],events:[{name:"months",description:"Emits the numbed of months selected."},{name:"valid",description:"Emits whether the number of months selected is valid."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/limited-restoration-panel/LimitedRestorationPanel.vue"]};const H={title:"component/LimitedRestorationPanel"},u=(o,{argTypes:e})=>({props:Object.keys(e),components:{LimitedRestorationPanel:q},template:''}),m=u.bind({});m.args={months:0};const l=u.bind({});l.args={months:24};const p=u.bind({});p.args={months:1};const d=u.bind({});d.args={months:36,maxNumberOfMonths:36};var f,b,v;m.parameters={...m.parameters,docs:{...(f=m.parameters)==null?void 0:f.docs,source:{originalSource:`(args, { +var L=Object.defineProperty;var N=(o,e,t)=>e in o?L(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var n=(o,e,t)=>(N(o,typeof e!="symbol"?e+"":e,t),t);import{V as T}from"./vue.esm-b1e57a2f.js";import{C as S,P as C,E as $,n as j}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as E}from"./Watch-62f8b699.js";var k=Object.defineProperty,D=Object.getOwnPropertyDescriptor,i=(o,e,t,s)=>{for(var r=s>1?void 0:s?D(e,t):e,c=o.length-1,h;c>=0;c--)(h=o[c])&&(r=(s?h(e,t,r):h(r))||r);return s&&r&&k(e,t,r),r};let a=class extends T{constructor(){super(...arguments);n(this,"$refs");n(this,"months");n(this,"maxNumberOfMonths");n(this,"radioValue","");n(this,"inputValue","")}get monthsRules(){return[t=>+t>0&&+t<=this.maxNumberOfMonths||"Must be between 1 and "+this.maxNumberOfMonths,t=>+t%1===0||"Must be a whole number"]}mounted(){[24,18,12,6].includes(this.months)?this.radioValue=this.months.toString():(this.radioValue="customMonths",this.inputValue=this.months.toString())}async onMonthsInput(t){if(t!==null){await this.$nextTick();const s=this.$refs.monthsRef.validate();this.emitValid(s),s&&this.emitMonths(Number(this.inputValue))}}onRadioValueChanged(){this.radioValue!=="customMonths"?(this.$refs.monthsRef.reset(),this.emitMonths(Number(this.radioValue)),this.emitValid(!0)):this.inputValue||this.emitValid(!1)}emitMonths(t){}emitValid(t){}};i([C({required:!0})],a.prototype,"months",2);i([C({default:24})],a.prototype,"maxNumberOfMonths",2);i([E("radioValue")],a.prototype,"onRadioValueChanged",1);i([$("months")],a.prototype,"emitMonths",1);i([$("valid")],a.prototype,"emitValid",1);a=i([S({})],a);var F=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("v-radio-group",{staticClass:"mt-0 pt-0 ml-8",attrs:{mandatory:""},model:{value:e.radioValue,callback:function(s){e.radioValue=s},expression:"radioValue"}},[t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-24",label:"2 years",value:"24"}}),t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-18",label:"18 months",value:"18"}}),t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-12",label:"12 months",value:"12"}}),t("v-radio",{staticClass:"radio-button pt-2",attrs:{id:"radio-6",label:"6 months",value:"6"}}),t("v-row",{staticClass:"ml-0 mt-0 radio-button pt-2"},[t("v-radio",{staticClass:"mt-n4",attrs:{id:"radio-custom",value:"customMonths"}}),t("v-form",{ref:"monthsRef"},[t("v-text-field",{staticClass:"text-field-months",attrs:{id:"text-field-months",type:"number",dense:"",filled:"","hide-spin-buttons":"",rules:e.monthsRules,disabled:e.radioValue!=="customMonths"},on:{input:function(s){return e.onMonthsInput(s)}},model:{value:e.inputValue,callback:function(s){e.inputValue=s},expression:"inputValue"}})],1),t("span",{staticClass:"ml-2 mt-2 month-text"},[e._v("month(s)")])],1)],1)},I=[],w=j(a,F,I,!1,null,"288397b7",null,null);const q=w.exports;w.exports.__docgenInfo={exportName:"default",displayName:"LimitedRestorationPanel",description:"",tags:{},props:[{name:"months",tags:{},type:{name:"number"},required:!0},{name:"maxNumberOfMonths",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"24"}}],events:[{name:"months",description:"Emits the numbed of months selected."},{name:"valid",description:"Emits whether the number of months selected is valid."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/limited-restoration-panel/LimitedRestorationPanel.vue"]};const H={title:"component/LimitedRestorationPanel"},u=(o,{argTypes:e})=>({props:Object.keys(e),components:{LimitedRestorationPanel:q},template:''}),m=u.bind({});m.args={months:0};const l=u.bind({});l.args={months:24};const p=u.bind({});p.args={months:1};const d=u.bind({});d.args={months:36,maxNumberOfMonths:36};var f,b,v;m.parameters={...m.parameters,docs:{...(f=m.parameters)==null?void 0:f.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -31,4 +31,4 @@ var L=Object.defineProperty;var N=(o,e,t)=>e in o?L(o,e,{enumerable:!0,configura }, template: '' // $props comes from args below })`,...(O=(P=d.parameters)==null?void 0:P.docs)==null?void 0:O.source}}};const J=["Default","twentyFourMonths","oneMonth","thirtySixMonths"];export{m as Default,J as __namedExportsOrder,H as default,p as oneMonth,d as thirtySixMonths,l as twentyFourMonths}; -//# sourceMappingURL=LimitedRestorationPanel.stories-ce534c73.js.map +//# sourceMappingURL=LimitedRestorationPanel.stories-9177da6e.js.map diff --git a/docs/assets/LimitedRestorationPanel.stories-ce534c73.js.map b/docs/assets/LimitedRestorationPanel.stories-9177da6e.js.map similarity index 98% rename from docs/assets/LimitedRestorationPanel.stories-ce534c73.js.map rename to docs/assets/LimitedRestorationPanel.stories-9177da6e.js.map index ed3196a5..5adff019 100644 --- a/docs/assets/LimitedRestorationPanel.stories-ce534c73.js.map +++ b/docs/assets/LimitedRestorationPanel.stories-9177da6e.js.map @@ -1 +1 @@ -{"version":3,"file":"LimitedRestorationPanel.stories-ce534c73.js","sources":["../../src/components/limited-restoration-panel/LimitedRestorationPanel.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["LimitedRestorationPanel","Vue","__publicField","v","input","valid","months","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ygBA6DA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,cAIAA,EAAA,eACAA,EAAA,0BAGAA,EAAA,kBAAA,IACAA,EAAA,kBAAA,IAKA,IAAA,aAAA,CACA,MAAA,CACAC,GAAA,CAAAA,EAAA,GAAA,CAAAA,GAAA,KAAA,mBAAA,yBAAA,KAAA,kBACAA,GAAA,CAAAA,EAAA,IAAA,GAAA,wBAAA,CAEA,CAMA,SAAA,CACA,CAAA,GAAA,GAAA,GAAA,CAAA,EAAA,SAAA,KAAA,MAAA,EACA,KAAA,WAAA,KAAA,OAAA,SAAA,GAEA,KAAA,WAAA,eACA,KAAA,WAAA,KAAA,OAAA,SAAA,EAEA,CAKA,MAAA,cAAAC,EAAA,CAEA,GAAAA,IAAA,KAAA,CAEA,MAAA,KAAA,YAEA,MAAAC,EAAA,KAAA,MAAA,UAAA,SAAA,EAEA,KAAA,UAAAA,CAAA,EAEAA,GAAA,KAAA,WAAA,OAAA,KAAA,UAAA,CAAA,CACA,CACA,CAMA,qBAAA,CACA,KAAA,aAAA,gBAEA,KAAA,MAAA,UAAA,QAEA,KAAA,WAAA,OAAA,KAAA,UAAA,CAAA,EACA,KAAA,UAAA,EAAA,GACA,KAAA,YAGA,KAAA,UAAA,EAAA,CAEA,CAOA,WAAAC,EAAA,CAAA,CAOA,UAAAD,EAAA,CAAA,CACA,EA9EAE,EAAA,CAAAC,EAAA,CAAA,SAAA,GAAA,CAAA,EANAR,EAMA,UAAA,SAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAPAR,EAOA,UAAA,oBAAA,CAAA,EAkDAO,EAAA,CADAE,EAAA,YAAA,CAAA,EAxDAT,EAyDA,UAAA,sBAAA,CAAA,EAmBAO,EAAA,CAFAG,EAAA,QAAA,CAAA,EA1EAV,EA4EA,UAAA,aAAA,CAAA,EAOAO,EAAA,CAFAG,EAAA,OAAA,CAAA,EAjFAV,EAmFA,UAAA,YAAA,CAAA,EAnFAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"LimitedRestorationPanel.stories-9177da6e.js","sources":["../../src/components/limited-restoration-panel/LimitedRestorationPanel.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["LimitedRestorationPanel","Vue","__publicField","v","input","valid","months","__decorateClass","Prop","Watch","Emit","Component"],"mappings":"ygBA6DA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,cAIAA,EAAA,eACAA,EAAA,0BAGAA,EAAA,kBAAA,IACAA,EAAA,kBAAA,IAKA,IAAA,aAAA,CACA,MAAA,CACAC,GAAA,CAAAA,EAAA,GAAA,CAAAA,GAAA,KAAA,mBAAA,yBAAA,KAAA,kBACAA,GAAA,CAAAA,EAAA,IAAA,GAAA,wBAAA,CAEA,CAMA,SAAA,CACA,CAAA,GAAA,GAAA,GAAA,CAAA,EAAA,SAAA,KAAA,MAAA,EACA,KAAA,WAAA,KAAA,OAAA,SAAA,GAEA,KAAA,WAAA,eACA,KAAA,WAAA,KAAA,OAAA,SAAA,EAEA,CAKA,MAAA,cAAAC,EAAA,CAEA,GAAAA,IAAA,KAAA,CAEA,MAAA,KAAA,YAEA,MAAAC,EAAA,KAAA,MAAA,UAAA,SAAA,EAEA,KAAA,UAAAA,CAAA,EAEAA,GAAA,KAAA,WAAA,OAAA,KAAA,UAAA,CAAA,CACA,CACA,CAMA,qBAAA,CACA,KAAA,aAAA,gBAEA,KAAA,MAAA,UAAA,QAEA,KAAA,WAAA,OAAA,KAAA,UAAA,CAAA,EACA,KAAA,UAAA,EAAA,GACA,KAAA,YAGA,KAAA,UAAA,EAAA,CAEA,CAOA,WAAAC,EAAA,CAAA,CAOA,UAAAD,EAAA,CAAA,CACA,EA9EAE,EAAA,CAAAC,EAAA,CAAA,SAAA,GAAA,CAAA,EANAR,EAMA,UAAA,SAAA,CAAA,EACAO,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAPAR,EAOA,UAAA,oBAAA,CAAA,EAkDAO,EAAA,CADAE,EAAA,YAAA,CAAA,EAxDAT,EAyDA,UAAA,sBAAA,CAAA,EAmBAO,EAAA,CAFAG,EAAA,QAAA,CAAA,EA1EAV,EA4EA,UAAA,aAAA,CAAA,EAOAO,EAAA,CAFAG,EAAA,OAAA,CAAA,EAjFAV,EAmFA,UAAA,YAAA,CAAA,EAnFAA,EAAAO,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAX,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/NatureOfBusiness.stories-0d7dfae4.js b/docs/assets/NatureOfBusiness.stories-0d7dfae4.js new file mode 100644 index 00000000..4d3cddf3 --- /dev/null +++ b/docs/assets/NatureOfBusiness.stories-0d7dfae4.js @@ -0,0 +1,18 @@ +var A=Object.defineProperty;var L=(a,e,s)=>e in a?A(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var i=(a,e,s)=>(L(a,typeof e!="symbol"?e+"":e,s),s);import{V as f}from"./vue.esm-b1e57a2f.js";import{C,n as g,P as d,E as v}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as k}from"./Watch-62f8b699.js";var F=Object.defineProperty,P=Object.getOwnPropertyDescriptor,U=(a,e,s,t)=>{for(var r=t>1?void 0:t?P(e,s):e,o=a.length-1,l;o>=0;o--)(l=a[o])&&(r=(t?l(e,s,r):l(r))||r);return t&&r&&F(e,s,r),r};let h=class extends f{};h=U([C({})],h);var j=function(){var e=this;return e._self._c,e._self._setupProxy,e._m(0)},H=[function(){var a=this,e=a._self._c;return a._self._setupProxy,e("div",{attrs:{id:"naics-help-text"}},[e("p",[a._v("If you are having difficulty locating a NAICS code, try the following:")]),e("ul",[e("li",[a._v(" Use more general terms (for example, instead of searching 'imported shoe sales', try 'shoe'). ")]),e("li",[a._v(" Remove pluralization or unnecessary endings (for example, instead of searching 'deliveries', try 'deliver'). ")])])])}],O=g(h,j,H,!1,null,"7f7553c3",null,null);const B=O.exports;O.exports.__docgenInfo={exportName:"default",displayName:"NaicsHelpText",description:"",tags:{},sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/nature-of-business/NaicsHelpText.vue"]};var V=Object.defineProperty,M=Object.getOwnPropertyDescriptor,b=(a,e,s,t)=>{for(var r=t>1?void 0:t?M(e,s):e,o=a.length-1,l;o>=0;o--)(l=a[o])&&(r=(t?l(e,s,r):l(r))||r);return t&&r&&V(e,s,r),r};let m=class extends f{constructor(){super(...arguments);i(this,"result");i(this,"showMore",!0)}emitClick(){}get elements(){var s;return((s=this.result)==null?void 0:s.naicsElements)||[]}capitalize(s){return s.replace(/^\w/,t=>t.toUpperCase())}};b([d({required:!0})],m.prototype,"result",2);b([v("click")],m.prototype,"emitClick",1);m=b([C({})],m);var q=function(){var e=this,s=e._self._c;return e._self._setupProxy,e.result?s("v-row",{staticClass:"naics-result",attrs:{"no-gutters":""},on:{click:function(t){return e.emitClick()}}},[s("v-col",{attrs:{cols:"2"}},[s("div",{staticClass:"result-code"},[e._v(" "+e._s(e.result.code)+" ")])]),s("v-col",{attrs:{cols:"10"}},[s("div",{staticClass:"d-flex justify-space-between align-top"},[s("label",{staticClass:"result-class-title"},[e._v(e._s(e.result.classTitle))]),s("v-btn",{staticClass:"mt-n2",attrs:{large:"",depressed:"",color:"primary"}},[e._v(" Select ")])],1),s("div",{staticClass:"result-class-definition"},[e._v(" "+e._s(e.result.classDefinition)+" ")]),e.elements.length>0?[s("div",{staticClass:"sample-activities"},[e._v(" Sample activities: ")]),s("ul",[e._l(e.elements,function(t,r){return[e.showMore||r<5?s("li",{key:r},[e._v(" "+e._s(e.capitalize(t.elementDescription))+" ")]):e._e()]})],2),!e.showMore&&e.elements.length>=5?s("div",{staticClass:"show-more",on:{click:function(t){t.stopPropagation(),e.showMore=!0}}},[e._v(" Show more... ")]):e._e()]:e._e()],2)],1):e._e()},W=[],T=g(m,q,W,!1,null,"5291be47",null,null);const z=T.exports;T.exports.__docgenInfo={exportName:"default",displayName:"NaicsResult",description:"",tags:{},props:[{name:"result",tags:{},type:{name:"NaicsResultIF"},required:!0}],events:[{name:"click"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/nature-of-business/NaicsResult.vue"]};var Y=Object.defineProperty,G=Object.getOwnPropertyDescriptor,c=(a,e,s,t)=>{for(var r=t>1?void 0:t?G(e,s):e,o=a.length-1,l;o>=0;o--)(l=a[o])&&(r=(t?l(e,s,r):l(r))||r);return t&&r&&Y(e,s,r),r},E=(a=>(a.INITIAL="initial",a.SEARCHING="searching",a.SHOW_RESULTS="show results",a.NO_RESULTS="no results",a.SUMMARY="summary",a))(E||{});let n=class extends f{constructor(){super(...arguments);i(this,"STATS_CAN_URL","https://www.statcan.gc.ca/en/subjects/standard/naics/2017/v3/index");i(this,"showErrors");i(this,"naics");i(this,"NaicsServices");i(this,"hasNaicsChanges");i(this,"editLabel");i(this,"editedLabel");i(this,"States",E);i(this,"state","initial");i(this,"searchField","");i(this,"searchResults",[]);i(this,"dropdown",null);i(this,"natureOfBusinessRules",[s=>!!s||"Nature of Business is required"])}get naicsCode(){return this.naics.naicsCode}get naicsDescription(){return this.naics.naicsDescription}get haveNaics(){return!!this.naicsCode||!!this.naicsDescription}get isFormValid(){return this.haveNaics&&this.state==="summary"}async onSearchClicked(){this.searchField=this.searchField.trim().replaceAll(/\s+/g," "),this.searchField&&(this.state="searching",this.searchResults=await this.NaicsServices.search(this.searchField).catch(()=>[]),this.state=this.searchResults.length>0?"show results":"no results")}onResultClicked(s){s&&(this.setNaics({naicsCode:s.code,naicsDescription:s.classTitle}),this.state="summary")}onCancelClicked(){this.state=this.haveNaics?"summary":"initial"}onChangeClicked(){this.searchField=this.naicsDescription.toLowerCase(),this.state="initial"}onHaveNaicsChanged(s){this.state=s?"summary":"initial"}onIsFormValidChanged(s){this.emitValid(s)}setNaics(s){}emitUndo(){}emitValid(s){}};c([d({required:!0})],n.prototype,"showErrors",2);c([d({required:!0})],n.prototype,"naics",2);c([d({required:!0})],n.prototype,"NaicsServices",2);c([d({default:!1})],n.prototype,"hasNaicsChanges",2);c([d({default:"Change"})],n.prototype,"editLabel",2);c([d({default:"Changed"})],n.prototype,"editedLabel",2);c([k("haveNaics",{immediate:!0})],n.prototype,"onHaveNaicsChanged",1);c([k("isFormValid",{immediate:!0})],n.prototype,"onIsFormValidChanged",1);c([v("setNaics")],n.prototype,"setNaics",1);c([v("undoNaics")],n.prototype,"emitUndo",1);c([v("valid")],n.prototype,"emitValid",1);n=c([C({components:{NaicsHelpText:B,NaicsResult:z}})],n);var K=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{attrs:{id:"nature-of-business"}},[s("v-row",{attrs:{"no-gutters":""}},[s("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[s("label",[e._v("Nature of Business")]),e.hasNaicsChanges?s("v-chip",{attrs:{id:"edited-chip","x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" "+e._s(e.editedLabel)+" ")]):e._e()],1),s("v-col",{attrs:{cols:"12",sm:"9"}},[e.state!==e.States.SUMMARY?s("div",[s("p",{staticClass:"ma-0"},[e._v(" Enter one or more keywords that describe the primary nature of your business or enter the six-digit NAICS code. Learn more by visiting the "),s("a",{attrs:{href:e.STATS_CAN_URL,target:"_blank",rel:"noopener noreferrer"}},[s("span",[e._v("Statistics Canada website")])]),s("v-icon",{attrs:{small:"",color:"primary"}},[e._v(" mdi-open-in-new ")]),e._v(". ")],1),s("v-text-field",{staticClass:"mt-5",attrs:{filled:"","persistent-hint":"",autocomplete:"chrome-off",label:"Keywords or Six-Digit NAICS",hint:"Example: landscaping, grocery, automotive repair, etc.",name:Math.random(),rules:e.showErrors?e.natureOfBusinessRules:[]},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onSearchClicked()}},scopedSlots:e._u([{key:"append",fn:function(){return[s("v-btn",{attrs:{id:"nob-search-btn",depressed:"",color:"primary",loading:e.state===e.States.SEARCHING},on:{click:function(t){return e.onSearchClicked()}}},[s("v-icon",[e._v("mdi-magnify")])],1)]},proxy:!0}],null,!1,1713726748),model:{value:e.searchField,callback:function(t){e.searchField=t},expression:"searchField"}}),e.state===e.States.INITIAL&&e.haveNaics?[s("v-btn",{staticClass:"float-right",attrs:{id:"nob-cancel1-btn",large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[s("span",[e._v("Cancel")])])]:e._e()],2):e._e(),e.state===e.States.SHOW_RESULTS?s("div",{staticClass:"mt-5"},[s("p",{staticClass:"ma-0"},[e._v(" Select an option below that best describes the nature of your business: ")]),s("div",{staticClass:"mt-5",attrs:{id:"result-list"}},[e._l(e.searchResults,function(t,r){return s("NaicsResult",{key:r,attrs:{result:t},on:{click:function(o){return e.onResultClicked(t)}}})}),s("v-row",{staticClass:"pa-6",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"2"}}),s("v-col",{attrs:{cols:"10"}},[s("NaicsHelpText")],1)],1)],2),s("v-btn",{staticClass:"float-right mt-8",attrs:{id:"nob-cancel2-btn",large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[s("span",[e._v("Cancel")])])],1):e._e(),e.state===e.States.NO_RESULTS?s("div",{staticClass:"mt-5"},[s("p",{staticClass:"font-weight-bold"},[e._v(" No results found. ")]),s("NaicsHelpText"),s("v-btn",{staticClass:"float-right mt-8",attrs:{id:"nob-cancel3-btn",large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[s("span",[e._v("Cancel")])])],1):e._e(),e.state===e.States.SUMMARY?s("div",{staticClass:"summary-block d-flex justify-space-between align-center"},[e.naicsCode&&e.naicsDescription?s("span",[e._v(e._s(e.naicsCode)+" - "+e._s(e.naicsDescription))]):e.naicsCode?s("span",[e._v(e._s(e.naicsCode))]):e.naicsDescription?s("span",[e._v(e._s(e.naicsDescription))]):s("span",[e._v("(Not entered)")]),e.hasNaicsChanges?s("div",{attrs:{id:"nob-more-actions"}},[s("v-btn",{attrs:{id:"nob-undo-btn",text:"",color:"primary"},on:{click:function(t){return e.emitUndo()}}},[s("v-icon",{attrs:{small:""}},[e._v(" mdi-undo ")]),s("span",[e._v("Undo")])],1),s("v-menu",{attrs:{"offset-y":"",left:"","nudge-bottom":"4"},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[s("v-btn",e._g({attrs:{id:"nob-menu-btn",text:"",small:"",color:"primary"}},t),[s("v-icon",[e._v(e._s(e.dropdown?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!1,1899410277),model:{value:e.dropdown,callback:function(t){e.dropdown=t},expression:"dropdown"}},[s("v-btn",{staticClass:"py-5",attrs:{id:"more-changes-btn",text:"",color:"primary"},on:{click:function(t){e.onChangeClicked(),e.dropdown=!1}}},[s("v-icon",{attrs:{small:"",color:"primary"}},[e._v(" mdi-pencil ")]),e._v("Change ")],1)],1)],1):s("v-btn",{attrs:{id:"nob-edit-btn",text:"",color:"primary"},on:{click:function(t){return e.onChangeClicked()}}},[s("v-icon",{attrs:{small:""}},[e._v(" mdi-pencil ")]),s("span",[e._v(e._s(e.editLabel))])],1)],1):e._e()])],1)],1)},J=[],$=g(n,K,J,!1,null,"39077943",null,null);const Q=$.exports;$.exports.__docgenInfo={exportName:"default",displayName:"NatureOfBusiness",description:"",tags:{},props:[{name:"showErrors",tags:{},description:"Whether to show errors.",type:{name:"boolean"},required:!0},{name:"naics",tags:{},description:"The NAICS object.",type:{name:"NaicsIF"},required:!0},{name:"NaicsServices",tags:{},description:"Class for NAICS services.",type:{name:"any"},required:!0},{name:"hasNaicsChanges",tags:{},description:"Whether to display Change features.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editLabel",tags:{},description:"Edit label name (ie, 'Change' or 'Correct').",type:{name:"string"},defaultValue:{func:!1,value:"'Change'"}},{name:"editedLabel",tags:{},description:"Edited label name (ie, 'Changed' or 'Corrected').",type:{name:"string"},defaultValue:{func:!1,value:"'Changed'"}}],events:[{name:"setNaics",description:"Emits event to update the NAICS object."},{name:"undoNaics",description:"Emits undo event."},{name:"valid",description:"Emits event to update this component's validity."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/nature-of-business/NatureOfBusiness.vue"]};const ie={title:"component/NatureOfBusiness"},I=(a,{argTypes:e})=>({props:Object.keys(e),components:{NatureOfBusiness:Q},template:''}),_={code:"12345",classTitle:"Sample NAICS title",classDefinition:"This is a sample NAICS definition.",naicsElements:[{elementDescription:"a NAICS description"},{elementDescription:"another NAICS description"}]};class D{static async search(e){return Promise.resolve([_])}}const u=I.bind({});u.args={showErrors:!1,naics:{naicsCode:_.code,naicsDescription:_.classTitle},NaicsServices:D,editLabel:"Edit",editedLabel:"Edited"};const p=I.bind({});p.args={showErrors:!1,naics:{naicsCode:_.code,naicsDescription:_.classTitle},NaicsServices:D,hasNaicsChanges:!0,editLabel:"Edit",editedLabel:"Edited"};var y,N,S;u.parameters={...u.parameters,docs:{...(y=u.parameters)==null?void 0:y.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + NatureOfBusiness + }, + template: '' // $props comes from args below +})`,...(S=(N=u.parameters)==null?void 0:N.docs)==null?void 0:S.source}}};var w,x,R;p.parameters={...p.parameters,docs:{...(w=p.parameters)==null?void 0:w.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + NatureOfBusiness + }, + template: '' // $props comes from args below +})`,...(R=(x=p.parameters)==null?void 0:x.docs)==null?void 0:R.source}}};const ne=["Default","hasChanges"];export{u as Default,ne as __namedExportsOrder,ie as default,p as hasChanges}; +//# sourceMappingURL=NatureOfBusiness.stories-0d7dfae4.js.map diff --git a/docs/assets/NatureOfBusiness.stories-b1b57b02.js.map b/docs/assets/NatureOfBusiness.stories-0d7dfae4.js.map similarity index 98% rename from docs/assets/NatureOfBusiness.stories-b1b57b02.js.map rename to docs/assets/NatureOfBusiness.stories-0d7dfae4.js.map index 693ef83f..4ff17eb9 100644 --- a/docs/assets/NatureOfBusiness.stories-b1b57b02.js.map +++ b/docs/assets/NatureOfBusiness.stories-0d7dfae4.js.map @@ -1 +1 @@ -{"version":3,"file":"NatureOfBusiness.stories-b1b57b02.js","sources":["../../src/components/nature-of-business/NaicsHelpText.vue","../../src/components/nature-of-business/NaicsResult.vue","../../src/components/nature-of-business/NatureOfBusiness.vue"],"sourcesContent":["\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["NaicsHelpText","Vue","__decorateClass","Component","NaicsResult","__publicField","_a","c","Prop","Emit","States","NatureOfBusiness","v","result","val","Watch"],"mappings":"ogBAqBA,IAAAA,EAAA,cAAAC,CAAA,CAAA,EAAAD,EAAAE,EAAA,CADAC,EAAA,CAAA,CAAA,CAAA,EACAH,CAAA,y9BC0CA,IAAAI,EAAA,cAAAH,CAAA,CAAA,kCACAI,EAAA,eAMAA,EAAA,gBAAA,IAHA,WAAA,CAAA,CAKA,IAAA,UAAA,OACA,QAAAC,EAAA,KAAA,SAAA,YAAAA,EAAA,gBAAA,EACA,CAGA,WAAA,EAAA,CACA,OAAA,EAAA,QAAA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,EA6HA,UAAA,YAAA,CAAA,EA7HAA,EAAAT,EAAA,CAHAC,EAAA,CACA,WAAA,CAAA,cAAAH,EAAA,YAAAI,CAAA,CAAA,CACA,CAAA,EACAO,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"NatureOfBusiness.stories-0d7dfae4.js","sources":["../../src/components/nature-of-business/NaicsHelpText.vue","../../src/components/nature-of-business/NaicsResult.vue","../../src/components/nature-of-business/NatureOfBusiness.vue"],"sourcesContent":["\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["NaicsHelpText","Vue","__decorateClass","Component","NaicsResult","__publicField","_a","c","Prop","Emit","States","NatureOfBusiness","v","result","val","Watch"],"mappings":"ogBAqBA,IAAAA,EAAA,cAAAC,CAAA,CAAA,EAAAD,EAAAE,EAAA,CADAC,EAAA,CAAA,CAAA,CAAA,EACAH,CAAA,49BC0CA,IAAAI,EAAA,cAAAH,CAAA,CAAA,kCACAI,EAAA,eAMAA,EAAA,gBAAA,IAHA,WAAA,CAAA,CAKA,IAAA,UAAA,OACA,QAAAC,EAAA,KAAA,SAAA,YAAAA,EAAA,gBAAA,EACA,CAGA,WAAA,EAAA,CACA,OAAA,EAAA,QAAA,MAAAC,GAAAA,EAAA,aAAA,CACA,CACA,EAhBAL,EAAA,CAAAM,EAAA,CAAA,SAAA,GAAA,CAAA,EADAJ,EACA,UAAA,SAAA,CAAA,EAGAF,EAAA,CADAO,EAAA,OAAA,CAAA,EAHAL,EAIA,UAAA,YAAA,CAAA,EAJAA,EAAAF,EAAA,CADAC,EAAA,CAAA,CAAA,CAAA,EACAC,CAAA,knDCiKAM,GAAAA,IACAA,EAAA,QAAA,UACAA,EAAA,UAAA,YACAA,EAAA,aAAA,eACAA,EAAA,WAAA,aACAA,EAAA,QAAA,UALAA,IAAAA,GAAA,CAAA,CAAA,EAWA,IAAAC,EAAA,cAAAV,CAAA,CAAA,kCACAI,EAAA,qBAAA,sEAGAA,EAAA,mBAGAA,E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A,SAAA,GAAA,CAAA,EAPAG,EAOA,UAAA,QAAA,CAAA,EAGAT,EAAA,CAAAM,EAAA,CAAA,SAAA,GAAA,CAAA,EAVAG,EAUA,UAAA,gBAAA,CAAA,EAGAT,EAAA,CAAAM,EAAA,CAAA,QAAA,GAAA,CAAA,EAbAG,EAaA,UAAA,kBAAA,CAAA,EAGAT,EAAA,CAAAM,EAAA,CAAA,QAAA,SAAA,CAAA,EAhBAG,EAgBA,UAAA,YAAA,CAAA,EAGAT,EAAA,CAAAM,EAAA,CAAA,QAAA,UAAA,CAAA,EAnBAG,EAmBA,UAAA,cAAA,CAAA,EAoFAT,EAAA,CADAa,EAAA,YAAA,CAAA,UAAA,GAAA,CAAA,EAtGAJ,EAuGA,UAAA,qBAAA,CAAA,EAMAT,EAAA,CADAa,EAAA,cAAA,CAAA,UAAA,GAAA,CAAA,EA5GAJ,EA6GA,UAAA,uBAAA,CAAA,EAOAT,EAAA,CAFAO,EAAA,UAAA,CAAA,EAlHAE,EAoHA,UAAA,WAAA,CAAA,EAIAT,EAAA,CADAO,EAAA,WAAA,CAAA,EAvHAE,EAwHA,UAAA,WAAA,CAAA,EAKAT,EAAA,CAFAO,EAAA,OAAA,CAAA,EA3HAE,EA6HA,UAAA,YAAA,CAAA,EA7HAA,EAAAT,EAAA,CAHAC,EAAA,CACA,WAAA,CAAA,cAAAH,EAAA,YAAAI,CAAA,CAAA,CACA,CAAA,EACAO,CAAA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/NatureOfBusiness.stories-b1b57b02.js b/docs/assets/NatureOfBusiness.stories-b1b57b02.js deleted file mode 100644 index 2b547155..00000000 --- a/docs/assets/NatureOfBusiness.stories-b1b57b02.js +++ /dev/null @@ -1,18 +0,0 @@ -var A=Object.defineProperty;var L=(a,e,s)=>e in a?A(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var i=(a,e,s)=>(L(a,typeof e!="symbol"?e+"":e,s),s);import{V as f}from"./vue.esm-b1e57a2f.js";import{C,n as g,P as d,E as _}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as R}from"./Watch-62f8b699.js";var F=Object.defineProperty,P=Object.getOwnPropertyDescriptor,U=(a,e,s,t)=>{for(var r=t>1?void 0:t?P(e,s):e,o=a.length-1,l;o>=0;o--)(l=a[o])&&(r=(t?l(e,s,r):l(r))||r);return t&&r&&F(e,s,r),r};let h=class extends f{};h=U([C({})],h);var j=function(){var e=this;return e._self._c,e._self._setupProxy,e._m(0)},H=[function(){var a=this,e=a._self._c;return a._self._setupProxy,e("div",{attrs:{id:"naics-help-text"}},[e("p",[a._v("If you are having difficulty locating a NAICS code, try the following:")]),e("ul",[e("li",[a._v(" Use more general terms (for example, instead of searching 'imported shoe sales', try 'shoe'). ")]),e("li",[a._v(" Remove pluralization or unnecessary endings (for example, instead of searching 'deliveries', try 'deliver'). ")])])])}],T=g(h,j,H,!1,null,"7f7553c3",null,null);const B=T.exports;T.exports.__docgenInfo={exportName:"default",displayName:"NaicsHelpText",description:"",tags:{},sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/nature-of-business/NaicsHelpText.vue"]};var V=Object.defineProperty,M=Object.getOwnPropertyDescriptor,b=(a,e,s,t)=>{for(var r=t>1?void 0:t?M(e,s):e,o=a.length-1,l;o>=0;o--)(l=a[o])&&(r=(t?l(e,s,r):l(r))||r);return t&&r&&V(e,s,r),r};let m=class extends f{constructor(){super(...arguments);i(this,"result");i(this,"showMore",!0)}emitClick(){}get elements(){var s;return((s=this.result)==null?void 0:s.naicsElements)||[]}capitalize(s){return s.replace(/^\w/,t=>t.toUpperCase())}};b([d({required:!0})],m.prototype,"result",2);b([_("click")],m.prototype,"emitClick",1);m=b([C({})],m);var q=function(){var e=this,s=e._self._c;return e._self._setupProxy,e.result?s("v-row",{staticClass:"naics-result",attrs:{"no-gutters":""},on:{click:function(t){return e.emitClick()}}},[s("v-col",{attrs:{cols:"2"}},[s("div",{staticClass:"result-code"},[e._v(" "+e._s(e.result.code)+" ")])]),s("v-col",{attrs:{cols:"10"}},[s("div",{staticClass:"d-flex justify-space-between align-top"},[s("label",{staticClass:"result-class-title"},[e._v(e._s(e.result.classTitle))]),s("v-btn",{staticClass:"mt-n2",attrs:{large:"",depressed:"",color:"primary"}},[e._v(" Select ")])],1),s("div",{staticClass:"result-class-definition"},[e._v(" "+e._s(e.result.classDefinition)+" ")]),e.elements.length>0?[s("div",{staticClass:"sample-activities"},[e._v(" Sample activities: ")]),s("ul",[e._l(e.elements,function(t,r){return[e.showMore||r<5?s("li",{key:r},[e._v(" "+e._s(e.capitalize(t.elementDescription))+" ")]):e._e()]})],2),!e.showMore&&e.elements.length>=5?s("div",{staticClass:"show-more",on:{click:function(t){t.stopPropagation(),e.showMore=!0}}},[e._v(" Show more... ")]):e._e()]:e._e()],2)],1):e._e()},W=[],k=g(m,q,W,!1,null,"5291be47",null,null);const z=k.exports;k.exports.__docgenInfo={exportName:"default",displayName:"NaicsResult",description:"",tags:{},props:[{name:"result",tags:{},type:{name:"NaicsResultIF"},required:!0}],events:[{name:"click"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/nature-of-business/NaicsResult.vue"]};var Y=Object.defineProperty,G=Object.getOwnPropertyDescriptor,c=(a,e,s,t)=>{for(var r=t>1?void 0:t?G(e,s):e,o=a.length-1,l;o>=0;o--)(l=a[o])&&(r=(t?l(e,s,r):l(r))||r);return t&&r&&Y(e,s,r),r},E=(a=>(a.INITIAL="initial",a.SEARCHING="searching",a.SHOW_RESULTS="show results",a.NO_RESULTS="no results",a.SUMMARY="summary",a))(E||{});let n=class extends f{constructor(){super(...arguments);i(this,"STATS_CAN_URL","https://www.statcan.gc.ca/en/subjects/standard/naics/2017/v3/index");i(this,"showErrors");i(this,"naics");i(this,"NaicsServices");i(this,"hasNaicsChanges");i(this,"editLabel");i(this,"editedLabel");i(this,"States",E);i(this,"state","initial");i(this,"searchField","");i(this,"searchResults",[]);i(this,"dropdown",null);i(this,"natureOfBusinessRules",[s=>!!s||"Nature of Business is required"])}get naicsCode(){return this.naics.naicsCode}get naicsDescription(){return this.naics.naicsDescription}get haveNaics(){return!!this.naicsCode||!!this.naicsDescription}get isFormValid(){return this.haveNaics&&this.state==="summary"}async onSearchClicked(){this.searchField=this.searchField.trim().replaceAll(/\s+/g," "),this.searchField&&(this.state="searching",this.searchResults=await this.NaicsServices.search(this.searchField).catch(()=>[]),this.state=this.searchResults.length>0?"show results":"no results")}onResultClicked(s){s&&(this.setNaics({naicsCode:s.code,naicsDescription:s.classTitle}),this.state="summary")}onCancelClicked(){this.state=this.haveNaics?"summary":"initial"}onChangeClicked(){this.searchField=this.naicsDescription.toLowerCase(),this.state="initial"}onHaveNaicsChanged(s){this.state=s?"summary":"initial"}onIsFormValidChanged(s){this.emitValid(s)}setNaics(s){}emitUndo(){}emitValid(s){}};c([d({required:!0})],n.prototype,"showErrors",2);c([d({required:!0})],n.prototype,"naics",2);c([d({required:!0})],n.prototype,"NaicsServices",2);c([d({default:!1})],n.prototype,"hasNaicsChanges",2);c([d({default:"Change"})],n.prototype,"editLabel",2);c([d({default:"Changed"})],n.prototype,"editedLabel",2);c([R("haveNaics",{immediate:!0})],n.prototype,"onHaveNaicsChanged",1);c([R("isFormValid",{immediate:!0})],n.prototype,"onIsFormValidChanged",1);c([_("setNaics")],n.prototype,"setNaics",1);c([_("undoNaics")],n.prototype,"emitUndo",1);c([_("valid")],n.prototype,"emitValid",1);n=c([C({components:{NaicsHelpText:B,NaicsResult:z}})],n);var K=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",{attrs:{id:"nature-of-business"}},[s("v-row",{attrs:{"no-gutters":""}},[s("v-col",{staticClass:"pr-4",attrs:{cols:"12",sm:"3"}},[s("label",[e._v("Nature of Business")]),e.hasNaicsChanges?s("v-chip",{attrs:{id:"edited-chip","x-small":"",label:"",color:"primary","text-color":"white"}},[e._v(" "+e._s(e.editedLabel)+" ")]):e._e()],1),s("v-col",{attrs:{cols:"12",sm:"9"}},[e.state!==e.States.SUMMARY?s("div",[s("p",{staticClass:"ma-0"},[e._v(" Enter one or more keywords that describe the primary nature of your business or enter the six-digit NAICS code. Learn more by visiting the "),s("a",{attrs:{href:e.STATS_CAN_URL,target:"_blank",rel:"noopener noreferrer"}},[s("span",[e._v("Statistics Canada website")])]),s("v-icon",{attrs:{small:"",color:"primary"}},[e._v(" mdi-open-in-new ")]),e._v(". ")],1),s("v-text-field",{staticClass:"mt-5",attrs:{filled:"","persistent-hint":"",autocomplete:"chrome-off",label:"Keywords or Six-Digit NAICS",hint:"Example: landscaping, grocery, automotive repair, etc.",name:Math.random(),rules:e.showErrors?e.natureOfBusinessRules:[]},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onSearchClicked()}},scopedSlots:e._u([{key:"append",fn:function(){return[s("v-btn",{attrs:{id:"nob-search-btn",depressed:"",color:"primary",loading:e.state===e.States.SEARCHING},on:{click:function(t){return e.onSearchClicked()}}},[s("v-icon",[e._v("mdi-magnify")])],1)]},proxy:!0}],null,!1,1713726748),model:{value:e.searchField,callback:function(t){e.searchField=t},expression:"searchField"}}),e.state===e.States.INITIAL&&e.haveNaics?[s("v-btn",{staticClass:"float-right",attrs:{id:"nob-cancel1-btn",large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[s("span",[e._v("Cancel")])])]:e._e()],2):e._e(),e.state===e.States.SHOW_RESULTS?s("div",{staticClass:"mt-5"},[s("p",{staticClass:"ma-0"},[e._v(" Select an option below that best describes the nature of your business: ")]),s("div",{staticClass:"mt-5",attrs:{id:"result-list"}},[e._l(e.searchResults,function(t,r){return s("NaicsResult",{key:r,attrs:{result:t},on:{click:function(o){return e.onResultClicked(t)}}})}),s("v-row",{staticClass:"pa-6",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"2"}}),s("v-col",{attrs:{cols:"10"}},[s("NaicsHelpText")],1)],1)],2),s("v-btn",{staticClass:"float-right mt-8",attrs:{id:"nob-cancel2-btn",large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[s("span",[e._v("Cancel")])])],1):e._e(),e.state===e.States.NO_RESULTS?s("div",{staticClass:"mt-5"},[s("p",{staticClass:"font-weight-bold"},[e._v(" No results found. ")]),s("NaicsHelpText"),s("v-btn",{staticClass:"float-right mt-8",attrs:{id:"nob-cancel3-btn",large:"",outlined:"",color:"primary"},on:{click:function(t){return e.onCancelClicked()}}},[s("span",[e._v("Cancel")])])],1):e._e(),e.state===e.States.SUMMARY?s("div",{staticClass:"summary-block d-flex justify-space-between align-center"},[e.naicsCode&&e.naicsDescription?s("span",[e._v(e._s(e.naicsCode)+" - "+e._s(e.naicsDescription))]):e.naicsCode?s("span",[e._v(e._s(e.naicsCode))]):e.naicsDescription?s("span",[e._v(e._s(e.naicsDescription))]):s("span",[e._v("(Not entered)")]),e.hasNaicsChanges?s("div",{attrs:{id:"nob-more-actions"}},[s("v-btn",{attrs:{id:"nob-undo-btn",text:"",color:"primary"},on:{click:function(t){return e.emitUndo()}}},[s("v-icon",{attrs:{small:""}},[e._v(" mdi-undo ")]),s("span",[e._v("Undo")])],1),s("v-menu",{attrs:{"offset-y":"",left:"","nudge-bottom":"4"},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[s("v-btn",e._g({attrs:{id:"nob-menu-btn",text:"",small:"",color:"primary"}},t),[s("v-icon",[e._v(e._s(e.dropdown?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!1,1899410277),model:{value:e.dropdown,callback:function(t){e.dropdown=t},expression:"dropdown"}},[s("v-btn",{staticClass:"py-5",attrs:{id:"more-changes-btn",text:"",color:"primary"},on:{click:function(t){e.onChangeClicked(),e.dropdown=!1}}},[s("v-icon",{attrs:{small:"",color:"primary"}},[e._v(" mdi-pencil ")]),e._v("Change ")],1)],1)],1):s("v-btn",{attrs:{id:"nob-edit-btn",text:"",color:"primary"},on:{click:function(t){return e.onChangeClicked()}}},[s("v-icon",{attrs:{small:""}},[e._v(" mdi-pencil ")]),s("span",[e._v(e._s(e.editLabel))])],1)],1):e._e()])],1)],1)},J=[],$=g(n,K,J,!1,null,"39077943",null,null);const Q=$.exports;$.exports.__docgenInfo={exportName:"default",displayName:"NatureOfBusiness",description:"",tags:{},props:[{name:"showErrors",tags:{},description:"Whether to show errors.",type:{name:"boolean"},required:!0},{name:"naics",tags:{},description:"The NAICS object.",type:{name:"NaicsIF"},required:!0},{name:"NaicsServices",tags:{},description:"Class for NAICS services.",type:{name:"any"},required:!0},{name:"hasNaicsChanges",tags:{},description:"Whether to display Change features.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editLabel",tags:{},description:"Edit label name (ie, 'Change' or 'Correct').",type:{name:"string"},defaultValue:{func:!1,value:"'Change'"}},{name:"editedLabel",tags:{},description:"Edited label name (ie, 'Changed' or 'Corrected').",type:{name:"string"},defaultValue:{func:!1,value:"'Changed'"}}],events:[{name:"setNaics",description:"Emits event to update the NAICS object."},{name:"undoNaics",description:"Emits undo event."},{name:"valid",description:"Emits event to update this component's validity."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/nature-of-business/NatureOfBusiness.vue"]};const ie={title:"component/NatureOfBusiness"},I=(a,{argTypes:e})=>({props:Object.keys(e),components:{NatureOfBusiness:Q},template:''}),v={code:"12345",classTitle:"Sample NAICS title",classDefinition:"This is a sample NAICS definition.",naicsElements:[{elementDescription:"a NAICS description"},{elementDescription:"another NAICS description"}]};class D{static async search(e){return Promise.resolve([v])}}const u=I.bind({});u.args={showErrors:!1,naics:{naicsCode:v.code,naicsDescription:v.classTitle},NaicsServices:D,editLabel:"Edit",editedLabel:"Edited"};const p=I.bind({});p.args={showErrors:!1,naics:{naicsCode:v.code,naicsDescription:v.classTitle},NaicsServices:D,hasNaicsChanges:!0,editLabel:"Edit",editedLabel:"Edited"};var y,N,S;u.parameters={...u.parameters,docs:{...(y=u.parameters)==null?void 0:y.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - NatureOfBusiness - }, - template: '' // $props comes from args below -})`,...(S=(N=u.parameters)==null?void 0:N.docs)==null?void 0:S.source}}};var w,x,O;p.parameters={...p.parameters,docs:{...(w=p.parameters)==null?void 0:w.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - NatureOfBusiness - }, - template: '' // $props comes from args below -})`,...(O=(x=p.parameters)==null?void 0:x.docs)==null?void 0:O.source}}};const ne=["Default","hasChanges"];export{u as Default,ne as __namedExportsOrder,ie as default,p as hasChanges}; -//# sourceMappingURL=NatureOfBusiness.stories-b1b57b02.js.map diff --git a/docs/assets/RelationshipsPanel.stories-eaed025e.js b/docs/assets/RelationshipsPanel.stories-bad507aa.js similarity index 87% rename from docs/assets/RelationshipsPanel.stories-eaed025e.js rename to docs/assets/RelationshipsPanel.stories-bad507aa.js index 44365753..8e6df5dc 100644 --- a/docs/assets/RelationshipsPanel.stories-eaed025e.js +++ b/docs/assets/RelationshipsPanel.stories-bad507aa.js @@ -1,4 +1,4 @@ -var w=Object.defineProperty;var V=(t,e,s)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var l=(t,e,s)=>(V(t,typeof e!="symbol"?e+"":e,s),s);import{V as L}from"./vue.esm-b1e57a2f.js";import{C as A,P as m,E as D,n as I}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as v}from"./Watch-62f8b699.js";var h=(t=>(t.COURT_ORDERED_PARTY="Court Ordered Party",t.DIRECTOR="Director",t.HEIR_LEGAL_REP="Heir or Legal Representative",t.OFFICER="Officer",t.SHAREHOLDER="Shareholder",t))(h||{}),F=Object.defineProperty,$=Object.getOwnPropertyDescriptor,i=(t,e,s,a)=>{for(var o=a>1?void 0:a?$(e,s):e,R=t.length-1,f;R>=0;R--)(f=t[R])&&(o=(a?f(e,s,o):f(o))||o);return a&&o&&F(e,s,o),o};let r=class extends L{constructor(){super(...arguments);l(this,"draftRelationships");l(this,"bgHex");l(this,"showValidationErrors");l(this,"selectedRelationships",[]);l(this,"displayErrorState",!1);l(this,"RelationshipTypes",h)}mounted(){this.draftRelationships.length>0&&this.selectedRelationships.push(...this.draftRelationships)}setDisplayErrorState(){this.displayErrorState=this.showValidationErrors&&this.selectedRelationships.length===0}relationshipsChanged(){return this.selectedRelationships}relationshipsValid(s){return s}setRelationships(s){this.setDisplayErrorState(),this.relationshipsChanged(),this.selectedRelationships.length===0?this.relationshipsValid(!1):this.relationshipsValid(!0)}};i([m({default:()=>[]})],r.prototype,"draftRelationships",2);i([m({default:"#fff"})],r.prototype,"bgHex",2);i([m({default:!1})],r.prototype,"showValidationErrors",2);i([D("changed")],r.prototype,"relationshipsChanged",1);i([D("valid")],r.prototype,"relationshipsValid",1);i([v("selectedRelationships"),v("showValidationErrors")],r.prototype,"setRelationships",1);r=i([A({})],r);var j=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("v-card",{attrs:{id:"relationships-panel",flat:""}},[s("div",{staticClass:"relationship-content",style:{backgroundColor:e.bgHex}},[s("v-row",{staticClass:"align-center mt-5",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"heir-legal-rep-checkbox",value:e.RelationshipTypes.HEIR_LEGAL_REP,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.HEIR_LEGAL_REP))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"officer-checkbox",value:e.RelationshipTypes.OFFICER,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.OFFICER))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"director-checkbox",value:e.RelationshipTypes.DIRECTOR,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.DIRECTOR))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"shareholder-checkbox",value:e.RelationshipTypes.SHAREHOLDER,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.SHAREHOLDER))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"court-ordered-party-checkbox",value:e.RelationshipTypes.COURT_ORDERED_PARTY,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.COURT_ORDERED_PARTY))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1)],1)],1)])},G=[],H=I(r,j,G,!1,null,"4030c8a0",null,null);const U=H.exports;H.exports.__docgenInfo={exportName:"default",displayName:"RelationshipsPanel",description:"",tags:{},props:[{name:"draftRelationships",tags:{},description:"Draft restoration relationships",type:{name:"Array",elements:[{name:"RelationshipTypes"}]},defaultValue:{func:!0,value:"() => []"}},{name:"bgHex",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'#fff'"}},{name:"showValidationErrors",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"changed"},{name:"valid"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/relationships-panel/RelationshipsPanel.vue"]};const q={title:"component/RelationshipsPanel"},u=(t,{argTypes:e})=>({props:Object.keys(e),components:{RelationshipsPanel:U},template:''}),n=u.bind({});n.args={bgHex:"#fff",showValidationErrors:!1};const p=u.bind({});p.args={draftRelationships:[h.HEIR_LEGAL_REP,h.SHAREHOLDER]};const c=u.bind({});c.args={bgHex:"#00FF00"};const d=u.bind({});d.args={showValidationErrors:!0};var y,_,g;n.parameters={...n.parameters,docs:{...(y=n.parameters)==null?void 0:y.docs,source:{originalSource:`(args, { +var w=Object.defineProperty;var V=(t,e,s)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var l=(t,e,s)=>(V(t,typeof e!="symbol"?e+"":e,s),s);import{V as L}from"./vue.esm-b1e57a2f.js";import{C as A,P as m,E as D,n as I}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as y}from"./Watch-62f8b699.js";var h=(t=>(t.COURT_ORDERED_PARTY="Court Ordered Party",t.DIRECTOR="Director",t.HEIR_LEGAL_REP="Heir or Legal Representative",t.OFFICER="Officer",t.SHAREHOLDER="Shareholder",t))(h||{}),F=Object.defineProperty,$=Object.getOwnPropertyDescriptor,i=(t,e,s,a)=>{for(var o=a>1?void 0:a?$(e,s):e,R=t.length-1,f;R>=0;R--)(f=t[R])&&(o=(a?f(e,s,o):f(o))||o);return a&&o&&F(e,s,o),o};let r=class extends L{constructor(){super(...arguments);l(this,"draftRelationships");l(this,"bgHex");l(this,"showValidationErrors");l(this,"selectedRelationships",[]);l(this,"displayErrorState",!1);l(this,"RelationshipTypes",h)}mounted(){this.draftRelationships.length>0&&this.selectedRelationships.push(...this.draftRelationships)}setDisplayErrorState(){this.displayErrorState=this.showValidationErrors&&this.selectedRelationships.length===0}relationshipsChanged(){return this.selectedRelationships}relationshipsValid(s){return s}setRelationships(s){this.setDisplayErrorState(),this.relationshipsChanged(),this.selectedRelationships.length===0?this.relationshipsValid(!1):this.relationshipsValid(!0)}};i([m({default:()=>[]})],r.prototype,"draftRelationships",2);i([m({default:"#fff"})],r.prototype,"bgHex",2);i([m({default:!1})],r.prototype,"showValidationErrors",2);i([D("changed")],r.prototype,"relationshipsChanged",1);i([D("valid")],r.prototype,"relationshipsValid",1);i([y("selectedRelationships"),y("showValidationErrors")],r.prototype,"setRelationships",1);r=i([A({})],r);var j=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("v-card",{attrs:{id:"relationships-panel",flat:""}},[s("div",{staticClass:"relationship-content",style:{backgroundColor:e.bgHex}},[s("v-row",{staticClass:"align-center mt-5",attrs:{"no-gutters":""}},[s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"heir-legal-rep-checkbox",value:e.RelationshipTypes.HEIR_LEGAL_REP,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.HEIR_LEGAL_REP))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"officer-checkbox",value:e.RelationshipTypes.OFFICER,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.OFFICER))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"director-checkbox",value:e.RelationshipTypes.DIRECTOR,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.DIRECTOR))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"shareholder-checkbox",value:e.RelationshipTypes.SHAREHOLDER,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.SHAREHOLDER))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-checkbox",{staticClass:"mt-0",attrs:{id:"court-ordered-party-checkbox",value:e.RelationshipTypes.COURT_ORDERED_PARTY,error:e.displayErrorState},scopedSlots:e._u([{key:"label",fn:function(){return[s("span",{staticClass:"vuetify-label"},[e._v(e._s(e.RelationshipTypes.COURT_ORDERED_PARTY))])]},proxy:!0}]),model:{value:e.selectedRelationships,callback:function(a){e.selectedRelationships=a},expression:"selectedRelationships"}})],1)],1)],1)])},G=[],H=I(r,j,G,!1,null,"4030c8a0",null,null);const U=H.exports;H.exports.__docgenInfo={exportName:"default",displayName:"RelationshipsPanel",description:"",tags:{},props:[{name:"draftRelationships",tags:{},description:"Draft restoration relationships",type:{name:"Array",elements:[{name:"RelationshipTypes"}]},defaultValue:{func:!0,value:"() => []"}},{name:"bgHex",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'#fff'"}},{name:"showValidationErrors",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"changed"},{name:"valid"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/relationships-panel/RelationshipsPanel.vue"]};const q={title:"component/RelationshipsPanel"},u=(t,{argTypes:e})=>({props:Object.keys(e),components:{RelationshipsPanel:U},template:''}),n=u.bind({});n.args={bgHex:"#fff",showValidationErrors:!1};const p=u.bind({});p.args={draftRelationships:[h.HEIR_LEGAL_REP,h.SHAREHOLDER]};const c=u.bind({});c.args={bgHex:"#00FF00"};const d=u.bind({});d.args={showValidationErrors:!0};var _,v,g;n.parameters={...n.parameters,docs:{...(_=n.parameters)==null?void 0:_.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -6,7 +6,7 @@ var w=Object.defineProperty;var V=(t,e,s)=>e in t?w(t,e,{enumerable:!0,configura RelationshipsPanel }, template: '' // $props comes from args below -})`,...(g=(_=n.parameters)==null?void 0:_.docs)==null?void 0:g.source}}};var b,E,x;p.parameters={...p.parameters,docs:{...(b=p.parameters)==null?void 0:b.docs,source:{originalSource:`(args, { +})`,...(g=(v=n.parameters)==null?void 0:v.docs)==null?void 0:g.source}}};var b,E,x;p.parameters={...p.parameters,docs:{...(b=p.parameters)==null?void 0:b.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -31,4 +31,4 @@ var w=Object.defineProperty;var V=(t,e,s)=>e in t?w(t,e,{enumerable:!0,configura }, template: '' // $props comes from args below })`,...(k=(S=d.parameters)==null?void 0:S.docs)==null?void 0:k.source}}};const J=["Default","twoRelationshipsSelected","greenBackground","showValidationErrors"];export{n as Default,J as __namedExportsOrder,q as default,c as greenBackground,d as showValidationErrors,p as twoRelationshipsSelected}; -//# sourceMappingURL=RelationshipsPanel.stories-eaed025e.js.map +//# sourceMappingURL=RelationshipsPanel.stories-bad507aa.js.map diff --git a/docs/assets/RelationshipsPanel.stories-eaed025e.js.map b/docs/assets/RelationshipsPanel.stories-bad507aa.js.map similarity index 99% rename from docs/assets/RelationshipsPanel.stories-eaed025e.js.map rename to docs/assets/RelationshipsPanel.stories-bad507aa.js.map index 8a666514..7e821927 100644 --- a/docs/assets/RelationshipsPanel.stories-eaed025e.js.map +++ b/docs/assets/RelationshipsPanel.stories-bad507aa.js.map @@ -1 +1 @@ -{"version":3,"file":"RelationshipsPanel.stories-eaed025e.js","sources":["../../src/enums/relationship-types.ts","../../src/components/relationships-panel/RelationshipsPanel.vue"],"sourcesContent":["export enum RelationshipTypes {\n COURT_ORDERED_PARTY = 'Court Ordered Party',\n DIRECTOR = 'Director',\n HEIR_LEGAL_REP = 'Heir or Legal Representative',\n OFFICER = 'Officer',\n SHAREHOLDER = 'Shareholder'\n}\n","\n\n\n\n"],"names":["RelationshipTypes","RelationshipsPanel","Vue","__publicField","event","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"yUAAY,IAAAA,GAAAA,IACVA,EAAA,oBAAsB,sBACtBA,EAAA,SAAW,WACXA,EAAA,eAAiB,+BACjBA,EAAA,QAAU,UACVA,EAAA,YAAc,cALJA,IAAAA,GAAA,CAAA,CAAA,8LCyFZ,IAAAC,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,2BACAA,EAAA,cACAA,EAAA,6BAGAA,EAAA,6BAAA,CAAA,GACAA,EAAA,yBAAA,IACAA,EAAA,yBAAAH,GAMA,SAAA,CACA,KAAA,mBAAA,OAAA,GACA,KAAA,sBAAA,KAAA,GAAA,KAAA,kBAAA,CAEA,CAGA,sBAAA,CACA,KAAA,kBAAA,KAAA,sBAAA,KAAA,sBAAA,SAAA,CACA,CAIA,sBAAA,CACA,OAAA,KAAA,qBACA,CAIA,mBAAAI,EAAA,CACA,OAAAA,CACA,CAQA,iBAAAA,EAAA,CACA,KAAA,qBAAA,EACA,KAAA,qBAAA,EACA,KAAA,sBAAA,SAAA,EACA,KAAA,mBAAA,EAAA,EAEA,KAAA,mBAAA,EAAA,CAEA,CACA,EAnDAC,EAAA,CAAAC,EAAA,CAAA,QAAA,IAAA,CAAA,EAAA,CAAA,EAFAL,EAEA,UAAA,qBAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,OAAA,CAAA,EAHAL,EAGA,UAAA,QAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAJAL,EAIA,UAAA,uBAAA,CAAA,EAwBAI,EAAA,CADAE,EAAA,SAAA,CAAA,EA3BAN,EA4BA,UAAA,uBAAA,CAAA,EAMAI,EAAA,CADAE,EAAA,OAAA,CAAA,EAjCAN,EAkCA,UAAA,qBAAA,CAAA,EAUAI,EAAA,CAHAG,EAAA,uBAAA,EACAA,EAAA,sBAAA,CAAA,EA1CAP,EA4CA,UAAA,mBAAA,CAAA,EA5CAA,EAAAI,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"RelationshipsPanel.stories-bad507aa.js","sources":["../../src/enums/relationship-types.ts","../../src/components/relationships-panel/RelationshipsPanel.vue"],"sourcesContent":["export enum RelationshipTypes {\n COURT_ORDERED_PARTY = 'Court Ordered Party',\n DIRECTOR = 'Director',\n HEIR_LEGAL_REP = 'Heir or Legal Representative',\n OFFICER = 'Officer',\n SHAREHOLDER = 'Shareholder'\n}\n","\n\n\n\n"],"names":["RelationshipTypes","RelationshipsPanel","Vue","__publicField","event","__decorateClass","Prop","Emit","Watch","Component"],"mappings":"yUAAY,IAAAA,GAAAA,IACVA,EAAA,oBAAsB,sBACtBA,EAAA,SAAW,WACXA,EAAA,eAAiB,+BACjBA,EAAA,QAAU,UACVA,EAAA,YAAc,cALJA,IAAAA,GAAA,CAAA,CAAA,8LCyFZ,IAAAC,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,2BACAA,EAAA,cACAA,EAAA,6BAGAA,EAAA,6BAAA,CAAA,GACAA,EAAA,yBAAA,IACAA,EAAA,yBAAAH,GAMA,SAAA,CACA,KAAA,mBAAA,OAAA,GACA,KAAA,sBAAA,KAAA,GAAA,KAAA,kBAAA,CAEA,CAGA,sBAAA,CACA,KAAA,kBAAA,KAAA,sBAAA,KAAA,sBAAA,SAAA,CACA,CAIA,sBAAA,CACA,OAAA,KAAA,qBACA,CAIA,mBAAAI,EAAA,CACA,OAAAA,CACA,CAQA,iBAAAA,EAAA,CACA,KAAA,qBAAA,EACA,KAAA,qBAAA,EACA,KAAA,sBAAA,SAAA,EACA,KAAA,mBAAA,EAAA,EAEA,KAAA,mBAAA,EAAA,CAEA,CACA,EAnDAC,EAAA,CAAAC,EAAA,CAAA,QAAA,IAAA,CAAA,EAAA,CAAA,EAFAL,EAEA,UAAA,qBAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,OAAA,CAAA,EAHAL,EAGA,UAAA,QAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAJAL,EAIA,UAAA,uBAAA,CAAA,EAwBAI,EAAA,CADAE,EAAA,SAAA,CAAA,EA3BAN,EA4BA,UAAA,uBAAA,CAAA,EAMAI,EAAA,CADAE,EAAA,OAAA,CAAA,EAjCAN,EAkCA,UAAA,qBAAA,CAAA,EAUAI,EAAA,CAHAG,EAAA,uBAAA,EACAA,EAAA,sBAAA,CAAA,EA1CAP,EA4CA,UAAA,mBAAA,CAAA,EA5CAA,EAAAI,EAAA,CADAI,EAAA,CAAA,CAAA,CAAA,EACAR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/ShareStructure.stories-1b54f27e.js b/docs/assets/ShareStructure.stories-1b54f27e.js new file mode 100644 index 00000000..8edb9a51 --- /dev/null +++ b/docs/assets/ShareStructure.stories-1b54f27e.js @@ -0,0 +1,18 @@ +var G=Object.defineProperty;var H=(i,e,a)=>e in i?G(i,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[e]=a;var o=(i,e,a)=>(H(i,typeof e!="symbol"?e+"":e,a),a);import{V as b}from"./vue.esm-b1e57a2f.js";import{C as A,m as Y,P as h,E as S,n as k}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as E}from"./Watch-62f8b699.js";import{l as v}from"./lodash-f6b38868.js";import{A as l,a as W}from"./ActionChip-5afeb099.js";import{C as F}from"./ConfirmDialog-428577e9.js";import"./_commonjsHelpers-de833af9.js";let y;const j=new Uint8Array(16);function z(){if(!y&&(y=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y(j)}const u=[];for(let i=0;i<256;++i)u.push((i+256).toString(16).slice(1));function Z(i,e=0){return u[i[e+0]]+u[i[e+1]]+u[i[e+2]]+u[i[e+3]]+"-"+u[i[e+4]]+u[i[e+5]]+"-"+u[i[e+6]]+u[i[e+7]]+"-"+u[i[e+8]]+u[i[e+9]]+"-"+u[i[e+10]]+u[i[e+11]]+u[i[e+12]]+u[i[e+13]]+u[i[e+14]]+u[i[e+15]]}const J=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),P={randomUUID:J};function V(i,e,a){if(P.randomUUID&&!e&&!i)return P.randomUUID();i=i||{};const s=i.random||(i.rng||z)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){a=a||0;for(let t=0;t<16;++t)e[a+t]=s[t];return e}return Z(s)}function O(i,e,a){const s=e<0?i.length+e:e;if(s>=0&&s{for(var t=s>1?void 0:s?Q(e,a):e,r=i.length-1,n;r>=0;r--)(n=i[r])&&(t=(s?n(e,a,t):n(t))||t);return s&&t&&X(e,a,t),t};let x=class extends b{constructor(){super(...arguments);o(this,"currencyList",[{code:"CAD",name:"Canadian dollar"},{code:"USD",name:"United States dollar"},{divider:!0},{code:"AED",name:"UAE dirham"},{code:"AFN",name:"Afghan afghani"},{code:"ALL",name:"Albanian lek"},{code:"AMD",name:"Armenian dram"},{code:"ANG",name:"Netherlands Antillean gulden"},{code:"AOA",name:"Angolan kwanza"},{code:"ARS",name:"Argentine peso"},{code:"AUD",name:"Australian dollar"},{code:"AWG",name:"Aruban florin"},{code:"AZN",name:"Azerbaijani manat"},{code:"BAM",name:"Bosnia and Herzegovina konvertibilna marka"},{code:"BBD",name:"Barbadian dollar"},{code:"BDT",name:"Bangladeshi taka"},{code:"BGN",name:"Bulgarian lev"},{code:"BHD",name:"Bahraini dinar"},{code:"BIF",name:"Burundi franc"},{code:"BMD",name:"Bermudian dollar"},{code:"BND",name:"Brunei dollar"},{code:"BOB",name:"Bolivian boliviano"},{code:"BRL",name:"Brazilian real"},{code:"BSD",name:"Bahamian dollar"},{code:"BTN",name:"Bhutanese ngultrum"},{code:"BWP",name:"Botswana pula"},{code:"BYR",name:"Belarusian ruble"},{code:"BZD",name:"Belize dollar"},{code:"CDF",name:"Congolese franc"},{code:"CHF",name:"Swiss franc"},{code:"CLP",name:"Chilean peso"},{code:"CNY",name:"Chinese/Yuan renminbi"},{code:"COP",name:"Colombian peso"},{code:"CRC",name:"Costa Rican colon"},{code:"CUC",name:"Cuban peso"},{code:"CVE",name:"Cape Verdean escudo"},{code:"CZK",name:"Czech koruna"},{code:"DJF",name:"Djiboutian franc"},{code:"DKK",name:"Danish krone"},{code:"DOP",name:"Dominican peso"},{code:"DZD",name:"Algerian dinar"},{code:"EEK",name:"Estonian kroon"},{code:"EGP",name:"Egyptian pound"},{code:"ERN",name:"Eritrean nakfa"},{code:"ETB",name:"Ethiopian birr"},{code:"EUR",name:"European Euro"},{code:"FJD",name:"Fijian dollar"},{code:"FKP",name:"Falkland Islands pound"},{code:"GBP",name:"British pound"},{code:"GEL",name:"Georgian lari"},{code:"GHS",name:"Ghanaian cedi"},{code:"GIP",name:"Gibraltar pound"},{code:"GMD",name:"Gambian dalasi"},{code:"GNF",name:"Guinean franc"},{code:"GQE",name:"Central African CFA franc"},{code:"GTQ",name:"Guatemalan quetzal"},{code:"GYD",name:"Guyanese dollar"},{code:"HKD",name:"Hong Kong dollar"},{code:"HNL",name:"Honduran lempira"},{code:"HRK",name:"Croatian kuna"},{code:"HTG",name:"Haitian gourde"},{code:"HUF",name:"Hungarian forint"},{code:"IDR",name:"Indonesian rupiah"},{code:"ILS",name:"Israeli new sheqel"},{code:"INR",name:"Indian rupee"},{code:"IQD",name:"Iraqi dinar"},{code:"IRR",name:"Iranian rial"},{code:"ISK",name:"Icelandic króna"},{code:"JMD",name:"Jamaican dollar"},{code:"JOD",name:"Jordanian dinar"},{code:"JPY",name:"Japanese yen"},{code:"KES",name:"Kenyan shilling"},{code:"KGS",name:"Kyrgyzstani som"},{code:"KHR",name:"Cambodian riel"},{code:"KMF",name:"Comorian franc"},{code:"KPW",name:"North Korean won"},{code:"KRW",name:"South Korean won"},{code:"KWD",name:"Kuwaiti dinar"},{code:"KYD",name:"Cayman Islands dollar"},{code:"KZT",name:"Kazakhstani tenge"},{code:"LAK",name:"Lao kip"},{code:"LBP",name:"Lebanese lira"},{code:"LKR",name:"Sri Lankan rupee"},{code:"LRD",name:"Liberian dollar"},{code:"LSL",name:"Lesotho loti"},{code:"LTL",name:"Lithuanian litas"},{code:"LVL",name:"Latvian lats"},{code:"LYD",name:"Libyan dinar"},{code:"MAD",name:"Moroccan dirham"},{code:"MDL",name:"Moldovan leu"},{code:"MGA",name:"Malagasy ariary"},{code:"MKD",name:"Macedonian denar"},{code:"MMK",name:"Myanma kyat"},{code:"MNT",name:"Mongolian tugrik"},{code:"MOP",name:"Macanese pataca"},{code:"MRO",name:"Mauritanian ouguiya"},{code:"MUR",name:"Mauritian rupee"},{code:"MVR",name:"Maldivian rufiyaa"},{code:"MWK",name:"Malawian kwacha"},{code:"MXN",name:"Mexican peso"},{code:"MYR",name:"Malaysian ringgit"},{code:"MZM",name:"Mozambican metical"},{code:"NAD",name:"Namibian dollar"},{code:"NGN",name:"Nigerian naira"},{code:"NIO",name:"Nicaraguan córdoba"},{code:"NOK",name:"Norwegian krone"},{code:"NPR",name:"Nepalese rupee"},{code:"NZD",name:"New Zealand dollar"},{code:"OMR",name:"Omani rial"},{code:"PAB",name:"Panamanian balboa"},{code:"PEN",name:"Peruvian nuevo sol"},{code:"PGK",name:"Papua New Guinean kina"},{code:"PHP",name:"Philippine peso"},{code:"PKR",name:"Pakistani rupee"},{code:"PLN",name:"Polish zloty"},{code:"PYG",name:"Paraguayan guarani"},{code:"QAR",name:"Qatari riyal"},{code:"RON",name:"Romanian leu"},{code:"RSD",name:"Serbian dinar"},{code:"RUB",name:"Russian ruble"},{code:"SAR",name:"Saudi riyal"},{code:"SBD",name:"Solomon Islands dollar"},{code:"SCR",name:"Seychellois rupee"},{code:"SDG",name:"Sudanese pound"},{code:"SEK",name:"Swedish krona"},{code:"SGD",name:"Singapore dollar"},{code:"SHP",name:"Saint Helena pound"},{code:"SLL",name:"Sierra Leonean leone"},{code:"SOS",name:"Somali shilling"},{code:"SRD",name:"Surinamese dollar"},{code:"SYP",name:"Syrian pound"},{code:"SZL",name:"Swazi lilangeni"},{code:"THB",name:"Thai baht"},{code:"TJS",name:"Tajikistani somoni"},{code:"TMT",name:"Turkmen manat"},{code:"TND",name:"Tunisian dinar"},{code:"TRY",name:"Turkish new lira"},{code:"TTD",name:"Trinidad and Tobago dollar"},{code:"TWD",name:"New Taiwan dollar"},{code:"TZS",name:"Tanzanian shilling"},{code:"UAH",name:"Ukrainian hryvnia"},{code:"UGX",name:"Ugandan shilling"},{code:"UYU",name:"Uruguayan peso"},{code:"UZS",name:"Uzbekistani som"},{code:"VEB",name:"Venezuelan bolivar"},{code:"VND",name:"Vietnamese dong"},{code:"VUV",name:"Vanuatu vatu"},{code:"WST",name:"Samoan tala"},{code:"XAF",name:"Central African CFA franc"},{code:"XCD",name:"East Caribbean dollar"},{code:"XDR",name:"Special Drawing Rights"},{code:"XOF",name:"West African CFA franc"},{code:"XPF",name:"CFP franc"},{code:"YER",name:"Yemeni rial"},{code:"ZAR",name:"South African rand"},{code:"ZMK",name:"Zambian kwacha"},{code:"ZWR",name:"Zimbabwean dollar"}])}getCurrencyList(){return this.currencyList}getCurrencyNameByCode(e){const a=this.currencyList.find(s=>s.code===e);return a&&a.name}};x=ee([A({})],x);var ae=Object.defineProperty,se=Object.getOwnPropertyDescriptor,p=(i,e,a,s)=>{for(var t=s>1?void 0:s?se(e,a):e,r=i.length-1,n;r>=0;r--)(n=i[r])&&(t=(s?n(e,a,t):n(t))||t);return s&&t&&ae(e,a,t),t};let d=class extends Y(x){constructor(){super(...arguments);o(this,"$refs");o(this,"initialValue");o(this,"activeIndex");o(this,"parentIndex");o(this,"shareId");o(this,"shareClasses");o(this,"resolutionRequired");o(this,"invalidSection");o(this,"nameRules",[]);o(this,"maximumShareRules",[]);o(this,"parValueRules",[]);o(this,"currencyRules",[]);o(this,"shareStructure",null);o(this,"formValid",!0);o(this,"hasNoMaximumShares",!1);o(this,"hasNoParValue",!1);o(this,"hasSeriesShares",!1);o(this,"excludedWordsListForClass",["share","shares","value"]);o(this,"excludedWordsListForSeries",["share","shares"])}get isClass(){return this.shareStructure.type==="Class"}get isSeries(){return this.shareStructure.type==="Series"}get isNoMaxSharesVisible(){return this.isSeries?!this.shareClasses[this.parentIndex].hasMaximumShares:!0}get nameRule(){const a=[s=>!/^\s/g.test(s)||"Invalid spaces",s=>!/\s$/g.test(s)||"Invalid spaces"];return this.isClass?(a.push(s=>!!s||'Enter the name of the class - the word "Shares" is automatically added',s=>!this.shareClasses.find((t,r)=>r!==this.activeIndex&&t.name.split(" Shares")[0].toLowerCase()===s.toLowerCase())||"Class name must be unique"),a.push(s=>!s.split(" ").some(t=>this.excludedWordsListForClass.includes(t.toLowerCase()))||"Class name should not contain any of the words share, shares or value")):this.isSeries&&(a.push(s=>!!s||'Enter the name of the series - the word "Shares" is automatically added',s=>!this.shareClasses[this.parentIndex].series.find((t,r)=>r!==this.activeIndex&&t.name.split(" Shares")[0].toLowerCase()===s.toLowerCase())||"Series name must be unique"),a.push(s=>!s.split(" ").some(t=>this.excludedWordsListForSeries.includes(t.toLowerCase()))||"Series name should not contain any of the words share or shares")),a}get maximumShareRule(){let a=[];if(!this.hasNoMaximumShares){if(a=[s=>s!==""&&s!==null&&s!==void 0||"Number of shares is required",s=>/^-?\d+$/.test(s)||"Must be a whole number",s=>+s>0||"Number must be greater than 0",s=>s&&s.toString().length<16||"Number must be less than 16 digits"],this.isClass&&this.activeIndex!==-1&&!this.hasNoMaximumShares&&this.shareStructure.series.length>0){const s=this.shareStructure.series.reduce((t,r)=>+t+ +r.maxNumberOfShares,0);a.push(t=>!!t||"Enter the maximum number of shares in the class",t=>+t>=s||"The number for the series (or all series combined, if there are multiple under a class) cannot exceed the number for the class")}if(this.isSeries&&this.shareClasses[this.parentIndex].hasMaximumShares){let s=this.shareClasses[this.parentIndex].series;this.activeIndex!==-1&&(s=s.filter(r=>r.id!==this.shareClasses[this.parentIndex].series[this.activeIndex].id));const t=s.reduce((r,n)=>+r+ +n.maxNumberOfShares,0);a.push(r=>!!r||"Enter the maximum number of shares in the series",r=>+r+t<=+this.shareClasses[this.parentIndex].maxNumberOfShares||"The number for the series (or all series combined, if there are multiple under a class) cannot exceed the number for the class")}}return a}get parValueRule(){let a=[];return this.hasNoParValue||(a=[s=>s!==""&&s!==null&&s!==void 0||"Par value is required",s=>+s>0||"Amount must be greater than 0",s=>+s<1?/^(\d+(\.\d{0,3})?|\.\d{0,3})$/.test(s)||"Amounts less than 1 can be entered with up to 3 decimal place":/^\d+(\.\d{1,2})?$/.test(s)||"Amounts greater than 1 can be entered with up to 2 decimal place"]),a}get currencyRule(){return this.hasNoParValue?[]:[a=>!!a||"Currency is required"]}created(){if(this.initialValue&&(this.shareStructure={...this.initialValue},this.hasNoMaximumShares=!this.shareStructure.hasMaximumShares,this.hasNoParValue=!this.shareStructure.hasParValue,this.hasSeriesShares=this.shareStructure.hasRightsOrRestrictions&&this.shareStructure.series&&this.shareStructure.series.length>=1,this.activeIndex!==-1)){const a=this.shareStructure.name;this.shareStructure.name=a.substr(0,a.indexOf(" Shares"))}}async validateForm(){if(this.nameRules=this.nameRule,this.maximumShareRules=this.maximumShareRule,this.parValueRules=this.parValueRule,this.currencyRules=this.currencyRule,await b.nextTick(),this.$refs.shareStructureForm.validate(),this.formValid){const a=this.addShareStructure();this.emitAddShareStructureEvent(a),this.resetFormAndData(!1)}}emitAddShareStructureEvent(a){this.isClass?this.emitAddEditShareClassEvent(a):this.isSeries&&this.emitAddEditShareSeriesEvent(a)}addShareStructure(){let a={...this.shareStructure};if(this.activeIndex===-1&&(a.id=this.shareId),a.name=`${a.name} Shares`,a.hasMaximumShares=!this.hasNoMaximumShares,a.hasParValue=!this.hasNoParValue,!a.hasRightsOrRestrictions&&a.series){let s=[];a.series.forEach(t=>{if(t.action===l.ADDED){const r=a.series.findIndex(n=>n.id===t.id);s.push(r)}}),s.reverse().forEach(t=>a.series.splice(t,1)),a.series.forEach(t=>{t.action=l.REMOVED})}return a}removeShareStructure(){this.isClass?this.emitRemoveShareClassEvent(this.activeIndex):this.isSeries&&this.emitRemoveShareSeriesEvent(this.activeIndex)}resetFormAndData(a){this.$refs.shareStructureForm.reset(),a&&this.emitResetEvent()}changeMaximumShareFlag(){this.hasNoMaximumShares&&(this.shareStructure.maxNumberOfShares=null)}changeParValueFlag(){this.hasNoParValue&&(this.shareStructure.currency=null,this.shareStructure.parValue=null)}async confirmSeriesRemoval(){this.hasSeriesShares&&!this.shareStructure.hasRightsOrRestrictions?this.$refs.confirm.open("Remove Share Series with Class","A share series exists for this class. Removing the Special Rights or Restrictions for this class will remove all associated share series.",{width:"45rem",persistent:!0,yes:"Remove",no:null,cancel:"Cancel"}).then(()=>{this.shareStructure.hasRightsOrRestrictions=!1}).catch(()=>{this.shareStructure.hasRightsOrRestrictions=!0}):this.resolutionRequired&&(await this.emitResolutionPrompt(!0),this.shareStructure.hasRightsOrRestrictions=!1)}updateResolutionRequirement(){this.shareStructure.hasRightsOrRestrictions=!this.resolutionRequired}emitAddEditShareClassEvent(a){}emitAddEditShareSeriesEvent(a){}emitRemoveShareClassEvent(a){}emitRemoveShareSeriesEvent(a){}emitResetEvent(){}emitResolutionPrompt(a){}};p([h({default:null})],d.prototype,"initialValue",2);p([h({default:null})],d.prototype,"activeIndex",2);p([h({default:null})],d.prototype,"parentIndex",2);p([h({default:""})],d.prototype,"shareId",2);p([h({default:[]})],d.prototype,"shareClasses",2);p([h({default:!1})],d.prototype,"resolutionRequired",2);p([h({default:!1})],d.prototype,"invalidSection",2);p([E("resolutionRequired")],d.prototype,"updateResolutionRequirement",1);p([S("addEditClass")],d.prototype,"emitAddEditShareClassEvent",1);p([S("addEditSeries")],d.prototype,"emitAddEditShareSeriesEvent",1);p([S("removeClass")],d.prototype,"emitRemoveShareClassEvent",1);p([S("removeSeries")],d.prototype,"emitRemoveShareSeriesEvent",1);p([S("resetEvent")],d.prototype,"emitResetEvent",1);p([S("resolutionPrompt")],d.prototype,"emitResolutionPrompt",1);d=p([A({components:{ConfirmDialog:F}})],d);var te=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("div",{attrs:{id:"edit-share-structure"}},[a("ConfirmDialog",{ref:"confirm",attrs:{attach:"#edit-share-structure"}}),a("v-expand-transition",[a("ul",{staticClass:"list add-share-structure"},[a("li",{staticClass:"add-share-structure-container"},[a("div",{staticClass:"meta-container"},[a("label",{staticClass:"add-share-structure-header",class:{"error-text":e.invalidSection}},[e.activeIndex===-1?a("span",{staticClass:"pl-5",class:{"pl-10 text-body-3":e.isSeries}},[e._v(" Add Share "+e._s(e.shareStructure.type)+" ")]):a("span",{class:{"pl-10 text-body-3":e.isSeries}},[e._v("Edit Share "+e._s(e.shareStructure.type))])]),a("div",{staticClass:"meta-container__inner"},[a("v-form",{ref:"shareStructureForm",staticClass:"share-structure-form",on:{submit:function(s){return s.preventDefault(),e.addShareStructure()}},model:{value:e.formValid,callback:function(s){e.formValid=s},expression:"formValid"}},[a("v-text-field",{attrs:{id:"txt-name",filled:"",label:e.shareStructure.type+" Name [Shares]",hint:"Enter the name of the "+e.shareStructure.type.toLowerCase()+' - the word "Shares" is automatically added',rules:e.nameRules,suffix:"Shares","persistent-hint":""},model:{value:e.shareStructure.name,callback:function(s){e.$set(e.shareStructure,"name",s)},expression:"shareStructure.name"}}),a("v-divider",{staticClass:"separator"}),a("v-radio-group",{staticClass:"radio-group",attrs:{column:""},on:{change:function(s){return e.changeMaximumShareFlag()}},model:{value:e.hasNoMaximumShares,callback:function(s){e.hasNoMaximumShares=s},expression:"hasNoMaximumShares"}},[a("v-radio",{attrs:{value:!1},scopedSlots:e._u([{key:"label",fn:function(){return[a("v-row",[a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"txt-max-shares",filled:"",label:"Maximum Number of Shares","persistent-hint":"",hint:"Enter the maximum number of shares in the "+e.shareStructure.type.toLowerCase(),rules:e.maximumShareRules,disabled:e.hasNoMaximumShares},model:{value:e.shareStructure.maxNumberOfShares,callback:function(s){e.$set(e.shareStructure,"maxNumberOfShares",e._n(s))},expression:"shareStructure.maxNumberOfShares"}})],1)],1)]},proxy:!0}])}),e.isNoMaxSharesVisible?a("v-radio",{attrs:{id:"lbl-no-maximum",value:!0,label:"No maximum"}}):e._e()],1),a("v-divider",{staticClass:"separator mx-4"}),a("v-radio-group",{directives:[{name:"show",rawName:"v-show",value:e.isClass,expression:"isClass"}],staticClass:"radio-group",attrs:{column:""},on:{change:function(s){return e.changeParValueFlag()}},model:{value:e.hasNoParValue,callback:function(s){e.hasNoParValue=s},expression:"hasNoParValue"}},[a("v-radio",{attrs:{id:"radio-par-value",value:!1},scopedSlots:e._u([{key:"label",fn:function(){return[a("v-row",[a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"class-par-value",filled:"",label:"Par Value",rules:e.parValueRules,hint:"Enter the initial value of each share","persistent-hint":""},model:{value:e.shareStructure.parValue,callback:function(s){e.$set(e.shareStructure,"parValue",e._n(s))},expression:"shareStructure.parValue"}})],1),a("v-col",{attrs:{cols:"6"}},[a("v-select",{attrs:{id:"class-currency",items:e.getCurrencyList(),filled:"",label:"Currency",rules:e.currencyRules,"item-text":"`${data.item.name}, ${data.item.code}`","item-value":"code"},scopedSlots:e._u([{key:"selection",fn:function(s){return[e._v(" "+e._s(s.item.name)+" ("+e._s(s.item.code)+") ")]}},{key:"item",fn:function(s){return[e._v(" "+e._s(s.item.name)+" ("+e._s(s.item.code)+") ")]}}]),model:{value:e.shareStructure.currency,callback:function(s){e.$set(e.shareStructure,"currency",s)},expression:"shareStructure.currency"}})],1)],1)]},proxy:!0}])}),a("v-radio",{attrs:{id:"radio-no-par",value:!0,label:"No par value"}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:e.isSeries,expression:"isSeries"}],staticClass:"pl-10"},[e.shareStructure.hasParValue?a("v-row",[a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"series-par-value",label:"Par Value",value:e.shareStructure.parValue,disabled:!0,width:"10"}})],1),a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"series-currency",label:"Currency",value:`${e.getCurrencyNameByCode(e.shareStructure.currency)} (${e.shareStructure.currency})`,disabled:!0}})],1)],1):a("v-label",{attrs:{id:"lbl-no-par"}},[e._v(" No par value ")])],1),a("v-divider",{staticClass:"separator mx-4"}),a("div",{staticClass:"form__row"},[a("v-checkbox",{attrs:{id:"special-rights-check-box",label:"This share "+e.shareStructure.type.toLowerCase()+" has special rights or restrictions"},on:{click:function(s){return e.confirmSeriesRemoval()}},model:{value:e.shareStructure.hasRightsOrRestrictions,callback:function(s){e.$set(e.shareStructure,"hasRightsOrRestrictions",s)},expression:"shareStructure.hasRightsOrRestrictions"}})],1),a("div",{staticClass:"form__row form__btns"},[a("v-btn",{attrs:{id:"remove-btn",large:"",outlined:"",color:"error",disabled:e.activeIndex===-1},on:{click:function(s){return e.removeShareStructure()}}},[e._v(" Remove ")]),a("v-btn",{staticClass:"form-primary-btn",attrs:{id:"done-btn",large:"",color:"primary"},on:{click:function(s){return e.validateForm()}}},[e._v(" Done ")]),a("v-btn",{attrs:{id:"cancel-btn",large:"",outlined:"",color:"primary"},on:{click:function(s){return e.resetFormAndData(!0)}}},[e._v(" Cancel ")])],1)],1)],1)])])])])],1)},re=[],B=k(d,te,re,!1,null,"d38ead96",null,null);const ie=B.exports;B.exports.__docgenInfo={description:"Mixin that provides currency list and lookup operations",tags:{},exportName:"default",displayName:"EditShareStructure",props:[{name:"initialValue",tags:{},type:{name:"ShareClassIF"},defaultValue:{func:!1,value:"null"}},{name:"activeIndex",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"parentIndex",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"shareId",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"shareClasses",tags:{},type:{name:"Array",elements:[{name:"ShareClassIF"}]},defaultValue:{func:!1,value:"[]"}},{name:"resolutionRequired",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Prompt Error.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"addEditClass"},{name:"addEditSeries"},{name:"removeClass"},{name:"removeSeries"},{name:"resetEvent"},{name:"resolutionPrompt"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/share-structure/EditShareStructure.vue","/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/share-structure/currency-lookup-mixin.ts"]};var ne=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,m=(i,e,a,s)=>{for(var t=s>1?void 0:s?oe(e,a):e,r=i.length-1,n;r>=0;r--)(n=i[r])&&(t=(s?n(e,a,t):n(t))||t);return s&&t&&ne(e,a,t),t};let c=class extends b{constructor(){super(...arguments);o(this,"ActionTypes",l);o(this,"$refs");o(this,"isEditMode");o(this,"originalShareStructure");o(this,"shareClasses");o(this,"resolutionRequired");o(this,"editLabel");o(this,"editedLabel");o(this,"hasRightsOrRestrictions");o(this,"invalidSection");o(this,"invalidMinimumShareClass");o(this,"activeIndex",-1);o(this,"classDropdown",[]);o(this,"parentIndex",-1);o(this,"seriesDropdown",this.mapEmpty2dArray());o(this,"shareId","");o(this,"showAddShareStructureForm",!1);o(this,"showClassEditForm",[!1]);o(this,"showSeriesAddForm",[!1]);o(this,"showSeriesEditForm",this.mapEmpty2dArray());o(this,"addEditInProgress",!1);o(this,"currentShareStructure",null);o(this,"headers",[{text:"Name of Share Class or Series",align:"start",sortable:!1,value:"name"},{text:"Maximum Number of Shares",value:"maxNumberOfShares"},{text:"Par Value",value:"parValue"},{text:"Currency",value:"currency"},{text:"Special Rights or Restrictions",value:"hasRightsOrRestrictions"}]);o(this,"newShareClass",{id:null,priority:null,type:"Class",name:"",hasMaximumShares:!0,maxNumberOfShares:null,hasParValue:!0,parValue:null,currency:"CAD",hasRightsOrRestrictions:!1,series:[],action:l.ADDED});o(this,"newShareSeries",{id:null,priority:null,type:"Series",name:"",hasMaximumShares:!0,maxNumberOfShares:null,hasParValue:!0,parValue:null,currency:null,hasRightsOrRestrictions:!1,action:l.ADDED})}get hasClassChanges(){return this.shareClasses.some(a=>a.action)}get hasSeriesChanges(){return!!this.shareClasses.find(a=>a.series.some(s=>s.action))}formatParValue(a){return a.toString().includes(".")?a:`${a}.00`}clearDropdowns(){this.classDropdown=[],this.seriesDropdown=this.mapEmpty2dArray()}displaySeriesRow(a,s,t){return this.showSeriesEditForm[a.index]&&!this.showSeriesEditForm[a.index][t]&&!(!this.isEditMode&&(s.action===l.REMOVED||a.item.action===l.REMOVED))}initNewShareClass(){this.activeIndex=-1,this.parentIndex=-1,this.currentShareStructure={...this.newShareClass},this.currentShareStructure.priority=this.shareClasses.length===0?1:this.shareClasses[this.shareClasses.length-1].priority+1,this.shareId=V(),this.addEditInProgress=!0,this.showAddShareStructureForm=!0}initShareClassForEdit(a){this.currentShareStructure={...this.shareClasses[a]},this.activeIndex=a,this.parentIndex=-1,this.addEditInProgress=!0,this.showClassEditForm[a]=!0}addEditShareClass(a){a.action!==l.ADDED&&(a.action=this.isShareClassEdited(a)?l.EDITED:null);let s=[...this.shareClasses];this.activeIndex===-1?s.push(a):s.splice(this.activeIndex,1,a),this.emitShareClasses(s),this.resetData()}isShareClassEdited(a){const t=v.cloneDeep(this.originalShareStructure.shareClasses).find(r=>+r.id==+a.id);return!v.isEqual({...v.omit(a,"action")},{...v.omit(t,"action")})}removeShareClass(a){const s={...this.shareClasses[a]};let t=[...this.shareClasses];s.action===l.ADDED?t.splice(a,1):(s.action=l.REMOVED,t.splice(a,1,s)),this.emitShareClasses(t),this.resetData()}restoreShareClass(a){const t=v.cloneDeep(this.originalShareStructure.shareClasses).find(n=>+n.id==+this.shareClasses[a].id);let r=[...this.shareClasses];r[a]={...t,series:[...t.series]},r.forEach(n=>{n.hasRightsOrRestrictions||(n.series=[])}),this.emitShareClasses(r),this.resetData()}initNewShareSeries(a){this.activeIndex=-1,this.parentIndex=a;const t=[...this.shareClasses][a],r=t.series;this.currentShareStructure={...this.newShareSeries},this.currentShareStructure.hasParValue=t.hasParValue,this.currentShareStructure.parValue=t.parValue,this.currentShareStructure.currency=t.currency,this.currentShareStructure.priority=r.length===0?1:r[r.length-1].priority+1,this.shareId=V(),this.addEditInProgress=!0,this.showSeriesAddForm[a]=!0}addEditShareSeries(a){a.action!==l.ADDED&&this.isShareClassEdited(a)&&(a.action=l.EDITED);let s=[...this.shareClasses];const t=s[this.parentIndex];let r=[...t.series];this.activeIndex===-1?r.push(a):r.splice(this.activeIndex,1,a),t.series=r,this.emitShareClasses(s),this.resetData()}editSeries(a,s){this.activeIndex=s,this.parentIndex=a;let t=[...this.shareClasses];this.currentShareStructure={...t[this.parentIndex].series[this.activeIndex]},this.addEditInProgress=!0,this.showSeriesEditForm[a][s]=!0}removeSeries(a,s){const t={...this.shareClasses[s].series[a]};let r=[...this.shareClasses];t.action===l.ADDED?r[s].series.splice(a,1):(t.action=l.REMOVED,r[s].series.splice(a,1,t)),this.emitShareClasses(r),this.resetData()}restoreShareSeries(a,s,t,r){const n=v.cloneDeep(this.originalShareStructure.shareClasses),g=Object.assign({},n.find(R=>+R.id==+t)),q=Object.assign({},g.series.find(R=>+R.id==+r));let M=[...this.shareClasses];M[s].series[a]=q,this.emitShareClasses(M),this.resetData()}moveIndex(a,s,t=-1){let r;t>=0?(r=s==="up"?t-1:t+1,this.shareClasses[a].series[t].priority=r,this.shareClasses[a].series[t].priority=a,O(this.shareClasses[a].series,t,r)):(r=s==="up"?a-1:a+1,this.shareClasses[a].priority=r,this.shareClasses[r].priority=a,O(this.shareClasses,a,r)),this.clearDropdowns()}isMoveDisabled(a,s,t=-1){const r=t>=0,n=r?this.shareClasses[a].series.length-1:this.shareClasses.length-1;switch(s){case"up":return r?t===0:a===0;case"down":return r?t===n:a===n;default:return!1}}undoCorrection(a,s,t,r=null,n=null,g=null){switch(s){case l.ADDED:a?this.removeShareClass(t):this.removeSeries(t,r);break;case l.EDITED:a?this.restoreShareClass(t):this.restoreShareSeries(t,r,n,g);break;case l.REMOVED:a?this.restoreShareClass(t):this.restoreShareSeries(t,r,n,g);break}this.clearDropdowns()}resetData(){function a(s){({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STORYBOOK:"true"}).JEST_WORKER_ID!==void 0||window.scrollTo({top:s.offsetTop,behavior:"smooth"})}this.currentShareStructure=null,this.activeIndex=-1,this.addEditInProgress=!1,this.showAddShareStructureForm=!1,this.showClassEditForm=[!1],this.showSeriesAddForm=[!1],this.showSeriesEditForm=this.mapEmpty2dArray(),this.parentIndex=-1,this.shareId="",b.nextTick(()=>a(this.$el)),this.clearDropdowns()}confirmShareRemoval(a){({...this.shareClasses[a]}).series.length>0?this.$refs.confirm.open("Remove Share Series with Class","A share series exists for this class. Removing the share class will remove all associated share series.",{width:"45rem",persistent:!0,yes:"Remove",no:null,cancel:"Cancel"}).then(()=>{this.removeShareClass(a)}).catch(()=>{this.resetData()}):this.removeShareClass(a)}mapEmpty2dArray(){return new Array(50).fill(null).map(()=>new Array(50).fill(null))}onShareStructureChanged(){this.emitShareStructureChanged(this.hasClassChanges||this.hasSeriesChanges)}onEditingChanged(a){this.emitEditingShareStructure(a)}emitShareClasses(a){}emitShareStructureChanged(a){}emitEditingShareStructure(a){}emitResolutionPrompt(a){}};m([h({default:!0})],c.prototype,"isEditMode",2);m([h({default:null})],c.prototype,"originalShareStructure",2);m([h({default:[]})],c.prototype,"shareClasses",2);m([h({default:!1})],c.prototype,"resolutionRequired",2);m([h({default:"Edit"})],c.prototype,"editLabel",2);m([h({default:"EDITED"})],c.prototype,"editedLabel",2);m([h({default:!1})],c.prototype,"hasRightsOrRestrictions",2);m([h({default:!1})],c.prototype,"invalidSection",2);m([h({default:!1})],c.prototype,"invalidMinimumShareClass",2);m([E("hasClassChanges"),E("hasSeriesChanges")],c.prototype,"onShareStructureChanged",1);m([E("addEditInProgress",{immediate:!0})],c.prototype,"onEditingChanged",1);m([S("emitShareClasses")],c.prototype,"emitShareClasses",1);m([S("emitShareStructureChanged")],c.prototype,"emitShareStructureChanged",1);m([S("emitEditingShareStructure")],c.prototype,"emitEditingShareStructure",1);m([S("emitResolutionPrompt")],c.prototype,"emitResolutionPrompt",1);c=m([A({components:{ActionChip:W,ConfirmDialog:F,EditShareStructure:ie}})],c);var le=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("v-card",{attrs:{id:"share-structure",flat:""}},[a("ConfirmDialog",{ref:"confirm",attrs:{attach:"#share-structure"}}),e.isEditMode?[a("div",{attrs:{id:"share-summary"}},[a("div",{staticClass:"share-summary-header"},[a("v-icon",{attrs:{color:"app-dk-blue"}},[e._v(" mdi-sitemap ")]),a("label",{staticClass:"share-summary-header-title"},[a("strong",[e._v("Share Structure")])])],1)]),a("div",{staticClass:"share-info-container info-text pt-6 px-4"},[e._v(" If your share structure contains a class or series of shares with special rights or restrictions, you must have passed a resolution or have a court order to change your share structure. "),a("strong",[e._v("Note:")]),e._v(" All changes must have the same Resolution or Court Order Date. If you need to enter changes that occurred on multiple dates you must file and pay for each change separately. "),e.invalidMinimumShareClass?a("p",{staticClass:"error-text small-text mt-6"},[e._v(" Your share structure must contain at least one share class. ")]):e._e()]),a("div",{staticClass:"btn-container py-6 px-4"},[a("v-btn",{attrs:{id:"btn-add-person",outlined:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(s){return e.initNewShareClass()}}},[a("v-icon",[e._v("mdi-plus")]),a("span",[e._v("Add Share Class")])],1)],1)]:e._e(),a("div",{class:{"invalid-section":e.invalidSection}},[a("v-expand-transition",[e.showAddShareStructureForm?a("v-card",{staticClass:"add-share-structure-container",attrs:{flat:""}},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(s){return e.addEditShareClass(s)},resolutionPrompt:function(s){return e.emitResolutionPrompt(s)},resetEvent:function(s){return e.resetData()}}})],1):e._e()],1)],1),a("v-data-table",{staticClass:"share-structure-table",attrs:{headers:e.headers,items:e.shareClasses,"disable-pagination":"","disable-sort":"","hide-default-footer":""},scopedSlots:e._u([{key:"item",fn:function(s){return[!e.showClassEditForm[s.index]&&!(!e.isEditMode&&s.item.action===e.ActionTypes.REMOVED)?a("tr",{key:s.item.id,staticClass:"class-row",class:[{"class-row-has-series":s.item.series.length},{removed:s.item.action===e.ActionTypes.REMOVED}]},[a("td",{staticClass:"list-item__title",class:[{"invalid-section":e.invalidMinimumShareClass},{"list-item__subtitle":s.item.action===e.ActionTypes.REMOVED}]},[e._v(" "+e._s(s.item.name)+" "),s.item.action&&e.isEditMode?a("ActionChip",{staticClass:"pb-2",attrs:{"actionable-item":s.item,"edited-label":e.editedLabel}}):e._e()],1),a("td",{staticClass:"text-right"},[e._v(" "+e._s(s.item.maxNumberOfShares?(+s.item.maxNumberOfShares).toLocaleString():"No Maximum")+" ")]),a("td",{staticClass:"text-right"},[e._v(" "+e._s(s.item.parValue?`$${e.formatParValue(s.item.parValue)}`:"No Par Value")+" ")]),a("td",[e._v(e._s(s.item.currency))]),a("td",[e._v(e._s(s.item.hasRightsOrRestrictions?"Yes":"No"))]),e.isEditMode?a("td",{staticClass:"actions-cell pt-4"},[a("div",{staticClass:"actions"},[s.item.action?e._e():a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"class-"+s.index+"-change-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(t){return e.initShareClassForEdit(s.index)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v(e._s(e.editLabel))])],1)],1),s.item.action===e.ActionTypes.EDITED||s.item.action===e.ActionTypes.REMOVED?a("span",{class:{"undo-action":s.item.action!==e.ActionTypes.REMOVED}},[a("v-btn",{attrs:{id:"class-"+s.index+"-undo-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(t){return e.undoCorrection(!0,s.item.action,s.index)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-undo")]),a("span",[e._v("Undo")])],1)],1):e._e(),s.item.action===e.ActionTypes.ADDED?a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"class-"+s.index+"-change-added-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(t){return e.initShareClassForEdit(s.index)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v("Edit")])],1)],1):e._e(),s.item.action!==e.ActionTypes.REMOVED?a("span",[a("v-menu",{attrs:{"offset-y":"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[a("v-btn",e._g({staticClass:"actions__more-actions__btn",attrs:{text:"",color:"primary",disabled:e.addEditInProgress}},t),[a("v-icon",[e._v(e._s(e.classDropdown[s.index]?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!0),model:{value:e.classDropdown[s.index],callback:function(t){e.$set(e.classDropdown,s.index,t)},expression:"classDropdown[row.index]"}},[a("v-list",{staticClass:"more-actions"},[s.item.action===e.ActionTypes.EDITED?a("v-list-item",{staticClass:"actions-dropdown_item",attrs:{disabled:e.addEditInProgress},on:{click:function(t){return e.initShareClassForEdit(s.index)}}},[a("v-list-item-subtitle",[a("v-icon",{staticClass:"mr-3",attrs:{small:"",color:"primary"}},[e._v("mdi-pencil")]),a("span",[e._v("Change")])],1)],1):e._e(),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":!s.item.hasRightsOrRestrictions},attrs:{disabled:!s.item.hasRightsOrRestrictions},on:{click:function(t){return e.initNewShareSeries(s.index)}}},[a("v-list-item-subtitle",[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-playlist-plus")]),a("span",[e._v("Add Series")])],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"up")},attrs:{disabled:e.isMoveDisabled(s.index,"up")},on:{click:function(t){return e.moveIndex(s.index,"up")}}},[a("v-list-item-subtitle",{staticClass:"move-up-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-up")]),a("span",[e._v("Move Up")])],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"down")},attrs:{disabled:e.isMoveDisabled(s.index,"down")},on:{click:function(t){return e.moveIndex(s.index,"down")}}},[a("v-list-item-subtitle",{staticClass:"move-down-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-down")]),a("span",[e._v("Move Down")])],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",on:{click:function(t){return e.confirmShareRemoval(s.index)}}},[a("v-list-item-subtitle",{staticClass:"remove-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-delete")]),a("span",[e._v("Remove")])],1)],1)],1)],1)],1):e._e()])]):[a("span")]],2):e._e(),e.showClassEditForm[s.index]?a("tr",[a("td",{class:{"invalid-section":e.invalidSection},attrs:{colspan:"6"}},[a("v-expand-transition",[a("div",{staticClass:"edit-share-structure-container"},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(t){return e.addEditShareClass(t)},addEditSeries:function(t){return e.addEditShareSeries(t)},removeClass:function(t){return e.confirmShareRemoval(t)},resolutionPrompt:function(t){return e.emitResolutionPrompt(t)},resetEvent:function(t){return e.resetData()}}})],1)])],1)]):e._e(),e._l(s.item.series,function(t,r){return[e.displaySeriesRow(s,t,r)?a("tr",{key:`class:${s.index}-Series:${r}`,staticClass:"series-row",class:[{"series-row-last":r===s.item.series.length-1},{removed:s.item.action===e.ActionTypes.REMOVED||t.action===e.ActionTypes.REMOVED}]},[a("td",{staticClass:"series-name",class:{"invalid-section":e.invalidMinimumShareClass}},[a("li",[a("span",{staticClass:"h3 ml-n2",class:{"list-item__subtitle":s.item.action===e.ActionTypes.REMOVED||t.action===e.ActionTypes.REMOVED}},[e._v(e._s(t.name))])]),s.item.action!==e.ActionTypes.REMOVED&&t.action&&e.isEditMode?a("ActionChip",{attrs:{"actionable-item":t,"edited-label":e.editedLabel}}):e._e()],1),a("td",{staticClass:"text-right"},[e._v(" "+e._s(t.maxNumberOfShares?(+t.maxNumberOfShares).toLocaleString():"No Maximum")+" ")]),a("td",{staticClass:"text-right"},[e._v(" "+e._s(s.item.parValue?`$${e.formatParValue(s.item.parValue)}`:"No Par Value")+" ")]),a("td",[e._v(e._s(s.item.currency))]),a("td",[e._v(e._s(t.hasRightsOrRestrictions?"Yes":"No"))]),e.isEditMode?a("td",{staticClass:"actions-cell pt-4"},[s.item.action!==e.ActionTypes.REMOVED?a("div",{staticClass:"actions"},[t.action?s.item.hasRightsOrRestrictions&&t.action!==e.ActionTypes.ADDED?a("span",{class:{"undo-action":t.action!==e.ActionTypes.REMOVED}},[a("v-btn",{attrs:{id:"series-"+r+"-undo-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(n){return e.undoCorrection(!1,t.action,r,s.index,s.item.id,t.id)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-undo")]),a("span",[e._v("Undo")])],1)],1):t.action!==e.ActionTypes.REMOVED?a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"series-"+r+"-change-added-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(n){return e.editSeries(s.index,r)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v("Edit")])],1)],1):e._e():a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"series-"+r+"-change-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(n){return e.editSeries(s.index,r)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v(e._s(e.editLabel))])],1)],1),t.action!==e.ActionTypes.REMOVED?a("span",[a("v-menu",{attrs:{"offset-y":"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[a("v-btn",e._g({staticClass:"actions__more-actions__btn",attrs:{text:"",color:"primary",disabled:e.addEditInProgress}},n),[a("v-icon",[e._v(e._s(e.seriesDropdown[s.index][r]?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!0),model:{value:e.seriesDropdown[s.index][r],callback:function(n){e.$set(e.seriesDropdown[s.index],r,n)},expression:"seriesDropdown[row.index][index]"}},[a("v-list",{staticClass:"more-actions"},[t.action===e.ActionTypes.EDITED?a("v-list-item",{staticClass:"actions-dropdown_item",attrs:{disabled:e.addEditInProgress},on:{click:function(n){return e.editSeries(s.index,r)}}},[a("v-list-item-subtitle",[a("v-icon",{staticClass:"mr-2",attrs:{small:"",color:"primary"}},[e._v("mdi-pencil")]),e._v(" "+e._s(e.editLabel)+" ")],1)],1):e._e(),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"up",r)},attrs:{disabled:e.isMoveDisabled(s.index,"up",r)},on:{click:function(n){return e.moveIndex(s.index,"up",r)}}},[a("v-list-item-subtitle",{staticClass:"move-up-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-up")]),e._v(" Move Up ")],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"down",r)},attrs:{disabled:e.isMoveDisabled(s.index,"down",r)},on:{click:function(n){return e.moveIndex(s.index,"down",r)}}},[a("v-list-item-subtitle",{staticClass:"move-down-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-down")]),e._v(" Move Down ")],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",on:{click:function(n){return e.removeSeries(r,s.index)}}},[a("v-list-item-subtitle",[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-delete")]),e._v(" Remove ")],1)],1)],1)],1)],1):e._e()]):e._e()]):[a("span")]],2):e._e(),e.showSeriesEditForm[s.index]&&e.showSeriesEditForm[s.index][r]?a("tr",{key:`class:${s.index}-Series:${r}-edit-form`},[a("td",{class:{"invalid-section":e.invalidSection},attrs:{colspan:"6"}},[a("v-expand-transition",[a("div",{staticClass:"edit-share-structure-container"},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(n){return e.addEditShareClass(n)},addEditSeries:function(n){return e.addEditShareSeries(n)},removeSeries:function(n){return e.removeSeries(n,s.index)},resolutionPrompt:function(n){return e.emitResolutionPrompt(n)},resetEvent:function(n){return e.resetData()}}})],1)])],1)]):e._e()]}),e.showSeriesAddForm[s.index]?a("tr",[a("td",{class:{"invalid-section":e.invalidSection},attrs:{colspan:"6"}},[a("v-expand-transition",[a("div",{staticClass:"edit-share-structure-container"},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(t){return e.addEditShareClass(t)},addEditSeries:function(t){return e.addEditShareSeries(t)},removeSeries:function(t){return e.removeSeries(t,s.index)},resolutionPrompt:function(t){return e.emitResolutionPrompt(t)},resetEvent:function(t){return e.resetData()}}})],1)])],1)]):e._e()]}}])})],2)},ce=[],K=k(c,le,ce,!1,null,"0b58c838",null,null);const ue=K.exports;K.exports.__docgenInfo={exportName:"default",displayName:"ShareStructure",description:"",tags:{},props:[{name:"isEditMode",tags:{},description:"Edit Mode",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"originalShareStructure",tags:{},type:{name:"ShareStructureIF"},defaultValue:{func:!1,value:"null"}},{name:"shareClasses",tags:{},type:{name:"Array",elements:[{name:"ShareClassIF"}]},defaultValue:{func:!1,value:"[]"}},{name:"resolutionRequired",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editLabel",tags:{},description:"Edit label name (ie 'Change' or 'Correct')",type:{name:"string"},defaultValue:{func:!1,value:"'Edit'"}},{name:"editedLabel",tags:{},description:"Edited label name (ie 'Changed' or 'Corrected')",type:{name:"string"},defaultValue:{func:!1,value:"'EDITED'"}},{name:"hasRightsOrRestrictions",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Prompt Error.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidMinimumShareClass",tags:{},description:"Verification the Share Structure contains the minimum required Share Classes.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"emitShareClasses"},{name:"emitShareStructureChanged"},{name:"emitEditingShareStructure"},{name:"emitResolutionPrompt"}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/share-structure/ShareStructure.vue"]};const be={title:"component/ShareStructure"},U=(i,{argTypes:e})=>({props:Object.keys(e),components:{ShareStructure:ue},template:''}),_={business:{identifier:"BC1230105",legalType:"BEN"},header:{certifiedBy:"Cameron",date:"2021-03-04T16:59:54.905823+00:00",effectiveDate:"2021-03-04T16:59:54.905880+00:00",filingId:111645,isFutureEffective:!1,name:"incorporationApplication",status:"COMPLETED"},incorporationApplication:{contactPoint:{email:"cameron@freshworks.io",extension:"",phone:"(123) 456-7890"},incorporationAgreement:{agreementType:"sample"},nameRequest:{legalType:"BEN"},nameTranslations:[],offices:{},parties:[],shareStructure:{shareClasses:[{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:"434416",maxNumberOfShares:100,name:"Class A Shares",parValue:1,priority:1,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:"434265",maxNumberOfShares:10,name:"Series 1A Shares",priority:1,type:"Series"},{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:"434266",maxNumberOfShares:2,name:"Series 2 Shares",priority:2,type:"Series"}],type:"Class"},{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:"434417",maxNumberOfShares:122,name:"Class B Shares",parValue:2,priority:2,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:"434267",maxNumberOfShares:22,name:"Series b1 Shares",priority:1,type:"Series"}],type:"Class"}]}}},D=[{business:{}},{aliases:[]},{recordsOffice:{},registeredOffice:{}},{directors:[]},{shareClasses:[{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:434416,maxNumberOfShares:100,name:"Class A Shares",parValue:1,priority:1,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:434265,maxNumberOfShares:10,name:"Series 1A Shares",priority:1,type:"Series"},{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:434266,maxNumberOfShares:2,name:"Series 2 Shares",priority:2,type:"Series"}],type:"Class"},{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:434417,maxNumberOfShares:122,name:"Class B Shares",parValue:2,priority:2,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:434267,maxNumberOfShares:22,name:"Series b1 Shares",priority:1,type:"Series"}],type:"Class"}]},{}],f=U.bind({});f.args={isEditMode:!0,editLabel:"Correct",editedLabel:"CORRECTED",isCorrection:!0,incorporationApplication:_,businessSnapshot:D,shareClasses:_.incorporationApplication.shareStructure.shareClasses,resolutionRequired:!1};const C=U.bind({});C.args={isEditMode:!0,editLabel:"Change",editedLabel:"CHANGED",isCorrection:!0,incorporationApplication:_,businessSnapshot:D,shareClasses:D[4].shareClasses,resolutionRequired:!0};var N,I,T;f.parameters={...f.parameters,docs:{...(N=f.parameters)==null?void 0:N.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + ShareStructure + }, + template: '' // $props comes from args below +})`,...(T=(I=f.parameters)==null?void 0:I.docs)==null?void 0:T.source}}};var w,L,$;C.parameters={...C.parameters,docs:{...(w=C.parameters)==null?void 0:w.docs,source:{originalSource:`(args, { + argTypes +}) => ({ + props: Object.keys(argTypes), + components: { + ShareStructure + }, + template: '' // $props comes from args below +})`,...($=(L=C.parameters)==null?void 0:L.docs)==null?void 0:$.source}}};const Ee=["correction","alteration"];export{Ee as __namedExportsOrder,C as alteration,f as correction,be as default}; +//# sourceMappingURL=ShareStructure.stories-1b54f27e.js.map diff --git a/docs/assets/ShareStructure.stories-f446bb48.js.map b/docs/assets/ShareStructure.stories-1b54f27e.js.map similarity index 99% rename from docs/assets/ShareStructure.stories-f446bb48.js.map rename to docs/assets/ShareStructure.stories-1b54f27e.js.map index bd38757f..0076c5e0 100644 --- a/docs/assets/ShareStructure.stories-f446bb48.js.map +++ b/docs/assets/ShareStructure.stories-1b54f27e.js.map @@ -1 +1 @@ -{"version":3,"file":"ShareStructure.stories-f446bb48.js","sources":["../../node_modules/uuid/dist/esm-browser/rng.js","../../node_modules/uuid/dist/esm-browser/stringify.js","../../node_modules/uuid/dist/esm-browser/native.js","../../node_modules/uuid/dist/esm-browser/v4.js","../../src/components/share-structure/array-move.ts","../../src/components/share-structure/currency-lookup-mixin.ts","../../src/components/share-structure/EditShareStructure.vue","../../src/components/share-structure/ShareStructure.vue"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","/** array-move version 4.0\nCredit: https://github.com/sindresorhus/array-move\n\nLicence:\n\nMIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or\nsubstantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n**/\n\n/**\nMoves the item to the new position in the input array. Useful for huge arrays where absolute performance is needed.\n\n@param array - The array to modify.\n@param fromIndex - The index of item to move. If negative, it will begin that many elements from the end.\n@param toIndex - The index of where to move the item. If negative, it will begin that many elements from the end.\n**/\nexport function arrayMoveMutable (array: unknown[], fromIndex: number, toIndex: number): void {\n const startIndex = fromIndex < 0 ? array.length + fromIndex : fromIndex\n\n if (startIndex >= 0 && startIndex < array.length) {\n const endIndex = toIndex < 0 ? array.length + toIndex : toIndex\n\n const [item] = array.splice(fromIndex, 1)\n array.splice(endIndex, 0, item)\n }\n}\n\n/**\nClones the given `array`, moves the item to a new position in the new array, and then returns the new array.\nThe given `array` is not mutated.\n\n@param array - The array with the item to move.\n@param fromIndex - The index of item to move. If negative, it will begin that many elements from the end.\n@param toIndex - The index of where to move the item. If negative, it will begin that many elements from the end.\n@returns A new array with the item moved to the new position.\n**/\nexport function arrayMoveImmutable (array: readonly ValueType[], fromIndex: number, toIndex: number):\n ValueType[] {\n const newArray = [...array]\n arrayMoveMutable(newArray, fromIndex, toIndex)\n return newArray\n}\n","import Vue from 'vue'\nimport { Component } from 'vue-property-decorator'\n\n/**\n * Mixin that provides currency list and lookup operations\n */\n@Component({})\nexport default class CurrencyLookupMixin extends Vue {\n readonly currencyList = [\n { code: 'CAD', name: 'Canadian dollar' },\n { code: 'USD', name: 'United States dollar' },\n { divider: true },\n { code: 'AED', name: 'UAE dirham' },\n { code: 'AFN', name: 'Afghan afghani' },\n { code: 'ALL', name: 'Albanian lek' },\n { code: 'AMD', name: 'Armenian dram' },\n { code: 'ANG', name: 'Netherlands Antillean gulden' },\n { code: 'AOA', name: 'Angolan kwanza' },\n { code: 'ARS', name: 'Argentine peso' },\n { code: 'AUD', name: 'Australian dollar' },\n { code: 'AWG', name: 'Aruban florin' },\n { code: 'AZN', name: 'Azerbaijani manat' },\n { code: 'BAM', name: 'Bosnia and Herzegovina konvertibilna marka' },\n { code: 'BBD', name: 'Barbadian dollar' },\n { code: 'BDT', name: 'Bangladeshi taka' },\n { code: 'BGN', name: 'Bulgarian lev' },\n { code: 'BHD', name: 'Bahraini dinar' },\n { code: 'BIF', name: 'Burundi franc' },\n { code: 'BMD', name: 'Bermudian dollar' },\n { code: 'BND', name: 'Brunei dollar' },\n { code: 'BOB', name: 'Bolivian boliviano' },\n { code: 'BRL', name: 'Brazilian real' },\n { code: 'BSD', name: 'Bahamian dollar' },\n { code: 'BTN', name: 'Bhutanese ngultrum' },\n { code: 'BWP', name: 'Botswana pula' },\n { code: 'BYR', name: 'Belarusian ruble' },\n { code: 'BZD', name: 'Belize dollar' },\n { code: 'CDF', name: 'Congolese franc' },\n { code: 'CHF', name: 'Swiss franc' },\n { code: 'CLP', name: 'Chilean peso' },\n { code: 'CNY', name: 'Chinese/Yuan renminbi' },\n { code: 'COP', name: 'Colombian peso' },\n { code: 'CRC', name: 'Costa Rican colon' },\n { code: 'CUC', name: 'Cuban peso' },\n { code: 'CVE', name: 'Cape Verdean escudo' },\n { code: 'CZK', name: 'Czech koruna' },\n { code: 'DJF', name: 'Djiboutian franc' },\n { code: 'DKK', name: 'Danish krone' },\n { code: 'DOP', name: 'Dominican peso' },\n { code: 'DZD', name: 'Algerian dinar' },\n { code: 'EEK', name: 'Estonian kroon' },\n { code: 'EGP', name: 'Egyptian pound' },\n { code: 'ERN', name: 'Eritrean nakfa' },\n { code: 'ETB', name: 'Ethiopian birr' },\n { code: 'EUR', name: 'European Euro' },\n { code: 'FJD', name: 'Fijian dollar' },\n { code: 'FKP', name: 'Falkland Islands pound' },\n { code: 'GBP', name: 'British pound' },\n { code: 'GEL', name: 'Georgian lari' },\n { code: 'GHS', name: 'Ghanaian cedi' },\n { code: 'GIP', name: 'Gibraltar pound' },\n { code: 'GMD', name: 'Gambian dalasi' },\n { code: 'GNF', name: 'Guinean franc' },\n { code: 'GQE', name: 'Central African CFA franc' },\n { code: 'GTQ', name: 'Guatemalan quetzal' },\n { code: 'GYD', name: 'Guyanese dollar' },\n { code: 'HKD', name: 'Hong Kong dollar' },\n { code: 'HNL', name: 'Honduran lempira' },\n { code: 'HRK', name: 'Croatian kuna' },\n { code: 'HTG', name: 'Haitian gourde' },\n { code: 'HUF', name: 'Hungarian forint' },\n { code: 'IDR', name: 'Indonesian rupiah' },\n { code: 'ILS', name: 'Israeli new sheqel' },\n { code: 'INR', name: 'Indian rupee' },\n { code: 'IQD', name: 'Iraqi dinar' },\n { code: 'IRR', name: 'Iranian rial' },\n { code: 'ISK', name: 'Icelandic kr\\u00f3na' },\n { code: 'JMD', name: 'Jamaican dollar' },\n { code: 'JOD', name: 'Jordanian dinar' },\n { code: 'JPY', name: 'Japanese yen' },\n { code: 'KES', name: 'Kenyan shilling' },\n { code: 'KGS', name: 'Kyrgyzstani som' },\n { code: 'KHR', name: 'Cambodian riel' },\n { code: 'KMF', name: 'Comorian franc' },\n { code: 'KPW', name: 'North Korean won' },\n { code: 'KRW', name: 'South Korean won' },\n { code: 'KWD', name: 'Kuwaiti dinar' },\n { code: 'KYD', name: 'Cayman Islands dollar' },\n { code: 'KZT', name: 'Kazakhstani tenge' },\n { code: 'LAK', name: 'Lao kip' },\n { code: 'LBP', name: 'Lebanese lira' },\n { code: 'LKR', name: 'Sri Lankan rupee' },\n { code: 'LRD', name: 'Liberian dollar' },\n { code: 'LSL', name: 'Lesotho loti' },\n { code: 'LTL', name: 'Lithuanian litas' },\n { code: 'LVL', name: 'Latvian lats' },\n { code: 'LYD', name: 'Libyan dinar' },\n { code: 'MAD', name: 'Moroccan dirham' },\n { code: 'MDL', name: 'Moldovan leu' },\n { code: 'MGA', name: 'Malagasy ariary' },\n { code: 'MKD', name: 'Macedonian denar' },\n { code: 'MMK', name: 'Myanma kyat' },\n { code: 'MNT', name: 'Mongolian tugrik' },\n { code: 'MOP', name: 'Macanese pataca' },\n { code: 'MRO', name: 'Mauritanian ouguiya' },\n { code: 'MUR', name: 'Mauritian rupee' },\n { code: 'MVR', name: 'Maldivian rufiyaa' },\n { code: 'MWK', name: 'Malawian kwacha' },\n { code: 'MXN', name: 'Mexican peso' },\n { code: 'MYR', name: 'Malaysian ringgit' },\n { code: 'MZM', name: 'Mozambican metical' },\n { code: 'NAD', name: 'Namibian dollar' },\n { code: 'NGN', name: 'Nigerian naira' },\n { code: 'NIO', name: 'Nicaraguan c\\u00f3rdoba' },\n { code: 'NOK', name: 'Norwegian krone' },\n { code: 'NPR', name: 'Nepalese rupee' },\n { code: 'NZD', name: 'New Zealand dollar' },\n { code: 'OMR', name: 'Omani rial' },\n { code: 'PAB', name: 'Panamanian balboa' },\n { code: 'PEN', name: 'Peruvian nuevo sol' },\n { code: 'PGK', name: 'Papua New Guinean kina' },\n { code: 'PHP', name: 'Philippine peso' },\n { code: 'PKR', name: 'Pakistani rupee' },\n { code: 'PLN', name: 'Polish zloty' },\n { code: 'PYG', name: 'Paraguayan guarani' },\n { code: 'QAR', name: 'Qatari riyal' },\n { code: 'RON', name: 'Romanian leu' },\n { code: 'RSD', name: 'Serbian dinar' },\n { code: 'RUB', name: 'Russian ruble' },\n { code: 'SAR', name: 'Saudi riyal' },\n { code: 'SBD', name: 'Solomon Islands dollar' },\n { code: 'SCR', name: 'Seychellois rupee' },\n { code: 'SDG', name: 'Sudanese pound' },\n { code: 'SEK', name: 'Swedish krona' },\n { code: 'SGD', name: 'Singapore dollar' },\n { code: 'SHP', name: 'Saint Helena pound' },\n { code: 'SLL', name: 'Sierra Leonean leone' },\n { code: 'SOS', name: 'Somali shilling' },\n { code: 'SRD', name: 'Surinamese dollar' },\n { code: 'SYP', name: 'Syrian pound' },\n { code: 'SZL', name: 'Swazi lilangeni' },\n { code: 'THB', name: 'Thai baht' },\n { code: 'TJS', name: 'Tajikistani somoni' },\n { code: 'TMT', name: 'Turkmen manat' },\n { code: 'TND', name: 'Tunisian dinar' },\n { code: 'TRY', name: 'Turkish new lira' },\n { code: 'TTD', name: 'Trinidad and Tobago dollar' },\n { code: 'TWD', name: 'New Taiwan dollar' },\n { code: 'TZS', name: 'Tanzanian shilling' },\n { code: 'UAH', name: 'Ukrainian hryvnia' },\n { code: 'UGX', name: 'Ugandan shilling' },\n { code: 'UYU', name: 'Uruguayan peso' },\n { code: 'UZS', name: 'Uzbekistani som' },\n { code: 'VEB', name: 'Venezuelan bolivar' },\n { code: 'VND', name: 'Vietnamese dong' },\n { code: 'VUV', name: 'Vanuatu vatu' },\n { code: 'WST', name: 'Samoan tala' },\n { code: 'XAF', name: 'Central African CFA franc' },\n { code: 'XCD', name: 'East Caribbean dollar' },\n { code: 'XDR', name: 'Special Drawing Rights' },\n { code: 'XOF', name: 'West African CFA franc' },\n { code: 'XPF', name: 'CFP franc' },\n { code: 'YER', name: 'Yemeni rial' },\n { code: 'ZAR', name: 'South African rand' },\n { code: 'ZMK', name: 'Zambian kwacha' },\n { code: 'ZWR', name: 'Zimbabwean dollar' }\n ]\n\n getCurrencyList (): Array {\n return this.currencyList\n }\n\n getCurrencyNameByCode (code: string): string {\n const currency = this.currencyList.find(currency => currency.code === code)\n return currency && currency.name\n }\n}\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["getRandomValues","rnds8","rng","byteToHex","unsafeStringify","arr","offset","randomUUID","native","v4","options","buf","rnds","i","arrayMoveMutable","array","fromIndex","toIndex","startIndex","endIndex","item","CurrencyLookupMixin","Vue","__publicField","code","currency","__decorateClass","Component","EditShareStructure","Mixins","rules","v","s","index","r","seriesSum","a","b","filteredSeries","series","currentSum","name","shareStructure","shareStructureToAdd","addedSeriesIndexes","ActionTypes","seriesIndex","x","emitEvent","shareClass","shareSeries","shareClassIndex","shareSeriesIndex","requiresPrompt","Prop","Watch","Emit","ConfirmDialog","ShareStructure","parValue","classRow","seriesRow","uuidv4","newList","originalShareClass","cloneDeep","share","isEqual","omit","tempList","shareClassToRestore","classShare","parentShareClass","parentIndex","parentId","seriesId","originalShareClasses","shareSeriesToRestore","indexFrom","direction","indexTo","seriesCheck","arrBoundry","isClass","actionType","scrollToTop","element","val","shareClasses","hasChanges","isEditing","ActionChip"],"mappings":"ogBAGA,IAAIA,EACJ,MAAMC,EAAQ,IAAI,WAAW,EAAE,EAChB,SAASC,GAAM,CAE5B,GAAI,CAACF,IAEHA,EAAkB,OAAO,OAAW,KAAe,OAAO,iBAAmB,OAAO,gBAAgB,KAAK,MAAM,EAE3G,CAACA,GACH,MAAM,IAAI,MAAM,0GAA0G,EAI9H,OAAOA,EAAgBC,CAAK,CAC9B,CCXA,MAAME,EAAY,CAAA,EAElB,QAAS,EAAI,EAAG,EAAI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AAA,0BAAA,CAAA,EAGAhC,EAAA,CAAA4B,EAAA,CAAA,QAAA,GAAA,CAAA,EA/BAI,EA+BA,UAAA,iBAAA,CAAA,EAGAhC,EAAA,CAAA4B,EAAA,CAAA,QAAA,GAAA,CAAA,EAlCAI,EAkCA,UAAA,2BAAA,CAAA,EAodAhC,EAAA,CAFA6B,EAAA,iBAAA,EACAA,EAAA,kBAAA,CAAA,EArfAG,EAsfA,UAAA,0BAAA,CAAA,EAMAhC,EAAA,CADA6B,EAAA,oBAAA,CAAA,UAAA,GAAA,CAAA,EA3fAG,EA4fA,UAAA,mBAAA,CAAA,EAMAhC,EAAA,CAFA8B,EAAA,kBAAA,CAAA,EAhgBAE,EAkgBA,UAAA,mBAAA,CAAA,EAIAhC,EAAA,CAFA8B,EAAA,2BAAA,CAAA,EApgBAE,EAsgBA,UAAA,4BAAA,CAAA,EAIAhC,EAAA,CAFA8B,EAAA,2BAAA,CAAA,EAxgBAE,EA0gBA,UAAA,4BAAA,CAAA,EAIAhC,EAAA,CAFA8B,EAAA,sBAAA,CAAA,EA5gBAE,EA8gBA,UAAA,uBAAA,CAAA,EA9gBAA,EAAAhC,EAAA,CAPAC,EAAA,CACA,WAAA,CACA,WAAAgE,EACA,cAAAlC,EACA,mBAAA7B,EACA,CAAA,CACA,CAAA,EACA8B,CAAA;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]} \ No newline at end of file +{"version":3,"file":"ShareStructure.stories-1b54f27e.js","sources":["../../node_modules/uuid/dist/esm-browser/rng.js","../../node_modules/uuid/dist/esm-browser/stringify.js","../../node_modules/uuid/dist/esm-browser/native.js","../../node_modules/uuid/dist/esm-browser/v4.js","../../src/components/share-structure/array-move.ts","../../src/components/share-structure/currency-lookup-mixin.ts","../../src/components/share-structure/EditShareStructure.vue","../../src/components/share-structure/ShareStructure.vue"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","/** array-move version 4.0\nCredit: https://github.com/sindresorhus/array-move\n\nLicence:\n\nMIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or\nsubstantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n**/\n\n/**\nMoves the item to the new position in the input array. Useful for huge arrays where absolute performance is needed.\n\n@param array - The array to modify.\n@param fromIndex - The index of item to move. If negative, it will begin that many elements from the end.\n@param toIndex - The index of where to move the item. If negative, it will begin that many elements from the end.\n**/\nexport function arrayMoveMutable (array: unknown[], fromIndex: number, toIndex: number): void {\n const startIndex = fromIndex < 0 ? array.length + fromIndex : fromIndex\n\n if (startIndex >= 0 && startIndex < array.length) {\n const endIndex = toIndex < 0 ? array.length + toIndex : toIndex\n\n const [item] = array.splice(fromIndex, 1)\n array.splice(endIndex, 0, item)\n }\n}\n\n/**\nClones the given `array`, moves the item to a new position in the new array, and then returns the new array.\nThe given `array` is not mutated.\n\n@param array - The array with the item to move.\n@param fromIndex - The index of item to move. If negative, it will begin that many elements from the end.\n@param toIndex - The index of where to move the item. If negative, it will begin that many elements from the end.\n@returns A new array with the item moved to the new position.\n**/\nexport function arrayMoveImmutable (array: readonly ValueType[], fromIndex: number, toIndex: number):\n ValueType[] {\n const newArray = [...array]\n arrayMoveMutable(newArray, fromIndex, toIndex)\n return newArray\n}\n","import Vue from 'vue'\nimport { Component } from 'vue-property-decorator'\n\n/**\n * Mixin that provides currency list and lookup operations\n */\n@Component({})\nexport default class CurrencyLookupMixin extends Vue {\n readonly currencyList = [\n { code: 'CAD', name: 'Canadian dollar' },\n { code: 'USD', name: 'United States dollar' },\n { divider: true },\n { code: 'AED', name: 'UAE dirham' },\n { code: 'AFN', name: 'Afghan afghani' },\n { code: 'ALL', name: 'Albanian lek' },\n { code: 'AMD', name: 'Armenian dram' },\n { code: 'ANG', name: 'Netherlands Antillean gulden' },\n { code: 'AOA', name: 'Angolan kwanza' },\n { code: 'ARS', name: 'Argentine peso' },\n { code: 'AUD', name: 'Australian dollar' },\n { code: 'AWG', name: 'Aruban florin' },\n { code: 'AZN', name: 'Azerbaijani manat' },\n { code: 'BAM', name: 'Bosnia and Herzegovina konvertibilna marka' },\n { code: 'BBD', name: 'Barbadian dollar' },\n { code: 'BDT', name: 'Bangladeshi taka' },\n { code: 'BGN', name: 'Bulgarian lev' },\n { code: 'BHD', name: 'Bahraini dinar' },\n { code: 'BIF', name: 'Burundi franc' },\n { code: 'BMD', name: 'Bermudian dollar' },\n { code: 'BND', name: 'Brunei dollar' },\n { code: 'BOB', name: 'Bolivian boliviano' },\n { code: 'BRL', name: 'Brazilian real' },\n { code: 'BSD', name: 'Bahamian dollar' },\n { code: 'BTN', name: 'Bhutanese ngultrum' },\n { code: 'BWP', name: 'Botswana pula' },\n { code: 'BYR', name: 'Belarusian ruble' },\n { code: 'BZD', name: 'Belize dollar' },\n { code: 'CDF', name: 'Congolese franc' },\n { code: 'CHF', name: 'Swiss franc' },\n { code: 'CLP', name: 'Chilean peso' },\n { code: 'CNY', name: 'Chinese/Yuan renminbi' },\n { code: 'COP', name: 'Colombian peso' },\n { code: 'CRC', name: 'Costa Rican colon' },\n { code: 'CUC', name: 'Cuban peso' },\n { code: 'CVE', name: 'Cape Verdean escudo' },\n { code: 'CZK', name: 'Czech koruna' },\n { code: 'DJF', name: 'Djiboutian franc' },\n { code: 'DKK', name: 'Danish krone' },\n { code: 'DOP', name: 'Dominican peso' },\n { code: 'DZD', name: 'Algerian dinar' },\n { code: 'EEK', name: 'Estonian kroon' },\n { code: 'EGP', name: 'Egyptian pound' },\n { code: 'ERN', name: 'Eritrean nakfa' },\n { code: 'ETB', name: 'Ethiopian birr' },\n { code: 'EUR', name: 'European Euro' },\n { code: 'FJD', name: 'Fijian dollar' },\n { code: 'FKP', name: 'Falkland Islands pound' },\n { code: 'GBP', name: 'British pound' },\n { code: 'GEL', name: 'Georgian lari' },\n { code: 'GHS', name: 'Ghanaian cedi' },\n { code: 'GIP', name: 'Gibraltar pound' },\n { code: 'GMD', name: 'Gambian dalasi' },\n { code: 'GNF', name: 'Guinean franc' },\n { code: 'GQE', name: 'Central African CFA franc' },\n { code: 'GTQ', name: 'Guatemalan quetzal' },\n { code: 'GYD', name: 'Guyanese dollar' },\n { code: 'HKD', name: 'Hong Kong dollar' },\n { code: 'HNL', name: 'Honduran lempira' },\n { code: 'HRK', name: 'Croatian kuna' },\n { code: 'HTG', name: 'Haitian gourde' },\n { code: 'HUF', name: 'Hungarian forint' },\n { code: 'IDR', name: 'Indonesian rupiah' },\n { code: 'ILS', name: 'Israeli new sheqel' },\n { code: 'INR', name: 'Indian rupee' },\n { code: 'IQD', name: 'Iraqi dinar' },\n { code: 'IRR', name: 'Iranian rial' },\n { code: 'ISK', name: 'Icelandic kr\\u00f3na' },\n { code: 'JMD', name: 'Jamaican dollar' },\n { code: 'JOD', name: 'Jordanian dinar' },\n { code: 'JPY', name: 'Japanese yen' },\n { code: 'KES', name: 'Kenyan shilling' },\n { code: 'KGS', name: 'Kyrgyzstani som' },\n { code: 'KHR', name: 'Cambodian riel' },\n { code: 'KMF', name: 'Comorian franc' },\n { code: 'KPW', name: 'North Korean won' },\n { code: 'KRW', name: 'South Korean won' },\n { code: 'KWD', name: 'Kuwaiti dinar' },\n { code: 'KYD', name: 'Cayman Islands dollar' },\n { code: 'KZT', name: 'Kazakhstani tenge' },\n { code: 'LAK', name: 'Lao kip' },\n { code: 'LBP', name: 'Lebanese lira' },\n { code: 'LKR', name: 'Sri Lankan rupee' },\n { code: 'LRD', name: 'Liberian dollar' },\n { code: 'LSL', name: 'Lesotho loti' },\n { code: 'LTL', name: 'Lithuanian litas' },\n { code: 'LVL', name: 'Latvian lats' },\n { code: 'LYD', name: 'Libyan dinar' },\n { code: 'MAD', name: 'Moroccan dirham' },\n { code: 'MDL', name: 'Moldovan leu' },\n { code: 'MGA', name: 'Malagasy ariary' },\n { code: 'MKD', name: 'Macedonian denar' },\n { code: 'MMK', name: 'Myanma kyat' },\n { code: 'MNT', name: 'Mongolian tugrik' },\n { code: 'MOP', name: 'Macanese pataca' },\n { code: 'MRO', name: 'Mauritanian ouguiya' },\n { code: 'MUR', name: 'Mauritian rupee' },\n { code: 'MVR', name: 'Maldivian rufiyaa' },\n { code: 'MWK', name: 'Malawian kwacha' },\n { code: 'MXN', name: 'Mexican peso' },\n { code: 'MYR', name: 'Malaysian ringgit' },\n { code: 'MZM', name: 'Mozambican metical' },\n { code: 'NAD', name: 'Namibian dollar' },\n { code: 'NGN', name: 'Nigerian naira' },\n { code: 'NIO', name: 'Nicaraguan c\\u00f3rdoba' },\n { code: 'NOK', name: 'Norwegian krone' },\n { code: 'NPR', name: 'Nepalese rupee' },\n { code: 'NZD', name: 'New Zealand dollar' },\n { code: 'OMR', name: 'Omani rial' },\n { code: 'PAB', name: 'Panamanian balboa' },\n { code: 'PEN', name: 'Peruvian nuevo sol' },\n { code: 'PGK', name: 'Papua New Guinean kina' },\n { code: 'PHP', name: 'Philippine peso' },\n { code: 'PKR', name: 'Pakistani rupee' },\n { code: 'PLN', name: 'Polish zloty' },\n { code: 'PYG', name: 'Paraguayan guarani' },\n { code: 'QAR', name: 'Qatari riyal' },\n { code: 'RON', name: 'Romanian leu' },\n { code: 'RSD', name: 'Serbian dinar' },\n { code: 'RUB', name: 'Russian ruble' },\n { code: 'SAR', name: 'Saudi riyal' },\n { code: 'SBD', name: 'Solomon Islands dollar' },\n { code: 'SCR', name: 'Seychellois rupee' },\n { code: 'SDG', name: 'Sudanese pound' },\n { code: 'SEK', name: 'Swedish krona' },\n { code: 'SGD', name: 'Singapore dollar' },\n { code: 'SHP', name: 'Saint Helena pound' },\n { code: 'SLL', name: 'Sierra Leonean leone' },\n { code: 'SOS', name: 'Somali shilling' },\n { code: 'SRD', name: 'Surinamese dollar' },\n { code: 'SYP', name: 'Syrian pound' },\n { code: 'SZL', name: 'Swazi lilangeni' },\n { code: 'THB', name: 'Thai baht' },\n { code: 'TJS', name: 'Tajikistani somoni' },\n { code: 'TMT', name: 'Turkmen manat' },\n { code: 'TND', name: 'Tunisian dinar' },\n { code: 'TRY', name: 'Turkish new lira' },\n { code: 'TTD', name: 'Trinidad and Tobago dollar' },\n { code: 'TWD', name: 'New Taiwan dollar' },\n { code: 'TZS', name: 'Tanzanian shilling' },\n { code: 'UAH', name: 'Ukrainian hryvnia' },\n { code: 'UGX', name: 'Ugandan shilling' },\n { code: 'UYU', name: 'Uruguayan peso' },\n { code: 'UZS', name: 'Uzbekistani som' },\n { code: 'VEB', name: 'Venezuelan bolivar' },\n { code: 'VND', name: 'Vietnamese dong' },\n { code: 'VUV', name: 'Vanuatu vatu' },\n { code: 'WST', name: 'Samoan tala' },\n { code: 'XAF', name: 'Central African CFA franc' },\n { code: 'XCD', name: 'East Caribbean dollar' },\n { code: 'XDR', name: 'Special Drawing Rights' },\n { code: 'XOF', name: 'West African CFA franc' },\n { code: 'XPF', name: 'CFP franc' },\n { code: 'YER', name: 'Yemeni rial' },\n { code: 'ZAR', name: 'South African rand' },\n { code: 'ZMK', name: 'Zambian kwacha' },\n { code: 'ZWR', name: 'Zimbabwean dollar' }\n ]\n\n getCurrencyList (): Array {\n return this.currencyList\n }\n\n getCurrencyNameByCode (code: string): string {\n const currency = this.currencyList.find(currency => currency.code === code)\n return currency && currency.name\n }\n}\n","\n\n\n\n\n","\n\n\n\n\n"],"names":["getRandomValues","rnds8","rng","byteToHex","unsafeStringify","arr","offset","randomUUID","native","v4","options","buf","rnds","i","arrayMoveMutable","array","fromIndex","toIndex","startIndex","endIndex","item","CurrencyLookupMixin","Vue","__publicField","code","currency","__decorateClass","Component","EditShareStructure","Mixins","rules","v","s","index","r","seriesSum","a","b","filteredSeries","series","currentSum","name","shareStructure","shareStructureToAdd","addedSeriesIndexes","ActionTypes","seriesIndex","x","emitEvent","shareClass","shareSeries","shareClassIndex","shareSeriesIndex","requiresPrompt","Prop","Watch","Emit","ConfirmDialog","ShareStructure","parValue","classRow","seriesRow","uuidv4","newList","originalShareClass","cloneDeep","share","isEqual","omit","tempList","shareClassToRestore","classShare","parentShareClass","parentIndex","parentId","seriesId","originalShareClasses","shareSeriesToRestore","indexFrom","direction","indexTo","seriesCheck","arrBoundry","isClass","actionType","scrollToTop","element","val","shareClasses","hasChanges","isEditing","ActionChip"],"mappings":"ogBAGA,IAAIA,EACJ,MAAMC,EAAQ,IAAI,WAAW,EAAE,EAChB,SAASC,GAAM,CAE5B,G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AA,CAAA,QAAA,OAAA,CAAA,EAvBAI,EAuBA,UAAA,YAAA,CAAA,EAGAhC,EAAA,CAAA4B,EAAA,CAAA,QAAA,SAAA,CAAA,EA1BAI,EA0BA,UAAA,cAAA,CAAA,EAEAhC,EAAA,CAAA4B,EAAA,CAAA,QAAA,GAAA,CAAA,EA5BAI,EA4BA,UAAA,0BAAA,CAAA,EAGAhC,EAAA,CAAA4B,EAAA,CAAA,QAAA,GAAA,CAAA,EA/BAI,EA+BA,UAAA,iBAAA,CAAA,EAGAhC,EAAA,CAAA4B,EAAA,CAAA,QAAA,GAAA,CAAA,EAlCAI,EAkCA,UAAA,2BAAA,CAAA,EAodAhC,EAAA,CAFA6B,EAAA,iBAAA,EACAA,EAAA,kBAAA,CAAA,EArfAG,EAsfA,UAAA,0BAAA,CAAA,EAMAhC,EAAA,CADA6B,EAAA,oBAAA,CAAA,UAAA,GAAA,CAAA,EA3fAG,EA4fA,UAAA,mBAAA,CAAA,EAMAhC,EAAA,CAFA8B,EAAA,kBAAA,CAAA,EAhgBAE,EAkgBA,UAAA,mBAAA,CAAA,EAIAhC,EAAA,CAFA8B,EAAA,2BAAA,CAAA,EApgBAE,EAsgBA,UAAA,4BAAA,CAAA,EAIAhC,EAAA,CAFA8B,EAAA,2BAAA,CAAA,EAxgBAE,EA0gBA,UAAA,4BAAA,CAAA,EAIAhC,EAAA,CAFA8B,EAAA,sBAAA,CAAA,EA5gBAE,EA8gBA,UAAA,uBAAA,CAAA,EA9gBAA,EAAAhC,EAAA,CAPAC,EAAA,CACA,WAAA,CACA,WAAAgE,EACA,cAAAlC,EACA,mBAAA7B,EACA,CAAA,CACA,CAAA,EACA8B,CAAA;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]} \ No newline at end of file diff --git a/docs/assets/ShareStructure.stories-f446bb48.js b/docs/assets/ShareStructure.stories-f446bb48.js deleted file mode 100644 index ad311ed9..00000000 --- a/docs/assets/ShareStructure.stories-f446bb48.js +++ /dev/null @@ -1,18 +0,0 @@ -var G=Object.defineProperty;var H=(i,e,a)=>e in i?G(i,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[e]=a;var o=(i,e,a)=>(H(i,typeof e!="symbol"?e+"":e,a),a);import{V as b}from"./vue.esm-b1e57a2f.js";import{C as A,m as Y,P as h,E as S,n as k}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as E}from"./Watch-62f8b699.js";import{l as v}from"./lodash-f6b38868.js";import{A as l,a as W}from"./ActionChip-73b76eea.js";import{C as F}from"./ConfirmDialog-9091213f.js";import"./_commonjsHelpers-de833af9.js";let g;const j=new Uint8Array(16);function z(){if(!g&&(g=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!g))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return g(j)}const u=[];for(let i=0;i<256;++i)u.push((i+256).toString(16).slice(1));function Z(i,e=0){return u[i[e+0]]+u[i[e+1]]+u[i[e+2]]+u[i[e+3]]+"-"+u[i[e+4]]+u[i[e+5]]+"-"+u[i[e+6]]+u[i[e+7]]+"-"+u[i[e+8]]+u[i[e+9]]+"-"+u[i[e+10]]+u[i[e+11]]+u[i[e+12]]+u[i[e+13]]+u[i[e+14]]+u[i[e+15]]}const J=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),P={randomUUID:J};function V(i,e,a){if(P.randomUUID&&!e&&!i)return P.randomUUID();i=i||{};const s=i.random||(i.rng||z)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){a=a||0;for(let t=0;t<16;++t)e[a+t]=s[t];return e}return Z(s)}function O(i,e,a){const s=e<0?i.length+e:e;if(s>=0&&s{for(var t=s>1?void 0:s?Q(e,a):e,r=i.length-1,n;r>=0;r--)(n=i[r])&&(t=(s?n(e,a,t):n(t))||t);return s&&t&&X(e,a,t),t};let x=class extends b{constructor(){super(...arguments);o(this,"currencyList",[{code:"CAD",name:"Canadian dollar"},{code:"USD",name:"United States dollar"},{divider:!0},{code:"AED",name:"UAE dirham"},{code:"AFN",name:"Afghan afghani"},{code:"ALL",name:"Albanian lek"},{code:"AMD",name:"Armenian dram"},{code:"ANG",name:"Netherlands Antillean gulden"},{code:"AOA",name:"Angolan kwanza"},{code:"ARS",name:"Argentine peso"},{code:"AUD",name:"Australian dollar"},{code:"AWG",name:"Aruban florin"},{code:"AZN",name:"Azerbaijani manat"},{code:"BAM",name:"Bosnia and Herzegovina konvertibilna marka"},{code:"BBD",name:"Barbadian dollar"},{code:"BDT",name:"Bangladeshi taka"},{code:"BGN",name:"Bulgarian lev"},{code:"BHD",name:"Bahraini dinar"},{code:"BIF",name:"Burundi franc"},{code:"BMD",name:"Bermudian dollar"},{code:"BND",name:"Brunei dollar"},{code:"BOB",name:"Bolivian boliviano"},{code:"BRL",name:"Brazilian real"},{code:"BSD",name:"Bahamian dollar"},{code:"BTN",name:"Bhutanese ngultrum"},{code:"BWP",name:"Botswana pula"},{code:"BYR",name:"Belarusian ruble"},{code:"BZD",name:"Belize dollar"},{code:"CDF",name:"Congolese franc"},{code:"CHF",name:"Swiss franc"},{code:"CLP",name:"Chilean peso"},{code:"CNY",name:"Chinese/Yuan renminbi"},{code:"COP",name:"Colombian peso"},{code:"CRC",name:"Costa Rican colon"},{code:"CUC",name:"Cuban peso"},{code:"CVE",name:"Cape Verdean escudo"},{code:"CZK",name:"Czech koruna"},{code:"DJF",name:"Djiboutian franc"},{code:"DKK",name:"Danish krone"},{code:"DOP",name:"Dominican peso"},{code:"DZD",name:"Algerian dinar"},{code:"EEK",name:"Estonian kroon"},{code:"EGP",name:"Egyptian pound"},{code:"ERN",name:"Eritrean nakfa"},{code:"ETB",name:"Ethiopian birr"},{code:"EUR",name:"European Euro"},{code:"FJD",name:"Fijian dollar"},{code:"FKP",name:"Falkland Islands pound"},{code:"GBP",name:"British pound"},{code:"GEL",name:"Georgian lari"},{code:"GHS",name:"Ghanaian cedi"},{code:"GIP",name:"Gibraltar pound"},{code:"GMD",name:"Gambian dalasi"},{code:"GNF",name:"Guinean franc"},{code:"GQE",name:"Central African CFA franc"},{code:"GTQ",name:"Guatemalan quetzal"},{code:"GYD",name:"Guyanese dollar"},{code:"HKD",name:"Hong Kong dollar"},{code:"HNL",name:"Honduran lempira"},{code:"HRK",name:"Croatian kuna"},{code:"HTG",name:"Haitian gourde"},{code:"HUF",name:"Hungarian forint"},{code:"IDR",name:"Indonesian rupiah"},{code:"ILS",name:"Israeli new sheqel"},{code:"INR",name:"Indian rupee"},{code:"IQD",name:"Iraqi dinar"},{code:"IRR",name:"Iranian rial"},{code:"ISK",name:"Icelandic króna"},{code:"JMD",name:"Jamaican dollar"},{code:"JOD",name:"Jordanian dinar"},{code:"JPY",name:"Japanese yen"},{code:"KES",name:"Kenyan shilling"},{code:"KGS",name:"Kyrgyzstani som"},{code:"KHR",name:"Cambodian riel"},{code:"KMF",name:"Comorian franc"},{code:"KPW",name:"North Korean won"},{code:"KRW",name:"South Korean won"},{code:"KWD",name:"Kuwaiti dinar"},{code:"KYD",name:"Cayman Islands dollar"},{code:"KZT",name:"Kazakhstani tenge"},{code:"LAK",name:"Lao kip"},{code:"LBP",name:"Lebanese lira"},{code:"LKR",name:"Sri Lankan rupee"},{code:"LRD",name:"Liberian dollar"},{code:"LSL",name:"Lesotho loti"},{code:"LTL",name:"Lithuanian litas"},{code:"LVL",name:"Latvian lats"},{code:"LYD",name:"Libyan dinar"},{code:"MAD",name:"Moroccan dirham"},{code:"MDL",name:"Moldovan leu"},{code:"MGA",name:"Malagasy ariary"},{code:"MKD",name:"Macedonian denar"},{code:"MMK",name:"Myanma kyat"},{code:"MNT",name:"Mongolian tugrik"},{code:"MOP",name:"Macanese pataca"},{code:"MRO",name:"Mauritanian ouguiya"},{code:"MUR",name:"Mauritian rupee"},{code:"MVR",name:"Maldivian rufiyaa"},{code:"MWK",name:"Malawian kwacha"},{code:"MXN",name:"Mexican peso"},{code:"MYR",name:"Malaysian ringgit"},{code:"MZM",name:"Mozambican metical"},{code:"NAD",name:"Namibian dollar"},{code:"NGN",name:"Nigerian naira"},{code:"NIO",name:"Nicaraguan córdoba"},{code:"NOK",name:"Norwegian krone"},{code:"NPR",name:"Nepalese rupee"},{code:"NZD",name:"New Zealand dollar"},{code:"OMR",name:"Omani rial"},{code:"PAB",name:"Panamanian balboa"},{code:"PEN",name:"Peruvian nuevo sol"},{code:"PGK",name:"Papua New Guinean kina"},{code:"PHP",name:"Philippine peso"},{code:"PKR",name:"Pakistani rupee"},{code:"PLN",name:"Polish zloty"},{code:"PYG",name:"Paraguayan guarani"},{code:"QAR",name:"Qatari riyal"},{code:"RON",name:"Romanian leu"},{code:"RSD",name:"Serbian dinar"},{code:"RUB",name:"Russian ruble"},{code:"SAR",name:"Saudi riyal"},{code:"SBD",name:"Solomon Islands dollar"},{code:"SCR",name:"Seychellois rupee"},{code:"SDG",name:"Sudanese pound"},{code:"SEK",name:"Swedish krona"},{code:"SGD",name:"Singapore dollar"},{code:"SHP",name:"Saint Helena pound"},{code:"SLL",name:"Sierra Leonean leone"},{code:"SOS",name:"Somali shilling"},{code:"SRD",name:"Surinamese dollar"},{code:"SYP",name:"Syrian pound"},{code:"SZL",name:"Swazi lilangeni"},{code:"THB",name:"Thai baht"},{code:"TJS",name:"Tajikistani somoni"},{code:"TMT",name:"Turkmen manat"},{code:"TND",name:"Tunisian dinar"},{code:"TRY",name:"Turkish new lira"},{code:"TTD",name:"Trinidad and Tobago dollar"},{code:"TWD",name:"New Taiwan dollar"},{code:"TZS",name:"Tanzanian shilling"},{code:"UAH",name:"Ukrainian hryvnia"},{code:"UGX",name:"Ugandan shilling"},{code:"UYU",name:"Uruguayan peso"},{code:"UZS",name:"Uzbekistani som"},{code:"VEB",name:"Venezuelan bolivar"},{code:"VND",name:"Vietnamese dong"},{code:"VUV",name:"Vanuatu vatu"},{code:"WST",name:"Samoan tala"},{code:"XAF",name:"Central African CFA franc"},{code:"XCD",name:"East Caribbean dollar"},{code:"XDR",name:"Special Drawing Rights"},{code:"XOF",name:"West African CFA franc"},{code:"XPF",name:"CFP franc"},{code:"YER",name:"Yemeni rial"},{code:"ZAR",name:"South African rand"},{code:"ZMK",name:"Zambian kwacha"},{code:"ZWR",name:"Zimbabwean dollar"}])}getCurrencyList(){return this.currencyList}getCurrencyNameByCode(e){const a=this.currencyList.find(s=>s.code===e);return a&&a.name}};x=ee([A({})],x);var ae=Object.defineProperty,se=Object.getOwnPropertyDescriptor,p=(i,e,a,s)=>{for(var t=s>1?void 0:s?se(e,a):e,r=i.length-1,n;r>=0;r--)(n=i[r])&&(t=(s?n(e,a,t):n(t))||t);return s&&t&&ae(e,a,t),t};let d=class extends Y(x){constructor(){super(...arguments);o(this,"$refs");o(this,"initialValue");o(this,"activeIndex");o(this,"parentIndex");o(this,"shareId");o(this,"shareClasses");o(this,"resolutionRequired");o(this,"invalidSection");o(this,"nameRules",[]);o(this,"maximumShareRules",[]);o(this,"parValueRules",[]);o(this,"currencyRules",[]);o(this,"shareStructure",null);o(this,"formValid",!0);o(this,"hasNoMaximumShares",!1);o(this,"hasNoParValue",!1);o(this,"hasSeriesShares",!1);o(this,"excludedWordsListForClass",["share","shares","value"]);o(this,"excludedWordsListForSeries",["share","shares"])}get isClass(){return this.shareStructure.type==="Class"}get isSeries(){return this.shareStructure.type==="Series"}get isNoMaxSharesVisible(){return this.isSeries?!this.shareClasses[this.parentIndex].hasMaximumShares:!0}get nameRule(){const a=[s=>!/^\s/g.test(s)||"Invalid spaces",s=>!/\s$/g.test(s)||"Invalid spaces"];return this.isClass?(a.push(s=>!!s||'Enter the name of the class - the word "Shares" is automatically added',s=>!this.shareClasses.find((t,r)=>r!==this.activeIndex&&t.name.split(" Shares")[0].toLowerCase()===s.toLowerCase())||"Class name must be unique"),a.push(s=>!s.split(" ").some(t=>this.excludedWordsListForClass.includes(t.toLowerCase()))||"Class name should not contain any of the words share, shares or value")):this.isSeries&&(a.push(s=>!!s||'Enter the name of the series - the word "Shares" is automatically added',s=>!this.shareClasses[this.parentIndex].series.find((t,r)=>r!==this.activeIndex&&t.name.split(" Shares")[0].toLowerCase()===s.toLowerCase())||"Series name must be unique"),a.push(s=>!s.split(" ").some(t=>this.excludedWordsListForSeries.includes(t.toLowerCase()))||"Series name should not contain any of the words share or shares")),a}get maximumShareRule(){let a=[];if(!this.hasNoMaximumShares){if(a=[s=>s!==""&&s!==null&&s!==void 0||"Number of shares is required",s=>/^-?\d+$/.test(s)||"Must be a whole number",s=>+s>0||"Number must be greater than 0",s=>s&&s.toString().length<16||"Number must be less than 16 digits"],this.isClass&&this.activeIndex!==-1&&!this.hasNoMaximumShares&&this.shareStructure.series.length>0){const s=this.shareStructure.series.reduce((t,r)=>+t+ +r.maxNumberOfShares,0);a.push(t=>!!t||"Enter the maximum number of shares in the class",t=>+t>=s||"The number for the series (or all series combined, if there are multiple under a class) cannot exceed the number for the class")}if(this.isSeries&&this.shareClasses[this.parentIndex].hasMaximumShares){let s=this.shareClasses[this.parentIndex].series;this.activeIndex!==-1&&(s=s.filter(r=>r.id!==this.shareClasses[this.parentIndex].series[this.activeIndex].id));const t=s.reduce((r,n)=>+r+ +n.maxNumberOfShares,0);a.push(r=>!!r||"Enter the maximum number of shares in the series",r=>+r+t<=+this.shareClasses[this.parentIndex].maxNumberOfShares||"The number for the series (or all series combined, if there are multiple under a class) cannot exceed the number for the class")}}return a}get parValueRule(){let a=[];return this.hasNoParValue||(a=[s=>s!==""&&s!==null&&s!==void 0||"Par value is required",s=>+s>0||"Amount must be greater than 0",s=>+s<1?/^(\d+(\.\d{0,3})?|\.\d{0,3})$/.test(s)||"Amounts less than 1 can be entered with up to 3 decimal place":/^\d+(\.\d{1,2})?$/.test(s)||"Amounts greater than 1 can be entered with up to 2 decimal place"]),a}get currencyRule(){return this.hasNoParValue?[]:[a=>!!a||"Currency is required"]}created(){if(this.initialValue&&(this.shareStructure={...this.initialValue},this.hasNoMaximumShares=!this.shareStructure.hasMaximumShares,this.hasNoParValue=!this.shareStructure.hasParValue,this.hasSeriesShares=this.shareStructure.hasRightsOrRestrictions&&this.shareStructure.series&&this.shareStructure.series.length>=1,this.activeIndex!==-1)){const a=this.shareStructure.name;this.shareStructure.name=a.substr(0,a.indexOf(" Shares"))}}async validateForm(){if(this.nameRules=this.nameRule,this.maximumShareRules=this.maximumShareRule,this.parValueRules=this.parValueRule,this.currencyRules=this.currencyRule,await b.nextTick(),this.$refs.shareStructureForm.validate(),this.formValid){const a=this.addShareStructure();this.emitAddShareStructureEvent(a),this.resetFormAndData(!1)}}emitAddShareStructureEvent(a){this.isClass?this.emitAddEditShareClassEvent(a):this.isSeries&&this.emitAddEditShareSeriesEvent(a)}addShareStructure(){let a={...this.shareStructure};if(this.activeIndex===-1&&(a.id=this.shareId),a.name=`${a.name} Shares`,a.hasMaximumShares=!this.hasNoMaximumShares,a.hasParValue=!this.hasNoParValue,!a.hasRightsOrRestrictions&&a.series){let s=[];a.series.forEach(t=>{if(t.action===l.ADDED){const r=a.series.findIndex(n=>n.id===t.id);s.push(r)}}),s.reverse().forEach(t=>a.series.splice(t,1)),a.series.forEach(t=>{t.action=l.REMOVED})}return a}removeShareStructure(){this.isClass?this.emitRemoveShareClassEvent(this.activeIndex):this.isSeries&&this.emitRemoveShareSeriesEvent(this.activeIndex)}resetFormAndData(a){this.$refs.shareStructureForm.reset(),a&&this.emitResetEvent()}changeMaximumShareFlag(){this.hasNoMaximumShares&&(this.shareStructure.maxNumberOfShares=null)}changeParValueFlag(){this.hasNoParValue&&(this.shareStructure.currency=null,this.shareStructure.parValue=null)}async confirmSeriesRemoval(){this.hasSeriesShares&&!this.shareStructure.hasRightsOrRestrictions?this.$refs.confirm.open("Remove Share Series with Class","A share series exists for this class. Removing the Special Rights or Restrictions for this class will remove all associated share series.",{width:"45rem",persistent:!0,yes:"Remove",no:null,cancel:"Cancel"}).then(()=>{this.shareStructure.hasRightsOrRestrictions=!1}).catch(()=>{this.shareStructure.hasRightsOrRestrictions=!0}):this.resolutionRequired&&(await this.emitResolutionPrompt(!0),this.shareStructure.hasRightsOrRestrictions=!1)}updateResolutionRequirement(){this.shareStructure.hasRightsOrRestrictions=!this.resolutionRequired}emitAddEditShareClassEvent(a){}emitAddEditShareSeriesEvent(a){}emitRemoveShareClassEvent(a){}emitRemoveShareSeriesEvent(a){}emitResetEvent(){}emitResolutionPrompt(a){}};p([h({default:null})],d.prototype,"initialValue",2);p([h({default:null})],d.prototype,"activeIndex",2);p([h({default:null})],d.prototype,"parentIndex",2);p([h({default:""})],d.prototype,"shareId",2);p([h({default:[]})],d.prototype,"shareClasses",2);p([h({default:!1})],d.prototype,"resolutionRequired",2);p([h({default:!1})],d.prototype,"invalidSection",2);p([E("resolutionRequired")],d.prototype,"updateResolutionRequirement",1);p([S("addEditClass")],d.prototype,"emitAddEditShareClassEvent",1);p([S("addEditSeries")],d.prototype,"emitAddEditShareSeriesEvent",1);p([S("removeClass")],d.prototype,"emitRemoveShareClassEvent",1);p([S("removeSeries")],d.prototype,"emitRemoveShareSeriesEvent",1);p([S("resetEvent")],d.prototype,"emitResetEvent",1);p([S("resolutionPrompt")],d.prototype,"emitResolutionPrompt",1);d=p([A({components:{ConfirmDialog:F}})],d);var te=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("div",{attrs:{id:"edit-share-structure"}},[a("ConfirmDialog",{ref:"confirm",attrs:{attach:"#edit-share-structure"}}),a("v-expand-transition",[a("ul",{staticClass:"list add-share-structure"},[a("li",{staticClass:"add-share-structure-container"},[a("div",{staticClass:"meta-container"},[a("label",{staticClass:"add-share-structure-header",class:{"error-text":e.invalidSection}},[e.activeIndex===-1?a("span",{staticClass:"pl-5",class:{"pl-10 text-body-3":e.isSeries}},[e._v(" Add Share "+e._s(e.shareStructure.type)+" ")]):a("span",{class:{"pl-10 text-body-3":e.isSeries}},[e._v("Edit Share "+e._s(e.shareStructure.type))])]),a("div",{staticClass:"meta-container__inner"},[a("v-form",{ref:"shareStructureForm",staticClass:"share-structure-form",on:{submit:function(s){return s.preventDefault(),e.addShareStructure()}},model:{value:e.formValid,callback:function(s){e.formValid=s},expression:"formValid"}},[a("v-text-field",{attrs:{id:"txt-name",filled:"",label:e.shareStructure.type+" Name [Shares]",hint:"Enter the name of the "+e.shareStructure.type.toLowerCase()+' - the word "Shares" is automatically added',rules:e.nameRules,suffix:"Shares","persistent-hint":""},model:{value:e.shareStructure.name,callback:function(s){e.$set(e.shareStructure,"name",s)},expression:"shareStructure.name"}}),a("v-divider",{staticClass:"separator"}),a("v-radio-group",{staticClass:"radio-group",attrs:{column:""},on:{change:function(s){return e.changeMaximumShareFlag()}},model:{value:e.hasNoMaximumShares,callback:function(s){e.hasNoMaximumShares=s},expression:"hasNoMaximumShares"}},[a("v-radio",{attrs:{value:!1},scopedSlots:e._u([{key:"label",fn:function(){return[a("v-row",[a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"txt-max-shares",filled:"",label:"Maximum Number of Shares","persistent-hint":"",hint:"Enter the maximum number of shares in the "+e.shareStructure.type.toLowerCase(),rules:e.maximumShareRules,disabled:e.hasNoMaximumShares},model:{value:e.shareStructure.maxNumberOfShares,callback:function(s){e.$set(e.shareStructure,"maxNumberOfShares",e._n(s))},expression:"shareStructure.maxNumberOfShares"}})],1)],1)]},proxy:!0}])}),e.isNoMaxSharesVisible?a("v-radio",{attrs:{id:"lbl-no-maximum",value:!0,label:"No maximum"}}):e._e()],1),a("v-divider",{staticClass:"separator mx-4"}),a("v-radio-group",{directives:[{name:"show",rawName:"v-show",value:e.isClass,expression:"isClass"}],staticClass:"radio-group",attrs:{column:""},on:{change:function(s){return e.changeParValueFlag()}},model:{value:e.hasNoParValue,callback:function(s){e.hasNoParValue=s},expression:"hasNoParValue"}},[a("v-radio",{attrs:{id:"radio-par-value",value:!1},scopedSlots:e._u([{key:"label",fn:function(){return[a("v-row",[a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"class-par-value",filled:"",label:"Par Value",rules:e.parValueRules,hint:"Enter the initial value of each share","persistent-hint":""},model:{value:e.shareStructure.parValue,callback:function(s){e.$set(e.shareStructure,"parValue",e._n(s))},expression:"shareStructure.parValue"}})],1),a("v-col",{attrs:{cols:"6"}},[a("v-select",{attrs:{id:"class-currency",items:e.getCurrencyList(),filled:"",label:"Currency",rules:e.currencyRules,"item-text":"`${data.item.name}, ${data.item.code}`","item-value":"code"},scopedSlots:e._u([{key:"selection",fn:function(s){return[e._v(" "+e._s(s.item.name)+" ("+e._s(s.item.code)+") ")]}},{key:"item",fn:function(s){return[e._v(" "+e._s(s.item.name)+" ("+e._s(s.item.code)+") ")]}}]),model:{value:e.shareStructure.currency,callback:function(s){e.$set(e.shareStructure,"currency",s)},expression:"shareStructure.currency"}})],1)],1)]},proxy:!0}])}),a("v-radio",{attrs:{id:"radio-no-par",value:!0,label:"No par value"}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:e.isSeries,expression:"isSeries"}],staticClass:"pl-10"},[e.shareStructure.hasParValue?a("v-row",[a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"series-par-value",label:"Par Value",value:e.shareStructure.parValue,disabled:!0,width:"10"}})],1),a("v-col",{attrs:{cols:"6"}},[a("v-text-field",{attrs:{id:"series-currency",label:"Currency",value:`${e.getCurrencyNameByCode(e.shareStructure.currency)} (${e.shareStructure.currency})`,disabled:!0}})],1)],1):a("v-label",{attrs:{id:"lbl-no-par"}},[e._v(" No par value ")])],1),a("v-divider",{staticClass:"separator mx-4"}),a("div",{staticClass:"form__row"},[a("v-checkbox",{attrs:{id:"special-rights-check-box",label:"This share "+e.shareStructure.type.toLowerCase()+" has special rights or restrictions"},on:{click:function(s){return e.confirmSeriesRemoval()}},model:{value:e.shareStructure.hasRightsOrRestrictions,callback:function(s){e.$set(e.shareStructure,"hasRightsOrRestrictions",s)},expression:"shareStructure.hasRightsOrRestrictions"}})],1),a("div",{staticClass:"form__row form__btns"},[a("v-btn",{attrs:{id:"remove-btn",large:"",outlined:"",color:"error",disabled:e.activeIndex===-1},on:{click:function(s){return e.removeShareStructure()}}},[e._v(" Remove ")]),a("v-btn",{staticClass:"form-primary-btn",attrs:{id:"done-btn",large:"",color:"primary"},on:{click:function(s){return e.validateForm()}}},[e._v(" Done ")]),a("v-btn",{attrs:{id:"cancel-btn",large:"",outlined:"",color:"primary"},on:{click:function(s){return e.resetFormAndData(!0)}}},[e._v(" Cancel ")])],1)],1)],1)])])])])],1)},re=[],B=k(d,te,re,!1,null,"d38ead96",null,null);const ie=B.exports;B.exports.__docgenInfo={description:"Mixin that provides currency list and lookup operations",tags:{},exportName:"default",displayName:"EditShareStructure",props:[{name:"initialValue",tags:{},type:{name:"ShareClassIF"},defaultValue:{func:!1,value:"null"}},{name:"activeIndex",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"parentIndex",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"null"}},{name:"shareId",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"shareClasses",tags:{},type:{name:"Array",elements:[{name:"ShareClassIF"}]},defaultValue:{func:!1,value:"[]"}},{name:"resolutionRequired",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Prompt Error.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"addEditClass"},{name:"addEditSeries"},{name:"removeClass"},{name:"removeSeries"},{name:"resetEvent"},{name:"resolutionPrompt"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/share-structure/EditShareStructure.vue","/home/severin/repos/bcrs-shared-components/src/components/share-structure/currency-lookup-mixin.ts"]};var ne=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,m=(i,e,a,s)=>{for(var t=s>1?void 0:s?oe(e,a):e,r=i.length-1,n;r>=0;r--)(n=i[r])&&(t=(s?n(e,a,t):n(t))||t);return s&&t&&ne(e,a,t),t};let c=class extends b{constructor(){super(...arguments);o(this,"ActionTypes",l);o(this,"$refs");o(this,"isEditMode");o(this,"originalShareStructure");o(this,"shareClasses");o(this,"resolutionRequired");o(this,"editLabel");o(this,"editedLabel");o(this,"hasRightsOrRestrictions");o(this,"invalidSection");o(this,"invalidMinimumShareClass");o(this,"activeIndex",-1);o(this,"classDropdown",[]);o(this,"parentIndex",-1);o(this,"seriesDropdown",this.mapEmpty2dArray());o(this,"shareId","");o(this,"showAddShareStructureForm",!1);o(this,"showClassEditForm",[!1]);o(this,"showSeriesAddForm",[!1]);o(this,"showSeriesEditForm",this.mapEmpty2dArray());o(this,"addEditInProgress",!1);o(this,"currentShareStructure",null);o(this,"headers",[{text:"Name of Share Class or Series",align:"start",sortable:!1,value:"name"},{text:"Maximum Number of Shares",value:"maxNumberOfShares"},{text:"Par Value",value:"parValue"},{text:"Currency",value:"currency"},{text:"Special Rights or Restrictions",value:"hasRightsOrRestrictions"}]);o(this,"newShareClass",{id:null,priority:null,type:"Class",name:"",hasMaximumShares:!0,maxNumberOfShares:null,hasParValue:!0,parValue:null,currency:"CAD",hasRightsOrRestrictions:!1,series:[],action:l.ADDED});o(this,"newShareSeries",{id:null,priority:null,type:"Series",name:"",hasMaximumShares:!0,maxNumberOfShares:null,hasParValue:!0,parValue:null,currency:null,hasRightsOrRestrictions:!1,action:l.ADDED})}get hasClassChanges(){return this.shareClasses.some(a=>a.action)}get hasSeriesChanges(){return!!this.shareClasses.find(a=>a.series.some(s=>s.action))}formatParValue(a){return a.toString().includes(".")?a:`${a}.00`}clearDropdowns(){this.classDropdown=[],this.seriesDropdown=this.mapEmpty2dArray()}displaySeriesRow(a,s,t){return this.showSeriesEditForm[a.index]&&!this.showSeriesEditForm[a.index][t]&&!(!this.isEditMode&&(s.action===l.REMOVED||a.item.action===l.REMOVED))}initNewShareClass(){this.activeIndex=-1,this.parentIndex=-1,this.currentShareStructure={...this.newShareClass},this.currentShareStructure.priority=this.shareClasses.length===0?1:this.shareClasses[this.shareClasses.length-1].priority+1,this.shareId=V(),this.addEditInProgress=!0,this.showAddShareStructureForm=!0}initShareClassForEdit(a){this.currentShareStructure={...this.shareClasses[a]},this.activeIndex=a,this.parentIndex=-1,this.addEditInProgress=!0,this.showClassEditForm[a]=!0}addEditShareClass(a){a.action!==l.ADDED&&(a.action=this.isShareClassEdited(a)?l.EDITED:null);let s=[...this.shareClasses];this.activeIndex===-1?s.push(a):s.splice(this.activeIndex,1,a),this.emitShareClasses(s),this.resetData()}isShareClassEdited(a){const t=v.cloneDeep(this.originalShareStructure.shareClasses).find(r=>+r.id==+a.id);return!v.isEqual({...v.omit(a,"action")},{...v.omit(t,"action")})}removeShareClass(a){const s={...this.shareClasses[a]};let t=[...this.shareClasses];s.action===l.ADDED?t.splice(a,1):(s.action=l.REMOVED,t.splice(a,1,s)),this.emitShareClasses(t),this.resetData()}restoreShareClass(a){const t=v.cloneDeep(this.originalShareStructure.shareClasses).find(n=>+n.id==+this.shareClasses[a].id);let r=[...this.shareClasses];r[a]={...t,series:[...t.series]},r.forEach(n=>{n.hasRightsOrRestrictions||(n.series=[])}),this.emitShareClasses(r),this.resetData()}initNewShareSeries(a){this.activeIndex=-1,this.parentIndex=a;const t=[...this.shareClasses][a],r=t.series;this.currentShareStructure={...this.newShareSeries},this.currentShareStructure.hasParValue=t.hasParValue,this.currentShareStructure.parValue=t.parValue,this.currentShareStructure.currency=t.currency,this.currentShareStructure.priority=r.length===0?1:r[r.length-1].priority+1,this.shareId=V(),this.addEditInProgress=!0,this.showSeriesAddForm[a]=!0}addEditShareSeries(a){a.action!==l.ADDED&&this.isShareClassEdited(a)&&(a.action=l.EDITED);let s=[...this.shareClasses];const t=s[this.parentIndex];let r=[...t.series];this.activeIndex===-1?r.push(a):r.splice(this.activeIndex,1,a),t.series=r,this.emitShareClasses(s),this.resetData()}editSeries(a,s){this.activeIndex=s,this.parentIndex=a;let t=[...this.shareClasses];this.currentShareStructure={...t[this.parentIndex].series[this.activeIndex]},this.addEditInProgress=!0,this.showSeriesEditForm[a][s]=!0}removeSeries(a,s){const t={...this.shareClasses[s].series[a]};let r=[...this.shareClasses];t.action===l.ADDED?r[s].series.splice(a,1):(t.action=l.REMOVED,r[s].series.splice(a,1,t)),this.emitShareClasses(r),this.resetData()}restoreShareSeries(a,s,t,r){const n=v.cloneDeep(this.originalShareStructure.shareClasses),y=Object.assign({},n.find(R=>+R.id==+t)),q=Object.assign({},y.series.find(R=>+R.id==+r));let M=[...this.shareClasses];M[s].series[a]=q,this.emitShareClasses(M),this.resetData()}moveIndex(a,s,t=-1){let r;t>=0?(r=s==="up"?t-1:t+1,this.shareClasses[a].series[t].priority=r,this.shareClasses[a].series[t].priority=a,O(this.shareClasses[a].series,t,r)):(r=s==="up"?a-1:a+1,this.shareClasses[a].priority=r,this.shareClasses[r].priority=a,O(this.shareClasses,a,r)),this.clearDropdowns()}isMoveDisabled(a,s,t=-1){const r=t>=0,n=r?this.shareClasses[a].series.length-1:this.shareClasses.length-1;switch(s){case"up":return r?t===0:a===0;case"down":return r?t===n:a===n;default:return!1}}undoCorrection(a,s,t,r=null,n=null,y=null){switch(s){case l.ADDED:a?this.removeShareClass(t):this.removeSeries(t,r);break;case l.EDITED:a?this.restoreShareClass(t):this.restoreShareSeries(t,r,n,y);break;case l.REMOVED:a?this.restoreShareClass(t):this.restoreShareSeries(t,r,n,y);break}this.clearDropdowns()}resetData(){function a(s){({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STORYBOOK:"true"}).JEST_WORKER_ID!==void 0||window.scrollTo({top:s.offsetTop,behavior:"smooth"})}this.currentShareStructure=null,this.activeIndex=-1,this.addEditInProgress=!1,this.showAddShareStructureForm=!1,this.showClassEditForm=[!1],this.showSeriesAddForm=[!1],this.showSeriesEditForm=this.mapEmpty2dArray(),this.parentIndex=-1,this.shareId="",b.nextTick(()=>a(this.$el)),this.clearDropdowns()}confirmShareRemoval(a){({...this.shareClasses[a]}).series.length>0?this.$refs.confirm.open("Remove Share Series with Class","A share series exists for this class. Removing the share class will remove all associated share series.",{width:"45rem",persistent:!0,yes:"Remove",no:null,cancel:"Cancel"}).then(()=>{this.removeShareClass(a)}).catch(()=>{this.resetData()}):this.removeShareClass(a)}mapEmpty2dArray(){return new Array(50).fill(null).map(()=>new Array(50).fill(null))}onShareStructureChanged(){this.emitShareStructureChanged(this.hasClassChanges||this.hasSeriesChanges)}onEditingChanged(a){this.emitEditingShareStructure(a)}emitShareClasses(a){}emitShareStructureChanged(a){}emitEditingShareStructure(a){}emitResolutionPrompt(a){}};m([h({default:!0})],c.prototype,"isEditMode",2);m([h({default:null})],c.prototype,"originalShareStructure",2);m([h({default:[]})],c.prototype,"shareClasses",2);m([h({default:!1})],c.prototype,"resolutionRequired",2);m([h({default:"Edit"})],c.prototype,"editLabel",2);m([h({default:"EDITED"})],c.prototype,"editedLabel",2);m([h({default:!1})],c.prototype,"hasRightsOrRestrictions",2);m([h({default:!1})],c.prototype,"invalidSection",2);m([h({default:!1})],c.prototype,"invalidMinimumShareClass",2);m([E("hasClassChanges"),E("hasSeriesChanges")],c.prototype,"onShareStructureChanged",1);m([E("addEditInProgress",{immediate:!0})],c.prototype,"onEditingChanged",1);m([S("emitShareClasses")],c.prototype,"emitShareClasses",1);m([S("emitShareStructureChanged")],c.prototype,"emitShareStructureChanged",1);m([S("emitEditingShareStructure")],c.prototype,"emitEditingShareStructure",1);m([S("emitResolutionPrompt")],c.prototype,"emitResolutionPrompt",1);c=m([A({components:{ActionChip:W,ConfirmDialog:F,EditShareStructure:ie}})],c);var le=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("v-card",{attrs:{id:"share-structure",flat:""}},[a("ConfirmDialog",{ref:"confirm",attrs:{attach:"#share-structure"}}),e.isEditMode?[a("div",{attrs:{id:"share-summary"}},[a("div",{staticClass:"share-summary-header"},[a("v-icon",{attrs:{color:"app-dk-blue"}},[e._v(" mdi-sitemap ")]),a("label",{staticClass:"share-summary-header-title"},[a("strong",[e._v("Share Structure")])])],1)]),a("div",{staticClass:"share-info-container info-text pt-6 px-4"},[e._v(" If your share structure contains a class or series of shares with special rights or restrictions, you must have passed a resolution or have a court order to change your share structure. "),a("strong",[e._v("Note:")]),e._v(" All changes must have the same Resolution or Court Order Date. If you need to enter changes that occurred on multiple dates you must file and pay for each change separately. "),e.invalidMinimumShareClass?a("p",{staticClass:"error-text small-text mt-6"},[e._v(" Your share structure must contain at least one share class. ")]):e._e()]),a("div",{staticClass:"btn-container py-6 px-4"},[a("v-btn",{attrs:{id:"btn-add-person",outlined:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(s){return e.initNewShareClass()}}},[a("v-icon",[e._v("mdi-plus")]),a("span",[e._v("Add Share Class")])],1)],1)]:e._e(),a("div",{class:{"invalid-section":e.invalidSection}},[a("v-expand-transition",[e.showAddShareStructureForm?a("v-card",{staticClass:"add-share-structure-container",attrs:{flat:""}},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(s){return e.addEditShareClass(s)},resolutionPrompt:function(s){return e.emitResolutionPrompt(s)},resetEvent:function(s){return e.resetData()}}})],1):e._e()],1)],1),a("v-data-table",{staticClass:"share-structure-table",attrs:{headers:e.headers,items:e.shareClasses,"disable-pagination":"","disable-sort":"","hide-default-footer":""},scopedSlots:e._u([{key:"item",fn:function(s){return[!e.showClassEditForm[s.index]&&!(!e.isEditMode&&s.item.action===e.ActionTypes.REMOVED)?a("tr",{key:s.item.id,staticClass:"class-row",class:[{"class-row-has-series":s.item.series.length},{removed:s.item.action===e.ActionTypes.REMOVED}]},[a("td",{staticClass:"list-item__title",class:[{"invalid-section":e.invalidMinimumShareClass},{"list-item__subtitle":s.item.action===e.ActionTypes.REMOVED}]},[e._v(" "+e._s(s.item.name)+" "),s.item.action&&e.isEditMode?a("ActionChip",{staticClass:"pb-2",attrs:{"actionable-item":s.item,"edited-label":e.editedLabel}}):e._e()],1),a("td",{staticClass:"text-right"},[e._v(" "+e._s(s.item.maxNumberOfShares?(+s.item.maxNumberOfShares).toLocaleString():"No Maximum")+" ")]),a("td",{staticClass:"text-right"},[e._v(" "+e._s(s.item.parValue?`$${e.formatParValue(s.item.parValue)}`:"No Par Value")+" ")]),a("td",[e._v(e._s(s.item.currency))]),a("td",[e._v(e._s(s.item.hasRightsOrRestrictions?"Yes":"No"))]),e.isEditMode?a("td",{staticClass:"actions-cell pt-4"},[a("div",{staticClass:"actions"},[s.item.action?e._e():a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"class-"+s.index+"-change-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(t){return e.initShareClassForEdit(s.index)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v(e._s(e.editLabel))])],1)],1),s.item.action===e.ActionTypes.EDITED||s.item.action===e.ActionTypes.REMOVED?a("span",{class:{"undo-action":s.item.action!==e.ActionTypes.REMOVED}},[a("v-btn",{attrs:{id:"class-"+s.index+"-undo-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(t){return e.undoCorrection(!0,s.item.action,s.index)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-undo")]),a("span",[e._v("Undo")])],1)],1):e._e(),s.item.action===e.ActionTypes.ADDED?a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"class-"+s.index+"-change-added-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(t){return e.initShareClassForEdit(s.index)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v("Edit")])],1)],1):e._e(),s.item.action!==e.ActionTypes.REMOVED?a("span",[a("v-menu",{attrs:{"offset-y":"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[a("v-btn",e._g({staticClass:"actions__more-actions__btn",attrs:{text:"",color:"primary",disabled:e.addEditInProgress}},t),[a("v-icon",[e._v(e._s(e.classDropdown[s.index]?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!0),model:{value:e.classDropdown[s.index],callback:function(t){e.$set(e.classDropdown,s.index,t)},expression:"classDropdown[row.index]"}},[a("v-list",{staticClass:"more-actions"},[s.item.action===e.ActionTypes.EDITED?a("v-list-item",{staticClass:"actions-dropdown_item",attrs:{disabled:e.addEditInProgress},on:{click:function(t){return e.initShareClassForEdit(s.index)}}},[a("v-list-item-subtitle",[a("v-icon",{staticClass:"mr-3",attrs:{small:"",color:"primary"}},[e._v("mdi-pencil")]),a("span",[e._v("Change")])],1)],1):e._e(),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":!s.item.hasRightsOrRestrictions},attrs:{disabled:!s.item.hasRightsOrRestrictions},on:{click:function(t){return e.initNewShareSeries(s.index)}}},[a("v-list-item-subtitle",[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-playlist-plus")]),a("span",[e._v("Add Series")])],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"up")},attrs:{disabled:e.isMoveDisabled(s.index,"up")},on:{click:function(t){return e.moveIndex(s.index,"up")}}},[a("v-list-item-subtitle",{staticClass:"move-up-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-up")]),a("span",[e._v("Move Up")])],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"down")},attrs:{disabled:e.isMoveDisabled(s.index,"down")},on:{click:function(t){return e.moveIndex(s.index,"down")}}},[a("v-list-item-subtitle",{staticClass:"move-down-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-down")]),a("span",[e._v("Move Down")])],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",on:{click:function(t){return e.confirmShareRemoval(s.index)}}},[a("v-list-item-subtitle",{staticClass:"remove-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-delete")]),a("span",[e._v("Remove")])],1)],1)],1)],1)],1):e._e()])]):[a("span")]],2):e._e(),e.showClassEditForm[s.index]?a("tr",[a("td",{class:{"invalid-section":e.invalidSection},attrs:{colspan:"6"}},[a("v-expand-transition",[a("div",{staticClass:"edit-share-structure-container"},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(t){return e.addEditShareClass(t)},addEditSeries:function(t){return e.addEditShareSeries(t)},removeClass:function(t){return e.confirmShareRemoval(t)},resolutionPrompt:function(t){return e.emitResolutionPrompt(t)},resetEvent:function(t){return e.resetData()}}})],1)])],1)]):e._e(),e._l(s.item.series,function(t,r){return[e.displaySeriesRow(s,t,r)?a("tr",{key:`class:${s.index}-Series:${r}`,staticClass:"series-row",class:[{"series-row-last":r===s.item.series.length-1},{removed:s.item.action===e.ActionTypes.REMOVED||t.action===e.ActionTypes.REMOVED}]},[a("td",{staticClass:"series-name",class:{"invalid-section":e.invalidMinimumShareClass}},[a("li",[a("span",{staticClass:"h3 ml-n2",class:{"list-item__subtitle":s.item.action===e.ActionTypes.REMOVED||t.action===e.ActionTypes.REMOVED}},[e._v(e._s(t.name))])]),s.item.action!==e.ActionTypes.REMOVED&&t.action&&e.isEditMode?a("ActionChip",{attrs:{"actionable-item":t,"edited-label":e.editedLabel}}):e._e()],1),a("td",{staticClass:"text-right"},[e._v(" "+e._s(t.maxNumberOfShares?(+t.maxNumberOfShares).toLocaleString():"No Maximum")+" ")]),a("td",{staticClass:"text-right"},[e._v(" "+e._s(s.item.parValue?`$${e.formatParValue(s.item.parValue)}`:"No Par Value")+" ")]),a("td",[e._v(e._s(s.item.currency))]),a("td",[e._v(e._s(t.hasRightsOrRestrictions?"Yes":"No"))]),e.isEditMode?a("td",{staticClass:"actions-cell pt-4"},[s.item.action!==e.ActionTypes.REMOVED?a("div",{staticClass:"actions"},[t.action?s.item.hasRightsOrRestrictions&&t.action!==e.ActionTypes.ADDED?a("span",{class:{"undo-action":t.action!==e.ActionTypes.REMOVED}},[a("v-btn",{attrs:{id:"series-"+r+"-undo-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(n){return e.undoCorrection(!1,t.action,r,s.index,s.item.id,t.id)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-undo")]),a("span",[e._v("Undo")])],1)],1):t.action!==e.ActionTypes.REMOVED?a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"series-"+r+"-change-added-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(n){return e.editSeries(s.index,r)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v("Edit")])],1)],1):e._e():a("span",{staticClass:"edit-action"},[a("v-btn",{attrs:{id:"series-"+r+"-change-btn",text:"",color:"primary",disabled:e.addEditInProgress},on:{click:function(n){return e.editSeries(s.index,r)}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-pencil")]),a("span",[e._v(e._s(e.editLabel))])],1)],1),t.action!==e.ActionTypes.REMOVED?a("span",[a("v-menu",{attrs:{"offset-y":"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[a("v-btn",e._g({staticClass:"actions__more-actions__btn",attrs:{text:"",color:"primary",disabled:e.addEditInProgress}},n),[a("v-icon",[e._v(e._s(e.seriesDropdown[s.index][r]?"mdi-menu-up":"mdi-menu-down"))])],1)]}}],null,!0),model:{value:e.seriesDropdown[s.index][r],callback:function(n){e.$set(e.seriesDropdown[s.index],r,n)},expression:"seriesDropdown[row.index][index]"}},[a("v-list",{staticClass:"more-actions"},[t.action===e.ActionTypes.EDITED?a("v-list-item",{staticClass:"actions-dropdown_item",attrs:{disabled:e.addEditInProgress},on:{click:function(n){return e.editSeries(s.index,r)}}},[a("v-list-item-subtitle",[a("v-icon",{staticClass:"mr-2",attrs:{small:"",color:"primary"}},[e._v("mdi-pencil")]),e._v(" "+e._s(e.editLabel)+" ")],1)],1):e._e(),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"up",r)},attrs:{disabled:e.isMoveDisabled(s.index,"up",r)},on:{click:function(n){return e.moveIndex(s.index,"up",r)}}},[a("v-list-item-subtitle",{staticClass:"move-up-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-up")]),e._v(" Move Up ")],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",class:{"item-disabled":e.isMoveDisabled(s.index,"down",r)},attrs:{disabled:e.isMoveDisabled(s.index,"down",r)},on:{click:function(n){return e.moveIndex(s.index,"down",r)}}},[a("v-list-item-subtitle",{staticClass:"move-down-selector"},[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-arrow-down")]),e._v(" Move Down ")],1)],1),a("v-list-item",{staticClass:"actions-dropdown_item",on:{click:function(n){return e.removeSeries(r,s.index)}}},[a("v-list-item-subtitle",[a("v-icon",{attrs:{color:"primary"}},[e._v("mdi-delete")]),e._v(" Remove ")],1)],1)],1)],1)],1):e._e()]):e._e()]):[a("span")]],2):e._e(),e.showSeriesEditForm[s.index]&&e.showSeriesEditForm[s.index][r]?a("tr",{key:`class:${s.index}-Series:${r}-edit-form`},[a("td",{class:{"invalid-section":e.invalidSection},attrs:{colspan:"6"}},[a("v-expand-transition",[a("div",{staticClass:"edit-share-structure-container"},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(n){return e.addEditShareClass(n)},addEditSeries:function(n){return e.addEditShareSeries(n)},removeSeries:function(n){return e.removeSeries(n,s.index)},resolutionPrompt:function(n){return e.emitResolutionPrompt(n)},resetEvent:function(n){return e.resetData()}}})],1)])],1)]):e._e()]}),e.showSeriesAddForm[s.index]?a("tr",[a("td",{class:{"invalid-section":e.invalidSection},attrs:{colspan:"6"}},[a("v-expand-transition",[a("div",{staticClass:"edit-share-structure-container"},[a("EditShareStructure",{attrs:{initialValue:e.currentShareStructure,activeIndex:e.activeIndex,shareId:e.shareId,parentIndex:e.parentIndex,shareClasses:e.shareClasses,resolutionRequired:e.resolutionRequired,invalidSection:e.invalidSection},on:{addEditClass:function(t){return e.addEditShareClass(t)},addEditSeries:function(t){return e.addEditShareSeries(t)},removeSeries:function(t){return e.removeSeries(t,s.index)},resolutionPrompt:function(t){return e.emitResolutionPrompt(t)},resetEvent:function(t){return e.resetData()}}})],1)])],1)]):e._e()]}}])})],2)},ce=[],K=k(c,le,ce,!1,null,"0b58c838",null,null);const ue=K.exports;K.exports.__docgenInfo={exportName:"default",displayName:"ShareStructure",description:"",tags:{},props:[{name:"isEditMode",tags:{},description:"Edit Mode",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"originalShareStructure",tags:{},type:{name:"ShareStructureIF"},defaultValue:{func:!1,value:"null"}},{name:"shareClasses",tags:{},type:{name:"Array",elements:[{name:"ShareClassIF"}]},defaultValue:{func:!1,value:"[]"}},{name:"resolutionRequired",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editLabel",tags:{},description:"Edit label name (ie 'Change' or 'Correct')",type:{name:"string"},defaultValue:{func:!1,value:"'Edit'"}},{name:"editedLabel",tags:{},description:"Edited label name (ie 'Changed' or 'Corrected')",type:{name:"string"},defaultValue:{func:!1,value:"'EDITED'"}},{name:"hasRightsOrRestrictions",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Prompt Error.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidMinimumShareClass",tags:{},description:"Verification the Share Structure contains the minimum required Share Classes.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"emitShareClasses"},{name:"emitShareStructureChanged"},{name:"emitEditingShareStructure"},{name:"emitResolutionPrompt"}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/share-structure/ShareStructure.vue"]};const be={title:"component/ShareStructure"},U=(i,{argTypes:e})=>({props:Object.keys(e),components:{ShareStructure:ue},template:''}),_={business:{identifier:"BC1230105",legalType:"BEN"},header:{certifiedBy:"Cameron",date:"2021-03-04T16:59:54.905823+00:00",effectiveDate:"2021-03-04T16:59:54.905880+00:00",filingId:111645,isFutureEffective:!1,name:"incorporationApplication",status:"COMPLETED"},incorporationApplication:{contactPoint:{email:"cameron@freshworks.io",extension:"",phone:"(123) 456-7890"},incorporationAgreement:{agreementType:"sample"},nameRequest:{legalType:"BEN"},nameTranslations:[],offices:{},parties:[],shareStructure:{shareClasses:[{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:"434416",maxNumberOfShares:100,name:"Class A Shares",parValue:1,priority:1,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:"434265",maxNumberOfShares:10,name:"Series 1A Shares",priority:1,type:"Series"},{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:"434266",maxNumberOfShares:2,name:"Series 2 Shares",priority:2,type:"Series"}],type:"Class"},{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:"434417",maxNumberOfShares:122,name:"Class B Shares",parValue:2,priority:2,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:"434267",maxNumberOfShares:22,name:"Series b1 Shares",priority:1,type:"Series"}],type:"Class"}]}}},D=[{business:{}},{aliases:[]},{recordsOffice:{},registeredOffice:{}},{directors:[]},{shareClasses:[{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:434416,maxNumberOfShares:100,name:"Class A Shares",parValue:1,priority:1,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:434265,maxNumberOfShares:10,name:"Series 1A Shares",priority:1,type:"Series"},{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:434266,maxNumberOfShares:2,name:"Series 2 Shares",priority:2,type:"Series"}],type:"Class"},{currency:"CAD",hasMaximumShares:!0,hasParValue:!0,hasRightsOrRestrictions:!0,id:434417,maxNumberOfShares:122,name:"Class B Shares",parValue:2,priority:2,series:[{hasMaximumShares:!0,hasRightsOrRestrictions:!1,id:434267,maxNumberOfShares:22,name:"Series b1 Shares",priority:1,type:"Series"}],type:"Class"}]},{}],f=U.bind({});f.args={isEditMode:!0,editLabel:"Correct",editedLabel:"CORRECTED",isCorrection:!0,incorporationApplication:_,businessSnapshot:D,shareClasses:_.incorporationApplication.shareStructure.shareClasses,resolutionRequired:!1};const C=U.bind({});C.args={isEditMode:!0,editLabel:"Change",editedLabel:"CHANGED",isCorrection:!0,incorporationApplication:_,businessSnapshot:D,shareClasses:D[4].shareClasses,resolutionRequired:!0};var N,I,T;f.parameters={...f.parameters,docs:{...(N=f.parameters)==null?void 0:N.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - ShareStructure - }, - template: '' // $props comes from args below -})`,...(T=(I=f.parameters)==null?void 0:I.docs)==null?void 0:T.source}}};var w,L,$;C.parameters={...C.parameters,docs:{...(w=C.parameters)==null?void 0:w.docs,source:{originalSource:`(args, { - argTypes -}) => ({ - props: Object.keys(argTypes), - components: { - ShareStructure - }, - template: '' // $props comes from args below -})`,...($=(L=C.parameters)==null?void 0:L.docs)==null?void 0:$.source}}};const Ee=["correction","alteration"];export{Ee as __namedExportsOrder,C as alteration,f as correction,be as default}; -//# sourceMappingURL=ShareStructure.stories-f446bb48.js.map diff --git a/docs/assets/StaffComments.stories-8ae81074.js b/docs/assets/StaffComments.stories-7a3e0f39.js similarity index 76% rename from docs/assets/StaffComments.stories-8ae81074.js rename to docs/assets/StaffComments.stories-7a3e0f39.js index 1405ee0a..177c72da 100644 --- a/docs/assets/StaffComments.stories-8ae81074.js +++ b/docs/assets/StaffComments.stories-7a3e0f39.js @@ -1,12 +1,12 @@ -var w=Object.defineProperty;var L=(a,t,e)=>t in a?w(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var o=(a,t,e)=>(L(a,typeof t!="symbol"?t+"":t,e),e);import{A as f}from"./index-2b7fa976.js";import{M as T}from"./index-7a7a5d4b.js";import{m as $,C as D,P as i,n as P}from"./_plugin-vue2_normalizer-b11a0120.js";import{D as j}from"./validation-mixin-2ad1b825.js";import"./_commonjsHelpers-de833af9.js";import"./vue.esm-b1e57a2f.js";import"./lodash-f6b38868.js";var k=Object.defineProperty,I=Object.getOwnPropertyDescriptor,m=(a,t,e,s)=>{for(var n=s>1?void 0:s?I(t,e):t,c=a.length-1,u;c>=0;c--)(u=a[c])&&(n=(s?u(t,e,n):u(n))||n);return s&&n&&k(t,e,n),n};let r=class extends $(j){constructor(){super(...arguments);o(this,"$refs");o(this,"axios");o(this,"businessId");o(this,"url");o(this,"nudgeTop");o(this,"nudgeLeft");o(this,"maxLength");o(this,"showComments",!1);o(this,"comments",[]);o(this,"comment",null);o(this,"isSaving",!1)}get charsRemaining(){const e=this.comment?this.comment.length:0;return this.maxLength-e}get numComments(){const e=this.comments.length;return e===1?"1 Comment":`${e} Comments`}get rules(){return[e=>e&&e.trim().length>0||"Enter a comment.",e=>e&&e.length<=this.maxLength||"Maximum characters reached."]}get getUrl(){return this.url||`businesses/${this.businessId}/comments`}async created(){await this.fetchStaffComments()}async fetchStaffComments(){this.comments=await this.axios.get(this.getUrl).then(e=>{const s=e&&e.data&&e.data.comments||[];return Array.isArray(s)&&s[0]&&typeof s[0].comment=="string"?s:this.flattenAndSortComments(s)}).catch(()=>[])}async save(){if(!this.$refs.textarea.validate()||this.isSaving)return;this.isSaving=!0;const e={comment:{businessId:this.businessId,comment:this.comment}};let s=!1;await this.axios.post(this.getUrl,e).then(n=>{s=!0}).catch(n=>{console.log("save() error =",n),alert("Could not save your comment. Please try again or cancel.")}),this.isSaving=!1,s&&(this.$refs.textarea.reset(),await this.fetchStaffComments())}close(){this.$refs.textarea.resetValidation(),this.showComments=!1}flattenAndSortComments(e){if(e&&e.length>0){const s=e.map(n=>n.comment);return s.sort((n,c)=>new Date(n.timestamp)t in a?w(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var o=(a,t,e)=>(L(a,typeof t!="symbol"?t+"":t,e),e);import{A as f}from"./index-2b7fa976.js";import{M as T}from"./index-7a7a5d4b.js";import{m as $,C as D,P as i,n as k}from"./_plugin-vue2_normalizer-b11a0120.js";import{D as P}from"./validation-mixin-e5d1d708.js";import"./_commonjsHelpers-de833af9.js";import"./vue.esm-b1e57a2f.js";import"./lodash-f6b38868.js";var j=Object.defineProperty,I=Object.getOwnPropertyDescriptor,r=(a,t,e,s)=>{for(var n=s>1?void 0:s?I(t,e):t,c=a.length-1,u;c>=0;c--)(u=a[c])&&(n=(s?u(t,e,n):u(n))||n);return s&&n&&j(t,e,n),n};let m=class extends $(P){constructor(){super(...arguments);o(this,"$refs");o(this,"axios");o(this,"businessId");o(this,"url");o(this,"nudgeTop");o(this,"nudgeLeft");o(this,"maxLength");o(this,"showComments",!1);o(this,"comments",[]);o(this,"comment",null);o(this,"isSaving",!1)}get charsRemaining(){const e=this.comment?this.comment.length:0;return this.maxLength-e}get numComments(){const e=this.comments.length;return e===1?"1 Comment":`${e} Comments`}get rules(){return[e=>e&&e.trim().length>0||"Enter a comment.",e=>e&&e.length<=this.maxLength||"Maximum characters reached."]}get getUrl(){return this.url||`businesses/${this.businessId}/comments`}async created(){await this.fetchStaffComments()}async fetchStaffComments(){this.comments=await this.axios.get(this.getUrl).then(e=>{const s=e&&e.data&&e.data.comments||[];return Array.isArray(s)&&s[0]&&typeof s[0].comment=="string"?s:this.flattenAndSortComments(s)}).catch(()=>[])}async save(){if(!this.$refs.textarea.validate()||this.isSaving)return;this.isSaving=!0;const e={comment:{businessId:this.businessId,comment:this.comment}};let s=!1;await this.axios.post(this.getUrl,e).then(n=>{s=!0}).catch(n=>{console.log("save() error =",n),alert("Could not save your comment. Please try again or cancel.")}),this.isSaving=!1,s&&(this.$refs.textarea.reset(),await this.fetchStaffComments())}close(){this.$refs.textarea.resetValidation(),this.showComments=!1}flattenAndSortComments(e){if(e&&e.length>0){const s=e.map(n=>n.comment);return s.sort((n,c)=>new Date(n.timestamp){const t=JSON.parse(a.data).comment;return x.push({comment:{comment:t.comment,submitterDisplayName:"You",timestamp:new Date().toISOString().replace("Z","+00:00")}}),[201,{comment:t}]});const S=(a,{argTypes:t})=>({props:Object.keys(t),components:{StaffComments:R},template:` +local to that project.`,tags:{},exportName:"default",displayName:"StaffComments",props:[{name:"axios",tags:{},type:{name:"any"},required:!0},{name:"businessId",tags:{},type:{name:"string"},required:!0},{name:"url",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"nudgeTop",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"33"}},{name:"nudgeLeft",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"20"}},{name:"maxLength",tags:{},type:{name:"number"},defaultValue:{func:!1,value:"4096"}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/staff-comments/StaffComments.vue","/home/kdeodhar/gitRepo/bcrs-shared-components/src/mixins/date-mixin.ts"]};const G={title:"component/StaffComments"},x=[{comment:{comment:"First comment.",submitterDisplayName:"Tester",timestamp:"2019-06-02T19:22:59.003777+00:00"}}],C=new T(f);C.onGet().reply(200,{comments:x});C.onPost().reply(a=>{const t=JSON.parse(a.data).comment;return x.push({comment:{comment:t.comment,submitterDisplayName:"You",timestamp:new Date().toISOString().replace("Z","+00:00")}}),[201,{comment:t}]});const S=(a,{argTypes:t})=>({props:Object.keys(t),components:{StaffComments:A},template:`
- `}),l=S.bind({});l.args={axios:f.create(),businessId:"CP1234567",maxLength:2e3};const p=S.bind({});p.args={axios:f.create(),businessId:"RS001",maxLength:2e3,URL:"test.com"};var d,h,v;l.parameters={...l.parameters,docs:{...(d=l.parameters)==null?void 0:d.docs,source:{originalSource:`(args, { + `}),l=S.bind({});l.args={axios:f.create(),businessId:"CP1234567",maxLength:2e3};const p=S.bind({});p.args={axios:f.create(),businessId:"RS001",maxLength:2e3,URL:"test.com"};var d,h,g;l.parameters={...l.parameters,docs:{...(d=l.parameters)==null?void 0:d.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -19,7 +19,7 @@ local to that project.`,tags:{},exportName:"default",displayName:"StaffComments" \` -})`,...(v=(h=l.parameters)==null?void 0:h.docs)==null?void 0:v.source}}};var g,b,y;p.parameters={...p.parameters,docs:{...(g=p.parameters)==null?void 0:g.docs,source:{originalSource:`(args, { +})`,...(g=(h=l.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};var v,b,y;p.parameters={...p.parameters,docs:{...(v=p.parameters)==null?void 0:v.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -33,4 +33,4 @@ local to that project.`,tags:{},exportName:"default",displayName:"StaffComments" \` })`,...(y=(b=p.parameters)==null?void 0:b.docs)==null?void 0:y.source}}};const H=["Default","StaffCommentsWithURL"];export{l as Default,p as StaffCommentsWithURL,H as __namedExportsOrder,G as default}; -//# sourceMappingURL=StaffComments.stories-8ae81074.js.map +//# sourceMappingURL=StaffComments.stories-7a3e0f39.js.map diff --git a/docs/assets/StaffComments.stories-8ae81074.js.map b/docs/assets/StaffComments.stories-7a3e0f39.js.map similarity index 99% rename from docs/assets/StaffComments.stories-8ae81074.js.map rename to docs/assets/StaffComments.stories-7a3e0f39.js.map index 2fbbcfa9..4c3aee92 100644 --- a/docs/assets/StaffComments.stories-8ae81074.js.map +++ b/docs/assets/StaffComments.stories-7a3e0f39.js.map @@ -1 +1 @@ -{"version":3,"file":"StaffComments.stories-8ae81074.js","sources":["../../src/components/staff-comments/StaffComments.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["StaffComments","Mixins","DateMixin","__publicField","length","numComments","val","res","comments","data","success","error","temp","c","a","b","__decorateClass","Prop","Component"],"mappings":"4pBAsIA,IAAAA,EAAA,cAAAC,EAAAC,CAAA,CAAA,CAAA,kCACAC,EAAA,cAIAA,EAAA,cACAA,EAAA,mBACAA,EAAA,YACAA,EAAA,iBACAA,EA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AEA,KAAA,MAAA,SAAA,QACA,MAAA,KAAA,qBAEA,CAGA,OAAA,CAEA,KAAA,MAAA,SAAA,kBACA,KAAA,aAAA,EACA,CAOA,uBAAAF,EAAA,CACA,GAAAA,GAAAA,EAAA,OAAA,EAAA,CAEA,MAAAI,EAAAJ,EAAA,IAAAK,GAAAA,EAAA,OAAA,EAEA,OAAAD,EAAA,KAAA,CAAAE,EAAAC,IAAA,IAAA,KAAAD,EAAA,SAAA,EAAA,IAAA,KAAAC,EAAA,SAAA,EAAA,EAAA,EAAA,EACAH,CACA,CACA,MAAA,EACA,CACA,EAvHAI,EAAA,CAAAC,EAAA,CAAA,SAAA,GAAA,CAAA,EALAjB,EAKA,UAAA,QAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,SAAA,GAAA,CAAA,EANAjB,EAMA,UAAA,aAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAPAjB,EAOA,UAAA,MAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EARAjB,EAQA,UAAA,WAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EATAjB,EASA,UAAA,YAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAVAjB,EAUA,UAAA,YAAA,CAAA,EAVAA,EAAAgB,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAlB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"StaffComments.stories-7a3e0f39.js","sources":["../../src/components/staff-comments/StaffComments.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["StaffComments","Mixins","DateMixin","__publicField","length","numComments","val","res","comments","data","success","error","temp","c","a","b","__decorateClass","Prop","Component"],"mappings":"4pBAsIA,IAAAA,EAAA,cAAAC,EAAAC,CAAA,CAAA,CAAA,kCACAC,EAAA,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CAAA,EACA,MAAA,0DAAA,CAAA,CACA,EAEA,KAAA,SAAA,GACAD,IAEA,KAAA,MAAA,SAAA,QACA,MAAA,KAAA,qBAEA,CAGA,OAAA,CAEA,KAAA,MAAA,SAAA,kBACA,KAAA,aAAA,EACA,CAOA,uBAAAF,EAAA,CACA,GAAAA,GAAAA,EAAA,OAAA,EAAA,CAEA,MAAAI,EAAAJ,EAAA,IAAAK,GAAAA,EAAA,OAAA,EAEA,OAAAD,EAAA,KAAA,CAAAE,EAAAC,IAAA,IAAA,KAAAD,EAAA,SAAA,EAAA,IAAA,KAAAC,EAAA,SAAA,EAAA,EAAA,EAAA,EACAH,CACA,CACA,MAAA,EACA,CACA,EAvHAI,EAAA,CAAAC,EAAA,CAAA,SAAA,GAAA,CAAA,EALAjB,EAKA,UAAA,QAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,SAAA,GAAA,CAAA,EANAjB,EAMA,UAAA,aAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAPAjB,EAOA,UAAA,MAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EARAjB,EAQA,UAAA,WAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EATAjB,EASA,UAAA,YAAA,CAAA,EACAgB,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAVAjB,EAUA,UAAA,YAAA,CAAA,EAVAA,EAAAgB,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAlB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/StaffPayment.stories-7b3249e6.js b/docs/assets/StaffPayment.stories-f29a0154.js similarity index 84% rename from docs/assets/StaffPayment.stories-7b3249e6.js rename to docs/assets/StaffPayment.stories-f29a0154.js index 457a09eb..ef1ffac6 100644 --- a/docs/assets/StaffPayment.stories-7b3249e6.js +++ b/docs/assets/StaffPayment.stories-f29a0154.js @@ -1,4 +1,4 @@ -var O=Object.defineProperty;var S=(n,t,e)=>t in n?O(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>(S(n,typeof t!="symbol"?t+"":t,e),e);import{V as h}from"./vue.esm-b1e57a2f.js";import{C as F,P as p,E as N,n as _}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as c}from"./Watch-62f8b699.js";import{F as D}from"./FolioNumberInput-d9d8b85a.js";var o=(n=>(n[n.NONE=-1]="NONE",n[n.NO_FEE=0]="NO_FEE",n[n.FAS=1]="FAS",n[n.BCOL=2]="BCOL",n))(o||{}),C=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(n,t,e,a)=>{for(var l=a>1?void 0:a?g(t,e):t,m=n.length-1,f;m>=0;m--)(f=n[m])&&(l=(a?f(t,e,l):f(l))||l);return a&&l&&C(t,e,l),l};let s=class extends h{constructor(){super(...arguments);i(this,"$refs");i(this,"StaffPaymentOptions",o);i(this,"displaySideLabel");i(this,"displayPriorityCheckbox");i(this,"validate");i(this,"invalidSection");i(this,"staffPaymentData");i(this,"paymentOption",o.NONE);i(this,"fasFormValid",!1);i(this,"bcolFormValid",!1);i(this,"isMounted",!1);i(this,"routingSlipNumberRules",[e=>!!e||"Enter FAS Routing Slip Number",e=>/^\d{9}$/.test(e)||"Routing Slip Number must be 9 digits"]);i(this,"bcolAccountNumberRules",[e=>!!e||"Enter BC Online Account Number",e=>/^\d{6}$/.test(e)||"BC Online Account Number must be 6 digits"]);i(this,"datNumberRules",[e=>!!e||"Enter DAT Number",e=>/^[A-Z]{1}[0-9]{7,9}$/.test(e)||"DAT Number must be in standard format (eg, C1234567)"])}async mounted(){await this.$nextTick(),this.isMounted=!0}onPaymentOptionChanged(e){switch(e){case o.FAS:this.$refs.bcolForm.resetValidation(),this.$refs.folioNumberInputRef.resetFolioNumberValidation(),this.$refs.fasForm.validate(),this.emitStaffPaymentData({option:o.FAS});break;case o.BCOL:this.$refs.fasForm.resetValidation(),this.$refs.bcolForm.validate(),this.emitStaffPaymentData({option:o.BCOL});break;case o.NO_FEE:this.$refs.fasForm.resetValidation(),this.$refs.bcolForm.resetValidation(),this.$refs.folioNumberInputRef.resetFolioNumberValidation(),this.emitStaffPaymentData({option:o.NO_FEE,isPriority:!1});break}}onFasFormValid(e){this.isMounted&&this.emitValid()}onBcolFormValid(e){this.isMounted&&this.emitValid()}async onStaffPaymentDataChanged(e){this.paymentOption=e.option,await this.$nextTick(),this.emitValid()}emitStaffPaymentData({option:e=this.staffPaymentData.option,routingSlipNumber:a=this.staffPaymentData.routingSlipNumber||"",bcolAccountNumber:l=this.staffPaymentData.bcolAccountNumber||"",datNumber:m=this.staffPaymentData.datNumber||"",folioNumber:f=this.staffPaymentData.folioNumber||"",isPriority:d=this.staffPaymentData.isPriority||!1}){switch(e){case o.FAS:return{option:e,routingSlipNumber:a,isPriority:d};case o.BCOL:return{option:e,bcolAccountNumber:l,datNumber:m,folioNumber:f,isPriority:d};case o.NO_FEE:return{option:e}}}emitValid(){return this.fasFormValid||this.bcolFormValid&&this.$refs.folioNumberInputRef.validateFolioNumber()||this.staffPaymentData.option===o.NO_FEE}};r([p({default:!0})],s.prototype,"displaySideLabel",2);r([p({default:!0})],s.prototype,"displayPriorityCheckbox",2);r([p({default:!1})],s.prototype,"validate",2);r([p({default:!1})],s.prototype,"invalidSection",2);r([p({default:()=>({option:o.NONE,routingSlipNumber:null,bcolAccountNumber:null,datNumber:null,folioNumber:null,isPriority:!1})})],s.prototype,"staffPaymentData",2);r([c("paymentOption")],s.prototype,"onPaymentOptionChanged",1);r([c("fasFormValid")],s.prototype,"onFasFormValid",1);r([c("bcolFormValid")],s.prototype,"onBcolFormValid",1);r([c("staffPaymentData",{deep:!0,immediate:!0})],s.prototype,"onStaffPaymentDataChanged",1);r([N("update:staffPaymentData")],s.prototype,"emitStaffPaymentData",1);r([N("valid")],s.prototype,"emitValid",1);s=r([F({components:{FolioNumberInput:D}})],s);var E=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{attrs:{id:"staff-payment-container"}},[e("v-row",{attrs:{"no-gutters":""}},[t.displaySideLabel?e("v-col",{staticClass:"pr-4 pb-4",attrs:{cols:"12",sm:"3"}},[e("label",{staticClass:"title-label",class:{"error-text":t.invalidSection}},[t._v("Payment")])]):t._e(),e("v-col",{attrs:{cols:"12",sm:t.displaySideLabel?9:12}},[e("v-radio-group",{staticClass:"payment-group",model:{value:t.paymentOption,callback:function(a){t.paymentOption=a},expression:"paymentOption"}},[e("v-radio",{staticClass:"mb-0",attrs:{id:"fas-radio",label:"Cash or Cheque",value:t.StaffPaymentOptions.FAS}}),e("v-form",{ref:"fasForm",staticClass:"mt-4 ml-8",model:{value:t.fasFormValid,callback:function(a){t.fasFormValid=a},expression:"fasFormValid"}},[e("v-text-field",{attrs:{id:"routing-slip-number-textfield",filled:"",label:"Routing Slip Number",value:t.staffPaymentData.routingSlipNumber,rules:t.validate?t.routingSlipNumberRules:[],disabled:t.paymentOption===t.StaffPaymentOptions.BCOL||t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{keyup:function(a){t.staffPaymentData.routingSlipNumber=t.staffPaymentData.routingSlipNumber.trim()},focus:function(a){t.paymentOption=t.StaffPaymentOptions.FAS},input:function(a){return t.emitStaffPaymentData({option:t.StaffPaymentOptions.FAS,routingSlipNumber:a})}}})],1),e("v-radio",{staticClass:"mb-0 pt-2",attrs:{id:"bcol-radio",label:"BC Online",value:t.StaffPaymentOptions.BCOL}}),e("v-form",{ref:"bcolForm",staticClass:"mt-4 ml-8",model:{value:t.bcolFormValid,callback:function(a){t.bcolFormValid=a},expression:"bcolFormValid"}},[e("v-text-field",{attrs:{id:"bcol-account-number-textfield",filled:"",label:"BC Online Account Number",value:t.staffPaymentData.bcolAccountNumber,rules:t.validate?t.bcolAccountNumberRules:[],disabled:t.paymentOption===t.StaffPaymentOptions.FAS||t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{keyup:function(a){t.staffPaymentData.bcolAccountNumber=t.staffPaymentData.bcolAccountNumber.trim()},focus:function(a){t.paymentOption=t.StaffPaymentOptions.BCOL},input:function(a){return t.emitStaffPaymentData({option:t.StaffPaymentOptions.BCOL,bcolAccountNumber:a})}}}),e("v-text-field",{attrs:{id:"dat-number-textfield",filled:"",label:"DAT Number",value:t.staffPaymentData.datNumber,rules:t.validate?t.datNumberRules:[],disabled:t.paymentOption===t.StaffPaymentOptions.FAS||t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{keyup:function(a){t.staffPaymentData.datNumber=t.staffPaymentData.datNumber.trim()},focus:function(a){t.paymentOption=t.StaffPaymentOptions.BCOL},input:function(a){return t.emitStaffPaymentData({option:t.StaffPaymentOptions.BCOL,datNumber:a})}}}),e("FolioNumberInput",{ref:"folioNumberInputRef",attrs:{folioNumber:t.staffPaymentData.folioNumber,disabled:t.paymentOption===t.StaffPaymentOptions.FAS||t.paymentOption===t.StaffPaymentOptions.NO_FEE,validate:"true"},on:{focus:function(a){t.paymentOption=t.StaffPaymentOptions.BCOL},emitFolioNumber:function(a){t.paymentOption===t.StaffPaymentOptions.BCOL&&t.emitStaffPaymentData({option:t.StaffPaymentOptions.BCOL,folioNumber:a})}}})],1),e("v-radio",{staticClass:"mb-0 pt-2",attrs:{id:"no-fee-radio",label:"No Fee",value:t.StaffPaymentOptions.NO_FEE}}),t.displayPriorityCheckbox?[e("v-divider",{staticClass:"mt-6"}),e("v-checkbox",{staticClass:"priority-checkbox mt-6 pt-0",attrs:{id:"priority-checkbox",label:"Priority (add $100.00)","hide-details":"","input-value":t.staffPaymentData.isPriority,disabled:t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{change:function(a){return t.emitStaffPaymentData({isPriority:!!a})}}})]:t._e()],2)],1)],1)],1)},V=[],v=_(s,E,V,!1,null,"5f730265",null,null);const A=v.exports;v.exports.__docgenInfo={exportName:"default",displayName:"StaffPayment",description:"",tags:{},props:[{name:"displaySideLabel",tags:{},description:"Whether to display side label.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"displayPriorityCheckbox",tags:{},description:"Whether to display priority checkbox.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"validate",tags:{},description:"Whether to validate the fields.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Whether to show invalid section styling (label only).",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"staffPaymentData",tags:{},description:"Staff Payment Data prop.",type:{name:"StaffPaymentIF"},defaultValue:{func:!0,value:`() => { +var v=Object.defineProperty;var S=(n,t,e)=>t in n?v(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>(S(n,typeof t!="symbol"?t+"":t,e),e);import{V as h}from"./vue.esm-b1e57a2f.js";import{C as F,P as p,E as N,n as _}from"./_plugin-vue2_normalizer-b11a0120.js";import{W as d}from"./Watch-62f8b699.js";import{F as D}from"./FolioNumberInput-cf343253.js";var o=(n=>(n[n.NONE=-1]="NONE",n[n.NO_FEE=0]="NO_FEE",n[n.FAS=1]="FAS",n[n.BCOL=2]="BCOL",n))(o||{}),g=Object.defineProperty,C=Object.getOwnPropertyDescriptor,r=(n,t,e,a)=>{for(var l=a>1?void 0:a?C(t,e):t,m=n.length-1,f;m>=0;m--)(f=n[m])&&(l=(a?f(t,e,l):f(l))||l);return a&&l&&g(t,e,l),l};let s=class extends h{constructor(){super(...arguments);i(this,"$refs");i(this,"StaffPaymentOptions",o);i(this,"displaySideLabel");i(this,"displayPriorityCheckbox");i(this,"validate");i(this,"invalidSection");i(this,"staffPaymentData");i(this,"paymentOption",o.NONE);i(this,"fasFormValid",!1);i(this,"bcolFormValid",!1);i(this,"isMounted",!1);i(this,"routingSlipNumberRules",[e=>!!e||"Enter FAS Routing Slip Number",e=>/^\d{9}$/.test(e)||"Routing Slip Number must be 9 digits"]);i(this,"bcolAccountNumberRules",[e=>!!e||"Enter BC Online Account Number",e=>/^\d{6}$/.test(e)||"BC Online Account Number must be 6 digits"]);i(this,"datNumberRules",[e=>!!e||"Enter DAT Number",e=>/^[A-Z]{1}[0-9]{7,9}$/.test(e)||"DAT Number must be in standard format (eg, C1234567)"])}async mounted(){await this.$nextTick(),this.isMounted=!0}onPaymentOptionChanged(e){switch(e){case o.FAS:this.$refs.bcolForm.resetValidation(),this.$refs.folioNumberInputRef.resetFolioNumberValidation(),this.$refs.fasForm.validate(),this.emitStaffPaymentData({option:o.FAS});break;case o.BCOL:this.$refs.fasForm.resetValidation(),this.$refs.bcolForm.validate(),this.emitStaffPaymentData({option:o.BCOL});break;case o.NO_FEE:this.$refs.fasForm.resetValidation(),this.$refs.bcolForm.resetValidation(),this.$refs.folioNumberInputRef.resetFolioNumberValidation(),this.emitStaffPaymentData({option:o.NO_FEE,isPriority:!1});break}}onFasFormValid(e){this.isMounted&&this.emitValid()}onBcolFormValid(e){this.isMounted&&this.emitValid()}async onStaffPaymentDataChanged(e){this.paymentOption=e.option,await this.$nextTick(),this.emitValid()}emitStaffPaymentData({option:e=this.staffPaymentData.option,routingSlipNumber:a=this.staffPaymentData.routingSlipNumber||"",bcolAccountNumber:l=this.staffPaymentData.bcolAccountNumber||"",datNumber:m=this.staffPaymentData.datNumber||"",folioNumber:f=this.staffPaymentData.folioNumber||"",isPriority:c=this.staffPaymentData.isPriority||!1}){switch(e){case o.FAS:return{option:e,routingSlipNumber:a,isPriority:c};case o.BCOL:return{option:e,bcolAccountNumber:l,datNumber:m,folioNumber:f,isPriority:c};case o.NO_FEE:return{option:e}}}emitValid(){return this.fasFormValid||this.bcolFormValid&&this.$refs.folioNumberInputRef.validateFolioNumber()||this.staffPaymentData.option===o.NO_FEE}};r([p({default:!0})],s.prototype,"displaySideLabel",2);r([p({default:!0})],s.prototype,"displayPriorityCheckbox",2);r([p({default:!1})],s.prototype,"validate",2);r([p({default:!1})],s.prototype,"invalidSection",2);r([p({default:()=>({option:o.NONE,routingSlipNumber:null,bcolAccountNumber:null,datNumber:null,folioNumber:null,isPriority:!1})})],s.prototype,"staffPaymentData",2);r([d("paymentOption")],s.prototype,"onPaymentOptionChanged",1);r([d("fasFormValid")],s.prototype,"onFasFormValid",1);r([d("bcolFormValid")],s.prototype,"onBcolFormValid",1);r([d("staffPaymentData",{deep:!0,immediate:!0})],s.prototype,"onStaffPaymentDataChanged",1);r([N("update:staffPaymentData")],s.prototype,"emitStaffPaymentData",1);r([N("valid")],s.prototype,"emitValid",1);s=r([F({components:{FolioNumberInput:D}})],s);var E=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{attrs:{id:"staff-payment-container"}},[e("v-row",{attrs:{"no-gutters":""}},[t.displaySideLabel?e("v-col",{staticClass:"pr-4 pb-4",attrs:{cols:"12",sm:"3"}},[e("label",{staticClass:"title-label",class:{"error-text":t.invalidSection}},[t._v("Payment")])]):t._e(),e("v-col",{attrs:{cols:"12",sm:t.displaySideLabel?9:12}},[e("v-radio-group",{staticClass:"payment-group",model:{value:t.paymentOption,callback:function(a){t.paymentOption=a},expression:"paymentOption"}},[e("v-radio",{staticClass:"mb-0",attrs:{id:"fas-radio",label:"Cash or Cheque",value:t.StaffPaymentOptions.FAS}}),e("v-form",{ref:"fasForm",staticClass:"mt-4 ml-8",model:{value:t.fasFormValid,callback:function(a){t.fasFormValid=a},expression:"fasFormValid"}},[e("v-text-field",{attrs:{id:"routing-slip-number-textfield",filled:"",label:"Routing Slip Number",value:t.staffPaymentData.routingSlipNumber,rules:t.validate?t.routingSlipNumberRules:[],disabled:t.paymentOption===t.StaffPaymentOptions.BCOL||t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{keyup:function(a){t.staffPaymentData.routingSlipNumber=t.staffPaymentData.routingSlipNumber.trim()},focus:function(a){t.paymentOption=t.StaffPaymentOptions.FAS},input:function(a){return t.emitStaffPaymentData({option:t.StaffPaymentOptions.FAS,routingSlipNumber:a})}}})],1),e("v-radio",{staticClass:"mb-0 pt-2",attrs:{id:"bcol-radio",label:"BC Online",value:t.StaffPaymentOptions.BCOL}}),e("v-form",{ref:"bcolForm",staticClass:"mt-4 ml-8",model:{value:t.bcolFormValid,callback:function(a){t.bcolFormValid=a},expression:"bcolFormValid"}},[e("v-text-field",{attrs:{id:"bcol-account-number-textfield",filled:"",label:"BC Online Account Number",value:t.staffPaymentData.bcolAccountNumber,rules:t.validate?t.bcolAccountNumberRules:[],disabled:t.paymentOption===t.StaffPaymentOptions.FAS||t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{keyup:function(a){t.staffPaymentData.bcolAccountNumber=t.staffPaymentData.bcolAccountNumber.trim()},focus:function(a){t.paymentOption=t.StaffPaymentOptions.BCOL},input:function(a){return t.emitStaffPaymentData({option:t.StaffPaymentOptions.BCOL,bcolAccountNumber:a})}}}),e("v-text-field",{attrs:{id:"dat-number-textfield",filled:"",label:"DAT Number",value:t.staffPaymentData.datNumber,rules:t.validate?t.datNumberRules:[],disabled:t.paymentOption===t.StaffPaymentOptions.FAS||t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{keyup:function(a){t.staffPaymentData.datNumber=t.staffPaymentData.datNumber.trim()},focus:function(a){t.paymentOption=t.StaffPaymentOptions.BCOL},input:function(a){return t.emitStaffPaymentData({option:t.StaffPaymentOptions.BCOL,datNumber:a})}}}),e("FolioNumberInput",{ref:"folioNumberInputRef",attrs:{folioNumber:t.staffPaymentData.folioNumber,disabled:t.paymentOption===t.StaffPaymentOptions.FAS||t.paymentOption===t.StaffPaymentOptions.NO_FEE,validate:"true"},on:{focus:function(a){t.paymentOption=t.StaffPaymentOptions.BCOL},emitFolioNumber:function(a){t.paymentOption===t.StaffPaymentOptions.BCOL&&t.emitStaffPaymentData({option:t.StaffPaymentOptions.BCOL,folioNumber:a})}}})],1),e("v-radio",{staticClass:"mb-0 pt-2",attrs:{id:"no-fee-radio",label:"No Fee",value:t.StaffPaymentOptions.NO_FEE}}),t.displayPriorityCheckbox?[e("v-divider",{staticClass:"mt-6"}),e("v-checkbox",{staticClass:"priority-checkbox mt-6 pt-0",attrs:{id:"priority-checkbox",label:"Priority (add $100.00)","hide-details":"","input-value":t.staffPaymentData.isPriority,disabled:t.paymentOption===t.StaffPaymentOptions.NO_FEE},on:{change:function(a){return t.emitStaffPaymentData({isPriority:!!a})}}})]:t._e()],2)],1)],1)],1)},V=[],O=_(s,E,V,!1,null,"5f730265",null,null);const A=O.exports;O.exports.__docgenInfo={exportName:"default",displayName:"StaffPayment",description:"",tags:{},props:[{name:"displaySideLabel",tags:{},description:"Whether to display side label.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"displayPriorityCheckbox",tags:{},description:"Whether to display priority checkbox.",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"validate",tags:{},description:"Whether to validate the fields.",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"invalidSection",tags:{},description:"Whether to show invalid section styling (label only).",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"staffPaymentData",tags:{},description:"Staff Payment Data prop.",type:{name:"StaffPaymentIF"},defaultValue:{func:!0,value:`() => { return { option: StaffPaymentOptions.NONE, routingSlipNumber: null, @@ -7,7 +7,7 @@ var O=Object.defineProperty;var S=(n,t,e)=>t in n?O(n,t,{enumerable:!0,configura folioNumber: null, isPriority: false } -}`}}],events:[{name:"update:staffPaymentData",description:"Emits an event to update the Staff Payment Data prop."},{name:"valid",description:"Emits an event indicating whether or not this component is valid."}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/staff-payment/StaffPayment.vue"]};const T={title:"component/StaffPayment"},x=(n,{argTypes:t})=>({props:Object.keys(t),components:{StaffPayment:A},template:''}),$={option:o.NONE,routingSlipNumber:null,bcolAccountNumber:null,datNumber:null,folioNumber:null,isPriority:!1},u=x.bind({});u.args={staffPaymentData:$};var y,b,P;u.parameters={...u.parameters,docs:{...(y=u.parameters)==null?void 0:y.docs,source:{originalSource:`(args, { +}`}}],events:[{name:"update:staffPaymentData",description:"Emits an event to update the Staff Payment Data prop."},{name:"valid",description:"Emits an event indicating whether or not this component is valid."}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/staff-payment/StaffPayment.vue"]};const T={title:"component/StaffPayment"},x=(n,{argTypes:t})=>({props:Object.keys(t),components:{StaffPayment:A},template:''}),$={option:o.NONE,routingSlipNumber:null,bcolAccountNumber:null,datNumber:null,folioNumber:null,isPriority:!1},u=x.bind({});u.args={staffPaymentData:$};var y,b,P;u.parameters={...u.parameters,docs:{...(y=u.parameters)==null?void 0:y.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -16,4 +16,4 @@ var O=Object.defineProperty;var S=(n,t,e)=>t in n?O(n,t,{enumerable:!0,configura }, template: '' // $props comes from args below })`,...(P=(b=u.parameters)==null?void 0:b.docs)==null?void 0:P.source}}};const W=["Default"];export{u as Default,W as __namedExportsOrder,T as default}; -//# sourceMappingURL=StaffPayment.stories-7b3249e6.js.map +//# sourceMappingURL=StaffPayment.stories-f29a0154.js.map diff --git a/docs/assets/StaffPayment.stories-7b3249e6.js.map b/docs/assets/StaffPayment.stories-f29a0154.js.map similarity index 99% rename from docs/assets/StaffPayment.stories-7b3249e6.js.map rename to docs/assets/StaffPayment.stories-f29a0154.js.map index 33282a89..32fee3fa 100644 --- a/docs/assets/StaffPayment.stories-7b3249e6.js.map +++ b/docs/assets/StaffPayment.stories-f29a0154.js.map @@ -1 +1 @@ -{"version":3,"file":"StaffPayment.stories-7b3249e6.js","sources":["../../src/enums/staff-payment-options.ts","../../src/components/staff-payment/StaffPayment.vue"],"sourcesContent":["export enum StaffPaymentOptions {\n NONE = -1,\n NO_FEE = 0,\n FAS = 1,\n BCOL = 2,\n }\n","\n\n\n\n\n"],"names":["StaffPaymentOptions","StaffPayment","Vue","__publicField","v","val","option","routingSlipNumber","bcolAccountNumber","datNumber","folioNumber","isPriority","__decorateClass","Prop","Watch","Emit","Component","FolioNumberInput"],"mappings":"4XAAY,IAAAA,GAA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A,kBAAA,KACA,kBAAA,KACA,UAAA,KACA,YAAA,KACA,WAAA,EAAA,EAEA,CACA,CAAA,EArCAC,EAsCA,UAAA,mBAAA,CAAA,EAwCAW,EAAA,CADAE,EAAA,eAAA,CAAA,EA7EAb,EA8EA,UAAA,yBAAA,CAAA,EAmCAW,EAAA,CAFAE,EAAA,cAAA,CAAA,EA/GAb,EAiHA,UAAA,iBAAA,CAAA,EASAW,EAAA,CAFAE,EAAA,eAAA,CAAA,EAxHAb,EA0HA,UAAA,kBAAA,CAAA,EAQAW,EAAA,CADAE,EAAA,mBAAA,CAAA,KAAA,GAAA,UAAA,GAAA,CAAA,EAjIAb,EAkIA,UAAA,4BAAA,CAAA,EAQAW,EAAA,CADAG,EAAA,yBAAA,CAAA,EAzIAd,EA0IA,UAAA,uBAAA,CAAA,EAuBAW,EAAA,CADAG,EAAA,OAAA,CAAA,EAhKAd,EAiKA,UAAA,YAAA,CAAA,EAjKAA,EAAAW,EAAA,CAHAI,EAAA,CACA,WAAA,CAAA,iBAAAC,CAAA,CAAA,CACA,CAAA,EACAhB,CAAA;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"StaffPayment.stories-f29a0154.js","sources":["../../src/enums/staff-payment-options.ts","../../src/components/staff-payment/StaffPayment.vue"],"sourcesContent":["export enum StaffPaymentOptions {\n NONE = -1,\n NO_FEE = 0,\n FAS = 1,\n BCOL = 2,\n }\n","\n\n\n\n\n"],"names":["StaffPaymentOptions","StaffPayment","Vue","__publicField","v","val","option","routingSlipNumber","bcolAccountNumber","datNumber","folioNumber","isPriority","__decorateClass","Prop","Watch","Emit","Component","FolioNumberInput"],"mappings":"4XAAY,IAAAA,GAAAA,IACRA,EAAAA,EAAA,KAAO,EAAP,EAAA,OACAA,EAAAA,EAAA,OAAS,CAAT,EAAA,SACAA,EAAAA,EAAA,IAAM,CAAN,EAAA,MACAA,EAAAA,EAAA,KAAO,CAAP,EAAA,OAJQA,IAAAA,GAAA,CAAA,CAAA,8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mCAW,EAAA,CAFAE,EAAA,cAAA,CAAA,EA/GAb,EAiHA,UAAA,iBAAA,CAAA,EASAW,EAAA,CAFAE,EAAA,eAAA,CAAA,EAxHAb,EA0HA,UAAA,kBAAA,CAAA,EAQAW,EAAA,CADAE,EAAA,mBAAA,CAAA,KAAA,GAAA,UAAA,GAAA,CAAA,EAjIAb,EAkIA,UAAA,4BAAA,CAAA,EAQAW,EAAA,CADAG,EAAA,yBAAA,CAAA,EAzIAd,EA0IA,UAAA,uBAAA,CAAA,EAuBAW,EAAA,CADAG,EAAA,OAAA,CAAA,EAhKAd,EAiKA,UAAA,YAAA,CAAA,EAjKAA,EAAAW,EAAA,CAHAI,EAAA,CACA,WAAA,CAAA,iBAAAC,CAAA,CAAA,CACA,CAAA,EACAhB,CAAA;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/SubMenu.stories-7d17f876.js b/docs/assets/SubMenu.stories-acb3c652.js similarity index 79% rename from docs/assets/SubMenu.stories-7d17f876.js rename to docs/assets/SubMenu.stories-acb3c652.js index da0b01d8..9e8182a3 100644 --- a/docs/assets/SubMenu.stories-7d17f876.js +++ b/docs/assets/SubMenu.stories-acb3c652.js @@ -1,5 +1,5 @@ var y=Object.defineProperty;var _=(o,e,n)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n;var u=(o,e,n)=>(_(o,typeof e!="symbol"?e+"":e,n),n);import{V as b}from"./vue.esm-b1e57a2f.js";import{C as g,P as m,n as O}from"./_plugin-vue2_normalizer-b11a0120.js";var M=Object.defineProperty,S=Object.getOwnPropertyDescriptor,r=(o,e,n,t)=>{for(var s=t>1?void 0:t?S(e,n):e,i=o.length-1,c;i>=0;i--)(c=o[i])&&(s=(t?c(e,n,s):c(s))||s);return t&&s&&M(e,n,s),s};let a=class extends b{constructor(){super(...arguments);u(this,"name");u(this,"icon");u(this,"menuItems");u(this,"color");u(this,"isOffsetX");u(this,"isOffsetY");u(this,"isOpenOnHover");u(this,"isSubMenu");u(this,"transition");u(this,"openMenu",!1)}emitClickEvent(n){this.$emit("menu-click",n),this.openMenu=!1}};r([m()],a.prototype,"name",2);r([m()],a.prototype,"icon",2);r([m()],a.prototype,"menuItems",2);r([m({default:"secondary"})],a.prototype,"color",2);r([m({default:!1})],a.prototype,"isOffsetX",2);r([m({default:!0})],a.prototype,"isOffsetY",2);r([m({default:!1})],a.prototype,"isOpenOnHover",2);r([m({default:!1})],a.prototype,"isSubMenu",2);r([m({default:"scale-transition"})],a.prototype,"transition",2);a=r([g({})],a);var h=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("v-menu",{attrs:{"close-on-content-click":!1,"offset-x":e.isOffsetX,"offset-y":e.isOffsetY,"open-on-hover":e.isOpenOnHover,transition:e.transition,value:e.openMenu},scopedSlots:e._u([{key:"activator",fn:function({on:t}){return[e.icon?n("v-btn",e._g({attrs:{color:e.color}},t),[n("v-icon",[e._v(e._s(e.icon))])],1):e.isSubMenu?n("v-list-item",e._g({staticClass:"d-flex justify-space-between"},t),[e._v(" "+e._s(e.name)+" "),n("div",{staticClass:"flex-grow-1"}),n("v-icon",[e._v("mdi-chevron-right")])],1):n("v-btn",e._g({attrs:{color:e.color,text:""},on:{click:function(s){e.openMenu=!0}}},t),[e._v(" "+e._s(e.name)+" ")])]}}])},[n("v-list",[e._l(e.menuItems,function(t,s){return[t.isDivider?n("v-divider",{key:s}):t.menu?n("sub-menu",{key:s,attrs:{"is-open-on-hover":!1,"is-offset-x":!0,"is-offset-y":!1,"is-sub-menu":!0,name:t.name,"menu-items":t.menu},on:{"menu-click":function(i){return e.emitClickEvent(i)}}}):n("v-list-item",{key:s,on:{click:function(i){return e.emitClickEvent(t)}}},[n("v-list-item-title",[e._v(e._s(t.name))])],1)]})],2)],1)},k=[],d=O(a,h,k,!1,null,null,null,null);const C=d.exports;d.exports.__docgenInfo={description:`Adapted from https://codepen.io/Moloth/pen/ZEBOzQP. -See also https://github.com/vuetifyjs/vuetify/issues/1877.`,tags:{},exportName:"default",displayName:"SubMenu",props:[{name:"name",tags:{},type:{name:"string"}},{name:"icon",tags:{},type:{name:"string"}},{name:"menuItems",tags:{},type:{name:"Array",elements:[{name:"any"}]}},{name:"color",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'secondary'"}},{name:"isOffsetX",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isOffsetY",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isOpenOnHover",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isSubMenu",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"transition",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'scale-transition'"}}],events:[{name:"menu-click",type:{names:["undefined"]}}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/sub-menu/SubMenu.vue"]};const $={title:"component/SubMenu"},x=(o,{argTypes:e})=>({props:Object.keys(e),components:{SubMenu:C},template:''}),l=x.bind({});l.args={menuItems:[{name:"Menu Item 1",action:()=>{console.log("menu-item-1")}},{isDivider:!0},{name:"Menu Item 2"},{name:"Sub 1",menu:[{name:"1.1"},{name:"1.2"},{name:"Sub-menu 2",menu:[{name:"2.1"},{name:"2.2"},{name:"Sub-menu 3",menu:[{name:"3.1"},{name:"3.2"},{name:"Sub-menu 4",menu:[{name:"4.1"},{name:"4.2"},{name:"4.3"}]}]}]}]},{name:"Menu Item 3"},{isDivider:!0},{name:"Menu Item 4",action:()=>{console.log("menu-item-4")}}]};var f,p,v;l.parameters={...l.parameters,docs:{...(f=l.parameters)==null?void 0:f.docs,source:{originalSource:`(args, { +See also https://github.com/vuetifyjs/vuetify/issues/1877.`,tags:{},exportName:"default",displayName:"SubMenu",props:[{name:"name",tags:{},type:{name:"string"}},{name:"icon",tags:{},type:{name:"string"}},{name:"menuItems",tags:{},type:{name:"Array",elements:[{name:"any"}]}},{name:"color",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'secondary'"}},{name:"isOffsetX",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isOffsetY",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isOpenOnHover",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isSubMenu",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"transition",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'scale-transition'"}}],events:[{name:"menu-click",type:{names:["undefined"]}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/sub-menu/SubMenu.vue"]};const $={title:"component/SubMenu"},x=(o,{argTypes:e})=>({props:Object.keys(e),components:{SubMenu:C},template:''}),l=x.bind({});l.args={menuItems:[{name:"Menu Item 1",action:()=>{console.log("menu-item-1")}},{isDivider:!0},{name:"Menu Item 2"},{name:"Sub 1",menu:[{name:"1.1"},{name:"1.2"},{name:"Sub-menu 2",menu:[{name:"2.1"},{name:"2.2"},{name:"Sub-menu 3",menu:[{name:"3.1"},{name:"3.2"},{name:"Sub-menu 4",menu:[{name:"4.1"},{name:"4.2"},{name:"4.3"}]}]}]}]},{name:"Menu Item 3"},{isDivider:!0},{name:"Menu Item 4",action:()=>{console.log("menu-item-4")}}]};var f,p,v;l.parameters={...l.parameters,docs:{...(f=l.parameters)==null?void 0:f.docs,source:{originalSource:`(args, { argTypes }) => ({ props: Object.keys(argTypes), @@ -8,4 +8,4 @@ See also https://github.com/vuetifyjs/vuetify/issues/1877.`,tags:{},exportName:" }, template: '' // $props comes from args below })`,...(v=(p=l.parameters)==null?void 0:p.docs)==null?void 0:v.source}}};const j=["Default"];export{l as Default,j as __namedExportsOrder,$ as default}; -//# sourceMappingURL=SubMenu.stories-7d17f876.js.map +//# sourceMappingURL=SubMenu.stories-acb3c652.js.map diff --git a/docs/assets/SubMenu.stories-7d17f876.js.map b/docs/assets/SubMenu.stories-acb3c652.js.map similarity index 98% rename from docs/assets/SubMenu.stories-7d17f876.js.map rename to docs/assets/SubMenu.stories-acb3c652.js.map index 57ce14f6..f67e82d7 100644 --- a/docs/assets/SubMenu.stories-7d17f876.js.map +++ b/docs/assets/SubMenu.stories-acb3c652.js.map @@ -1 +1 @@ -{"version":3,"file":"SubMenu.stories-7d17f876.js","sources":["../../src/components/sub-menu/SubMenu.vue"],"sourcesContent":["\n\n\n"],"names":["SubMenu","Vue","__publicField","item","__decorateClass","Prop","Component"],"mappings":"0dA0EA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,aACAA,EAAA,aACAA,EAAA,kBACAA,EAAA,cACAA,EAAA,kBACAA,EAAA,kBACAA,EAAA,sBACAA,EAAA,kBACAA,EAAA,mBAGAA,EAAA,gBAAA,IAGA,eAAAC,EAAA,CACA,KAAA,MAAA,aAAAA,CAAA,EACA,KAAA,SAAA,EACA,CACA,EAlBAC,EAAA,CAAAC,EAAA,CAAA,EAFAL,EAEA,UAAA,OAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,EAHAL,EAGA,UAAA,OAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,EAJAL,EAIA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,YAAA,CAAA,EALAL,EAKA,UAAA,QAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EANAL,EAMA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAPAL,EAOA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EARAL,EAQA,UAAA,gBAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EATAL,EASA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,mBAAA,CAAA,EAVAL,EAUA,UAAA,aAAA,CAAA,EAVAA,EAAAI,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAN,CAAA;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"SubMenu.stories-acb3c652.js","sources":["../../src/components/sub-menu/SubMenu.vue"],"sourcesContent":["\n\n\n"],"names":["SubMenu","Vue","__publicField","item","__decorateClass","Prop","Component"],"mappings":"0dA0EA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCAEAC,EAAA,aACAA,EAAA,aACAA,EAAA,kBACAA,EAAA,cACAA,EAAA,kBACAA,EAAA,kBACAA,EAAA,sBACAA,EAAA,kBACAA,EAAA,mBAGAA,EAAA,gBAAA,IAGA,eAAAC,EAAA,CACA,KAAA,MAAA,aAAAA,CAAA,EACA,KAAA,SAAA,EACA,CACA,EAlBAC,EAAA,CAAAC,EAAA,CAAA,EAFAL,EAEA,UAAA,OAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,EAHAL,EAGA,UAAA,OAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,EAJAL,EAIA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,YAAA,CAAA,EALAL,EAKA,UAAA,QAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EANAL,EAMA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAPAL,EAOA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EARAL,EAQA,UAAA,gBAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EATAL,EASA,UAAA,YAAA,CAAA,EACAI,EAAA,CAAAC,EAAA,CAAA,QAAA,mBAAA,CAAA,EAVAL,EAUA,UAAA,aAAA,CAAA,EAVAA,EAAAI,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAN,CAAA;;;;;;;;;"} \ No newline at end of file diff --git a/docs/assets/WebChat.stories-d3bf5ea8.js b/docs/assets/WebChat.stories-b3f700e1.js similarity index 87% rename from docs/assets/WebChat.stories-d3bf5ea8.js rename to docs/assets/WebChat.stories-b3f700e1.js index f49611e8..722a5ecb 100644 --- a/docs/assets/WebChat.stories-d3bf5ea8.js +++ b/docs/assets/WebChat.stories-b3f700e1.js @@ -1,5 +1,5 @@ var v=Object.defineProperty;var w=(a,e,t)=>e in a?v(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var n=(a,e,t)=>(w(a,typeof e!="symbol"?e+"":e,t),t);import{A as h}from"./index-2b7fa976.js";import{M as _}from"./index-7a7a5d4b.js";import{V as y}from"./vue.esm-b1e57a2f.js";import{C,P as i,n as T}from"./_plugin-vue2_normalizer-b11a0120.js";import{V as M}from"./vuetify-b9fb25b0.js";import"./_commonjsHelpers-de833af9.js";var x=Object.defineProperty,S=Object.getOwnPropertyDescriptor,l=(a,e,t,r)=>{for(var o=r>1?void 0:r?S(e,t):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(o=(r?c(e,t,o):c(o))||o);return r&&o&&x(e,t,o),o};let s=class extends y{constructor(){super(...arguments);n(this,"axios");n(this,"isMobile");n(this,"webChatReason");n(this,"webChatStatusUrl");n(this,"webChatUrl");n(this,"openTooltipMessage");n(this,"closedTooltipMessage");n(this,"unavailableTooltipMessage");n(this,"chatStatus","unknown")}get timeZoneOffset(){return new Date().getTimezoneOffset()/60}async mounted(){this.webChatStatusUrl&&(this.chatStatus=await this.axios.get(this.webChatStatusUrl).then(e=>{var t;return((t=e.data)==null?void 0:t.status)||"response error"}).catch(e=>{var t;return console.error("failed to get webchat status, error =",e),((t=e.response)==null?void 0:t.statusText)||"network error"}))}onSubmit(){window.open("about:blank","webchat_window","width=400, height=500")}};l([i({required:!0})],s.prototype,"axios",2);l([i({default:!1})],s.prototype,"isMobile",2);l([i({default:null})],s.prototype,"webChatReason",2);l([i({default:null})],s.prototype,"webChatStatusUrl",2);l([i({default:null})],s.prototype,"webChatUrl",2);l([i({default:"Click here to chat live with Helpdesk staff."})],s.prototype,"openTooltipMessage",2);l([i({default:"We are closed. The Service BC Contact Centre is open Monday through Friday 7:30am – 5:00pm Pacific Time excluding BC statutory holidays."})],s.prototype,"closedTooltipMessage",2);l([i({default:"Webchat is temporarily unavailable."})],s.prototype,"unavailableTooltipMessage",2);s=l([C({})],s);var P=function(){var e=this,t=e._self._c;return e._self._setupProxy,e.webChatUrl&&e.webChatReason?t("div",{attrs:{id:"web-chat-container"}},[t("v-form",{attrs:{id:"webchat",target:"webchat_window",method:"post",action:e.webChatUrl},on:{submit:function(r){return e.onSubmit()}}},[t("input",{attrs:{type:"hidden",name:"Reason"},domProps:{value:e.webChatReason}}),t("input",{attrs:{type:"hidden",name:"UserLanguage",value:"en"}}),t("input",{attrs:{type:"hidden",name:"Parameters[TimeZoneOffset]"},domProps:{value:e.timeZoneOffset}}),t("v-tooltip",{attrs:{top:"","content-class":"top-tooltip","nudge-top":"5",disabled:e.isMobile},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:o}){return[t("div",e._g(e._b({attrs:{id:"chat-button-wrapper"}},"div",o,!1),r),[t("v-btn",e._g(e._b({staticClass:"chat-button",attrs:{disabled:e.chatStatus!=="open",large:"",outlined:"",color:"bcgovblue",elevation:"4",type:"submit","aria-label":"Chat with Helpdesk staff"}},"v-btn",o,!1),r),[t("v-icon",{staticClass:"mr-2 ml-n2"},[e._v(" mdi-forum-outline ")]),t("span",{staticClass:"font-weight-bold"},[e._v("Chat")])],1)],1)]}}],null,!1,245779421)},[e.chatStatus==="open"?t("span",{attrs:{id:"open-tooltip-message"}},[e._v(" "+e._s(e.openTooltipMessage)+" ")]):e.chatStatus==="closed"?t("span",{attrs:{id:"closed-tooltip-message"}},[e._v(" "+e._s(e.closedTooltipMessage)+" ")]):t("span",{attrs:{id:"unavailable-tooltip-message"}},[e._v(" "+e._s(e.unavailableTooltipMessage)+" ")])])],1)],1):e._e()},U=[],b=T(s,P,U,!1,null,"3bf7e341",null,null);const V=b.exports;b.exports.__docgenInfo={exportName:"default",displayName:"WebChat",description:"",tags:{},props:[{name:"axios",tags:{},type:{name:"any"},required:!0},{name:"isMobile",tags:{},type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"webChatReason",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"webChatStatusUrl",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"webChatUrl",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"openTooltipMessage",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'Click here to chat live with Helpdesk staff.'"}},{name:"closedTooltipMessage",tags:{},type:{name:"string"},defaultValue:{func:!1,value:`'We are closed. The Service BC Contact Centre is open Monday through ' + - 'Friday 7:30am – 5:00pm Pacific Time excluding BC statutory holidays.'`}},{name:"unavailableTooltipMessage",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'Webchat is temporarily unavailable.'"}}],sourceFiles:["/home/severin/repos/bcrs-shared-components/src/components/web-chat/WebChat.vue"]};const Z={title:"component/WebChat"},O="WebChatReason",g="https://web-chat-status-url",W="https://web-chat-url",R=new _(h);R.onGet(g).reply(200,{status:"open"});const k=(a,{argTypes:e})=>({vuetify:new M({iconfont:"mdi"}),props:Object.keys(e),components:{WebChat:V},template:''}),p=k.bind({});p.args={axios:h.create(),isMobile:!1,webChatReason:O,webChatStatusUrl:g,webChatUrl:W};var d,f,m;p.parameters={...p.parameters,docs:{...(d=p.parameters)==null?void 0:d.docs,source:{originalSource:`(args, { + 'Friday 7:30am – 5:00pm Pacific Time excluding BC statutory holidays.'`}},{name:"unavailableTooltipMessage",tags:{},type:{name:"string"},defaultValue:{func:!1,value:"'Webchat is temporarily unavailable.'"}}],sourceFiles:["/home/kdeodhar/gitRepo/bcrs-shared-components/src/components/web-chat/WebChat.vue"]};const Z={title:"component/WebChat"},O="WebChatReason",g="https://web-chat-status-url",W="https://web-chat-url",R=new _(h);R.onGet(g).reply(200,{status:"open"});const k=(a,{argTypes:e})=>({vuetify:new M({iconfont:"mdi"}),props:Object.keys(e),components:{WebChat:V},template:''}),p=k.bind({});p.args={axios:h.create(),isMobile:!1,webChatReason:O,webChatStatusUrl:g,webChatUrl:W};var d,f,m;p.parameters={...p.parameters,docs:{...(d=p.parameters)==null?void 0:d.docs,source:{originalSource:`(args, { argTypes }) => ({ vuetify: new Vuetify({ @@ -11,4 +11,4 @@ var v=Object.defineProperty;var w=(a,e,t)=>e in a?v(a,e,{enumerable:!0,configura }, template: '' // $props comes from args below })`,...(m=(f=p.parameters)==null?void 0:f.docs)==null?void 0:m.source}}};const q=["base"];export{q as __namedExportsOrder,p as base,Z as default}; -//# sourceMappingURL=WebChat.stories-d3bf5ea8.js.map +//# sourceMappingURL=WebChat.stories-b3f700e1.js.map diff --git a/docs/assets/WebChat.stories-d3bf5ea8.js.map b/docs/assets/WebChat.stories-b3f700e1.js.map similarity index 98% rename from docs/assets/WebChat.stories-d3bf5ea8.js.map rename to docs/assets/WebChat.stories-b3f700e1.js.map index 23a0df34..67eeee4a 100644 --- a/docs/assets/WebChat.stories-d3bf5ea8.js.map +++ b/docs/assets/WebChat.stories-b3f700e1.js.map @@ -1 +1 @@ -{"version":3,"file":"WebChat.stories-d3bf5ea8.js","sources":["../../src/components/web-chat/WebChat.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["ChatPopup","Vue","__publicField","response","_a","error","__decorateClass","Prop","Component"],"mappings":"snBAuFA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,cACAA,EAAA,iBACAA,EAAA,sBACAA,EAAA,yBACAA,EAAA,mBAGAA,EAAA,2BAIAA,EAAA,6BAGAA,EAAA,kCAEAA,EAAA,kBAAA,WAGA,IAAA,gBAAA,CACA,OAAA,IAAA,KAAA,EAAA,kBAAA,EAAA,EACA,CAGA,MAAA,SAAA,CACA,KAAA,mBACA,KAAA,WAAA,MAAA,KAAA,MACA,IAAA,KAAA,gBAAA,EACA,KAAAC,GAAA,OACA,QAAAC,EAAAD,EAAA,OAAA,YAAAC,EAAA,SAAA,gBAAA,CACA,EACA,MAAAC,GAAA,OAEA,eAAA,MAAA,wCAAAA,CAAA,IACAD,EAAAC,EAAA,WAAA,YAAAD,EAAA,aAAA,eAAA,CACA,EAEA,CAEA,UAAA,CACA,OAAA,KAAA,cAAA,iBAAA,uBAAA,CACA,CACA,EA1CAE,EAAA,CAAAC,EAAA,CAAA,SAAA,GAAA,CAAA,EADAP,EACA,UAAA,QAAA,CAAA,EACAM,EAAA,CAAAC,EAAA,CAAA,QAAA,GAAA,CAAA,EAFAP,EAEA,UAAA,WAAA,CAAA,EACAM,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAHAP,EAGA,UAAA,gBAAA,CAAA,EACAM,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EAJAP,EAIA,UAAA,mBAAA,CAAA,EACAM,EAAA,CAAAC,EAAA,CAAA,QAAA,KAAA,CAAA,EALAP,EAKA,UAAA,aAAA,CAAA,EAGAM,EAAA,CADAC,EAAA,CAAA,QAAA,+CAAA,CAAA,EAPAP,EAQA,UAAA,qBAAA,CAAA,EAIAM,EAAA,CAFAC,EAAA,CAAA,QAAA,2IACA,CAAA,EAXAP,EAYA,UAAA,uBAAA,CAAA,EAGAM,EAAA,CADAC,EAAA,CAAA,QAAA,sCAAA,CAAA,EAdAP,EAeA,UAAA,4BAAA,CAAA,EAfAA,EAAAM,EAAA,CADAE,EAAA,CAAA,CAAA,CAAA,EACAR,CAAA;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"WebChat.stories-b3f700e1.js","sources":["../../src/components/web-chat/WebChat.vue"],"sourcesContent":["\n\n\n\n\n"],"names":["ChatPopup","Vue","__publicField","response","_a","error","__decorateClass","Prop","Component"],"mappings":"snBAuFA,IAAAA,EAAA,cAAAC,CAAA,CAAA,kCACAC,EAAA,cACAA,EAAA,iBACAA,EAAA,sBACAA,EAAA,yBAC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iframe-05aef934.js.map b/docs/assets/iframe-05aef934.js.map deleted file mode 100644 index abae4b30..00000000 --- a/docs/assets/iframe-05aef934.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"mappings":"olDAAA,sBAAAA,CAAA,gCACI,QAAAC,CAAA,mCAEMC,EAAUF,EAAqB,CAAE,KAAM,SAAW,GACxDC,EAAO,WAAWC,CAAO,EACzB,OAAO,6BAA+BA,EAElC,OAAO,cAAgB,gBACzB,OAAO,6BAA+BA,GCR5C,MAAMC,EAAY,CACV,+CAAgD,SAAWC,EAAA,IAAC,OAAO,+BAA4F,2PACrK,+CAAgD,SAAWA,EAAA,IAAC,OAAO,+BAA4F,qHAC/J,yDAA0D,SAAWA,EAAA,IAAC,OAAO,oCAAsG,uNACnL,2DAA4D,SAAWA,EAAA,IAAC,OAAO,qCAAwG,uSACvL,6DAA8D,SAAWA,EAAA,IAAC,OAAO,sCAA0G,0UAC3L,qEAAsE,SAAWA,EAAA,IAAC,OAAO,0CAAkH,kMAC3M,kEAAmE,SAAWA,EAAA,IAAC,OAAO,wCAA+G,8LACrM,gFAAiF,SAAWA,EAAA,IAAC,OAAO,+CAA6H,4MACjO,sEAAuE,SAAWA,EAAA,IAAC,OAAO,0CAAmH,4KAC7M,oEAAqE,SAAWA,EAAA,IAAC,OAAO,yCAAiH,+HACzM,kEAAmE,SAAWA,EAAA,IAAC,OAAO,wCAA+G,qLACrM,uDAAwD,SAAWA,EAAA,IAAC,OAAO,mCAAoG,oLAC/K,qDAAsD,SAAWA,EAAA,IAAC,OAAO,kCAAkG,0QAC3K,6DAA8D,SAAWA,EAAA,IAAC,OAAO,sCAA0G,oKAC3L,oEAAqE,SAAWA,EAAA,IAAC,OAAO,yCAAiH,wWACzM,iEAAkE,SAAWA,EAAA,IAAC,OAAO,wCAA8G,8LACnM,qDAAsD,SAAWA,EAAA,IAAC,OAAO,kCAAkG,8RAC3K,2DAA4D,SAAWA,EAAA,IAAC,OAAO,qCAAwG,gPACvL,4DAA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i","getProjectAnnotations","configs"],"sources":["../../../../../../virtual:/@storybook/builder-vite/setup-addons.js","../../../../../../virtual:/@storybook/builder-vite/storybook-stories.js","../../../../../../virtual:/@storybook/builder-vite/vite-app.js"],"sourcesContent":["import { createBrowserChannel } from '@storybook/channels';\n import { addons } from '@storybook/preview-api';\n\n const channel = createBrowserChannel({ page: 'preview' });\n addons.setChannel(channel);\n window.__STORYBOOK_ADDONS_CHANNEL__ = channel;\n \n if (window.CONFIG_TYPE === 'DEVELOPMENT'){\n window.__STORYBOOK_SERVER_CHANNEL__ = channel;\n }","const importers = {\n './src/components/web-chat/WebChat.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/web-chat/WebChat.stories.ts'),\n './src/components/sub-menu/SubMenu.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/sub-menu/SubMenu.stories.ts'),\n './src/components/staff-payment/StaffPayment.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/staff-payment/StaffPayment.stories.ts'),\n './src/components/staff-comments/StaffComments.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/staff-comments/StaffComments.stories.ts'),\n './src/components/share-structure/ShareStructure.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/share-structure/ShareStructure.stories.ts'),\n './src/components/relationships-panel/RelationshipsPanel.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/relationships-panel/RelationshipsPanel.stories.ts'),\n './src/components/nature-of-business/NatureOfBusiness.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/nature-of-business/NatureOfBusiness.stories.ts'),\n './src/components/limited-restoration-panel/LimitedRestorationPanel.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/limited-restoration-panel/LimitedRestorationPanel.stories.ts'),\n './src/components/help-business-number/HelpBusinessNumber.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/help-business-number/HelpBusinessNumber.stories.ts'),\n './src/components/genesys-web-message/GenesysWebMessage.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/genesys-web-message/GenesysWebMessage.stories.ts'),\n './src/components/folio-number-input/FolioNumberInput.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/folio-number-input/FolioNumberInput.stories.ts'),\n './src/components/folio-number/FolioNumber.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/folio-number/FolioNumber.stories.ts'),\n './src/components/fee-summary/FeeSummary.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/fee-summary/FeeSummary.stories.ts'),\n './src/components/expandable-help/ExpandableHelp.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/expandable-help/ExpandableHelp.stories.ts'),\n './src/components/effective-date-time/EffectiveDateTime.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/effective-date-time/EffectiveDateTime.stories.ts'),\n './src/components/document-delivery/DocumentDelivery.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/document-delivery/DocumentDelivery.stories.ts'),\n './src/components/date-picker/DatePicker.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/date-picker/DatePicker.stories.ts'),\n './src/components/detail-comment/DetailComment.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/detail-comment/DetailComment.stories.ts'),\n './src/components/court-order-poa/CourtOrderPoa.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/court-order-poa/CourtOrderPoa.stories.ts'),\n './src/components/correct-name/CorrectName.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/correct-name/CorrectName.stories.ts'),\n './src/components/contact-info/ContactInfo.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/contact-info/ContactInfo.stories.ts'),\n './src/components/confirm-dialog/ConfirmDialog.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/confirm-dialog/ConfirmDialog.stories.ts'),\n './src/components/completing-party/CompletingParty.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/completing-party/CompletingParty.stories.ts'),\n './src/components/certify/Certify.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/certify/Certify.stories.ts'),\n './src/components/business-lookup/BusinessLookup.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/business-lookup/BusinessLookup.stories.ts'),\n './src/components/breadcrumb/Breadcrumb.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/breadcrumb/Breadcrumb.stories.ts'),\n './src/components/base-address/BaseAddress.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/base-address/BaseAddress.stories.ts'),\n './src/components/approval-type/ApprovalType.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/approval-type/ApprovalType.stories.ts'),\n './src/components/action-chip/ActionChip.stories.ts': async () => import('/@fs//home/severin/repos/bcrs-shared-components/src/components/action-chip/ActionChip.stories.ts')\n };\n\n export async function importFn(path) {\n return importers[path]();\n }","import { composeConfigs, PreviewWeb, ClientApi } from '@storybook/preview-api';\n import '/virtual:/@storybook/builder-vite/setup-addons.js';\n import { importFn } from '/virtual:/@storybook/builder-vite/storybook-stories.js';\n \n \n const getProjectAnnotations = async () => {\n const configs = await Promise.all([import('@storybook/vue/preview'),\nimport('@storybook/addon-essentials/backgrounds/preview'),\nimport('@storybook/addon-essentials/measure/preview'),\nimport('@storybook/addon-essentials/outline/preview'),\nimport('@storybook/addon-essentials/highlight/preview'),\nimport('/.storybook/preview.ts')])\n return composeConfigs(configs);\n }\n\n window.__STORYBOOK_PREVIEW__ = window.__STORYBOOK_PREVIEW__ || new PreviewWeb();\n \n window.__STORYBOOK_STORY_STORE__ = window.__STORYBOOK_STORY_STORE__ || window.__STORYBOOK_PREVIEW__.storyStore;\n window.__STORYBOOK_CLIENT_API__ = window.__STORYBOOK_CLIENT_API__ || new ClientApi({ storyStore: window.__STORYBOOK_PREVIEW__.storyStore });\n window.__STORYBOOK_PREVIEW__.initialize({ importFn, getProjectAnnotations });\n \n if (import.meta.hot) {\n import.meta.hot.accept('/virtual:/@storybook/builder-vite/storybook-stories.js', (newModule) => {\n // importFn has changed so we need to patch the new one in\n window.__STORYBOOK_PREVIEW__.onStoriesChanged({ importFn: newModule.importFn });\n });\n\n import.meta.hot.accept([\"@storybook/vue/preview\",\"@storybook/addon-essentials/backgrounds/preview\",\"@storybook/addon-essentials/measure/preview\",\"@storybook/addon-essentials/outline/preview\",\"@storybook/addon-essentials/highlight/preview\",\"/.storybook/preview.ts\"], () => {\n \n const getProjectAnnotations = async () => {\n const configs = await Promise.all([import('@storybook/vue/preview'),\nimport('@storybook/addon-essentials/backgrounds/preview'),\nimport('@storybook/addon-essentials/measure/preview'),\nimport('@storybook/addon-essentials/outline/preview'),\nimport('@storybook/addon-essentials/highlight/preview'),\nimport('/.storybook/preview.ts')])\n return composeConfigs(configs);\n }\n // getProjectAnnotations has changed so we need to patch the new one in\n window.__STORYBOOK_PREVIEW__.onGetProjectAnnotationsChanged({ getProjectAnnotations });\n });\n };"],"file":"assets/iframe-05aef934.js"} \ No newline at end of file diff --git a/docs/assets/iframe-05aef934.js b/docs/assets/iframe-f27af88f.js similarity index 64% rename from docs/assets/iframe-05aef934.js rename to docs/assets/iframe-f27af88f.js index 0b85b739..bce3d7c7 100644 --- a/docs/assets/iframe-05aef934.js +++ b/docs/assets/iframe-f27af88f.js @@ -1,2 +1,2 @@ -import"../sb-preview/runtime.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))m(r);new MutationObserver(r=>{for(const e of r)if(e.type==="childList")for(const o of e.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&m(o)}).observe(document,{childList:!0,subtree:!0});function _(r){const e={};return r.integrity&&(e.integrity=r.integrity),r.referrerPolicy&&(e.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?e.credentials="include":r.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function m(r){if(r.ep)return;r.ep=!0;const e=_(r);fetch(r.href,e)}})();const E="modulepreload",d=function(i,s){return new URL(i,s).href},p={},t=function(s,_,m){if(!_||_.length===0)return s();const r=document.getElementsByTagName("link");return Promise.all(_.map(e=>{if(e=d(e,m),e in p)return;p[e]=!0;const o=e.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!m)for(let c=r.length-1;c>=0;c--){const a=r[c];if(a.href===e&&(!o||a.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${l}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":E,o||(n.as="script",n.crossOrigin=""),n.href=e,document.head.appendChild(n),o)return new Promise((c,a)=>{n.addEventListener("load",c),n.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${e}`)))})})).then(()=>s()).catch(e=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=e,window.dispatchEvent(o),!o.defaultPrevented)throw e})},{createBrowserChannel:O}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,u=O({page:"preview"});f.setChannel(u);window.__STORYBOOK_ADDONS_CHANNEL__=u;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=u);const R={"./src/components/web-chat/WebChat.stories.ts":async()=>t(()=>import("./WebChat.stories-d3bf5ea8.js"),["./WebChat.stories-d3bf5ea8.js","./index-2b7fa976.js","./_commonjsHelpers-de833af9.js","./index-7a7a5d4b.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./vuetify-b9fb25b0.js","./WebChat.stories-b9e06158.css"],import.meta.url),"./src/components/sub-menu/SubMenu.stories.ts":async()=>t(()=>import("./SubMenu.stories-7d17f876.js"),["./SubMenu.stories-7d17f876.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js"],import.meta.url),"./src/components/staff-payment/StaffPayment.stories.ts":async()=>t(()=>import("./StaffPayment.stories-7b3249e6.js"),["./StaffPayment.stories-7b3249e6.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./FolioNumberInput-d9d8b85a.js","./StaffPayment.stories-61a9b602.css"],import.meta.url),"./src/components/staff-comments/StaffComments.stories.ts":async()=>t(()=>import("./StaffComments.stories-8ae81074.js"),["./StaffComments.stories-8ae81074.js","./index-2b7fa976.js","./_commonjsHelpers-de833af9.js","./index-7a7a5d4b.js","./_plugin-vue2_normalizer-b11a0120.js","./vue.esm-b1e57a2f.js","./validation-mixin-2ad1b825.js","./lodash-f6b38868.js","./StaffComments.stories-fdeb8571.css"],import.meta.url),"./src/components/share-structure/ShareStructure.stories.ts":async()=>t(()=>import("./ShareStructure.stories-f446bb48.js"),["./ShareStructure.stories-f446bb48.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./ActionChip-73b76eea.js","./ConfirmDialog-9091213f.js","./ConfirmDialog-7187d3c1.css","./ShareStructure.stories-d796e8da.css"],import.meta.url),"./src/components/relationships-panel/RelationshipsPanel.stories.ts":async()=>t(()=>import("./RelationshipsPanel.stories-eaed025e.js"),["./RelationshipsPanel.stories-eaed025e.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./RelationshipsPanel.stories-80e1df5d.css"],import.meta.url),"./src/components/nature-of-business/NatureOfBusiness.stories.ts":async()=>t(()=>import("./NatureOfBusiness.stories-b1b57b02.js"),["./NatureOfBusiness.stories-b1b57b02.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./NatureOfBusiness.stories-ed9e6148.css"],import.meta.url),"./src/components/limited-restoration-panel/LimitedRestorationPanel.stories.ts":async()=>t(()=>import("./LimitedRestorationPanel.stories-ce534c73.js"),["./LimitedRestorationPanel.stories-ce534c73.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./LimitedRestorationPanel.stories-f1d0a3d9.css"],import.meta.url),"./src/components/help-business-number/HelpBusinessNumber.stories.ts":async()=>t(()=>import("./HelpBusinessNumber.stories-81ef09cb.js"),["./HelpBusinessNumber.stories-81ef09cb.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./HelpBusinessNumber.stories-308ba15c.css"],import.meta.url),"./src/components/genesys-web-message/GenesysWebMessage.stories.ts":async()=>t(()=>import("./GenesysWebMessage.stories-030008ef.js"),["./GenesysWebMessage.stories-030008ef.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js"],import.meta.url),"./src/components/folio-number-input/FolioNumberInput.stories.ts":async()=>t(()=>import("./FolioNumberInput.stories-bd7c59aa.js"),["./FolioNumberInput.stories-bd7c59aa.js","./FolioNumberInput-d9d8b85a.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js"],import.meta.url),"./src/components/folio-number/FolioNumber.stories.ts":async()=>t(()=>import("./FolioNumber.stories-99b64f01.js"),["./FolioNumber.stories-99b64f01.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./FolioNumber.stories-f7c4b444.css"],import.meta.url),"./src/components/fee-summary/FeeSummary.stories.ts":async()=>t(()=>import("./FeeSummary.stories-84e7dc79.js"),["./FeeSummary.stories-84e7dc79.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./index-2b7fa976.js","./_commonjsHelpers-de833af9.js","./corp-type-module-8edd1173.js","./FeeSummary.stories-d056978e.css"],import.meta.url),"./src/components/expandable-help/ExpandableHelp.stories.ts":async()=>t(()=>import("./ExpandableHelp.stories-12517aed.js"),["./ExpandableHelp.stories-12517aed.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./ExpandableHelp.stories-92f45370.css"],import.meta.url),"./src/components/effective-date-time/EffectiveDateTime.stories.ts":async()=>t(()=>import("./EffectiveDateTime.stories-e7f8de6c.js"),["./EffectiveDateTime.stories-e7f8de6c.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./DatePicker-bfb2acbc.js","./validation-mixin-2ad1b825.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DatePicker-f276dadc.css","./vuetify-b9fb25b0.js","./EffectiveDateTime.stories-f8477516.css"],import.meta.url),"./src/components/document-delivery/DocumentDelivery.stories.ts":async()=>t(()=>import("./DocumentDelivery.stories-b922a043.js"),["./DocumentDelivery.stories-b922a043.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./DocumentDelivery.stories-bcb3c83f.css"],import.meta.url),"./src/components/date-picker/DatePicker.stories.ts":async()=>t(()=>import("./DatePicker.stories-31ff8cca.js"),["./DatePicker.stories-31ff8cca.js","./DatePicker-bfb2acbc.js","./_plugin-vue2_normalizer-b11a0120.js","./vue.esm-b1e57a2f.js","./Watch-62f8b699.js","./validation-mixin-2ad1b825.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DatePicker-f276dadc.css"],import.meta.url),"./src/components/detail-comment/DetailComment.stories.ts":async()=>t(()=>import("./DetailComment.stories-1b95fe08.js"),["./DetailComment.stories-1b95fe08.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DetailComment.stories-22188198.css"],import.meta.url),"./src/components/court-order-poa/CourtOrderPoa.stories.ts":async()=>t(()=>import("./CourtOrderPoa.stories-749ea04f.js"),["./CourtOrderPoa.stories-749ea04f.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./CourtOrderPoa.stories-c5e520bf.css"],import.meta.url),"./src/components/correct-name/CorrectName.stories.ts":async()=>t(()=>import("./CorrectName.stories-8dafa4c8.js"),["./CorrectName.stories-8dafa4c8.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./corp-type-module-8edd1173.js","./ConfirmDialog-9091213f.js","./ConfirmDialog-7187d3c1.css","./validation-mixin-2ad1b825.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./CorrectName.stories-eca55dfd.css"],import.meta.url),"./src/components/contact-info/ContactInfo.stories.ts":async()=>t(()=>import("./ContactInfo.stories-02f9bd7d.js"),["./ContactInfo.stories-02f9bd7d.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./_commonjsHelpers-de833af9.js","./ContactInfo.stories-da6e92e4.css"],import.meta.url),"./src/components/confirm-dialog/ConfirmDialog.stories.ts":async()=>t(()=>import("./ConfirmDialog.stories-ee4ff9a8.js"),["./ConfirmDialog.stories-ee4ff9a8.js","./vue.esm-b1e57a2f.js","./ConfirmDialog-9091213f.js","./_plugin-vue2_normalizer-b11a0120.js","./ConfirmDialog-7187d3c1.css"],import.meta.url),"./src/components/completing-party/CompletingParty.stories.ts":async()=>t(()=>import("./CompletingParty.stories-60c65c15.js"),["./CompletingParty.stories-60c65c15.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./BaseAddress-416de270.js","./params-036f571e.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./validation-mixin-2ad1b825.js","./BaseAddress-9fa63d05.css","./CompletingParty.stories-ff575d1a.css"],import.meta.url),"./src/components/certify/Certify.stories.ts":async()=>t(()=>import("./Certify.stories-676dc0cd.js"),["./Certify.stories-676dc0cd.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./Certify.stories-d21392a5.css"],import.meta.url),"./src/components/business-lookup/BusinessLookup.stories.ts":async()=>t(()=>import("./BusinessLookup.stories-a2dfe0b4.js"),["./BusinessLookup.stories-a2dfe0b4.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./BusinessLookup.stories-384b16ca.css"],import.meta.url),"./src/components/breadcrumb/Breadcrumb.stories.ts":async()=>t(()=>import("./Breadcrumb.stories-d1ab30fc.js"),["./Breadcrumb.stories-d1ab30fc.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Breadcrumb.stories-eb6b165e.css"],import.meta.url),"./src/components/base-address/BaseAddress.stories.ts":async()=>t(()=>import("./BaseAddress.stories-d4807c35.js"),["./BaseAddress.stories-d4807c35.js","./BaseAddress-416de270.js","./vue.esm-b1e57a2f.js","./params-036f571e.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./validation-mixin-2ad1b825.js","./BaseAddress-9fa63d05.css","./vuetify-b9fb25b0.js"],import.meta.url),"./src/components/approval-type/ApprovalType.stories.ts":async()=>t(()=>import("./ApprovalType.stories-48b70947.js"),["./ApprovalType.stories-48b70947.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./DatePicker-bfb2acbc.js","./Watch-62f8b699.js","./validation-mixin-2ad1b825.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DatePicker-f276dadc.css","./ApprovalType.stories-11cee397.css"],import.meta.url),"./src/components/action-chip/ActionChip.stories.ts":async()=>t(()=>import("./ActionChip.stories-87d18713.js"),["./ActionChip.stories-87d18713.js","./ActionChip-73b76eea.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./vuetify-b9fb25b0.js","./_commonjsHelpers-de833af9.js"],import.meta.url)};async function P(i){return R[i]()}const{composeConfigs:y,PreviewWeb:T,ClientApi:L}=__STORYBOOK_MODULE_PREVIEW_API__,v=async()=>{const i=await Promise.all([t(()=>import("./config-5bd1e7a9.js"),["./config-5bd1e7a9.js","./index-356e4a49.js","./vue.esm-b1e57a2f.js","./_commonjsHelpers-de833af9.js"],import.meta.url),t(()=>import("./preview-15309724.js"),["./preview-15309724.js","./index-356e4a49.js"],import.meta.url),t(()=>import("./preview-2059b184.js"),[],import.meta.url),t(()=>import("./preview-b8d6c68d.js"),["./preview-b8d6c68d.js","./index-356e4a49.js"],import.meta.url),t(()=>import("./preview-b3c37142.js"),[],import.meta.url),t(()=>import("./preview-c3f1b445.js"),["./preview-c3f1b445.js","./_commonjsHelpers-de833af9.js","./vue.esm-b1e57a2f.js","./params-036f571e.js","./vuetify-b9fb25b0.js","./preview-b69fa200.css"],import.meta.url)]);return y(i)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new T;window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;window.__STORYBOOK_CLIENT_API__=window.__STORYBOOK_CLIENT_API__||new L({storyStore:window.__STORYBOOK_PREVIEW__.storyStore});window.__STORYBOOK_PREVIEW__.initialize({importFn:P,getProjectAnnotations:v}); -//# sourceMappingURL=iframe-05aef934.js.map +import"../sb-preview/runtime.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))m(r);new MutationObserver(r=>{for(const e of r)if(e.type==="childList")for(const o of e.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&m(o)}).observe(document,{childList:!0,subtree:!0});function _(r){const e={};return r.integrity&&(e.integrity=r.integrity),r.referrerPolicy&&(e.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?e.credentials="include":r.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function m(r){if(r.ep)return;r.ep=!0;const e=_(r);fetch(r.href,e)}})();const E="modulepreload",d=function(i,s){return new URL(i,s).href},p={},t=function(s,_,m){if(!_||_.length===0)return s();const r=document.getElementsByTagName("link");return Promise.all(_.map(e=>{if(e=d(e,m),e in p)return;p[e]=!0;const o=e.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!m)for(let c=r.length-1;c>=0;c--){const a=r[c];if(a.href===e&&(!o||a.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${l}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":E,o||(n.as="script",n.crossOrigin=""),n.href=e,document.head.appendChild(n),o)return new Promise((c,a)=>{n.addEventListener("load",c),n.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${e}`)))})})).then(()=>s()).catch(e=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=e,window.dispatchEvent(o),!o.defaultPrevented)throw e})},{createBrowserChannel:O}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,u=O({page:"preview"});f.setChannel(u);window.__STORYBOOK_ADDONS_CHANNEL__=u;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=u);const R={"./src/components/web-chat/WebChat.stories.ts":async()=>t(()=>import("./WebChat.stories-b3f700e1.js"),["./WebChat.stories-b3f700e1.js","./index-2b7fa976.js","./_commonjsHelpers-de833af9.js","./index-7a7a5d4b.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./vuetify-b9fb25b0.js","./WebChat.stories-b9e06158.css"],import.meta.url),"./src/components/sub-menu/SubMenu.stories.ts":async()=>t(()=>import("./SubMenu.stories-acb3c652.js"),["./SubMenu.stories-acb3c652.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js"],import.meta.url),"./src/components/staff-payment/StaffPayment.stories.ts":async()=>t(()=>import("./StaffPayment.stories-f29a0154.js"),["./StaffPayment.stories-f29a0154.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./FolioNumberInput-cf343253.js","./StaffPayment.stories-61a9b602.css"],import.meta.url),"./src/components/staff-comments/StaffComments.stories.ts":async()=>t(()=>import("./StaffComments.stories-7a3e0f39.js"),["./StaffComments.stories-7a3e0f39.js","./index-2b7fa976.js","./_commonjsHelpers-de833af9.js","./index-7a7a5d4b.js","./_plugin-vue2_normalizer-b11a0120.js","./vue.esm-b1e57a2f.js","./validation-mixin-e5d1d708.js","./lodash-f6b38868.js","./StaffComments.stories-fdeb8571.css"],import.meta.url),"./src/components/share-structure/ShareStructure.stories.ts":async()=>t(()=>import("./ShareStructure.stories-1b54f27e.js"),["./ShareStructure.stories-1b54f27e.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./ActionChip-5afeb099.js","./ConfirmDialog-428577e9.js","./ConfirmDialog-7187d3c1.css","./ShareStructure.stories-d796e8da.css"],import.meta.url),"./src/components/relationships-panel/RelationshipsPanel.stories.ts":async()=>t(()=>import("./RelationshipsPanel.stories-bad507aa.js"),["./RelationshipsPanel.stories-bad507aa.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./RelationshipsPanel.stories-80e1df5d.css"],import.meta.url),"./src/components/nature-of-business/NatureOfBusiness.stories.ts":async()=>t(()=>import("./NatureOfBusiness.stories-0d7dfae4.js"),["./NatureOfBusiness.stories-0d7dfae4.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./NatureOfBusiness.stories-ed9e6148.css"],import.meta.url),"./src/components/limited-restoration-panel/LimitedRestorationPanel.stories.ts":async()=>t(()=>import("./LimitedRestorationPanel.stories-9177da6e.js"),["./LimitedRestorationPanel.stories-9177da6e.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./LimitedRestorationPanel.stories-f1d0a3d9.css"],import.meta.url),"./src/components/help-business-number/HelpBusinessNumber.stories.ts":async()=>t(()=>import("./HelpBusinessNumber.stories-5c863aaa.js"),["./HelpBusinessNumber.stories-5c863aaa.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./HelpBusinessNumber.stories-308ba15c.css"],import.meta.url),"./src/components/genesys-web-message/GenesysWebMessage.stories.ts":async()=>t(()=>import("./GenesysWebMessage.stories-31eadc0d.js"),["./GenesysWebMessage.stories-31eadc0d.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js"],import.meta.url),"./src/components/folio-number-input/FolioNumberInput.stories.ts":async()=>t(()=>import("./FolioNumberInput.stories-a41ce4c0.js"),["./FolioNumberInput.stories-a41ce4c0.js","./FolioNumberInput-cf343253.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js"],import.meta.url),"./src/components/folio-number/FolioNumber.stories.ts":async()=>t(()=>import("./FolioNumber.stories-9ad4d3a6.js"),["./FolioNumber.stories-9ad4d3a6.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./FolioNumber.stories-f7c4b444.css"],import.meta.url),"./src/components/fee-summary/FeeSummary.stories.ts":async()=>t(()=>import("./FeeSummary.stories-e90c5128.js"),["./FeeSummary.stories-e90c5128.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./index-2b7fa976.js","./_commonjsHelpers-de833af9.js","./corp-type-module-8edd1173.js","./FeeSummary.stories-d056978e.css"],import.meta.url),"./src/components/expandable-help/ExpandableHelp.stories.ts":async()=>t(()=>import("./ExpandableHelp.stories-80e68528.js"),["./ExpandableHelp.stories-80e68528.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./ExpandableHelp.stories-34261a19.css"],import.meta.url),"./src/components/effective-date-time/EffectiveDateTime.stories.ts":async()=>t(()=>import("./EffectiveDateTime.stories-71eb1d6f.js"),["./EffectiveDateTime.stories-71eb1d6f.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./DatePicker-6653e1e3.js","./validation-mixin-e5d1d708.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DatePicker-f276dadc.css","./vuetify-b9fb25b0.js","./EffectiveDateTime.stories-f8477516.css"],import.meta.url),"./src/components/document-delivery/DocumentDelivery.stories.ts":async()=>t(()=>import("./DocumentDelivery.stories-b5a62892.js"),["./DocumentDelivery.stories-b5a62892.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./DocumentDelivery.stories-bcb3c83f.css"],import.meta.url),"./src/components/detail-comment/DetailComment.stories.ts":async()=>t(()=>import("./DetailComment.stories-e5078357.js"),["./DetailComment.stories-e5078357.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DetailComment.stories-22188198.css"],import.meta.url),"./src/components/date-picker/DatePicker.stories.ts":async()=>t(()=>import("./DatePicker.stories-f669cf41.js"),["./DatePicker.stories-f669cf41.js","./DatePicker-6653e1e3.js","./_plugin-vue2_normalizer-b11a0120.js","./vue.esm-b1e57a2f.js","./Watch-62f8b699.js","./validation-mixin-e5d1d708.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DatePicker-f276dadc.css"],import.meta.url),"./src/components/court-order-poa/CourtOrderPoa.stories.ts":async()=>t(()=>import("./CourtOrderPoa.stories-0de39944.js"),["./CourtOrderPoa.stories-0de39944.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./CourtOrderPoa.stories-c5e520bf.css"],import.meta.url),"./src/components/correct-name/CorrectName.stories.ts":async()=>t(()=>import("./CorrectName.stories-12fcb717.js"),["./CorrectName.stories-12fcb717.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./corp-type-module-8edd1173.js","./ConfirmDialog-428577e9.js","./ConfirmDialog-7187d3c1.css","./validation-mixin-e5d1d708.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./CorrectName.stories-eca55dfd.css"],import.meta.url),"./src/components/contact-info/ContactInfo.stories.ts":async()=>t(()=>import("./ContactInfo.stories-6bced492.js"),["./ContactInfo.stories-6bced492.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./_commonjsHelpers-de833af9.js","./ContactInfo.stories-da6e92e4.css"],import.meta.url),"./src/components/confirm-dialog/ConfirmDialog.stories.ts":async()=>t(()=>import("./ConfirmDialog.stories-55a8a585.js"),["./ConfirmDialog.stories-55a8a585.js","./vue.esm-b1e57a2f.js","./ConfirmDialog-428577e9.js","./_plugin-vue2_normalizer-b11a0120.js","./ConfirmDialog-7187d3c1.css"],import.meta.url),"./src/components/completing-party/CompletingParty.stories.ts":async()=>t(()=>import("./CompletingParty.stories-9e4bf3f6.js"),["./CompletingParty.stories-9e4bf3f6.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./BaseAddress-53c7b609.js","./params-036f571e.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./validation-mixin-e5d1d708.js","./BaseAddress-619d466e.css","./CompletingParty.stories-ff575d1a.css"],import.meta.url),"./src/components/certify/Certify.stories.ts":async()=>t(()=>import("./Certify.stories-83bec0e6.js"),["./Certify.stories-83bec0e6.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./Certify.stories-d21392a5.css"],import.meta.url),"./src/components/business-lookup/BusinessLookup.stories.ts":async()=>t(()=>import("./BusinessLookup.stories-2a9df937.js"),["./BusinessLookup.stories-2a9df937.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./BusinessLookup.stories-384b16ca.css"],import.meta.url),"./src/components/breadcrumb/Breadcrumb.stories.ts":async()=>t(()=>import("./Breadcrumb.stories-9e60a27e.js"),["./Breadcrumb.stories-9e60a27e.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./Breadcrumb.stories-eb6b165e.css"],import.meta.url),"./src/components/base-address/BaseAddress.stories.ts":async()=>t(()=>import("./BaseAddress.stories-c8be0a4b.js"),["./BaseAddress.stories-c8be0a4b.js","./BaseAddress-53c7b609.js","./vue.esm-b1e57a2f.js","./params-036f571e.js","./_plugin-vue2_normalizer-b11a0120.js","./Watch-62f8b699.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./validation-mixin-e5d1d708.js","./BaseAddress-619d466e.css","./vuetify-b9fb25b0.js"],import.meta.url),"./src/components/approval-type/ApprovalType.stories.ts":async()=>t(()=>import("./ApprovalType.stories-d422646b.js"),["./ApprovalType.stories-d422646b.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./DatePicker-6653e1e3.js","./Watch-62f8b699.js","./validation-mixin-e5d1d708.js","./lodash-f6b38868.js","./_commonjsHelpers-de833af9.js","./DatePicker-f276dadc.css","./ApprovalType.stories-7ebc78bd.css"],import.meta.url),"./src/components/action-chip/ActionChip.stories.ts":async()=>t(()=>import("./ActionChip.stories-1a32d606.js"),["./ActionChip.stories-1a32d606.js","./ActionChip-5afeb099.js","./vue.esm-b1e57a2f.js","./_plugin-vue2_normalizer-b11a0120.js","./vuetify-b9fb25b0.js","./_commonjsHelpers-de833af9.js"],import.meta.url)};async function P(i){return R[i]()}const{composeConfigs:y,PreviewWeb:T,ClientApi:L}=__STORYBOOK_MODULE_PREVIEW_API__,v=async()=>{const i=await Promise.all([t(()=>import("./config-5bd1e7a9.js"),["./config-5bd1e7a9.js","./index-356e4a49.js","./vue.esm-b1e57a2f.js","./_commonjsHelpers-de833af9.js"],import.meta.url),t(()=>import("./preview-15309724.js"),["./preview-15309724.js","./index-356e4a49.js"],import.meta.url),t(()=>import("./preview-2059b184.js"),[],import.meta.url),t(()=>import("./preview-b8d6c68d.js"),["./preview-b8d6c68d.js","./index-356e4a49.js"],import.meta.url),t(()=>import("./preview-b3c37142.js"),[],import.meta.url),t(()=>import("./preview-c3f1b445.js"),["./preview-c3f1b445.js","./_commonjsHelpers-de833af9.js","./vue.esm-b1e57a2f.js","./params-036f571e.js","./vuetify-b9fb25b0.js","./preview-b69fa200.css"],import.meta.url)]);return y(i)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new T;window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;window.__STORYBOOK_CLIENT_API__=window.__STORYBOOK_CLIENT_API__||new L({storyStore:window.__STORYBOOK_PREVIEW__.storyStore});window.__STORYBOOK_PREVIEW__.initialize({importFn:P,getProjectAnnotations:v}); +//# sourceMappingURL=iframe-f27af88f.js.map diff --git a/docs/assets/iframe-f27af88f.js.map b/docs/assets/iframe-f27af88f.js.map new file mode 100644 index 00000000..9edcb2db --- /dev/null +++ b/docs/assets/iframe-f27af88f.js.map @@ -0,0 +1 @@ +{"version":3,"mappings":"olDAAA,sBAAAA,CAAA,gCACI,QAAAC,CAAA,mCAEMC,EAAUF,EAAqB,CAAE,KAAM,SAAW,GACxDC,EAAO,WAAWC,CAAO,EACzB,OAAO,6BAA+BA,EAElC,OAAO,cAAgB,gBACzB,OAAO,6BAA+BA,GCR5C,MAAMC,EAAY,CACV,+CAAgD,SAAWC,EAAA,IAAC,OAAO,+BAA+F,2PACxK,+CAAgD,SAAWA,EAAA,IAAC,OAAO,+BAA+F,qHAClK,yDAA0D,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A0D,SAAWA,EAAA,IAAC,OAAO,oCAAyG,sUACtL,qDAAsD,SAAWA,EAAA,IAAC,OAAO,kCAAqG,EAAC,yMACjL,EAEW,eAAeC,EAASC,EAAM,CACjC,OAAOH,EAAUG,CAAI,GAC7B,CClCA,qBAAAC,EAAA,WAAAC,EAAA,UAAAC,CAAA,mCAKQC,EAAwB,SAAY,CACxC,MAAMC,EAAU,MAAM,QAAQ,IAAI,CAACP,EAAA,WAAO,sBAAwB,2HACtEA,EAAA,WAAO,uBAAiD,mEACxDA,EAAA,WAAO,uBAA6C,sBACpDA,EAAA,WAAO,uBAA6C,mEACpDA,EAAA,WAAO,uBAA+C,sBACtDA,EAAA,WAAO,uBAAwB,EAAC,4KAAC,EAC7B,OAAOG,EAAeI,CAAO,CAC9B,EAEC,OAAO,sBAAwB,OAAO,uBAAyB,IAAIH,EAEnE,OAAO,0BAA4B,OAAO,2BAA6B,OAAO,sBAAsB,WACpG,OAAO,yBAA2B,OAAO,0BAA4B,IAAIC,EAAU,CAAE,WAAY,OAAO,sBAAsB,UAAY,GAC1I,OAAO,sBAAsB,WAAW,CAAE,SAAAJ,EAAU,sBAAAK,CAAqB,CAAE","names":["createBrowserChannel","addons","channel","importers","__vitePreload","importFn","path","composeConfigs","PreviewWeb","ClientApi","getProjectAnnotations","configs"],"sources":["../../../../../../virtual:/@storybook/builder-vite/setup-addons.js","../../../../../../virtual:/@storybook/builder-vite/storybook-stories.js","../../../../../../virtual:/@storybook/builder-vite/vite-app.js"],"sourcesContent":["import { createBrowserChannel } from '@storybook/channels';\n import { addons } from '@storybook/preview-api';\n\n const channel = createBrowserChannel({ page: 'preview' });\n addons.setChannel(channel);\n window.__STORYBOOK_ADDONS_CHANNEL__ = channel;\n \n if (window.CONFIG_TYPE === 'DEVELOPMENT'){\n window.__STORYBOOK_SERVER_CHANNEL__ = channel;\n }","const importers = {\n './src/components/web-chat/WebChat.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/web-chat/WebChat.stories.ts'),\n './src/components/sub-menu/SubMenu.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/sub-menu/SubMenu.stories.ts'),\n './src/components/staff-payment/StaffPayment.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/staff-payment/StaffPayment.stories.ts'),\n './src/components/staff-comments/StaffComments.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/staff-comments/StaffComments.stories.ts'),\n './src/components/share-structure/ShareStructure.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/share-structure/ShareStructure.stories.ts'),\n './src/components/relationships-panel/RelationshipsPanel.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/relationships-panel/RelationshipsPanel.stories.ts'),\n './src/components/nature-of-business/NatureOfBusiness.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/nature-of-business/NatureOfBusiness.stories.ts'),\n './src/components/limited-restoration-panel/LimitedRestorationPanel.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/limited-restoration-panel/LimitedRestorationPanel.stories.ts'),\n './src/components/help-business-number/HelpBusinessNumber.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/help-business-number/HelpBusinessNumber.stories.ts'),\n './src/components/genesys-web-message/GenesysWebMessage.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/genesys-web-message/GenesysWebMessage.stories.ts'),\n './src/components/folio-number-input/FolioNumberInput.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/folio-number-input/FolioNumberInput.stories.ts'),\n './src/components/folio-number/FolioNumber.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/folio-number/FolioNumber.stories.ts'),\n './src/components/fee-summary/FeeSummary.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/fee-summary/FeeSummary.stories.ts'),\n './src/components/expandable-help/ExpandableHelp.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/expandable-help/ExpandableHelp.stories.ts'),\n './src/components/effective-date-time/EffectiveDateTime.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/effective-date-time/EffectiveDateTime.stories.ts'),\n './src/components/document-delivery/DocumentDelivery.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/document-delivery/DocumentDelivery.stories.ts'),\n './src/components/detail-comment/DetailComment.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/detail-comment/DetailComment.stories.ts'),\n './src/components/date-picker/DatePicker.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/date-picker/DatePicker.stories.ts'),\n './src/components/court-order-poa/CourtOrderPoa.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/court-order-poa/CourtOrderPoa.stories.ts'),\n './src/components/correct-name/CorrectName.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/correct-name/CorrectName.stories.ts'),\n './src/components/contact-info/ContactInfo.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/contact-info/ContactInfo.stories.ts'),\n './src/components/confirm-dialog/ConfirmDialog.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/confirm-dialog/ConfirmDialog.stories.ts'),\n './src/components/completing-party/CompletingParty.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/completing-party/CompletingParty.stories.ts'),\n './src/components/certify/Certify.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/certify/Certify.stories.ts'),\n './src/components/business-lookup/BusinessLookup.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/business-lookup/BusinessLookup.stories.ts'),\n './src/components/breadcrumb/Breadcrumb.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/breadcrumb/Breadcrumb.stories.ts'),\n './src/components/base-address/BaseAddress.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/base-address/BaseAddress.stories.ts'),\n './src/components/approval-type/ApprovalType.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/approval-type/ApprovalType.stories.ts'),\n './src/components/action-chip/ActionChip.stories.ts': async () => import('/@fs//home/kdeodhar/gitRepo/bcrs-shared-components/src/components/action-chip/ActionChip.stories.ts')\n };\n\n export async function importFn(path) {\n return importers[path]();\n }","import { composeConfigs, PreviewWeb, ClientApi } from '@storybook/preview-api';\n import '/virtual:/@storybook/builder-vite/setup-addons.js';\n import { importFn } from '/virtual:/@storybook/builder-vite/storybook-stories.js';\n \n \n const getProjectAnnotations = async () => {\n const configs = await Promise.all([import('@storybook/vue/preview'),\nimport('@storybook/addon-essentials/backgrounds/preview'),\nimport('@storybook/addon-essentials/measure/preview'),\nimport('@storybook/addon-essentials/outline/preview'),\nimport('@storybook/addon-essentials/highlight/preview'),\nimport('/.storybook/preview.ts')])\n return composeConfigs(configs);\n }\n\n window.__STORYBOOK_PREVIEW__ = window.__STORYBOOK_PREVIEW__ || new PreviewWeb();\n \n window.__STORYBOOK_STORY_STORE__ = window.__STORYBOOK_STORY_STORE__ || window.__STORYBOOK_PREVIEW__.storyStore;\n window.__STORYBOOK_CLIENT_API__ = window.__STORYBOOK_CLIENT_API__ || new ClientApi({ storyStore: window.__STORYBOOK_PREVIEW__.storyStore });\n window.__STORYBOOK_PREVIEW__.initialize({ importFn, getProjectAnnotations });\n \n if (import.meta.hot) {\n import.meta.hot.accept('/virtual:/@storybook/builder-vite/storybook-stories.js', (newModule) => {\n // importFn has changed so we need to patch the new one in\n window.__STORYBOOK_PREVIEW__.onStoriesChanged({ importFn: newModule.importFn });\n });\n\n import.meta.hot.accept([\"@storybook/vue/preview\",\"@storybook/addon-essentials/backgrounds/preview\",\"@storybook/addon-essentials/measure/preview\",\"@storybook/addon-essentials/outline/preview\",\"@storybook/addon-essentials/highlight/preview\",\"/.storybook/preview.ts\"], () => {\n \n const getProjectAnnotations = async () => {\n const configs = await Promise.all([import('@storybook/vue/preview'),\nimport('@storybook/addon-essentials/backgrounds/preview'),\nimport('@storybook/addon-essentials/measure/preview'),\nimport('@storybook/addon-essentials/outline/preview'),\nimport('@storybook/addon-essentials/highlight/preview'),\nimport('/.storybook/preview.ts')])\n return composeConfigs(configs);\n }\n // getProjectAnnotations has changed so we need to patch the new one in\n window.__STORYBOOK_PREVIEW__.onGetProjectAnnotationsChanged({ getProjectAnnotations });\n });\n };"],"file":"assets/iframe-f27af88f.js"} \ No newline at end of file diff --git a/docs/assets/validation-mixin-2ad1b825.js b/docs/assets/validation-mixin-e5d1d708.js similarity index 96% rename from docs/assets/validation-mixin-2ad1b825.js rename to docs/assets/validation-mixin-e5d1d708.js index 864a9ccf..790f2398 100644 --- a/docs/assets/validation-mixin-2ad1b825.js +++ b/docs/assets/validation-mixin-e5d1d708.js @@ -1,3 +1,3 @@ import{V as m}from"./vue.esm-b1e57a2f.js";import{C as g}from"./_plugin-vue2_normalizer-b11a0120.js";import{l as h}from"./lodash-f6b38868.js";var i=(n=>(n.AMALGAMATE="AML",n.ASSUMED="ASSUMED",n.CHANGE_NAME="CHG",n.CONVERSION="CNV",n.DBA="DBA",n.MOVE="MVE",n.NEW_BUSINESS="NEW",n.RESTORE="REH",n.RENEW="REN",n.RESTORATION="REST",n.RESUBMIT="RESUBMIT",n.INFO="INFO",n))(i||{}),u=(n=>(n.APPROVED="APPROVED",n.CANCELLED="CANCELLED",n.COMPLETED="COMPLETED",n.CONDITIONAL="CONDITIONAL",n.CONDITION="CONDITION",n.CONSUMED="CONSUMED",n.DRAFT="DRAFT",n.EXPIRED="EXPIRED",n.HISTORICAL="HISTORICAL",n.HOLD="HOLD",n.INPROGRESS="INPROGRESS",n.PENDING_PAYMENT="PENDING_PAYMENT",n.REFUND_REQUESTED="REFUND_REQUESTED",n.REJECTED="REJECTED",n.NRO_UPDATING="NRO_UPDATING",n.NOT_APPROVED="NOT_APPROVED",n.NOT_FOUND="NOT_FOUND",n.NEED_CONSENT="NEED_CONSENT",n.INVALID="INVALID",n))(u||{}),C=Object.defineProperty,E=Object.getOwnPropertyDescriptor,S=(n,a,e,o)=>{for(var r=o>1?void 0:o?E(a,e):a,t=n.length-1,c;t>=0;t--)(c=n[t])&&(r=(o?c(a,e,r):c(r))||r);return o&&r&&C(a,e,r),r};let l=class extends m{createUtcDate(n,a,e,o=0,r=0){const t=new Date(Date.UTC(n,a,e,o,r)),c=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),y=new Date(t.toLocaleString("en-US",{timeZone:"America/Vancouver"})),s=c.getTime()-y.getTime();return t.setTime(t.getTime()+s),t}apiToDate(n){return n?(n=n.slice(0,19)+"Z",new Date(n)):null}yyyyMmDdToDate(n){if(!n||n.length!==10)return null;const a=n.split("-"),e=+a[0],o=+a[1],r=+a[2];return this.createUtcDate(e,o-1,r)}dateToYyyyMmDd(n){if(!h.isDate(n)||isNaN(n.getTime()))return null;const a=n.toLocaleDateString("en-US",{timeZone:"America/Vancouver",month:"numeric",day:"numeric",year:"numeric"}),[e,o,r]=a.split("/");return`${r}-${e.padStart(2,"0")}-${o.padStart(2,"0")}`}dateToPacificDate(n,a=!1,e=!1){if(!h.isDate(n)||isNaN(n.getTime()))return null;let o=n.toLocaleDateString("en-US",{timeZone:"America/Vancouver",weekday:e?"long":void 0,month:a?"long":"short",day:"numeric",year:"numeric"});return o=o.replace(".",""),o}yyyyMmDdToPacificDate(n,a=!1,e=!1){return this.dateToPacificDate(this.yyyyMmDdToDate(n),a,e)}dateToPacificTime(n){if(!h.isDate(n)||isNaN(n.getTime()))return null;let a=n.toLocaleTimeString("en-US",{timeZone:"America/Vancouver",hour:"numeric",minute:"2-digit",hour12:!0});return a=a.replace("AM","am").replace("PM","pm"),a}apiToPacificDateTime(n){if(!n)return null;const a=this.apiToDate(n),e=this.dateToPacificDate(a,!0),o=this.dateToPacificTime(a);return`${e} at ${o} Pacific time`}addMonthsToDate(n,a){a||(a="2023-01-01");const e=this.yyyyMmDdToDate(a);return e.setMonth(e.getMonth()+n),this.dateToYyyyMmDd(e)}subtractDates(n,a){n||(n="2023-01-01"),a||(a=this.addMonthsToDate(24,n));const e=this.yyyyMmDdToDate(a),o=this.yyyyMmDdToDate(n),r=e.getMonth()-o.getMonth(),t=12*(e.getFullYear()-o.getFullYear());let c=r+t;return e.getDate(){for(var r=o>1?void 0:o?A(a,e):a,t=n.length-1,c;t>=0;t--)(c=n[t])&&(r=(o?c(a,e,r):c(r))||r);return o&&r&&N(a,e,r),r};let d=class extends m{validateNameRequest(n,a,e,o,r){var y,s;const t=this.isNrInvalid(n);if(t)throw new Error(`Invalid Name Request: ${t}`);if(n.request_action_cd!==a)throw new Error("Incorrect Request Action Code");if(e&&n.corpNum!==e)throw new Error("Incorrect Business ID");if(r&&((y=n.applicants)==null?void 0:y.emailAddress)!==r)throw new Error("Incorrect Email Address");if(o&&((s=n.applicants)==null?void 0:s.phoneNumber)!==o)throw new Error("Incorrect Phone Number");const c=this.getNrState(n);if(c!==u.APPROVED&&c!==u.CONDITIONAL)throw new Error(`Invalid Name Request state: ${c}`);return n}isNrInvalid(n){return n?n.applicants?n.expirationDate?n.legalType?this.getNrApprovedName(n)?n.nrNum?n.requestTypeCd?n.request_action_cd?n.state?null:"Invalid NR state":"Invalid NR request action code":"Invalid NR request type code":"Invalid NR number":"Invalid NR approved name":"Invalid NR legal type":`Invalid NR expiration date -(NR may still be processing)`:"Invalid NR applicants":"Invalid NR object"}getNrState(n){return n?n.state===u.CONDITIONAL&&n.consentFlag!==null&&n.consentFlag!=="R"&&n.consentFlag!=="N"?u.NEED_CONSENT:[u.APPROVED,u.CONDITIONAL,u.EXPIRED,u.CONSUMED].includes(n.state)?n.state:u.NOT_APPROVED:null}getNrApprovedName(n){var a,e;return((a=n==null?void 0:n.names)==null?void 0:a.length)>0?(e=n.names.find(o=>[u.APPROVED,u.CONDITION].includes(o.state)))==null?void 0:e.name:null}getNrRequestDesc(n){switch(n){case i.NEW_BUSINESS:return"New Business";case i.CHANGE_NAME:return"Change of Name";case i.CONVERSION:return"Conversion";case i.RESTORE:return"Restoration"}return null}};d=D([g({})],d);const I=[{code:"AD",name:"Andorra"},{code:"AE",name:"United Arab Emirates"},{code:"AF",name:"Afghanistan"},{code:"AG",name:"Antigua and Barbuda"},{code:"AI",name:"Anguilla"},{code:"AL",name:"Albania"},{code:"AM",name:"Armenia"},{code:"AO",name:"Angola"},{code:"AQ",name:"Antarctica"},{code:"AR",name:"Argentina"},{code:"AS",name:"American Samoa"},{code:"AT",name:"Austria"},{code:"AU",name:"Australia"},{code:"AW",name:"Aruba"},{code:"AX",name:"Åland Islands"},{code:"AZ",name:"Azerbaijan"},{code:"BA",name:"Bosnia and Herzegovina"},{code:"BB",name:"Barbados"},{code:"BD",name:"Bangladesh"},{code:"BE",name:"Belgium"},{code:"BF",name:"Burkina Faso"},{code:"BG",name:"Bulgaria"},{code:"BH",name:"Bahrain"},{code:"BI",name:"Burundi"},{code:"BJ",name:"Benin"},{code:"BL",name:"Saint Barthélemy"},{code:"BM",name:"Bermuda"},{code:"BN",name:"Brunei Darussalam"},{code:"BO",name:"Bolivia, Plurinational State of"},{code:"BQ",name:"Bonaire, Sint Eustatius and Saba"},{code:"BR",name:"Brazil"},{code:"BS",name:"Bahamas"},{code:"BT",name:"Bhutan"},{code:"BV",name:"Bouvet Island"},{code:"BW",name:"Botswana"},{code:"BY",name:"Belarus"},{code:"BZ",name:"Belize"},{code:"CA",name:"Canada"},{code:"CC",name:"Cocos (Keeling) Islands"},{code:"CD",name:"Congo, Democratic Republic of the"},{code:"CF",name:"Central African Republic"},{code:"CG",name:"Congo"},{code:"CH",name:"Switzerland"},{code:"CI",name:"Côte d'Ivoire"},{code:"CK",name:"Cook Islands"},{code:"CL",name:"Chile"},{code:"CM",name:"Cameroon"},{code:"CN",name:"China"},{code:"CO",name:"Colombia"},{code:"CR",name:"Costa Rica"},{code:"CU",name:"Cuba"},{code:"CV",name:"Cabo Verde"},{code:"CW",name:"Curaçao"},{code:"CX",name:"Christmas Island"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czechia"},{code:"DE",name:"Germany"},{code:"DJ",name:"Djibouti"},{code:"DK",name:"Denmark"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"DZ",name:"Algeria"},{code:"EC",name:"Ecuador"},{code:"EE",name:"Estonia"},{code:"EG",name:"Egypt"},{code:"EH",name:"Western Sahara"},{code:"ER",name:"Eritrea"},{code:"ES",name:"Spain"},{code:"ET",name:"Ethiopia"},{code:"FI",name:"Finland"},{code:"FJ",name:"Fiji"},{code:"FK",name:"Falkland Islands (Malvinas)"},{code:"FM",name:"Micronesia, Federated States of"},{code:"FO",name:"Faroe Islands"},{code:"FR",name:"France"},{code:"GA",name:"Gabon"},{code:"GB",name:"United Kingdom of Great Britain and Northern Ireland"},{code:"GD",name:"Grenada"},{code:"GE",name:"Georgia"},{code:"GF",name:"French Guiana"},{code:"GG",name:"Guernsey"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GL",name:"Greenland"},{code:"GM",name:"Gambia"},{code:"GN",name:"Guinea"},{code:"GP",name:"Guadeloupe"},{code:"GQ",name:"Equatorial Guinea"},{code:"GR",name:"Greece"},{code:"GS",name:"South Georgia and the South Sandwich Islands"},{code:"GT",name:"Guatemala"},{code:"GU",name:"Guam"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HK",name:"Hong Kong"},{code:"HM",name:"Heard Island and McDonald Islands"},{code:"HN",name:"Honduras"},{code:"HR",name:"Croatia"},{code:"HT",name:"Haiti"},{code:"HU",name:"Hungary"},{code:"ID",name:"Indonesia"},{code:"IE",name:"Ireland"},{code:"IL",name:"Israel"},{code:"IM",name:"Isle of Man"},{code:"IN",name:"India"},{code:"IO",name:"British Indian Ocean Territory"},{code:"IQ",name:"Iraq"},{code:"IR",name:"Iran, Islamic Republic of"},{code:"IS",name:"Iceland"},{code:"IT",name:"Italy"},{code:"JE",name:"Jersey"},{code:"JM",name:"Jamaica"},{code:"JO",name:"Jordan"},{code:"JP",name:"Japan"},{code:"KE",name:"Kenya"},{code:"KG",name:"Kyrgyzstan"},{code:"KH",name:"Cambodia"},{code:"KI",name:"Kiribati"},{code:"KM",name:"Comoros"},{code:"KN",name:"Saint Kitts and Nevis"},{code:"KP",name:"Korea, Democratic People's Republic of"},{code:"KR",name:"Korea, Republic of"},{code:"KW",name:"Kuwait"},{code:"KY",name:"Cayman Islands"},{code:"KZ",name:"Kazakhstan"},{code:"LA",name:"Lao People's Democratic Republic"},{code:"LB",name:"Lebanon"},{code:"LC",name:"Saint Lucia"},{code:"LI",name:"Liechtenstein"},{code:"LK",name:"Sri Lanka"},{code:"LR",name:"Liberia"},{code:"LS",name:"Lesotho"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"LV",name:"Latvia"},{code:"LY",name:"Libya"},{code:"MA",name:"Morocco"},{code:"MC",name:"Monaco"},{code:"MD",name:"Moldova, Republic of"},{code:"ME",name:"Montenegro"},{code:"MF",name:"Saint Martin, (French part)"},{code:"MG",name:"Madagascar"},{code:"MH",name:"Marshall Islands"},{code:"MK",name:"North Macedonia"},{code:"ML",name:"Mali"},{code:"MM",name:"Myanmar"},{code:"MN",name:"Mongolia"},{code:"MO",name:"Macao"},{code:"MP",name:"Northern Mariana Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MS",name:"Montserrat"},{code:"MT",name:"Malta"},{code:"MU",name:"Mauritius"},{code:"MV",name:"Maldives"},{code:"MW",name:"Malawi"},{code:"MX",name:"Mexico"},{code:"MY",name:"Malaysia"},{code:"MZ",name:"Mozambique"},{code:"NA",name:"Namibia"},{code:"NC",name:"New Caledonia"},{code:"NE",name:"Niger"},{code:"NF",name:"Norfolk Island"},{code:"NG",name:"Nigeria"},{code:"NI",name:"Nicaragua"},{code:"NL",name:"Netherlands"},{code:"NO",name:"Norway"},{code:"NP",name:"Nepal"},{code:"NR",name:"Nauru"},{code:"NU",name:"Niue"},{code:"NZ",name:"New Zealand"},{code:"OM",name:"Oman"},{code:"PA",name:"Panama"},{code:"PE",name:"Peru"},{code:"PF",name:"French Polynesia"},{code:"PG",name:"Papua New Guinea"},{code:"PH",name:"Philippines"},{code:"PK",name:"Pakistan"},{code:"PL",name:"Poland"},{code:"PM",name:"Saint Pierre and Miquelon"},{code:"PN",name:"Pitcairn"},{code:"PR",name:"Puerto Rico"},{code:"PS",name:"Palestine, State of"},{code:"PT",name:"Portugal"},{code:"PW",name:"Palau"},{code:"PY",name:"Paraguay"},{code:"QA",name:"Qatar"},{code:"RE",name:"Réunion"},{code:"RO",name:"Romania"},{code:"RS",name:"Serbia"},{code:"RU",name:"Russian Federation"},{code:"RW",name:"Rwanda"},{code:"SA",name:"Saudi Arabia"},{code:"SB",name:"Solomon Islands"},{code:"SC",name:"Seychelles"},{code:"SD",name:"Sudan"},{code:"SE",name:"Sweden"},{code:"SG",name:"Singapore"},{code:"SH",name:"Saint Helena, Ascension and Tristan da Cunha"},{code:"SI",name:"Slovenia"},{code:"SJ",name:"Svalbard and Jan Mayen"},{code:"SK",name:"Slovakia"},{code:"SL",name:"Sierra Leone"},{code:"SM",name:"San Marino"},{code:"SN",name:"Senegal"},{code:"SO",name:"Somalia"},{code:"SR",name:"Suriname"},{code:"SS",name:"South Sudan"},{code:"ST",name:"Sao Tome and Principe"},{code:"SV",name:"El Salvador"},{code:"SX",name:"Sint Maarten, (Dutch part)"},{code:"SY",name:"Syrian Arab Republic"},{code:"SZ",name:"Eswatini"},{code:"TC",name:"Turks and Caicos Islands"},{code:"TD",name:"Chad"},{code:"TF",name:"French Southern Territories"},{code:"TG",name:"Togo"},{code:"TH",name:"Thailand"},{code:"TJ",name:"Tajikistan"},{code:"TK",name:"Tokelau"},{code:"TL",name:"Timor-Leste"},{code:"TM",name:"Turkmenistan"},{code:"TN",name:"Tunisia"},{code:"TO",name:"Tonga"},{code:"TR",name:"Türkiye"},{code:"TT",name:"Trinidad and Tobago"},{code:"TV",name:"Tuvalu"},{code:"TW",name:"Taiwan, Province of China"},{code:"TZ",name:"Tanzania, United Republic of"},{code:"UA",name:"Ukraine"},{code:"UG",name:"Uganda"},{code:"UM",name:"United States Minor Outlying Islands"},{code:"US",name:"United States of America"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VA",name:"Holy See"},{code:"VC",name:"Saint Vincent and the Grenadines"},{code:"VE",name:"Venezuela, Bolivarian Republic of"},{code:"VG",name:"Virgin Islands, British"},{code:"VI",name:"Virgin Islands, U.S."},{code:"VN",name:"Viet Nam"},{code:"VU",name:"Vanuatu"},{code:"WF",name:"Wallis and Futuna"},{code:"WS",name:"Samoa"},{code:"YE",name:"Yemen"},{code:"YT",name:"Mayotte"},{code:"ZA",name:"South Africa"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}],T=[{short:"AL",name:"Alabama",country:"US"},{short:"AK",name:"Alaska",country:"US"},{short:"AZ",name:"Arizona",country:"US"},{short:"AR",name:"Arkansas",country:"US"},{short:"CA",name:"California",country:"US"},{short:"CO",name:"Colorado",country:"US"},{short:"CT",name:"Connecticut",country:"US"},{short:"DC",name:"District of Columbia",alt:["Washington DC","Washington D.C."],country:"US"},{short:"DE",name:"Delaware",country:"US"},{short:"FL",name:"Florida",country:"US"},{short:"GA",name:"Georgia",country:"US"},{short:"HI",name:"Hawaii",country:"US"},{short:"ID",name:"Idaho",country:"US"},{short:"IL",name:"Illinois",country:"US"},{short:"IN",name:"Indiana",country:"US"},{short:"IA",name:"Iowa",country:"US"},{short:"KS",name:"Kansas",country:"US"},{short:"KY",name:"Kentucky",country:"US"},{short:"LA",name:"Louisiana",country:"US"},{short:"ME",name:"Maine",country:"US"},{short:"MD",name:"Maryland",country:"US"},{short:"MA",name:"Massachusetts",country:"US"},{short:"MI",name:"Michigan",country:"US"},{short:"MN",name:"Minnesota",country:"US"},{short:"MS",name:"Mississippi",country:"US"},{short:"MO",name:"Missouri",country:"US"},{short:"MT",name:"Montana",country:"US"},{short:"NE",name:"Nebraska",country:"US"},{short:"NV",name:"Nevada",country:"US"},{short:"NH",name:"New Hampshire",country:"US"},{short:"NJ",name:"New Jersey",country:"US"},{short:"NM",name:"New Mexico",country:"US"},{short:"NY",name:"New York",country:"US"},{short:"NC",name:"North Carolina",country:"US"},{short:"ND",name:"North Dakota",country:"US"},{short:"OH",name:"Ohio",country:"US"},{short:"OK",name:"Oklahoma",country:"US"},{short:"OR",name:"Oregon",country:"US"},{short:"PA",name:"Pennsylvania",country:"US"},{short:"RI",name:"Rhode Island",country:"US"},{short:"SC",name:"South Carolina",country:"US"},{short:"SD",name:"South Dakota",country:"US"},{short:"TN",name:"Tennessee",country:"US"},{short:"TX",name:"Texas",country:"US"},{short:"UT",name:"Utah",country:"US"},{short:"VT",name:"Vermont",country:"US"},{short:"VA",name:"Virginia",country:"US"},{short:"WA",name:"Washington",country:"US"},{short:"WV",name:"West Virginia",country:"US"},{short:"WI",name:"Wisconsin",country:"US"},{short:"WY",name:"Wyoming",country:"US"},{short:"AS",name:"American Samoa",country:"US"},{short:"GU",name:"Guam",country:"US"},{short:"MP",name:"Northern Mariana Islands",country:"US"},{short:"PR",name:"Puerto Rico",country:"US"},{short:"UM",name:"United States Minor Outlying Islands",country:"US"},{short:"VI",name:"Virgin Islands",country:"US"},{short:"AB",name:"Alberta",country:"CA"},{short:"BC",name:"British Columbia",country:"CA"},{short:"MB",name:"Manitoba",country:"CA"},{short:"NB",name:"New Brunswick",country:"CA"},{short:"NL",name:"Newfoundland and Labrador",country:"CA",alt:["Newfoundland","Labrador"]},{short:"NS",name:"Nova Scotia",country:"CA"},{short:"NU",name:"Nunavut",country:"CA"},{short:"NT",name:"Northwest Territories",country:"CA"},{short:"ON",name:"Ontario",country:"CA"},{short:"PE",name:"Prince Edward Island",country:"CA"},{short:"QC",name:"Quebec",country:"CA"},{short:"SK",name:"Saskatchewan",country:"CA"},{short:"YT",name:"Yukon",country:"CA"},{name:"Ashmore and Cartier Islands",country:"AU"},{name:"Australian Antarctic Territory",country:"AU"},{short:"ACT",name:"Australian Capital Territory",country:"AU"},{short:"CX",name:"Christmas Island",country:"AU"},{short:"CC",name:"Cocos Islands",alt:["Keeling Islands"],country:"AU"},{name:"Coral Sea Islands",country:"AU"},{short:"HM",name:"Heard Island and McDonald Islands",country:"AU"},{short:"JBT",name:"Jervis Bay Territory",country:"AU"},{short:"NSW",name:"New South Wales",country:"AU"},{short:"NF",name:"Norfolk Island",country:"AU"},{short:"NT",name:"Northern Territory",country:"AU"},{short:"QLD",name:"Queensland",country:"AU"},{short:"SA",name:"South Australia",country:"AU"},{short:"TAS",name:"Tasmania",country:"AU"},{short:"VIC",name:"Victoria",country:"AU"},{short:"WA",name:"Western Australia",country:"AU"},{name:"Aguascalientes",short:"AG",alt:["AGS"],country:"MX"},{name:"Baja California",short:"BC",alt:["BCN"],country:"MX"},{name:"Baja California Sur",short:"BS",alt:["BCS"],country:"MX"},{name:"Campeche",short:"CM",alt:["Camp","CAM"],country:"MX"},{name:"Chiapas",short:"CS",alt:["Chis","CHP"],country:"MX"},{name:"Chihuahua",short:"CH",alt:["Chih","CHH"],country:"MX"},{name:"Coahuila",short:"MX",alt:["Coah","COA"],country:"MX"},{name:"Colima",short:"CL",alt:["COL"],country:"MX"},{name:"Federal District",short:"DF",alt:["DIF"],country:"MX"},{name:"Durango",short:"DG",alt:["Dgo","DUR"],country:"MX"},{name:"Guanajuato",short:"GT",alt:["Gto","GUA"],country:"MX"},{name:"Guerrero",short:"GR",alt:["Gro","GRO"],country:"MX"},{name:"Hidalgo",short:"HG",alt:["Hgo","HID"],country:"MX"},{name:"Jalisco",short:"JA",alt:["Jal","JAL"],country:"MX"},{name:"Mexico",short:"ME",alt:["Edomex","MEX"],country:"MX"},{name:"Michoacán",short:"MI",alt:["Mich","MIC"],country:"MX"},{name:"Morelos",short:"MO",alt:["Mor","MOR"],country:"MX"},{name:"Nayarit",short:"NA",alt:["Nay","NAY"],country:"MX"},{name:"Nuevo León",short:"NL",alt:["NLE"],country:"MX"},{name:"Oaxaca",short:"OA",alt:["Oax","OAX"],country:"MX"},{name:"Puebla",short:"PU",alt:["Pue","PUE"],country:"MX"},{name:"Querétaro",short:"QE",alt:["Qro","QUE"],country:"MX"},{name:"Quintana Roo",short:"QR",alt:["Q Roo","ROO"],country:"MX"},{name:"San Luis Potosí",short:"SL",alt:["SLP"],country:"MX"},{name:"Sinaloa",short:"SI",alt:["SIN"],country:"MX"},{name:"Sonora",short:"SO",alt:["SON"],country:"MX"},{name:"Tabasco",short:"TB",alt:["TAB"],country:"MX"},{name:"Tamaulipas",short:"TM",alt:["Tamps","TAM"],country:"MX"},{name:"Tlaxcala",short:"TL",alt:["Tlax","TLA"],country:"MX"},{name:"Veracruz",short:"VE",alt:["VER"],country:"MX"},{name:"Yucatán",short:"YU",alt:["YUC"],country:"MX"},{name:"Zacatecas",short:"ZA",alt:["ZAC"],country:"MX"},{name:"重庆",short:"渝",english:"Chongqing",country:"CN"},{name:"黑龙江",short:"黑",english:"Heilongjiang",country:"CN"},{name:"吉林",short:"吉",english:"Jilin",country:"CN"},{name:"海南",short:"琼",english:"Hainan",country:"CN"},{name:"北京",short:"京",english:"Beijing",country:"CN"},{name:"辽宁",short:"辽",english:"Liaoning",country:"CN"},{name:"内蒙古",short:"蒙",english:"Inner Mongolia",alt:["Nei Menggu"],country:"CN"},{name:"西藏",short:"藏",english:"Xizang",alt:["Tibet"],country:"CN"},{name:"青海",short:"青",english:"Qinghai",country:"CN"},{name:"宁夏",short:"宁",english:"Ningxia",country:"CN"},{name:"新疆",short:"新",english:"Xinjiang",alt:["Uygur"],country:"CN"},{name:"甘肃",short:"甘",english:"Gansu",country:"CN"},{name:"河北",short:"冀",english:"Hebei",country:"CN"},{name:"河南",short:"豫",english:"Henan",country:"CN"},{name:"湖北",short:"鄂",english:"Hubei",country:"CN"},{name:"湖南",short:"湘",english:"Hunan",country:"CN"},{name:"山东",short:"鲁",english:"Shandong",country:"CN"},{name:"江苏",short:"苏",english:"Jiangsu",country:"CN"},{name:"安徽",short:"皖",english:"Anhui",country:"CN"},{name:"山西",short:"晋",english:"Shanxi",country:"CN"},{name:"陕西",short:"陕",english:"Shaanxi",country:"CN"},{name:"四川",short:"川",english:"sichuan",country:"CN"},{name:"云南",short:"滇",english:"Yunnan",country:"CN"},{name:"贵州",short:"黔",english:"Guizhou",country:"CN"},{name:"浙江",short:"浙",english:"Zhejiang",country:"CN"},{name:"福建",short:"闽",english:"Fujian",country:"CN"},{name:"广西",short:"桂",english:"Guangxi",country:"CN"},{name:"上海",short:"沪",english:"Shanghai",country:"CN"},{name:"天津",short:"津",english:"Tianjin",country:"CN"},{name:"香港",short:"港",english:"Hongkong",alt:["Hong Kong"],country:"CN"},{name:"澳门",short:"澳",english:"Macau",alt:["Macao"],country:"CN"},{name:"台湾",short:"台",english:"Taiwan",country:"CN"},{name:"江西",short:"赣",english:"Jiangxi",country:"CN"},{name:"广东",short:"粤",english:"Guangdong",country:"CN"},{name:"Avon",country:"GB",region:"England"},{name:"Bedfordshire",country:"GB",region:"England"},{name:"Berkshire",country:"GB",region:"England"},{name:"Borders",country:"GB",region:"England"},{name:"Bristol",country:"GB",region:"England"},{name:"Buckinghamshire",country:"GB",region:"England"},{name:"Cambridgeshire",country:"GB",region:"England"},{name:"Channel Islands",country:"GB",region:"England"},{name:"Cheshire",country:"GB",region:"England"},{name:"Cleveland",country:"GB",region:"England"},{name:"Cornwall",country:"GB",region:"England"},{name:"Cumbria",country:"GB",region:"England"},{name:"Derbyshire",country:"GB",region:"England"},{name:"Devon",country:"GB",region:"England"},{name:"Dorset",country:"GB",region:"England"},{name:"Durham",country:"GB",region:"England"},{name:"East Riding of Yorkshire",country:"GB",region:"England"},{name:"East Sussex",country:"GB",region:"England"},{name:"Essex",country:"GB",region:"England"},{name:"Gloucestershire",country:"GB",region:"England"},{name:"Greater Manchester",country:"GB",region:"England"},{name:"Hampshire",country:"GB",region:"England"},{name:"Herefordshire",country:"GB",region:"England"},{name:"Hertfordshire",country:"GB",region:"England"},{name:"Humberside",country:"GB",region:"England"},{name:"Isle of Man",country:"GB",region:"England"},{name:"Isle of Wight",country:"GB",region:"England"},{name:"Isles of Scilly",country:"GB",region:"England"},{name:"Kent",country:"GB",region:"England"},{name:"Lancashire",country:"GB",region:"England"},{name:"Leicestershire",country:"GB",region:"England"},{name:"Lincolnshire",country:"GB",region:"England"},{name:"London",country:"GB",region:"England"},{name:"Merseyside",country:"GB",region:"England"},{name:"Middlesex",country:"GB",region:"England"},{name:"Norfolk",country:"GB",region:"England"},{name:"North Yorkshire",country:"GB",region:"England"},{name:"Northamptonshire",country:"GB",region:"England"},{name:"Northumberland",country:"GB",region:"England"},{name:"Nottinghamshire",country:"GB",region:"England"},{name:"Oxfordshire",country:"GB",region:"England"},{name:"Rutland",country:"GB",region:"England"},{name:"Shropshire",country:"GB",region:"England"},{name:"Somerset",country:"GB",region:"England"},{name:"South Yorkshire",country:"GB",region:"England"},{name:"Staffordshire",country:"GB",region:"England"},{name:"Suffolk",country:"GB",region:"England"},{name:"Surrey",country:"GB",region:"England"},{name:"Tyne and Wear",country:"GB",region:"England"},{name:"Warwickshire",country:"GB",region:"England"},{name:"West Midlands",country:"GB",region:"England"},{name:"West Sussex",country:"GB",region:"England"},{name:"West Yorkshire",country:"GB",region:"England"},{name:"Wiltshire",country:"GB",region:"England"},{name:"Worcestershire",country:"GB",region:"England"},{name:"Antrim",country:"GB",region:"Northern Ireland"},{name:"Down",country:"GB",region:"Northern Ireland"},{name:"Fermanagh",country:"GB",region:"Northern Ireland"},{name:"Londonderry",country:"GB",region:"Northern Ireland"},{name:"Tyrone",country:"GB",region:"Northern Ireland"},{name:"Aberdeen City",country:"GB",region:"Scotland"},{name:"Aberdeenshire",country:"GB",region:"Scotland"},{name:"Angus",country:"GB",region:"Scotland"},{name:"Argyll and Bute",country:"GB",region:"Scotland"},{name:"Armagh",country:"GB",region:"Scotland"},{name:"Carmarthenshire",country:"GB",region:"Scotland"},{name:"Clackmannan",country:"GB",region:"Scotland"},{name:"Dumfries and Galloway",country:"GB",region:"Scotland"},{name:"East Ayrshire",country:"GB",region:"Scotland"},{name:"East Dunbartonshire",country:"GB",region:"Scotland"},{name:"East Lothian",country:"GB",region:"Scotland"},{name:"East Renfrewshire",country:"GB",region:"Scotland"},{name:"Edinburgh City",country:"GB",region:"Scotland"},{name:"Falkirk",country:"GB",region:"Scotland"},{name:"Fife",country:"GB",region:"Scotland"},{name:"Glasgow",country:"GB",region:"Scotland"},{name:"Highland",country:"GB",region:"Scotland"},{name:"Inverclyde",country:"GB",region:"Scotland"},{name:"Midlothian",country:"GB",region:"Scotland"},{name:"Moray",country:"GB",region:"Scotland"},{name:"North Ayrshire",country:"GB",region:"Scotland"},{name:"North Lanarkshire",country:"GB",region:"Scotland"},{name:"Orkney",country:"GB",region:"Scotland"},{name:"Perthshire and Kinross",country:"GB",region:"Scotland"},{name:"Renfrewshire",country:"GB",region:"Scotland"},{name:"Roxburghshire",country:"GB",region:"Scotland"},{name:"Shetland",country:"GB",region:"Scotland"},{name:"South Ayrshire",country:"GB",region:"Scotland"},{name:"South Lanarkshire",country:"GB",region:"Scotland"},{name:"Stirling",country:"GB",region:"Scotland"},{name:"West Dunbartonshire",country:"GB",region:"Scotland"},{name:"West Lothian",country:"GB",region:"Scotland"},{name:"Western Isles",country:"GB",region:"Scotland"},{name:"Blaenau Gwent",country:"GB",region:"Wales"},{name:"Bridgend",country:"GB",region:"Wales"},{name:"Caerphilly",country:"GB",region:"Wales"},{name:"Cardiff",country:"GB",region:"Wales"},{name:"Ceredigion",country:"GB",region:"Wales"},{name:"Conwy",country:"GB",region:"Wales"},{name:"Denbighshire",country:"GB",region:"Wales"},{name:"Flintshire",country:"GB",region:"Wales"},{name:"Gwynedd",country:"GB",region:"Wales"},{name:"Isle of Anglesey",country:"GB",region:"Wales"},{name:"Merthyr Tydfil",country:"GB",region:"Wales"},{name:"Monmouthshire",country:"GB",region:"Wales"},{name:"Neath Port Talbot",country:"GB",region:"Wales"},{name:"Newport",country:"GB",region:"Wales"},{name:"Pembrokeshire",country:"GB",region:"Wales"},{name:"Powys",country:"GB",region:"Wales"},{name:"Rhondda Cynon Taff",country:"GB",region:"Wales"},{name:"Swansea",country:"GB",region:"Wales"},{name:"The Vale of Glamorgan",country:"GB",region:"Wales"},{name:"Torfaen",country:"GB",region:"Wales"},{name:"Wrexham",country:"GB",region:"Wales"},{short:"BW",name:"Baden-Württemberg",country:"DE"},{short:"BY",name:"Bayern",country:"DE"},{short:"BE",name:"Berlin",country:"DE"},{short:"BB",name:"Brandenburg",country:"DE"},{short:"HB",name:"Bremen",country:"DE"},{short:"HH",name:"Hamburg",country:"DE"},{short:"HE",name:"Hessen",country:"DE"},{short:"MV",name:"Mecklenburg-Vorpommern",country:"DE"},{short:"NI",name:"Niedersachsen",country:"DE"},{short:"NW",name:"Nordrhein-Westfalen",country:"DE"},{short:"RP",name:"Rheinland-Pfalz",country:"DE"},{short:"SL",name:"Saarland",country:"DE"},{short:"SN",name:"Sachsen",country:"DE"},{short:"ST",name:"Sachsen-Anhalt",country:"DE"},{short:"SH",name:"Schleswig-Holstein",country:"DE"},{short:"TH",name:"Thüringen",country:"DE"},{short:"DR",name:"Drenthe",country:"NL"},{short:"FL",name:"Flevoland",country:"NL"},{short:"FR",name:"Friesland",country:"NL",alt:["Fryslân"]},{short:"GD",name:"Gelderland",country:"NL"},{short:"GR",name:"Groningen",country:"NL"},{short:"LB",name:"Limburg",country:"NL"},{short:"NB",name:"Noord-Brabant",country:"NL"},{short:"NH",name:"Noord-Holland",country:"NL"},{short:"OV",name:"Overijssel",country:"NL"},{short:"UT",name:"Utrecht",country:"NL"},{short:"ZH",name:"Zuid-Holland",country:"NL"},{short:"ZL",name:"Zeeland",country:"NL"},{short:"ANT",name:"Antwerpen",country:"BE"},{short:"HAI",name:"Henegouwen",country:"BE",alt:["Hainaut"]},{short:"LIE",name:"Luik",country:"BE",alt:["Liège"]},{short:"LIM",name:"Limburg",country:"BE"},{short:"LUX",name:"Luxemburg",country:"BE"},{short:"NAM",name:"Namen",country:"BE"},{short:"OVL",name:"Oost-Vlaanderen",country:"BE"},{short:"VBR",name:"Vlaams-Brabant",country:"BE"},{short:"WBR",name:"Waals-Brabant",country:"BE"},{short:"WVL",name:"West-Vlaanderen",country:"BE"},{name:"Hovedstaden",country:"DK"},{name:"Midtjylland",country:"DK"},{name:"Nordjylland",country:"DK"},{name:"Sjælland",country:"DK"},{name:"Syddanmark",country:"DK"},{name:"Adana",country:"TR"},{name:"Adıyaman",country:"TR"},{name:"Afyonkarahisar",country:"TR"},{name:"Ağrı",country:"TR"},{name:"Amasya",country:"TR"},{name:"Ankara",country:"TR"},{name:"Antalya",country:"TR"},{name:"Artvin",country:"TR"},{name:"Aydın",country:"TR"},{name:"Balıkesir",country:"TR"},{name:"Bilecik",country:"TR"},{name:"Bingöl",country:"TR"},{name:"Bitlis",country:"TR"},{name:"Bolu",country:"TR"},{name:"Burdur",country:"TR"},{name:"Bursa",country:"TR"},{name:"Çanakkale",country:"TR"},{name:"Çankırı",country:"TR"},{name:"Çorum",country:"TR"},{name:"Denizli",country:"TR"},{name:"Diyarbakır",country:"TR"},{name:"Edirne",country:"TR"},{name:"Elazığ",country:"TR"},{name:"Erzincan",country:"TR"},{name:"Erzurum",country:"TR"},{name:"Eskişehir",country:"TR"},{name:"Gaziantep",country:"TR"},{name:"Giresun",country:"TR"},{name:"Gümüşhane",country:"TR"},{name:"Hakkâri",country:"TR"},{name:"Hatay",country:"TR"},{name:"Isparta",country:"TR"},{name:"Mersin",country:"TR"},{name:"Istanbul",country:"TR"},{name:"İzmir",country:"TR"},{name:"Kars",country:"TR"},{name:"Kastamonu",country:"TR"},{name:"Kayseri",country:"TR"},{name:"Kırklareli",country:"TR"},{name:"Kırşehir",country:"TR"},{name:"Kocaeli",country:"TR"},{name:"Konya",country:"TR"},{name:"Kütahya",country:"TR"},{name:"Malatya",country:"TR"},{name:"Manisa",country:"TR"},{name:"Kahramanmaraş",country:"TR"},{name:"Mardin",country:"TR"},{name:"Muğla",country:"TR"},{name:"Muş",country:"TR"},{name:"Nevşehir",country:"TR"},{name:"Niğde",country:"TR"},{name:"Ordu",country:"TR"},{name:"Rize",country:"TR"},{name:"Sakarya",country:"TR"},{name:"Samsun",country:"TR"},{name:"Siirt",country:"TR"},{name:"Sinop",country:"TR"},{name:"Sivas",country:"TR"},{name:"Tekirdağ",country:"TR"},{name:"Tokat",country:"TR"},{name:"Trabzon",country:"TR"},{name:"Tunceli",country:"TR"},{name:"Şanlıurfa",country:"TR"},{name:"Uşak",country:"TR"},{name:"Van",country:"TR"},{name:"Yozgat",country:"TR"},{name:"Zonguldak",country:"TR"},{name:"Aksaray",country:"TR"},{name:"Bayburt",country:"TR"},{name:"Karaman",country:"TR"},{name:"Kırıkkale",country:"TR"},{name:"Batman",country:"TR"},{name:"Şırnak",country:"TR"},{name:"Bartın",country:"TR"},{name:"Ardahan",country:"TR"},{name:"Iğdır",country:"TR"},{name:"Yalova",country:"TR"},{name:"Karabük",country:"TR"},{name:"Kilis",country:"TR"},{name:"Osmaniye",country:"TR"},{name:"Düzce",country:"TR"},{short:"ID-AC",name:"Special Region of Aceh",country:"ID"},{short:"ID-BA",name:"Bali",country:"ID"},{short:"ID-BB",name:"Bangka–Belitung Islands",country:"ID"},{short:"ID-BT",name:"Banten",country:"ID"},{short:"ID-BE",name:"Bengkulu",country:"ID"},{short:"ID-JT",name:"Central Java",country:"ID"},{short:"ID-KT",name:"Central Kalimantan",country:"ID"},{short:"ID-ST",name:"Central Sulawesi",country:"ID"},{short:"ID-JI",name:"East Java",country:"ID"},{short:"ID-KI",name:"East Kalimantan",country:"ID"},{short:"ID-NT",name:"East Nusa Tenggara",country:"ID"},{short:"ID-GO",name:"Gorontalo",country:"ID"},{short:"ID-JK",name:"Jakarta Special Capital Region",country:"ID"},{short:"ID-JA",name:"Jambi",country:"ID"},{short:"ID-LA",name:"Lampung",country:"ID"},{short:"ID-MA",name:"Maluku",country:"ID"},{short:"ID-KU",name:"North Kalimantan",country:"ID"},{short:"ID-MU",name:"North Maluku",country:"ID"},{short:"ID-SA",name:"North Sulawesi",country:"ID"},{short:"ID-SU",name:"North Sumatra",country:"ID"},{short:"ID-PA",name:"Special Region of Papua",country:"ID"},{short:"ID-RI",name:"Riau",country:"ID"},{short:"ID-KR",name:"Riau Islands",country:"ID"},{short:"ID-SG",name:"Southeast Sulawesi",country:"ID"},{short:"ID-KS",name:"South Kalimantan",country:"ID"},{short:"ID-SN",name:"South Sulawesi",country:"ID"},{short:"ID-SS",name:"South Sumatra",country:"ID"},{short:"ID-JB",name:"West Java",country:"ID"},{short:"ID-KB",name:"West Kalimantan",country:"ID"},{short:"ID-NB",name:"West Nusa Tenggara",country:"ID"},{short:"ID-PB",name:"Special Region of West Papua",country:"ID"},{short:"ID-SR",name:"West Sulawesi",country:"ID"},{short:"ID-SB",name:"West Sumatra",country:"ID"},{short:"ID-YO",name:"Special Region of Yogyakarta",country:"ID"},{name:"Irbid",country:"JO"},{name:"Ajloun",country:"JO"},{name:"Jerash",country:"JO"},{name:"Mafraq",country:"JO"},{name:"Balqa",country:"JO"},{name:"Amman",country:"JO"},{name:"Zarqa",country:"JO"},{name:"Madaba",country:"JO"},{name:"Karak",country:"JO"},{name:"Tafilah",country:"JO"},{name:"Ma'an",country:"JO"},{name:"Aqaba",country:"JO"},{short:"AP",name:"Andhra Pradesh",country:"IN"},{short:"AR",name:"Arunachal Pradesh",country:"IN"},{short:"AS",name:"Assam",country:"IN"},{short:"BR",name:"Bihar",country:"IN"},{short:"CT",name:"Chhattisgarh",country:"IN"},{short:"GA",name:"Goa",country:"IN"},{short:"GJ",name:"Gujarat",country:"IN"},{short:"HR",name:"Haryana",country:"IN"},{short:"HP",name:"Himachal Pradesh",country:"IN"},{short:"JK",name:"Jammu and Kashmir",country:"IN"},{short:"JH",name:"Jharkhand",country:"IN"},{short:"KA",name:"Karnataka",country:"IN"},{short:"KL",name:"Kerala",country:"IN"},{short:"MP",name:"Madhya Pradesh",country:"IN"},{short:"MH",name:"Maharashtra",country:"IN"},{short:"MN",name:"Manipur",country:"IN"},{short:"ML",name:"Meghalaya",country:"IN"},{short:"MZ",name:"Mizoram",country:"IN"},{short:"NL",name:"Nagaland",country:"IN"},{short:"OR",name:"Odisha",country:"IN"},{short:"PB",name:"Punjab",country:"IN"},{short:"RJ",name:"Rajasthan",country:"IN"},{short:"SK",name:"Sikkim",country:"IN"},{short:"TN",name:"Tamil Nadu",country:"IN"},{short:"TG",name:"Telangana",country:"IN"},{short:"TR",name:"Tripura",country:"IN"},{short:"UP",name:"Uttar Pradesh",country:"IN"},{short:"UT",name:"Uttarakhand",country:"IN"},{short:"WB",name:"West Bengal",country:"IN"},{short:"AN",name:"Andaman and Nicobar Islands",country:"IN"},{short:"CH",name:"Chandigarh",country:"IN"},{short:"DN",name:"Dadra and Nagar Haveli",country:"IN"},{short:"DD",name:"Daman and Diu",country:"IN"},{short:"LD",name:"Lakshadweep",country:"IN"},{short:"DL",name:"National Capital Territory of Delhi",country:"IN"},{short:"PY",name:"Puducherry",country:"IN"},{name:"ភ្នំពេញ",english:"Phnom Penh Municipality",country:"KH"},{name:"បន្ទាយមានជ័យ",english:"Banteay Meanchey",country:"KH"},{name:"បាត់ដំបង",english:"Battambang",country:"KH"},{name:"កំពង់ចាម",english:"Kampong Cham",country:"KH"},{name:"កំពង់ឆ្នាំង",english:"Kampong Chhnang",country:"KH"},{name:"កំពង់ស្ពឺ",english:"Kampong Speu",country:"KH"},{name:"កំពង់ធំ",english:"Kampong Thom",country:"KH"},{name:"កំពត",english:"Kampot",country:"KH"},{name:"កណ្តាល",english:"Kandal",country:"KH"},{name:"កោះកុង",english:"Koh Kong",country:"KH"},{name:"កែប",english:"Kep",country:"KH"},{name:"ក្រចេះ",english:"Kratié",country:"KH"},{name:"មណ្ឌលគីរី",english:"Mondulkiri",country:"KH"},{name:"ឧត្តរមានជ័យ",english:"Oddar Meanchey",country:"KH"},{name:"បៃលិន",english:"Pailin",country:"KH"},{name:"ព្រះសីហនុ",english:"Preah Sihanouk",country:"KH"},{name:"ព្រះវិហារ",english:"Preah Vihear",country:"KH"},{name:"ពោធិ៍សាត់",english:"Pursat",country:"KH"},{name:"ព្រៃវែង",english:"Prey Veng",country:"KH"},{name:"រតនគីរី",english:"Ratanakiri",country:"KH"},{name:"សៀមរាប",english:"Siem Reap",country:"KH"},{name:"ស្ទឹងត្រែង",english:"Stung Treng",country:"KH"},{name:"ស្វាយរៀង",english:"Svay Rieng",country:"KH"},{name:"តាកែវ",english:"Takéo",country:"KH"},{name:"ត្បូងឃ្មុំ",english:"Tbong Khmum",country:"KH"},{name:"Addis Ababa",country:"ET"},{name:"Afar Region",country:"ET"},{name:"Amhara Region",country:"ET"},{name:"Benishangul-Gumuz",country:"ET"},{name:"Dire Dawa",country:"ET"},{name:"Gambela",country:"ET"},{name:"Harari",country:"ET"},{name:"Oromia",country:"ET"},{name:"Somali",country:"ET"},{name:"Southern Nations, Nationalities, and Peoples' Region",country:"ET"},{name:"Tigray Region",country:"ET"},{name:"Chachapoyas",region:"Amazonas",country:"PE"},{name:"Bagua",region:"Amazonas",country:"PE"},{name:"Bongará",region:"Amazonas",country:"PE"},{name:"Condorcanqui",region:"Amazonas",country:"PE"},{name:"Luya",region:"Amazonas",country:"PE"},{name:"Rodríguez de Mendoza",region:"Amazonas",country:"PE"},{name:"Utcubamba",region:"Amazonas",country:"PE"},{name:"Huaraz",region:"Ancash",country:"PE"},{name:"Aija",region:"Ancash",country:"PE"},{name:"Antonio Raymondi",region:"Ancash",country:"PE"},{name:"Asunción",region:"Ancash",country:"PE"},{name:"Bolognesi",region:"Ancash",country:"PE"},{name:"Carhuaz",region:"Ancash",country:"PE"},{name:"Carlos Fermín Fitzcarrald",region:"Ancash",country:"PE"},{name:"Casma",region:"Ancash",country:"PE"},{name:"Corongo",region:"Ancash",country:"PE"},{name:"Huari",region:"Ancash",country:"PE"},{name:"Huarmey",region:"Ancash",country:"PE"},{name:"Huaylas",region:"Ancash",country:"PE"},{name:"Mariscal Luzuriaga",region:"Ancash",country:"PE"},{name:"Ocros",region:"Ancash",country:"PE"},{name:"Pallasca",region:"Ancash",country:"PE"},{name:"Pomabamba",region:"Ancash",country:"PE"},{name:"Recuay",region:"Ancash",country:"PE"},{name:"Santa",region:"Ancash",country:"PE"},{name:"Sihuas",region:"Ancash",country:"PE"},{name:"Yungay",region:"Ancash",country:"PE"},{name:"Abancay",region:"Apurímac",country:"PE"},{name:"Andahuaylas",region:"Apurímac",country:"PE"},{name:"Antabamba",region:"Apurímac",country:"PE"},{name:"Aymaraes",region:"Apurímac",country:"PE"},{name:"Cotabambas",region:"Apurímac",country:"PE"},{name:"Chincheros",region:"Apurímac",country:"PE"},{name:"Grau",region:"Apurímac",country:"PE"},{name:"Arequipa",region:"Arequipa",country:"PE"},{name:"Camaná",region:"Arequipa",country:"PE"},{name:"Caravelí",region:"Arequipa",country:"PE"},{name:"Castilla",region:"Arequipa",country:"PE"},{name:"Caylloma",region:"Arequipa",country:"PE"},{name:"Condesuyos",region:"Arequipa",country:"PE"},{name:"Islay",region:"Arequipa",country:"PE"},{name:"La Unión",region:"Arequipa",country:"PE"},{name:"Huamanga",region:"Ayacucho",country:"PE"},{name:"Cangallo",region:"Ayacucho",country:"PE"},{name:"Huanca Sancos",region:"Ayacucho",country:"PE"},{name:"Huanta",region:"Ayacucho",country:"PE"},{name:"La Mar",region:"Ayacucho",country:"PE"},{name:"Lucanas",region:"Ayacucho",country:"PE"},{name:"Parinacochas",region:"Ayacucho",country:"PE"},{name:"Páucar del Sara Sara",region:"Ayacucho",country:"PE"},{name:"Sucre",region:"Ayacucho",country:"PE"},{name:"Víctor Fajardo",region:"Ayacucho",country:"PE"},{name:"Vilcas Huamán",region:"Ayacucho",country:"PE"},{name:"Cajamarca",region:"Cajamarca",country:"PE"},{name:"Cajabamba",region:"Cajamarca",country:"PE"},{name:"Celendín",region:"Cajamarca",country:"PE"},{name:"Chota",region:"Cajamarca",country:"PE"},{name:"Contumazá",region:"Cajamarca",country:"PE"},{name:"Cutervo",region:"Cajamarca",country:"PE"},{name:"Hualgayoc",region:"Cajamarca",country:"PE"},{name:"Jaén",region:"Cajamarca",country:"PE"},{name:"San Ignacio",region:"Cajamarca",country:"PE"},{name:"San Marcos",region:"Cajamarca",country:"PE"},{name:"San Miguel",region:"Cajamarca",country:"PE"},{name:"San Pablo",region:"Cajamarca",country:"PE"},{name:"Santa Cruz",region:"Cajamarca",country:"PE"},{name:"Callao",region:"Callao",country:"PE"},{name:"Cusco",region:"Cusco",country:"PE"},{name:"Acomayo",region:"Cusco",country:"PE"},{name:"Anta",region:"Cusco",country:"PE"},{name:"Calca",region:"Cusco",country:"PE"},{name:"Canas",region:"Cusco",country:"PE"},{name:"Canchis",region:"Cusco",country:"PE"},{name:"Chumbivilcas",region:"Cusco",country:"PE"},{name:"Espinar",region:"Cusco",country:"PE"},{name:"La Convención",region:"Cusco",country:"PE"},{name:"Paruro",region:"Cusco",country:"PE"},{name:"Paucartambo",region:"Cusco",country:"PE"},{name:"Quispicanchi",region:"Cusco",country:"PE"},{name:"Urubamba",region:"Cusco",country:"PE"},{name:"Huancavelica",region:"Huancavelica",country:"PE"},{name:"Acobamba",region:"Huancavelica",country:"PE"},{name:"Angaraes",region:"Huancavelica",country:"PE"},{name:"Castrovirreyna",region:"Huancavelica",country:"PE"},{name:"Churcampa",region:"Huancavelica",country:"PE"},{name:"Huaytará",region:"Huancavelica",country:"PE"},{name:"Tayacaja",region:"Huancavelica",country:"PE"},{name:"Huánuco",region:"Huánuco",country:"PE"},{name:"Ambo",region:"Huánuco",country:"PE"},{name:"Dos de Mayo",region:"Huánuco",country:"PE"},{name:"Huacaybamba",region:"Huánuco",country:"PE"},{name:"Huamalíes",region:"Huánuco",country:"PE"},{name:"Leoncio Prado",region:"Huánuco",country:"PE"},{name:"Marañón",region:"Huánuco",country:"PE"},{name:"Pachitea",region:"Huánuco",country:"PE"},{name:"Puerto Inca",region:"Huánuco",country:"PE"},{name:"Lauricocha",region:"Huánuco",country:"PE"},{name:"Yarowilca",region:"Huánuco",country:"PE"},{name:"Ica",region:"Ica",country:"PE"},{name:"Chincha",region:"Ica",country:"PE"},{name:"Nazca",region:"Ica",country:"PE"},{name:"Palpa",region:"Ica",country:"PE"},{name:"Pisco",region:"Ica",country:"PE"},{name:"Huancayo",region:"Junín",country:"PE"},{name:"Concepción",region:"Junín",country:"PE"},{name:"Chanchamayo",region:"Junín",country:"PE"},{name:"Jauja",region:"Junín",country:"PE"},{name:"Junín",region:"Junín",country:"PE"},{name:"Satipo",region:"Junín",country:"PE"},{name:"Tarma",region:"Junín",country:"PE"},{name:"Yauli",region:"Junín",country:"PE"},{name:"Chupaca",region:"Junín",country:"PE"},{name:"Trujillo",region:"La Libertad",country:"PE"},{name:"Ascope",region:"La Libertad",country:"PE"},{name:"Bolívar",region:"La Libertad",country:"PE"},{name:"Chepén",region:"La Libertad",country:"PE"},{name:"Julcán",region:"La Libertad",country:"PE"},{name:"Otuzco",region:"La Libertad",country:"PE"},{name:"Pacasmayo",region:"La Libertad",country:"PE"},{name:"Pataz",region:"La Libertad",country:"PE"},{name:"Sánchez Carrión",region:"La Libertad",country:"PE"},{name:"Santiago de Chuco",region:"La Libertad",country:"PE"},{name:"Gran Chimú",region:"La Libertad",country:"PE"},{name:"Virú",region:"La Libertad",country:"PE"},{name:"Chiclayo",region:"Lambayeque",country:"PE"},{name:"Ferreñafe",region:"Lambayeque",country:"PE"},{name:"Lambayeque",region:"Lambayeque",country:"PE"},{name:"Lima",region:"autonomous",country:"PE"},{name:"Huaura",region:"Lima",country:"PE"},{name:"Barranca",region:"Lima",country:"PE"},{name:"Cajatambo",region:"Lima",country:"PE"},{name:"Canta",region:"Lima",country:"PE"},{name:"Cañete",region:"Lima",country:"PE"},{name:"Huaral",region:"Lima",country:"PE"},{name:"Huarochirí",region:"Lima",country:"PE"},{name:"Oyón",region:"Lima",country:"PE"},{name:"Yauyos",region:"Lima",country:"PE"},{name:"Maynas",region:"Loreto",country:"PE"},{name:"Alto Amazonas",region:"Loreto",country:"PE"},{name:"Loreto",region:"Loreto",country:"PE"},{name:"Mariscal Ramón Castilla",region:"Loreto",country:"PE"},{name:"Putumayo",region:"Loreto",country:"PE"},{name:"Requena",region:"Loreto",country:"PE"},{name:"Ucayali",region:"Loreto",country:"PE"},{name:"Datem del Marañón",region:"Loreto",country:"PE"},{name:"Tambopata",region:"Madre de Dios",country:"PE"},{name:"Manú",region:"Madre de Dios",country:"PE"},{name:"Tahuamanu",region:"Madre de Dios",country:"PE"},{name:"Mariscal Nieto",region:"Moquegua",country:"PE"},{name:"General Sánchez Cerro",region:"Moquegua",country:"PE"},{name:"Ilo",region:"Moquegua",country:"PE"},{name:"Pasco",region:"Pasco",country:"PE"},{name:"Daniel Alcídes Carrión",region:"Pasco",country:"PE"},{name:"Oxapampa",region:"Pasco",country:"PE"},{name:"Piura",region:"Piura",country:"PE"},{name:"Ayabaca",region:"Piura",country:"PE"},{name:"Huancabamba",region:"Piura",country:"PE"},{name:"Morropón",region:"Piura",country:"PE"},{name:"Paita",region:"Piura",country:"PE"},{name:"Sullana",region:"Piura",country:"PE"},{name:"Talara",region:"Piura",country:"PE"},{name:"Sechura",region:"Piura",country:"PE"},{name:"Puno",region:"Puno",country:"PE"},{name:"Azángaro",region:"Puno",country:"PE"},{name:"Carabaya",region:"Puno",country:"PE"},{name:"Chucuito",region:"Puno",country:"PE"},{name:"El Collao",region:"Puno",country:"PE"},{name:"Huancané",region:"Puno",country:"PE"},{name:"Lampa",region:"Puno",country:"PE"},{name:"Melgar",region:"Puno",country:"PE"},{name:"Moho",region:"Puno",country:"PE"},{name:"San Antonio de Putina",region:"Puno",country:"PE"},{name:"San Román",region:"Puno",country:"PE"},{name:"Sandia",region:"Puno",country:"PE"},{name:"Yunguyo",region:"Puno",country:"PE"},{name:"Moyobamba",region:"San Martín",country:"PE"},{name:"Bellavista",region:"San Martín",country:"PE"},{name:"El Dorado",region:"San Martín",country:"PE"},{name:"Huallaga",region:"San Martín",country:"PE"},{name:"Lamas",region:"San Martín",country:"PE"},{name:"Mariscal Cáceres",region:"San Martín",country:"PE"},{name:"Picota",region:"San Martín",country:"PE"},{name:"Rioja",region:"San Martín",country:"PE"},{name:"San Martín",region:"San Martín",country:"PE"},{name:"Tocache",region:"San Martín",country:"PE"},{name:"Tacna",region:"Tacna",country:"PE"},{name:"Candarave",region:"Tacna",country:"PE"},{name:"Jorge Basadre",region:"Tacna",country:"PE"},{name:"Tarata",region:"Tacna",country:"PE"},{name:"Tumbes",region:"Tumbes",country:"PE"},{name:"Contralmirante Villar",region:"Tumbes",country:"PE"},{name:"Zarumilla",region:"Tumbes",country:"PE"},{name:"Coronel Portillo",region:"Ucayali",country:"PE"},{name:"Atalaya",region:"Ucayali",country:"PE"},{name:"Padre Abad",region:"Ucayali",country:"PE"},{name:"Purús",region:"Ucayali",country:"PE"},{name:"Camagüey",country:"CU"},{name:"Ciego de Ávila",country:"CU"},{name:"Cienfuegos",country:"CU"},{name:"Havana",country:"CU"},{name:"Bayamo",country:"CU"},{name:"Guantánamo",country:"CU"},{name:"Holguín",country:"CU"},{name:"Nueva Gerona",country:"CU"},{name:"Artemisa",country:"CU"},{name:"Las Tunas",country:"CU"},{name:"Matanzas",country:"CU"},{name:"San José de las Lajas",country:"CU"},{name:"Pinar del Río",country:"CU"},{name:"Sancti Spíritus",country:"CU"},{name:"Santiago de Cuba",country:"CU"},{name:"Santa Clara",country:"CU"},{name:"Ciudad Autónoma de Buenos Aires",country:"AR"},{name:"Buenos Aires",country:"AR"},{name:"Catamarca",country:"AR"},{name:"Chaco",country:"AR"},{name:"Chubut",country:"AR"},{name:"Córdoba",country:"AR"},{name:"Corrientes",country:"AR"},{name:"Entre Ríos",country:"AR"},{name:"Formosa",country:"AR"},{name:"Jujuy",country:"AR"},{name:"La Pampa",country:"AR"},{name:"La Rioja",country:"AR"},{name:"Mendoza",country:"AR"},{name:"Misiones",country:"AR"},{name:"Neuquén",country:"AR"},{name:"Río Negro",country:"AR"},{name:"Salta",country:"AR"},{name:"San Juan",country:"AR"},{name:"San Luis",country:"AR"},{name:"Santa Cruz",country:"AR"},{name:"Santa Fe",country:"AR"},{name:"Santiago del Estero",country:"AR"},{name:"Tierra del Fuego, Antártida e Islas del Atlántico Sur",country:"AR"},{name:"Tucumán",country:"AR"},{name:"Arica",region:"XV Arica and Parinacota",country:"CL"},{name:"Parinacota",region:"XV Arica and Parinacota",country:"CL"},{name:"Iquique",region:"I Tarapacá",country:"CL"},{name:"Tamarugal",region:"I Tarapacá",country:"CL"},{name:"Antofagasta",region:"II Antofagasta",country:"CL"},{name:"El Loa",region:"II Antofagasta",country:"CL"},{name:"Tocopilla",region:"II Antofagasta",country:"CL"},{name:"Copiapó",region:"III Atacama",country:"CL"},{name:"Huasco",region:"III Atacama",country:"CL"},{name:"Chañaral",region:"III Atacama",country:"CL"},{name:"Elqui",region:"IV Coquimbo",country:"CL"},{name:"Limarí",region:"IV Coquimbo",country:"CL"},{name:"Choapa",region:"IV Coquimbo",country:"CL"},{name:"Isla de Pascua",region:"V Valparaíso",country:"CL"},{name:"Los Andes",region:"V Valparaíso",country:"CL"},{name:"Marga Marga",region:"V Valparaíso",country:"CL"},{name:"Petorca",region:"V Valparaíso",country:"CL"},{name:"Quillota",region:"V Valparaíso",country:"CL"},{name:"San Antonio",region:"V Valparaíso",country:"CL"},{name:"San Felipe de Aconcagua",region:"V Valparaíso",country:"CL"},{name:"Valparaíso",region:"V Valparaíso",country:"CL"},{name:"Cachapoal",region:"VI O'Higgins",country:"CL"},{name:"Colchagua",region:"VI O'Higgins",country:"CL"},{name:"Cardenal Caro",region:"VI O'Higgins",country:"CL"},{name:"Talca",region:"VII Maule",country:"CL"},{name:"Linares",region:"VII Maule",country:"CL"},{name:"Curicó",region:"VII Maule",country:"CL"},{name:"Cauquenes",region:"VII Maule",country:"CL"},{name:"Concepción",region:"VIII Biobío",country:"CL"},{name:"Ñuble",region:"VIII Biobío",country:"CL"},{name:"Biobío",region:"VIII Biobío",country:"CL"},{name:"Arauco",region:"VIII Biobío",country:"CL"},{name:"Cautin",region:"IX Araucanía",country:"CL"},{name:"Malleco",region:"IX Araucanía",country:"CL"},{name:"Valdivia",region:"XIV Los Ríos",country:"CL"},{name:"Ranco",region:"XIV Los Ríos",country:"CL"},{name:"Llanquihue",region:"X Los Lagos",country:"CL"},{name:"Osorno",region:"X Los Lagos",country:"CL"},{name:"Chiloe",region:"X Los Lagos",country:"CL"},{name:"Palena",region:"X Los Lagos",country:"CL"},{name:"Coihaique",region:"XI Aisén",country:"CL"},{name:"Aisén",region:"XI Aisén",country:"CL"},{name:"General Carrera",region:"XI Aisén",country:"CL"},{name:"Capitan Prat",region:"XI Aisén",country:"CL"},{name:"Magallanes",region:"XII Magallanes",country:"CL"},{name:"Ultima Esperanza",region:"XII Magallanes",country:"CL"},{name:"Tierra del Fuego",region:"XII Magallanes",country:"CL"},{name:"Antártica Chilena",region:"XII Magallanes",country:"CL"},{name:"Santiago",region:"RM Santiago Metropolitan",country:"CL"},{name:"Cordillera",region:"RM Santiago Metropolitan",country:"CL"},{name:"Maipo",region:"RM Santiago Metropolitan",country:"CL"},{name:"Talagante",region:"RM Santiago Metropolitan",country:"CL"},{name:"Melipilla",region:"RM Santiago Metropolitan",country:"CL"},{name:"Chacabuco",region:"RM Santiago Metropolitan",country:"CL"},{name:"Cercado",region:"Beni",country:"BO"},{name:"Iténez",region:"Beni",country:"BO"},{name:"José Ballivián",region:"Beni",country:"BO"},{name:"Mamoré",region:"Beni",country:"BO"},{name:"Marbán",region:"Beni",country:"BO"},{name:"Moxos",region:"Beni",country:"BO"},{name:"Vaca Díez",region:"Beni",country:"BO"},{name:"Yacuma",region:"Beni",country:"BO"},{name:"Azurduy",region:"Chuquisaca",country:"BO"},{name:"Belisario Boeto",region:"Chuquisaca",country:"BO"},{name:"Hernando Siles",region:"Chuquisaca",country:"BO"},{name:"Jaime Zudáñez",region:"Chuquisaca",country:"BO"},{name:"Luis Calvo",region:"Chuquisaca",country:"BO"},{name:"Nor Cinti",region:"Chuquisaca",country:"BO"},{name:"Oropeza",region:"Chuquisaca",country:"BO"},{name:"Sud Cinti",region:"Chuquisaca",country:"BO"},{name:"Tomina",region:"Chuquisaca",country:"BO"},{name:"Yamparáez",region:"Chuquisaca",country:"BO"},{name:"Arani",region:"Cochabamba",country:"BO"},{name:"Arque",region:"Cochabamba",country:"BO"},{name:"Ayopaya",region:"Cochabamba",country:"BO"},{name:"Capinota",region:"Cochabamba",country:"BO"},{name:"Carrasco",region:"Cochabamba",country:"BO"},{name:"Cercado",region:"Cochabamba",country:"BO"},{name:"Chapare",region:"Cochabamba",country:"BO"},{name:"Esteban Arce",region:"Cochabamba",country:"BO"},{name:"Germán Jordán",region:"Cochabamba",country:"BO"},{name:"Mizque",region:"Cochabamba",country:"BO"},{name:"Campero",region:"Cochabamba",country:"BO"},{name:"Punata",region:"Cochabamba",country:"BO"},{name:"Quillacollo",region:"Cochabamba",country:"BO"},{name:"Bolívar",region:"Cochabamba",country:"BO"},{name:"Tapacarí",region:"Cochabamba",country:"BO"},{name:"Tiraque",region:"Cochabamba",country:"BO"},{name:"Abel Iturralde",region:"La Paz",country:"BO"},{name:"Aroma",region:"La Paz",country:"BO"},{name:"Bautista Saavedra",region:"La Paz",country:"BO"},{name:"Caranavi",region:"La Paz",country:"BO"},{name:"Eliodoro Camacho",region:"La Paz",country:"BO"},{name:"Franz Tamayo",region:"La Paz",country:"BO"},{name:"Gualberto Villarroel",region:"La Paz",country:"BO"},{name:"Ingavi",region:"La Paz",country:"BO"},{name:"Inquisivi",region:"La Paz",country:"BO"},{name:"José Manuel Pando",region:"La Paz",country:"BO"},{name:"Larecaja",region:"La Paz",country:"BO"},{name:"Loayza",region:"La Paz",country:"BO"},{name:"Los Andes",region:"La Paz",country:"BO"},{name:"Manco Kapac",region:"La Paz",country:"BO"},{name:"Muñecas",region:"La Paz",country:"BO"},{name:"Nor Yungas",region:"La Paz",country:"BO"},{name:"Omasuyos",region:"La Paz",country:"BO"},{name:"Pacajes",region:"La Paz",country:"BO"},{name:"Murillo",region:"La Paz",country:"BO"},{name:"Sud Yungas",region:"La Paz",country:"BO"},{name:"Atahuallpa",region:"Oruro",country:"BO"},{name:"Carangas",region:"Oruro",country:"BO"},{name:"Cercado",region:"Oruro",country:"BO"},{name:"Eduardo Avaroa",region:"Oruro",country:"BO"},{name:"Ladislao Cabrera",region:"Oruro",country:"BO"},{name:"Litoral",region:"Oruro",country:"BO"},{name:"Nor Carangas",region:"Oruro",country:"BO"},{name:"Pantaléon Dalence",region:"Oruro",country:"BO"},{name:"Poopó",region:"Oruro",country:"BO"},{name:"Puerto de Mejillones",region:"Oruro",country:"BO"},{name:"Sajama",region:"Oruro",country:"BO"},{name:"San Pedro de Totora",region:"Oruro",country:"BO"},{name:"Saucarí",region:"Oruro",country:"BO"},{name:"Sebastián Pagador",region:"Oruro",country:"BO"},{name:"Sud Carangas",region:"Oruro",country:"BO"},{name:"Tomas Barrón",region:"Oruro",country:"BO"},{name:"Abuná",region:"Pando",country:"BO"},{name:"Federico Román",region:"Pando",country:"BO"},{name:"Madre de Dios",region:"Pando",country:"BO"},{name:"Manuripi",region:"Pando",country:"BO"},{name:"Nicolás Suárez",region:"Pando",country:"BO"},{name:"Alonso de Ibáñez",region:"Potosí",country:"BO"},{name:"Antonio Quijarro",region:"Potosí",country:"BO"},{name:"Bernardino Bilbao",region:"Potosí",country:"BO"},{name:"Charcas",region:"Potosí",country:"BO"},{name:"Chayanta",region:"Potosí",country:"BO"},{name:"Cornelio Saavedra",region:"Potosí",country:"BO"},{name:"Daniel Campos",region:"Potosí",country:"BO"},{name:"Enrique Baldivieso",region:"Potosí",country:"BO"},{name:"José María Linares",region:"Potosí",country:"BO"},{name:"Modesto Omiste",region:"Potosí",country:"BO"},{name:"Nor Chichas",region:"Potosí",country:"BO"},{name:"Nor Lípez",region:"Potosí",country:"BO"},{name:"Rafael Bustillo",region:"Potosí",country:"BO"},{name:"Sur Chichas",region:"Potosí",country:"BO"},{name:"Sur Lípez",region:"Potosí",country:"BO"},{name:"Tomás Frías",region:"Potosí",country:"BO"},{name:"Andrés Ibáñez",region:"Santa Cruz",country:"BO"},{name:"Ángel Sandoval",region:"Santa Cruz",country:"BO"},{name:"Chiquitos",region:"Santa Cruz",country:"BO"},{name:"Cordillera",region:"Santa Cruz",country:"BO"},{name:"Florida",region:"Santa Cruz",country:"BO"},{name:"Germán Busch",region:"Santa Cruz",country:"BO"},{name:"Guarayos",region:"Santa Cruz",country:"BO"},{name:"Ichilo",region:"Santa Cruz",country:"BO"},{name:"Ignacio Warnes",region:"Santa Cruz",country:"BO"},{name:"José Miguel de Velasco",region:"Santa Cruz",country:"BO"},{name:"Manuel María Caballero",region:"Santa Cruz",country:"BO"},{name:"Ñuflo de Chávez",region:"Santa Cruz",country:"BO"},{name:"Obispo Santistevan",region:"Santa Cruz",country:"BO"},{name:"Sara",region:"Santa Cruz",country:"BO"},{name:"Vallegrande",region:"Santa Cruz",country:"BO"},{name:"Aniceto Arce",region:"Tarija",country:"BO"},{name:"Burnet O'Connor",region:"Tarija",country:"BO"},{name:"Cercado",region:"Tarija",country:"BO"},{name:"Eustaquio Méndez",region:"Tarija",country:"BO"},{name:"Gran Chaco",region:"Tarija",country:"BO"},{name:"José María Avilés",region:"Tarija",country:"BO"},{name:"La Coruña",short:"C",country:"ES"},{name:"Lugo",short:"LU",country:"ES"},{name:"Vizcaya",short:"BI",country:"ES"},{name:"Guipúzcoa",short:"SS",country:"ES"},{name:"Huesca",short:"HU",country:"ES"},{name:"Lérida",short:"L",country:"ES"},{name:"Gerona",short:"GI",country:"ES"},{name:"Barcelona",short:"B",country:"ES"},{name:"Tarragona",short:"T",country:"ES"},{name:"Castellón",short:"CS",country:"ES"},{name:"Valencia",short:"V",country:"ES"},{name:"Alicante",short:"A",country:"ES"},{name:"Murcia",short:"MU",country:"ES"},{name:"Zaragoza",short:"Z",country:"ES"},{name:"Teruel",short:"TE",country:"ES"},{name:"Cuenca",short:"CU",country:"ES"},{name:"Albacete",short:"AB",country:"ES"},{name:"Almeria",short:"AL",country:"ES"},{name:"Granada",short:"GR",country:"ES"},{name:"Málaga",short:"MA",country:"ES"},{name:"Tenerife",short:"TF",country:"ES"},{name:"Cádiz",short:"CA",country:"ES"},{name:"Sevilla",short:"SE",country:"ES"},{name:"Huelva",short:"H",country:"ES"},{name:"Las Palmas",short:"GC",country:"ES"},{name:"Madrid",short:"M",country:"ES"},{name:"Badajoz",short:"BA",country:"ES"},{name:"Cáceres",short:"CC",country:"ES"},{name:"Toledo",short:"TO",country:"ES"},{name:"Ciudad Real",short:"CR",country:"ES"},{name:"Salamanca",short:"SA",country:"ES"},{name:"Córdoba",short:"CO",country:"ES"},{name:"Jaén",short:"J",country:"ES"},{name:"Ávila",short:"AV",country:"ES"},{name:"Valladolid",short:"VA",country:"ES"},{name:"Zamora",short:"ZA",country:"ES"},{name:"Álava",short:"VI",country:"ES"},{name:"Segovia",short:"SG",country:"ES"},{name:"Burgos",short:"BU",country:"ES"},{name:"Pontevedra",short:"PO",country:"ES"},{name:"León",short:"LE",country:"ES"},{name:"Orense",short:"OU",country:"ES"},{name:"Palencia",short:"P",country:"ES"},{name:"La Rioja",short:"LO",country:"ES"},{name:"Soria",short:"SO",country:"ES"},{name:"Guadalajara",short:"GU",country:"ES"},{name:"বরগুনা",english:"Barguna",region:"Barisal",country:"BD"},{name:"বরিশাল",english:"Barisal",region:"Barisal",country:"BD"},{name:"ভোলা",english:"Bhola",region:"Barisal",country:"BD"},{name:"ঝালকাঠি",english:"Jhalokati",region:"Barisal",country:"BD"},{name:"পটুয়াখালী",english:"Patuakhali",region:"Barisal",country:"BD"},{name:"পিরোজপুর",english:"Pirojpur",region:"Barisal",country:"BD"},{name:"বান্দরবান",english:"Bandarban",region:"Chittagong",country:"BD"},{name:"ব্রাহ্মণবাড়ীয়া",english:"Brahmanbaria",region:"Chittagong",country:"BD"},{name:"চাঁদপুর",english:"Chandpur",region:"Chittagong",country:"BD"},{name:"চট্টগ্রাম",english:"Chittagong",region:"Chittagong",country:"BD"},{name:"কুমিল্লা",english:"Comilla",region:"Chittagong",country:"BD"},{name:"কক্সবাজার",english:"Cox's Bazar",region:"Chittagong",country:"BD"},{name:"ফেনী",english:"Feni",region:"Chittagong",country:"BD"},{name:"খাগড়াছড়ি",english:"Khagrachhari",region:"Chittagong",country:"BD"},{name:"লক্ষীপুর",english:"Lakshmipur",region:"Chittagong",country:"BD"},{name:"নোয়াখালী",english:"Noakhali",region:"Chittagong",country:"BD"},{name:"রাঙ্গামাটি",english:"Rangamati",region:"Chittagong",country:"BD"},{name:"ঢাকা",english:"Dhaka",region:"Dhaka",country:"BD"},{name:"ফরিদপুর",english:"Faridpur",region:"Dhaka",country:"BD"},{name:"গাজীপুর",english:"Gazipur",region:"Dhaka",country:"BD"},{name:"গোপালগঞ্জ",english:"Gopalganj",region:"Dhaka",country:"BD"},{name:"জামালপুর",english:"Jamalpur",region:"Dhaka",country:"BD"},{name:"কিশোরগঞ্জ",english:"Kishoreganj",region:"Dhaka",country:"BD"},{name:"মাদারীপুর",english:"Madaripur",region:"Dhaka",country:"BD"},{name:"মানিকগঞ্জ",english:"Manikganj",region:"Dhaka",country:"BD"},{name:"মুন্সীগঞ্জ",english:"Munshiganj",region:"Dhaka",country:"BD"},{name:"ময়মনসিংহ",english:"Mymensingh",region:"Dhaka",country:"BD"},{name:"নারায়ণগঞ্জ",english:"Narayanganj",region:"Dhaka",country:"BD"},{name:"নরসিংদী",english:"Narsingdi",region:"Dhaka",country:"BD"},{name:"নেত্রকোনা",english:"Netrakona",region:"Dhaka",country:"BD"},{name:"রাজবাড়ী",english:"Rajbari",region:"Dhaka",country:"BD"},{name:"শরীয়তপুর",english:"Shariatpur",region:"Dhaka",country:"BD"},{name:"শেরপুর",english:"Sherpur",region:"Dhaka",country:"BD"},{name:"টাঙ্গাইল",english:"Tangail",region:"Dhaka",country:"BD"},{name:"বাগেরহাট",english:"Bagerhat",region:"Khulna",country:"BD"},{name:"চুয়াডাঙ্গা",english:"Chuadanga",region:"Khulna",country:"BD"},{name:"যশোর",english:"Jessore",region:"Khulna",country:"BD"},{name:"ঝিনাইদহ",english:"Jhenaidah",region:"Khulna",country:"BD"},{name:"খুলনা",english:"Khulna",region:"Khulna",country:"BD"},{name:"কুষ্টিয়া",english:"Kushtia",region:"Khulna",country:"BD"},{name:"মাগুরা",english:"Magura",region:"Khulna",country:"BD"},{name:"মেহেরপুর",english:"Meherpur",region:"Khulna",country:"BD"},{name:"নড়াইল",english:"Narail",region:"Khulna",country:"BD"},{name:"সাতক্ষিরা",english:"Satkhira",region:"Khulna",country:"BD"},{name:"বগুড়া",english:"Bogra",region:"Rajshahi",country:"BD"},{name:"জয়পুরহাট",english:"Joypurhat",region:"Rajshahi",country:"BD"},{name:"নওগাঁ",english:"Naogaon",region:"Rajshahi",country:"BD"},{name:"নাটোর",english:"Natore",region:"Rajshahi",country:"BD"},{name:"নওয়াবগঞ্জ",english:"Chapainawabganj",region:"Rajshahi",country:"BD"},{name:"পাবনা",english:"Pabna",region:"Rajshahi",country:"BD"},{name:"রাজশাহী",english:"Rajshahi",region:"Rajshahi",country:"BD"},{name:"সিরাজগঞ্জ",english:"Sirajganj",region:"Rajshahi",country:"BD"},{name:"দিনাজপুর",english:"Dinajpur",region:"Rangpur",country:"BD"},{name:"গাইবান্ধা",english:"Gaibandha",region:"Rangpur",country:"BD"},{name:"কুড়িগ্রাম",english:"Kurigram",region:"Rangpur",country:"BD"},{name:"লালমনিরহাট",english:"Lalmonirhat",region:"Rangpur",country:"BD"},{name:"নীলফামারী",english:"Nilphamari",region:"Rangpur",country:"BD"},{name:"পঞ্চগড়",english:"Panchagarh",region:"Rangpur",country:"BD"},{name:"রংপুর",english:"Rangpur",region:"Rangpur",country:"BD"},{name:"ঠাকুরগাঁ",english:"Thakurgaon",region:"Rangpur",country:"BD"},{name:"হবিগঞ্জ",english:"Habiganj",region:"Sylhet",country:"BD"},{name:"মৌলভীবাজার",english:"Moulvibazar",region:"Sylhet",country:"BD"},{name:"সুনামগঞ্জ",english:"Sunamganj",region:"Sylhet",country:"BD"},{name:"সিলেট",english:"Sylhet",region:"Sylhet",country:"BD"},{name:"Azad Kashmir",country:"PK"},{name:"Bahawalpur",country:"PK"},{name:"Bannu",country:"PK"},{name:"Dera Ghazi Khan",country:"PK"},{name:"Dera Ismail Khan",country:"PK"},{name:"Faisalabad",country:"PK"},{name:"F.A.T.A.",country:"PK"},{name:"Gujranwala",country:"PK"},{name:"Hazara",country:"PK"},{name:"Hyderabad",country:"PK"},{name:"Islamabad",country:"PK"},{name:"Kalat",country:"PK"},{name:"Karachi",country:"PK"},{name:"Kohat",country:"PK"},{name:"Lahore",country:"PK"},{name:"Larkana",country:"PK"},{name:"Makran",country:"PK"},{name:"Malakand",country:"PK"},{name:"Mardan",country:"PK"},{name:"Mirpur Khas",country:"PK"},{name:"Multan",country:"PK"},{name:"Nasirabad",country:"PK"},{name:"Northern Areas",country:"PK"},{name:"Peshawar",country:"PK"},{name:"Quetta",country:"PK"},{name:"Rawalpindi",country:"PK"},{name:"Sargodha",country:"PK"},{name:"Sahiwal",country:"PK"},{name:"Sibi",country:"PK"},{name:"Sukkur",country:"PK"},{name:"Zhob",country:"PK"},{short:"AB",name:"Abia",country:"NG"},{short:"FC",name:"Abuja",country:"NG"},{short:"AD",name:"Adamawa",country:"NG"},{short:"AK",name:"Akwa Ibom",country:"NG"},{short:"AN",name:"Anambra",country:"NG"},{short:"BA",name:"Bauchi",country:"NG"},{short:"BY",name:"Bayelsa",country:"NG"},{short:"BE",name:"Benue",country:"NG"},{short:"BO",name:"Borno",country:"NG"},{short:"CR",name:"Cross River",country:"NG"},{short:"DE",name:"Delta",country:"NG"},{short:"EB",name:"Ebonyi",country:"NG"},{short:"ED",name:"Edo",country:"NG"},{short:"EK",name:"Ekiti",country:"NG"},{short:"EN",name:"Enugu",country:"NG"},{short:"GO",name:"Gombe",country:"NG"},{short:"IM",name:"Imo",country:"NG"},{short:"JI",name:"Jigawa",country:"NG"},{short:"KD",name:"Kaduna",country:"NG"},{short:"KN",name:"Kano",country:"NG"},{short:"KT",name:"Katsina",country:"NG"},{short:"KE",name:"Kebbi",country:"NG"},{short:"KO",name:"Kogi",country:"NG"},{short:"KW",name:"Kwara",country:"NG"},{short:"LA",name:"Lagos",country:"NG"},{short:"NA",name:"Nasarawa",country:"NG"},{short:"NI",name:"Niger",country:"NG"},{short:"OG",name:"Ogun",country:"NG"},{short:"ON",name:"Ondo",country:"NG"},{short:"OS",name:"Osun",country:"NG"},{short:"OY",name:"Oyo",country:"NG"},{short:"PL",name:"Plateau",country:"NG"},{short:"RI",name:"Rivers",country:"NG"},{short:"SO",name:"Sokoto",country:"NG"},{short:"TA",name:"Taraba",country:"NG"},{short:"YO",name:"Yobe",country:"NG"},{short:"ZA",name:"Zamfara",country:"NG"},{name:"愛知県",english:"Aichi",country:"JP"},{name:"秋田県",english:"Akita",country:"JP"},{name:"青森県",english:"Aomori",country:"JP"},{name:"千葉県",english:"Chiba",country:"JP"},{name:"愛媛県",english:"Ehime",country:"JP"},{name:"福井県",english:"Fukui",country:"JP"},{name:"福岡県",english:"Fukuoka",country:"JP"},{name:"福島県",english:"Fukushima",country:"JP"},{name:"岐阜県",english:"Gifu",country:"JP"},{name:"群馬県",english:"Gunma",country:"JP"},{name:"広島県",english:"Hiroshima",country:"JP"},{name:"北海道",english:"Hokkaidō",country:"JP"},{name:"兵庫県",english:"Hyōgo",country:"JP"},{name:"茨城県",english:"Ibaraki",country:"JP"},{name:"石川県",english:"Ishikawa",country:"JP"},{name:"岩手県",english:"Iwate",country:"JP"},{name:"香川県",english:"Kagawa",country:"JP"},{name:"鹿児島県",english:"Kagoshima",country:"JP"},{name:"神奈川県",english:"Kanagawa",country:"JP"},{name:"高知県",english:"Kōchi",country:"JP"},{name:"熊本県",english:"Kumamoto",country:"JP"},{name:"京都府",english:"Kyōto",country:"JP"},{name:"三重県",english:"Mie",country:"JP"},{name:"宮城県",english:"Miyagi",country:"JP"},{name:"宮崎県",english:"Miyazaki",country:"JP"},{name:"長野県",english:"Nagano",country:"JP"},{name:"長崎県",english:"Nagasaki",country:"JP"},{name:"奈良県",english:"Nara",country:"JP"},{name:"新潟県",english:"Niigata",country:"JP"},{name:"大分県",english:"Ōita",country:"JP"},{name:"岡山県",english:"Okayama",country:"JP"},{name:"沖縄県",english:"Okinawa",country:"JP"},{name:"大阪府",english:"Ōsaka",country:"JP"},{name:"佐賀県",english:"Saga",country:"JP"},{name:"埼玉県",english:"Saitama",country:"JP"},{name:"滋賀県",english:"Shiga",country:"JP"},{name:"島根県",english:"Shimane",country:"JP"},{name:"静岡県",english:"Shizuoka",country:"JP"},{name:"栃木県",english:"Tochigi",country:"JP"},{name:"徳島県",english:"Tokushima",country:"JP"},{name:"東京都",english:"Tōkyō",country:"JP"},{name:"鳥取県",english:"Tottori",country:"JP"},{name:"富山県",english:"Toyama",country:"JP"},{name:"和歌山県",english:"Wakayama",country:"JP"},{name:"山形県",english:"Yamagata",country:"JP"},{name:"山口県",english:"Yamaguchi",country:"JP"},{name:"山梨県",english:"Yamanashi",country:"JP"},{short:"B",name:"Burgenland",country:"AT"},{short:"K",name:"Kärnten",country:"AT"},{short:"NÖ",name:"Niederösterreich",country:"AT"},{short:"OÖ",name:"Oberösterreich",country:"AT"},{short:"S",name:"Salzburg",country:"AT"},{short:"ST",name:"Steiermark",country:"AT"},{short:"T",name:"Tirol",country:"AT"},{short:"V",name:"Vorarlberg",country:"AT"},{short:"W",name:"Wien",country:"AT"},{short:"AC",name:"Acre",country:"BR"},{short:"AL",name:"Alagoas",country:"BR"},{short:"AP",name:"Amapá",country:"BR"},{short:"AM",name:"Amazonas",country:"BR"},{short:"BA",name:"Bahia",country:"BR"},{short:"CE",name:"Ceará",country:"BR"},{short:"DF",name:"Distrito Federal",country:"BR"},{short:"ES",name:"Espírito Santo",country:"BR"},{short:"GO",name:"Goiás",country:"BR"},{short:"MA",name:"Maranhão",country:"BR"},{short:"MT",name:"Mato Grosso",country:"BR"},{short:"MS",name:"Mato Grosso do Sul",country:"BR"},{short:"MG",name:"Minas Gerais",country:"BR"},{short:"PA",name:"Pará",country:"BR"},{short:"PB",name:"Paraíba",country:"BR"},{short:"PR",name:"Paraná",country:"BR"},{short:"PE",name:"Pernambuco",country:"BR"},{short:"PI",name:"Piauí",country:"BR"},{short:"RJ",name:"Rio de Janeiro",country:"BR"},{short:"RN",name:"Rio Grande do Norte",country:"BR"},{short:"RS",name:"Rio Grande do Sul",country:"BR"},{short:"RO",name:"Rondônia",country:"BR"},{short:"RR",name:"Roraima",country:"BR"},{short:"SC",name:"Santa Catarina",country:"BR"},{short:"SP",name:"São Paulo",country:"BR"},{short:"SE",name:"Sergipe",country:"BR"},{short:"TO",name:"Tocantins",country:"BR"},{name:"Abra",country:"PH"},{name:"Agusan del Norte",country:"PH"},{name:"Agusan del Sur",country:"PH"},{name:"Aklan",country:"PH"},{name:"Albay",country:"PH"},{name:"Antique",country:"PH"},{name:"Apayao",country:"PH"},{name:"Aurora",country:"PH"},{name:"Basilan",country:"PH"},{name:"Bataan",country:"PH"},{name:"Batanes",country:"PH"},{name:"Batangas",country:"PH"},{name:"Benguet",country:"PH"},{name:"Biliran",country:"PH"},{name:"Bohol",country:"PH"},{name:"Bukidnon",country:"PH"},{name:"Bulacan",country:"PH"},{name:"Cagayan",country:"PH"},{name:"Camarines Norte",country:"PH"},{name:"Camarines Sur",country:"PH"},{name:"Camiguin",country:"PH"},{name:"Capiz",country:"PH"},{name:"Catanduanes",country:"PH"},{name:"Cavite",country:"PH"},{name:"Cebu",country:"PH"},{name:"Compostela Valley",country:"PH"},{name:"Cotabato",country:"PH"},{name:"Davao del Norte",country:"PH"},{name:"Davao del Sur",country:"PH"},{name:"Davao Occidental",country:"PH"},{name:"Davao Oriental",country:"PH"},{name:"Dinagat Islands",country:"PH"},{name:"Eastern Samar",country:"PH"},{name:"Guimaras",country:"PH"},{name:"Ifugao",country:"PH"},{name:"Ilocos Norte",country:"PH"},{name:"Ilocos Sur",country:"PH"},{name:"Iloilo",country:"PH"},{name:"Isabela",country:"PH"},{name:"Kalinga",country:"PH"},{name:"La Union",country:"PH"},{name:"Laguna",country:"PH"},{name:"Lanao del Norte",country:"PH"},{name:"Lanao del Sur",country:"PH"},{name:"Leyte",country:"PH"},{name:"Maguindanao",country:"PH"},{name:"Marinduque",country:"PH"},{name:"Masbate",country:"PH"},{name:"Misamis Occidental",country:"PH"},{name:"Misamis Oriental",country:"PH"},{name:"Mountain Province",country:"PH"},{name:"Negros Occidental",country:"PH"},{name:"Negros Oriental",country:"PH"},{name:"Northern Samar",country:"PH"},{name:"Nueva Ecija",country:"PH"},{name:"Nueva Vizcaya",country:"PH"},{name:"Occidental Mindoro",country:"PH"},{name:"Oriental Mindoro",country:"PH"},{name:"Palawan",country:"PH"},{name:"Pampanga",country:"PH"},{name:"Pangasinan",country:"PH"},{name:"Quezon",country:"PH"},{name:"Quirino",country:"PH"},{name:"Rizal",country:"PH"},{name:"Romblon",country:"PH"},{name:"Samar",country:"PH"},{name:"Sarangani",country:"PH"},{name:"Siquijor",country:"PH"},{name:"Sorsogon",country:"PH"},{name:"South Cotabato",country:"PH"},{name:"Southern Leyte",country:"PH"},{name:"Sultan Kudarat",country:"PH"},{name:"Sulu",country:"PH"},{name:"Surigao del Norte",country:"PH"},{name:"Surigao del Sur",country:"PH"},{name:"Tarlac",country:"PH"},{name:"Tawi-Tawi",country:"PH"},{name:"Zambales",country:"PH"},{name:"Zamboanga del Norte",country:"PH"},{name:"Zamboanga del Sur",country:"PH"},{name:"Zamboanga Sibugay",country:"PH"},{name:"Metro Manila",country:"PH"},{name:"Hà Nội",country:"VN"},{name:"Hà Giang",country:"VN"},{name:"Cao Bằng",country:"VN"},{name:"Bắc Kạn",country:"VN"},{name:"Tuyên Quang",country:"VN"},{name:"Lào Cai",country:"VN"},{name:"Điện Biên",country:"VN"},{name:"Lai Châu",country:"VN"},{name:"Sơn La",country:"VN"},{name:"Yên Bái",country:"VN"},{name:"Hòa Bình",country:"VN"},{name:"Thái Nguyên",country:"VN"},{name:"Lạng Sơn",country:"VN"},{name:"Quảng Ninh",country:"VN"},{name:"Bắc Giang",country:"VN"},{name:"Phú Thọ",country:"VN"},{name:"Vĩnh Phúc",country:"VN"},{name:"Bắc Ninh",country:"VN"},{name:"Hải Dương",country:"VN"},{name:"Hải Phòng",country:"VN"},{name:"Hưng Yên",country:"VN"},{name:"Thái Bình",country:"VN"},{name:"Hà Nam",country:"VN"},{name:"Nam Định",country:"VN"},{name:"Ninh Bình",country:"VN"},{name:"Thanh Hóa",country:"VN"},{name:"Nghệ An",country:"VN"},{name:"Hà Tĩnh",country:"VN"},{name:"Quảng Bình",country:"VN"},{name:"Quảng Trị",country:"VN"},{name:"Thừa Thiên–Huế",country:"VN"},{name:"Đà Nẵng",country:"VN"},{name:"Quảng Nam",country:"VN"},{name:"Quảng Ngãi",country:"VN"},{name:"Bình Định",country:"VN"},{name:"Phú Yên",country:"VN"},{name:"Khánh Hòa",country:"VN"},{name:"Ninh Thuận",country:"VN"},{name:"Bình Thuận",country:"VN"},{name:"Kon Tum",country:"VN"},{name:"Gia Lai",country:"VN"},{name:"Đắk Lắk",country:"VN"},{name:"Đắk Nông",country:"VN"},{name:"Lâm Đồng",country:"VN"},{name:"Bình Phước",country:"VN"},{name:"Tây Ninh",country:"VN"},{name:"Bình Dương",country:"VN"},{name:"Đồng Nai",country:"VN"},{name:"Bà Rịa–Vũng Tàu",country:"VN"},{name:"Thành phố Hồ Chí Minh",country:"VN"},{name:"Long An",country:"VN"},{name:"Tiền Giang",country:"VN"},{name:"Bến Tre",country:"VN"},{name:"Trà Vinh",country:"VN"},{name:"Vĩnh Long",country:"VN"},{name:"Đồng Tháp",country:"VN"},{name:"An Giang",country:"VN"},{name:"Kiên Giang",country:"VN"},{name:"Cần Thơ",country:"VN"},{name:"Hậu Giang",country:"VN"},{name:"Sóc Trăng",country:"VN"},{name:"Bạc Liêu",country:"VN"},{name:"Cà Mau",country:"VN"},{name:"San José",country:"CR"},{name:"Alajuela",country:"CR"},{name:"Cartago",country:"CR"},{name:"Heredia",country:"CR"},{name:"Guanacaste",country:"CR"},{name:"Puntarenas",country:"CR"},{name:"Limón",country:"CR"},{name:"Auckland",country:"NZ"},{name:"New Plymouth",country:"NZ"},{name:"Hawke's Bay",country:"NZ"},{name:"Wellington",country:"NZ"},{name:"Nelson",country:"NZ"},{name:"Marlborough",country:"NZ"},{name:"Westland",country:"NZ"},{name:"Canterbury",country:"NZ"},{name:"Otago",country:"NZ"},{name:"Southland",country:"NZ"}];var M=Object.defineProperty,L=Object.getOwnPropertyDescriptor,O=(n,a,e,o)=>{for(var r=o>1?void 0:o?L(a,e):a,t=n.length-1,c;t>=0;t--)(c=n[t])&&(r=(o?c(a,e,r):c(r))||r);return o&&r&&M(a,e,r),r};window.countries=window.countries||I.sort((n,a)=>n.namea.name?1:0);window.provinces=window.provinces||T.sort((n,a)=>n.namea.name?1:0);window.countryNameCache={};window.countryRegionsCache={};let P=class extends m{getCountries(){return window.countries}getCountryName(n){if(!n)return null;if(window.countryNameCache[n])return window.countryNameCache[n];const a=window.countries.find(o=>o.code===n),e=a?a.name:null;return window.countryNameCache[n]=e,e}getCountryRegions(n){if(!n)return null;if(window.countryRegionsCache[n])return window.countryRegionsCache[n];const a=window.provinces.filter(e=>e.country===n).map(e=>({name:e.english||e.name,short:e.short&&e.short.length<=2?e.short:"--"}));return window.countryRegionsCache[n]=a,a}};P=O([g({})],P);var R=Object.defineProperty,G=Object.getOwnPropertyDescriptor,b=(n,a,e,o)=>{for(var r=o>1?void 0:o?G(a,e):a,t=n.length-1,c;t>=0;t--)(c=n[t])&&(r=(o?c(a,e,r):c(r))||r);return o&&r&&R(a,e,r),r};let B=class extends m{createVuetifyRulesObject(n){const a={streetAddress:[],streetAddressAdditional:[],addressCity:[],addressRegion:[],postalCode:[],addressCountry:[],deliveryInstructions:[]};return this.$v&&this.$v[n]&&Object.keys(this.$v[n]).filter(e=>e.charAt(0)!=="$").forEach(e=>{a[e]=[],Object.keys(this.$v[n][e].$params).forEach(o=>{switch(o){case"required":a[e].push(()=>this.requiredRule(n,e));break;case"minLength":a[e].push(()=>this.minLengthRule(n,e));break;case"maxLength":a[e].push(()=>this.maxLengthRule(n,e));break;case"isCanada":a[e].push(()=>this.isCanadaRule(n,e));break;case"isBC":a[e].push(()=>this.isBCRule(n,e));break}})}),a}requiredRule(n,a){return!!(this.$v[n]&&this.$v[n][a].required)||"This field is required"}minLengthRule(n,a){const e=this.$v[n][a].$params.minLength.min;return!!(this.$v[n]&&this.$v[n][a].minLength)||`Minimum length is ${e}`}maxLengthRule(n,a){const e=this.$v[n][a].$params.maxLength.max;return!!(this.$v[n]&&this.$v[n][a].maxLength)||`Maximum length is ${e}`}isCanadaRule(n,a){return!!(this.$v[n]&&this.$v[n][a].isCanada)||"Address must be in Canada"}isBCRule(n,a){return!!(this.$v[n]&&this.$v[n][a].isBC)||"Address must be in BC"}};B=b([g({})],B);export{P as C,l as D,d as N,B as V}; -//# sourceMappingURL=validation-mixin-2ad1b825.js.map +(NR may still be processing)`:"Invalid NR applicants":"Invalid NR object"}getNrState(n){return n?n.state===u.CONDITIONAL&&n.consentFlag!==null&&n.consentFlag!=="R"&&n.consentFlag!=="N"?u.NEED_CONSENT:[u.APPROVED,u.CONDITIONAL,u.EXPIRED,u.CONSUMED].includes(n.state)?n.state:u.NOT_APPROVED:null}getNrApprovedName(n){var a,e;return((a=n==null?void 0:n.names)==null?void 0:a.length)>0?(e=n.names.find(o=>[u.APPROVED,u.CONDITION].includes(o.state)))==null?void 0:e.name:null}getNrRequestDesc(n){switch(n){case i.NEW_BUSINESS:return"New Business";case i.CHANGE_NAME:return"Change of Name";case i.CONVERSION:return"Conversion";case i.RESTORE:return"Restoration"}return null}};d=D([g({})],d);const I=[{code:"AD",name:"Andorra"},{code:"AE",name:"United Arab Emirates"},{code:"AF",name:"Afghanistan"},{code:"AG",name:"Antigua and Barbuda"},{code:"AI",name:"Anguilla"},{code:"AL",name:"Albania"},{code:"AM",name:"Armenia"},{code:"AO",name:"Angola"},{code:"AQ",name:"Antarctica"},{code:"AR",name:"Argentina"},{code:"AS",name:"American Samoa"},{code:"AT",name:"Austria"},{code:"AU",name:"Australia"},{code:"AW",name:"Aruba"},{code:"AX",name:"Åland Islands"},{code:"AZ",name:"Azerbaijan"},{code:"BA",name:"Bosnia and Herzegovina"},{code:"BB",name:"Barbados"},{code:"BD",name:"Bangladesh"},{code:"BE",name:"Belgium"},{code:"BF",name:"Burkina Faso"},{code:"BG",name:"Bulgaria"},{code:"BH",name:"Bahrain"},{code:"BI",name:"Burundi"},{code:"BJ",name:"Benin"},{code:"BL",name:"Saint Barthélemy"},{code:"BM",name:"Bermuda"},{code:"BN",name:"Brunei Darussalam"},{code:"BO",name:"Bolivia, Plurinational State of"},{code:"BQ",name:"Bonaire, Sint Eustatius and Saba"},{code:"BR",name:"Brazil"},{code:"BS",name:"Bahamas"},{code:"BT",name:"Bhutan"},{code:"BV",name:"Bouvet Island"},{code:"BW",name:"Botswana"},{code:"BY",name:"Belarus"},{code:"BZ",name:"Belize"},{code:"CA",name:"Canada"},{code:"CC",name:"Cocos (Keeling) Islands"},{code:"CD",name:"Congo, Democratic Republic of the"},{code:"CF",name:"Central African Republic"},{code:"CG",name:"Congo"},{code:"CH",name:"Switzerland"},{code:"CI",name:"Côte d'Ivoire"},{code:"CK",name:"Cook Islands"},{code:"CL",name:"Chile"},{code:"CM",name:"Cameroon"},{code:"CN",name:"China"},{code:"CO",name:"Colombia"},{code:"CR",name:"Costa Rica"},{code:"CU",name:"Cuba"},{code:"CV",name:"Cabo Verde"},{code:"CW",name:"Curaçao"},{code:"CX",name:"Christmas Island"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czechia"},{code:"DE",name:"Germany"},{code:"DJ",name:"Djibouti"},{code:"DK",name:"Denmark"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"DZ",name:"Algeria"},{code:"EC",name:"Ecuador"},{code:"EE",name:"Estonia"},{code:"EG",name:"Egypt"},{code:"EH",name:"Western Sahara"},{code:"ER",name:"Eritrea"},{code:"ES",name:"Spain"},{code:"ET",name:"Ethiopia"},{code:"FI",name:"Finland"},{code:"FJ",name:"Fiji"},{code:"FK",name:"Falkland Islands (Malvinas)"},{code:"FM",name:"Micronesia, Federated States of"},{code:"FO",name:"Faroe Islands"},{code:"FR",name:"France"},{code:"GA",name:"Gabon"},{code:"GB",name:"United Kingdom of Great Britain and Northern Ireland"},{code:"GD",name:"Grenada"},{code:"GE",name:"Georgia"},{code:"GF",name:"French Guiana"},{code:"GG",name:"Guernsey"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GL",name:"Greenland"},{code:"GM",name:"Gambia"},{code:"GN",name:"Guinea"},{code:"GP",name:"Guadeloupe"},{code:"GQ",name:"Equatorial Guinea"},{code:"GR",name:"Greece"},{code:"GS",name:"South Georgia and the South Sandwich Islands"},{code:"GT",name:"Guatemala"},{code:"GU",name:"Guam"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HK",name:"Hong Kong"},{code:"HM",name:"Heard Island and McDonald Islands"},{code:"HN",name:"Honduras"},{code:"HR",name:"Croatia"},{code:"HT",name:"Haiti"},{code:"HU",name:"Hungary"},{code:"ID",name:"Indonesia"},{code:"IE",name:"Ireland"},{code:"IL",name:"Israel"},{code:"IM",name:"Isle of Man"},{code:"IN",name:"India"},{code:"IO",name:"British Indian Ocean Territory"},{code:"IQ",name:"Iraq"},{code:"IR",name:"Iran, Islamic Republic of"},{code:"IS",name:"Iceland"},{code:"IT",name:"Italy"},{code:"JE",name:"Jersey"},{code:"JM",name:"Jamaica"},{code:"JO",name:"Jordan"},{code:"JP",name:"Japan"},{code:"KE",name:"Kenya"},{code:"KG",name:"Kyrgyzstan"},{code:"KH",name:"Cambodia"},{code:"KI",name:"Kiribati"},{code:"KM",name:"Comoros"},{code:"KN",name:"Saint Kitts and Nevis"},{code:"KP",name:"Korea, Democratic People's Republic of"},{code:"KR",name:"Korea, Republic of"},{code:"KW",name:"Kuwait"},{code:"KY",name:"Cayman Islands"},{code:"KZ",name:"Kazakhstan"},{code:"LA",name:"Lao People's Democratic Republic"},{code:"LB",name:"Lebanon"},{code:"LC",name:"Saint Lucia"},{code:"LI",name:"Liechtenstein"},{code:"LK",name:"Sri Lanka"},{code:"LR",name:"Liberia"},{code:"LS",name:"Lesotho"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"LV",name:"Latvia"},{code:"LY",name:"Libya"},{code:"MA",name:"Morocco"},{code:"MC",name:"Monaco"},{code:"MD",name:"Moldova, Republic of"},{code:"ME",name:"Montenegro"},{code:"MF",name:"Saint Martin, (French part)"},{code:"MG",name:"Madagascar"},{code:"MH",name:"Marshall Islands"},{code:"MK",name:"North Macedonia"},{code:"ML",name:"Mali"},{code:"MM",name:"Myanmar"},{code:"MN",name:"Mongolia"},{code:"MO",name:"Macao"},{code:"MP",name:"Northern Mariana Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MS",name:"Montserrat"},{code:"MT",name:"Malta"},{code:"MU",name:"Mauritius"},{code:"MV",name:"Maldives"},{code:"MW",name:"Malawi"},{code:"MX",name:"Mexico"},{code:"MY",name:"Malaysia"},{code:"MZ",name:"Mozambique"},{code:"NA",name:"Namibia"},{code:"NC",name:"New Caledonia"},{code:"NE",name:"Niger"},{code:"NF",name:"Norfolk Island"},{code:"NG",name:"Nigeria"},{code:"NI",name:"Nicaragua"},{code:"NL",name:"Netherlands"},{code:"NO",name:"Norway"},{code:"NP",name:"Nepal"},{code:"NR",name:"Nauru"},{code:"NU",name:"Niue"},{code:"NZ",name:"New Zealand"},{code:"OM",name:"Oman"},{code:"PA",name:"Panama"},{code:"PE",name:"Peru"},{code:"PF",name:"French Polynesia"},{code:"PG",name:"Papua New Guinea"},{code:"PH",name:"Philippines"},{code:"PK",name:"Pakistan"},{code:"PL",name:"Poland"},{code:"PM",name:"Saint Pierre and Miquelon"},{code:"PN",name:"Pitcairn"},{code:"PR",name:"Puerto Rico"},{code:"PS",name:"Palestine, State of"},{code:"PT",name:"Portugal"},{code:"PW",name:"Palau"},{code:"PY",name:"Paraguay"},{code:"QA",name:"Qatar"},{code:"RE",name:"Réunion"},{code:"RO",name:"Romania"},{code:"RS",name:"Serbia"},{code:"RU",name:"Russian Federation"},{code:"RW",name:"Rwanda"},{code:"SA",name:"Saudi Arabia"},{code:"SB",name:"Solomon Islands"},{code:"SC",name:"Seychelles"},{code:"SD",name:"Sudan"},{code:"SE",name:"Sweden"},{code:"SG",name:"Singapore"},{code:"SH",name:"Saint Helena, Ascension and Tristan da Cunha"},{code:"SI",name:"Slovenia"},{code:"SJ",name:"Svalbard and Jan Mayen"},{code:"SK",name:"Slovakia"},{code:"SL",name:"Sierra Leone"},{code:"SM",name:"San Marino"},{code:"SN",name:"Senegal"},{code:"SO",name:"Somalia"},{code:"SR",name:"Suriname"},{code:"SS",name:"South Sudan"},{code:"ST",name:"Sao Tome and Principe"},{code:"SV",name:"El Salvador"},{code:"SX",name:"Sint Maarten, (Dutch part)"},{code:"SY",name:"Syrian Arab Republic"},{code:"SZ",name:"Eswatini"},{code:"TC",name:"Turks and Caicos Islands"},{code:"TD",name:"Chad"},{code:"TF",name:"French Southern Territories"},{code:"TG",name:"Togo"},{code:"TH",name:"Thailand"},{code:"TJ",name:"Tajikistan"},{code:"TK",name:"Tokelau"},{code:"TL",name:"Timor-Leste"},{code:"TM",name:"Turkmenistan"},{code:"TN",name:"Tunisia"},{code:"TO",name:"Tonga"},{code:"TR",name:"Türkiye"},{code:"TT",name:"Trinidad and Tobago"},{code:"TV",name:"Tuvalu"},{code:"TW",name:"Taiwan, Province of China"},{code:"TZ",name:"Tanzania, United Republic of"},{code:"UA",name:"Ukraine"},{code:"UG",name:"Uganda"},{code:"UM",name:"United States Minor Outlying Islands"},{code:"US",name:"United States of America"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VA",name:"Holy See"},{code:"VC",name:"Saint Vincent and the Grenadines"},{code:"VE",name:"Venezuela, Bolivarian Republic of"},{code:"VG",name:"Virgin Islands, British"},{code:"VI",name:"Virgin Islands, U.S."},{code:"VN",name:"Viet Nam"},{code:"VU",name:"Vanuatu"},{code:"WF",name:"Wallis and Futuna"},{code:"WS",name:"Samoa"},{code:"YE",name:"Yemen"},{code:"YT",name:"Mayotte"},{code:"ZA",name:"South Africa"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}],T=[{short:"AL",name:"Alabama",country:"US"},{short:"AK",name:"Alaska",country:"US"},{short:"AZ",name:"Arizona",country:"US"},{short:"AR",name:"Arkansas",country:"US"},{short:"CA",name:"California",country:"US"},{short:"CO",name:"Colorado",country:"US"},{short:"CT",name:"Connecticut",country:"US"},{short:"DC",name:"District of Columbia",alt:["Washington DC","Washington D.C."],country:"US"},{short:"DE",name:"Delaware",country:"US"},{short:"FL",name:"Florida",country:"US"},{short:"GA",name:"Georgia",country:"US"},{short:"HI",name:"Hawaii",country:"US"},{short:"ID",name:"Idaho",country:"US"},{short:"IL",name:"Illinois",country:"US"},{short:"IN",name:"Indiana",country:"US"},{short:"IA",name:"Iowa",country:"US"},{short:"KS",name:"Kansas",country:"US"},{short:"KY",name:"Kentucky",country:"US"},{short:"LA",name:"Louisiana",country:"US"},{short:"ME",name:"Maine",country:"US"},{short:"MD",name:"Maryland",country:"US"},{short:"MA",name:"Massachusetts",country:"US"},{short:"MI",name:"Michigan",country:"US"},{short:"MN",name:"Minnesota",country:"US"},{short:"MS",name:"Mississippi",country:"US"},{short:"MO",name:"Missouri",country:"US"},{short:"MT",name:"Montana",country:"US"},{short:"NE",name:"Nebraska",country:"US"},{short:"NV",name:"Nevada",country:"US"},{short:"NH",name:"New Hampshire",country:"US"},{short:"NJ",name:"New Jersey",country:"US"},{short:"NM",name:"New Mexico",country:"US"},{short:"NY",name:"New York",country:"US"},{short:"NC",name:"North Carolina",country:"US"},{short:"ND",name:"North Dakota",country:"US"},{short:"OH",name:"Ohio",country:"US"},{short:"OK",name:"Oklahoma",country:"US"},{short:"OR",name:"Oregon",country:"US"},{short:"PA",name:"Pennsylvania",country:"US"},{short:"RI",name:"Rhode Island",country:"US"},{short:"SC",name:"South Carolina",country:"US"},{short:"SD",name:"South Dakota",country:"US"},{short:"TN",name:"Tennessee",country:"US"},{short:"TX",name:"Texas",country:"US"},{short:"UT",name:"Utah",country:"US"},{short:"VT",name:"Vermont",country:"US"},{short:"VA",name:"Virginia",country:"US"},{short:"WA",name:"Washington",country:"US"},{short:"WV",name:"West Virginia",country:"US"},{short:"WI",name:"Wisconsin",country:"US"},{short:"WY",name:"Wyoming",country:"US"},{short:"AS",name:"American Samoa",country:"US"},{short:"GU",name:"Guam",country:"US"},{short:"MP",name:"Northern Mariana Islands",country:"US"},{short:"PR",name:"Puerto Rico",country:"US"},{short:"UM",name:"United States Minor Outlying Islands",country:"US"},{short:"VI",name:"Virgin Islands",country:"US"},{short:"AB",name:"Alberta",country:"CA"},{short:"BC",name:"British Columbia",country:"CA"},{short:"MB",name:"Manitoba",country:"CA"},{short:"NB",name:"New Brunswick",country:"CA"},{short:"NL",name:"Newfoundland and Labrador",country:"CA",alt:["Newfoundland","Labrador"]},{short:"NS",name:"Nova Scotia",country:"CA"},{short:"NU",name:"Nunavut",country:"CA"},{short:"NT",name:"Northwest Territories",country:"CA"},{short:"ON",name:"Ontario",country:"CA"},{short:"PE",name:"Prince Edward Island",country:"CA"},{short:"QC",name:"Quebec",country:"CA"},{short:"SK",name:"Saskatchewan",country:"CA"},{short:"YT",name:"Yukon",country:"CA"},{name:"Ashmore and Cartier Islands",country:"AU"},{name:"Australian Antarctic Territory",country:"AU"},{short:"ACT",name:"Australian Capital Territory",country:"AU"},{short:"CX",name:"Christmas Island",country:"AU"},{short:"CC",name:"Cocos Islands",alt:["Keeling Islands"],country:"AU"},{name:"Coral Sea Islands",country:"AU"},{short:"HM",name:"Heard Island and McDonald Islands",country:"AU"},{short:"JBT",name:"Jervis Bay Territory",country:"AU"},{short:"NSW",name:"New South Wales",country:"AU"},{short:"NF",name:"Norfolk Island",country:"AU"},{short:"NT",name:"Northern Territory",country:"AU"},{short:"QLD",name:"Queensland",country:"AU"},{short:"SA",name:"South Australia",country:"AU"},{short:"TAS",name:"Tasmania",country:"AU"},{short:"VIC",name:"Victoria",country:"AU"},{short:"WA",name:"Western Australia",country:"AU"},{name:"Aguascalientes",short:"AG",alt:["AGS"],country:"MX"},{name:"Baja California",short:"BC",alt:["BCN"],country:"MX"},{name:"Baja California Sur",short:"BS",alt:["BCS"],country:"MX"},{name:"Campeche",short:"CM",alt:["Camp","CAM"],country:"MX"},{name:"Chiapas",short:"CS",alt:["Chis","CHP"],country:"MX"},{name:"Chihuahua",short:"CH",alt:["Chih","CHH"],country:"MX"},{name:"Coahuila",short:"MX",alt:["Coah","COA"],country:"MX"},{name:"Colima",short:"CL",alt:["COL"],country:"MX"},{name:"Federal District",short:"DF",alt:["DIF"],country:"MX"},{name:"Durango",short:"DG",alt:["Dgo","DUR"],country:"MX"},{name:"Guanajuato",short:"GT",alt:["Gto","GUA"],country:"MX"},{name:"Guerrero",short:"GR",alt:["Gro","GRO"],country:"MX"},{name:"Hidalgo",short:"HG",alt:["Hgo","HID"],country:"MX"},{name:"Jalisco",short:"JA",alt:["Jal","JAL"],country:"MX"},{name:"Mexico",short:"ME",alt:["Edomex","MEX"],country:"MX"},{name:"Michoacán",short:"MI",alt:["Mich","MIC"],country:"MX"},{name:"Morelos",short:"MO",alt:["Mor","MOR"],country:"MX"},{name:"Nayarit",short:"NA",alt:["Nay","NAY"],country:"MX"},{name:"Nuevo León",short:"NL",alt:["NLE"],country:"MX"},{name:"Oaxaca",short:"OA",alt:["Oax","OAX"],country:"MX"},{name:"Puebla",short:"PU",alt:["Pue","PUE"],country:"MX"},{name:"Querétaro",short:"QE",alt:["Qro","QUE"],country:"MX"},{name:"Quintana Roo",short:"QR",alt:["Q Roo","ROO"],country:"MX"},{name:"San Luis Potosí",short:"SL",alt:["SLP"],country:"MX"},{name:"Sinaloa",short:"SI",alt:["SIN"],country:"MX"},{name:"Sonora",short:"SO",alt:["SON"],country:"MX"},{name:"Tabasco",short:"TB",alt:["TAB"],country:"MX"},{name:"Tamaulipas",short:"TM",alt:["Tamps","TAM"],country:"MX"},{name:"Tlaxcala",short:"TL",alt:["Tlax","TLA"],country:"MX"},{name:"Veracruz",short:"VE",alt:["VER"],country:"MX"},{name:"Yucatán",short:"YU",alt:["YUC"],country:"MX"},{name:"Zacatecas",short:"ZA",alt:["ZAC"],country:"MX"},{name:"重庆",short:"渝",english:"Chongqing",country:"CN"},{name:"黑龙江",short:"黑",english:"Heilongjiang",country:"CN"},{name:"吉林",short:"吉",english:"Jilin",country:"CN"},{name:"海南",short:"琼",english:"Hainan",country:"CN"},{name:"北京",short:"京",english:"Beijing",country:"CN"},{name:"辽宁",short:"辽",english:"Liaoning",country:"CN"},{name:"内蒙古",short:"蒙",english:"Inner Mongolia",alt:["Nei Menggu"],country:"CN"},{name:"西藏",short:"藏",english:"Xizang",alt:["Tibet"],country:"CN"},{name:"青海",short:"青",english:"Qinghai",country:"CN"},{name:"宁夏",short:"宁",english:"Ningxia",country:"CN"},{name:"新疆",short:"新",english:"Xinjiang",alt:["Uygur"],country:"CN"},{name:"甘肃",short:"甘",english:"Gansu",country:"CN"},{name:"河北",short:"冀",english:"Hebei",country:"CN"},{name:"河南",short:"豫",english:"Henan",country:"CN"},{name:"湖北",short:"鄂",english:"Hubei",country:"CN"},{name:"湖南",short:"湘",english:"Hunan",country:"CN"},{name:"山东",short:"鲁",english:"Shandong",country:"CN"},{name:"江苏",short:"苏",english:"Jiangsu",country:"CN"},{name:"安徽",short:"皖",english:"Anhui",country:"CN"},{name:"山西",short:"晋",english:"Shanxi",country:"CN"},{name:"陕西",short:"陕",english:"Shaanxi",country:"CN"},{name:"四川",short:"川",english:"sichuan",country:"CN"},{name:"云南",short:"滇",english:"Yunnan",country:"CN"},{name:"贵州",short:"黔",english:"Guizhou",country:"CN"},{name:"浙江",short:"浙",english:"Zhejiang",country:"CN"},{name:"福建",short:"闽",english:"Fujian",country:"CN"},{name:"广西",short:"桂",english:"Guangxi",country:"CN"},{name:"上海",short:"沪",english:"Shanghai",country:"CN"},{name:"天津",short:"津",english:"Tianjin",country:"CN"},{name:"香港",short:"港",english:"Hongkong",alt:["Hong Kong"],country:"CN"},{name:"澳门",short:"澳",english:"Macau",alt:["Macao"],country:"CN"},{name:"台湾",short:"台",english:"Taiwan",country:"CN"},{name:"江西",short:"赣",english:"Jiangxi",country:"CN"},{name:"广东",short:"粤",english:"Guangdong",country:"CN"},{name:"Avon",country:"GB",region:"England"},{name:"Bedfordshire",country:"GB",region:"England"},{name:"Berkshire",country:"GB",region:"England"},{name:"Borders",country:"GB",region:"England"},{name:"Bristol",country:"GB",region:"England"},{name:"Buckinghamshire",country:"GB",region:"England"},{name:"Cambridgeshire",country:"GB",region:"England"},{name:"Channel Islands",country:"GB",region:"England"},{name:"Cheshire",country:"GB",region:"England"},{name:"Cleveland",country:"GB",region:"England"},{name:"Cornwall",country:"GB",region:"England"},{name:"Cumbria",country:"GB",region:"England"},{name:"Derbyshire",country:"GB",region:"England"},{name:"Devon",country:"GB",region:"England"},{name:"Dorset",country:"GB",region:"England"},{name:"Durham",country:"GB",region:"England"},{name:"East Riding of Yorkshire",country:"GB",region:"England"},{name:"East Sussex",country:"GB",region:"England"},{name:"Essex",country:"GB",region:"England"},{name:"Gloucestershire",country:"GB",region:"England"},{name:"Greater Manchester",country:"GB",region:"England"},{name:"Hampshire",country:"GB",region:"England"},{name:"Herefordshire",country:"GB",region:"England"},{name:"Hertfordshire",country:"GB",region:"England"},{name:"Humberside",country:"GB",region:"England"},{name:"Isle of Man",country:"GB",region:"England"},{name:"Isle of Wight",country:"GB",region:"England"},{name:"Isles of Scilly",country:"GB",region:"England"},{name:"Kent",country:"GB",region:"England"},{name:"Lancashire",country:"GB",region:"England"},{name:"Leicestershire",country:"GB",region:"England"},{name:"Lincolnshire",country:"GB",region:"England"},{name:"London",country:"GB",region:"England"},{name:"Merseyside",country:"GB",region:"England"},{name:"Middlesex",country:"GB",region:"England"},{name:"Norfolk",country:"GB",region:"England"},{name:"North Yorkshire",country:"GB",region:"England"},{name:"Northamptonshire",country:"GB",region:"England"},{name:"Northumberland",country:"GB",region:"England"},{name:"Nottinghamshire",country:"GB",region:"England"},{name:"Oxfordshire",country:"GB",region:"England"},{name:"Rutland",country:"GB",region:"England"},{name:"Shropshire",country:"GB",region:"England"},{name:"Somerset",country:"GB",region:"England"},{name:"South Yorkshire",country:"GB",region:"England"},{name:"Staffordshire",country:"GB",region:"England"},{name:"Suffolk",country:"GB",region:"England"},{name:"Surrey",country:"GB",region:"England"},{name:"Tyne and Wear",country:"GB",region:"England"},{name:"Warwickshire",country:"GB",region:"England"},{name:"West Midlands",country:"GB",region:"England"},{name:"West Sussex",country:"GB",region:"England"},{name:"West Yorkshire",country:"GB",region:"England"},{name:"Wiltshire",country:"GB",region:"England"},{name:"Worcestershire",country:"GB",region:"England"},{name:"Antrim",country:"GB",region:"Northern Ireland"},{name:"Down",country:"GB",region:"Northern Ireland"},{name:"Fermanagh",country:"GB",region:"Northern Ireland"},{name:"Londonderry",country:"GB",region:"Northern Ireland"},{name:"Tyrone",country:"GB",region:"Northern Ireland"},{name:"Aberdeen City",country:"GB",region:"Scotland"},{name:"Aberdeenshire",country:"GB",region:"Scotland"},{name:"Angus",country:"GB",region:"Scotland"},{name:"Argyll and Bute",country:"GB",region:"Scotland"},{name:"Armagh",country:"GB",region:"Scotland"},{name:"Carmarthenshire",country:"GB",region:"Scotland"},{name:"Clackmannan",country:"GB",region:"Scotland"},{name:"Dumfries and Galloway",country:"GB",region:"Scotland"},{name:"East Ayrshire",country:"GB",region:"Scotland"},{name:"East Dunbartonshire",country:"GB",region:"Scotland"},{name:"East Lothian",country:"GB",region:"Scotland"},{name:"East Renfrewshire",country:"GB",region:"Scotland"},{name:"Edinburgh City",country:"GB",region:"Scotland"},{name:"Falkirk",country:"GB",region:"Scotland"},{name:"Fife",country:"GB",region:"Scotland"},{name:"Glasgow",country:"GB",region:"Scotland"},{name:"Highland",country:"GB",region:"Scotland"},{name:"Inverclyde",country:"GB",region:"Scotland"},{name:"Midlothian",country:"GB",region:"Scotland"},{name:"Moray",country:"GB",region:"Scotland"},{name:"North Ayrshire",country:"GB",region:"Scotland"},{name:"North Lanarkshire",country:"GB",region:"Scotland"},{name:"Orkney",country:"GB",region:"Scotland"},{name:"Perthshire and Kinross",country:"GB",region:"Scotland"},{name:"Renfrewshire",country:"GB",region:"Scotland"},{name:"Roxburghshire",country:"GB",region:"Scotland"},{name:"Shetland",country:"GB",region:"Scotland"},{name:"South Ayrshire",country:"GB",region:"Scotland"},{name:"South Lanarkshire",country:"GB",region:"Scotland"},{name:"Stirling",country:"GB",region:"Scotland"},{name:"West Dunbartonshire",country:"GB",region:"Scotland"},{name:"West Lothian",country:"GB",region:"Scotland"},{name:"Western Isles",country:"GB",region:"Scotland"},{name:"Blaenau Gwent",country:"GB",region:"Wales"},{name:"Bridgend",country:"GB",region:"Wales"},{name:"Caerphilly",country:"GB",region:"Wales"},{name:"Cardiff",country:"GB",region:"Wales"},{name:"Ceredigion",country:"GB",region:"Wales"},{name:"Conwy",country:"GB",region:"Wales"},{name:"Denbighshire",country:"GB",region:"Wales"},{name:"Flintshire",country:"GB",region:"Wales"},{name:"Gwynedd",country:"GB",region:"Wales"},{name:"Isle of Anglesey",country:"GB",region:"Wales"},{name:"Merthyr Tydfil",country:"GB",region:"Wales"},{name:"Monmouthshire",country:"GB",region:"Wales"},{name:"Neath Port Talbot",country:"GB",region:"Wales"},{name:"Newport",country:"GB",region:"Wales"},{name:"Pembrokeshire",country:"GB",region:"Wales"},{name:"Powys",country:"GB",region:"Wales"},{name:"Rhondda Cynon Taff",country:"GB",region:"Wales"},{name:"Swansea",country:"GB",region:"Wales"},{name:"The Vale of Glamorgan",country:"GB",region:"Wales"},{name:"Torfaen",country:"GB",region:"Wales"},{name:"Wrexham",country:"GB",region:"Wales"},{short:"BW",name:"Baden-Württemberg",country:"DE"},{short:"BY",name:"Bayern",country:"DE"},{short:"BE",name:"Berlin",country:"DE"},{short:"BB",name:"Brandenburg",country:"DE"},{short:"HB",name:"Bremen",country:"DE"},{short:"HH",name:"Hamburg",country:"DE"},{short:"HE",name:"Hessen",country:"DE"},{short:"MV",name:"Mecklenburg-Vorpommern",country:"DE"},{short:"NI",name:"Niedersachsen",country:"DE"},{short:"NW",name:"Nordrhein-Westfalen",country:"DE"},{short:"RP",name:"Rheinland-Pfalz",country:"DE"},{short:"SL",name:"Saarland",country:"DE"},{short:"SN",name:"Sachsen",country:"DE"},{short:"ST",name:"Sachsen-Anhalt",country:"DE"},{short:"SH",name:"Schleswig-Holstein",country:"DE"},{short:"TH",name:"Thüringen",country:"DE"},{short:"DR",name:"Drenthe",country:"NL"},{short:"FL",name:"Flevoland",country:"NL"},{short:"FR",name:"Friesland",country:"NL",alt:["Fryslân"]},{short:"GD",name:"Gelderland",country:"NL"},{short:"GR",name:"Groningen",country:"NL"},{short:"LB",name:"Limburg",country:"NL"},{short:"NB",name:"Noord-Brabant",country:"NL"},{short:"NH",name:"Noord-Holland",country:"NL"},{short:"OV",name:"Overijssel",country:"NL"},{short:"UT",name:"Utrecht",country:"NL"},{short:"ZH",name:"Zuid-Holland",country:"NL"},{short:"ZL",name:"Zeeland",country:"NL"},{short:"ANT",name:"Antwerpen",country:"BE"},{short:"HAI",name:"Henegouwen",country:"BE",alt:["Hainaut"]},{short:"LIE",name:"Luik",country:"BE",alt:["Liège"]},{short:"LIM",name:"Limburg",country:"BE"},{short:"LUX",name:"Luxemburg",country:"BE"},{short:"NAM",name:"Namen",country:"BE"},{short:"OVL",name:"Oost-Vlaanderen",country:"BE"},{short:"VBR",name:"Vlaams-Brabant",country:"BE"},{short:"WBR",name:"Waals-Brabant",country:"BE"},{short:"WVL",name:"West-Vlaanderen",country:"BE"},{name:"Hovedstaden",country:"DK"},{name:"Midtjylland",country:"DK"},{name:"Nordjylland",country:"DK"},{name:"Sjælland",country:"DK"},{name:"Syddanmark",country:"DK"},{name:"Adana",country:"TR"},{name:"Adıyaman",country:"TR"},{name:"Afyonkarahisar",country:"TR"},{name:"Ağrı",country:"TR"},{name:"Amasya",country:"TR"},{name:"Ankara",country:"TR"},{name:"Antalya",country:"TR"},{name:"Artvin",country:"TR"},{name:"Aydın",country:"TR"},{name:"Balıkesir",country:"TR"},{name:"Bilecik",country:"TR"},{name:"Bingöl",country:"TR"},{name:"Bitlis",country:"TR"},{name:"Bolu",country:"TR"},{name:"Burdur",country:"TR"},{name:"Bursa",country:"TR"},{name:"Çanakkale",country:"TR"},{name:"Çankırı",country:"TR"},{name:"Çorum",country:"TR"},{name:"Denizli",country:"TR"},{name:"Diyarbakır",country:"TR"},{name:"Edirne",country:"TR"},{name:"Elazığ",country:"TR"},{name:"Erzincan",country:"TR"},{name:"Erzurum",country:"TR"},{name:"Eskişehir",country:"TR"},{name:"Gaziantep",country:"TR"},{name:"Giresun",country:"TR"},{name:"Gümüşhane",country:"TR"},{name:"Hakkâri",country:"TR"},{name:"Hatay",country:"TR"},{name:"Isparta",country:"TR"},{name:"Mersin",country:"TR"},{name:"Istanbul",country:"TR"},{name:"İzmir",country:"TR"},{name:"Kars",country:"TR"},{name:"Kastamonu",country:"TR"},{name:"Kayseri",country:"TR"},{name:"Kırklareli",country:"TR"},{name:"Kırşehir",country:"TR"},{name:"Kocaeli",country:"TR"},{name:"Konya",country:"TR"},{name:"Kütahya",country:"TR"},{name:"Malatya",country:"TR"},{name:"Manisa",country:"TR"},{name:"Kahramanmaraş",country:"TR"},{name:"Mardin",country:"TR"},{name:"Muğla",country:"TR"},{name:"Muş",country:"TR"},{name:"Nevşehir",country:"TR"},{name:"Niğde",country:"TR"},{name:"Ordu",country:"TR"},{name:"Rize",country:"TR"},{name:"Sakarya",country:"TR"},{name:"Samsun",country:"TR"},{name:"Siirt",country:"TR"},{name:"Sinop",country:"TR"},{name:"Sivas",country:"TR"},{name:"Tekirdağ",country:"TR"},{name:"Tokat",country:"TR"},{name:"Trabzon",country:"TR"},{name:"Tunceli",country:"TR"},{name:"Şanlıurfa",country:"TR"},{name:"Uşak",country:"TR"},{name:"Van",country:"TR"},{name:"Yozgat",country:"TR"},{name:"Zonguldak",country:"TR"},{name:"Aksaray",country:"TR"},{name:"Bayburt",country:"TR"},{name:"Karaman",country:"TR"},{name:"Kırıkkale",country:"TR"},{name:"Batman",country:"TR"},{name:"Şırnak",country:"TR"},{name:"Bartın",country:"TR"},{name:"Ardahan",country:"TR"},{name:"Iğdır",country:"TR"},{name:"Yalova",country:"TR"},{name:"Karabük",country:"TR"},{name:"Kilis",country:"TR"},{name:"Osmaniye",country:"TR"},{name:"Düzce",country:"TR"},{short:"ID-AC",name:"Special Region of Aceh",country:"ID"},{short:"ID-BA",name:"Bali",country:"ID"},{short:"ID-BB",name:"Bangka–Belitung Islands",country:"ID"},{short:"ID-BT",name:"Banten",country:"ID"},{short:"ID-BE",name:"Bengkulu",country:"ID"},{short:"ID-JT",name:"Central Java",country:"ID"},{short:"ID-KT",name:"Central Kalimantan",country:"ID"},{short:"ID-ST",name:"Central Sulawesi",country:"ID"},{short:"ID-JI",name:"East Java",country:"ID"},{short:"ID-KI",name:"East Kalimantan",country:"ID"},{short:"ID-NT",name:"East Nusa Tenggara",country:"ID"},{short:"ID-GO",name:"Gorontalo",country:"ID"},{short:"ID-JK",name:"Jakarta Special Capital Region",country:"ID"},{short:"ID-JA",name:"Jambi",country:"ID"},{short:"ID-LA",name:"Lampung",country:"ID"},{short:"ID-MA",name:"Maluku",country:"ID"},{short:"ID-KU",name:"North Kalimantan",country:"ID"},{short:"ID-MU",name:"North Maluku",country:"ID"},{short:"ID-SA",name:"North Sulawesi",country:"ID"},{short:"ID-SU",name:"North Sumatra",country:"ID"},{short:"ID-PA",name:"Special Region of Papua",country:"ID"},{short:"ID-RI",name:"Riau",country:"ID"},{short:"ID-KR",name:"Riau Islands",country:"ID"},{short:"ID-SG",name:"Southeast Sulawesi",country:"ID"},{short:"ID-KS",name:"South Kalimantan",country:"ID"},{short:"ID-SN",name:"South Sulawesi",country:"ID"},{short:"ID-SS",name:"South Sumatra",country:"ID"},{short:"ID-JB",name:"West Java",country:"ID"},{short:"ID-KB",name:"West Kalimantan",country:"ID"},{short:"ID-NB",name:"West Nusa Tenggara",country:"ID"},{short:"ID-PB",name:"Special Region of West Papua",country:"ID"},{short:"ID-SR",name:"West Sulawesi",country:"ID"},{short:"ID-SB",name:"West Sumatra",country:"ID"},{short:"ID-YO",name:"Special Region of Yogyakarta",country:"ID"},{name:"Irbid",country:"JO"},{name:"Ajloun",country:"JO"},{name:"Jerash",country:"JO"},{name:"Mafraq",country:"JO"},{name:"Balqa",country:"JO"},{name:"Amman",country:"JO"},{name:"Zarqa",country:"JO"},{name:"Madaba",country:"JO"},{name:"Karak",country:"JO"},{name:"Tafilah",country:"JO"},{name:"Ma'an",country:"JO"},{name:"Aqaba",country:"JO"},{short:"AP",name:"Andhra Pradesh",country:"IN"},{short:"AR",name:"Arunachal Pradesh",country:"IN"},{short:"AS",name:"Assam",country:"IN"},{short:"BR",name:"Bihar",country:"IN"},{short:"CT",name:"Chhattisgarh",country:"IN"},{short:"GA",name:"Goa",country:"IN"},{short:"GJ",name:"Gujarat",country:"IN"},{short:"HR",name:"Haryana",country:"IN"},{short:"HP",name:"Himachal Pradesh",country:"IN"},{short:"JK",name:"Jammu and Kashmir",country:"IN"},{short:"JH",name:"Jharkhand",country:"IN"},{short:"KA",name:"Karnataka",country:"IN"},{short:"KL",name:"Kerala",country:"IN"},{short:"MP",name:"Madhya Pradesh",country:"IN"},{short:"MH",name:"Maharashtra",country:"IN"},{short:"MN",name:"Manipur",country:"IN"},{short:"ML",name:"Meghalaya",country:"IN"},{short:"MZ",name:"Mizoram",country:"IN"},{short:"NL",name:"Nagaland",country:"IN"},{short:"OR",name:"Odisha",country:"IN"},{short:"PB",name:"Punjab",country:"IN"},{short:"RJ",name:"Rajasthan",country:"IN"},{short:"SK",name:"Sikkim",country:"IN"},{short:"TN",name:"Tamil Nadu",country:"IN"},{short:"TG",name:"Telangana",country:"IN"},{short:"TR",name:"Tripura",country:"IN"},{short:"UP",name:"Uttar Pradesh",country:"IN"},{short:"UT",name:"Uttarakhand",country:"IN"},{short:"WB",name:"West Bengal",country:"IN"},{short:"AN",name:"Andaman and Nicobar Islands",country:"IN"},{short:"CH",name:"Chandigarh",country:"IN"},{short:"DN",name:"Dadra and Nagar Haveli",country:"IN"},{short:"DD",name:"Daman and Diu",country:"IN"},{short:"LD",name:"Lakshadweep",country:"IN"},{short:"DL",name:"National Capital Territory of Delhi",country:"IN"},{short:"PY",name:"Puducherry",country:"IN"},{name:"ភ្នំពេញ",english:"Phnom Penh Municipality",country:"KH"},{name:"បន្ទាយមានជ័យ",english:"Banteay Meanchey",country:"KH"},{name:"បាត់ដំបង",english:"Battambang",country:"KH"},{name:"កំពង់ចាម",english:"Kampong Cham",country:"KH"},{name:"កំពង់ឆ្នាំង",english:"Kampong Chhnang",country:"KH"},{name:"កំពង់ស្ពឺ",english:"Kampong Speu",country:"KH"},{name:"កំពង់ធំ",english:"Kampong Thom",country:"KH"},{name:"កំពត",english:"Kampot",country:"KH"},{name:"កណ្តាល",english:"Kandal",country:"KH"},{name:"កោះកុង",english:"Koh Kong",country:"KH"},{name:"កែប",english:"Kep",country:"KH"},{name:"ក្រចេះ",english:"Kratié",country:"KH"},{name:"មណ្ឌលគីរី",english:"Mondulkiri",country:"KH"},{name:"ឧត្តរមានជ័យ",english:"Oddar Meanchey",country:"KH"},{name:"បៃលិន",english:"Pailin",country:"KH"},{name:"ព្រះសីហនុ",english:"Preah Sihanouk",country:"KH"},{name:"ព្រះវិហារ",english:"Preah Vihear",country:"KH"},{name:"ពោធិ៍សាត់",english:"Pursat",country:"KH"},{name:"ព្រៃវែង",english:"Prey Veng",country:"KH"},{name:"រតនគីរី",english:"Ratanakiri",country:"KH"},{name:"សៀមរាប",english:"Siem Reap",country:"KH"},{name:"ស្ទឹងត្រែង",english:"Stung Treng",country:"KH"},{name:"ស្វាយរៀង",english:"Svay Rieng",country:"KH"},{name:"តាកែវ",english:"Takéo",country:"KH"},{name:"ត្បូងឃ្មុំ",english:"Tbong Khmum",country:"KH"},{name:"Addis Ababa",country:"ET"},{name:"Afar Region",country:"ET"},{name:"Amhara Region",country:"ET"},{name:"Benishangul-Gumuz",country:"ET"},{name:"Dire Dawa",country:"ET"},{name:"Gambela",country:"ET"},{name:"Harari",country:"ET"},{name:"Oromia",country:"ET"},{name:"Somali",country:"ET"},{name:"Southern Nations, Nationalities, and Peoples' Region",country:"ET"},{name:"Tigray Region",country:"ET"},{name:"Chachapoyas",region:"Amazonas",country:"PE"},{name:"Bagua",region:"Amazonas",country:"PE"},{name:"Bongará",region:"Amazonas",country:"PE"},{name:"Condorcanqui",region:"Amazonas",country:"PE"},{name:"Luya",region:"Amazonas",country:"PE"},{name:"Rodríguez de Mendoza",region:"Amazonas",country:"PE"},{name:"Utcubamba",region:"Amazonas",country:"PE"},{name:"Huaraz",region:"Ancash",country:"PE"},{name:"Aija",region:"Ancash",country:"PE"},{name:"Antonio Raymondi",region:"Ancash",country:"PE"},{name:"Asunción",region:"Ancash",country:"PE"},{name:"Bolognesi",region:"Ancash",country:"PE"},{name:"Carhuaz",region:"Ancash",country:"PE"},{name:"Carlos Fermín Fitzcarrald",region:"Ancash",country:"PE"},{name:"Casma",region:"Ancash",country:"PE"},{name:"Corongo",region:"Ancash",country:"PE"},{name:"Huari",region:"Ancash",country:"PE"},{name:"Huarmey",region:"Ancash",country:"PE"},{name:"Huaylas",region:"Ancash",country:"PE"},{name:"Mariscal Luzuriaga",region:"Ancash",country:"PE"},{name:"Ocros",region:"Ancash",country:"PE"},{name:"Pallasca",region:"Ancash",country:"PE"},{name:"Pomabamba",region:"Ancash",country:"PE"},{name:"Recuay",region:"Ancash",country:"PE"},{name:"Santa",region:"Ancash",country:"PE"},{name:"Sihuas",region:"Ancash",country:"PE"},{name:"Yungay",region:"Ancash",country:"PE"},{name:"Abancay",region:"Apurímac",country:"PE"},{name:"Andahuaylas",region:"Apurímac",country:"PE"},{name:"Antabamba",region:"Apurímac",country:"PE"},{name:"Aymaraes",region:"Apurímac",country:"PE"},{name:"Cotabambas",region:"Apurímac",country:"PE"},{name:"Chincheros",region:"Apurímac",country:"PE"},{name:"Grau",region:"Apurímac",country:"PE"},{name:"Arequipa",region:"Arequipa",country:"PE"},{name:"Camaná",region:"Arequipa",country:"PE"},{name:"Caravelí",region:"Arequipa",country:"PE"},{name:"Castilla",region:"Arequipa",country:"PE"},{name:"Caylloma",region:"Arequipa",country:"PE"},{name:"Condesuyos",region:"Arequipa",country:"PE"},{name:"Islay",region:"Arequipa",country:"PE"},{name:"La Unión",region:"Arequipa",country:"PE"},{name:"Huamanga",region:"Ayacucho",country:"PE"},{name:"Cangallo",region:"Ayacucho",country:"PE"},{name:"Huanca Sancos",region:"Ayacucho",country:"PE"},{name:"Huanta",region:"Ayacucho",country:"PE"},{name:"La Mar",region:"Ayacucho",country:"PE"},{name:"Lucanas",region:"Ayacucho",country:"PE"},{name:"Parinacochas",region:"Ayacucho",country:"PE"},{name:"Páucar del Sara Sara",region:"Ayacucho",country:"PE"},{name:"Sucre",region:"Ayacucho",country:"PE"},{name:"Víctor Fajardo",region:"Ayacucho",country:"PE"},{name:"Vilcas Huamán",region:"Ayacucho",country:"PE"},{name:"Cajamarca",region:"Cajamarca",country:"PE"},{name:"Cajabamba",region:"Cajamarca",country:"PE"},{name:"Celendín",region:"Cajamarca",country:"PE"},{name:"Chota",region:"Cajamarca",country:"PE"},{name:"Contumazá",region:"Cajamarca",country:"PE"},{name:"Cutervo",region:"Cajamarca",country:"PE"},{name:"Hualgayoc",region:"Cajamarca",country:"PE"},{name:"Jaén",region:"Cajamarca",country:"PE"},{name:"San Ignacio",region:"Cajamarca",country:"PE"},{name:"San Marcos",region:"Cajamarca",country:"PE"},{name:"San Miguel",region:"Cajamarca",country:"PE"},{name:"San Pablo",region:"Cajamarca",country:"PE"},{name:"Santa Cruz",region:"Cajamarca",country:"PE"},{name:"Callao",region:"Callao",country:"PE"},{name:"Cusco",region:"Cusco",country:"PE"},{name:"Acomayo",region:"Cusco",country:"PE"},{name:"Anta",region:"Cusco",country:"PE"},{name:"Calca",region:"Cusco",country:"PE"},{name:"Canas",region:"Cusco",country:"PE"},{name:"Canchis",region:"Cusco",country:"PE"},{name:"Chumbivilcas",region:"Cusco",country:"PE"},{name:"Espinar",region:"Cusco",country:"PE"},{name:"La Convención",region:"Cusco",country:"PE"},{name:"Paruro",region:"Cusco",country:"PE"},{name:"Paucartambo",region:"Cusco",country:"PE"},{name:"Quispicanchi",region:"Cusco",country:"PE"},{name:"Urubamba",region:"Cusco",country:"PE"},{name:"Huancavelica",region:"Huancavelica",country:"PE"},{name:"Acobamba",region:"Huancavelica",country:"PE"},{name:"Angaraes",region:"Huancavelica",country:"PE"},{name:"Castrovirreyna",region:"Huancavelica",country:"PE"},{name:"Churcampa",region:"Huancavelica",country:"PE"},{name:"Huaytará",region:"Huancavelica",country:"PE"},{name:"Tayacaja",region:"Huancavelica",country:"PE"},{name:"Huánuco",region:"Huánuco",country:"PE"},{name:"Ambo",region:"Huánuco",country:"PE"},{name:"Dos de Mayo",region:"Huánuco",country:"PE"},{name:"Huacaybamba",region:"Huánuco",country:"PE"},{name:"Huamalíes",region:"Huánuco",country:"PE"},{name:"Leoncio Prado",region:"Huánuco",country:"PE"},{name:"Marañón",region:"Huánuco",country:"PE"},{name:"Pachitea",region:"Huánuco",country:"PE"},{name:"Puerto Inca",region:"Huánuco",country:"PE"},{name:"Lauricocha",region:"Huánuco",country:"PE"},{name:"Yarowilca",region:"Huánuco",country:"PE"},{name:"Ica",region:"Ica",country:"PE"},{name:"Chincha",region:"Ica",country:"PE"},{name:"Nazca",region:"Ica",country:"PE"},{name:"Palpa",region:"Ica",country:"PE"},{name:"Pisco",region:"Ica",country:"PE"},{name:"Huancayo",region:"Junín",country:"PE"},{name:"Concepción",region:"Junín",country:"PE"},{name:"Chanchamayo",region:"Junín",country:"PE"},{name:"Jauja",region:"Junín",country:"PE"},{name:"Junín",region:"Junín",country:"PE"},{name:"Satipo",region:"Junín",country:"PE"},{name:"Tarma",region:"Junín",country:"PE"},{name:"Yauli",region:"Junín",country:"PE"},{name:"Chupaca",region:"Junín",country:"PE"},{name:"Trujillo",region:"La Libertad",country:"PE"},{name:"Ascope",region:"La Libertad",country:"PE"},{name:"Bolívar",region:"La Libertad",country:"PE"},{name:"Chepén",region:"La Libertad",country:"PE"},{name:"Julcán",region:"La Libertad",country:"PE"},{name:"Otuzco",region:"La Libertad",country:"PE"},{name:"Pacasmayo",region:"La Libertad",country:"PE"},{name:"Pataz",region:"La Libertad",country:"PE"},{name:"Sánchez Carrión",region:"La Libertad",country:"PE"},{name:"Santiago de Chuco",region:"La Libertad",country:"PE"},{name:"Gran Chimú",region:"La Libertad",country:"PE"},{name:"Virú",region:"La Libertad",country:"PE"},{name:"Chiclayo",region:"Lambayeque",country:"PE"},{name:"Ferreñafe",region:"Lambayeque",country:"PE"},{name:"Lambayeque",region:"Lambayeque",country:"PE"},{name:"Lima",region:"autonomous",country:"PE"},{name:"Huaura",region:"Lima",country:"PE"},{name:"Barranca",region:"Lima",country:"PE"},{name:"Cajatambo",region:"Lima",country:"PE"},{name:"Canta",region:"Lima",country:"PE"},{name:"Cañete",region:"Lima",country:"PE"},{name:"Huaral",region:"Lima",country:"PE"},{name:"Huarochirí",region:"Lima",country:"PE"},{name:"Oyón",region:"Lima",country:"PE"},{name:"Yauyos",region:"Lima",country:"PE"},{name:"Maynas",region:"Loreto",country:"PE"},{name:"Alto Amazonas",region:"Loreto",country:"PE"},{name:"Loreto",region:"Loreto",country:"PE"},{name:"Mariscal Ramón Castilla",region:"Loreto",country:"PE"},{name:"Putumayo",region:"Loreto",country:"PE"},{name:"Requena",region:"Loreto",country:"PE"},{name:"Ucayali",region:"Loreto",country:"PE"},{name:"Datem del Marañón",region:"Loreto",country:"PE"},{name:"Tambopata",region:"Madre de Dios",country:"PE"},{name:"Manú",region:"Madre de Dios",country:"PE"},{name:"Tahuamanu",region:"Madre de Dios",country:"PE"},{name:"Mariscal Nieto",region:"Moquegua",country:"PE"},{name:"General Sánchez Cerro",region:"Moquegua",country:"PE"},{name:"Ilo",region:"Moquegua",country:"PE"},{name:"Pasco",region:"Pasco",country:"PE"},{name:"Daniel Alcídes Carrión",region:"Pasco",country:"PE"},{name:"Oxapampa",region:"Pasco",country:"PE"},{name:"Piura",region:"Piura",country:"PE"},{name:"Ayabaca",region:"Piura",country:"PE"},{name:"Huancabamba",region:"Piura",country:"PE"},{name:"Morropón",region:"Piura",country:"PE"},{name:"Paita",region:"Piura",country:"PE"},{name:"Sullana",region:"Piura",country:"PE"},{name:"Talara",region:"Piura",country:"PE"},{name:"Sechura",region:"Piura",country:"PE"},{name:"Puno",region:"Puno",country:"PE"},{name:"Azángaro",region:"Puno",country:"PE"},{name:"Carabaya",region:"Puno",country:"PE"},{name:"Chucuito",region:"Puno",country:"PE"},{name:"El Collao",region:"Puno",country:"PE"},{name:"Huancané",region:"Puno",country:"PE"},{name:"Lampa",region:"Puno",country:"PE"},{name:"Melgar",region:"Puno",country:"PE"},{name:"Moho",region:"Puno",country:"PE"},{name:"San Antonio de Putina",region:"Puno",country:"PE"},{name:"San Román",region:"Puno",country:"PE"},{name:"Sandia",region:"Puno",country:"PE"},{name:"Yunguyo",region:"Puno",country:"PE"},{name:"Moyobamba",region:"San Martín",country:"PE"},{name:"Bellavista",region:"San Martín",country:"PE"},{name:"El Dorado",region:"San Martín",country:"PE"},{name:"Huallaga",region:"San Martín",country:"PE"},{name:"Lamas",region:"San Martín",country:"PE"},{name:"Mariscal Cáceres",region:"San Martín",country:"PE"},{name:"Picota",region:"San Martín",country:"PE"},{name:"Rioja",region:"San Martín",country:"PE"},{name:"San Martín",region:"San Martín",country:"PE"},{name:"Tocache",region:"San Martín",country:"PE"},{name:"Tacna",region:"Tacna",country:"PE"},{name:"Candarave",region:"Tacna",country:"PE"},{name:"Jorge Basadre",region:"Tacna",country:"PE"},{name:"Tarata",region:"Tacna",country:"PE"},{name:"Tumbes",region:"Tumbes",country:"PE"},{name:"Contralmirante Villar",region:"Tumbes",country:"PE"},{name:"Zarumilla",region:"Tumbes",country:"PE"},{name:"Coronel Portillo",region:"Ucayali",country:"PE"},{name:"Atalaya",region:"Ucayali",country:"PE"},{name:"Padre Abad",region:"Ucayali",country:"PE"},{name:"Purús",region:"Ucayali",country:"PE"},{name:"Camagüey",country:"CU"},{name:"Ciego de Ávila",country:"CU"},{name:"Cienfuegos",country:"CU"},{name:"Havana",country:"CU"},{name:"Bayamo",country:"CU"},{name:"Guantánamo",country:"CU"},{name:"Holguín",country:"CU"},{name:"Nueva Gerona",country:"CU"},{name:"Artemisa",country:"CU"},{name:"Las Tunas",country:"CU"},{name:"Matanzas",country:"CU"},{name:"San José de las Lajas",country:"CU"},{name:"Pinar del Río",country:"CU"},{name:"Sancti Spíritus",country:"CU"},{name:"Santiago de Cuba",country:"CU"},{name:"Santa Clara",country:"CU"},{name:"Ciudad Autónoma de Buenos Aires",country:"AR"},{name:"Buenos Aires",country:"AR"},{name:"Catamarca",country:"AR"},{name:"Chaco",country:"AR"},{name:"Chubut",country:"AR"},{name:"Córdoba",country:"AR"},{name:"Corrientes",country:"AR"},{name:"Entre Ríos",country:"AR"},{name:"Formosa",country:"AR"},{name:"Jujuy",country:"AR"},{name:"La Pampa",country:"AR"},{name:"La Rioja",country:"AR"},{name:"Mendoza",country:"AR"},{name:"Misiones",country:"AR"},{name:"Neuquén",country:"AR"},{name:"Río Negro",country:"AR"},{name:"Salta",country:"AR"},{name:"San Juan",country:"AR"},{name:"San Luis",country:"AR"},{name:"Santa Cruz",country:"AR"},{name:"Santa Fe",country:"AR"},{name:"Santiago del Estero",country:"AR"},{name:"Tierra del Fuego, Antártida e Islas del Atlántico Sur",country:"AR"},{name:"Tucumán",country:"AR"},{name:"Arica",region:"XV Arica and Parinacota",country:"CL"},{name:"Parinacota",region:"XV Arica and Parinacota",country:"CL"},{name:"Iquique",region:"I Tarapacá",country:"CL"},{name:"Tamarugal",region:"I Tarapacá",country:"CL"},{name:"Antofagasta",region:"II Antofagasta",country:"CL"},{name:"El Loa",region:"II Antofagasta",country:"CL"},{name:"Tocopilla",region:"II Antofagasta",country:"CL"},{name:"Copiapó",region:"III Atacama",country:"CL"},{name:"Huasco",region:"III Atacama",country:"CL"},{name:"Chañaral",region:"III Atacama",country:"CL"},{name:"Elqui",region:"IV Coquimbo",country:"CL"},{name:"Limarí",region:"IV Coquimbo",country:"CL"},{name:"Choapa",region:"IV Coquimbo",country:"CL"},{name:"Isla de Pascua",region:"V Valparaíso",country:"CL"},{name:"Los Andes",region:"V Valparaíso",country:"CL"},{name:"Marga Marga",region:"V Valparaíso",country:"CL"},{name:"Petorca",region:"V Valparaíso",country:"CL"},{name:"Quillota",region:"V Valparaíso",country:"CL"},{name:"San Antonio",region:"V Valparaíso",country:"CL"},{name:"San Felipe de Aconcagua",region:"V Valparaíso",country:"CL"},{name:"Valparaíso",region:"V Valparaíso",country:"CL"},{name:"Cachapoal",region:"VI O'Higgins",country:"CL"},{name:"Colchagua",region:"VI O'Higgins",country:"CL"},{name:"Cardenal Caro",region:"VI O'Higgins",country:"CL"},{name:"Talca",region:"VII Maule",country:"CL"},{name:"Linares",region:"VII Maule",country:"CL"},{name:"Curicó",region:"VII Maule",country:"CL"},{name:"Cauquenes",region:"VII Maule",country:"CL"},{name:"Concepción",region:"VIII Biobío",country:"CL"},{name:"Ñuble",region:"VIII Biobío",country:"CL"},{name:"Biobío",region:"VIII Biobío",country:"CL"},{name:"Arauco",region:"VIII Biobío",country:"CL"},{name:"Cautin",region:"IX Araucanía",country:"CL"},{name:"Malleco",region:"IX Araucanía",country:"CL"},{name:"Valdivia",region:"XIV Los Ríos",country:"CL"},{name:"Ranco",region:"XIV Los Ríos",country:"CL"},{name:"Llanquihue",region:"X Los Lagos",country:"CL"},{name:"Osorno",region:"X Los Lagos",country:"CL"},{name:"Chiloe",region:"X Los Lagos",country:"CL"},{name:"Palena",region:"X Los Lagos",country:"CL"},{name:"Coihaique",region:"XI Aisén",country:"CL"},{name:"Aisén",region:"XI Aisén",country:"CL"},{name:"General Carrera",region:"XI Aisén",country:"CL"},{name:"Capitan Prat",region:"XI Aisén",country:"CL"},{name:"Magallanes",region:"XII Magallanes",country:"CL"},{name:"Ultima Esperanza",region:"XII Magallanes",country:"CL"},{name:"Tierra del Fuego",region:"XII Magallanes",country:"CL"},{name:"Antártica Chilena",region:"XII Magallanes",country:"CL"},{name:"Santiago",region:"RM Santiago Metropolitan",country:"CL"},{name:"Cordillera",region:"RM Santiago Metropolitan",country:"CL"},{name:"Maipo",region:"RM Santiago Metropolitan",country:"CL"},{name:"Talagante",region:"RM Santiago Metropolitan",country:"CL"},{name:"Melipilla",region:"RM Santiago Metropolitan",country:"CL"},{name:"Chacabuco",region:"RM Santiago Metropolitan",country:"CL"},{name:"Cercado",region:"Beni",country:"BO"},{name:"Iténez",region:"Beni",country:"BO"},{name:"José Ballivián",region:"Beni",country:"BO"},{name:"Mamoré",region:"Beni",country:"BO"},{name:"Marbán",region:"Beni",country:"BO"},{name:"Moxos",region:"Beni",country:"BO"},{name:"Vaca Díez",region:"Beni",country:"BO"},{name:"Yacuma",region:"Beni",country:"BO"},{name:"Azurduy",region:"Chuquisaca",country:"BO"},{name:"Belisario Boeto",region:"Chuquisaca",country:"BO"},{name:"Hernando Siles",region:"Chuquisaca",country:"BO"},{name:"Jaime Zudáñez",region:"Chuquisaca",country:"BO"},{name:"Luis Calvo",region:"Chuquisaca",country:"BO"},{name:"Nor Cinti",region:"Chuquisaca",country:"BO"},{name:"Oropeza",region:"Chuquisaca",country:"BO"},{name:"Sud Cinti",region:"Chuquisaca",country:"BO"},{name:"Tomina",region:"Chuquisaca",country:"BO"},{name:"Yamparáez",region:"Chuquisaca",country:"BO"},{name:"Arani",region:"Cochabamba",country:"BO"},{name:"Arque",region:"Cochabamba",country:"BO"},{name:"Ayopaya",region:"Cochabamba",country:"BO"},{name:"Capinota",region:"Cochabamba",country:"BO"},{name:"Carrasco",region:"Cochabamba",country:"BO"},{name:"Cercado",region:"Cochabamba",country:"BO"},{name:"Chapare",region:"Cochabamba",country:"BO"},{name:"Esteban Arce",region:"Cochabamba",country:"BO"},{name:"Germán Jordán",region:"Cochabamba",country:"BO"},{name:"Mizque",region:"Cochabamba",country:"BO"},{name:"Campero",region:"Cochabamba",country:"BO"},{name:"Punata",region:"Cochabamba",country:"BO"},{name:"Quillacollo",region:"Cochabamba",country:"BO"},{name:"Bolívar",region:"Cochabamba",country:"BO"},{name:"Tapacarí",region:"Cochabamba",country:"BO"},{name:"Tiraque",region:"Cochabamba",country:"BO"},{name:"Abel Iturralde",region:"La Paz",country:"BO"},{name:"Aroma",region:"La Paz",country:"BO"},{name:"Bautista Saavedra",region:"La Paz",country:"BO"},{name:"Caranavi",region:"La Paz",country:"BO"},{name:"Eliodoro Camacho",region:"La Paz",country:"BO"},{name:"Franz Tamayo",region:"La Paz",country:"BO"},{name:"Gualberto Villarroel",region:"La Paz",country:"BO"},{name:"Ingavi",region:"La Paz",country:"BO"},{name:"Inquisivi",region:"La Paz",country:"BO"},{name:"José Manuel Pando",region:"La Paz",country:"BO"},{name:"Larecaja",region:"La Paz",country:"BO"},{name:"Loayza",region:"La Paz",country:"BO"},{name:"Los Andes",region:"La Paz",country:"BO"},{name:"Manco Kapac",region:"La Paz",country:"BO"},{name:"Muñecas",region:"La Paz",country:"BO"},{name:"Nor Yungas",region:"La Paz",country:"BO"},{name:"Omasuyos",region:"La Paz",country:"BO"},{name:"Pacajes",region:"La Paz",country:"BO"},{name:"Murillo",region:"La Paz",country:"BO"},{name:"Sud Yungas",region:"La Paz",country:"BO"},{name:"Atahuallpa",region:"Oruro",country:"BO"},{name:"Carangas",region:"Oruro",country:"BO"},{name:"Cercado",region:"Oruro",country:"BO"},{name:"Eduardo Avaroa",region:"Oruro",country:"BO"},{name:"Ladislao Cabrera",region:"Oruro",country:"BO"},{name:"Litoral",region:"Oruro",country:"BO"},{name:"Nor Carangas",region:"Oruro",country:"BO"},{name:"Pantaléon Dalence",region:"Oruro",country:"BO"},{name:"Poopó",region:"Oruro",country:"BO"},{name:"Puerto de Mejillones",region:"Oruro",country:"BO"},{name:"Sajama",region:"Oruro",country:"BO"},{name:"San Pedro de Totora",region:"Oruro",country:"BO"},{name:"Saucarí",region:"Oruro",country:"BO"},{name:"Sebastián Pagador",region:"Oruro",country:"BO"},{name:"Sud Carangas",region:"Oruro",country:"BO"},{name:"Tomas Barrón",region:"Oruro",country:"BO"},{name:"Abuná",region:"Pando",country:"BO"},{name:"Federico Román",region:"Pando",country:"BO"},{name:"Madre de Dios",region:"Pando",country:"BO"},{name:"Manuripi",region:"Pando",country:"BO"},{name:"Nicolás Suárez",region:"Pando",country:"BO"},{name:"Alonso de Ibáñez",region:"Potosí",country:"BO"},{name:"Antonio Quijarro",region:"Potosí",country:"BO"},{name:"Bernardino Bilbao",region:"Potosí",country:"BO"},{name:"Charcas",region:"Potosí",country:"BO"},{name:"Chayanta",region:"Potosí",country:"BO"},{name:"Cornelio Saavedra",region:"Potosí",country:"BO"},{name:"Daniel Campos",region:"Potosí",country:"BO"},{name:"Enrique Baldivieso",region:"Potosí",country:"BO"},{name:"José María Linares",region:"Potosí",country:"BO"},{name:"Modesto Omiste",region:"Potosí",country:"BO"},{name:"Nor Chichas",region:"Potosí",country:"BO"},{name:"Nor Lípez",region:"Potosí",country:"BO"},{name:"Rafael Bustillo",region:"Potosí",country:"BO"},{name:"Sur Chichas",region:"Potosí",country:"BO"},{name:"Sur Lípez",region:"Potosí",country:"BO"},{name:"Tomás Frías",region:"Potosí",country:"BO"},{name:"Andrés Ibáñez",region:"Santa Cruz",country:"BO"},{name:"Ángel Sandoval",region:"Santa Cruz",country:"BO"},{name:"Chiquitos",region:"Santa Cruz",country:"BO"},{name:"Cordillera",region:"Santa Cruz",country:"BO"},{name:"Florida",region:"Santa Cruz",country:"BO"},{name:"Germán Busch",region:"Santa Cruz",country:"BO"},{name:"Guarayos",region:"Santa Cruz",country:"BO"},{name:"Ichilo",region:"Santa Cruz",country:"BO"},{name:"Ignacio Warnes",region:"Santa Cruz",country:"BO"},{name:"José Miguel de Velasco",region:"Santa Cruz",country:"BO"},{name:"Manuel María Caballero",region:"Santa Cruz",country:"BO"},{name:"Ñuflo de Chávez",region:"Santa Cruz",country:"BO"},{name:"Obispo Santistevan",region:"Santa Cruz",country:"BO"},{name:"Sara",region:"Santa Cruz",country:"BO"},{name:"Vallegrande",region:"Santa Cruz",country:"BO"},{name:"Aniceto Arce",region:"Tarija",country:"BO"},{name:"Burnet O'Connor",region:"Tarija",country:"BO"},{name:"Cercado",region:"Tarija",country:"BO"},{name:"Eustaquio Méndez",region:"Tarija",country:"BO"},{name:"Gran Chaco",region:"Tarija",country:"BO"},{name:"José María Avilés",region:"Tarija",country:"BO"},{name:"La Coruña",short:"C",country:"ES"},{name:"Lugo",short:"LU",country:"ES"},{name:"Vizcaya",short:"BI",country:"ES"},{name:"Guipúzcoa",short:"SS",country:"ES"},{name:"Huesca",short:"HU",country:"ES"},{name:"Lérida",short:"L",country:"ES"},{name:"Gerona",short:"GI",country:"ES"},{name:"Barcelona",short:"B",country:"ES"},{name:"Tarragona",short:"T",country:"ES"},{name:"Castellón",short:"CS",country:"ES"},{name:"Valencia",short:"V",country:"ES"},{name:"Alicante",short:"A",country:"ES"},{name:"Murcia",short:"MU",country:"ES"},{name:"Zaragoza",short:"Z",country:"ES"},{name:"Teruel",short:"TE",country:"ES"},{name:"Cuenca",short:"CU",country:"ES"},{name:"Albacete",short:"AB",country:"ES"},{name:"Almeria",short:"AL",country:"ES"},{name:"Granada",short:"GR",country:"ES"},{name:"Málaga",short:"MA",country:"ES"},{name:"Tenerife",short:"TF",country:"ES"},{name:"Cádiz",short:"CA",country:"ES"},{name:"Sevilla",short:"SE",country:"ES"},{name:"Huelva",short:"H",country:"ES"},{name:"Las Palmas",short:"GC",country:"ES"},{name:"Madrid",short:"M",country:"ES"},{name:"Badajoz",short:"BA",country:"ES"},{name:"Cáceres",short:"CC",country:"ES"},{name:"Toledo",short:"TO",country:"ES"},{name:"Ciudad Real",short:"CR",country:"ES"},{name:"Salamanca",short:"SA",country:"ES"},{name:"Córdoba",short:"CO",country:"ES"},{name:"Jaén",short:"J",country:"ES"},{name:"Ávila",short:"AV",country:"ES"},{name:"Valladolid",short:"VA",country:"ES"},{name:"Zamora",short:"ZA",country:"ES"},{name:"Álava",short:"VI",country:"ES"},{name:"Segovia",short:"SG",country:"ES"},{name:"Burgos",short:"BU",country:"ES"},{name:"Pontevedra",short:"PO",country:"ES"},{name:"León",short:"LE",country:"ES"},{name:"Orense",short:"OU",country:"ES"},{name:"Palencia",short:"P",country:"ES"},{name:"La Rioja",short:"LO",country:"ES"},{name:"Soria",short:"SO",country:"ES"},{name:"Guadalajara",short:"GU",country:"ES"},{name:"বরগুনা",english:"Barguna",region:"Barisal",country:"BD"},{name:"বরিশাল",english:"Barisal",region:"Barisal",country:"BD"},{name:"ভোলা",english:"Bhola",region:"Barisal",country:"BD"},{name:"ঝালকাঠি",english:"Jhalokati",region:"Barisal",country:"BD"},{name:"পটুয়াখালী",english:"Patuakhali",region:"Barisal",country:"BD"},{name:"পিরোজপুর",english:"Pirojpur",region:"Barisal",country:"BD"},{name:"বান্দরবান",english:"Bandarban",region:"Chittagong",country:"BD"},{name:"ব্রাহ্মণবাড়ীয়া",english:"Brahmanbaria",region:"Chittagong",country:"BD"},{name:"চাঁদপুর",english:"Chandpur",region:"Chittagong",country:"BD"},{name:"চট্টগ্রাম",english:"Chittagong",region:"Chittagong",country:"BD"},{name:"কুমিল্লা",english:"Comilla",region:"Chittagong",country:"BD"},{name:"কক্সবাজার",english:"Cox's Bazar",region:"Chittagong",country:"BD"},{name:"ফেনী",english:"Feni",region:"Chittagong",country:"BD"},{name:"খাগড়াছড়ি",english:"Khagrachhari",region:"Chittagong",country:"BD"},{name:"লক্ষীপুর",english:"Lakshmipur",region:"Chittagong",country:"BD"},{name:"নোয়াখালী",english:"Noakhali",region:"Chittagong",country:"BD"},{name:"রাঙ্গামাটি",english:"Rangamati",region:"Chittagong",country:"BD"},{name:"ঢাকা",english:"Dhaka",region:"Dhaka",country:"BD"},{name:"ফরিদপুর",english:"Faridpur",region:"Dhaka",country:"BD"},{name:"গাজীপুর",english:"Gazipur",region:"Dhaka",country:"BD"},{name:"গোপালগঞ্জ",english:"Gopalganj",region:"Dhaka",country:"BD"},{name:"জামালপুর",english:"Jamalpur",region:"Dhaka",country:"BD"},{name:"কিশোরগঞ্জ",english:"Kishoreganj",region:"Dhaka",country:"BD"},{name:"মাদারীপুর",english:"Madaripur",region:"Dhaka",country:"BD"},{name:"মানিকগঞ্জ",english:"Manikganj",region:"Dhaka",country:"BD"},{name:"মুন্সীগঞ্জ",english:"Munshiganj",region:"Dhaka",country:"BD"},{name:"ময়মনসিংহ",english:"Mymensingh",region:"Dhaka",country:"BD"},{name:"নারায়ণগঞ্জ",english:"Narayanganj",region:"Dhaka",country:"BD"},{name:"নরসিংদী",english:"Narsingdi",region:"Dhaka",country:"BD"},{name:"নেত্রকোনা",english:"Netrakona",region:"Dhaka",country:"BD"},{name:"রাজবাড়ী",english:"Rajbari",region:"Dhaka",country:"BD"},{name:"শরীয়তপুর",english:"Shariatpur",region:"Dhaka",country:"BD"},{name:"শেরপুর",english:"Sherpur",region:"Dhaka",country:"BD"},{name:"টাঙ্গাইল",english:"Tangail",region:"Dhaka",country:"BD"},{name:"বাগেরহাট",english:"Bagerhat",region:"Khulna",country:"BD"},{name:"চুয়াডাঙ্গা",english:"Chuadanga",region:"Khulna",country:"BD"},{name:"যশোর",english:"Jessore",region:"Khulna",country:"BD"},{name:"ঝিনাইদহ",english:"Jhenaidah",region:"Khulna",country:"BD"},{name:"খুলনা",english:"Khulna",region:"Khulna",country:"BD"},{name:"কুষ্টিয়া",english:"Kushtia",region:"Khulna",country:"BD"},{name:"মাগুরা",english:"Magura",region:"Khulna",country:"BD"},{name:"মেহেরপুর",english:"Meherpur",region:"Khulna",country:"BD"},{name:"নড়াইল",english:"Narail",region:"Khulna",country:"BD"},{name:"সাতক্ষিরা",english:"Satkhira",region:"Khulna",country:"BD"},{name:"বগুড়া",english:"Bogra",region:"Rajshahi",country:"BD"},{name:"জয়পুরহাট",english:"Joypurhat",region:"Rajshahi",country:"BD"},{name:"নওগাঁ",english:"Naogaon",region:"Rajshahi",country:"BD"},{name:"নাটোর",english:"Natore",region:"Rajshahi",country:"BD"},{name:"নওয়াবগঞ্জ",english:"Chapainawabganj",region:"Rajshahi",country:"BD"},{name:"পাবনা",english:"Pabna",region:"Rajshahi",country:"BD"},{name:"রাজশাহী",english:"Rajshahi",region:"Rajshahi",country:"BD"},{name:"সিরাজগঞ্জ",english:"Sirajganj",region:"Rajshahi",country:"BD"},{name:"দিনাজপুর",english:"Dinajpur",region:"Rangpur",country:"BD"},{name:"গাইবান্ধা",english:"Gaibandha",region:"Rangpur",country:"BD"},{name:"কুড়িগ্রাম",english:"Kurigram",region:"Rangpur",country:"BD"},{name:"লালমনিরহাট",english:"Lalmonirhat",region:"Rangpur",country:"BD"},{name:"নীলফামারী",english:"Nilphamari",region:"Rangpur",country:"BD"},{name:"পঞ্চগড়",english:"Panchagarh",region:"Rangpur",country:"BD"},{name:"রংপুর",english:"Rangpur",region:"Rangpur",country:"BD"},{name:"ঠাকুরগাঁ",english:"Thakurgaon",region:"Rangpur",country:"BD"},{name:"হবিগঞ্জ",english:"Habiganj",region:"Sylhet",country:"BD"},{name:"মৌলভীবাজার",english:"Moulvibazar",region:"Sylhet",country:"BD"},{name:"সুনামগঞ্জ",english:"Sunamganj",region:"Sylhet",country:"BD"},{name:"সিলেট",english:"Sylhet",region:"Sylhet",country:"BD"},{name:"Azad Kashmir",country:"PK"},{name:"Bahawalpur",country:"PK"},{name:"Bannu",country:"PK"},{name:"Dera Ghazi Khan",country:"PK"},{name:"Dera Ismail Khan",country:"PK"},{name:"Faisalabad",country:"PK"},{name:"F.A.T.A.",country:"PK"},{name:"Gujranwala",country:"PK"},{name:"Hazara",country:"PK"},{name:"Hyderabad",country:"PK"},{name:"Islamabad",country:"PK"},{name:"Kalat",country:"PK"},{name:"Karachi",country:"PK"},{name:"Kohat",country:"PK"},{name:"Lahore",country:"PK"},{name:"Larkana",country:"PK"},{name:"Makran",country:"PK"},{name:"Malakand",country:"PK"},{name:"Mardan",country:"PK"},{name:"Mirpur Khas",country:"PK"},{name:"Multan",country:"PK"},{name:"Nasirabad",country:"PK"},{name:"Northern Areas",country:"PK"},{name:"Peshawar",country:"PK"},{name:"Quetta",country:"PK"},{name:"Rawalpindi",country:"PK"},{name:"Sargodha",country:"PK"},{name:"Sahiwal",country:"PK"},{name:"Sibi",country:"PK"},{name:"Sukkur",country:"PK"},{name:"Zhob",country:"PK"},{short:"AB",name:"Abia",country:"NG"},{short:"FC",name:"Abuja",country:"NG"},{short:"AD",name:"Adamawa",country:"NG"},{short:"AK",name:"Akwa Ibom",country:"NG"},{short:"AN",name:"Anambra",country:"NG"},{short:"BA",name:"Bauchi",country:"NG"},{short:"BY",name:"Bayelsa",country:"NG"},{short:"BE",name:"Benue",country:"NG"},{short:"BO",name:"Borno",country:"NG"},{short:"CR",name:"Cross River",country:"NG"},{short:"DE",name:"Delta",country:"NG"},{short:"EB",name:"Ebonyi",country:"NG"},{short:"ED",name:"Edo",country:"NG"},{short:"EK",name:"Ekiti",country:"NG"},{short:"EN",name:"Enugu",country:"NG"},{short:"GO",name:"Gombe",country:"NG"},{short:"IM",name:"Imo",country:"NG"},{short:"JI",name:"Jigawa",country:"NG"},{short:"KD",name:"Kaduna",country:"NG"},{short:"KN",name:"Kano",country:"NG"},{short:"KT",name:"Katsina",country:"NG"},{short:"KE",name:"Kebbi",country:"NG"},{short:"KO",name:"Kogi",country:"NG"},{short:"KW",name:"Kwara",country:"NG"},{short:"LA",name:"Lagos",country:"NG"},{short:"NA",name:"Nasarawa",country:"NG"},{short:"NI",name:"Niger",country:"NG"},{short:"OG",name:"Ogun",country:"NG"},{short:"ON",name:"Ondo",country:"NG"},{short:"OS",name:"Osun",country:"NG"},{short:"OY",name:"Oyo",country:"NG"},{short:"PL",name:"Plateau",country:"NG"},{short:"RI",name:"Rivers",country:"NG"},{short:"SO",name:"Sokoto",country:"NG"},{short:"TA",name:"Taraba",country:"NG"},{short:"YO",name:"Yobe",country:"NG"},{short:"ZA",name:"Zamfara",country:"NG"},{name:"愛知県",english:"Aichi",country:"JP"},{name:"秋田県",english:"Akita",country:"JP"},{name:"青森県",english:"Aomori",country:"JP"},{name:"千葉県",english:"Chiba",country:"JP"},{name:"愛媛県",english:"Ehime",country:"JP"},{name:"福井県",english:"Fukui",country:"JP"},{name:"福岡県",english:"Fukuoka",country:"JP"},{name:"福島県",english:"Fukushima",country:"JP"},{name:"岐阜県",english:"Gifu",country:"JP"},{name:"群馬県",english:"Gunma",country:"JP"},{name:"広島県",english:"Hiroshima",country:"JP"},{name:"北海道",english:"Hokkaidō",country:"JP"},{name:"兵庫県",english:"Hyōgo",country:"JP"},{name:"茨城県",english:"Ibaraki",country:"JP"},{name:"石川県",english:"Ishikawa",country:"JP"},{name:"岩手県",english:"Iwate",country:"JP"},{name:"香川県",english:"Kagawa",country:"JP"},{name:"鹿児島県",english:"Kagoshima",country:"JP"},{name:"神奈川県",english:"Kanagawa",country:"JP"},{name:"高知県",english:"Kōchi",country:"JP"},{name:"熊本県",english:"Kumamoto",country:"JP"},{name:"京都府",english:"Kyōto",country:"JP"},{name:"三重県",english:"Mie",country:"JP"},{name:"宮城県",english:"Miyagi",country:"JP"},{name:"宮崎県",english:"Miyazaki",country:"JP"},{name:"長野県",english:"Nagano",country:"JP"},{name:"長崎県",english:"Nagasaki",country:"JP"},{name:"奈良県",english:"Nara",country:"JP"},{name:"新潟県",english:"Niigata",country:"JP"},{name:"大分県",english:"Ōita",country:"JP"},{name:"岡山県",english:"Okayama",country:"JP"},{name:"沖縄県",english:"Okinawa",country:"JP"},{name:"大阪府",english:"Ōsaka",country:"JP"},{name:"佐賀県",english:"Saga",country:"JP"},{name:"埼玉県",english:"Saitama",country:"JP"},{name:"滋賀県",english:"Shiga",country:"JP"},{name:"島根県",english:"Shimane",country:"JP"},{name:"静岡県",english:"Shizuoka",country:"JP"},{name:"栃木県",english:"Tochigi",country:"JP"},{name:"徳島県",english:"Tokushima",country:"JP"},{name:"東京都",english:"Tōkyō",country:"JP"},{name:"鳥取県",english:"Tottori",country:"JP"},{name:"富山県",english:"Toyama",country:"JP"},{name:"和歌山県",english:"Wakayama",country:"JP"},{name:"山形県",english:"Yamagata",country:"JP"},{name:"山口県",english:"Yamaguchi",country:"JP"},{name:"山梨県",english:"Yamanashi",country:"JP"},{short:"B",name:"Burgenland",country:"AT"},{short:"K",name:"Kärnten",country:"AT"},{short:"NÖ",name:"Niederösterreich",country:"AT"},{short:"OÖ",name:"Oberösterreich",country:"AT"},{short:"S",name:"Salzburg",country:"AT"},{short:"ST",name:"Steiermark",country:"AT"},{short:"T",name:"Tirol",country:"AT"},{short:"V",name:"Vorarlberg",country:"AT"},{short:"W",name:"Wien",country:"AT"},{short:"AC",name:"Acre",country:"BR"},{short:"AL",name:"Alagoas",country:"BR"},{short:"AP",name:"Amapá",country:"BR"},{short:"AM",name:"Amazonas",country:"BR"},{short:"BA",name:"Bahia",country:"BR"},{short:"CE",name:"Ceará",country:"BR"},{short:"DF",name:"Distrito Federal",country:"BR"},{short:"ES",name:"Espírito Santo",country:"BR"},{short:"GO",name:"Goiás",country:"BR"},{short:"MA",name:"Maranhão",country:"BR"},{short:"MT",name:"Mato Grosso",country:"BR"},{short:"MS",name:"Mato Grosso do Sul",country:"BR"},{short:"MG",name:"Minas Gerais",country:"BR"},{short:"PA",name:"Pará",country:"BR"},{short:"PB",name:"Paraíba",country:"BR"},{short:"PR",name:"Paraná",country:"BR"},{short:"PE",name:"Pernambuco",country:"BR"},{short:"PI",name:"Piauí",country:"BR"},{short:"RJ",name:"Rio de Janeiro",country:"BR"},{short:"RN",name:"Rio Grande do Norte",country:"BR"},{short:"RS",name:"Rio Grande do Sul",country:"BR"},{short:"RO",name:"Rondônia",country:"BR"},{short:"RR",name:"Roraima",country:"BR"},{short:"SC",name:"Santa Catarina",country:"BR"},{short:"SP",name:"São Paulo",country:"BR"},{short:"SE",name:"Sergipe",country:"BR"},{short:"TO",name:"Tocantins",country:"BR"},{name:"Abra",country:"PH"},{name:"Agusan del Norte",country:"PH"},{name:"Agusan del Sur",country:"PH"},{name:"Aklan",country:"PH"},{name:"Albay",country:"PH"},{name:"Antique",country:"PH"},{name:"Apayao",country:"PH"},{name:"Aurora",country:"PH"},{name:"Basilan",country:"PH"},{name:"Bataan",country:"PH"},{name:"Batanes",country:"PH"},{name:"Batangas",country:"PH"},{name:"Benguet",country:"PH"},{name:"Biliran",country:"PH"},{name:"Bohol",country:"PH"},{name:"Bukidnon",country:"PH"},{name:"Bulacan",country:"PH"},{name:"Cagayan",country:"PH"},{name:"Camarines Norte",country:"PH"},{name:"Camarines Sur",country:"PH"},{name:"Camiguin",country:"PH"},{name:"Capiz",country:"PH"},{name:"Catanduanes",country:"PH"},{name:"Cavite",country:"PH"},{name:"Cebu",country:"PH"},{name:"Compostela Valley",country:"PH"},{name:"Cotabato",country:"PH"},{name:"Davao del Norte",country:"PH"},{name:"Davao del Sur",country:"PH"},{name:"Davao Occidental",country:"PH"},{name:"Davao Oriental",country:"PH"},{name:"Dinagat Islands",country:"PH"},{name:"Eastern Samar",country:"PH"},{name:"Guimaras",country:"PH"},{name:"Ifugao",country:"PH"},{name:"Ilocos Norte",country:"PH"},{name:"Ilocos Sur",country:"PH"},{name:"Iloilo",country:"PH"},{name:"Isabela",country:"PH"},{name:"Kalinga",country:"PH"},{name:"La Union",country:"PH"},{name:"Laguna",country:"PH"},{name:"Lanao del Norte",country:"PH"},{name:"Lanao del Sur",country:"PH"},{name:"Leyte",country:"PH"},{name:"Maguindanao",country:"PH"},{name:"Marinduque",country:"PH"},{name:"Masbate",country:"PH"},{name:"Misamis Occidental",country:"PH"},{name:"Misamis Oriental",country:"PH"},{name:"Mountain Province",country:"PH"},{name:"Negros Occidental",country:"PH"},{name:"Negros Oriental",country:"PH"},{name:"Northern Samar",country:"PH"},{name:"Nueva Ecija",country:"PH"},{name:"Nueva Vizcaya",country:"PH"},{name:"Occidental Mindoro",country:"PH"},{name:"Oriental Mindoro",country:"PH"},{name:"Palawan",country:"PH"},{name:"Pampanga",country:"PH"},{name:"Pangasinan",country:"PH"},{name:"Quezon",country:"PH"},{name:"Quirino",country:"PH"},{name:"Rizal",country:"PH"},{name:"Romblon",country:"PH"},{name:"Samar",country:"PH"},{name:"Sarangani",country:"PH"},{name:"Siquijor",country:"PH"},{name:"Sorsogon",country:"PH"},{name:"South Cotabato",country:"PH"},{name:"Southern Leyte",country:"PH"},{name:"Sultan Kudarat",country:"PH"},{name:"Sulu",country:"PH"},{name:"Surigao del Norte",country:"PH"},{name:"Surigao del Sur",country:"PH"},{name:"Tarlac",country:"PH"},{name:"Tawi-Tawi",country:"PH"},{name:"Zambales",country:"PH"},{name:"Zamboanga del Norte",country:"PH"},{name:"Zamboanga del Sur",country:"PH"},{name:"Zamboanga Sibugay",country:"PH"},{name:"Metro Manila",country:"PH"},{name:"Hà Nội",country:"VN"},{name:"Hà Giang",country:"VN"},{name:"Cao Bằng",country:"VN"},{name:"Bắc Kạn",country:"VN"},{name:"Tuyên Quang",country:"VN"},{name:"Lào Cai",country:"VN"},{name:"Điện Biên",country:"VN"},{name:"Lai Châu",country:"VN"},{name:"Sơn La",country:"VN"},{name:"Yên Bái",country:"VN"},{name:"Hòa Bình",country:"VN"},{name:"Thái Nguyên",country:"VN"},{name:"Lạng Sơn",country:"VN"},{name:"Quảng Ninh",country:"VN"},{name:"Bắc Giang",country:"VN"},{name:"Phú Thọ",country:"VN"},{name:"Vĩnh Phúc",country:"VN"},{name:"Bắc Ninh",country:"VN"},{name:"Hải Dương",country:"VN"},{name:"Hải Phòng",country:"VN"},{name:"Hưng Yên",country:"VN"},{name:"Thái Bình",country:"VN"},{name:"Hà Nam",country:"VN"},{name:"Nam Định",country:"VN"},{name:"Ninh Bình",country:"VN"},{name:"Thanh Hóa",country:"VN"},{name:"Nghệ An",country:"VN"},{name:"Hà Tĩnh",country:"VN"},{name:"Quảng Bình",country:"VN"},{name:"Quảng Trị",country:"VN"},{name:"Thừa Thiên–Huế",country:"VN"},{name:"Đà Nẵng",country:"VN"},{name:"Quảng Nam",country:"VN"},{name:"Quảng Ngãi",country:"VN"},{name:"Bình Định",country:"VN"},{name:"Phú Yên",country:"VN"},{name:"Khánh Hòa",country:"VN"},{name:"Ninh Thuận",country:"VN"},{name:"Bình Thuận",country:"VN"},{name:"Kon Tum",country:"VN"},{name:"Gia Lai",country:"VN"},{name:"Đắk Lắk",country:"VN"},{name:"Đắk Nông",country:"VN"},{name:"Lâm Đồng",country:"VN"},{name:"Bình Phước",country:"VN"},{name:"Tây Ninh",country:"VN"},{name:"Bình Dương",country:"VN"},{name:"Đồng Nai",country:"VN"},{name:"Bà Rịa–Vũng Tàu",country:"VN"},{name:"Thành phố Hồ Chí Minh",country:"VN"},{name:"Long An",country:"VN"},{name:"Tiền Giang",country:"VN"},{name:"Bến Tre",country:"VN"},{name:"Trà Vinh",country:"VN"},{name:"Vĩnh Long",country:"VN"},{name:"Đồng Tháp",country:"VN"},{name:"An Giang",country:"VN"},{name:"Kiên Giang",country:"VN"},{name:"Cần Thơ",country:"VN"},{name:"Hậu Giang",country:"VN"},{name:"Sóc Trăng",country:"VN"},{name:"Bạc Liêu",country:"VN"},{name:"Cà Mau",country:"VN"},{name:"San José",country:"CR"},{name:"Alajuela",country:"CR"},{name:"Cartago",country:"CR"},{name:"Heredia",country:"CR"},{name:"Guanacaste",country:"CR"},{name:"Puntarenas",country:"CR"},{name:"Limón",country:"CR"},{name:"Auckland",country:"NZ"},{name:"New Plymouth",country:"NZ"},{name:"Hawke's Bay",country:"NZ"},{name:"Wellington",country:"NZ"},{name:"Nelson",country:"NZ"},{name:"Marlborough",country:"NZ"},{name:"Westland",country:"NZ"},{name:"Canterbury",country:"NZ"},{name:"Otago",country:"NZ"},{name:"Southland",country:"NZ"}];var M=Object.defineProperty,L=Object.getOwnPropertyDescriptor,R=(n,a,e,o)=>{for(var r=o>1?void 0:o?L(a,e):a,t=n.length-1,c;t>=0;t--)(c=n[t])&&(r=(o?c(a,e,r):c(r))||r);return o&&r&&M(a,e,r),r};window.countries=window.countries||I.sort((n,a)=>n.namea.name?1:0);window.provinces=window.provinces||T.sort((n,a)=>n.namea.name?1:0);window.countryNameCache={};window.countryRegionsCache={};window.canadaRegionsNoBCCache={};let P=class extends m{getCountries(){return window.countries}getCountryName(n){if(!n)return null;if(window.countryNameCache[n])return window.countryNameCache[n];const a=window.countries.find(o=>o.code===n),e=a?a.name:null;return window.countryNameCache[n]=e,e}getCountryRegions(n){if(!n)return null;if(window.countryRegionsCache[n])return window.countryRegionsCache[n];const a=window.provinces.filter(e=>e.country===n).map(e=>({name:e.english||e.name,short:e.short&&e.short.length<=2?e.short:"--"}));return window.countryRegionsCache[n]=a,a}getCanadaRegionsExcludeBC(){const n="CA";if(window.canadaRegionsNoBCCache[n])return window.canadaRegionsNoBCCache[n];const a=window.provinces.filter(e=>e.country==="CA"&&e.short!=="BC").map(e=>({name:e.english||e.name,short:e.short&&e.short.length<=2?e.short:"--"}));return window.canadaRegionsNoBCCache[n]=a,a}};P=R([g({})],P);var O=Object.defineProperty,G=Object.getOwnPropertyDescriptor,b=(n,a,e,o)=>{for(var r=o>1?void 0:o?G(a,e):a,t=n.length-1,c;t>=0;t--)(c=n[t])&&(r=(o?c(a,e,r):c(r))||r);return o&&r&&O(a,e,r),r};let B=class extends m{createVuetifyRulesObject(n){const a={streetAddress:[],streetAddressAdditional:[],addressCity:[],addressRegion:[],postalCode:[],addressCountry:[],deliveryInstructions:[]};return this.$v&&this.$v[n]&&Object.keys(this.$v[n]).filter(e=>e.charAt(0)!=="$").forEach(e=>{a[e]=[],Object.keys(this.$v[n][e].$params).forEach(o=>{switch(o){case"required":a[e].push(()=>this.requiredRule(n,e));break;case"minLength":a[e].push(()=>this.minLengthRule(n,e));break;case"maxLength":a[e].push(()=>this.maxLengthRule(n,e));break;case"isCanada":a[e].push(()=>this.isCanadaRule(n,e));break;case"isBC":a[e].push(()=>this.isBCRule(n,e));break}})}),a}requiredRule(n,a){return!!(this.$v[n]&&this.$v[n][a].required)||"This field is required"}minLengthRule(n,a){const e=this.$v[n][a].$params.minLength.min;return!!(this.$v[n]&&this.$v[n][a].minLength)||`Minimum length is ${e}`}maxLengthRule(n,a){const e=this.$v[n][a].$params.maxLength.max;return!!(this.$v[n]&&this.$v[n][a].maxLength)||`Maximum length is ${e}`}isCanadaRule(n,a){return!!(this.$v[n]&&this.$v[n][a].isCanada)||"Address must be in Canada"}isBCRule(n,a){return!!(this.$v[n]&&this.$v[n][a].isBC)||"Address must be in BC"}};B=b([g({})],B);export{P as C,l as D,d as N,B as V}; +//# sourceMappingURL=validation-mixin-e5d1d708.js.map diff --git a/docs/assets/validation-mixin-2ad1b825.js.map b/docs/assets/validation-mixin-e5d1d708.js.map similarity index 56% rename from docs/assets/validation-mixin-2ad1b825.js.map rename to docs/assets/validation-mixin-e5d1d708.js.map index 50a5753e..235dd41e 100644 --- a/docs/assets/validation-mixin-2ad1b825.js.map +++ b/docs/assets/validation-mixin-e5d1d708.js.map @@ -1 +1 @@ -{"version":3,"file":"validation-mixin-2ad1b825.js","sources":["../../src/enums/name-request-codes.ts","../../src/enums/name-request-states.ts","../../src/mixins/date-mixin.ts","../../src/mixins/name-request-mixin.ts","../../src/mixins/countries-provinces-mixin.ts","../../src/mixins/validation-mixin.ts"],"sourcesContent":["//\n// Various codes found in NR objects.\n// (may be sorted by code)\n//\n\n// ref: https://github.com/bcgov/namex/blob/main/api/namex/constants/__init__.py\n// ref: https://github.com/bcgov/lear/blob/main/legal-api/src/legal_api/resources/v1/nr_type_map.py\nexport enum NrRequestTypeCodes {\n // change name (or resubmit)\n CHANGE_BEN = 'BEC',\n CHANGE_CCC = 'CCC',\n CHANGE_COOP = 'CCP',\n CHANGE_CORP = 'CCR', // BC Limited\n CHANGE_FIRM = 'CFR', // SP, DBA or GP\n CHANGE_ULC = 'CUL',\n\n // continuation in (move or resubmit)\n CONTINUATION_IN_BEN = 'BECT',\n CONTINUATION_IN_CCC = 'CCCT',\n CONTINUATION_IN_COOP = 'CTC',\n CONTINUATION_IN_CORP = 'CT',\n CONTINUATION_IN_ULC = 'ULCT',\n\n // convert (or resubmit)\n CONVERT_BEN = 'BECV', // from LTD to BEN\n CONVERT_CCC = 'CCV', // from LTD to CCC\n CONVERT_CORP = 'BECR', // from BEN to LTD\n CONVERT_ULBE = 'ULBE', // from ULC to BEN\n CONVERT_ULC = 'UC', // from LTD to ULC\n CONVERT_ULCB = 'ULCB', // from ULC to LTD\n\n // new (or resubmit)\n NEW_BC = 'BC', // BC Benefit Company Incorporation\n NEW_CCC = 'CC', // CCC - Incorporation/Amalgamation\n NEW_COOP = 'CP', // Cooperative - Incorporation/Amalgamation\n NEW_CORP = 'CR', // BC Company - Incorporation/Amalgamation\n NEW_FIRM = 'FR', // Sole Proprietorship/General Partnership/DBA - Registration\n NEW_ULC = 'UL', // Unlimited Liability Company\n NEW_XPRO_CORP = 'XCR', // Corporation (Foreign) - Extrapro Registration/Amalgamation\n\n // restoration\n RESTORATION_CCC = 'RCC',\n RESTORATION_COOP = 'RCP',\n RESTORATION_CORP = 'RCR', // BC Limited\n RESTORATION_SOC = 'RSO',\n RESTORATION_BEN = 'BERE',\n RESTORATION_ULC = 'RUL',\n\n // others, may be legacy or future\n LC = 'LC', // new XPRO_LL_PARTNR\n CLC = 'CLC', // change XPRO_LL_PARTNR\n RLC = 'RLC', // restoration XPRO_LL_PARTNR\n AL = 'AL', // assumed name XPRO_LL_PARTNR\n LL = 'LL', // new LL_PARTNERSHIP\n CLL = 'CLL', // change LL_PARTNERSHIP\n XLL = 'XLL', // new XPRO_LL_PARTNR\n XCLL = 'XCLL', // change XPRO_LL_PARTNR\n LP = 'LP', // new LIM_PARTNERSHIP\n CLP = 'CLP', // change LIM_PARTNERSHIP\n SO = 'SO', // new SOCIETY\n ASO = 'ASO', // amlagamate SOCIETY\n CSO = 'CSO', // change SOCIETY\n RSO = 'RSO', // restoration SOCIETY\n CTSO = 'CTSO', // move SOCIETY\n CSSO = 'CSSO', // convert SOCIETY\n XSO = 'XSO', // new XPRO_SOCIETY\n XCSO = 'XCSO', // change XPRO_SOCIETY\n XRSO = 'XRSO', // restoration XPRO_SOCIETY\n XASO = 'XASO', // assumed name XPRO_SOCIETY\n XCASO = 'XCASO', // achg XPRO_SOCIETY\n XCP = 'XCP', // new XPRO_COOP\n XCCP = 'XCCP', // change XPRO_COOP\n XRCP = 'XRCP', // restoration XPRO_COOP\n FI = 'FI', // new FINANCIAL\n CFI = 'CFI', // change FINANCIAL\n RFI = 'RFI', // restoration FINANCIAL\n PA = 'PA', // new PRIVATE_ACT\n PAR = 'PAR', // new PARISHES\n BEAM = 'BEAM', // amalgamate BCOMP\n}\n\nexport enum NrRequestActionCodes {\n AMALGAMATE = 'AML',\n ASSUMED = 'ASSUMED', // FUTURE: should be AS (as in LEAR)?\n CHANGE_NAME = 'CHG',\n CONVERSION = 'CNV', // aka Alteration\n DBA = 'DBA', // doing business as\n MOVE = 'MVE', // continuation in\n NEW_BUSINESS = 'NEW', // incorporate or register\n RESTORE = 'REH', // restore or reinstate\n RENEW = 'REN', // restore with new name request\n RESTORATION = 'REST', // FUTURE: unused? delete?\n RESUBMIT = 'RESUBMIT', // FUTURE: unused? delete?\n\n INFO = 'INFO' // special value for sub-menu\n}\n","export enum NameRequestStates {\n // API STATES\n APPROVED = 'APPROVED',\n CANCELLED = 'CANCELLED',\n COMPLETED = 'COMPLETED',\n CONDITIONAL = 'CONDITIONAL', // NR state\n CONDITION = 'CONDITION', // NR name state\n CONSUMED = 'CONSUMED',\n DRAFT = 'DRAFT',\n EXPIRED = 'EXPIRED',\n HISTORICAL = 'HISTORICAL',\n HOLD = 'HOLD',\n INPROGRESS = 'INPROGRESS',\n PENDING_PAYMENT = 'PENDING_PAYMENT',\n REFUND_REQUESTED = 'REFUND_REQUESTED',\n REJECTED = 'REJECTED',\n NRO_UPDATING = 'NRO_UPDATING',\n\n // ADDITIONAL UI STATES FOR ERROR HANDLING\n NOT_APPROVED = 'NOT_APPROVED',\n NOT_FOUND = 'NOT_FOUND',\n NEED_CONSENT = 'NEED_CONSENT',\n INVALID = 'INVALID'\n}\n","import Vue from 'vue'\nimport { Component } from 'vue-property-decorator'\nimport { isDate } from 'lodash'\nimport { ApiDateTimeUtc, IsoDatePacific } from '@bcrs-shared-components/interfaces'\n\n/**\n * This is a local, minimal mixin containing only the methods needed for the shared\n * components when they run within this project (ie, in Storybook).\n *\n * When imported into an app project, the shared components should use the mixins\n * local to that project.\n */\n@Component({\n extends: Vue\n})\nexport default class DateMixin extends Vue {\n /**\n * Creates and returns a new Date object in UTC, given parameters in Pacific timezone.\n * (This works regardless of user's local clock/timezone.)\n * @example \"2021, 0, 1, 0, 0\" -> \"2021-01-01T08:00:00.000Z\"\n * @example \"2021, 6, 1, 0, 0\" -> \"2021-07-01T07:00:00.000Z\"\n */\n createUtcDate (year: number, month: number, day: number, hours = 0, minutes = 0): Date {\n // 1. create the new date in UTC\n // 2. compute the offset between UTC and Pacific timezone\n // 3. add the offset to convert the date to Pacific timezone\n // Ref: https://stackoverflow.com/questions/15141762/\n const date = new Date(Date.UTC(year, month, day, hours, minutes))\n const utcDate = new Date(date.toLocaleString('en-US', { timeZone: 'UTC' }))\n const tzDate = new Date(date.toLocaleString('en-US', { timeZone: 'America/Vancouver' }))\n const offset = utcDate.getTime() - tzDate.getTime()\n date.setTime(date.getTime() + offset)\n\n return date\n }\n\n /**\n * Converts an API datetime string (in UTC) to a Date object.\n * @example 2021-08-05T16:56:50.783101+00:00 -> 2021-08-05T16:56:50Z\n */\n apiToDate (dateTimeString: ApiDateTimeUtc): Date {\n if (!dateTimeString) return null // safety check\n\n // chop off the milliseconds and UTC offset and append \"Zulu\" timezone abbreviation\n // eg, 2020-08-28T21:53:58Z\n dateTimeString = dateTimeString.slice(0, 19) + 'Z'\n\n // NB: this `new Date()` is safe because the string is already UTC format\n // so the conversion to JS Date ignores the browser's local timezone\n return new Date(dateTimeString)\n }\n\n /**\n * Converts a date string (YYYY-MM-DD) to a Date object at 12:00:00 am Pacific time.\n * @example 2021-11-22 -> 2021-11-22T08:00:00.00Z\n */\n yyyyMmDdToDate (dateStr: IsoDatePacific): Date {\n // safety checks\n if (!dateStr) return null\n if (dateStr.length !== 10) return null\n\n const split = dateStr.split('-')\n const year = +split[0]\n const month = +split[1]\n const day = +split[2]\n\n return this.createUtcDate(year, (month - 1), day)\n }\n\n /**\n * Converts a Date object to a date string (YYYY-MM-DD) in Pacific timezone.\n * @example \"2021-01-01 07:00:00 GMT\" -> \"2020-12-31\"\n * @example \"2021-01-01 08:00:00 GMT\" -> \"2021-01-01\"\n */\n dateToYyyyMmDd (date: Date): IsoDatePacific {\n // safety check\n if (!isDate(date) || isNaN(date.getTime())) return null\n\n // NB: some versions of Node have only en-US locale\n // so use that and convert results accordingly\n const dateStr = date.toLocaleDateString('en-US', {\n timeZone: 'America/Vancouver',\n month: 'numeric', // 12\n day: 'numeric', // 31\n year: 'numeric' // 2020\n })\n\n // convert mm/dd/yyyy to yyyy-mm-dd\n // and make sure month and day are 2 digits (eg, 03)\n const [ mm, dd, yyyy ] = dateStr.split('/')\n return `${yyyy}-${mm.padStart(2, '0')}-${dd.padStart(2, '0')}`\n }\n\n /**\n * Converts a Date object to a date string (Month Day, Year) in Pacific timezone.\n * @param longMonth whether to show long month name (eg, December vs Dec)\n * @param showWeekday whether to show the weekday name (eg, Thursday)\n * @example \"2021-01-01 07:00:00 GMT\" -> \"Dec 31, 2020\"\n * @example \"2021-01-01 08:00:00 GMT\" -> \"Jan 1, 2021\"\n */\n dateToPacificDate (date: Date, longMonth = false, showWeekday = false): string {\n // safety check\n if (!isDate(date) || isNaN(date.getTime())) return null\n\n // NB: some versions of Node have only en-US locale\n // so use that and convert results accordingly\n let dateStr = date.toLocaleDateString('en-US', {\n timeZone: 'America/Vancouver',\n weekday: showWeekday ? 'long' : undefined, // Thursday or nothing\n month: longMonth ? 'long' : 'short', // December or Dec.\n day: 'numeric', // 31\n year: 'numeric' // 2020\n })\n\n // remove period after month\n dateStr = dateStr.replace('.', '')\n\n return dateStr\n }\n\n /**\n * Converts a date string (YYYY-MM-DD) to a date string (Month Day, Year) in Pacific timezone.\n * @param longMonth whether to show long month name (eg, December vs Dec)\n * @param showWeekday whether to show the weekday name (eg, Thursday)\n * @example \"2021-01-01\" -> \"Thursday, December 31, 2020\"\n */\n yyyyMmDdToPacificDate (dateStr: IsoDatePacific, longMonth = false, showWeekday = false): string {\n return this.dateToPacificDate(this.yyyyMmDdToDate(dateStr), longMonth, showWeekday)\n }\n\n /**\n * Converts a Date object to a time string (HH:MM am/pm) in Pacific timezone.\n * @example \"2021-01-01 07:00:00 GMT\" -> \"11:00 pm\"\n * @example \"2021-01-01 08:00:00 GMT\" -> \"12:00 am\"\n */\n dateToPacificTime (date: Date): string {\n // safety check\n if (!isDate(date) || isNaN(date.getTime())) return null\n\n // NB: some versions of Node have only en-US locale\n // so use that and convert results accordingly\n let timeStr = date.toLocaleTimeString('en-US', {\n timeZone: 'America/Vancouver',\n hour: 'numeric', // 11\n minute: '2-digit', // 00\n hour12: true // a.m./p.m.\n })\n\n // replace AM with am and PM with pm\n timeStr = timeStr.replace('AM', 'am').replace('PM', 'pm')\n\n return timeStr\n }\n\n /**\n * Converts an API datetime string (in UTC) to a date and time string (Month Day, Year at HH:MM am/pm\n * Pacific time).\n * @example \"2021-01-01T00:00:00.000000+00:00\" -> \"Dec 31, 2020 at 04:00 pm Pacific time\" (PST example)\n * @example \"2021-07-01T00:00:00.000000+00:00\" -> \"Jun 30, 2021 at 05:00 pm Pacific time\" (PDT example)\n */\n apiToPacificDateTime (dateTimeString: ApiDateTimeUtc): string {\n if (!dateTimeString) return null // safety check\n\n const date = this.apiToDate(dateTimeString)\n const dateStr = this.dateToPacificDate(date, true)\n const timeStr = this.dateToPacificTime(date)\n\n return `${dateStr} at ${timeStr} Pacific time`\n }\n\n /**\n * Add a number of months to a date and return \"YYYY-MM-DD\".\n * Date must be in the format of \"YYYY-MM-DD\" and months is a number\n * @example (3, 2023-02-03) -> \"2023-05-03\"\n * @example (18, 2023-02-03) -> \"2024-08-03\"\n */\n addMonthsToDate (month: number, date: string): string {\n if (!date) {\n date = '2023-01-01'\n }\n const temp = this.yyyyMmDdToDate(date)\n temp.setMonth(temp.getMonth() + month)\n const dateAfterAddition = this.dateToYyyyMmDd(temp)\n return dateAfterAddition\n }\n\n /**\n * Decrease one date from another and return number of months as the difference.\n * Dates must be in the \"YYYY-MM-DD\" format\n * @example (2023-02-03, 2024-08-03) -> 18\n * @example (2023-02-03, 2023-04-03) -> 2\n */\n subtractDates (dateFrom: string, dateTo: string): number {\n if (!dateFrom) {\n dateFrom = '2023-01-01'\n }\n if (!dateTo) {\n dateTo = this.addMonthsToDate(24, dateFrom)\n }\n const expiryDate = this.yyyyMmDdToDate(dateTo)\n const currDate = this.yyyyMmDdToDate(dateFrom)\n const monthDiff = expiryDate.getMonth() - currDate.getMonth()\n const yearDiff = (12 * (expiryDate.getFullYear() - currDate.getFullYear()))\n let difference = monthDiff + yearDiff\n // For example if Jan 31st and March 1, difference is 1 not 2\n if (expiryDate.getDate() < currDate.getDate()) {\n difference--\n }\n return difference\n }\n}\n","import Vue from 'vue'\nimport { Component } from 'vue-property-decorator'\nimport { NameRequestStates, NrRequestActionCodes } from '@bcrs-shared-components/enums'\nimport { NameRequestIF } from '@bcrs-shared-components/interfaces'\n\n/**\n * Mixin that provides some useful Name Request utilities.\n */\n@Component({})\nexport default class NameRequestMixin extends Vue {\n /**\n * Validates a name request against the applicant's information.\n * Throws an error if there is a problem.\n * @param nameRequest the name request object\n * @param nrRequestActionCode the request action code to match\n * @param businessId the business identifier to match\n * @param phone the applicant's phone number to match\n * @param email the applicant's email address to match\n * @returns the name request object\n */\n validateNameRequest (\n nameRequest: NameRequestIF,\n nrRequestActionCode: NrRequestActionCodes,\n businessId?: string,\n phone?: string,\n email?: string\n ): NameRequestIF {\n // ensure NR is valid\n const invalid = this.isNrInvalid(nameRequest)\n if (invalid) {\n throw new Error(`Invalid Name Request: ${invalid}`)\n }\n\n if (nameRequest.request_action_cd !== nrRequestActionCode) {\n throw new Error('Incorrect Request Action Code')\n }\n\n // match business id\n if (businessId && nameRequest.corpNum !== businessId) {\n throw new Error('Incorrect Business ID')\n }\n\n // match email\n if (email && nameRequest.applicants?.emailAddress !== email) {\n throw new Error('Incorrect Email Address')\n }\n\n // match phone\n if (phone && nameRequest.applicants?.phoneNumber !== phone) {\n throw new Error('Incorrect Phone Number')\n }\n\n // ensure NR is consumable\n const state = this.getNrState(nameRequest)\n if (state !== NameRequestStates.APPROVED && state !== NameRequestStates.CONDITIONAL) {\n throw new Error(`Invalid Name Request state: ${state}`)\n }\n\n return nameRequest\n }\n\n /**\n * Returns error message if the Name Request data is invalid (or null if valid).\n * @param nameRequest the name request object\n * @param requestActionCode the request action code to match\n */\n isNrInvalid (nameRequest: NameRequestIF): string {\n if (!nameRequest) return 'Invalid NR object'\n if (!nameRequest.applicants) return 'Invalid NR applicants'\n if (!nameRequest.expirationDate) return 'Invalid NR expiration date\\n(NR may still be processing)'\n if (!nameRequest.legalType) return 'Invalid NR legal type'\n if (!this.getNrApprovedName(nameRequest)) return 'Invalid NR approved name'\n if (!nameRequest.nrNum) return 'Invalid NR number'\n if (!nameRequest.requestTypeCd) return 'Invalid NR request type code'\n if (!nameRequest.request_action_cd) return 'Invalid NR request action code'\n if (!nameRequest.state) return 'Invalid NR state'\n return null\n }\n\n /**\n * Returns the Name Request's state.\n * @param nameRequest the name request object\n */\n getNrState (nameRequest: NameRequestIF): NameRequestStates {\n // ensure a NR object is provided\n if (!nameRequest) return null\n\n // if the NR is awaiting consent, it is not consumable\n // null = consent not required\n // R = consent received\n // N = consent waived\n // Y = consent required\n if (nameRequest.state === NameRequestStates.CONDITIONAL &&\n nameRequest.consentFlag !== null && nameRequest.consentFlag !== 'R' && nameRequest.consentFlag !== 'N') {\n return NameRequestStates.NEED_CONSENT\n }\n\n // if the NR's root state is not APPROVED or CONDITIONAL, it is not consumable\n // NB: EXPIRED or CONSUMED should not return NOT_APPROVED\n if (![NameRequestStates.APPROVED, NameRequestStates.CONDITIONAL,\n NameRequestStates.EXPIRED, NameRequestStates.CONSUMED].includes(nameRequest.state)) {\n return NameRequestStates.NOT_APPROVED\n }\n\n // otherwise, the NR is consumable\n return nameRequest.state // APPROVED or CONDITIONAL or CONSUMED or EXPIRED\n }\n\n /**\n * Returns the Name Request's approved name (or undefined or null if not found).\n * @param nameRequest the name request object\n */\n getNrApprovedName (nameRequest: NameRequestIF): string {\n if (nameRequest?.names?.length > 0) {\n return nameRequest.names\n .find(name => [NameRequestStates.APPROVED, NameRequestStates.CONDITION].includes(name.state))?.name\n }\n return null // invalid NR or names array\n }\n\n /**\n * Maps the request action code to a display description.\n * @param requestActionCode the request action code\n */\n getNrRequestDesc (requestActionCode: NrRequestActionCodes): string {\n switch (requestActionCode) {\n case NrRequestActionCodes.NEW_BUSINESS: return 'New Business'\n case NrRequestActionCodes.CHANGE_NAME: return 'Change of Name'\n case NrRequestActionCodes.CONVERSION: return 'Conversion'\n case NrRequestActionCodes.RESTORE: return 'Restoration'\n }\n return null // should never happen\n }\n}\n","import { Component, Vue } from 'vue-property-decorator'\n\nimport countries from 'country-list/data.json'\nimport provinces from 'provinces/provinces.json'\n\n// import these and sort them only once globally\nwindow['countries'] = window['countries'] || countries\n .sort((a, b) => (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0)\n\nwindow['provinces'] = window['provinces'] || provinces\n .sort((a, b) => (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0)\n\n// global caching to improve performance when called multiple times\nwindow['countryNameCache'] = {}\nwindow['countryRegionsCache'] = {}\n\n/**\n * Mixin that allows VM access to useful country/province data and functions.\n * @link https://www.npmjs.com/package/country-list\n * @lint https://www.npmjs.com/package/provinces\n */\n@Component({})\nexport default class CountriesProvincesMixin extends Vue {\n /**\n * Helper function to return a list of countries.\n * @returns An array of country objects, sorted alphabetically.\n */\n getCountries (): Array {\n return window['countries']\n }\n\n /**\n * Helper function to return a country's name.\n * @param code The short code of the country.\n * @returns The long name of the country.\n */\n getCountryName (code: string): string {\n if (!code) return null\n if (window['countryNameCache'][code]) return window['countryNameCache'][code]\n const country = window['countries'].find(c => c.code === code)\n const result = country ? country.name : null\n window['countryNameCache'][code] = result\n return result\n }\n\n /**\n * Helper function to return a country's list of provinces.\n * @param code The short code of the country.\n * @returns An array of province objects, sorted alphabetically.\n */\n getCountryRegions (code: string): Array {\n if (!code) return null\n if (window['countryRegionsCache'][code]) return window['countryRegionsCache'][code]\n const result = window['provinces']\n .filter(p => p.country === code)\n .map(p => ({\n name: p.english || p.name,\n short: (p.short && p.short.length <= 2) ? p.short : '--'\n }))\n window['countryRegionsCache'][code] = result\n return result\n }\n}\n","import { Component, Vue } from 'vue-property-decorator'\n\n/**\n * Mixin that provides some useful validation utilities.\n */\n@Component({})\nexport default class ValidationMixin extends Vue {\n /**\n * Creates a Vuetify rules object from the Vuelidate state.\n * @param model The name of the model we are validating.\n * @returns A Vuetify rules object.\n */\n public createVuetifyRulesObject (model: string): { [attr: string]: Array } {\n const obj = {\n streetAddress: [],\n streetAddressAdditional: [],\n addressCity: [],\n addressRegion: [],\n postalCode: [],\n addressCountry: [],\n deliveryInstructions: []\n }\n\n // ensure Vuelidate state object is initialized\n if (this.$v && this.$v[model]) {\n // iterate over Vuelidate object properties\n Object.keys(this.$v[model])\n // only look at validation properties\n .filter(prop => prop.charAt(0) !== '$')\n .forEach(prop => {\n // create array for each validation property\n obj[prop] = []\n // iterate over validation property params\n Object.keys(this.$v[model][prop].$params)\n .forEach(param => {\n // add specified validation functions to array\n switch (param) {\n case 'required': obj[prop].push(() => this.requiredRule(model, prop)); break\n case 'minLength': obj[prop].push(() => this.minLengthRule(model, prop)); break\n case 'maxLength': obj[prop].push(() => this.maxLengthRule(model, prop)); break\n case 'isCanada': obj[prop].push(() => this.isCanadaRule(model, prop)); break\n case 'isBC': obj[prop].push(() => this.isBCRule(model, prop)); break\n // FUTURE: add extra validation functions here\n default: break\n }\n })\n })\n }\n\n // sample return object\n // streetAddress: [\n // () => this.requiredRule('addressLocal', 'streetAddress'),\n // () => this.minLengthRule('addressLocal', 'streetAddress'),\n // () => this.maxLengthRule('addressLocal', 'streetAddress')\n // ],\n // ...\n\n return obj\n }\n\n /**\n * Misc Vuetify rules.\n * @param prop The name of the property object to validate.\n * @param key The name of the property key (field) to validate.\n * @returns True if the rule passes, otherwise an error string.\n */\n protected requiredRule (prop: string, key: string): boolean | string {\n return Boolean(this.$v[prop] && this.$v[prop][key].required) || 'This field is required'\n }\n\n protected minLengthRule (prop: string, key: string): boolean | string {\n const min = this.$v[prop][key].$params.minLength.min\n return Boolean(this.$v[prop] && this.$v[prop][key].minLength) || `Minimum length is ${min}`\n }\n\n protected maxLengthRule (prop: string, key: string): boolean | string {\n const max = this.$v[prop][key].$params.maxLength.max\n return Boolean(this.$v[prop] && this.$v[prop][key].maxLength) || `Maximum length is ${max}`\n }\n\n // FUTURE: generalize this rule to take a validation parameter (ie, 'CA')\n protected isCanadaRule (prop: string, key: string): boolean | string {\n return Boolean(this.$v[prop] && this.$v[prop][key].isCanada) || `Address must be in Canada`\n }\n\n // FUTURE: generalize this rule to take a validation parameter (ie, 'BC')\n protected isBCRule (prop: string, key: string): boolean | string {\n return Boolean(this.$v[prop] && this.$v[prop][key].isBC) || `Address must be in BC`\n }\n}\n"],"names":["NrRequestActionCodes","NameRequestStates","DateMixin","Vue","year","month","day","hours","minutes","date","utcDate","tzDate","offset","dateTimeString","dateStr","split","isDate","mm","dd","yyyy","longMonth","showWeekday","timeStr","temp","dateFrom","dateTo","expiryDate","currDate","monthDiff","yearDiff","difference","__decorateClass","Component","NameRequestMixin","nameRequest","nrRequestActionCode","businessId","phone","email","invalid","_a","_b","state","name","requestActionCode","countries","a","b","provinces","CountriesProvincesMixin","code","country","c","result","p","ValidationMixin","model","obj","prop","param","key","min","max"],"mappings":"6IAiFY,IAAAA,GAAAA,IACVA,EAAA,WAAa,MACbA,EAAA,QAAU,UACVA,EAAA,YAAc,MACdA,EAAA,WAAa,MACbA,EAAA,IAAM,MACNA,EAAA,KAAO,MACPA,EAAA,aAAe,MACfA,EAAA,QAAU,MACVA,EAAA,MAAQ,MACRA,EAAA,YAAc,OACdA,EAAA,SAAW,WAEXA,EAAA,KAAO,OAbGA,IAAAA,GAAA,CAAA,CAAA,ECjFAC,GAAAA,IAEVA,EAAA,SAAW,WACXA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,YAAc,cACdA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,WAAa,aACbA,EAAA,KAAO,OACPA,EAAA,WAAa,aACbA,EAAA,gBAAkB,kBAClBA,EAAA,iBAAmB,mBACnBA,EAAA,SAAW,WACXA,EAAA,aAAe,eAGfA,EAAA,aAAe,eACfA,EAAA,UAAY,YACZA,EAAA,aAAe,eACfA,EAAA,QAAU,U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BL,EAArBxB,EAAA,CADCC,EAAU,CAAA,CAAE,CAAA,EACQuB,CAAA"} \ No newline at end of file +{"version":3,"file":"validation-mixin-e5d1d708.js","sources":["../../src/enums/name-request-codes.ts","../../src/enums/name-request-states.ts","../../src/mixins/date-mixin.ts","../../src/mixins/name-request-mixin.ts","../../src/mixins/countries-provinces-mixin.ts","../../src/mixins/validation-mixin.ts"],"sourcesContent":["//\n// Various codes found in NR objects.\n// (may be sorted by code)\n//\n\n// ref: https://github.com/bcgov/namex/blob/main/api/namex/constants/__init__.py\n// ref: https://github.com/bcgov/lear/blob/main/legal-api/src/legal_api/resources/v1/nr_type_map.py\nexport enum NrRequestTypeCodes {\n // change name (or resubmit)\n CHANGE_BEN = 'BEC',\n CHANGE_CCC = 'CCC',\n CHANGE_COOP = 'CCP',\n CHANGE_CORP = 'CCR', // BC Limited\n CHANGE_FIRM = 'CFR', // SP, DBA or GP\n CHANGE_ULC = 'CUL',\n\n // continuation in (move or resubmit)\n CONTINUATION_IN_BEN = 'BECT',\n CONTINUATION_IN_CCC = 'CCCT',\n CONTINUATION_IN_COOP = 'CTC',\n CONTINUATION_IN_CORP = 'CT',\n CONTINUATION_IN_ULC = 'ULCT',\n\n // convert (or resubmit)\n CONVERT_BEN = 'BECV', // from LTD to BEN\n CONVERT_CCC = 'CCV', // from LTD to CCC\n CONVERT_CORP = 'BECR', // from BEN to LTD\n CONVERT_ULBE = 'ULBE', // from ULC to BEN\n CONVERT_ULC = 'UC', // from LTD to ULC\n CONVERT_ULCB = 'ULCB', // from ULC to LTD\n\n // new (or resubmit)\n NEW_BC = 'BC', // BC Benefit Company Incorporation\n NEW_CCC = 'CC', // CCC - Incorporation/Amalgamation\n NEW_COOP = 'CP', // Cooperative - Incorporation/Amalgamation\n NEW_CORP = 'CR', // BC Company - Incorporation/Amalgamation\n NEW_FIRM = 'FR', // Sole Proprietorship/General Partnership/DBA - Registration\n NEW_ULC = 'UL', // Unlimited Liability Company\n NEW_XPRO_CORP = 'XCR', // Corporation (Foreign) - Extrapro Registration/Amalgamation\n\n // restoration\n RESTORATION_CCC = 'RCC',\n RESTORATION_COOP = 'RCP',\n RESTORATION_CORP = 'RCR', // BC Limited\n RESTORATION_SOC = 'RSO',\n RESTORATION_BEN = 'BERE',\n RESTORATION_ULC = 'RUL',\n\n // others, may be legacy or future\n LC = 'LC', // new XPRO_LL_PARTNR\n CLC = 'CLC', // change XPRO_LL_PARTNR\n RLC = 'RLC', // restoration XPRO_LL_PARTNR\n AL = 'AL', // assumed name XPRO_LL_PARTNR\n LL = 'LL', // new LL_PARTNERSHIP\n CLL = 'CLL', // change LL_PARTNERSHIP\n XLL = 'XLL', // new XPRO_LL_PARTNR\n XCLL = 'XCLL', // change XPRO_LL_PARTNR\n LP = 'LP', // new LIM_PARTNERSHIP\n CLP = 'CLP', // change LIM_PARTNERSHIP\n SO = 'SO', // new SOCIETY\n ASO = 'ASO', // amlagamate SOCIETY\n CSO = 'CSO', // change SOCIETY\n RSO = 'RSO', // restoration SOCIETY\n CTSO = 'CTSO', // move SOCIETY\n CSSO = 'CSSO', // convert SOCIETY\n XSO = 'XSO', // new XPRO_SOCIETY\n XCSO = 'XCSO', // change XPRO_SOCIETY\n XRSO = 'XRSO', // restoration XPRO_SOCIETY\n XASO = 'XASO', // assumed name XPRO_SOCIETY\n XCASO = 'XCASO', // achg XPRO_SOCIETY\n XCP = 'XCP', // new XPRO_COOP\n XCCP = 'XCCP', // change XPRO_COOP\n XRCP = 'XRCP', // restoration XPRO_COOP\n FI = 'FI', // new FINANCIAL\n CFI = 'CFI', // change FINANCIAL\n RFI = 'RFI', // restoration FINANCIAL\n PA = 'PA', // new PRIVATE_ACT\n PAR = 'PAR', // new PARISHES\n BEAM = 'BEAM', // amalgamate BCOMP\n}\n\nexport enum NrRequestActionCodes {\n AMALGAMATE = 'AML',\n ASSUMED = 'ASSUMED', // FUTURE: should be AS (as in LEAR)?\n CHANGE_NAME = 'CHG',\n CONVERSION = 'CNV', // aka Alteration\n DBA = 'DBA', // doing business as\n MOVE = 'MVE', // continuation in\n NEW_BUSINESS = 'NEW', // incorporate or register\n RESTORE = 'REH', // restore or reinstate\n RENEW = 'REN', // restore with new name request\n RESTORATION = 'REST', // FUTURE: unused? delete?\n RESUBMIT = 'RESUBMIT', // FUTURE: unused? delete?\n\n INFO = 'INFO' // special value for sub-menu\n}\n","export enum NameRequestStates {\n // API STATES\n APPROVED = 'APPROVED',\n CANCELLED = 'CANCELLED',\n COMPLETED = 'COMPLETED',\n CONDITIONAL = 'CONDITIONAL', // NR state\n CONDITION = 'CONDITION', // NR name state\n CONSUMED = 'CONSUMED',\n DRAFT = 'DRAFT',\n EXPIRED = 'EXPIRED',\n HISTORICAL = 'HISTORICAL',\n HOLD = 'HOLD',\n INPROGRESS = 'INPROGRESS',\n PENDING_PAYMENT = 'PENDING_PAYMENT',\n REFUND_REQUESTED = 'REFUND_REQUESTED',\n REJECTED = 'REJECTED',\n NRO_UPDATING = 'NRO_UPDATING',\n\n // ADDITIONAL UI STATES FOR ERROR HANDLING\n NOT_APPROVED = 'NOT_APPROVED',\n NOT_FOUND = 'NOT_FOUND',\n NEED_CONSENT = 'NEED_CONSENT',\n INVALID = 'INVALID'\n}\n","import Vue from 'vue'\nimport { Component } from 'vue-property-decorator'\nimport { isDate } from 'lodash'\nimport { ApiDateTimeUtc, IsoDatePacific } from '@bcrs-shared-components/interfaces'\n\n/**\n * This is a local, minimal mixin containing only the methods needed for the shared\n * components when they run within this project (ie, in Storybook).\n *\n * When imported into an app project, the shared components should use the mixins\n * local to that project.\n */\n@Component({\n extends: Vue\n})\nexport default class DateMixin extends Vue {\n /**\n * Creates and returns a new Date object in UTC, given parameters in Pacific timezone.\n * (This works regardless of user's local clock/timezone.)\n * @example \"2021, 0, 1, 0, 0\" -> \"2021-01-01T08:00:00.000Z\"\n * @example \"2021, 6, 1, 0, 0\" -> \"2021-07-01T07:00:00.000Z\"\n */\n createUtcDate (year: number, month: number, day: number, hours = 0, minutes = 0): Date {\n // 1. create the new date in UTC\n // 2. compute the offset between UTC and Pacific timezone\n // 3. add the offset to convert the date to Pacific timezone\n // Ref: https://stackoverflow.com/questions/15141762/\n const date = new Date(Date.UTC(year, month, day, hours, minutes))\n const utcDate = new Date(date.toLocaleString('en-US', { timeZone: 'UTC' }))\n const tzDate = new Date(date.toLocaleString('en-US', { timeZone: 'America/Vancouver' }))\n const offset = utcDate.getTime() - tzDate.getTime()\n date.setTime(date.getTime() + offset)\n\n return date\n }\n\n /**\n * Converts an API datetime string (in UTC) to a Date object.\n * @example 2021-08-05T16:56:50.783101+00:00 -> 2021-08-05T16:56:50Z\n */\n apiToDate (dateTimeString: ApiDateTimeUtc): Date {\n if (!dateTimeString) return null // safety check\n\n // chop off the milliseconds and UTC offset and append \"Zulu\" timezone abbreviation\n // eg, 2020-08-28T21:53:58Z\n dateTimeString = dateTimeString.slice(0, 19) + 'Z'\n\n // NB: this `new Date()` is safe because the string is already UTC format\n // so the conversion to JS Date ignores the browser's local timezone\n return new Date(dateTimeString)\n }\n\n /**\n * Converts a date string (YYYY-MM-DD) to a Date object at 12:00:00 am Pacific time.\n * @example 2021-11-22 -> 2021-11-22T08:00:00.00Z\n */\n yyyyMmDdToDate (dateStr: IsoDatePacific): Date {\n // safety checks\n if (!dateStr) return null\n if (dateStr.length !== 10) return null\n\n const split = dateStr.split('-')\n const year = +split[0]\n const month = +split[1]\n const day = +split[2]\n\n return this.createUtcDate(year, (month - 1), day)\n }\n\n /**\n * Converts a Date object to a date string (YYYY-MM-DD) in Pacific timezone.\n * @example \"2021-01-01 07:00:00 GMT\" -> \"2020-12-31\"\n * @example \"2021-01-01 08:00:00 GMT\" -> \"2021-01-01\"\n */\n dateToYyyyMmDd (date: Date): IsoDatePacific {\n // safety check\n if (!isDate(date) || isNaN(date.getTime())) return null\n\n // NB: some versions of Node have only en-US locale\n // so use that and convert results accordingly\n const dateStr = date.toLocaleDateString('en-US', {\n timeZone: 'America/Vancouver',\n month: 'numeric', // 12\n day: 'numeric', // 31\n year: 'numeric' // 2020\n })\n\n // convert mm/dd/yyyy to yyyy-mm-dd\n // and make sure month and day are 2 digits (eg, 03)\n const [ mm, dd, yyyy ] = dateStr.split('/')\n return `${yyyy}-${mm.padStart(2, '0')}-${dd.padStart(2, '0')}`\n }\n\n /**\n * Converts a Date object to a date string (Month Day, Year) in Pacific timezone.\n * @param longMonth whether to show long month name (eg, December vs Dec)\n * @param showWeekday whether to show the weekday name (eg, Thursday)\n * @example \"2021-01-01 07:00:00 GMT\" -> \"Dec 31, 2020\"\n * @example \"2021-01-01 08:00:00 GMT\" -> \"Jan 1, 2021\"\n */\n dateToPacificDate (date: Date, longMonth = false, showWeekday = false): string {\n // safety check\n if (!isDate(date) || isNaN(date.getTime())) return null\n\n // NB: some versions of Node have only en-US locale\n // so use that and convert results accordingly\n let dateStr = date.toLocaleDateString('en-US', {\n timeZone: 'America/Vancouver',\n weekday: showWeekday ? 'long' : undefined, // Thursday or nothing\n month: longMonth ? 'long' : 'short', // December or Dec.\n day: 'numeric', // 31\n year: 'numeric' // 2020\n })\n\n // remove period after month\n dateStr = dateStr.replace('.', '')\n\n return dateStr\n }\n\n /**\n * Converts a date string (YYYY-MM-DD) to a date string (Month Day, Year) in Pacific timezone.\n * @param longMonth whether to show long month name (eg, December vs Dec)\n * @param showWeekday whether to show the weekday name (eg, Thursday)\n * @example \"2021-01-01\" -> \"Thursday, December 31, 2020\"\n */\n yyyyMmDdToPacificDate (dateStr: IsoDatePacific, longMonth = false, showWeekday = false): string {\n return this.dateToPacificDate(this.yyyyMmDdToDate(dateStr), longMonth, showWeekday)\n }\n\n /**\n * Converts a Date object to a time string (HH:MM am/pm) in Pacific timezone.\n * @example \"2021-01-01 07:00:00 GMT\" -> \"11:00 pm\"\n * @example \"2021-01-01 08:00:00 GMT\" -> \"12:00 am\"\n */\n dateToPacificTime (date: Date): string {\n // safety check\n if (!isDate(date) || isNaN(date.getTime())) return null\n\n // NB: some versions of Node have only en-US locale\n // so use that and convert results accordingly\n let timeStr = date.toLocaleTimeString('en-US', {\n timeZone: 'America/Vancouver',\n hour: 'numeric', // 11\n minute: '2-digit', // 00\n hour12: true // a.m./p.m.\n })\n\n // replace AM with am and PM with pm\n timeStr = timeStr.replace('AM', 'am').replace('PM', 'pm')\n\n return timeStr\n }\n\n /**\n * Converts an API datetime string (in UTC) to a date and time string (Month Day, Year at HH:MM am/pm\n * Pacific time).\n * @example \"2021-01-01T00:00:00.000000+00:00\" -> \"Dec 31, 2020 at 04:00 pm Pacific time\" (PST example)\n * @example \"2021-07-01T00:00:00.000000+00:00\" -> \"Jun 30, 2021 at 05:00 pm Pacific time\" (PDT example)\n */\n apiToPacificDateTime (dateTimeString: ApiDateTimeUtc): string {\n if (!dateTimeString) return null // safety check\n\n const date = this.apiToDate(dateTimeString)\n const dateStr = this.dateToPacificDate(date, true)\n const timeStr = this.dateToPacificTime(date)\n\n return `${dateStr} at ${timeStr} Pacific time`\n }\n\n /**\n * Add a number of months to a date and return \"YYYY-MM-DD\".\n * Date must be in the format of \"YYYY-MM-DD\" and months is a number\n * @example (3, 2023-02-03) -> \"2023-05-03\"\n * @example (18, 2023-02-03) -> \"2024-08-03\"\n */\n addMonthsToDate (month: number, date: string): string {\n if (!date) {\n date = '2023-01-01'\n }\n const temp = this.yyyyMmDdToDate(date)\n temp.setMonth(temp.getMonth() + month)\n const dateAfterAddition = this.dateToYyyyMmDd(temp)\n return dateAfterAddition\n }\n\n /**\n * Decrease one date from another and return number of months as the difference.\n * Dates must be in the \"YYYY-MM-DD\" format\n * @example (2023-02-03, 2024-08-03) -> 18\n * @example (2023-02-03, 2023-04-03) -> 2\n */\n subtractDates (dateFrom: string, dateTo: string): number {\n if (!dateFrom) {\n dateFrom = '2023-01-01'\n }\n if (!dateTo) {\n dateTo = this.addMonthsToDate(24, dateFrom)\n }\n const expiryDate = this.yyyyMmDdToDate(dateTo)\n const currDate = this.yyyyMmDdToDate(dateFrom)\n const monthDiff = expiryDate.getMonth() - currDate.getMonth()\n const yearDiff = (12 * (expiryDate.getFullYear() - currDate.getFullYear()))\n let difference = monthDiff + yearDiff\n // For example if Jan 31st and March 1, difference is 1 not 2\n if (expiryDate.getDate() < currDate.getDate()) {\n difference--\n }\n return difference\n }\n}\n","import Vue from 'vue'\nimport { Component } from 'vue-property-decorator'\nimport { NameRequestStates, NrRequestActionCodes } from '@bcrs-shared-components/enums'\nimport { NameRequestIF } from '@bcrs-shared-components/interfaces'\n\n/**\n * Mixin that provides some useful Name Request utilities.\n */\n@Component({})\nexport default class NameRequestMixin extends Vue {\n /**\n * Validates a name request against the applicant's information.\n * Throws an error if there is a problem.\n * @param nameRequest the name request object\n * @param nrRequestActionCode the request action code to match\n * @param businessId the business identifier to match\n * @param phone the applicant's phone number to match\n * @param email the applicant's email address to match\n * @returns the name request object\n */\n validateNameRequest (\n nameRequest: NameRequestIF,\n nrRequestActionCode: NrRequestActionCodes,\n businessId?: string,\n phone?: string,\n email?: string\n ): NameRequestIF {\n // ensure NR is valid\n const invalid = this.isNrInvalid(nameRequest)\n if (invalid) {\n throw new Error(`Invalid Name Request: ${invalid}`)\n }\n\n if (nameRequest.request_action_cd !== nrRequestActionCode) {\n throw new Error('Incorrect Request Action Code')\n }\n\n // match business id\n if (businessId && nameRequest.corpNum !== businessId) {\n throw new Error('Incorrect Business ID')\n }\n\n // match email\n if (email && nameRequest.applicants?.emailAddress !== email) {\n throw new Error('Incorrect Email Address')\n }\n\n // match phone\n if (phone && nameRequest.applicants?.phoneNumber !== phone) {\n throw new Error('Incorrect Phone Number')\n }\n\n // ensure NR is consumable\n const state = this.getNrState(nameRequest)\n if (state !== NameRequestStates.APPROVED && state !== NameRequestStates.CONDITIONAL) {\n throw new Error(`Invalid Name Request state: ${state}`)\n }\n\n return nameRequest\n }\n\n /**\n * Returns error message if the Name Request data is invalid (or null if valid).\n * @param nameRequest the name request object\n * @param requestActionCode the request action code to match\n */\n isNrInvalid (nameRequest: NameRequestIF): string {\n if (!nameRequest) return 'Invalid NR object'\n if (!nameRequest.applicants) return 'Invalid NR applicants'\n if (!nameRequest.expirationDate) return 'Invalid NR expiration date\\n(NR may still be processing)'\n if (!nameRequest.legalType) return 'Invalid NR legal type'\n if (!this.getNrApprovedName(nameRequest)) return 'Invalid NR approved name'\n if (!nameRequest.nrNum) return 'Invalid NR number'\n if (!nameRequest.requestTypeCd) return 'Invalid NR request type code'\n if (!nameRequest.request_action_cd) return 'Invalid NR request action code'\n if (!nameRequest.state) return 'Invalid NR state'\n return null\n }\n\n /**\n * Returns the Name Request's state.\n * @param nameRequest the name request object\n */\n getNrState (nameRequest: NameRequestIF): NameRequestStates {\n // ensure a NR object is provided\n if (!nameRequest) return null\n\n // if the NR is awaiting consent, it is not consumable\n // null = consent not required\n // R = consent received\n // N = consent waived\n // Y = consent required\n if (nameRequest.state === NameRequestStates.CONDITIONAL &&\n nameRequest.consentFlag !== null && nameRequest.consentFlag !== 'R' && nameRequest.consentFlag !== 'N') {\n return NameRequestStates.NEED_CONSENT\n }\n\n // if the NR's root state is not APPROVED or CONDITIONAL, it is not consumable\n // NB: EXPIRED or CONSUMED should not return NOT_APPROVED\n if (![NameRequestStates.APPROVED, NameRequestStates.CONDITIONAL,\n NameRequestStates.EXPIRED, NameRequestStates.CONSUMED].includes(nameRequest.state)) {\n return NameRequestStates.NOT_APPROVED\n }\n\n // otherwise, the NR is consumable\n return nameRequest.state // APPROVED or CONDITIONAL or CONSUMED or EXPIRED\n }\n\n /**\n * Returns the Name Request's approved name (or undefined or null if not found).\n * @param nameRequest the name request object\n */\n getNrApprovedName (nameRequest: NameRequestIF): string {\n if (nameRequest?.names?.length > 0) {\n return nameRequest.names\n .find(name => [NameRequestStates.APPROVED, NameRequestStates.CONDITION].includes(name.state))?.name\n }\n return null // invalid NR or names array\n }\n\n /**\n * Maps the request action code to a display description.\n * @param requestActionCode the request action code\n */\n getNrRequestDesc (requestActionCode: NrRequestActionCodes): string {\n switch (requestActionCode) {\n case NrRequestActionCodes.NEW_BUSINESS: return 'New Business'\n case NrRequestActionCodes.CHANGE_NAME: return 'Change of Name'\n case NrRequestActionCodes.CONVERSION: return 'Conversion'\n case NrRequestActionCodes.RESTORE: return 'Restoration'\n }\n return null // should never happen\n }\n}\n","import { Component, Vue } from 'vue-property-decorator'\n\nimport countries from 'country-list/data.json'\nimport provinces from 'provinces/provinces.json'\n\n// import these and sort them only once globally\nwindow['countries'] = window['countries'] || countries\n .sort((a, b) => (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0)\n\nwindow['provinces'] = window['provinces'] || provinces\n .sort((a, b) => (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0)\n\n// global caching to improve performance when called multiple times\nwindow['countryNameCache'] = {}\nwindow['countryRegionsCache'] = {}\nwindow['canadaRegionsNoBCCache'] = {}\n\n/**\n * Mixin that allows VM access to useful country/province data and functions.\n * @link https://www.npmjs.com/package/country-list\n * @lint https://www.npmjs.com/package/provinces\n */\n@Component({})\nexport default class CountriesProvincesMixin extends Vue {\n /**\n * Helper function to return a list of countries.\n * @returns An array of country objects, sorted alphabetically.\n */\n getCountries (): Array {\n return window['countries']\n }\n\n /**\n * Helper function to return a country's name.\n * @param code The short code of the country.\n * @returns The long name of the country.\n */\n getCountryName (code: string): string {\n if (!code) return null\n if (window['countryNameCache'][code]) return window['countryNameCache'][code]\n const country = window['countries'].find(c => c.code === code)\n const result = country ? country.name : null\n window['countryNameCache'][code] = result\n return result\n }\n\n /**\n * Helper function to return a country's list of provinces.\n * @param code The short code of the country.\n * @returns An array of province objects, sorted alphabetically.\n */\n getCountryRegions (code: string): Array {\n if (!code) return null\n if (window['countryRegionsCache'][code]) return window['countryRegionsCache'][code]\n const result = window['provinces']\n .filter(p => p.country === code)\n .map(p => ({\n name: p.english || p.name,\n short: (p.short && p.short.length <= 2) ? p.short : '--'\n }))\n window['countryRegionsCache'][code] = result\n return result\n }\n\n /**\n * Helper function to return a list of Canadian provinces (excluding BC).\n * @returns An array of province objects (excluding BC), sorted alphabetically.\n */\n getCanadaRegionsExcludeBC (): Array {\n const countryCode = 'CA'\n if (window['canadaRegionsNoBCCache'][countryCode]) return window['canadaRegionsNoBCCache'][countryCode]\n const result = window['provinces']\n .filter(p => p.country === 'CA' && p.short !== 'BC')\n .map(p => ({\n name: p.english || p.name,\n short: (p.short && p.short.length <= 2) ? p.short : '--'\n }))\n window['canadaRegionsNoBCCache'][countryCode] = result\n return result\n }\n}\n","import { Component, Vue } from 'vue-property-decorator'\n\n/**\n * Mixin that provides some useful validation utilities.\n */\n@Component({})\nexport default class ValidationMixin extends Vue {\n /**\n * Creates a Vuetify rules object from the Vuelidate state.\n * @param model The name of the model we are validating.\n * @returns A Vuetify rules object.\n */\n public createVuetifyRulesObject (model: string): { [attr: string]: Array } {\n const obj = {\n streetAddress: [],\n streetAddressAdditional: [],\n addressCity: [],\n addressRegion: [],\n postalCode: [],\n addressCountry: [],\n deliveryInstructions: []\n }\n\n // ensure Vuelidate state object is initialized\n if (this.$v && this.$v[model]) {\n // iterate over Vuelidate object properties\n Object.keys(this.$v[model])\n // only look at validation properties\n .filter(prop => prop.charAt(0) !== '$')\n .forEach(prop => {\n // create array for each validation property\n obj[prop] = []\n // iterate over validation property params\n Object.keys(this.$v[model][prop].$params)\n .forEach(param => {\n // add specified validation functions to array\n switch (param) {\n case 'required': obj[prop].push(() => this.requiredRule(model, prop)); break\n case 'minLength': obj[prop].push(() => this.minLengthRule(model, prop)); break\n case 'maxLength': obj[prop].push(() => this.maxLengthRule(model, prop)); break\n case 'isCanada': obj[prop].push(() => this.isCanadaRule(model, prop)); break\n case 'isBC': obj[prop].push(() => this.isBCRule(model, prop)); break\n // FUTURE: add extra validation functions here\n default: break\n }\n })\n })\n }\n\n // sample return object\n // streetAddress: [\n // () => this.requiredRule('addressLocal', 'streetAddress'),\n // () => this.minLengthRule('addressLocal', 'streetAddress'),\n // () => this.maxLengthRule('addressLocal', 'streetAddress')\n // ],\n // ...\n\n return obj\n }\n\n /**\n * Misc Vuetify rules.\n * @param prop The name of the property object to validate.\n * @param key The name of the property key (field) to validate.\n * @returns True if the rule passes, otherwise an error string.\n */\n protected requiredRule (prop: string, key: string): boolean | string {\n return Boolean(this.$v[prop] && this.$v[prop][key].required) || 'This field is required'\n }\n\n protected minLengthRule (prop: string, key: string): boolean | string {\n const min = this.$v[prop][key].$params.minLength.min\n return Boolean(this.$v[prop] && this.$v[prop][key].minLength) || `Minimum length is ${min}`\n }\n\n protected maxLengthRule (prop: string, key: string): boolean | string {\n const max = this.$v[prop][key].$params.maxLength.max\n return Boolean(this.$v[prop] && this.$v[prop][key].maxLength) || `Maximum length is ${max}`\n }\n\n // FUTURE: generalize this rule to take a validation parameter (ie, 'CA')\n protected isCanadaRule (prop: string, key: string): boolean | string {\n return Boolean(this.$v[prop] && this.$v[prop][key].isCanada) || `Address must be in Canada`\n }\n\n // FUTURE: generalize this rule to take a validation parameter (ie, 'BC')\n protected isBCRule (prop: string, key: string): boolean | string {\n return Boolean(this.$v[prop] && this.$v[prop][key].isBC) || `Address must be in BC`\n }\n}\n"],"names":["NrRequestActionCodes","NameRequestStates","DateMixin","Vue","year","month","day","hours","minutes","date","utcDate","tzDate","offset","dateTimeString","dateStr","split","isDate","mm","dd","yyyy","longMonth","showWeekday","timeStr","temp","dateFrom","dateTo","expiryDate","currDate","monthDiff","yearDiff","difference","__decorateClass","Component","NameRequestMixin","nameRequest","nrRequestActionCode","businessId","phone","email","invalid","_a","_b","state","name","requestActionCode","countries","a","b","provinces","CountriesProvincesMixin","code","country","c","result","p","countryCode","ValidationMixin","model","obj","prop","param","key","min","max"],"mappings":"6IAiFY,IAAAA,GAAAA,IACVA,EAAA,WAAa,MACbA,EAAA,QAAU,UACVA,EAAA,YAAc,MACdA,EAAA,WAAa,MACbA,EAAA,IAAM,MACNA,EAAA,KAAO,MACPA,EAAA,aAAe,MACfA,EAAA,QAAU,MACVA,EAAA,MAAQ,MACRA,EAAA,YAAc,OACdA,EAAA,SAAW,WAEXA,EAAA,KAAO,OAbGA,IAA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,GAAQ,KAAK,GAAGF,CAAI,GAAK,KAAK,GAAGA,CAAI,EAAEE,CAAG,EAAE,WAAa,wBAClE,CAEU,cAAeF,EAAcE,EAA+B,CAC9D,MAAAC,EAAM,KAAK,GAAGH,CAAI,EAAEE,CAAG,EAAE,QAAQ,UAAU,IACjD,MAAO,GAAQ,KAAK,GAAGF,CAAI,GAAK,KAAK,GAAGA,CAAI,EAAEE,CAAG,EAAE,YAAc,qBAAqBC,CAAG,EAC3F,CAEU,cAAeH,EAAcE,EAA+B,CAC9D,MAAAE,EAAM,KAAK,GAAGJ,CAAI,EAAEE,CAAG,EAAE,QAAQ,UAAU,IACjD,MAAO,GAAQ,KAAK,GAAGF,CAAI,GAAK,KAAK,GAAGA,CAAI,EAAEE,CAAG,EAAE,YAAc,qBAAqBE,CAAG,EAC3F,CAGU,aAAcJ,EAAcE,EAA+B,CACnE,MAAO,GAAQ,KAAK,GAAGF,CAAI,GAAK,KAAK,GAAGA,CAAI,EAAEE,CAAG,EAAE,WAAa,2BAClE,CAGU,SAAUF,EAAcE,EAA+B,CAC/D,MAAO,GAAQ,KAAK,GAAGF,CAAI,GAAK,KAAK,GAAGA,CAAI,EAAEE,CAAG,EAAE,OAAS,uBAC9D,CACF,EAnFqBL,EAArBzB,EAAA,CADCC,EAAU,CAAA,CAAE,CAAA,EACQwB,CAAA"} \ No newline at end of file diff --git a/docs/iframe.html b/docs/iframe.html index f14932d5..dc0c6113 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -357,7 +357,7 @@ } - + diff --git a/docs/project.json b/docs/project.json index ad8f9457..de9f50fd 100644 --- a/docs/project.json +++ b/docs/project.json @@ -1 +1 @@ -{"generatedAt":1695937928732,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"monorepo":"Lerna","packageManager":{"type":"npm","version":"9.8.0"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue","language":"typescript","storybookPackages":{"@storybook/builder-vite":{"version":"7.4.5"},"@storybook/mdx2-csf":{"version":"1.1.0"},"@storybook/vue-vite":{"version":"7.4.5"},"eslint-plugin-storybook":{"version":"0.6.14"},"storybook":{"version":"7.4.5"}},"addons":{"@storybook/addon-essentials":{"options":{"actions":false,"backgrounds":true,"controls":true,"docs":false,"viewport":true,"toolbars":false},"version":"7.4.5"}}} +{"generatedAt":1696964244388,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"monorepo":"Lerna","packageManager":{"type":"npm","version":"9.8.0"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue","language":"typescript","storybookPackages":{"@storybook/builder-vite":{"version":"7.4.5"},"@storybook/mdx2-csf":{"version":"1.1.0"},"@storybook/vue-vite":{"version":"7.4.5"},"eslint-plugin-storybook":{"version":"0.6.14"},"storybook":{"version":"7.4.5"}},"addons":{"@storybook/addon-essentials":{"options":{"actions":false,"backgrounds":true,"controls":true,"docs":false,"viewport":true,"toolbars":false},"version":"7.4.5"}}} diff --git a/src/components/base-address/BaseAddress.vue b/src/components/base-address/BaseAddress.vue index 2335f775..1cffcc63 100644 --- a/src/components/base-address/BaseAddress.vue +++ b/src/components/base-address/BaseAddress.vue @@ -108,7 +108,8 @@ :label="addressRegionLabel" item-text="name" item-value="short" - :items="getCountryRegions(addressCountry)" + :items="isAddressCountryCanadaAndExcludeBc ? getCanadaRegionsExcludeBC() : + getCountryRegions(addressCountry)" :rules="[...rules.addressRegion, ...spaceRules]" /> { + const countryCode = 'CA' + if (window['canadaRegionsNoBCCache'][countryCode]) return window['canadaRegionsNoBCCache'][countryCode] + const result = window['provinces'] + .filter(p => p.country === 'CA' && p.short !== 'BC') + .map(p => ({ + name: p.english || p.name, + short: (p.short && p.short.length <= 2) ? p.short : '--' + })) + window['canadaRegionsNoBCCache'][countryCode] = result + return result + } }