@dyedurham/search-and-file-widget 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dnd-filing-shell.js +134 -180
  2. package/package.json +1 -1
@@ -50088,7 +50088,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
50088
50088
  EffectiveDate: requestedDate,
50089
50089
  SignatureFirstName: termsAndConditions?.firstName,
50090
50090
  SignatureLastName: termsAndConditions?.lastName,
50091
- OfficialEmail: officialBusinessEmail || "",
50091
+ OfficialEmail: officialBusinessEmail || "testemail@gmail.com",
50092
50092
  NAICSCode: naicsData.code,
50093
50093
  PrimaryActivity: naicsData.description,
50094
50094
  Authorization: true
@@ -51150,7 +51150,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51150
51150
  "src/app/helpers/formation-delta-form.helper.ts"() {
51151
51151
  init_forms();
51152
51152
  init_common_utils();
51153
- init_transform_utils();
51154
51153
  init_form_enums();
51155
51154
  init_address_utils();
51156
51155
  init_custom_validators();
@@ -51165,24 +51164,27 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51165
51164
  const incorporatorsGroups = [];
51166
51165
  let registeredOfficeAddress = null;
51167
51166
  const address = findRegisteredOffice(task.entity.affiliations);
51167
+ const delta = task.deltaData;
51168
51168
  if (directors.length) {
51169
+ const directorsMap = /* @__PURE__ */ new Map();
51170
+ delta?.directors?.forEach((deltaDirector) => directorsMap.set(deltaDirector["id"], deltaDirector));
51169
51171
  directors.forEach((director) => {
51170
- const form = this.generateAffiliationFormGroup(director);
51172
+ const form = this.generateAffiliationFormGroup(director, directorsMap.get(director.participant._id));
51171
51173
  directorsGroups.push(form);
51172
51174
  });
51173
51175
  }
51174
51176
  if (personIncorporators) {
51177
+ const incorporatorsMap = /* @__PURE__ */ new Map();
51178
+ delta?.incorporators?.forEach((deltaIncorporators) => incorporatorsMap.set(deltaIncorporators["id"], deltaIncorporators));
51175
51179
  personIncorporators.forEach((incorporator) => {
51176
- const form = this.generateIncorporatorFormGroup(incorporator);
51180
+ const form = this.generateIncorporatorFormGroup(incorporator, incorporatorsMap.get(incorporator.profileID));
51177
51181
  incorporatorsGroups.push(form);
51178
51182
  });
51179
51183
  }
51180
- registeredOfficeAddress = this.generateOfficeAddressFormGroup(address);
51184
+ registeredOfficeAddress = this.generateOfficeAddressFormGroup(address, delta?.registeredOffice);
51181
51185
  const config2 = {};
51182
- const officialBusinessEmail = findRegisteredOfficeAddress(task)?.communications?.find((c) => c.type === "Business Email")?.value;
51183
51186
  config2[FormationFormGroups.GeneralInfo] = new FormGroup({
51184
- [FormationFormControls.LegalEnding]: new FormControl(task.entity._profile.legal_entity_identifier, Validators.required),
51185
- [FormationFormControls.OfficialEmail]: new FormControl(officialBusinessEmail, [Validators.email, Validators.required])
51187
+ [FormationFormControls.LegalEnding]: new FormControl(delta?.legalEnding ?? task.entity._profile.legal_entity_identifier, Validators.required)
51186
51188
  });
51187
51189
  if (registeredOfficeAddress) {
51188
51190
  config2[FormationFormGroups.RegisteredOfficeAddress] = registeredOfficeAddress;
@@ -51195,7 +51197,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51195
51197
  }
51196
51198
  return config2;
51197
51199
  }
