@dereekb/dbx-web 13.12.5 → 13.12.6

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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web/eslint",
3
- "version": "13.12.5",
3
+ "version": "13.12.6",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.12.5",
5
+ "@dereekb/util": "13.12.6",
6
6
  "@typescript-eslint/utils": "8.59.3"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@angular/core": "21.2.11",
10
- "@dereekb/dbx-core": "13.12.5",
11
- "@dereekb/rxjs": "13.12.5",
10
+ "@dereekb/dbx-core": "13.12.6",
11
+ "@dereekb/rxjs": "13.12.6",
12
12
  "@typescript-eslint/parser": "8.59.3",
13
13
  "eslint": "10.4.0",
14
14
  "rxjs": "^7.8.2"
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, input, inject, effect, Directive, NgModule, ChangeDetectionStrategy, Component, output, computed, HostListener, forwardRef, InjectionToken, viewChild, ElementRef, makeEnvironmentProviders, ApplicationRef, Injector, EnvironmentInjector, createComponent, DestroyRef, signal, TemplateRef, model, SecurityContext, ViewContainerRef, booleanAttribute, Renderer2 } from '@angular/core';
3
3
  import { asPromise, DASH_CHARACTER_PREFIX_INSTANCE, cssTokenVar, isDefinedAndNotFalse, useIterableOrValue, spaceSeparatedCssClasses, cssClassesSet, objectHasNoKeys, getValueFromGetter, firstValue, filterUndefinedValues, separateValues, splitFront, asDecisionFunction, SLASH_PATH_FILE_TYPE_SEPARATOR, filterMaybeArrayValues, mapIterable, toReadableError, isDefaultReadableError, MS_IN_SECOND, mergeObjects, build, ServerErrorResponse, UnauthorizedServerErrorResponse, makeTimer, MS_IN_MINUTE, toggleTimerRunning, unixDateTimeSecondsNumberForNow, ModelRelationUtility, encodeModelKeyTypePair, safeCompareEquality, addMilliseconds, isPast, asArray, slashPathDetails, mimeTypeForFileExtension, slashPathDirectoryTree, isMaybeNot, isNotFalse, modifier, combineMaps, addModifiers, removeModifiers, applyBestFit, findNext, maybeModifierMapToFunction, makeValuesGroupMap, compareWithMappedValuesFunction, invertMaybeBoolean, splitCommaSeparatedStringToSet, ZIP_FILE_MIME_TYPE, cachedGetter, sortByNumberFunction, JPEG_MIME_TYPES, JPEG_MIME_TYPE, PNG_MIME_TYPE, PDF_MIME_TYPE, sequentialIncrementingNumberStringModelIdFactory, PDF_HEADER, PDF_EOF_MARKER, PDF_ENCRYPT_MARKER } from '@dereekb/util';
4
4
  import * as i1$2 from '@dereekb/dbx-core';
5
- import { completeOnDestroy, clean, AbstractTransitionWatcherDirective, DbxInjectionComponent, dbxActionWorkProgress, AbstractDbxButtonDirective, hasNonTrivialChildNodes, provideDbxButton, DbxCoreButtonModule, createInjectorForInjectionComponentConfig, initInjectionComponent, AbstractDbxActionValueGetterDirective, cleanSubscription, AbstractDbxActionHandlerDirective, FilterSourceDirective, provideActionStoreSource, isClickableFilterPreset, AbstractDbxAnchorDirective, expandClickableAnchorLinkTrees, DbxCoreFilterModule, DbxButton, DbxActionContextStoreSourceInstance, cleanSubscriptionWithLockSet, DBX_INJECTION_COMPONENT_DATA, checkNgContentWrapperHasContent, cleanLoadingContext, DbxActionSourceDirective, DbxActionSuccessHandlerDirective, DbxActionDirective, transformEmptyStringInputToUndefined, isIdleActionState, canTriggerAction, DbxCoreActionModule, DbxActionButtonDirective, onDbxAppAuth, SimpleStorageAccessorFactory, mergeStaticProviders, asSegueRef, AbstractTransitionDirective, DbxRouterService, AbstractIfDirective, isSegueRefActive, anchorTypeForAnchor } from '@dereekb/dbx-core';
5
+ import { completeOnDestroy, clean, AbstractTransitionWatcherDirective, DbxInjectionComponent, dbxActionWorkProgress, AbstractDbxButtonDirective, hasNonTrivialChildNodes, provideDbxButton, DbxCoreButtonModule, createInjectorForInjectionComponentConfig, initInjectionComponent, AbstractDbxActionValueGetterDirective, cleanSubscription, AbstractDbxActionHandlerDirective, FilterSourceDirective, provideActionStoreSource, isClickableFilterPreset, AbstractDbxAnchorDirective, expandClickableAnchorLinkTrees, DbxCoreFilterModule, DbxButton, DbxActionWorkable, provideDbxActionWorkable, DbxActionContextStoreSourceInstance, cleanSubscriptionWithLockSet, DBX_INJECTION_COMPONENT_DATA, checkNgContentWrapperHasContent, cleanLoadingContext, DbxActionSourceDirective, DbxActionSuccessHandlerDirective, DbxActionDirective, transformEmptyStringInputToUndefined, isIdleActionState, canTriggerAction, DbxCoreActionModule, DbxActionButtonDirective, onDbxAppAuth, SimpleStorageAccessorFactory, mergeStaticProviders, asSegueRef, AbstractTransitionDirective, DbxRouterService, AbstractIfDirective, isSegueRefActive, anchorTypeForAnchor } from '@dereekb/dbx-core';
6
6
  import { NgPopoverRef, NgOverlayContainerService } from 'ng-overlay-container';
