@dyedurham/search-and-file-widget 1.6.6 → 1.6.8

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 +38 -11
  2. package/package.json +1 -1
@@ -5993,6 +5993,7 @@ ${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join("\n ")}` : "";
5993
5993
  init_throwError();
5994
5994
  init_empty();
5995
5995
  init_types();
5996
+ init_filter();
5996
5997
  init_map();
5997
5998
  init_startWith();
5998
5999
  }
@@ -57801,6 +57802,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
57801
57802
  });
57802
57803
 
57803
57804
  // src/app/validators/custom-validators.ts
57805
+ function subscribeToDependentControl(control, dependentControlName, dependentControl) {
57806
+ if (!subscribedPairs.has(control)) {
57807
+ subscribedPairs.set(control, /* @__PURE__ */ new Set());
57808
+ }
57809
+ const subscribed = subscribedPairs.get(control);
57810
+ if (!subscribed.has(dependentControlName)) {
57811
+ subscribed.add(dependentControlName);
57812
+ dependentControl.valueChanges.pipe(filter(() => !!control.parent)).subscribe(() => {
57813
+ control.updateValueAndValidity({ emitEvent: false });
57814
+ });
57815
+ }
57816
+ }
57804
57817
  function requiredIf(dependentControlName) {
57805
57818
  return (control) => {
57806
57819
  if (!control.parent) {
@@ -57810,6 +57823,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
57810
57823
  if (!dependentControl) {
57811
57824
  return null;
57812
57825
  }
57826
+ subscribeToDependentControl(control, dependentControlName, dependentControl);
57813
57827
  return dependentControl.value && !control.value ? { require: true } : null;
57814
57828
  };
57815
57829
  }
@@ -57822,6 +57836,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
57822
57836
  if (!dependentControl) {
57823
57837
  return { require: true };
57824
57838
  }
57839
+ subscribeToDependentControl(control, dependentControlName, dependentControl);
57825
57840
  return dependentControl.value !== value && !control.value ? { require: true } : null;
57826
57841
  };
57827
57842
  }
@@ -57834,11 +57849,15 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
57834
57849
  if (!dependentControl) {
57835
57850
  return { require: true };
57836
57851
  }
57852
+ subscribeToDependentControl(control, dependentControlName, dependentControl);
57837
57853
  return dependentControl.value === value && !control.value ? { require: true } : null;
57838
57854
  };
57839
57855
  }
57856
+ var subscribedPairs;
57840
57857
  var init_custom_validators = __esm({
57841
57858
  "src/app/validators/custom-validators.ts"() {
57859
+ init_esm();
57860
+ subscribedPairs = /* @__PURE__ */ new WeakMap();
57842
57861
  }
57843
57862
  });
57844
57863
 
@@ -58077,6 +58096,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
58077
58096
  type: FormType.Select,
58078
58097
  label: "Unit Type",
58079
58098
  formControlName: FormationFormControls.UnitType,
58099
+ onChange: (form) => {
58100
+ form.get(FormationFormControls.UnitNumber)?.updateValueAndValidity({ emitEvent: false });
58101
+ },
58080
58102
  class: "span-4",
58081
58103
  options: UNIT_TYPE_OPTIONS
58082
58104
  },
@@ -78414,7 +78436,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
78414
78436
  \u0275\u0275pipe(2, "translate");
78415
78437
  \u0275\u0275elementEnd();
78416
78438
  \u0275\u0275elementStart(3, "mat-form-field", 9)(4, "input", 29);
78417
- \u0275\u0275listener("change", function FilingFormGroupComponent_For_5_Conditional_0_Case_6_Conditional_1_Template_input_change_4_listener() {
78439
+ \u0275\u0275listener("input", function FilingFormGroupComponent_For_5_Conditional_0_Case_6_Conditional_1_Template_input_input_4_listener() {
78418
78440
  \u0275\u0275restoreView(_r20);
78419
78441
  const field_r3 = \u0275\u0275nextContext(3).$implicit;
78420
78442
  \u0275\u0275nextContext();
@@ -78470,7 +78492,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
78470
78492
  \u0275\u0275text(1);
78471
78493
  \u0275\u0275pipe(2, "translate");
78472
78494
  \u0275\u0275elementEnd();
78473
- \u0275\u0275elementStart(3, "mat-form-field", 9)(4, "textarea", 29);
78495
+ \u0275\u0275elementStart(3, "mat-form-field", 9)(4, "textarea", 30);
78474
78496
  \u0275\u0275listener("change", function FilingFormGroupComponent_For_5_Conditional_0_Case_7_Conditional_1_Template_textarea_change_4_listener() {
78475
78497
  \u0275\u0275restoreView(_r21);
78476
78498
  const field_r3 = \u0275\u0275nextContext(3).$implicit;
@@ -78504,7 +78526,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
78504
78526
  }
78505
78527
  function FilingFormGroupComponent_For_5_Conditional_0_Case_8_Template(rf, ctx) {
78506
78528
  if (rf & 1) {
78507
- \u0275\u0275element(0, "checkbox-list", 30);
78529
+ \u0275\u0275element(0, "checkbox-list", 31);
78508
78530
  }
78509
78531
  if (rf & 2) {
78510
78532
  let tmp_18_0;
@@ -78515,7 +78537,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
78515
78537
  }
78516
78538
  function FilingFormGroupComponent_For_5_Conditional_0_Case_9_Conditional_1_Template(rf, ctx) {
78517
78539
  if (rf & 1) {
78518
- \u0275\u0275element(0, "p", 32);
78540
+ \u0275\u0275element(0, "p", 33);
78519
78541
  }
78520
78542
  if (rf & 2) {
78521
78543
  \u0275\u0275nextContext();
@@ -78532,7 +78554,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
78532
78554
  function FilingFormGroupComponent_For_5_Conditional_0_Case_9_Template(rf, ctx) {
78533
78555
  if (rf & 1) {
78534
78556
  \u0275\u0275declareLet(0);
78535
- \u0275\u0275template(1, FilingFormGroupComponent_For_5_Conditional_0_Case_9_Conditional_1_Template, 1, 5, "p", 31);
78557
+ \u0275\u0275template(1, FilingFormGroupComponent_For_5_Conditional_0_Case_9_Conditional_1_Template, 1, 5, "p", 32);
78536
78558
  }
78537
78559
  if (rf & 2) {
78538
78560
  const field_r3 = \u0275\u0275nextContext(2).$implicit;
@@ -78681,7 +78703,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
78681
78703
  { provide: DateAdapter, useClass: MomentDateAdapter },
78682
78704
  { provide: MAT_DATE_FORMATS, useValue: MY_DATE_FORMATS },
78683
78705
  { provide: MAT_DATE_LOCALE, useValue: "en-GB" }
78684
- ])], decls: 6, vars: 4, consts: [["autocompleteRef", "matAutocomplete"], ["picker", ""], [1, "filling-form-fields", 3, "formGroup"], [3, "class"], [3, "last", "class"], [3, "class", "warning"], [3, "warning", "class"], [3, "class", "formControlName", "items"], [1, "filling-form-fields-item-label", "body-1-regular"], ["appearance", "outline"], ["matInput", "", 3, "change", "formControlName", "matAutocomplete"], [3, "optionSelected", "displayWith"], [1, "filing-form-group-select-option", 3, "value"], ["disabled", ""], ["matSuffix", "", 1, "suffix-container"], ["matSuffix", ""], ["mat-icon-button", "", 3, "click"], [1, "arrow-icon"], [3, "change", "formControlName"], [1, "body-1-regular", "black"], ["matSuffix", "", 1, "filling-form-fields-item-icon", 3, "warning"], [1, "filling-form-fields-item-hint", 3, "warning"], ["matSuffix", "", 1, "filling-form-fields-item-icon"], [1, "filling-form-fields-item-hint"], [3, "options", "control", "required"], [1, "filling-form-fields-item-label", "body-1-regular", 3, "warning"], ["matInput", "", 3, "dateChange", "matDatepicker", "formControlName"], ["matSuffix", "", 3, "for"], ["matDatepickerToggleIcon", ""], ["matInput", "", 3, "change", "readonly", "formControlName"], [3, "formControlName", "items"], [1, "filling-form-fields-item-text", "body-1-regular", "grey", 3, "last", "class", "innerHTML"], [1, "filling-form-fields-item-text", "body-1-regular", "grey", 3, "innerHTML"]], template: function FilingFormGroupComponent_Template(rf, ctx) {
78706
+ ])], decls: 6, vars: 4, consts: [["autocompleteRef", "matAutocomplete"], ["picker", ""], [1, "filling-form-fields", 3, "formGroup"], [3, "class"], [3, "last", "class"], [3, "class", "warning"], [3, "warning", "class"], [3, "class", "formControlName", "items"], [1, "filling-form-fields-item-label", "body-1-regular"], ["appearance", "outline"], ["matInput", "", 3, "change", "formControlName", "matAutocomplete"], [3, "optionSelected", "displayWith"], [1, "filing-form-group-select-option", 3, "value"], ["disabled", ""], ["matSuffix", "", 1, "suffix-container"], ["matSuffix", ""], ["mat-icon-button", "", 3, "click"], [1, "arrow-icon"], [3, "change", "formControlName"], [1, "body-1-regular", "black"], ["matSuffix", "", 1, "filling-form-fields-item-icon", 3, "warning"], [1, "filling-form-fields-item-hint", 3, "warning"], ["matSuffix", "", 1, "filling-form-fields-item-icon"], [1, "filling-form-fields-item-hint"], [3, "options", "control", "required"], [1, "filling-form-fields-item-label", "body-1-regular", 3, "warning"], ["matInput", "", 3, "dateChange", "matDatepicker", "formControlName"], ["matSuffix", "", 3, "for"], ["matDatepickerToggleIcon", ""], ["matInput", "", 3, "input", "readonly", "formControlName"], ["matInput", "", 3, "change", "readonly", "formControlName"], [3, "formControlName", "items"], [1, "filling-form-fields-item-text", "body-1-regular", "grey", 3, "last", "class", "innerHTML"], [1, "filling-form-fields-item-text", "body-1-regular", "grey", 3, "innerHTML"]], template: function FilingFormGroupComponent_Template(rf, ctx) {
78685
78707
  if (rf & 1) {
78686
78708
  \u0275\u0275declareLet(0)(1);
78687
78709
  \u0275\u0275elementStart(2, "section")(3, "div", 2);
@@ -78930,7 +78952,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
78930
78952
  matInput\r
78931
78953
  [readonly]="field.readonly"\r
78932
78954
  [formControlName]="field.formControlName"\r
78933
- (change)="field.onChange && field.onChange(form)"\r
78955
+ (input)="field.onChange && field.onChange(form)"\r
78934
78956
  />\r
78935
78957
  \r
78936
78958
  @if (previousValue != null) {\r
@@ -80777,6 +80799,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
80777
80799
  label: "Unit Type",
80778
80800
  formControlName: FormationFormControls.UnitType,
80779
80801
  class: "span-4",
80802
+ onChange: (form) => {
80803
+ form.get(FormationFormControls.UnitNumber)?.updateValueAndValidity({ emitEvent: false });
80804
+ },
80780
80805
  options: UNIT_TYPE_OPTIONS
80781
80806
  },
80782
80807
  {
@@ -80784,7 +80809,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
80784
80809
  label: "Unit Number",
80785
80810
  formControlName: FormationFormControls.UnitNumber,
80786
80811
  class: "span-2",
80787
- onChange: (form) => form.get(FormationFormControls.UnitType)?.updateValueAndValidity({ emitEvent: false })
80812
+ onChange: (form) => {
80813
+ form.get(FormationFormControls.UnitType)?.updateValueAndValidity({ emitEvent: false });
80814
+ }
80788
80815
  },
80789
80816
  {
80790
80817
  type: FormType.Input,
@@ -87540,9 +87567,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87540
87567
  ContactInformation: {
87541
87568
  EmailAddress: "noreply@dyedurham.com",
87542
87569
  PersonName: {
87543
- FirstName: "",
87544
- LastName: "",
87545
- MiddleName: ""
87570
+ FirstName: "test",
87571
+ LastName: "test",
87572
+ MiddleName: "test"
87546
87573
  },
87547
87574
  PhoneNumber: {
87548
87575
  AreaCode: "100",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyedurham/search-and-file-widget",
3
- "version": "1.6.6",
3
+ "version": "1.6.8",
4
4
  "description": "",
5
5
  "main": "dnd-filing-shell.js",
6
6
  "scripts": {