51198
- static generateAffiliationFormGroup(affiliation) {
51200
+ static generateAffiliationFormGroup(affiliation, deltaData) {
51199
51201
  const address = affiliation.addresses?.[0] || affiliation.parent_affiliation?.addresses?.[0];
51200
51202
  const normalizedCountryCode = normalizeCountryCode(address?.country);
51201
51203
  const isCanadian = normalizedCountryCode === "CA";
@@ -51208,29 +51210,29 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51208
51210
  const streetDirection = StreetDirection2 ? mapStreetDirection(StreetDirection2) : "";
51209
51211
  const form = new FormGroup({});
51210
51212
  form.addControl("id", new FormControl(affiliation.participant._id));
51211
- form.addControl(FormationFormControls.StreetNumber, new FormControl(streetNumberOnly));
51212
- form.addControl(FormationFormControls.StreetName, new FormControl(streetName, Validators.required));
51213
- form.addControl(FormationFormControls.StreetType, new FormControl(streetType, Validators.required));
51214
- form.addControl(FormationFormControls.StreetDirection, new FormControl(streetDirection, Validators.required));
51215
- form.addControl(FormationFormControls.City, new FormControl(address?.city));
51216
- form.addControl(FormationFormControls.Province, new FormControl(address?.province_state));
51217
- form.addControl(FormationFormControls.PostalCode, new FormControl(address?.postal_zip));
51218
- form.addControl(FormationFormControls.CountryCode, new FormControl(normalizedCountryCode));
51219
- form.addControl(FormationFormControls.IsResident, new FormControl(false, Validators.required));
51213
+ form.addControl(FormationFormControls.StreetNumber, new FormControl(deltaData?.[FormationFormControls.StreetNumber] ?? streetNumberOnly));
51214
+ form.addControl(FormationFormControls.StreetName, new FormControl(deltaData?.[FormationFormControls.StreetName] ?? streetName, Validators.required));
51215
+ form.addControl(FormationFormControls.StreetType, new FormControl(deltaData?.[FormationFormControls.StreetType] ?? streetType, Validators.required));
51216
+ form.addControl(FormationFormControls.StreetDirection, new FormControl(deltaData?.[FormationFormControls.StreetDirection] ?? streetDirection, Validators.required));
51217
+ form.addControl(FormationFormControls.City, new FormControl(deltaData?.[FormationFormControls.City] ?? address?.city));
51218
+ form.addControl(FormationFormControls.Province, new FormControl(deltaData?.[FormationFormControls.Province] ?? address?.province_state));
51219
+ form.addControl(FormationFormControls.PostalCode, new FormControl(deltaData?.[FormationFormControls.PostalCode] ?? address?.postal_zip));
51220
+ form.addControl(FormationFormControls.CountryCode, new FormControl(deltaData?.[FormationFormControls.CountryCode] ?? normalizedCountryCode));
51221
+ form.addControl(FormationFormControls.IsResident, new FormControl(deltaData?.[FormationFormControls.IsResident] ?? false, Validators.required));
51220
51222
  const target = affiliation.target;
51221
51223
  if (target) {
51222
- form.addControl(FormationFormControls.AffiliationName, new FormControl({ value: target._profile.name, disabled: true }));
51224
+ form.addControl(FormationFormControls.AffiliationName, new FormControl({ value: deltaData?.[FormationFormControls.AffiliationName] ?? target._profile.name, disabled: true }));
51223
51225
  }
51224
51226
  if (isCanadian) {
51225
51227
  form.addControl(FormationFormControls.AffiliationAddressType, new FormControl(suite ? AffiliationAddressType.CanadianSuite : AffiliationAddressType.CanadianNoSuite));
51226
51228
  } else {
51227
51229
  form.addControl(FormationFormControls.AffiliationAddressType, new FormControl(suite ? AffiliationAddressType.InternationalSuite : AffiliationAddressType.InternationalNoSuite));
51228
51230
  }
51229
- form.addControl(FormationFormControls.UnitNumber, new FormControl(suite));
51230
- form.addControl(FormationFormControls.CanadianUnitType, new FormControl("", requiredIf(FormationFormControls.UnitNumber)));
51231
+ form.addControl(FormationFormControls.UnitNumber, new FormControl(deltaData?.[FormationFormControls.UnitNumber] ?? suite));
51232
+ form.addControl(FormationFormControls.CanadianUnitType, new FormControl(deltaData?.[FormationFormControls.CanadianUnitType] ?? "", requiredIf(FormationFormControls.UnitNumber)));
51231
51233
  return form;
51232
51234
  }
51233
- static generateIncorporatorFormGroup(incorporator) {
51235
+ static generateIncorporatorFormGroup(incorporator, deltaData) {
51234
51236
  const firstName = incorporator.firstName;
51235
51237
  const lastName = incorporator.lastName;
51236
51238
  const middleName = incorporator.middleName;
@@ -51245,26 +51247,26 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51245
51247
  const streetDirection = StreetDirection2 ? mapStreetDirection(StreetDirection2) : "";
51246
51248
  const form = new FormGroup({});
51247
51249
  form.addControl("id", new FormControl(incorporator.profileID));
51248
- form.addControl(FormationFormControls.City, new FormControl(incorporator?.city));
51249
- form.addControl(FormationFormControls.Province, new FormControl(incorporator?.province_state));
51250
- form.addControl(FormationFormControls.PostalCode, new FormControl(incorporator?.postal_zip));
51251
- form.addControl(FormationFormControls.CountryCode, new FormControl(normalizedCountryCode));
51250
+ form.addControl(FormationFormControls.City, new FormControl(deltaData?.[FormationFormControls.City] ?? incorporator?.city));
51251
+ form.addControl(FormationFormControls.Province, new FormControl(deltaData?.[FormationFormControls.Province] ?? incorporator?.province_state));
51252
+ form.addControl(FormationFormControls.PostalCode, new FormControl(deltaData?.[FormationFormControls.PostalCode] ?? incorporator?.postal_zip));
51253
+ form.addControl(FormationFormControls.CountryCode, new FormControl(deltaData?.[FormationFormControls.CountryCode] ?? normalizedCountryCode));
51252
51254
  if (isCanadian) {
51253
51255
  form.addControl(FormationFormControls.AffiliationAddressType, new FormControl(suite ? AffiliationAddressType.CanadianSuite : AffiliationAddressType.CanadianNoSuite));
51254
51256
  } else {
51255
51257
  form.addControl(FormationFormControls.AffiliationAddressType, new FormControl(suite ? AffiliationAddressType.InternationalSuite : AffiliationAddressType.InternationalNoSuite));
51256
51258
  }
51257
- form.addControl(FormationFormControls.StreetDirection, new FormControl(streetDirection, Validators.required));
51258
- form.addControl(FormationFormControls.StreetType, new FormControl(streetType, Validators.required));
51259
- form.addControl(FormationFormControls.StreetName, new FormControl(streetName, Validators.required));
51260
- form.addControl(FormationFormControls.StreetNumber, new FormControl(streetNumberOnly));
51259
+ form.addControl(FormationFormControls.StreetDirection, new FormControl(deltaData?.[FormationFormControls.StreetDirection] ?? streetDirection, Validators.required));
51260
+ form.addControl(FormationFormControls.StreetType, new FormControl(deltaData?.[FormationFormControls.StreetType] ?? streetType, Validators.required));
51261
+ form.addControl(FormationFormControls.StreetName, new FormControl(deltaData?.[FormationFormControls.StreetName] ?? streetName, Validators.required));
51262
+ form.addControl(FormationFormControls.StreetNumber, new FormControl(deltaData?.[FormationFormControls.StreetNumber] ?? streetNumberOnly));
51261
51263
  const name = [firstName, lastName, middleName].join(" ");
51262
- form.addControl(FormationFormControls.AffiliationName, new FormControl({ value: name, disabled: true }));
51263
- form.addControl(FormationFormControls.UnitNumber, new FormControl(""));
51264
- form.addControl(FormationFormControls.CanadianUnitType, new FormControl("", requiredIf(FormationFormControls.UnitNumber)));
51264
+ form.addControl(FormationFormControls.AffiliationName, new FormControl({ value: deltaData?.[FormationFormControls.AffiliationName] ?? name, disabled: true }));
51265
+ form.addControl(FormationFormControls.UnitNumber, new FormControl(deltaData?.[FormationFormControls.UnitNumber] ?? ""));
51266
+ form.addControl(FormationFormControls.CanadianUnitType, new FormControl(deltaData?.[FormationFormControls.CanadianUnitType] ?? "", requiredIf(FormationFormControls.UnitNumber)));
51265
51267
  return form;
51266
51268
  }
51267
- static generateOfficeAddressFormGroup(address) {
51269
+ static generateOfficeAddressFormGroup(address, delta) {
51268
51270
  if (address) {
51269
51271
  const streetOnly = getAddressComponent(address, "Street Only");
51270
51272
  const streetNumberOnly = getAddressComponent(address, "Street Number Only");
@@ -51276,16 +51278,16 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51276
51278
  const suite = getAddressComponent(address, "Suite/Apartment");
51277
51279
  const isCanadian = normalizedCountryCode === "CA";
51278
51280
  const form2 = new FormGroup({});
51279
- form2.addControl(FormationFormControls.StreetDirection, new FormControl(streetDirection, Validators.required));
51280
- form2.addControl(FormationFormControls.StreetType, new FormControl(streetType, Validators.required));
51281
- form2.addControl(FormationFormControls.StreetName, new FormControl(streetName, Validators.required));
51282
- form2.addControl(FormationFormControls.StreetNumber, new FormControl(streetNumberOnly));
51283
- form2.addControl(FormationFormControls.UnitNumber, new FormControl(""));
51284
- form2.addControl(FormationFormControls.CanadianUnitType, new FormControl("", requiredIf(FormationFormControls.UnitNumber)));
51285
- form2.addControl(FormationFormControls.City, new FormControl(address?.city));
51286
- form2.addControl(FormationFormControls.Province, new FormControl(address?.province_state));
51287
- form2.addControl(FormationFormControls.PostalCode, new FormControl(address?.postal_zip));
51288
- form2.addControl(FormationFormControls.CountryCode, new FormControl(normalizedCountryCode));
51281
+ form2.addControl(FormationFormControls.StreetDirection, new FormControl(delta?.[FormationFormControls.StreetDirection] ?? streetDirection, Validators.required));
51282
+ form2.addControl(FormationFormControls.StreetType, new FormControl(delta?.[FormationFormControls.StreetType] ?? streetType, Validators.required));
51283
+ form2.addControl(FormationFormControls.StreetName, new FormControl(delta?.[FormationFormControls.StreetName] ?? streetName, Validators.required));
51284
+ form2.addControl(FormationFormControls.StreetNumber, new FormControl(delta?.[FormationFormControls.StreetNumber] ?? streetNumberOnly));
51285
+ form2.addControl(FormationFormControls.UnitNumber, new FormControl(delta?.[FormationFormControls.UnitNumber] ?? ""));
51286
+ form2.addControl(FormationFormControls.CanadianUnitType, new FormControl(delta?.[FormationFormControls.CanadianUnitType] ?? "", requiredIf(FormationFormControls.UnitNumber)));
51287
+ form2.addControl(FormationFormControls.City, new FormControl(delta?.[FormationFormControls.City] ?? address?.city));
51288
+ form2.addControl(FormationFormControls.Province, new FormControl(delta?.[FormationFormControls.Province] ?? address?.province_state));
51289
+ form2.addControl(FormationFormControls.PostalCode, new FormControl(delta?.[FormationFormControls.PostalCode] ?? address?.postal_zip));
51290
+ form2.addControl(FormationFormControls.CountryCode, new FormControl(delta?.[FormationFormControls.CountryCode] ?? normalizedCountryCode));
51289
51291
  if (isCanadian) {
51290
51292
  form2.addControl(FormationFormControls.AffiliationAddressType, new FormControl(suite ? AffiliationAddressType.CanadianSuite : AffiliationAddressType.CanadianNoSuite));
51291
51293
  } else {
@@ -51294,15 +51296,15 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51294
51296
  return form2;
51295
51297
  }
51296
51298
  const form = new FormGroup({});
51297
- form.addControl(FormationFormControls.StreetDirection, new FormControl("", Validators.required));
51298
- form.addControl(FormationFormControls.StreetType, new FormControl("", Validators.required));
51299
- form.addControl(FormationFormControls.StreetName, new FormControl("", Validators.required));
51300
- form.addControl(FormationFormControls.UnitNumber, new FormControl(""));
51301
- form.addControl(FormationFormControls.CanadianUnitType, new FormControl("", requiredIf(FormationFormControls.UnitNumber)));
51302
- form.addControl(FormationFormControls.City, new FormControl(""));
51303
- form.addControl(FormationFormControls.Province, new FormControl(""));
51304
- form.addControl(FormationFormControls.PostalCode, new FormControl(""));
51305
- form.addControl(FormationFormControls.CountryCode, new FormControl(""));
51299
+ form.addControl(FormationFormControls.StreetDirection, new FormControl(delta?.[FormationFormControls.StreetDirection] ?? "", Validators.required));
51300
+ form.addControl(FormationFormControls.StreetType, new FormControl(delta?.[FormationFormControls.StreetType] ?? "", Validators.required));
51301
+ form.addControl(FormationFormControls.StreetName, new FormControl(delta?.[FormationFormControls.StreetName] ?? "", Validators.required));
51302
+ form.addControl(FormationFormControls.UnitNumber, new FormControl(delta?.[FormationFormControls.UnitNumber] ?? ""));
51303
+ form.addControl(FormationFormControls.CanadianUnitType, new FormControl(delta?.[FormationFormControls.CanadianUnitType] ?? "", requiredIf(FormationFormControls.UnitNumber)));
51304
+ form.addControl(FormationFormControls.City, new FormControl(delta?.[FormationFormControls.City] ?? ""));
51305
+ form.addControl(FormationFormControls.Province, new FormControl(delta?.[FormationFormControls.Province] ?? ""));
51306
+ form.addControl(FormationFormControls.PostalCode, new FormControl(delta?.[FormationFormControls.PostalCode] ?? ""));
51307
+ form.addControl(FormationFormControls.CountryCode, new FormControl(delta?.[FormationFormControls.CountryCode] ?? ""));
51306
51308
  form.addControl(FormationFormControls.AffiliationAddressType, new FormControl(AffiliationAddressType.CanadianSuite));
51307
51309
  return form;
51308
51310
  }
@@ -51421,7 +51423,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51421
51423
  } else if (country === "US") {
51422
51424
  provinceState = USStateToCode(address?.province_state) || address?.province_state;
51423
51425
  }
51424
- form.addControl(FormationFormControls.StreetNumber, new FormControl(streetNumber));
51426
+ form.addControl(FormationFormControls.StreetNumber, new FormControl(formDeltaData?.StreetNumber ?? streetNumber));
51425
51427
  form.addControl(FormationFormControls.ProvinceState, new FormControl(provinceState));
51426
51428
  form.addControl(FormationFormControls.Code, new FormControl(address?.postal_zip));
51427
51429
  form.addControl(FormationFormControls.Country, new FormControl(country));
@@ -51471,7 +51473,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51471
51473
  } else if (country === "US") {
51472
51474
  provinceState = USStateToCode(incorporator?.province_state) || incorporator?.province_state;
51473
51475
  }
51474
- form.addControl(FormationFormControls.StreetNumber, new FormControl(streetNumber));
51476
+ form.addControl(FormationFormControls.StreetNumber, new FormControl(formDeltaData?.StreetNumber ?? streetNumber));
51475
51477
  form.addControl(FormationFormControls.ProvinceState, new FormControl(provinceState));
51476
51478
  form.addControl(FormationFormControls.Code, new FormControl(incorporator?.postal_zip));
51477
51479
  form.addControl(FormationFormControls.Country, new FormControl(country));
@@ -51510,7 +51512,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
51510
51512
  } else if (country === "US") {
51511
51513
  provinceState = USStateToCode(address?.province_state) || address?.province_state;
51512
51514
  }
51513
- form.addControl(FormationFormControls.StreetNumber, new FormControl(streetNumber));
51515
+ form.addControl(FormationFormControls.StreetNumber, new FormControl(formDeltaData?.StreetNumber ?? streetNumber));
51514
51516
  form.addControl(FormationFormControls.ProvinceState, new FormControl(provinceState));
51515
51517
  form.addControl(FormationFormControls.Code, new FormControl(address?.postal_zip));
51516
51518
  form.addControl(FormationFormControls.Country, new FormControl(country));
@@ -54946,8 +54948,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
54946
54948
  setConfig(config2) {
54947
54949
  this.config = config2;
54948
54950
  }
54949
- validate(_0, _1, _2) {
54950
- return __async(this, arguments, function* (signature, deltaData, serviceOrderId, opts = {}) {
54951
+ validate(_0, _1) {
54952
+ return __async(this, arguments, function* (signature, deltaData, opts = {}) {
54951
54953
  if (!this.isFormationTask(signature.task)) {
54952
54954
  const err2 = new Error(`Expected Formation task, got: ${signature.task?._taskType}`);
54953
54955
  throw err2;
@@ -54981,7 +54983,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
54981
54983
  if (payload?.Draft) {
54982
54984
  signature.filingValidateSuccess?.({
54983
54985
  searchOrFilingType: "ontarioIncorporation",
54984
- serviceOrderId,
54986
+ serviceOrderId: payload["ServiceOrderId"] ?? "",
54985
54987
  validatedOn: /* @__PURE__ */ new Date(),
54986
54988
  provider: "obr",
54987
54989
  draftPdf: payload.Draft,
@@ -54990,10 +54992,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
54990
54992
  });
54991
54993
  }
54992
54994
  if (resp.ok) {
54993
- signature.filingSubmitSuccess?.({
54994
- filedOn: /* @__PURE__ */ new Date(),
54995
- serviceOrderId
54996
- });
54997
54995
  return payload;
54998
54996
  }
54999
54997
  const err = buildValidationError(resp.status, payload);
@@ -55254,10 +55252,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
55254
55252
  });
55255
55253
  }
55256
55254
  if (resp.ok) {
55257
- signature.filingSubmitSuccess?.({
55258
- filedOn: /* @__PURE__ */ new Date(),
55259
- serviceOrderId: result.ServiceOrderId ?? ""
55260
- });
55261
55255
  return result;
55262
55256
  }
55263
55257
  const err = buildValidateError(resp.status, result);
@@ -80654,30 +80648,32 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
80654
80648
  \u0275\u0275element(0, "card-form-group", 1);
80655
80649
  }
80656
80650
  if (rf & 2) {
80657
- let tmp_6_0;
80651
+ let tmp_7_0;
80658
80652
  const ctx_r0 = \u0275\u0275nextContext();
80659
80653
  const registeredOfficeForm_r3 = \u0275\u0275readContextLet(3);
80660
- \u0275\u0275property("form", registeredOfficeForm_r3)("config", ctx_r0.affiliationCardFieldsMap[(tmp_6_0 = registeredOfficeForm_r3.get(ctx_r0.formationFormControls.AffiliationAddressType)) == null ? null : tmp_6_0.value])("label", ctx_r0.formGroups.RegisteredOfficeAddress)("isComparisonMode", false);
80654
+ \u0275\u0275property("form", registeredOfficeForm_r3)("config", ctx_r0.affiliationCardFieldsMap[(tmp_7_0 = registeredOfficeForm_r3.get(ctx_r0.formationFormControls.AffiliationAddressType)) == null ? null : tmp_7_0.value])("label", ctx_r0.formGroups.RegisteredOfficeAddress)("isComparisonMode", false);
80661
80655
  }
80662
80656
  }
80663
- function FormationDeltaFormComponent_Conditional_6_Template(rf, ctx) {
80657
+ function FormationDeltaFormComponent_Conditional_8_Template(rf, ctx) {
80664
80658
  if (rf & 1) {
80665
80659
  \u0275\u0275element(0, "card-form-array", 2);
80666
80660
  }
80667
80661
  if (rf & 2) {
80668
80662
  const ctx_r0 = \u0275\u0275nextContext();
80669
80663
  const incorporatorsArray_r4 = \u0275\u0275readContextLet(5);
80670
- \u0275\u0275property("formArray", incorporatorsArray_r4)("label", ctx_r0.formGroups.Incorporators)("config", ctx_r0.affiliationCardFieldsMap)("isComparisonMode", false);
80664
+ const isOpen_r5 = \u0275\u0275readContextLet(7);
80665
+ \u0275\u0275property("formArray", incorporatorsArray_r4)("label", ctx_r0.formGroups.Incorporators)("config", ctx_r0.affiliationCardFieldsMap)("isComparisonMode", false)("isOpen", isOpen_r5);
80671
80666
  }
80672
80667
  }
80673
- function FormationDeltaFormComponent_Conditional_8_Template(rf, ctx) {
80668
+ function FormationDeltaFormComponent_Conditional_9_Template(rf, ctx) {
80674
80669
  if (rf & 1) {
80675
80670
  \u0275\u0275element(0, "card-form-array", 3);
80676
80671
  }
80677
80672
  if (rf & 2) {
80678
80673
  const ctx_r0 = \u0275\u0275nextContext();
80679
- const directorsArray_r5 = \u0275\u0275readContextLet(7);
80680
- \u0275\u0275property("formArray", directorsArray_r5)("label", ctx_r0.formGroups.Directors)("config", ctx_r0.personCardFieldsMap)("isComparisonMode", false);
80674
+ const directorsArray_r6 = \u0275\u0275readContextLet(6);
80675
+ const isOpen_r5 = \u0275\u0275readContextLet(7);
80676
+ \u0275\u0275property("formArray", directorsArray_r6)("label", ctx_r0.formGroups.Directors)("config", ctx_r0.personCardFieldsMap)("isComparisonMode", false)("isOpen", isOpen_r5);
80681
80677
  }
80682
80678
  }
80683
80679
  var FormationDeltaFormComponent;
@@ -80699,6 +80695,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
80699
80695
  personCardFieldsMap = FORMATION_DELTA_CARD_FORM_DIRECTORS_FIELDS_MAP;
80700
80696
  types = FormType;
80701
80697
  formationFormControls = FormationFormControls;
80698
+ initiallyOpenCardsCount = 3;
80702
80699
  getFormArray(key) {
80703
80700
  return this.form().get(key);
80704
80701
  }
@@ -80708,37 +80705,38 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
80708
80705
  static \u0275fac = function FormationDeltaFormComponent_Factory(__ngFactoryType__) {
80709
80706
  return new (__ngFactoryType__ || _FormationDeltaFormComponent)();
80710
80707
  };
80711
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FormationDeltaFormComponent, selectors: [["formation-delta-form"]], inputs: { form: [1, "form"] }, decls: 9, vars: 9, consts: [[1, "form", 3, "formGroup"], [3, "form", "config", "label", "isComparisonMode"], ["cardLabel", "Incorporator", 3, "formArray", "label", "config", "isComparisonMode"], ["cardLabel", "Director", 3, "formArray", "label", "config", "isComparisonMode"]], template: function FormationDeltaFormComponent_Template(rf, ctx) {
80708
+ static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FormationDeltaFormComponent, selectors: [["formation-delta-form"]], inputs: { form: [1, "form"] }, decls: 10, vars: 10, consts: [[1, "form", 3, "formGroup"], [3, "form", "config", "label", "isComparisonMode"], ["cardLabel", "Incorporator", 3, "formArray", "label", "config", "isComparisonMode", "isOpen"], ["cardLabel", "Director", 3, "formArray", "label", "config", "isComparisonMode", "isOpen"]], template: function FormationDeltaFormComponent_Template(rf, ctx) {
80712
80709
  if (rf & 1) {
80713
80710
  \u0275\u0275elementStart(0, "form", 0);
80714
80711
  \u0275\u0275declareLet(1);
80715
80712
  \u0275\u0275template(2, FormationDeltaFormComponent_Conditional_2_Template, 1, 4, "card-form-group", 1);
80716
80713
  \u0275\u0275declareLet(3);
80717
80714
  \u0275\u0275template(4, FormationDeltaFormComponent_Conditional_4_Template, 1, 4, "card-form-group", 1);
80718
- \u0275\u0275declareLet(5);
80719
- \u0275\u0275template(6, FormationDeltaFormComponent_Conditional_6_Template, 1, 4, "card-form-array", 2);
80720
- \u0275\u0275declareLet(7);
80721
- \u0275\u0275template(8, FormationDeltaFormComponent_Conditional_8_Template, 1, 4, "card-form-array", 3);
80715
+ \u0275\u0275declareLet(5)(6)(7);
80716
+ \u0275\u0275template(8, FormationDeltaFormComponent_Conditional_8_Template, 1, 5, "card-form-array", 2)(9, FormationDeltaFormComponent_Conditional_9_Template, 1, 5, "card-form-array", 3);
80722
80717
  \u0275\u0275elementEnd();
80723
80718
  }
80724
80719
  if (rf & 2) {
80720
+ let tmp_7_0;
80725
80721
  \u0275\u0275property("formGroup", ctx.form());
80726
80722
  \u0275\u0275advance();
80727
- const generalInfoForm_r6 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.GeneralInfo));
80723
+ const generalInfoForm_r7 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.GeneralInfo));
80724
+ \u0275\u0275advance();
80725
+ \u0275\u0275conditional(generalInfoForm_r7 ? 2 : -1);
80728
80726
  \u0275\u0275advance();
80729
- \u0275\u0275conditional(generalInfoForm_r6 ? 2 : -1);
80727
+ const registeredOfficeForm_r8 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.RegisteredOfficeAddress));
80730
80728
  \u0275\u0275advance();
80731
- const registeredOfficeForm_r7 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.RegisteredOfficeAddress));
80729
+ \u0275\u0275conditional(registeredOfficeForm_r8 ? 4 : -1);
80732
80730
  \u0275\u0275advance();