7
7
  import { of, map, BehaviorSubject, distinctUntilChanged, shareReplay, delay, Subject, first, startWith, filter, throttleTime, skip, defaultIfEmpty, combineLatest, switchMap, delayWhen, timer, asyncScheduler, from, firstValueFrom, mergeMap, race, tap, catchError, distinct, merge, exhaustMap, NEVER } from 'rxjs';
8
8
  import { LockSet, distinctUntilItemsHaveDifferentValues, filterMaybe, skipAllInitialMaybe, maybeValueFromObservableOrValue, switchMapMaybeLoadingContextStream, LoadingStateType, loadingStateType, successResult, valueFromFinishedLoadingState, loadingStateContext, initialize, asObservable, isNot, mapForEach, switchMapMaybe, listLoadingStateContext, isLoadingStateFinishedLoading, startWithBeginLoading, loadingStateFromObs, errorResult, beginLoading, distinctUntilHasDifferentValues } from '@dereekb/rxjs';
@@ -5623,8 +5623,10 @@ function fileAcceptFunction(accept) {
5623
5623
 
5624
5624
  /**
5625
5625
  * Abstract interface for file upload components that can be controlled by the action system (disabled, working, multiple, accept states).
5626
+ *
5627
+ * Extends {@link DbxActionWorkable} (disabled/working), adding upload-specific multiple/accept controls.
5626
5628
  */
5627
- class DbxFileUploadActionCompatable {
5629
+ class DbxFileUploadActionCompatable extends DbxActionWorkable {
5628
5630
  }
5629
5631
  /**
5630
5632
  * Provides a {@link DbxFileUploadActionCompatable} for dependency injection from the given component type.
@@ -5643,7 +5645,8 @@ function provideDbxFileUploadActionCompatable(sourceType) {
5643
5645
  {
5644
5646
  provide: DbxFileUploadActionCompatable,
5645
5647
  useExisting: forwardRef(() => sourceType)
5646
- }
5648
+ },
5649
+ ...provideDbxActionWorkable(sourceType)
5647
5650
  ];
5648
5651
  }
5649
5652
 
@@ -5997,27 +6000,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
5997
6000
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], area: [{ type: i0.ViewChild, args: ['area', { ...{ read: DbxFileUploadAreaComponent }, isSignal: true }] }], button: [{ type: i0.ViewChild, args: ['button', { ...{ read: DbxFileUploadButtonComponent }, isSignal: true }] }], buttonStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonStyle", required: false }] }], buttonDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonDisplay", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], clickAreaToUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickAreaToUpload", required: false }] }], filesChanged: [{ type: i0.Output, args: ["filesChanged"] }] } });
5998
6001
 
5999
6002
  /**
6000
- * Syncs the disabled and working states from an ActionContextStoreSource to a {@link DbxFileUploadActionCompatable} component.
6003
+ * Syncs the disabled and working states from an ActionContextStoreSource to a {@link DbxActionWorkable} target.
6004
+ *
6005
+ * The target is any element that provides {@link DbxActionWorkable} -- a {@link DbxFileUploadActionCompatable}
6006
+ * file upload component, or a {@link DbxButton} (e.g. `<dbx-button>`).
6001
6007
  *
6002
6008
  * @example
6003
6009
  * ```html
6004
6010
  * <dbx-file-upload-button dbxFileUploadActionSync (filesChanged)="onFiles($event)"></dbx-file-upload-button>
6005
6011
  * ```
6012
+ *
6013
+ * @example
6014
+ * ```html
6015
+ * <dbx-button dbxFileUploadActionSync></dbx-button>
6016
+ * ```
6006
6017
  */
6007
6018
  class DbxFileUploadActionSyncDirective {
6008
6019
  source = inject(DbxActionContextStoreSourceInstance);
6009
- uploadCompatable = inject(DbxFileUploadActionCompatable);
6020
+ workable = inject(DbxActionWorkable);
6010
6021
  constructor() {
6011
6022
  cleanSubscriptionWithLockSet({
6012
6023
  lockSet: this.source.lockSet,
6013
6024
  sub: this.source.isWorkingOrWorkProgress$.subscribe((working) => {
6014
- this.uploadCompatable.setWorking(working);
6025
+ this.workable.setWorking(working);
6015
6026
  })
6016
6027
  });
6017
6028
  cleanSubscriptionWithLockSet({
6018
6029
  lockSet: this.source.lockSet,
6019
6030
  sub: this.source.isDisabled$.subscribe((disabled) => {
6020
- this.uploadCompatable.setDisabled(disabled);
6031
+ this.workable.setDisabled(disabled);
6021
6032
  })
6022
6033
  });
6023
6034
  }