@dereekb/dbx-form 9.24.1 → 9.24.3

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 (26) hide show
  1. package/calendar/lib/calendar.schedule.selection.dialog.button.component.d.ts +6 -1
  2. package/calendar/lib/calendar.schedule.selection.dialog.component.d.ts +17 -2
  3. package/calendar/lib/field/schedule/calendar.schedule.field.component.d.ts +8 -0
  4. package/esm2020/calendar/lib/calendar.schedule.selection.dialog.button.component.mjs +5 -3
  5. package/esm2020/calendar/lib/calendar.schedule.selection.dialog.component.mjs +20 -7
  6. package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.component.mjs +7 -4
  7. package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.mjs +3 -2
  8. package/esm2020/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +1 -1
  9. package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +2 -2
  10. package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +1 -1
  11. package/esm2020/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +1 -1
  12. package/esm2020/lib/formly/field/selection/sourceselect/sourceselect.field.component.mjs +1 -1
  13. package/esm2020/lib/formly/field/value/date/fixeddaterange.field.component.mjs +25 -12
  14. package/esm2020/lib/formly/field/wrapper/working.wrapper.component.mjs +1 -1
  15. package/fesm2015/dereekb-dbx-form-calendar.mjs +32 -20
  16. package/fesm2015/dereekb-dbx-form-calendar.mjs.map +1 -1
  17. package/fesm2015/dereekb-dbx-form.mjs +32 -17
  18. package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
  19. package/fesm2020/dereekb-dbx-form-calendar.mjs +32 -13
  20. package/fesm2020/dereekb-dbx-form-calendar.mjs.map +1 -1
  21. package/fesm2020/dereekb-dbx-form.mjs +30 -17
  22. package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
  23. package/lib/extension/calendar/_calendar.scss +14 -0
  24. package/lib/formly/field/value/date/fixeddaterange.field.component.d.ts +9 -3
  25. package/mapbox/package.json +4 -4
  26. package/package.json +4 -4
@@ -37,7 +37,7 @@ import { MatButtonToggleModule } from '@angular/material/button-toggle';
37
37
  import { FlexLayoutModule } from '@angular/flex-layout';
38
38
 