80733
- \u0275\u0275conditional(registeredOfficeForm_r7 ? 4 : -1);
80731
+ const incorporatorsArray_r9 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Incorporators));
80734
80732
  \u0275\u0275advance();
80735
- const incorporatorsArray_r8 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Incorporators));
80733
+ const directorsArray_r10 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Directors));
80736
80734
  \u0275\u0275advance();
80737
- \u0275\u0275conditional(incorporatorsArray_r8 ? 6 : -1);
80735
+ \u0275\u0275storeLet(((tmp_7_0 = incorporatorsArray_r9 == null ? null : incorporatorsArray_r9.length) !== null && tmp_7_0 !== void 0 ? tmp_7_0 : 0) + ((tmp_7_0 = directorsArray_r10 == null ? null : directorsArray_r10.length) !== null && tmp_7_0 !== void 0 ? tmp_7_0 : 0) < ctx.initiallyOpenCardsCount);
80738
80736
  \u0275\u0275advance();
80739
- const directorsArray_r9 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Directors));
80737
+ \u0275\u0275conditional(incorporatorsArray_r9 ? 8 : -1);
80740
80738
  \u0275\u0275advance();
80741
- \u0275\u0275conditional(directorsArray_r9 ? 8 : -1);
80739
+ \u0275\u0275conditional(directorsArray_r10 ? 9 : -1);
80742
80740
  }
