@dereekb/dbx-firebase 13.8.0 → 13.10.0

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.
@@ -9,7 +9,7 @@ import { DbxFirebaseAuthService, AbstractDbxFirebaseDocumentStore, firebaseDocum
9
9
  import { HttpClient } from '@angular/common/http';
10
10
  import { first, switchMap, of, map, BehaviorSubject, tap } from 'rxjs';
11
11
  import * as i1 from '@dereekb/dbx-form';
12
- import { forgeValueSelectionField, forgeTextField, forgeSearchableStringChipField, isWebsiteUrlValidator, forgeGroup, forgePickableChipField, pickableValueFieldValuesConfigForStaticLabeledValues, AbstractConfigAsyncForgeFormDirective, DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, DBX_FORGE_FORM_COMPONENT_TEMPLATE, DbxActionFormDirective, DbxFormSourceDirective, DbxFormValueChangeDirective } from '@dereekb/dbx-form';
12
+ import { dbxForgeValueSelectionField, dbxForgeTextField, dbxForgeSearchableStringChipField, isWebsiteUrlValidator, dbxForgeContainer, dbxForgePickableChipField, pickableValueFieldValuesConfigForStaticLabeledValues, AbstractConfigAsyncForgeFormDirective, DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, DBX_FORGE_FORM_COMPONENT_TEMPLATE, DbxActionFormDirective, DbxFormSourceDirective, DbxFormValueChangeDirective } from '@dereekb/dbx-form';
13
13
  import { ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS, PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD, OIDC_ENTRY_CLIENT_TYPE, OidcModelFunctions, OidcModelFirestoreCollections } from '@dereekb/firebase';
14
14
  import { CommonModule } from '@angular/common';
15
15
 
@@ -662,12 +662,12 @@ function oidcEntryClientForgeFormFields(config) {
662
662
  function oidcClientTokenEndpointAuthMethodForgeField(config) {
663
663
  const allowedAuthMethods = config?.tokenEndpointAuthMethods;
664
664
  const options = allowedAuthMethods?.length ? ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS.filter((o) => allowedAuthMethods.includes(o.value)) : ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS;
665
- return forgeValueSelectionField({
665
+ return dbxForgeValueSelectionField({
666
666
  key: 'token_endpoint_auth_method',
667
667
  label: 'Token Endpoint Auth Method',
668
668
  description: 'How the client authenticates when exchanging tokens. Cannot be changed after creation.',
669
669
  required: true,
670
- options
670
+ props: { options }
671
671
  });
672
672
  }
673
673
  /**
@@ -686,10 +686,10 @@ function oidcEntryClientUpdateForgeFormFields() {
686
686
  * @returns A forge text field for the client name.
687
687
  */
688
688
  function oidcClientNameForgeField() {
689
- return forgeTextField({
689
+ return dbxForgeTextField({
690
690
  key: 'client_name',
691
691
  label: 'Client Name',
692
- description: 'A human-readable name for this OAuth client.',
692
+ hint: 'A human-readable name for this OAuth client.',
693
693
  required: true,
694
694
  maxLength: 200
695
695
  });
@@ -700,30 +700,35 @@ function oidcClientNameForgeField() {
700
700
  * @returns A forge searchable chip field for redirect URIs.
701
701
  */
702
702
  function oidcClientRedirectUrisForgeField() {
703
- return forgeSearchableStringChipField({
703
+ return dbxForgeSearchableStringChipField({
704
704
  key: 'redirect_uris',
705
705
  label: 'Redirect URIs',
706
- description: 'Type a redirect URI (e.g. https://example.com/callback) and press enter to add it.',
706
+ hint: 'Type a redirect URI (e.g. https://example.com/callback) and press enter to add it.',
707
707
  required: true,
708
- searchOnEmptyText: false,
709
- textInputValidator: isWebsiteUrlValidator({ requirePrefix: true, allowPorts: true }),
710
- search: () => of([]),
711
- displayForValue: (values) => of(values.map((v) => ({ ...v, label: v.value })))
708
+ props: {
709
+ searchOnEmptyText: false,
710
+ textInputValidator: isWebsiteUrlValidator({ requirePrefix: true, allowPorts: true }),
711
+ search: () => of([]),
712
+ displayForValue: (values) => of(values.map((v) => ({ ...v, label: v.value })))
713
+ }
712
714
  });
713
715
  }
714
716
  /**
715
- * Creates a forge group containing the JWKS URI field, conditionally hidden
716
- * when the token endpoint auth method is not `private_key_jwt`.
717
+ * Creates a forge container wrapping the JWKS URI field, conditionally hidden
718
+ * when the token endpoint auth method is not `private_key_jwt`. A container
719
+ * (not a group) is used so the `jwks_uri` field stays at the root level of
720
+ * the form value rather than being nested under an extra object.
717
721
  *
718
- * @returns A forge group field with conditional visibility logic.
722
+ * @returns A forge container field with conditional visibility logic.
719
723
  */
720
724
  function oidcClientJwksUriForgeField() {
721
- return forgeGroup({
725
+ return dbxForgeContainer({
726
+ key: 'jwks_uri_container',
722
727
  fields: [
723
- forgeTextField({
728
+ dbxForgeTextField({
724
729
  key: 'jwks_uri',
725
730
  label: 'JWKS URI',
726
- description: "URL where the client's public JSON Web Key Set can be fetched. Required for private_key_jwt authentication.",
731
+ hint: "URL where the client's public JSON Web Key Set can be fetched. Required for private_key_jwt authentication.",
727
732
  required: true
728
733
  })
729
734
  ],
@@ -746,10 +751,10 @@ function oidcClientJwksUriForgeField() {
746
751
  * @returns A forge text field for the logo URI.
747
752
  */
748
753
  function oidcClientLogoUriForgeField() {
749
- return forgeTextField({
754
+ return dbxForgeTextField({
750
755
  key: 'logo_uri',
751
756
  label: 'Logo URI',
752
- description: 'URL of the client logo image (optional).',
757
+ hint: 'URL of the client logo image (optional).',
753
758
  required: false
754
759
  });
755
760
  }
@@ -759,10 +764,10 @@ function oidcClientLogoUriForgeField() {
759
764
  * @returns A forge text field for the homepage URL.
760
765
  */
761
766
  function oidcClientHomepageUriForgeField() {
762
- return forgeTextField({
767
+ return dbxForgeTextField({
763
768
  key: 'client_uri',
764
769
  label: 'Homepage URL',
765
- description: 'URL of the client homepage (optional).',
770
+ hint: 'URL of the client homepage (optional).',
766
771
  required: false
767
772
  });
768
773
  }
@@ -781,7 +786,7 @@ function oidcEntryClientTestForgeFormFields(config) {
781
786
  * @returns A read-only forge text field for the client ID.
782
787
  */
783
788
  function oidcClientTestClientIdForgeField() {
784
- return forgeTextField({
789
+ return dbxForgeTextField({
785
790
  key: 'client_id',
786
791
  label: 'Client ID',
787
792
  readonly: true
@@ -795,12 +800,12 @@ function oidcClientTestClientIdForgeField() {
795
800
  */
796
801
  function oidcClientTestRedirectUriForgeField(redirectUris) {
797
802
  const options = redirectUris.map((uri) => ({ label: uri, value: uri }));
798
- return forgeValueSelectionField({
803
+ return dbxForgeValueSelectionField({
799
804
  key: 'redirect_uri',
800
805
  label: 'Redirect URI',
801
806
  description: 'Select the redirect URI to use for the test flow.',
802
807
  required: true,
803
- options
808
+ props: { options }
804
809
  });
805
810
  }
806
811
  /**
@@ -810,12 +815,14 @@ function oidcClientTestRedirectUriForgeField(redirectUris) {
810
815
  * @returns A forge pickable chip field for scope selection.
811
816
  */
812
817
  function oidcClientTestScopesForgeField(availableScopes) {
813
- return forgePickableChipField({
818
+ return dbxForgePickableChipField({
814
819
  key: 'scopes',
815
820
  label: 'Scopes',
816
- description: 'Select the scopes to request.',
817
- showSelectAllButton: true,
818
- ...pickableValueFieldValuesConfigForStaticLabeledValues(availableScopes)
821
+ hint: 'Select the scopes to request.',
822
+ props: {
823
+ showSelectAllButton: true,
824
+ ...pickableValueFieldValuesConfigForStaticLabeledValues(availableScopes)
825
+ }
819
826
  });
820
827
  }
821
828
 
@@ -829,7 +836,7 @@ function oidcClientTestScopesForgeField(availableScopes) {
829
836
  */
830
837
  class DbxFirebaseOidcEntryClientForgeFormComponent extends AbstractConfigAsyncForgeFormDirective {
831
838
  _oidcConfigService = inject(DbxFirebaseOidcConfigService);
832
- config$ = this.currentConfig$.pipe(map((config) => {
839
+ formConfig$ = this.currentConfig$.pipe(map((config) => {
833
840
  if (!config) {
834
841
  return undefined;
835
842
  }
@@ -859,7 +866,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
859
866
  * Displays read-only client_id, a redirect URI selector, and scope picker.
860
867
  */
861
868
  class DbxFirebaseOidcEntryClientTestForgeFormComponent extends AbstractConfigAsyncForgeFormDirective {
862
- config$ = this.currentConfig$.pipe(map((config) => {
869
+ formConfig$ = this.currentConfig$.pipe(map((config) => {
863
870
  if (!config) {
864
871
  return undefined;
865
872
  }
@@ -888,7 +895,7 @@ class DbxFirebaseOidcEntryClientListComponent extends AbstractDbxSelectionListWr
888
895
  });
889
896
  }
890
897
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseOidcEntryClientListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
891
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseOidcEntryClientListComponent, isStandalone: true, selector: "dbx-firebase-oidc-client-list", providers: provideDbxListViewWrapper(DbxFirebaseOidcEntryClientListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabled()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }] });
898
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseOidcEntryClientListComponent, isStandalone: true, selector: "dbx-firebase-oidc-client-list", providers: provideDbxListViewWrapper(DbxFirebaseOidcEntryClientListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabledSignal()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }] });
892
899
  }
893
900
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseOidcEntryClientListComponent, decorators: [{
894
901
  type: Component,