39
39
  function dateScheduleRangeField(config = {}) {
40
- const { key = 'schedule', appearance, hideCustomize, filter, timezone, initialSelectionState, computeSelectionResultRelativeToFilter, exclusions, minMaxDateRange, cellContentFactory, closeDialogConfig } = config;
40
+ const { key = 'schedule', appearance, hideCustomize, filter, timezone, initialSelectionState, computeSelectionResultRelativeToFilter, exclusions, minMaxDateRange, cellContentFactory, dialogContentConfig, closeDialogConfig } = config;
41
41
  const fieldConfig = {
42
42
  ...formlyField({
43
43
  key,
@@ -50,6 +50,7 @@ function dateScheduleRangeField(config = {}) {
50
50
  minMaxDateRange,
51
51
  filter,
52
52
  exclusions,
53
+ dialogContentConfig,
53
54
  closeDialogConfig,
54
55
  computeSelectionResultRelativeToFilter,
55
56
  initialSelectionState,
@@ -1077,25 +1078,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1077
1078
 
1078
1079
  /**
1079
1080
  * Token used to configure the default DbxDialogContentFooterConfig for DbxScheduleSelectionCalendarDateDialogComponent.
1081
+ *
1082
+ * @deprecated use DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN instead.
1080
1083
  */
1081
1084
  const DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CLOSE_CONFIG_TOKEN = new InjectionToken('DbxScheduleSelectionCalendarDatePopupCloseConfig');
1085
+ /**
1086
+ * Token used to configure the default DbxScheduleSelectionCalendarDatePopupConfig for DbxScheduleSelectionCalendarDateDialogComponent.
1087
+ */
1088
+ const DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN = new InjectionToken('DbxScheduleSelectionCalendarDatePopupContentConfig');
1082
1089
  class DbxScheduleSelectionCalendarDateDialogComponent extends AbstractDialogDirective {
1090
+ get contentConfig() {
1091
+ return this.data.contentConfig;
1092
+ }
1083
1093
  get closeConfig() {
1084
- return this.data.closeConfig;
1094
+ return this.contentConfig?.closeConfig;
1085
1095
  }
1086
1096
  static openDialog(matDialog, config) {
1087
- const { injector, closeConfig: inputCloseConfig } = config;
1097
+ const { injector, contentConfig: inputContentConfig, closeConfig: inputCloseConfig } = config;
1088
1098
  const defaultCloseConfig = injector.get(DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CLOSE_CONFIG_TOKEN, null);
1089
- const closeConfig = mergeObjects([defaultCloseConfig, inputCloseConfig], KeyValueTypleValueFilter.NULL);
1099
+ const defaultContentConfig = injector.get(DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN, null);
1100
+ const contentConfig = mergeObjects([defaultContentConfig, inputContentConfig], KeyValueTypleValueFilter.NULL);
1101
+ const closeConfig = mergeObjects([defaultCloseConfig, contentConfig?.closeConfig, inputCloseConfig], KeyValueTypleValueFilter.NULL);
1102
+ contentConfig.closeConfig = closeConfig;
1090
1103
  return matDialog.open(DbxScheduleSelectionCalendarDateDialogComponent, {
1091
- injector,
1092
1104
  height: 'calc(var(--vh100) * 0.9)',
1093
- minHeight: 400,
1094
1105
  width: '80vw',
1106
+ minHeight: 400,
1095
1107
  minWidth: 360,
1108
+ ...contentConfig.dialogConfig,
1109
+ injector,
1096
1110
  data: {
1097
1111
  config,
1098
- closeConfig
1112
+ contentConfig
1099
1113
  }
1100
1114
  });
1101
1115
  }
@@ -1128,11 +1142,11 @@ class DbxScheduleSelectionCalendarDateDialogButtonComponent {
1128
1142
  this.buttonText = 'Customize';
1129
1143
  }
1130
1144
  clickCustomize() {
1131
- DbxScheduleSelectionCalendarDateDialogComponent.openDialog(this.matDialog, { injector: this.injector, closeConfig: this.closeConfig });
1145
+ DbxScheduleSelectionCalendarDateDialogComponent.openDialog(this.matDialog, { injector: this.injector, contentConfig: this.contentConfig, closeConfig: this.closeConfig });
1132
1146
  }
1133
1147
  }
1134
1148
  DbxScheduleSelectionCalendarDateDialogButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogButtonComponent, deps: [{ token: i1$2.MatDialog }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1135
- DbxScheduleSelectionCalendarDateDialogButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: { buttonText: "buttonText", closeConfig: "closeConfig" }, ngImport: i0, template: `
1149
+ DbxScheduleSelectionCalendarDateDialogButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: { buttonText: "buttonText", contentConfig: "contentConfig", closeConfig: "closeConfig" }, ngImport: i0, template: `
1136
1150
  <button mat-raised-button color="accent" (click)="clickCustomize()">{{ buttonText }}</button>
1137
1151
  `, isInline: true, dependencies: [{ kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
1138
1152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogButtonComponent, decorators: [{
@@ -1145,6 +1159,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1145
1159
  }]
1146
1160
  }], ctorParameters: function () { return [{ type: i1$2.MatDialog }, { type: i0.Injector }]; }, propDecorators: { buttonText: [{
1147
1161
  type: Input
1162
+ }], contentConfig: [{
1163
+ type: Input
1148
1164
  }], closeConfig: [{
1149
1165
  type: Input
1150
1166
  }] } });
@@ -1204,6 +1220,9 @@ class DbxFormCalendarDateScheduleRangeFieldComponent extends FieldType {
1204
1220
  get closeDialogConfig() {
1205
1221
  return this.props.closeDialogConfig;
1206
1222
  }
1223
+ get dialogContentConfig() {
1224
+ return this.props.dialogContentConfig;
1225
+ }
1207
1226
  get cellContentFactory() {
1208
1227
  return this.props.cellContentFactory;
1209
1228
  }
@@ -1253,17 +1272,17 @@ DbxFormCalendarDateScheduleRangeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({
1253
1272
  DbxFormCalendarDateScheduleRangeFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFormCalendarDateScheduleRangeFieldComponent, selector: "ng-component", providers: [provideCalendarScheduleSelectionStoreIfParentIsUnavailable()], usesInheritance: true, ngImport: i0, template: `
1254
1273
  <div class="dbx-schedule-selection-field">
1255
1274
  <dbx-schedule-selection-calendar-date-range [showCustomize]="showCustomize" [required]="required" [disabled]="isReadonlyOrDisabled" [label]="label" [hint]="description">
1256
- <dbx-schedule-selection-calendar-date-dialog-button [closeConfig]="closeDialogConfig" customizeButton></dbx-schedule-selection-calendar-date-dialog-button>
1275
+ <dbx-schedule-selection-calendar-date-dialog-button [contentConfig]="dialogContentConfig" [closeConfig]="closeDialogConfig" customizeButton></dbx-schedule-selection-calendar-date-dialog-button>
1257
1276
  </dbx-schedule-selection-calendar-date-range>
1258
1277
  </div>
1259
- `, isInline: true, dependencies: [{ kind: "component", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: ["label", "hint", "disabled", "showCustomize", "required"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: ["buttonText", "closeConfig"] }] });
1278
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: ["label", "hint", "disabled", "showCustomize", "required"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: ["buttonText", "contentConfig", "closeConfig"] }] });
1260
1279
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormCalendarDateScheduleRangeFieldComponent, decorators: [{
1261
1280
  type: Component,
1262
1281
  args: [{
1263
1282
  template: `
1264
1283
  <div class="dbx-schedule-selection-field">
1265
1284
  <dbx-schedule-selection-calendar-date-range [showCustomize]="showCustomize" [required]="required" [disabled]="isReadonlyOrDisabled" [label]="label" [hint]="description">
1266
- <dbx-schedule-selection-calendar-date-dialog-button [closeConfig]="closeDialogConfig" customizeButton></dbx-schedule-selection-calendar-date-dialog-button>
1285
+ <dbx-schedule-selection-calendar-date-dialog-button [contentConfig]="dialogContentConfig" [closeConfig]="closeDialogConfig" customizeButton></dbx-schedule-selection-calendar-date-dialog-button>
1267
1286
  </dbx-schedule-selection-calendar-date-range>
1268
1287
  </div>
1269
1288
  `,
@@ -1443,5 +1462,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1443
1462
  * Generated bundle index. Do not edit.
1444
1463
  */
1445
1464
 
1446
- export { CalendarScheduleSelectionDayState, DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CLOSE_CONFIG_TOKEN, DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY, DbxCalendarScheduleSelectionStore, DbxCalendarScheduleSelectionStoreInjectionBlockDirective, DbxCalendarScheduleSelectionStoreProviderBlock, DbxFormCalendarDateScheduleRangeFieldComponent, DbxFormCalendarModule, DbxFormDateScheduleRangeFieldModule, DbxScheduleSelectionCalendarCellComponent, DbxScheduleSelectionCalendarComponent, DbxScheduleSelectionCalendarDateDaysComponent, DbxScheduleSelectionCalendarDateDaysFormComponent, DbxScheduleSelectionCalendarDateDialogButtonComponent, DbxScheduleSelectionCalendarDateDialogComponent, DbxScheduleSelectionCalendarDatePopoverButtonComponent, DbxScheduleSelectionCalendarDatePopoverComponent, DbxScheduleSelectionCalendarDatePopoverContentComponent, DbxScheduleSelectionCalendarDateRangeComponent, DbxScheduleSelectionCalendarSelectionToggleButtonComponent, calendarScheduleMaxDate, calendarScheduleMinAndMaxDateRange, calendarScheduleMinDate, calendarScheduleStartBeingUsedFromFilter, computeCalendarScheduleSelectionDateBlockRange, computeCalendarScheduleSelectionRange, computeScheduleSelectionRangeAndExclusion, computeScheduleSelectionValue, dateScheduleRangeField, dbxScheduleSelectionCalendarDateDaysFormDayFields, dbxScheduleSelectionCalendarDateDaysFormFields, defaultCalendarScheduleSelectionCellContentFactory, finalizeNewCalendarScheduleSelectionState, initialCalendarScheduleSelectionState, isEnabledDayInCalendarScheduleSelectionState, noSelectionCalendarScheduleSelectionState, provideCalendarScheduleSelectionStoreIfParentIsUnavailable, updateStateWithChangedDates, updateStateWithChangedRange, updateStateWithChangedScheduleDays, updateStateWithComputeSelectionResultRelativeToFilter, updateStateWithDateScheduleRangeValue, updateStateWithExclusions, updateStateWithFilter, updateStateWithInitialSelectionState, updateStateWithMinMaxDateRange, updateStateWithTimezoneValue };
1465
+ export { CalendarScheduleSelectionDayState, DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CLOSE_CONFIG_TOKEN, DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN, DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY, DbxCalendarScheduleSelectionStore, DbxCalendarScheduleSelectionStoreInjectionBlockDirective, DbxCalendarScheduleSelectionStoreProviderBlock, DbxFormCalendarDateScheduleRangeFieldComponent, DbxFormCalendarModule, DbxFormDateScheduleRangeFieldModule, DbxScheduleSelectionCalendarCellComponent, DbxScheduleSelectionCalendarComponent, DbxScheduleSelectionCalendarDateDaysComponent, DbxScheduleSelectionCalendarDateDaysFormComponent, DbxScheduleSelectionCalendarDateDialogButtonComponent, DbxScheduleSelectionCalendarDateDialogComponent, DbxScheduleSelectionCalendarDatePopoverButtonComponent, DbxScheduleSelectionCalendarDatePopoverComponent, DbxScheduleSelectionCalendarDatePopoverContentComponent, DbxScheduleSelectionCalendarDateRangeComponent, DbxScheduleSelectionCalendarSelectionToggleButtonComponent, calendarScheduleMaxDate, calendarScheduleMinAndMaxDateRange, calendarScheduleMinDate, calendarScheduleStartBeingUsedFromFilter, computeCalendarScheduleSelectionDateBlockRange, computeCalendarScheduleSelectionRange, computeScheduleSelectionRangeAndExclusion, computeScheduleSelectionValue, dateScheduleRangeField, dbxScheduleSelectionCalendarDateDaysFormDayFields, dbxScheduleSelectionCalendarDateDaysFormFields, defaultCalendarScheduleSelectionCellContentFactory, finalizeNewCalendarScheduleSelectionState, initialCalendarScheduleSelectionState, isEnabledDayInCalendarScheduleSelectionState, noSelectionCalendarScheduleSelectionState, provideCalendarScheduleSelectionStoreIfParentIsUnavailable, updateStateWithChangedDates, updateStateWithChangedRange, updateStateWithChangedScheduleDays, updateStateWithComputeSelectionResultRelativeToFilter, updateStateWithDateScheduleRangeValue, updateStateWithExclusions, updateStateWithFilter, updateStateWithInitialSelectionState, updateStateWithMinMaxDateRange, updateStateWithTimezoneValue };
1447
1466
  //# sourceMappingURL=dereekb-dbx-form-calendar.mjs.map