80743
80741
  }, dependencies: [
80744
80742
  ReactiveFormsModule,
@@ -80756,7 +80754,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
80756
80754
  ReactiveFormsModule,
80757
80755
  CardFormGroupComponent,
80758
80756
  CardFormArrayComponent
80759
- ], template: '<form class="form" [formGroup]="this.form()">\r\n @let generalInfoForm = getFormGroup(formGroups.GeneralInfo);\r\n @if (generalInfoForm) {\r\n <card-form-group\r\n [form]="generalInfoForm"\r\n [config]="generalCardFields"\r\n [label]="formGroups.GeneralInfo"\r\n [isComparisonMode]="false"\r\n />\r\n }\r\n\r\n @let registeredOfficeForm = getFormGroup(formGroups.RegisteredOfficeAddress);\r\n\r\n @if (registeredOfficeForm) {\r\n <card-form-group\r\n [form]="registeredOfficeForm"\r\n [config]="affiliationCardFieldsMap[registeredOfficeForm.get(formationFormControls.AffiliationAddressType)?.value]"\r\n [label]="formGroups.RegisteredOfficeAddress"\r\n [isComparisonMode]="false"\r\n />\r\n }\r\n\r\n @let incorporatorsArray = getFormArray(formGroups.Incorporators);\r\n @if (incorporatorsArray) {\r\n <card-form-array\r\n cardLabel="Incorporator"\r\n [formArray]="incorporatorsArray"\r\n [label]="formGroups.Incorporators"\r\n [config]="affiliationCardFieldsMap"\r\n [isComparisonMode]="false"\r\n />\r\n }\r\n\r\n @let directorsArray = getFormArray(formGroups.Directors);\r\n @if (directorsArray) {\r\n <card-form-array\r\n cardLabel="Director"\r\n [formArray]="directorsArray"\r\n [label]="formGroups.Directors"\r\n [config]="personCardFieldsMap"\r\n [isComparisonMode]="false"\r\n />\r\n }\r\n</form>\r\n', styles: ["/* src/app/components/delta-form/formation/formation-delta-form.component.scss */\n:host .form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n:host .divider {\n --mat-divider-color: #e1e2e5;\n margin-bottom: 24px;\n}\n:host .divider.top {\n margin-top: 24px;\n}\n/*# sourceMappingURL=formation-delta-form.component.css.map */\n"] }]
80757
+ ], template: '<form class="form" [formGroup]="this.form()">\r\n @let generalInfoForm = getFormGroup(formGroups.GeneralInfo);\r\n @if (generalInfoForm) {\r\n <card-form-group\r\n [form]="generalInfoForm"\r\n [config]="generalCardFields"\r\n [label]="formGroups.GeneralInfo"\r\n [isComparisonMode]="false"\r\n />\r\n }\r\n\r\n @let registeredOfficeForm = getFormGroup(formGroups.RegisteredOfficeAddress);\r\n\r\n @if (registeredOfficeForm) {\r\n <card-form-group\r\n [form]="registeredOfficeForm"\r\n [config]="affiliationCardFieldsMap[registeredOfficeForm.get(formationFormControls.AffiliationAddressType)?.value]"\r\n [label]="formGroups.RegisteredOfficeAddress"\r\n [isComparisonMode]="false"\r\n />\r\n }\r\n\r\n @let incorporatorsArray = getFormArray(formGroups.Incorporators);\r\n @let directorsArray = getFormArray(formGroups.Directors);\r\n\r\n @let isOpen = (incorporatorsArray?.length ?? 0) + (directorsArray?.length ?? 0) < initiallyOpenCardsCount;\r\n @if (incorporatorsArray) {\r\n <card-form-array\r\n cardLabel="Incorporator"\r\n [formArray]="incorporatorsArray"\r\n [label]="formGroups.Incorporators"\r\n [config]="affiliationCardFieldsMap"\r\n [isComparisonMode]="false"\r\n [isOpen]="isOpen"\r\n />\r\n }\r\n\r\n\r\n @if (directorsArray) {\r\n <card-form-array\r\n cardLabel="Director"\r\n [formArray]="directorsArray"\r\n [label]="formGroups.Directors"\r\n [config]="personCardFieldsMap"\r\n [isComparisonMode]="false"\r\n [isOpen]="isOpen"\r\n />\r\n }\r\n</form>\r\n', styles: ["/* src/app/components/delta-form/formation/formation-delta-form.component.scss */\n:host .form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n:host .divider {\n --mat-divider-color: #e1e2e5;\n margin-bottom: 24px;\n}\n:host .divider.top {\n margin-top: 24px;\n}\n/*# sourceMappingURL=formation-delta-form.component.css.map */\n"] }]
80760
80758
  }], null, null);
80761
80759
  })();
80762
80760
  (() => {
@@ -84925,24 +84923,25 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84925
84923
  \u0275\u0275element(1, "card-form-group", 1);
84926
84924
  }
84927
84925
  if (rf & 2) {
84928
- let tmp_9_0;
84926
+ let tmp_10_0;
84929
84927
  const ctx_r0 = \u0275\u0275nextContext();
84930
84928
  const registeredOfficeForm_r5 = ctx_r0.getFormGroup(ctx_r0.formGroups.RegisteredOfficeAddress);
84931
84929
  \u0275\u0275advance();
84932
- \u0275\u0275property("form", registeredOfficeForm_r5)("config", ctx_r0.affiliationCardFieldsMap[(tmp_9_0 = registeredOfficeForm_r5.get(ctx_r0.formationFormControls.AffiliationAddressType)) == null ? null : tmp_9_0.value])("label", ctx_r0.formGroups.RegisteredOfficeAddress);
84930
+ \u0275\u0275property("form", registeredOfficeForm_r5)("config", ctx_r0.affiliationCardFieldsMap[(tmp_10_0 = registeredOfficeForm_r5.get(ctx_r0.formationFormControls.AffiliationAddressType)) == null ? null : tmp_10_0.value])("label", ctx_r0.formGroups.RegisteredOfficeAddress);
84933
84931
  }
84934
84932
  }
84935
- function FormationPreviewFormComponent_Conditional_10_Template(rf, ctx) {
84933
+ function FormationPreviewFormComponent_Conditional_12_Template(rf, ctx) {
84936
84934
  if (rf & 1) {
84937
84935
  \u0275\u0275element(0, "card-form-array", 2);
84938
84936
  }
84939
84937
  if (rf & 2) {
84940
84938
  const ctx_r0 = \u0275\u0275nextContext();
84941
84939
  const incorporatorsArray_r6 = \u0275\u0275readContextLet(9);
84942
- \u0275\u0275property("formArray", incorporatorsArray_r6)("label", ctx_r0.formGroups.Incorporators)("config", ctx_r0.affiliationCardFieldsMap);
84940
+ const isOpen_r7 = \u0275\u0275readContextLet(11);
84941
+ \u0275\u0275property("formArray", incorporatorsArray_r6)("label", ctx_r0.formGroups.Incorporators)("config", ctx_r0.affiliationCardFieldsMap)("isOpen", isOpen_r7);
84943
84942
  }
84944
84943
  }
84945
- function FormationPreviewFormComponent_Conditional_12_Template(rf, ctx) {
84944
+ function FormationPreviewFormComponent_Conditional_13_Template(rf, ctx) {
84946
84945
  if (rf & 1) {
84947
84946
  \u0275\u0275elementStart(0, "div", 3);
84948
84947
  \u0275\u0275element(1, "card-form-array", 4);
@@ -84950,9 +84949,10 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84950
84949
  }
84951
84950
  if (rf & 2) {
84952
84951
  const ctx_r0 = \u0275\u0275nextContext();
84953
- const directorsArray_r7 = \u0275\u0275readContextLet(11);
84952
+ const directorsArray_r8 = \u0275\u0275readContextLet(10);
84953
+ const isOpen_r7 = \u0275\u0275readContextLet(11);
84954
84954
  \u0275\u0275advance();
84955
- \u0275\u0275property("formArray", directorsArray_r7)("label", ctx_r0.formGroups.Directors)("config", ctx_r0.personCardFieldsMap);
84955
+ \u0275\u0275property("formArray", directorsArray_r8)("label", ctx_r0.formGroups.Directors)("config", ctx_r0.personCardFieldsMap)("isOpen", isOpen_r7);
84956
84956
  }
84957
84957
  }
84958
84958
  var FormationPreviewFormComponent;
@@ -84977,6 +84977,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84977
84977
  formationFormControls = FormationFormControls;
84978
84978
  personCardFieldsMap = FORMATION_PREVIEW_CARD_FORM_AFFILIATION_FIELDS_MAP;
84979
84979
  types = FormType;
84980
+ initiallyOpenCardsCount = 3;
84980
84981
  getFormArray(key) {
84981
84982
  return this.form().get(key);
84982
84983
  }
@@ -84986,7 +84987,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84986
84987
  static \u0275fac = function FormationPreviewFormComponent_Factory(__ngFactoryType__) {
84987
84988
  return new (__ngFactoryType__ || _FormationPreviewFormComponent)();
84988
84989
  };
84989
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FormationPreviewFormComponent, selectors: [["formation-preview-form"]], inputs: { form: [1, "form"] }, decls: 13, vars: 12, consts: [[1, "form", 3, "formGroup"], [3, "form", "config", "label"], ["cardLabel", "Incorporator", 3, "formArray", "label", "config"], [1, "preview-form-item"], ["cardLabel", "Director", 3, "formArray", "label", "config"]], template: function FormationPreviewFormComponent_Template(rf, ctx) {
84990
+ static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FormationPreviewFormComponent, selectors: [["formation-preview-form"]], inputs: { form: [1, "form"] }, decls: 14, vars: 13, consts: [[1, "form", 3, "formGroup"], [3, "form", "config", "label"], ["cardLabel", "Incorporator", 3, "formArray", "label", "config", "isOpen"], [1, "preview-form-item"], ["cardLabel", "Director", 3, "formArray", "label", "config", "isOpen"]], template: function FormationPreviewFormComponent_Template(rf, ctx) {
84990
84991
  if (rf & 1) {
84991
84992
  \u0275\u0275elementStart(0, "form", 0);
84992
84993
  \u0275\u0275declareLet(1);
@@ -84997,37 +84998,38 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84997
84998
  \u0275\u0275template(6, FormationPreviewFormComponent_Conditional_6_Template, 1, 3, "card-form-group", 1);
84998
84999
  \u0275\u0275declareLet(7);
84999
85000
  \u0275\u0275template(8, FormationPreviewFormComponent_Conditional_8_Template, 2, 3, "card-form-group", 1);
85000
- \u0275\u0275declareLet(9);
85001
- \u0275\u0275template(10, FormationPreviewFormComponent_Conditional_10_Template, 1, 3, "card-form-array", 2);
85002
- \u0275\u0275declareLet(11);
85003
- \u0275\u0275template(12, FormationPreviewFormComponent_Conditional_12_Template, 2, 3, "div", 3);
85001
+ \u0275\u0275declareLet(9)(10)(11);
85002
+ \u0275\u0275template(12, FormationPreviewFormComponent_Conditional_12_Template, 1, 4, "card-form-array", 2)(13, FormationPreviewFormComponent_Conditional_13_Template, 2, 4, "div", 3);
85004
85003
  \u0275\u0275elementEnd();
85005
85004
  }
85006
85005
  if (rf & 2) {
85006
+ let tmp_11_0;
85007
85007
  \u0275\u0275property("formGroup", ctx.form());
85008
85008
  \u0275\u0275advance();
85009
- const generalInfoForm_r8 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.GeneralInfo));
85009
+ const generalInfoForm_r9 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.GeneralInfo));
85010
85010
  \u0275\u0275advance();
85011
- \u0275\u0275conditional(generalInfoForm_r8 ? 2 : -1);
85011
+ \u0275\u0275conditional(generalInfoForm_r9 ? 2 : -1);
85012
85012
  \u0275\u0275advance();
85013
- const sharesAndRestrictionsForm_r9 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.SharesAndRestrictions));
85013
+ const sharesAndRestrictionsForm_r10 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.SharesAndRestrictions));
85014
85014
  \u0275\u0275advance();
85015
- \u0275\u0275conditional(sharesAndRestrictionsForm_r9 ? 4 : -1);
85015
+ \u0275\u0275conditional(sharesAndRestrictionsForm_r10 ? 4 : -1);
85016
85016
  \u0275\u0275advance();
85017
- const numberOfDirectorsForm_r10 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.NumberOfDirectors));
85017
+ const numberOfDirectorsForm_r11 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.formGroups.NumberOfDirectors));
85018
85018
  \u0275\u0275advance();
85019
- \u0275\u0275conditional(numberOfDirectorsForm_r10 ? 6 : -1);
85020
- const registeredOfficeForm_r11 = ctx.getFormGroup(ctx.formGroups.RegisteredOfficeAddress);
85019
+ \u0275\u0275conditional(numberOfDirectorsForm_r11 ? 6 : -1);
85020
+ const registeredOfficeForm_r12 = ctx.getFormGroup(ctx.formGroups.RegisteredOfficeAddress);
85021
85021
  \u0275\u0275advance(2);
85022
- \u0275\u0275conditional(registeredOfficeForm_r11 ? 8 : -1);
85022
+ \u0275\u0275conditional(registeredOfficeForm_r12 ? 8 : -1);
85023
+ \u0275\u0275advance();
85024
+ const incorporatorsArray_r13 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Incorporators));
85023
85025
  \u0275\u0275advance();
85024
- const incorporatorsArray_r12 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Incorporators));
85026
+ const directorsArray_r14 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Directors));
85025
85027
  \u0275\u0275advance();
85026
- \u0275\u0275conditional(incorporatorsArray_r12 ? 10 : -1);
85028
+ \u0275\u0275storeLet(((tmp_11_0 = incorporatorsArray_r13 == null ? null : incorporatorsArray_r13.length) !== null && tmp_11_0 !== void 0 ? tmp_11_0 : 0) + ((tmp_11_0 = directorsArray_r14 == null ? null : directorsArray_r14.length) !== null && tmp_11_0 !== void 0 ? tmp_11_0 : 0) < ctx.initiallyOpenCardsCount);
85027
85029
  \u0275\u0275advance();
85028
- const directorsArray_r13 = \u0275\u0275storeLet(ctx.getFormArray(ctx.formGroups.Directors));
85030
+ \u0275\u0275conditional(incorporatorsArray_r13 ? 12 : -1);
85029
85031
  \u0275\u0275advance();
85030
- \u0275\u0275conditional(directorsArray_r13 ? 12 : -1);
85032
+ \u0275\u0275conditional(directorsArray_r14 ? 13 : -1);
85031
85033
  }
85032
85034
  }, dependencies: [
85033
85035
  ReactiveFormsModule,
@@ -85045,7 +85047,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85045
85047
  ReactiveFormsModule,
85046
85048
  CardFormArrayComponent,
85047
85049
  CardFormGroupComponent
85048
- ], template: '<form class="form" [formGroup]="form()">\r\n @let generalInfoForm = getFormGroup(formGroups.GeneralInfo);\r\n @if (generalInfoForm) {\r\n <card-form-group\r\n [form]="generalInfoForm"\r\n [config]="generalCardFields"\r\n [label]="formGroups.GeneralInfo"\r\n />\r\n }\r\n\r\n @let sharesAndRestrictionsForm =\r\n getFormGroup(formGroups.SharesAndRestrictions);\r\n @if (sharesAndRestrictionsForm) {\r\n <card-form-group\r\n [form]="sharesAndRestrictionsForm"\r\n [config]="sharesAndRestrictionsCardFields"\r\n [label]="formGroups.SharesAndRestrictions"\r\n />\r\n }\r\n\r\n @let numberOfDirectorsForm = getFormGroup(formGroups.NumberOfDirectors);\r\n @if (numberOfDirectorsForm) {\r\n <card-form-group\r\n [form]="numberOfDirectorsForm"\r\n [config]="numberOfDirectorsCardFields"\r\n [label]="formGroups.NumberOfDirectors"\r\n />\r\n }\r\n\r\n @let registeredOfficeForm = getFormGroup(formGroups.RegisteredOfficeAddress);\r\n @if (registeredOfficeForm) {\r\n @let registeredOfficeForm = getFormGroup(formGroups.RegisteredOfficeAddress);\r\n <card-form-group\r\n [form]="registeredOfficeForm"\r\n [config]="affiliationCardFieldsMap[registeredOfficeForm.get(formationFormControls.AffiliationAddressType)?.value]"\r\n [label]="formGroups.RegisteredOfficeAddress"\r\n />\r\n }\r\n\r\n @let incorporatorsArray = getFormArray(formGroups.Incorporators);\r\n @if (incorporatorsArray) {\r\n <card-form-array\r\n cardLabel="Incorporator"\r\n [formArray]="incorporatorsArray"\r\n [label]="formGroups.Incorporators"\r\n [config]="affiliationCardFieldsMap"\r\n />\r\n }\r\n\r\n @let directorsArray = getFormArray(formGroups.Directors);\r\n @if (directorsArray) {\r\n <div class="preview-form-item">\r\n <card-form-array\r\n cardLabel="Director"\r\n [formArray]="directorsArray"\r\n [label]="formGroups.Directors"\r\n [config]="personCardFieldsMap"\r\n />\r\n </div>\r\n }\r\n</form>\r\n', styles: ["/* src/app/components/preview-form/formation-preview-form/formation-preview-form.component.scss */\n:host .form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n:host .divider {\n --mat-divider-color: #e1e2e5;\n margin-bottom: 24px;\n}\n:host .divider.top {\n margin-top: 24px;\n}\n/*# sourceMappingURL=formation-preview-form.component.css.map */\n"] }]
85050
+ ], template: '<form class="form" [formGroup]="form()">\r\n @let generalInfoForm = getFormGroup(formGroups.GeneralInfo);\r\n @if (generalInfoForm) {\r\n <card-form-group\r\n [form]="generalInfoForm"\r\n [config]="generalCardFields"\r\n [label]="formGroups.GeneralInfo"\r\n />\r\n }\r\n\r\n @let sharesAndRestrictionsForm =\r\n getFormGroup(formGroups.SharesAndRestrictions);\r\n @if (sharesAndRestrictionsForm) {\r\n <card-form-group\r\n [form]="sharesAndRestrictionsForm"\r\n [config]="sharesAndRestrictionsCardFields"\r\n [label]="formGroups.SharesAndRestrictions"\r\n />\r\n }\r\n\r\n @let numberOfDirectorsForm = getFormGroup(formGroups.NumberOfDirectors);\r\n @if (numberOfDirectorsForm) {\r\n <card-form-group\r\n [form]="numberOfDirectorsForm"\r\n [config]="numberOfDirectorsCardFields"\r\n [label]="formGroups.NumberOfDirectors"\r\n />\r\n }\r\n\r\n @let registeredOfficeForm = getFormGroup(formGroups.RegisteredOfficeAddress);\r\n @if (registeredOfficeForm) {\r\n @let registeredOfficeForm = getFormGroup(formGroups.RegisteredOfficeAddress);\r\n <card-form-group\r\n [form]="registeredOfficeForm"\r\n [config]="affiliationCardFieldsMap[registeredOfficeForm.get(formationFormControls.AffiliationAddressType)?.value]"\r\n [label]="formGroups.RegisteredOfficeAddress"\r\n />\r\n }\r\n\r\n @let incorporatorsArray = getFormArray(formGroups.Incorporators);\r\n @let directorsArray = getFormArray(formGroups.Directors);\r\n\r\n @let isOpen = (incorporatorsArray?.length ?? 0) + (directorsArray?.length ?? 0) < initiallyOpenCardsCount;\r\n\r\n @if (incorporatorsArray) {\r\n <card-form-array\r\n cardLabel="Incorporator"\r\n [formArray]="incorporatorsArray"\r\n [label]="formGroups.Incorporators"\r\n [config]="affiliationCardFieldsMap"\r\n [isOpen]="isOpen"\r\n />\r\n }\r\n\r\n @if (directorsArray) {\r\n <div class="preview-form-item">\r\n <card-form-array\r\n cardLabel="Director"\r\n [formArray]="directorsArray"\r\n [label]="formGroups.Directors"\r\n [config]="personCardFieldsMap"\r\n [isOpen]="isOpen"\r\n />\r\n </div>\r\n }\r\n</form>\r\n', styles: ["/* src/app/components/preview-form/formation-preview-form/formation-preview-form.component.scss */\n:host .form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n:host .divider {\n --mat-divider-color: #e1e2e5;\n margin-bottom: 24px;\n}\n:host .divider.top {\n margin-top: 24px;\n}\n/*# sourceMappingURL=formation-preview-form.component.css.map */\n"] }]
85049
85051
  }], null, null);
85050
85052
  })();
85051
85053
  (() => {
@@ -87046,8 +87048,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87046
87048
  env = input();
87047
87049
  config = input();
87048
87050
  language = input("en");
87049
- proxyApiUrl = input();
87050
- jwtToken = input();
87051
+ proxyApiUrl = input("");
87052
+ jwtToken = input("");
87051
87053
  task = input();
87052
87054
  height = input();
87053
87055
  validateOptions = input();
@@ -87062,7 +87064,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87062
87064
  const language = this.language();
87063
87065
  const proxyApiUrl = this.proxyApiUrl();
87064
87066
  const jwtToken = this.jwtToken();
87065
- if (!task || !config2 || !env || !proxyApiUrl || !jwtToken)
87067
+ if (!task || !config2 || !env)
87066
87068
  return void 0;
87067
87069
  return {
87068
87070
  env,
@@ -87147,7 +87149,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87147
87149
  this.defineInitialStep();
87148
87150
  this.isLoading.set(true);
87149
87151
  this.getInitialReturnServiceId().then((id) => __async(this, null, function* () {
87150
- this.serviceOrderId = this.serviceOrderId || id;
87152
+ this.serviceOrderId = id;
87151
87153
  yield this.initialReturnService.submitData(id, this.validateOptions());
87152
87154
  const data = yield this.initialReturnService.getCurrentData(id, this.validateOptions());
87153
87155
  this.generateInitialReturnPreviewForm(data);
@@ -87169,29 +87171,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87169
87171
  }
87170
87172
  return FormationDeltaFormHelper.generateConfig(formationTaskMock);
87171
87173
  }
87172
- validateAndFileFormationTask(form, termsAndConditions) {
87174
+ validateAndFileFormationTask(deltaData) {
87173
87175
  return __async(this, null, function* () {
87174
- const deltaData = this.generateFormationDeltaData(form, termsAndConditions);
87175
- this.deltaDataChange.emit({
87176
- deltaData: __spreadProps(__spreadValues({}, deltaData), { signature: this._signature() })
87177
- });
87178
87176
  const signature = this._signature();
87179
87177
  if (signature) {
87180
- const response = yield this.formationService.validate(signature, deltaData, this.serviceOrderId, this.validateOptions() ?? {});
87181
- this.deltaDataChange.emit({
87182
- deltaData: __spreadProps(__spreadValues({}, deltaData), { task: this.task() })
87183
- });
87184
- const isoTimestamp = (/* @__PURE__ */ new Date()).toISOString();
87185
- this.filingValidateSuccess.emit({
87186
- searchOrFilingType: "ontarioIncorporation",
87187
- serviceOrderId: this.serviceOrderId,
87188
- validatedOn: /* @__PURE__ */ new Date(),
87189
- provider: "obr",
87190
- draftPdf: response.Draft ?? "",
87191
- documentName: this.validateOptions()?.documentName ? `${this.validateOptions()?.documentName} ${isoTimestamp}` : `Incorporation Draft ${isoTimestamp}`,
87192
- documentType: "pdf"
87193
- });
87194
- return response;
87178
+ return yield this.formationService.validate(signature, deltaData, this.validateOptions() ?? {});
87195
87179
  }
87196
87180
  return;
87197
87181
  });
@@ -87351,11 +87335,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87351
87335
  };
87352
87336
  const signature = this._signature();
87353
87337
  if (signature) {
87354
- const response = yield this.initialReturnService.submitInitialReturnValidationToECore(signature, payload, this.serviceOrderId, this.validateOptions());
87355
- this.deltaDataChange.emit({
87356
- deltaData: __spreadProps(__spreadValues({}, formData), { task: this.task() })
87357
- });
87358
- return response;
87338
+ return yield this.initialReturnService.submitInitialReturnValidationToECore(signature, payload, this.serviceOrderId, this.validateOptions());
87359
87339
  }
87360
87340
  return null;
87361
87341
  });
@@ -87378,7 +87358,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87378
87358
  this.isLoading.set(true);
87379
87359
  this.errors.set([]);
87380
87360
  if (isFormationTask(task)) {
87381
- yield this.validateAndFileFormationTask(this.deltaForm);
87361
+ const deltaData = this.generateFormationDeltaData(this.deltaForm);
87362
+ this.deltaDataChange.emit(deltaData);
87363
+ yield this.validateAndFileFormationTask(deltaData);
87382
87364
  }
87383
87365
  } catch (response) {
87384
87366
  console.error(response);
@@ -87396,14 +87378,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87396
87378
  try {
87397
87379
  this.isLoading.set(true);
87398
87380
  this.errors.set([]);
87399
- const result = yield this.validateAndFileFormationTask(this.previewForm, termsAndConditions);
87381
+ const deltaData = this.generateFormationDeltaData(this.deltaForm, termsAndConditions);
87382
+ const result = yield this.validateAndFileFormationTask(deltaData);
87400
87383
  const serviceId = result?.ServiceOrderId;
87401
87384
  const signature = this._signature();
87402
87385
  if (serviceId && signature) {
87403
- const result2 = yield this.formationService.submitFormationRequest(signature, serviceId, this.validateOptions());
87404
- if (!result2?.ReceiptPdf) {
87405
- yield this.getStatus(serviceId);
87406
- }
87386
+ yield this.formationService.submitFormationRequest(signature, serviceId, this.validateOptions());
87407
87387
  } else {
87408
87388
  console.error("There is no Service Id");
87409
87389
  }
@@ -87446,7 +87426,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87446
87426
  }
87447
87427
  onSaveDeltaFormChanges() {
87448
87428
  const formData = this.generateFormationDeltaData(this.deltaForm);
87449
- this.deltaDataChange.emit({ deltaData: formData, signature: this._signature() });
87429
+ this.deltaDataChange.emit(formData);
87450
87430
  }
87451
87431
  generateFormationDeltaData(form, termsAndConditions) {
87452
87432
  const formData = form.getRawValue();
@@ -87465,7 +87445,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87465
87445
  }
87466
87446
  onSaveChanges() {
87467
87447
  const formData = this.previewForm.getRawValue();
87468
- this.deltaDataChange.emit({ deltaData: formData, signature: this._signature() });
87448
+ this.deltaDataChange.emit(formData);
87469
87449
  }
87470
87450
  onPreviewNextClick() {
87471
87451
  this.activeStep.set(Step.TermsAndConditions);
@@ -87481,7 +87461,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87481
87461
  this.errors.set([]);
87482
87462
  if (isInitialReturnTask(task)) {
87483
87463
  yield this.validateAndFileInitialReturnTask(this.previewForm);
87484
- this.deltaDataChange.emit({ deltaData: __spreadProps(__spreadValues({}, this.previewForm.getRawValue()), { task: this.task() }) });
87464
+ this.deltaDataChange.emit(this.previewForm.getRawValue());
87485
87465
  }
87486
87466
  } catch (response) {
87487
87467
  console.error(response);
@@ -87506,10 +87486,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87506
87486
  if (isInitialReturnTask(task)) {
87507
87487
  const signature = this._signature();
87508
87488
  if (signature) {
87509
- const result = yield this.initialReturnService.submitRequest(signature, this.serviceOrderId, this.validateOptions());
87510
- if (!result?.ReceiptPdf) {
87511
- yield this.getStatus(this.serviceOrderId);
87512
- }
87489
+ yield this.initialReturnService.submitRequest(signature, this.serviceOrderId, this.validateOptions());
87513
87490
  } else {
87514
87491
  console.error("There is no Service Id");
87515
87492
  }
@@ -87524,29 +87501,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87524
87501
  }
87525
87502
  });
87526
87503
  }
87527
- getStatus(serviceId) {
87528
- return __async(this, null, function* () {
87529
- this.isPolling = true;
87530
- const signature = this._signature();
87531
- const task = this.task();
87532
- if (signature) {
87533
- let result = null;
87534
- if (isFormationTask(task)) {
87535
- result = yield this.formationService.getStatusRequest(signature, serviceId, this.validateOptions());
87536
- } else if (isInitialReturnTask(task)) {
87537
- result = yield this.initialReturnService.getStatusRequest(signature, serviceId, this.validateOptions());
87538
- }
87539
- const status = result?.Status;
87540
- if (result && !status) {
87541
- this.filingSubmitSuccess.emit({
87542
- serviceOrderId: result.ServiceOrderId ?? serviceId,
87543
- filedOn: /* @__PURE__ */ new Date()
87544
- });
87545
- }
87546
- return;
87547
- }
87548
- });
87549
- }
87550
87504
  onPreviewPrevClick() {
87551
87505
  this.activeStep.set(Step.Validate);
87552
87506
  }
@@ -87554,7 +87508,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87554
87508
  this.activeStep.set(Step.FilingPreview);
87555
87509
  }
87556
87510
  generateFormationPreviewForm(task) {
87557
- const fieldsConfig = FormationPreviewFormHelper.generateFieldConfig(task, task.deltaData?.deltaData);
87511
+ const fieldsConfig = FormationPreviewFormHelper.generateFieldConfig(task, task.deltaData);
87558
87512
  this.previewForm = new FormGroup(fieldsConfig);
87559
87513
  this.previewForm.disable();
87560
87514
  if (untracked2(this.activeStep) === Step.Validate) {
@@ -87766,7 +87720,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87766
87720
  }], () => [], null);
87767
87721
  })();
87768
87722
  (() => {
87769
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber: 85 });
87723
+ (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber: 71 });
87770
87724
  })();
87771
87725
  }
87772
87726
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyedurham/search-and-file-widget",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "description": "",
5
5
  "main": "dnd-filing-shell.js",
6
6
  "scripts": {