@dereekb/dbx-web 13.17.0 → 13.18.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.
- package/_index.scss +4 -1
- package/eslint/package.json +4 -4
- package/fesm2022/dereekb-dbx-web-mapbox.mjs +2 -2
- package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-style-demo.mjs +1698 -0
- package/fesm2022/dereekb-dbx-web-style-demo.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-web-table.mjs +1 -1
- package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web.mjs +460 -333
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/lib/button/_button.scss +74 -98
- package/lib/extension/pdf/_pdf.scss +5 -5
- package/lib/extension/table/_table.scss +2 -2
- package/lib/interaction/detach/_detach.scss +22 -2
- package/lib/interaction/dialog/_dialog.scss +4 -8
- package/lib/interaction/popup/_popup.scss +1 -2
- package/lib/interaction/prompt/_prompt.scss +7 -2
- package/lib/layout/avatar/_avatar.scss +8 -0
- package/lib/layout/bar/_bar.scss +41 -2
- package/lib/layout/card/_card.scss +191 -3
- package/lib/layout/column/_column.scss +3 -3
- package/lib/layout/content/_content.scss +24 -9
- package/lib/layout/list/_list.scss +83 -6
- package/lib/layout/section/_section.scss +7 -8
- package/lib/layout/style/_style.scss +44 -9
- package/lib/layout/text/_text.scss +73 -29
- package/lib/loading/_loading.scss +9 -2
- package/lib/router/layout/navbar/_navbar.scss +14 -0
- package/lib/router/layout/sidenav/_sidenav.scss +2 -2
- package/lib/style/_core.scss +4 -0
- package/lib/style/_corners.scss +79 -0
- package/lib/style/_root-variables.scss +17 -0
- package/lib/style/_shapes.scss +56 -0
- package/lib/style/_style-demo.scss +183 -0
- package/lib/style/_variables.scss +8 -1
- package/package.json +11 -7
- package/style-demo/README.md +12 -0
- package/types/dereekb-dbx-web-style-demo.d.ts +883 -0
- package/types/dereekb-dbx-web.d.ts +170 -79
- package/lib/style/_m2-visual-compat.scss +0 -120
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
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,
|
|
3
|
-
import { asPromise, DASH_CHARACTER_PREFIX_INSTANCE, hashStringToNumber, cssTokenVar,
|
|
2
|
+
import { Injectable, input, inject, effect, Directive, NgModule, ChangeDetectionStrategy, Component, output, computed, HostListener, forwardRef, model, InjectionToken, viewChild, ElementRef, makeEnvironmentProviders, untracked, ApplicationRef, Injector, EnvironmentInjector, createComponent, DestroyRef, signal, TemplateRef, SecurityContext, ViewContainerRef, booleanAttribute, Renderer2 } from '@angular/core';
|
|
3
|
+
import { asPromise, DASH_CHARACTER_PREFIX_INSTANCE, hashStringToNumber, cssTokenVar, useIterableOrValue, isDefinedAndNotFalse, 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, nameToInitials, 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
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';
|
|
@@ -778,7 +778,14 @@ const DBX_COLOR_CUSTOM_BG_CSS_CLASS = 'dbx-color-bg';
|
|
|
778
778
|
*/
|
|
779
779
|
const DBX_COLOR_CUSTOM_TEXT_CSS_CLASS = 'dbx-color-text';
|
|
780
780
|
/**
|
|
781
|
-
* Returns the CSS class name for a themed background color.
|
|
781
|
+
* Returns the token-providing CSS class name for a themed background color.
|
|
782
|
+
*
|
|
783
|
+
* Under the token-only contract the returned `dbx-{color}-bg` classes declare the `--dbx-bg-color-current` /
|
|
784
|
+
* `--dbx-color-current` custom properties but paint nothing on their own — painting is performed by the
|
|
785
|
+
* `.dbx-color-bg` utility (or a `.dbx-color`-scoped component) reading those tokens. For named colors this returns the
|
|
786
|
+
* `dbx-{color}-bg` token class; for a {@link DbxColorConfig} it returns {@link DBX_COLOR_CUSTOM_BG_CSS_CLASS} so static
|
|
787
|
+
* (non-directive) callers still paint, while the `[dbxColor]` directive itself bypasses this for configs and supplies the
|
|
788
|
+
* tokens through inline style bindings instead.
|
|
782
789
|
*
|
|
783
790
|
* @param color - The theme color, color config, or nullish/empty for the default class.
|
|
784
791
|
* @returns The CSS class name for the themed background (e.g., `'dbx-primary-bg'`, `'dbx-color-bg'`, or `'dbx-default'`)
|
|
@@ -861,174 +868,6 @@ const dbxThemeColorCssVariable = dbxThemeColorCssToken;
|
|
|
861
868
|
*/
|
|
862
869
|
const dbxThemeColorCssVariableVar = dbxThemeColorCssTokenVar;
|
|
863
870
|
|
|
864
|
-
/**
|
|
865
|
-
* Injection token for providing a global array of progress button configurations.
|
|
866
|
-
*/
|
|
867
|
-
const DBX_PROGRESS_BUTTON_GLOBAL_CONFIG = new InjectionToken('DbxProgressButtonGlobalConfig');
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* Abstract base for progress button components. Manages configuration merging with global defaults,
|
|
871
|
-
* working/disabled state computation, CSS class generation, and click event handling.
|
|
872
|
-
* Subclasses provide the specific template (spinner or bar).
|
|
873
|
-
*/
|
|
874
|
-
class AbstractProgressButtonDirective {
|
|
875
|
-
globalConfig = inject(DBX_PROGRESS_BUTTON_GLOBAL_CONFIG, { optional: true }) ?? [];
|
|
876
|
-
btnClick = output();
|
|
877
|
-
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
878
|
-
buttonId = input(...(ngDevMode ? [undefined, { debugName: "buttonId" }] : /* istanbul ignore next */ []));
|
|
879
|
-
working = input(...(ngDevMode ? [undefined, { debugName: "working" }] : /* istanbul ignore next */ []));
|
|
880
|
-
disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
881
|
-
globalOptionsSignal = computed(() => {
|
|
882
|
-
const buttonId = this.buttonId();
|
|
883
|
-
return buttonId ? this.globalConfig.find((config) => config.id === buttonId) : undefined;
|
|
884
|
-
}, ...(ngDevMode ? [{ debugName: "globalOptionsSignal" }] : /* istanbul ignore next */ []));
|
|
885
|
-
configSignal = computed(() => {
|
|
886
|
-
const config = this.config();
|
|
887
|
-
const globalConfig = this.globalOptionsSignal();
|
|
888
|
-
let completeConfig;
|
|
889
|
-
if (config || globalConfig) {
|
|
890
|
-
completeConfig = {
|
|
891
|
-
...globalConfig,
|
|
892
|
-
...config
|
|
893
|
-
};
|
|
894
|
-
// set the iconOnly property if the buttonType is icon
|
|
895
|
-
if (completeConfig.buttonType === 'icon') {
|
|
896
|
-
completeConfig.iconOnly = true;
|
|
897
|
-
}
|
|
898
|
-
else if (completeConfig.iconOnly) {
|
|
899
|
-
completeConfig.buttonType = 'icon';
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
return completeConfig;
|
|
903
|
-
}, ...(ngDevMode ? [{ debugName: "configSignal" }] : /* istanbul ignore next */ []));
|
|
904
|
-
baseCssClassSignal = computed(() => {
|
|
905
|
-
const config = this.configSignal();
|
|
906
|
-
const classes = [config?.customClass ?? ''];
|
|
907
|
-
if (config?.fullWidth) {
|
|
908
|
-
classes.push('fullWidth');
|
|
909
|
-
}
|
|
910
|
-
if (config?.disabled) {
|
|
911
|
-
classes.push('disabled');
|
|
912
|
-
}
|
|
913
|
-
let buttonType = 'basic';
|
|
914
|
-
if (config?.iconOnly) {
|
|
915
|
-
buttonType = 'icon';
|
|
916
|
-
}
|
|
917
|
-
else if (config?.buttonType) {
|
|
918
|
-
buttonType = config.buttonType;
|
|
919
|
-
}
|
|
920
|
-
switch (buttonType) {
|
|
921
|
-
case 'icon':
|
|
922
|
-
classes.push('mdc-icon-button mat-mdc-icon-button mat-unthemed');
|
|
923
|
-
break;
|
|
924
|
-
case 'raised':
|
|
925
|
-
classes.push('mat-mdc-raised-button mdc-button--raised');
|
|
926
|
-
break;
|
|
927
|
-
case 'stroked':
|
|
928
|
-
classes.push('mat-mdc-outlined-button mdc-button--outlined');
|
|
929
|
-
break;
|
|
930
|
-
case 'flat':
|
|
931
|
-
classes.push('mat-mdc-unelevated-button mdc-button--unelevated');
|
|
932
|
-
break;
|
|
933
|
-
case 'tonal':
|
|
934
|
-
classes.push('mat-mdc-tonal-button mdc-button--tonal');
|
|
935
|
-
break;
|
|
936
|
-
default:
|
|
937
|
-
classes.push('mat-unthemed');
|
|
938
|
-
break;
|
|
939
|
-
}
|
|
940
|
-
return classes;
|
|
941
|
-
}, ...(ngDevMode ? [{ debugName: "baseCssClassSignal" }] : /* istanbul ignore next */ []));
|
|
942
|
-
baseCssClasses$ = toObservable(this.baseCssClassSignal);
|
|
943
|
-
workingProgressSignal = computed(() => {
|
|
944
|
-
const working = this.working();
|
|
945
|
-
const config = this.configSignal();
|
|
946
|
-
const configWorking = config?.working;
|
|
947
|
-
return dbxActionWorkProgress([working, configWorking]);
|
|
948
|
-
}, ...(ngDevMode ? [{ debugName: "workingProgressSignal" }] : /* istanbul ignore next */ []));
|
|
949
|
-
isWorkingSignal = computed(() => isDefinedAndNotFalse(this.workingProgressSignal()), ...(ngDevMode ? [{ debugName: "isWorkingSignal" }] : /* istanbul ignore next */ []));
|
|
950
|
-
workingValueSignal = computed(() => {
|
|
951
|
-
const working = this.workingProgressSignal();
|
|
952
|
-
let result;
|
|
953
|
-
if (typeof working === 'number') {
|
|
954
|
-
result = working;
|
|
955
|
-
}
|
|
956
|
-
return result;
|
|
957
|
-
}, ...(ngDevMode ? [{ debugName: "workingValueSignal" }] : /* istanbul ignore next */ []));
|
|
958
|
-
modeSignal = computed(() => {
|
|
959
|
-
const config = this.configSignal();
|
|
960
|
-
const workingValue = this.workingValueSignal();
|
|
961
|
-
const mode = config?.mode;
|
|
962
|
-
let result;
|
|
963
|
-
if (mode) {
|
|
964
|
-
result = mode;
|
|
965
|
-
}
|
|
966
|
-
else if (workingValue == null) {
|
|
967
|
-
result = 'indeterminate';
|
|
968
|
-
}
|
|
969
|
-
else {
|
|
970
|
-
result = 'determinate';
|
|
971
|
-
}
|
|
972
|
-
return result;
|
|
973
|
-
}, ...(ngDevMode ? [{ debugName: "modeSignal" }] : /* istanbul ignore next */ []));
|
|
974
|
-
disabledSignal = computed(() => {
|
|
975
|
-
const disabled = this.disabled();
|
|
976
|
-
const configDisabled = this.configSignal()?.disabled;
|
|
977
|
-
return disabled || configDisabled;
|
|
978
|
-
}, ...(ngDevMode ? [{ debugName: "disabledSignal" }] : /* istanbul ignore next */ []));
|
|
979
|
-
buttonTypeAttributeSignal = computed(() => {
|
|
980
|
-
const options = this.configSignal();
|
|
981
|
-
return options?.buttonTypeAttribute;
|
|
982
|
-
}, ...(ngDevMode ? [{ debugName: "buttonTypeAttributeSignal" }] : /* istanbul ignore next */ []));
|
|
983
|
-
buttonDisabledSignal = computed(() => {
|
|
984
|
-
const working = this.isWorkingSignal();
|
|
985
|
-
const disabled = this.disabledSignal();
|
|
986
|
-
return working || disabled;
|
|
987
|
-
}, ...(ngDevMode ? [{ debugName: "buttonDisabledSignal" }] : /* istanbul ignore next */ []));
|
|
988
|
-
showProgressSignal = computed(() => {
|
|
989
|
-
const working = this.isWorkingSignal();
|
|
990
|
-
const disabled = this.disabledSignal();
|
|
991
|
-
return working && !disabled;
|
|
992
|
-
}, ...(ngDevMode ? [{ debugName: "showProgressSignal" }] : /* istanbul ignore next */ []));
|
|
993
|
-
/**
|
|
994
|
-
* Whether a button echo overlay is active (iconOnly echo mode).
|
|
995
|
-
*/
|
|
996
|
-
echoActiveSignal = computed(() => {
|
|
997
|
-
return this.configSignal()?.buttonEcho != null;
|
|
998
|
-
}, ...(ngDevMode ? [{ debugName: "echoActiveSignal" }] : /* istanbul ignore next */ []));
|
|
999
|
-
/**
|
|
1000
|
-
* Whether button content should be hidden via opacity (working spinner or echo overlay active).
|
|
1001
|
-
*/
|
|
1002
|
-
hideContentSignal = computed(() => {
|
|
1003
|
-
const echoActive = this.echoActiveSignal();
|
|
1004
|
-
return this.showProgressSignal() || echoActive;
|
|
1005
|
-
}, ...(ngDevMode ? [{ debugName: "hideContentSignal" }] : /* istanbul ignore next */ []));
|
|
1006
|
-
/**
|
|
1007
|
-
* When true, the click handler will not call `stopImmediatePropagation()`,
|
|
1008
|
-
* allowing the click event to continue bubbling. Needed for components like
|
|
1009
|
-
* file upload buttons where a parent must handle the click synchronously.
|
|
1010
|
-
*/
|
|
1011
|
-
allowClickPropagation = input(false, { ...(ngDevMode ? { debugName: "allowClickPropagation" } : /* istanbul ignore next */ {}), transform: Boolean });
|
|
1012
|
-
handleClick(event) {
|
|
1013
|
-
const working = this.isWorkingSignal();
|
|
1014
|
-
const disabled = this.disabledSignal();
|
|
1015
|
-
if (!working && !disabled) {
|
|
1016
|
-
this.btnClick.emit(event);
|
|
1017
|
-
if (!this.allowClickPropagation()) {
|
|
1018
|
-
event.stopImmediatePropagation();
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractProgressButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1023
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: AbstractProgressButtonDirective, isStandalone: true, inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, buttonId: { classPropertyName: "buttonId", publicName: "buttonId", isSignal: true, isRequired: false, transformFunction: null }, working: { classPropertyName: "working", publicName: "working", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowClickPropagation: { classPropertyName: "allowClickPropagation", publicName: "allowClickPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnClick: "btnClick" }, host: { listeners: { "click": "handleClick($event)" } }, ngImport: i0 });
|
|
1024
|
-
}
|
|
1025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractProgressButtonDirective, decorators: [{
|
|
1026
|
-
type: Directive
|
|
1027
|
-
}], propDecorators: { btnClick: [{ type: i0.Output, args: ["btnClick"] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], buttonId: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonId", required: false }] }], working: [{ type: i0.Input, args: [{ isSignal: true, alias: "working", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowClickPropagation: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClickPropagation", required: false }] }], handleClick: [{
|
|
1028
|
-
type: HostListener,
|
|
1029
|
-
args: ['click', ['$event']]
|
|
1030
|
-
}] } });
|
|
1031
|
-
|
|
1032
871
|
/**
|
|
1033
872
|
* Configuration provided in the root module/environment for seeding {@link DbxColorService} with initial templates.
|
|
1034
873
|
*/
|
|
@@ -1163,10 +1002,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1163
1002
|
}], ctorParameters: () => [] });
|
|
1164
1003
|
|
|
1165
1004
|
/**
|
|
1166
|
-
*
|
|
1005
|
+
* Provides themed color *tokens* to the host element — it never paints a background itself.
|
|
1167
1006
|
*
|
|
1168
1007
|
* Accepts either a {@link DbxThemeColor} string (e.g. `'primary'`, `'success'`) or a {@link DbxColorConfig}
|
|
1169
1008
|
* object carrying arbitrary CSS color values (any hex, `rgb()`, `hsl()`, `var(...)`, `color-mix(...)`, etc.).
|
|
1009
|
+
* The directive sets the `--dbx-bg-color-current` / `--dbx-color-current` (and tone) custom properties and adds the
|
|
1010
|
+
* `.dbx-color` marker class, leaving the actual painting to either the explicit `.dbx-color-bg` utility on the same
|
|
1011
|
+
* element or a colored-surface component's own `.dbx-color`-scoped SCSS (e.g. `<dbx-bar>`, `<dbx-button>`, `<dbx-loading>`,
|
|
1012
|
+
* `<dbx-icon-tile>`, `<mat-card>`) that reads the inherited tokens.
|
|
1170
1013
|
*
|
|
1171
1014
|
* Optionally set {@link dbxColorTone} (0-100) to control background opacity for a tonal/muted appearance.
|
|
1172
1015
|
* When tonal mode is active, the `dbx-color-tonal` CSS class is added and a CSS rule overrides the text
|
|
@@ -1180,26 +1023,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1180
1023
|
* @dbxWebCategory layout
|
|
1181
1024
|
* @dbxWebRelated text-color, color-service
|
|
1182
1025
|
* @dbxWebMinimalExample ```html
|
|
1183
|
-
* <div
|
|
1026
|
+
* <div dbxColor="primary" class="dbx-color-bg"></div>
|
|
1184
1027
|
* ```
|
|
1185
1028
|
*
|
|
1186
1029
|
* @example
|
|
1187
1030
|
* ```html
|
|
1188
|
-
*
|
|
1189
|
-
* <div
|
|
1190
|
-
* <div [
|
|
1191
|
-
* <div [dbxColor]="{ color: '
|
|
1031
|
+
* <!-- pair with .dbx-color-bg to paint a plain element -->
|
|
1032
|
+
* <div dbxColor="primary" class="dbx-color-bg">Themed background</div>
|
|
1033
|
+
* <div dbxColor="primary" [dbxColorTone]="18" class="dbx-color-bg">Tonal themed</div>
|
|
1034
|
+
* <div [dbxColor]="{ color: '#ff0066', contrast: 'white' }" class="dbx-color-bg">Custom hex</div>
|
|
1035
|
+
*
|
|
1036
|
+
* <!-- a colored-surface component paints itself from the tokens; no .dbx-color-bg needed -->
|
|
1037
|
+
* <dbx-bar dbxColor="primary">Bar paints itself</dbx-bar>
|
|
1038
|
+
* <dbx-button color="warn" raised text="Delete"></dbx-button>
|
|
1192
1039
|
* ```
|
|
1193
1040
|
*/
|
|
1194
1041
|
class DbxColorDirective {
|
|
1195
1042
|
_colorService = inject(DbxColorService, { optional: true });
|
|
1196
|
-
|
|
1043
|
+
/**
|
|
1044
|
+
* The color to provide tokens for. Declared as a `model` so a colored-surface component on the same host (e.g.
|
|
1045
|
+
* `dbx-button`) can push its resolved color into the directive, keeping it the single token provider on the element.
|
|
1046
|
+
*/
|
|
1047
|
+
dbxColor = model(...(ngDevMode ? [undefined, { debugName: "dbxColor" }] : /* istanbul ignore next */ []));
|
|
1197
1048
|
/**
|
|
1198
1049
|
* Background tone level (0-100). When set, the background becomes semi-transparent
|
|
1199
1050
|
* and text color switches to the vibrant theme color for a tonal appearance.
|
|
1200
1051
|
*/
|
|
1201
1052
|
dbxColorTone = input(...(ngDevMode ? [undefined, { debugName: "dbxColorTone" }] : /* istanbul ignore next */ []));
|
|
1202
|
-
|
|
1053
|
+
/**
|
|
1054
|
+
* Whether a color is currently bound. When nothing is bound the directive is fully inert — it adds no marker class
|
|
1055
|
+
* and no token class — so color tokens inherited from a `[dbxColor]` ancestor pass through untouched (important for
|
|
1056
|
+
* components that host this directive unconditionally, e.g. `dbx-button` inside a tonal `[dbxColor]` card).
|
|
1057
|
+
*/
|
|
1058
|
+
hasColorSignal = computed(() => Boolean(this.dbxColor()), ...(ngDevMode ? [{ debugName: "hasColorSignal" }] : /* istanbul ignore next */ []));
|
|
1059
|
+
/**
|
|
1060
|
+
* Applies the named `dbx-{color}-bg` token class for a {@link DbxThemeColor} string, or `''` both for a
|
|
1061
|
+
* {@link DbxColorConfig} (whose tokens are supplied by the inline `--dbx-bg-color-current` / `--dbx-color-current`
|
|
1062
|
+
* style bindings instead) and when no color is bound (inert; inherited tokens pass through). The directive is a pure
|
|
1063
|
+
* token provider — none of these classes paint a background; painting is done by the `.dbx-color-bg` utility or a
|
|
1064
|
+
* component's own `.dbx-color`-scoped SCSS.
|
|
1065
|
+
*/
|
|
1066
|
+
cssClassSignal = computed(() => {
|
|
1067
|
+
const value = this.dbxColor();
|
|
1068
|
+
let cssClass = '';
|
|
1069
|
+
if (value) {
|
|
1070
|
+
cssClass = isDbxColorConfig(value) ? '' : dbxColorBackground(value);
|
|
1071
|
+
}
|
|
1072
|
+
return cssClass;
|
|
1073
|
+
}, ...(ngDevMode ? [{ debugName: "cssClassSignal" }] : /* istanbul ignore next */ []));
|
|
1203
1074
|
_configSignal = computed(() => {
|
|
1204
1075
|
const value = this.dbxColor();
|
|
1205
1076
|
return isDbxColorConfig(value) ? (this._colorService?.expandColorConfig(value) ?? value) : undefined;
|
|
@@ -1255,7 +1126,7 @@ class DbxColorDirective {
|
|
|
1255
1126
|
return tone == null ? null : `${tone}%`;
|
|
1256
1127
|
}, ...(ngDevMode ? [{ debugName: "bgToneStyleSignal" }] : /* istanbul ignore next */ []));
|
|
1257
1128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1258
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxColorDirective, isStandalone: true, selector: "[dbxColor]", inputs: { dbxColor: { classPropertyName: "dbxColor", publicName: "dbxColor", isSignal: true, isRequired: false, transformFunction: null }, dbxColorTone: { classPropertyName: "dbxColorTone", publicName: "dbxColorTone", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClassSignal()", "class.dbx-color": "
|
|
1129
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxColorDirective, isStandalone: true, selector: "[dbxColor]", inputs: { dbxColor: { classPropertyName: "dbxColor", publicName: "dbxColor", isSignal: true, isRequired: false, transformFunction: null }, dbxColorTone: { classPropertyName: "dbxColorTone", publicName: "dbxColorTone", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dbxColor: "dbxColorChange" }, host: { properties: { "class": "cssClassSignal()", "class.dbx-color": "hasColorSignal()", "class.dbx-color-tonal": "isTonalSignal()", "style.--dbx-color-bg-tone": "bgToneStyleSignal()", "style.--dbx-bg-color-current": "bgColorStyleSignal()", "style.--dbx-color-current": "colorStyleSignal()" } }, ngImport: i0 });
|
|
1259
1130
|
}
|
|
1260
1131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxColorDirective, decorators: [{
|
|
1261
1132
|
type: Directive,
|
|
@@ -1263,7 +1134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1263
1134
|
selector: '[dbxColor]',
|
|
1264
1135
|
host: {
|
|
1265
1136
|
'[class]': 'cssClassSignal()',
|
|
1266
|
-
'[class.dbx-color]': '
|
|
1137
|
+
'[class.dbx-color]': 'hasColorSignal()',
|
|
1267
1138
|
'[class.dbx-color-tonal]': 'isTonalSignal()',
|
|
1268
1139
|
'[style.--dbx-color-bg-tone]': 'bgToneStyleSignal()',
|
|
1269
1140
|
'[style.--dbx-bg-color-current]': 'bgColorStyleSignal()',
|
|
@@ -1271,7 +1142,175 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1271
1142
|
},
|
|
1272
1143
|
standalone: true
|
|
1273
1144
|
}]
|
|
1274
|
-
}], propDecorators: { dbxColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxColor", required: false }] }], dbxColorTone: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxColorTone", required: false }] }] } });
|
|
1145
|
+
}], propDecorators: { dbxColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxColor", required: false }] }, { type: i0.Output, args: ["dbxColorChange"] }], dbxColorTone: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxColorTone", required: false }] }] } });
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Injection token for providing a global array of progress button configurations.
|
|
1149
|
+
*/
|
|
1150
|
+
const DBX_PROGRESS_BUTTON_GLOBAL_CONFIG = new InjectionToken('DbxProgressButtonGlobalConfig');
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Abstract base for progress button components. Manages configuration merging with global defaults,
|
|
1154
|
+
* working/disabled state computation, CSS class generation, and click event handling.
|
|
1155
|
+
* Subclasses provide the specific template (spinner or bar).
|
|
1156
|
+
*/
|
|
1157
|
+
class AbstractProgressButtonDirective {
|
|
1158
|
+
globalConfig = inject(DBX_PROGRESS_BUTTON_GLOBAL_CONFIG, { optional: true }) ?? [];
|
|
1159
|
+
btnClick = output();
|
|
1160
|
+
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
1161
|
+
buttonId = input(...(ngDevMode ? [undefined, { debugName: "buttonId" }] : /* istanbul ignore next */ []));
|
|
1162
|
+
working = input(...(ngDevMode ? [undefined, { debugName: "working" }] : /* istanbul ignore next */ []));
|
|
1163
|
+
disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1164
|
+
globalOptionsSignal = computed(() => {
|
|
1165
|
+
const buttonId = this.buttonId();
|
|
1166
|
+
return buttonId ? this.globalConfig.find((config) => config.id === buttonId) : undefined;
|
|
1167
|
+
}, ...(ngDevMode ? [{ debugName: "globalOptionsSignal" }] : /* istanbul ignore next */ []));
|
|
1168
|
+
configSignal = computed(() => {
|
|
1169
|
+
const config = this.config();
|
|
1170
|
+
const globalConfig = this.globalOptionsSignal();
|
|
1171
|
+
let completeConfig;
|
|
1172
|
+
if (config || globalConfig) {
|
|
1173
|
+
completeConfig = {
|
|
1174
|
+
...globalConfig,
|
|
1175
|
+
...config
|
|
1176
|
+
};
|
|
1177
|
+
// set the iconOnly property if the buttonType is icon
|
|
1178
|
+
if (completeConfig.buttonType === 'icon') {
|
|
1179
|
+
completeConfig.iconOnly = true;
|
|
1180
|
+
}
|
|
1181
|
+
else if (completeConfig.iconOnly) {
|
|
1182
|
+
completeConfig.buttonType = 'icon';
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
return completeConfig;
|
|
1186
|
+
}, ...(ngDevMode ? [{ debugName: "configSignal" }] : /* istanbul ignore next */ []));
|
|
1187
|
+
baseCssClassSignal = computed(() => {
|
|
1188
|
+
const config = this.configSignal();
|
|
1189
|
+
const classes = [config?.customClass ?? ''];
|
|
1190
|
+
if (config?.fullWidth) {
|
|
1191
|
+
classes.push('fullWidth');
|
|
1192
|
+
}
|
|
1193
|
+
if (config?.disabled) {
|
|
1194
|
+
classes.push('disabled');
|
|
1195
|
+
}
|
|
1196
|
+
let buttonType = 'basic';
|
|
1197
|
+
if (config?.iconOnly) {
|
|
1198
|
+
buttonType = 'icon';
|
|
1199
|
+
}
|
|
1200
|
+
else if (config?.buttonType) {
|
|
1201
|
+
buttonType = config.buttonType;
|
|
1202
|
+
}
|
|
1203
|
+
switch (buttonType) {
|
|
1204
|
+
case 'icon':
|
|
1205
|
+
classes.push('mdc-icon-button mat-mdc-icon-button mat-unthemed');
|
|
1206
|
+
break;
|
|
1207
|
+
case 'raised':
|
|
1208
|
+
classes.push('mat-mdc-raised-button mdc-button--raised');
|
|
1209
|
+
break;
|
|
1210
|
+
case 'stroked':
|
|
1211
|
+
classes.push('mat-mdc-outlined-button mdc-button--outlined');
|
|
1212
|
+
break;
|
|
1213
|
+
case 'flat':
|
|
1214
|
+
classes.push('mat-mdc-unelevated-button mdc-button--unelevated');
|
|
1215
|
+
break;
|
|
1216
|
+
case 'tonal':
|
|
1217
|
+
classes.push('mat-mdc-tonal-button mdc-button--tonal');
|
|
1218
|
+
break;
|
|
1219
|
+
default:
|
|
1220
|
+
classes.push('mat-unthemed');
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
return classes;
|
|
1224
|
+
}, ...(ngDevMode ? [{ debugName: "baseCssClassSignal" }] : /* istanbul ignore next */ []));
|
|
1225
|
+
baseCssClasses$ = toObservable(this.baseCssClassSignal);
|
|
1226
|
+
workingProgressSignal = computed(() => {
|
|
1227
|
+
const working = this.working();
|
|
1228
|
+
const config = this.configSignal();
|
|
1229
|
+
const configWorking = config?.working;
|
|
1230
|
+
return dbxActionWorkProgress([working, configWorking]);
|
|
1231
|
+
}, ...(ngDevMode ? [{ debugName: "workingProgressSignal" }] : /* istanbul ignore next */ []));
|
|
1232
|
+
isWorkingSignal = computed(() => isDefinedAndNotFalse(this.workingProgressSignal()), ...(ngDevMode ? [{ debugName: "isWorkingSignal" }] : /* istanbul ignore next */ []));
|
|
1233
|
+
workingValueSignal = computed(() => {
|
|
1234
|
+
const working = this.workingProgressSignal();
|
|
1235
|
+
let result;
|
|
1236
|
+
if (typeof working === 'number') {
|
|
1237
|
+
result = working;
|
|
1238
|
+
}
|
|
1239
|
+
return result;
|
|
1240
|
+
}, ...(ngDevMode ? [{ debugName: "workingValueSignal" }] : /* istanbul ignore next */ []));
|
|
1241
|
+
modeSignal = computed(() => {
|
|
1242
|
+
const config = this.configSignal();
|
|
1243
|
+
const workingValue = this.workingValueSignal();
|
|
1244
|
+
const mode = config?.mode;
|
|
1245
|
+
let result;
|
|
1246
|
+
if (mode) {
|
|
1247
|
+
result = mode;
|
|
1248
|
+
}
|
|
1249
|
+
else if (workingValue == null) {
|
|
1250
|
+
result = 'indeterminate';
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
result = 'determinate';
|
|
1254
|
+
}
|
|
1255
|
+
return result;
|
|
1256
|
+
}, ...(ngDevMode ? [{ debugName: "modeSignal" }] : /* istanbul ignore next */ []));
|
|
1257
|
+
disabledSignal = computed(() => {
|
|
1258
|
+
const disabled = this.disabled();
|
|
1259
|
+
const configDisabled = this.configSignal()?.disabled;
|
|
1260
|
+
return disabled || configDisabled;
|
|
1261
|
+
}, ...(ngDevMode ? [{ debugName: "disabledSignal" }] : /* istanbul ignore next */ []));
|
|
1262
|
+
buttonTypeAttributeSignal = computed(() => {
|
|
1263
|
+
const options = this.configSignal();
|
|
1264
|
+
return options?.buttonTypeAttribute;
|
|
1265
|
+
}, ...(ngDevMode ? [{ debugName: "buttonTypeAttributeSignal" }] : /* istanbul ignore next */ []));
|
|
1266
|
+
buttonDisabledSignal = computed(() => {
|
|
1267
|
+
const working = this.isWorkingSignal();
|
|
1268
|
+
const disabled = this.disabledSignal();
|
|
1269
|
+
return working || disabled;
|
|
1270
|
+
}, ...(ngDevMode ? [{ debugName: "buttonDisabledSignal" }] : /* istanbul ignore next */ []));
|
|
1271
|
+
showProgressSignal = computed(() => {
|
|
1272
|
+
const working = this.isWorkingSignal();
|
|
1273
|
+
const disabled = this.disabledSignal();
|
|
1274
|
+
return working && !disabled;
|
|
1275
|
+
}, ...(ngDevMode ? [{ debugName: "showProgressSignal" }] : /* istanbul ignore next */ []));
|
|
1276
|
+
/**
|
|
1277
|
+
* Whether a button echo overlay is active (iconOnly echo mode).
|
|
1278
|
+
*/
|
|
1279
|
+
echoActiveSignal = computed(() => {
|
|
1280
|
+
return this.configSignal()?.buttonEcho != null;
|
|
1281
|
+
}, ...(ngDevMode ? [{ debugName: "echoActiveSignal" }] : /* istanbul ignore next */ []));
|
|
1282
|
+
/**
|
|
1283
|
+
* Whether button content should be hidden via opacity (working spinner or echo overlay active).
|
|
1284
|
+
*/
|
|
1285
|
+
hideContentSignal = computed(() => {
|
|
1286
|
+
const echoActive = this.echoActiveSignal();
|
|
1287
|
+
return this.showProgressSignal() || echoActive;
|
|
1288
|
+
}, ...(ngDevMode ? [{ debugName: "hideContentSignal" }] : /* istanbul ignore next */ []));
|
|
1289
|
+
/**
|
|
1290
|
+
* When true, the click handler will not call `stopImmediatePropagation()`,
|
|
1291
|
+
* allowing the click event to continue bubbling. Needed for components like
|
|
1292
|
+
* file upload buttons where a parent must handle the click synchronously.
|
|
1293
|
+
*/
|
|
1294
|
+
allowClickPropagation = input(false, { ...(ngDevMode ? { debugName: "allowClickPropagation" } : /* istanbul ignore next */ {}), transform: Boolean });
|
|
1295
|
+
handleClick(event) {
|
|
1296
|
+
const working = this.isWorkingSignal();
|
|
1297
|
+
const disabled = this.disabledSignal();
|
|
1298
|
+
if (!working && !disabled) {
|
|
1299
|
+
this.btnClick.emit(event);
|
|
1300
|
+
if (!this.allowClickPropagation()) {
|
|
1301
|
+
event.stopImmediatePropagation();
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractProgressButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1306
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: AbstractProgressButtonDirective, isStandalone: true, inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, buttonId: { classPropertyName: "buttonId", publicName: "buttonId", isSignal: true, isRequired: false, transformFunction: null }, working: { classPropertyName: "working", publicName: "working", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowClickPropagation: { classPropertyName: "allowClickPropagation", publicName: "allowClickPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnClick: "btnClick" }, host: { listeners: { "click": "handleClick($event)" } }, ngImport: i0 });
|
|
1307
|
+
}
|
|
1308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractProgressButtonDirective, decorators: [{
|
|
1309
|
+
type: Directive
|
|
1310
|
+
}], propDecorators: { btnClick: [{ type: i0.Output, args: ["btnClick"] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], buttonId: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonId", required: false }] }], working: [{ type: i0.Input, args: [{ isSignal: true, alias: "working", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowClickPropagation: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClickPropagation", required: false }] }], handleClick: [{
|
|
1311
|
+
type: HostListener,
|
|
1312
|
+
args: ['click', ['$event']]
|
|
1313
|
+
}] } });
|
|
1275
1314
|
|
|
1276
1315
|
/**
|
|
1277
1316
|
* Progress button that displays a Material progress bar beneath the button while working.
|
|
@@ -1294,11 +1333,11 @@ class DbxProgressBarButtonComponent extends AbstractProgressButtonDirective {
|
|
|
1294
1333
|
buttonCss$ = this.baseCssClasses$.pipe(distinctUntilItemsHaveDifferentValues((x) => x[1]), map((x) => spaceSeparatedCssClasses(x[1])), shareReplay(1));
|
|
1295
1334
|
buttonCssSignal = toSignal(this.buttonCss$);
|
|
1296
1335
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxProgressBarButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1297
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxProgressBarButtonComponent, isStandalone: true, selector: "dbx-progress-bar-button,dbx-bar-button", usesInheritance: true, ngImport: i0, template: "<button
|
|
1336
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxProgressBarButtonComponent, isStandalone: true, selector: "dbx-progress-bar-button,dbx-bar-button", usesInheritance: true, ngImport: i0, template: "<button class=\"dbx-color-bg dbx-base-button dbx-progress-bar-button\" mat-button [type]=\"buttonTypeAttributeSignal()\" [ngClass]=\"buttonCssSignal()\" [ngStyle]=\"configSignal()?.customStyle\" [disabled]=\"buttonDisabledSignal()\" [attr.aria-label]=\"configSignal()?.ariaLabel\">\n @if (configSignal()?.buttonIcon) {\n <mat-icon class=\"mat-button-icon\" [class.is-mat-icon]=\"!configSignal()?.buttonIcon?.fontSet!\" [class.dbx-icon-no-text]=\"configSignal()?.hasTextContent === false\" [class.working]=\"echoActiveSignal()\" [ngClass]=\"configSignal()?.buttonIcon?.customClass!\" [fontSet]=\"configSignal()?.buttonIcon?.fontSet!\" [fontIcon]=\"configSignal()?.buttonIcon?.fontIcon!\" [color]=\"configSignal()?.buttonIcon?.color!\" [svgIcon]=\"configSignal()?.buttonIcon?.svgIcon!\" [inline]=\"configSignal()?.buttonIcon?.inline!\">\n {{ configSignal()?.buttonIcon?.fontSet! ? '' : configSignal()?.buttonIcon?.fontIcon! }}\n </mat-icon>\n }\n @if (!configSignal()?.fab && !configSignal()?.iconOnly && !(configSignal()?.hasTextContent === false && configSignal()?.buttonIcon)) {\n <span [class.working]=\"echoActiveSignal()\">\n {{ configSignal()?.text }}\n <ng-content></ng-content>\n </span>\n }\n @if (showProgressSignal()) {\n <mat-progress-bar class=\"bar\" [color]=\"configSignal()?.barColor!\" [mode]=\"modeSignal()\" [value]=\"workingValueSignal()\"></mat-progress-bar>\n }\n @if (echoActiveSignal()) {\n <span class=\"echo-overlay-icon material-symbols-outlined\">{{ configSignal()?.buttonEcho?.icon }}</span>\n }\n</button>\n", styles: [":host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button{overflow:hidden;--mat-button-text-icon-offset: 0px;--mat-button-outlined-icon-offset: 0px;--mat-button-protected-icon-offset: 0px;--mat-button-filled-icon-offset: 0px;--mat-button-tonal-icon-offset: 0px}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button.working{cursor:not-allowed}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button.fullWidth{width:100%}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button>::ng-deep .mdc-button__label{position:unset;display:flex;align-items:center}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button>::ng-deep .mdc-button__label .bar{position:absolute;top:0;left:0;--mat-progress-bar-track-height: var(--dbx-progress-bar-button-height, 5px);--mat-progress-bar-active-indicator-height: var(--dbx-progress-bar-button-height, 5px)}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon{padding-right:5px;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-right:var(--mat-button-protected-icon-spacing, 8px)}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon.is-mat-icon{position:relative}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon.working{opacity:0;transition:opacity .3s ease-in-out}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon.dbx-icon-no-text{padding-right:0;margin-right:0;font-size:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);width:var(--mat-icon-button-icon-size, 24px)}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button span{transition:opacity .3s ease-in-out}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button span.working{opacity:0}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button .echo-overlay-icon{position:absolute;inset:0;margin:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:1}\n", ":host button.mat-mdc-button .button-text{display:flex;align-items:center}:host button.mat-mdc-button mat-icon.mat-button-icon.mat-icon.mat-ligature-font[fontIcon]:before,:host button.mat-mdc-button mat-icon.mat-fab-icon.mat-icon.mat-ligature-font[fontIcon]:before{content:unset}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1298
1337
|
}
|
|
1299
1338
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxProgressBarButtonComponent, decorators: [{
|
|
1300
1339
|
type: Component,
|
|
1301
|
-
args: [{ selector: 'dbx-progress-bar-button,dbx-bar-button', imports: [MatButtonModule,
|
|
1340
|
+
args: [{ selector: 'dbx-progress-bar-button,dbx-bar-button', imports: [MatButtonModule, MatIconModule, MatProgressBar, NgClass, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<button class=\"dbx-color-bg dbx-base-button dbx-progress-bar-button\" mat-button [type]=\"buttonTypeAttributeSignal()\" [ngClass]=\"buttonCssSignal()\" [ngStyle]=\"configSignal()?.customStyle\" [disabled]=\"buttonDisabledSignal()\" [attr.aria-label]=\"configSignal()?.ariaLabel\">\n @if (configSignal()?.buttonIcon) {\n <mat-icon class=\"mat-button-icon\" [class.is-mat-icon]=\"!configSignal()?.buttonIcon?.fontSet!\" [class.dbx-icon-no-text]=\"configSignal()?.hasTextContent === false\" [class.working]=\"echoActiveSignal()\" [ngClass]=\"configSignal()?.buttonIcon?.customClass!\" [fontSet]=\"configSignal()?.buttonIcon?.fontSet!\" [fontIcon]=\"configSignal()?.buttonIcon?.fontIcon!\" [color]=\"configSignal()?.buttonIcon?.color!\" [svgIcon]=\"configSignal()?.buttonIcon?.svgIcon!\" [inline]=\"configSignal()?.buttonIcon?.inline!\">\n {{ configSignal()?.buttonIcon?.fontSet! ? '' : configSignal()?.buttonIcon?.fontIcon! }}\n </mat-icon>\n }\n @if (!configSignal()?.fab && !configSignal()?.iconOnly && !(configSignal()?.hasTextContent === false && configSignal()?.buttonIcon)) {\n <span [class.working]=\"echoActiveSignal()\">\n {{ configSignal()?.text }}\n <ng-content></ng-content>\n </span>\n }\n @if (showProgressSignal()) {\n <mat-progress-bar class=\"bar\" [color]=\"configSignal()?.barColor!\" [mode]=\"modeSignal()\" [value]=\"workingValueSignal()\"></mat-progress-bar>\n }\n @if (echoActiveSignal()) {\n <span class=\"echo-overlay-icon material-symbols-outlined\">{{ configSignal()?.buttonEcho?.icon }}</span>\n }\n</button>\n", styles: [":host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button{overflow:hidden;--mat-button-text-icon-offset: 0px;--mat-button-outlined-icon-offset: 0px;--mat-button-protected-icon-offset: 0px;--mat-button-filled-icon-offset: 0px;--mat-button-tonal-icon-offset: 0px}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button.working{cursor:not-allowed}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button.fullWidth{width:100%}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button>::ng-deep .mdc-button__label{position:unset;display:flex;align-items:center}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button>::ng-deep .mdc-button__label .bar{position:absolute;top:0;left:0;--mat-progress-bar-track-height: var(--dbx-progress-bar-button-height, 5px);--mat-progress-bar-active-indicator-height: var(--dbx-progress-bar-button-height, 5px)}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon{padding-right:5px;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-right:var(--mat-button-protected-icon-spacing, 8px)}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon.is-mat-icon{position:relative}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon.working{opacity:0;transition:opacity .3s ease-in-out}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button mat-icon.mat-button-icon.dbx-icon-no-text{padding-right:0;margin-right:0;font-size:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);width:var(--mat-icon-button-icon-size, 24px)}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button span{transition:opacity .3s ease-in-out}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button span.working{opacity:0}:host>button.dbx-progress-bar-button.mdc-button.mat-mdc-button .echo-overlay-icon{position:absolute;inset:0;margin:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:1}\n", ":host button.mat-mdc-button .button-text{display:flex;align-items:center}:host button.mat-mdc-button mat-icon.mat-button-icon.mat-icon.mat-ligature-font[fontIcon]:before,:host button.mat-mdc-button mat-icon.mat-fab-icon.mat-icon.mat-ligature-font[fontIcon]:before{content:unset}\n"] }]
|
|
1302
1341
|
}] });
|
|
1303
1342
|
|
|
1304
1343
|
/**
|
|
@@ -1387,11 +1426,11 @@ class DbxProgressSpinnerButtonComponent extends AbstractProgressButtonDirective
|
|
|
1387
1426
|
return hasCustomStyle ? { 'dbx-progress-spinner-custom': true } : undefined;
|
|
1388
1427
|
}, ...(ngDevMode ? [{ debugName: "customSpinnerStyleClassSignal" }] : /* istanbul ignore next */ []));
|
|
1389
1428
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxProgressSpinnerButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1390
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxProgressSpinnerButtonComponent, isStandalone: true, selector: "dbx-progress-spinner-button,dbx-spinner-button", viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["button"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button
|
|
1429
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxProgressSpinnerButtonComponent, isStandalone: true, selector: "dbx-progress-spinner-button,dbx-spinner-button", viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["button"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button class=\"dbx-color-bg dbx-base-button dbx-progress-spinner-button\" #button mat-button [type]=\"buttonTypeAttributeSignal()\" [ngClass]=\"buttonCssSignal()\" [ngStyle]=\"configSignal()?.customStyle\" [disabled]=\"buttonDisabledSignal()\" [attr.aria-label]=\"configSignal()?.ariaLabel\">\n @if (showTextContentSignal()) {\n @if (showTextButtonIconSignal()) {\n <mat-icon class=\"mat-button-icon\" [class.is-mat-icon]=\"!configSignal()?.buttonIcon?.fontSet\" [class.working]=\"hideContentSignal()\" [ngClass]=\"configSignal()?.buttonIcon?.customClass\" [fontSet]=\"configSignal()?.buttonIcon?.fontSet!\" [fontIcon]=\"configSignal()?.buttonIcon?.fontIcon!\" [color]=\"configSignal()?.buttonIcon?.color!\" [svgIcon]=\"configSignal()?.buttonIcon?.svgIcon!\">\n {{ configSignal()?.buttonIcon?.fontSet ? '' : configSignal()?.buttonIcon?.fontIcon }}\n </mat-icon>\n }\n <span class=\"button-text\" [class.working]=\"hideContentSignal()\">\n {{ configSignal()?.text }}\n <ng-content></ng-content>\n </span>\n }\n @if (showIconSignal()) {\n <!-- Use ng-container to prevent mat-icon from being a child of the button which changes the behavior -->\n <ng-container>\n <mat-icon class=\"mat-fab-icon\" [class.working]=\"hideContentSignal()\" [fontSet]=\"configSignal()?.buttonIcon?.fontSet!\" [fontIcon]=\"configSignal()?.buttonIcon?.fontIcon!\" [color]=\"configSignal()?.buttonIcon?.color!\" [svgIcon]=\"configSignal()?.buttonIcon?.svgIcon!\" [inline]=\"configSignal()?.fab && configSignal()?.buttonIcon?.inline!\">\n {{ configSignal()?.buttonIcon?.fontSet! ? '' : configSignal()?.buttonIcon?.fontIcon! }}\n </mat-icon>\n </ng-container>\n }\n @if (showProgressSignal()) {\n <mat-spinner class=\"spinner\" [diameter]=\"spinnerSizeSignal()\" [color]=\"configSignal()?.spinnerColor!\" [mode]=\"modeSignal()\" [value]=\"workingValueSignal()\" [ngStyle]=\"customSpinnerStyleSignal()\" [ngClass]=\"customSpinnerStyleClassSignal()\" [class.working]=\"showProgressSignal()\"></mat-spinner>\n }\n @if (echoActiveSignal()) {\n <span class=\"echo-overlay-icon material-symbols-outlined\">{{ configSignal()?.buttonEcho?.icon }}</span>\n }\n</button>\n", styles: [":host button{min-height:var(--mat-button-text-container-height);height:unset;outline:none}:host button.mat-mdc-unelevated-button{min-height:var(--mat-button-filled-container-height)}:host button.mat-mdc-raised-button{min-height:var(--mat-button-protected-container-height)}:host button.mat-mdc-outlined-button{min-height:var(--mat-button-outlined-container-height)}:host button.mat-mdc-tonal-button{min-height:var(--mat-button-tonal-container-height)}:host button.working{cursor:not-allowed}:host button ::ng-deep .mdc-button__label{display:flex;align-items:center;justify-content:center}:host button.mat-mdc-button.mat-mdc-icon-button{min-width:unset;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:0;--mat-icon-button-icon-size: unset;--mat-text-button-with-icon-horizontal-padding: 0px;--mat-icon-button-state-layer-size: 40px;border-radius:50%}:host button.mat-mdc-button.mat-mdc-icon-button:disabled,:host button.mat-mdc-button.mat-mdc-icon-button.disabled{color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, currentColor 38%, transparent))}:host button.mat-mdc-button.mat-mdc-icon-button .mat-mdc-progress-spinner{--mat-icon-button-icon-size: 40px}:host button.mat-mdc-button.mat-mdc-icon-button.dbx-progress-spinner-fab{height:48px;--mat-icon-button-state-layer-size: 48px}:host button.mat-mdc-button.mat-mdc-icon-button.dbx-progress-spinner-fab .mat-mdc-progress-spinner{--mat-icon-button-icon-size: 48px}:host button.fullWidth{width:100%}:host button .mat-mdc-progress-spinner{position:absolute;opacity:0;transition:opacity .3s ease-in-out}:host button .mat-mdc-progress-spinner.working{opacity:1}:host button .button-text{opacity:1;transition:opacity .3s ease-in-out}:host button .button-text.working{opacity:0}:host button mat-icon.mat-button-icon{padding-right:5px;transition:opacity .3s ease-in-out;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-right:var(--mat-button-protected-icon-spacing, 8px)}:host button mat-icon.mat-button-icon.is-mat-icon{position:relative;left:3px}:host button mat-icon.mat-button-icon.working{opacity:0}:host button .echo-overlay-icon{position:absolute;inset:0;margin:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:1}\n", ":host button.mat-mdc-button .button-text{display:flex;align-items:center}:host button.mat-mdc-button mat-icon.mat-button-icon.mat-icon.mat-ligature-font[fontIcon]:before,:host button.mat-mdc-button mat-icon.mat-fab-icon.mat-icon.mat-ligature-font[fontIcon]:before{content:unset}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1391
1430
|
}
|
|
1392
1431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxProgressSpinnerButtonComponent, decorators: [{
|
|
1393
1432
|
type: Component,
|
|
1394
|
-
args: [{ selector: 'dbx-progress-spinner-button,dbx-spinner-button', imports: [MatButtonModule,
|
|
1433
|
+
args: [{ selector: 'dbx-progress-spinner-button,dbx-spinner-button', imports: [MatButtonModule, MatIconModule, MatProgressSpinner, NgClass, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<button class=\"dbx-color-bg dbx-base-button dbx-progress-spinner-button\" #button mat-button [type]=\"buttonTypeAttributeSignal()\" [ngClass]=\"buttonCssSignal()\" [ngStyle]=\"configSignal()?.customStyle\" [disabled]=\"buttonDisabledSignal()\" [attr.aria-label]=\"configSignal()?.ariaLabel\">\n @if (showTextContentSignal()) {\n @if (showTextButtonIconSignal()) {\n <mat-icon class=\"mat-button-icon\" [class.is-mat-icon]=\"!configSignal()?.buttonIcon?.fontSet\" [class.working]=\"hideContentSignal()\" [ngClass]=\"configSignal()?.buttonIcon?.customClass\" [fontSet]=\"configSignal()?.buttonIcon?.fontSet!\" [fontIcon]=\"configSignal()?.buttonIcon?.fontIcon!\" [color]=\"configSignal()?.buttonIcon?.color!\" [svgIcon]=\"configSignal()?.buttonIcon?.svgIcon!\">\n {{ configSignal()?.buttonIcon?.fontSet ? '' : configSignal()?.buttonIcon?.fontIcon }}\n </mat-icon>\n }\n <span class=\"button-text\" [class.working]=\"hideContentSignal()\">\n {{ configSignal()?.text }}\n <ng-content></ng-content>\n </span>\n }\n @if (showIconSignal()) {\n <!-- Use ng-container to prevent mat-icon from being a child of the button which changes the behavior -->\n <ng-container>\n <mat-icon class=\"mat-fab-icon\" [class.working]=\"hideContentSignal()\" [fontSet]=\"configSignal()?.buttonIcon?.fontSet!\" [fontIcon]=\"configSignal()?.buttonIcon?.fontIcon!\" [color]=\"configSignal()?.buttonIcon?.color!\" [svgIcon]=\"configSignal()?.buttonIcon?.svgIcon!\" [inline]=\"configSignal()?.fab && configSignal()?.buttonIcon?.inline!\">\n {{ configSignal()?.buttonIcon?.fontSet! ? '' : configSignal()?.buttonIcon?.fontIcon! }}\n </mat-icon>\n </ng-container>\n }\n @if (showProgressSignal()) {\n <mat-spinner class=\"spinner\" [diameter]=\"spinnerSizeSignal()\" [color]=\"configSignal()?.spinnerColor!\" [mode]=\"modeSignal()\" [value]=\"workingValueSignal()\" [ngStyle]=\"customSpinnerStyleSignal()\" [ngClass]=\"customSpinnerStyleClassSignal()\" [class.working]=\"showProgressSignal()\"></mat-spinner>\n }\n @if (echoActiveSignal()) {\n <span class=\"echo-overlay-icon material-symbols-outlined\">{{ configSignal()?.buttonEcho?.icon }}</span>\n }\n</button>\n", styles: [":host button{min-height:var(--mat-button-text-container-height);height:unset;outline:none}:host button.mat-mdc-unelevated-button{min-height:var(--mat-button-filled-container-height)}:host button.mat-mdc-raised-button{min-height:var(--mat-button-protected-container-height)}:host button.mat-mdc-outlined-button{min-height:var(--mat-button-outlined-container-height)}:host button.mat-mdc-tonal-button{min-height:var(--mat-button-tonal-container-height)}:host button.working{cursor:not-allowed}:host button ::ng-deep .mdc-button__label{display:flex;align-items:center;justify-content:center}:host button.mat-mdc-button.mat-mdc-icon-button{min-width:unset;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:0;--mat-icon-button-icon-size: unset;--mat-text-button-with-icon-horizontal-padding: 0px;--mat-icon-button-state-layer-size: 40px;border-radius:50%}:host button.mat-mdc-button.mat-mdc-icon-button:disabled,:host button.mat-mdc-button.mat-mdc-icon-button.disabled{color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, currentColor 38%, transparent))}:host button.mat-mdc-button.mat-mdc-icon-button .mat-mdc-progress-spinner{--mat-icon-button-icon-size: 40px}:host button.mat-mdc-button.mat-mdc-icon-button.dbx-progress-spinner-fab{height:48px;--mat-icon-button-state-layer-size: 48px}:host button.mat-mdc-button.mat-mdc-icon-button.dbx-progress-spinner-fab .mat-mdc-progress-spinner{--mat-icon-button-icon-size: 48px}:host button.fullWidth{width:100%}:host button .mat-mdc-progress-spinner{position:absolute;opacity:0;transition:opacity .3s ease-in-out}:host button .mat-mdc-progress-spinner.working{opacity:1}:host button .button-text{opacity:1;transition:opacity .3s ease-in-out}:host button .button-text.working{opacity:0}:host button mat-icon.mat-button-icon{padding-right:5px;transition:opacity .3s ease-in-out;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-right:var(--mat-button-protected-icon-spacing, 8px)}:host button mat-icon.mat-button-icon.is-mat-icon{position:relative;left:3px}:host button mat-icon.mat-button-icon.working{opacity:0}:host button .echo-overlay-icon{position:absolute;inset:0;margin:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:1}\n", ":host button.mat-mdc-button .button-text{display:flex;align-items:center}:host button.mat-mdc-button mat-icon.mat-button-icon.mat-icon.mat-ligature-font[fontIcon]:before,:host button.mat-mdc-button mat-icon.mat-fab-icon.mat-icon.mat-ligature-font[fontIcon]:before{content:unset}\n"] }]
|
|
1395
1434
|
}], propDecorators: { buttonRef: [{ type: i0.ViewChild, args: ['button', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
1396
1435
|
|
|
1397
1436
|
const importsAndExports$r = [DbxProgressSpinnerButtonComponent, DbxProgressBarButtonComponent];
|
|
@@ -1423,7 +1462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1423
1462
|
* bootstrapApplication(AppComponent, {
|
|
1424
1463
|
* providers: [
|
|
1425
1464
|
* provideDbxProgressButtonGlobalConfig([
|
|
1426
|
-
* { id: 'primary-save', buttonType: 'raised',
|
|
1465
|
+
* { id: 'primary-save', buttonType: 'raised', spinnerColor: 'primary' }
|
|
1427
1466
|
* ])
|
|
1428
1467
|
* ]
|
|
1429
1468
|
* });
|
|
@@ -1482,6 +1521,26 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
|
|
|
1482
1521
|
super();
|
|
1483
1522
|
const el = inject((ElementRef));
|
|
1484
1523
|
this._hasProjectedContent = hasNonTrivialChildNodes(el.nativeElement);
|
|
1524
|
+
const dbxColorDirective = inject(DbxColorDirective, { self: true });
|
|
1525
|
+
let originalColor;
|
|
1526
|
+
let overridden = false;
|
|
1527
|
+
// Pushes the button's resolved color (echo > color input > buttonStyle) into the host DbxColorDirective, which
|
|
1528
|
+
// provides the color tokens + `.dbx-color` marker the button paints from. The directive's own value is restored once
|
|
1529
|
+
// the button stops supplying a color (e.g. an echo ends).
|
|
1530
|
+
effect(() => {
|
|
1531
|
+
const color = this.colorSignal();
|
|
1532
|
+
if (color != null) {
|
|
1533
|
+
if (!overridden) {
|
|
1534
|
+
originalColor = untracked(dbxColorDirective.dbxColor);
|
|
1535
|
+
overridden = true;
|
|
1536
|
+
}
|
|
1537
|
+
dbxColorDirective.dbxColor.set(color);
|
|
1538
|
+
}
|
|
1539
|
+
else if (overridden) {
|
|
1540
|
+
dbxColorDirective.dbxColor.set(originalColor);
|
|
1541
|
+
overridden = false;
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1485
1544
|
}
|
|
1486
1545
|
bar = input(false, { ...(ngDevMode ? { debugName: "bar" } : /* istanbul ignore next */ {}), transform: isDefinedAndNotFalse });
|
|
1487
1546
|
type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : /* istanbul ignore next */ []));
|
|
@@ -1504,6 +1563,27 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
|
|
|
1504
1563
|
customContent = input(false, { ...(ngDevMode ? { debugName: "customContent" } : /* istanbul ignore next */ {}), transform: isDefinedAndNotFalse });
|
|
1505
1564
|
allowClickPropagation = input(false, { ...(ngDevMode ? { debugName: "allowClickPropagation" } : /* istanbul ignore next */ {}), transform: isDefinedAndNotFalse });
|
|
1506
1565
|
mode = input(...(ngDevMode ? [undefined, { debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
1566
|
+
/**
|
|
1567
|
+
* The echo currently being displayed, if any. Echoes only display while the button is neither working nor disabled,
|
|
1568
|
+
* mirroring the echo gating in {@link configSignal}.
|
|
1569
|
+
*/
|
|
1570
|
+
_activeEchoSignal = computed(() => {
|
|
1571
|
+
const echo = this.buttonEchoSignal();
|
|
1572
|
+
const working = this.workingSignal();
|
|
1573
|
+
const disabled = !this.isWorkingSignal() && this.disabledSignal();
|
|
1574
|
+
return echo && !working && !disabled ? echo : undefined;
|
|
1575
|
+
}, ...(ngDevMode ? [{ debugName: "_activeEchoSignal" }] : /* istanbul ignore next */ []));
|
|
1576
|
+
/**
|
|
1577
|
+
* Resolved button color from the active echo, the {@link color} input, or {@link buttonStyle} (in that order). Pushed
|
|
1578
|
+
* into the host {@link DbxColorDirective}, which provides the color tokens + `.dbx-color` marker that the button's
|
|
1579
|
+
* `dbx-button.dbx-color .mdc-button` SCSS paints from; an active echo's color temporarily takes over those tokens.
|
|
1580
|
+
*/
|
|
1581
|
+
colorSignal = computed(() => {
|
|
1582
|
+
const color = this.color();
|
|
1583
|
+
const buttonStyle = this.buttonStyle();
|
|
1584
|
+
const echoColor = this._activeEchoSignal()?.color;
|
|
1585
|
+
return echoColor ?? color ?? buttonStyle?.color;
|
|
1586
|
+
}, ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
|
|
1507
1587
|
styleTypeSignal = computed(() => {
|
|
1508
1588
|
const iconOnly = this.iconOnly();
|
|
1509
1589
|
const raised = this.raised();
|
|
@@ -1547,7 +1627,7 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
|
|
|
1547
1627
|
}
|
|
1548
1628
|
const customSpinnerColorValue = this.customSpinnerColor() ?? buttonStyle?.customSpinnerColor;
|
|
1549
1629
|
const customSpinnerColor = customSpinnerColorValue ?? customTextColorValue;
|
|
1550
|
-
const buttonColor = this.
|
|
1630
|
+
const buttonColor = this.colorSignal();
|
|
1551
1631
|
// mat-spinner [color] only accepts ThemePalette/named colors, so coerce a DbxColorConfig or empty-string buttonColor away.
|
|
1552
1632
|
const buttonColorSpinnerFallback = !buttonColor || isDbxColorConfig(buttonColor) ? undefined : buttonColor;
|
|
1553
1633
|
const spinnerColor = this.spinnerColor() ?? buttonStyle?.spinnerColor ?? buttonColorSpinnerFallback;
|
|
@@ -1572,7 +1652,6 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
|
|
|
1572
1652
|
text: textValue ?? '',
|
|
1573
1653
|
hasTextContent,
|
|
1574
1654
|
buttonType: buttonType ?? (isIconOnlyButton ? 'icon' : 'basic'),
|
|
1575
|
-
buttonColor,
|
|
1576
1655
|
barColor: 'accent',
|
|
1577
1656
|
mode,
|
|
1578
1657
|
spinnerColor,
|
|
@@ -1581,11 +1660,8 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
|
|
|
1581
1660
|
ariaLabel
|
|
1582
1661
|
};
|
|
1583
1662
|
// Apply button echo when not working and not disabled
|
|
1584
|
-
const echo = this.
|
|
1585
|
-
if (echo
|
|
1586
|
-
if (echo.color) {
|
|
1587
|
-
config.buttonColor = echo.color;
|
|
1588
|
-
}
|
|
1663
|
+
const echo = this._activeEchoSignal();
|
|
1664
|
+
if (echo) {
|
|
1589
1665
|
if (echo.iconOnly && isIconOnlyButton) {
|
|
1590
1666
|
// Icon-only button: directly swap icon and color
|
|
1591
1667
|
if (echo.icon) {
|
|
@@ -1610,7 +1686,7 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
|
|
|
1610
1686
|
return config;
|
|
1611
1687
|
}, ...(ngDevMode ? [{ debugName: "configSignal" }] : /* istanbul ignore next */ []));
|
|
1612
1688
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1613
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxButtonComponent, isStandalone: true, selector: "dbx-button", inputs: { bar: { classPropertyName: "bar", publicName: "bar", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, buttonStyle: { classPropertyName: "buttonStyle", publicName: "buttonStyle", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, spinnerColor: { classPropertyName: "spinnerColor", publicName: "spinnerColor", isSignal: true, isRequired: false, transformFunction: null }, customButtonColor: { classPropertyName: "customButtonColor", publicName: "customButtonColor", isSignal: true, isRequired: false, transformFunction: null }, customTextColor: { classPropertyName: "customTextColor", publicName: "customTextColor", isSignal: true, isRequired: false, transformFunction: null }, customSpinnerColor: { classPropertyName: "customSpinnerColor", publicName: "customSpinnerColor", isSignal: true, isRequired: false, transformFunction: null }, basic: { classPropertyName: "basic", publicName: "basic", isSignal: true, isRequired: false, transformFunction: null }, tonal: { classPropertyName: "tonal", publicName: "tonal", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, stroked: { classPropertyName: "stroked", publicName: "stroked", isSignal: true, isRequired: false, transformFunction: null }, flat: { classPropertyName: "flat", publicName: "flat", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, fab: { classPropertyName: "fab", publicName: "fab", isSignal: true, isRequired: false, transformFunction: null }, customContent: { classPropertyName: "customContent", publicName: "customContent", isSignal: true, isRequired: false, transformFunction: null }, allowClickPropagation: { classPropertyName: "allowClickPropagation", publicName: "allowClickPropagation", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, providers: provideDbxButton(DbxButtonComponent), usesInheritance: true, ngImport: i0, template: `
|
|
1689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxButtonComponent, isStandalone: true, selector: "dbx-button", inputs: { bar: { classPropertyName: "bar", publicName: "bar", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, buttonStyle: { classPropertyName: "buttonStyle", publicName: "buttonStyle", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, spinnerColor: { classPropertyName: "spinnerColor", publicName: "spinnerColor", isSignal: true, isRequired: false, transformFunction: null }, customButtonColor: { classPropertyName: "customButtonColor", publicName: "customButtonColor", isSignal: true, isRequired: false, transformFunction: null }, customTextColor: { classPropertyName: "customTextColor", publicName: "customTextColor", isSignal: true, isRequired: false, transformFunction: null }, customSpinnerColor: { classPropertyName: "customSpinnerColor", publicName: "customSpinnerColor", isSignal: true, isRequired: false, transformFunction: null }, basic: { classPropertyName: "basic", publicName: "basic", isSignal: true, isRequired: false, transformFunction: null }, tonal: { classPropertyName: "tonal", publicName: "tonal", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, stroked: { classPropertyName: "stroked", publicName: "stroked", isSignal: true, isRequired: false, transformFunction: null }, flat: { classPropertyName: "flat", publicName: "flat", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, fab: { classPropertyName: "fab", publicName: "fab", isSignal: true, isRequired: false, transformFunction: null }, customContent: { classPropertyName: "customContent", publicName: "customContent", isSignal: true, isRequired: false, transformFunction: null }, allowClickPropagation: { classPropertyName: "allowClickPropagation", publicName: "allowClickPropagation", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, providers: provideDbxButton(DbxButtonComponent), usesInheritance: true, hostDirectives: [{ directive: DbxColorDirective }], ngImport: i0, template: `
|
|
1614
1690
|
@if (bar()) {
|
|
1615
1691
|
<dbx-progress-bar-button (btnClick)="clickButton()" [config]="configSignal()" [allowClickPropagation]="allowClickPropagation()">
|
|
1616
1692
|
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
@@ -1647,6 +1723,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1647
1723
|
`,
|
|
1648
1724
|
providers: provideDbxButton(DbxButtonComponent),
|
|
1649
1725
|
imports: [DbxProgressSpinnerButtonComponent, DbxProgressBarButtonComponent, NgTemplateOutlet],
|
|
1726
|
+
hostDirectives: [DbxColorDirective],
|
|
1650
1727
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1651
1728
|
standalone: true
|
|
1652
1729
|
}]
|
|
@@ -6726,7 +6803,10 @@ const DEFAULT_LOADING_PROGRESS_DIAMETER = 96;
|
|
|
6726
6803
|
* Renders a Material progress spinner or progress bar to indicate loading.
|
|
6727
6804
|
*
|
|
6728
6805
|
* Supports both linear (bar) and circular (spinner) modes with configurable
|
|
6729
|
-
* diameter
|
|
6806
|
+
* diameter and optional hint text below the indicator. To color the indicator,
|
|
6807
|
+
* apply `[dbxColor]` directly on the host — its `dbx-loading-progress.dbx-color`
|
|
6808
|
+
* SCSS maps the indicator color to the supplied token. Without `[dbxColor]` the
|
|
6809
|
+
* indicator uses the Material default color.
|
|
6730
6810
|
*
|
|
6731
6811
|
* @dbxWebComponent
|
|
6732
6812
|
* @dbxWebSlug loading-progress
|
|
@@ -6739,7 +6819,7 @@ const DEFAULT_LOADING_PROGRESS_DIAMETER = 96;
|
|
|
6739
6819
|
*
|
|
6740
6820
|
* @example
|
|
6741
6821
|
* ```html
|
|
6742
|
-
* <dbx-loading-progress mode="bar"></dbx-loading-progress>
|
|
6822
|
+
* <dbx-loading-progress mode="bar" dbxColor="accent"></dbx-loading-progress>
|
|
6743
6823
|
* ```
|
|
6744
6824
|
*/
|
|
6745
6825
|
class DbxLoadingProgressComponent {
|
|
@@ -6748,16 +6828,15 @@ class DbxLoadingProgressComponent {
|
|
|
6748
6828
|
text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
6749
6829
|
linear = input(...(ngDevMode ? [undefined, { debugName: "linear" }] : /* istanbul ignore next */ []));
|
|
6750
6830
|
mode = input('indeterminate', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
6751
|
-
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
6752
6831
|
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
6753
6832
|
bufferValue = input(...(ngDevMode ? [undefined, { debugName: "bufferValue" }] : /* istanbul ignore next */ []));
|
|
6754
6833
|
bmodeSignal = computed(() => this.mode(), ...(ngDevMode ? [{ debugName: "bmodeSignal" }] : /* istanbul ignore next */ []));
|
|
6755
6834
|
smodeSignal = computed(() => this.mode(), ...(ngDevMode ? [{ debugName: "smodeSignal" }] : /* istanbul ignore next */ []));
|
|
6756
6835
|
diameterSignal = computed(() => this.diameter() || this.defaultDiameter, ...(ngDevMode ? [{ debugName: "diameterSignal" }] : /* istanbul ignore next */ []));
|
|
6757
6836
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLoadingProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6758
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxLoadingProgressComponent, isStandalone: true, selector: "dbx-loading-progress", inputs: { diameter: { classPropertyName: "diameter", publicName: "diameter", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null },
|
|
6837
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxLoadingProgressComponent, isStandalone: true, selector: "dbx-loading-progress", inputs: { diameter: { classPropertyName: "diameter", publicName: "diameter", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, bufferValue: { classPropertyName: "bufferValue", publicName: "bufferValue", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
6759
6838
|
<div class="loading-progress-view" role="status" [attr.aria-label]="text() || 'Loading'">
|
|
6760
|
-
<span class="loading-progress-view-indicator"
|
|
6839
|
+
<span class="loading-progress-view-indicator">
|
|
6761
6840
|
@switch (linear()) {
|
|
6762
6841
|
@case (true) {
|
|
6763
6842
|
<mat-progress-bar [mode]="bmodeSignal()" [bufferValue]="bufferValue()" [value]="value()" style="margin: auto;"></mat-progress-bar>
|
|
@@ -6771,7 +6850,7 @@ class DbxLoadingProgressComponent {
|
|
|
6771
6850
|
<div class="dbx-loading-progress-hint dbx-hint dbx-small" [ngClass]="{ 'text-center': !linear() }" aria-hidden="true">{{ text() }}</div>
|
|
6772
6851
|
}
|
|
6773
6852
|
</div>
|
|
6774
|
-
`, isInline: true, dependencies: [{ kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }
|
|
6853
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6775
6854
|
}
|
|
6776
6855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLoadingProgressComponent, decorators: [{
|
|
6777
6856
|
type: Component,
|
|
@@ -6779,7 +6858,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
6779
6858
|
selector: 'dbx-loading-progress',
|
|
6780
6859
|
template: `
|
|
6781
6860
|
<div class="loading-progress-view" role="status" [attr.aria-label]="text() || 'Loading'">
|
|
6782
|
-
<span class="loading-progress-view-indicator"
|
|
6861
|
+
<span class="loading-progress-view-indicator">
|
|
6783
6862
|
@switch (linear()) {
|
|
6784
6863
|
@case (true) {
|
|
6785
6864
|
<mat-progress-bar [mode]="bmodeSignal()" [bufferValue]="bufferValue()" [value]="value()" style="margin: auto;"></mat-progress-bar>
|
|
@@ -6794,11 +6873,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
6794
6873
|
}
|
|
6795
6874
|
</div>
|
|
6796
6875
|
`,
|
|
6797
|
-
imports: [MatProgressBar, MatProgressSpinner, NgClass
|
|
6876
|
+
imports: [MatProgressBar, MatProgressSpinner, NgClass],
|
|
6798
6877
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6799
6878
|
standalone: true
|
|
6800
6879
|
}]
|
|
6801
|
-
}], propDecorators: { diameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "diameter", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }],
|
|
6880
|
+
}], propDecorators: { diameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "diameter", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], bufferValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "bufferValue", required: false }] }] } });
|
|
6802
6881
|
|
|
6803
6882
|
/**
|
|
6804
6883
|
* Low-level loading component that renders a spinner or progress bar, error state, and projected content.
|
|
@@ -6817,7 +6896,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
6817
6896
|
*
|
|
6818
6897
|
* @example
|
|
6819
6898
|
* ```html
|
|
6820
|
-
* <dbx-basic-loading [loading]="true"
|
|
6899
|
+
* <dbx-basic-loading [loading]="true" dbxColor="accent" text="Loading data...">
|
|
6821
6900
|
* <p>Content appears here when loading is false.</p>
|
|
6822
6901
|
* </dbx-basic-loading>
|
|
6823
6902
|
* ```
|
|
@@ -6827,7 +6906,6 @@ class DbxBasicLoadingComponent {
|
|
|
6827
6906
|
customLoading = viewChild('customLoading', { ...(ngDevMode ? { debugName: "customLoading" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
6828
6907
|
diameter = input(...(ngDevMode ? [undefined, { debugName: "diameter" }] : /* istanbul ignore next */ []));
|
|
6829
6908
|
mode = input(...(ngDevMode ? [undefined, { debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
6830
|
-
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
6831
6909
|
text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
6832
6910
|
linear = input(false, ...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
|
|
6833
6911
|
show = input(true, ...(ngDevMode ? [{ debugName: "show" }] : /* istanbul ignore next */ []));
|
|
@@ -6880,12 +6958,12 @@ class DbxBasicLoadingComponent {
|
|
|
6880
6958
|
hasNoCustomErrorSignal = computed(() => !checkNgContentWrapperHasContent(this.customError()), ...(ngDevMode ? [{ debugName: "hasNoCustomErrorSignal" }] : /* istanbul ignore next */ []));
|
|
6881
6959
|
hasNoCustomLoadingSignal = computed(() => !checkNgContentWrapperHasContent(this.customLoading()), ...(ngDevMode ? [{ debugName: "hasNoCustomLoadingSignal" }] : /* istanbul ignore next */ []));
|
|
6882
6960
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxBasicLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6883
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxBasicLoadingComponent, isStandalone: true, selector: "dbx-basic-loading", inputs: { diameter: { classPropertyName: "diameter", publicName: "diameter", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null },
|
|
6961
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxBasicLoadingComponent, isStandalone: true, selector: "dbx-basic-loading", inputs: { diameter: { classPropertyName: "diameter", publicName: "diameter", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "customError", first: true, predicate: ["customError"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "customLoading", first: true, predicate: ["customLoading"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@switch (stateSignal()) {\n @case ('none') {\n <!-- Loading -->\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n }\n @case ('loading') {\n <!-- Loading -->\n <div role=\"status\" aria-live=\"polite\" [attr.aria-busy]=\"true\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n </div>\n }\n @case ('content') {\n <!-- Content -->\n <ng-content></ng-content>\n }\n @case ('error') {\n <!-- Error -->\n <div role=\"alert\" aria-live=\"assertive\">\n <ng-container *ngTemplateOutlet=\"errorTemplate\"></ng-container>\n </div>\n }\n}\n\n<ng-template #loadingTemplate>\n @if (hasNoCustomLoadingSignal()) {\n <dbx-loading-progress [mode]=\"modeSignal()\" [value]=\"loadingProgressSignal()\" [text]=\"text()\" [linear]=\"linear()\" [diameter]=\"diameter()\"></dbx-loading-progress>\n }\n <div #customLoading>\n <ng-content select=\"[loading]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #errorTemplate>\n @if (hasNoCustomErrorSignal()) {\n <dbx-error [error]=\"error()\"></dbx-error>\n }\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-content select=\"[errorAction]\"></ng-content>\n</ng-template>\n", dependencies: [{ kind: "component", type: DbxErrorComponent, selector: "dbx-error", inputs: ["error", "iconOnly"], outputs: ["popoverOpened"] }, { kind: "component", type: DbxLoadingProgressComponent, selector: "dbx-loading-progress", inputs: ["diameter", "text", "linear", "mode", "value", "bufferValue"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6884
6962
|
}
|
|
6885
6963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxBasicLoadingComponent, decorators: [{
|
|
6886
6964
|
type: Component,
|
|
6887
|
-
args: [{ selector: 'dbx-basic-loading', imports: [DbxErrorComponent, DbxLoadingProgressComponent, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@switch (stateSignal()) {\n @case ('none') {\n <!-- Loading -->\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n }\n @case ('loading') {\n <!-- Loading -->\n <div role=\"status\" aria-live=\"polite\" [attr.aria-busy]=\"true\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n </div>\n }\n @case ('content') {\n <!-- Content -->\n <ng-content></ng-content>\n }\n @case ('error') {\n <!-- Error -->\n <div role=\"alert\" aria-live=\"assertive\">\n <ng-container *ngTemplateOutlet=\"errorTemplate\"></ng-container>\n </div>\n }\n}\n\n<ng-template #loadingTemplate>\n @if (hasNoCustomLoadingSignal()) {\n <dbx-loading-progress [mode]=\"modeSignal()\" [value]=\"loadingProgressSignal()\" [
|
|
6888
|
-
}], propDecorators: { customError: [{ type: i0.ViewChild, args: ['customError', { ...{ read: ElementRef }, isSignal: true }] }], customLoading: [{ type: i0.ViewChild, args: ['customLoading', { ...{ read: ElementRef }, isSignal: true }] }], diameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "diameter", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }],
|
|
6965
|
+
args: [{ selector: 'dbx-basic-loading', imports: [DbxErrorComponent, DbxLoadingProgressComponent, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@switch (stateSignal()) {\n @case ('none') {\n <!-- Loading -->\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n }\n @case ('loading') {\n <!-- Loading -->\n <div role=\"status\" aria-live=\"polite\" [attr.aria-busy]=\"true\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n </div>\n }\n @case ('content') {\n <!-- Content -->\n <ng-content></ng-content>\n }\n @case ('error') {\n <!-- Error -->\n <div role=\"alert\" aria-live=\"assertive\">\n <ng-container *ngTemplateOutlet=\"errorTemplate\"></ng-container>\n </div>\n }\n}\n\n<ng-template #loadingTemplate>\n @if (hasNoCustomLoadingSignal()) {\n <dbx-loading-progress [mode]=\"modeSignal()\" [value]=\"loadingProgressSignal()\" [text]=\"text()\" [linear]=\"linear()\" [diameter]=\"diameter()\"></dbx-loading-progress>\n }\n <div #customLoading>\n <ng-content select=\"[loading]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #errorTemplate>\n @if (hasNoCustomErrorSignal()) {\n <dbx-error [error]=\"error()\"></dbx-error>\n }\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-content select=\"[errorAction]\"></ng-content>\n</ng-template>\n" }]
|
|
6966
|
+
}], propDecorators: { customError: [{ type: i0.ViewChild, args: ['customError', { ...{ read: ElementRef }, isSignal: true }] }], customLoading: [{ type: i0.ViewChild, args: ['customLoading', { ...{ read: ElementRef }, isSignal: true }] }], diameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "diameter", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], show: [{ type: i0.Input, args: [{ isSignal: true, alias: "show", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }] } });
|
|
6889
6967
|
|
|
6890
6968
|
/**
|
|
6891
6969
|
* Primary loading wrapper that shows a spinner/progress bar while data is being fetched,
|
|
@@ -6920,7 +6998,6 @@ class DbxLoadingComponent {
|
|
|
6920
6998
|
show = input(...(ngDevMode ? [undefined, { debugName: "show" }] : /* istanbul ignore next */ []));
|
|
6921
6999
|
text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
6922
7000
|
mode = input(...(ngDevMode ? [undefined, { debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
6923
|
-
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
6924
7001
|
diameter = input(...(ngDevMode ? [undefined, { debugName: "diameter" }] : /* istanbul ignore next */ []));
|
|
6925
7002
|
linear = input(...(ngDevMode ? [undefined, { debugName: "linear" }] : /* istanbul ignore next */ []));
|
|
6926
7003
|
loading = input(...(ngDevMode ? [undefined, { debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
@@ -6966,8 +7043,8 @@ class DbxLoadingComponent {
|
|
|
6966
7043
|
this._contextOverrideSignal.set(context);
|
|
6967
7044
|
}
|
|
6968
7045
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6969
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxLoadingComponent, isStandalone: true, selector: "dbx-loading", inputs: { padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null },
|
|
6970
|
-
<dbx-basic-loading [show]="show()" [
|
|
7046
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxLoadingComponent, isStandalone: true, selector: "dbx-loading", inputs: { padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, diameter: { classPropertyName: "diameter", publicName: "diameter", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7047
|
+
<dbx-basic-loading [show]="show()" [text]="text()" [mode]="mode()" [linear]="linear()" [diameter]="diameter()" [error]="stateSignal().error" [loading]="stateSignal().loading">
|
|
6971
7048
|
<ng-content loading select="[loading]"></ng-content>
|
|
6972
7049
|
@if (showPaddingSignal()) {
|
|
6973
7050
|
<div class="dbx-loading-linear-done-padding"></div>
|
|
@@ -6976,14 +7053,14 @@ class DbxLoadingComponent {
|
|
|
6976
7053
|
<ng-content error select="[error]"></ng-content>
|
|
6977
7054
|
<ng-content errorAction select="[errorAction]"></ng-content>
|
|
6978
7055
|
</dbx-basic-loading>
|
|
6979
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DbxBasicLoadingComponent, selector: "dbx-basic-loading", inputs: ["diameter", "mode", "
|
|
7056
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxBasicLoadingComponent, selector: "dbx-basic-loading", inputs: ["diameter", "mode", "text", "linear", "show", "loading", "error"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6980
7057
|
}
|
|
6981
7058
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLoadingComponent, decorators: [{
|
|
6982
7059
|
type: Component,
|
|
6983
7060
|
args: [{
|
|
6984
7061
|
selector: 'dbx-loading',
|
|
6985
7062
|
template: `
|
|
6986
|
-
<dbx-basic-loading [show]="show()" [
|
|
7063
|
+
<dbx-basic-loading [show]="show()" [text]="text()" [mode]="mode()" [linear]="linear()" [diameter]="diameter()" [error]="stateSignal().error" [loading]="stateSignal().loading">
|
|
6987
7064
|
<ng-content loading select="[loading]"></ng-content>
|
|
6988
7065
|
@if (showPaddingSignal()) {
|
|
6989
7066
|
<div class="dbx-loading-linear-done-padding"></div>
|
|
@@ -6997,7 +7074,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
6997
7074
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6998
7075
|
standalone: true
|
|
6999
7076
|
}]
|
|
7000
|
-
}], propDecorators: { padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], show: [{ type: i0.Input, args: [{ isSignal: true, alias: "show", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }],
|
|
7077
|
+
}], propDecorators: { padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], show: [{ type: i0.Input, args: [{ isSignal: true, alias: "show", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], diameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "diameter", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }] } });
|
|
7001
7078
|
|
|
7002
7079
|
/**
|
|
7003
7080
|
* Links a {@link DbxLoadingComponent} to a {@link DbxActionContextStoreSourceInstance} by forwarding its loading state.
|
|
@@ -8903,6 +8980,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
8903
8980
|
* Wraps content in a recessed "pit" container with optional scrollable overflow and rounded corners.
|
|
8904
8981
|
* Useful for displaying bounded content areas such as lists or previews with a constrained height.
|
|
8905
8982
|
*
|
|
8983
|
+
* Pits round their corners by default. Pass `[rounded]="false"` to square the pit — this applies the
|
|
8984
|
+
* common `.dbx-corners-none` opt-out utility rather than a pit-specific class.
|
|
8985
|
+
*
|
|
8906
8986
|
* @dbxWebComponent
|
|
8907
8987
|
* @dbxWebSlug content-pit
|
|
8908
8988
|
* @dbxWebCategory layout
|
|
@@ -8919,7 +8999,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
8919
8999
|
*/
|
|
8920
9000
|
class DbxContentPitDirective {
|
|
8921
9001
|
scrollable = input(...(ngDevMode ? [undefined, { debugName: "scrollable" }] : /* istanbul ignore next */ []));
|
|
8922
|
-
rounded = input(
|
|
9002
|
+
rounded = input(true, ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
|
|
8923
9003
|
scrollableHeightSignal = computed(() => {
|
|
8924
9004
|
let scrollable = this.scrollable();
|
|
8925
9005
|
let scrollableHeight;
|
|
@@ -8950,7 +9030,7 @@ class DbxContentPitDirective {
|
|
|
8950
9030
|
return scrollableHeight ?? null;
|
|
8951
9031
|
}, ...(ngDevMode ? [{ debugName: "scrollableHeightSignal" }] : /* istanbul ignore next */ []));
|
|
8952
9032
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8953
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxContentPitDirective, isStandalone: true, selector: "dbx-content-pit, [dbxContentPit]", inputs: { scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-content-pit-scrollable": "scrollableHeightSignal() != null", "class.dbx-
|
|
9033
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxContentPitDirective, isStandalone: true, selector: "dbx-content-pit, [dbxContentPit]", inputs: { scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-content-pit-scrollable": "scrollableHeightSignal() != null", "class.dbx-corners-none": "!rounded()", "style.max-height": "scrollableHeightSignal()" }, classAttribute: "d-block dbx-content-pit" }, ngImport: i0 });
|
|
8954
9034
|
}
|
|
8955
9035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPitDirective, decorators: [{
|
|
8956
9036
|
type: Directive,
|
|
@@ -8959,7 +9039,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
8959
9039
|
host: {
|
|
8960
9040
|
class: 'd-block dbx-content-pit',
|
|
8961
9041
|
'[class.dbx-content-pit-scrollable]': 'scrollableHeightSignal() != null',
|
|
8962
|
-
'[class.dbx-
|
|
9042
|
+
'[class.dbx-corners-none]': '!rounded()',
|
|
8963
9043
|
'[style.max-height]': 'scrollableHeightSignal()'
|
|
8964
9044
|
},
|
|
8965
9045
|
standalone: true
|
|
@@ -9028,7 +9108,7 @@ class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective {
|
|
|
9028
9108
|
this.expandPreview.update((value) => !value);
|
|
9029
9109
|
}
|
|
9030
9110
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxDownloadTextViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9031
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxDownloadTextViewComponent, isStandalone: true, selector: "dbx-download-text-view", inputs: { showDownloadButton: { classPropertyName: "showDownloadButton", publicName: "showDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, showTitle: { classPropertyName: "showTitle", publicName: "showTitle", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null }, showExpandPreviewButton: { classPropertyName: "showExpandPreviewButton", publicName: "showExpandPreviewButton", isSignal: true, isRequired: false, transformFunction: null }, expandPreview: { classPropertyName: "expandPreview", publicName: "expandPreview", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentState: { classPropertyName: "contentState", publicName: "contentState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandPreview: "expandPreviewChange" }, viewQueries: [{ propertyName: "downloadButton", first: true, predicate: ["downloadButton"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-download-text-view\">\n <dbx-loading [context]=\"context\" [linear]=\"linear()\" [text]=\"loadingText()\">\n <ng-container *ngTemplateOutlet=\"contentView\"></ng-container>\n </dbx-loading>\n</div>\n\n<!-- Template -->\n<ng-template #contentView>\n <div class=\"dbx-download-text-view-content\">\n @if (showTitle()) {\n <div class=\"dbx-download-text-view-content-title dbx-mb2 mat-subtitle-2\">{{ fileNameSignal() }}</div>\n }\n @if (showPreview()) {\n <dbx-content-pit [scrollable]=\"!expandPreview()\" class=\"dbx-download-text-preview dbx-json dbx-mb3\">\n @if (showExpandPreviewButton()) {\n <dbx-button class=\"dbx-content-pit-floating-button\" [raised]=\"true\" [icon]=\"expandPreview() ? 'unfold_less' : 'unfold_more'\" (buttonClick)=\"toggleExpandPreview()\"></dbx-button>\n }\n {{ contentDataSignal() }}\n </dbx-content-pit>\n }\n <div class=\"dbx-download-text-view-actions\">\n <dbx-button dbxAction dbxActionValue [raised]=\"true\" [dbxActionHandler]=\"handleCopyToClipboard\" icon=\"content_copy\" dbxActionButton text=\"Copy To Clipboard\"></dbx-button>\n @if (showDownloadButton()) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "
|
|
9111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxDownloadTextViewComponent, isStandalone: true, selector: "dbx-download-text-view", inputs: { showDownloadButton: { classPropertyName: "showDownloadButton", publicName: "showDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, showTitle: { classPropertyName: "showTitle", publicName: "showTitle", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null }, showExpandPreviewButton: { classPropertyName: "showExpandPreviewButton", publicName: "showExpandPreviewButton", isSignal: true, isRequired: false, transformFunction: null }, expandPreview: { classPropertyName: "expandPreview", publicName: "expandPreview", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentState: { classPropertyName: "contentState", publicName: "contentState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandPreview: "expandPreviewChange" }, viewQueries: [{ propertyName: "downloadButton", first: true, predicate: ["downloadButton"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-download-text-view\">\n <dbx-loading [context]=\"context\" [linear]=\"linear()\" [text]=\"loadingText()\">\n <ng-container *ngTemplateOutlet=\"contentView\"></ng-container>\n </dbx-loading>\n</div>\n\n<!-- Template -->\n<ng-template #contentView>\n <div class=\"dbx-download-text-view-content\">\n @if (showTitle()) {\n <div class=\"dbx-download-text-view-content-title dbx-mb2 mat-subtitle-2\">{{ fileNameSignal() }}</div>\n }\n @if (showPreview()) {\n <dbx-content-pit [scrollable]=\"!expandPreview()\" class=\"dbx-download-text-preview dbx-json dbx-mb3\">\n @if (showExpandPreviewButton()) {\n <dbx-button class=\"dbx-content-pit-floating-button\" [raised]=\"true\" [icon]=\"expandPreview() ? 'unfold_less' : 'unfold_more'\" (buttonClick)=\"toggleExpandPreview()\"></dbx-button>\n }\n {{ contentDataSignal() }}\n </dbx-content-pit>\n }\n <div class=\"dbx-download-text-view-actions\">\n <dbx-button dbxAction dbxActionValue [raised]=\"true\" [dbxActionHandler]=\"handleCopyToClipboard\" icon=\"content_copy\" dbxActionButton text=\"Copy To Clipboard\"></dbx-button>\n @if (showDownloadButton()) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "diameter", "linear", "loading", "error", "context"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i1$2.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$2.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i1$2.DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "customContent", "allowClickPropagation", "mode"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "directive", type: DbxContentPitDirective, selector: "dbx-content-pit, [dbxContentPit]", inputs: ["scrollable", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9032
9112
|
}
|
|
9033
9113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxDownloadTextViewComponent, decorators: [{
|
|
9034
9114
|
type: Component,
|
|
@@ -9619,7 +9699,7 @@ class DbxAvatarViewComponent {
|
|
|
9619
9699
|
<mat-icon>{{ avatarIconSignal() }}</mat-icon>
|
|
9620
9700
|
</div>
|
|
9621
9701
|
}
|
|
9622
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9702
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9623
9703
|
}
|
|
9624
9704
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxAvatarViewComponent, decorators: [{
|
|
9625
9705
|
type: Component,
|
|
@@ -9851,7 +9931,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9851
9931
|
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], avatarSelector: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarSelector", required: false }] }], avatarUid: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarUid", required: false }] }], avatarUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarUrl", required: false }] }], avatarName: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarName", required: false }] }], avatarKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarKey", required: false }] }], avatarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarIcon", required: false }] }], avatarStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarStyle", required: false }] }], avatarSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarSize", required: false }] }], avatarHideOnError: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarHideOnError", required: false }] }] } });
|
|
9852
9932
|
|
|
9853
9933
|
/**
|
|
9854
|
-
* Renders a horizontal bar
|
|
9934
|
+
* Renders a horizontal bar used to visually group or separate content.
|
|
9935
|
+
*
|
|
9936
|
+
* To give the bar a themed background apply `[dbxColor]` (optionally with `[dbxColorTone]`) directly on the host —
|
|
9937
|
+
* the bar paints itself from the supplied color tokens via its `.dbx-bar.dbx-color` SCSS. The directive itself only
|
|
9938
|
+
* applies the `.dbx-bar` layout class.
|
|
9855
9939
|
*
|
|
9856
9940
|
* @dbxWebComponent
|
|
9857
9941
|
* @dbxWebSlug bar
|
|
@@ -9864,51 +9948,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9864
9948
|
*
|
|
9865
9949
|
* @example
|
|
9866
9950
|
* ```html
|
|
9867
|
-
* <dbx-bar>
|
|
9868
|
-
* <dbx-button text="Save" raised
|
|
9951
|
+
* <dbx-bar dbxColor="primary">
|
|
9952
|
+
* <dbx-button text="Save" raised></dbx-button>
|
|
9869
9953
|
* <dbx-button-spacer></dbx-button-spacer>
|
|
9870
9954
|
* <dbx-button text="Cancel" stroked></dbx-button>
|
|
9871
9955
|
* </dbx-bar>
|
|
9872
9956
|
* ```
|
|
9873
9957
|
*/
|
|
9874
9958
|
class DbxBarDirective {
|
|
9875
|
-
_colorService = inject(DbxColorService, { optional: true });
|
|
9876
|
-
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
9877
|
-
cssClassSignal = computed(() => {
|
|
9878
|
-
const color = this.color();
|
|
9879
|
-
return color ? dbxColorBackground(color) : '';
|
|
9880
|
-
}, ...(ngDevMode ? [{ debugName: "cssClassSignal" }] : /* istanbul ignore next */ []));
|
|
9881
|
-
_configSignal = computed(() => {
|
|
9882
|
-
const value = this.color();
|
|
9883
|
-
return isDbxColorConfig(value) ? (this._colorService?.expandColorConfig(value) ?? value) : undefined;
|
|
9884
|
-
}, ...(ngDevMode ? [{ debugName: "_configSignal" }] : /* istanbul ignore next */ []));
|
|
9885
|
-
/**
|
|
9886
|
-
* Inline `--dbx-bg-color-current` value applied when a {@link DbxColorConfig} is bound. Resolves to `null` for named-color strings.
|
|
9887
|
-
*/
|
|
9888
|
-
bgColorStyleSignal = computed(() => this._configSignal()?.color ?? null, ...(ngDevMode ? [{ debugName: "bgColorStyleSignal" }] : /* istanbul ignore next */ []));
|
|
9889
|
-
/**
|
|
9890
|
-
* Inline `--dbx-color-current` value applied when a {@link DbxColorConfig} is bound. Resolves to `null` for named-color strings.
|
|
9891
|
-
*/
|
|
9892
|
-
colorStyleSignal = computed(() => this._configSignal()?.contrast ?? null, ...(ngDevMode ? [{ debugName: "colorStyleSignal" }] : /* istanbul ignore next */ []));
|
|
9893
9959
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxBarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9894
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
9960
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: DbxBarDirective, isStandalone: true, selector: "dbx-bar,[dbxBar]", host: { classAttribute: "dbx-bar" }, ngImport: i0 });
|
|
9895
9961
|
}
|
|
9896
9962
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxBarDirective, decorators: [{
|
|
9897
9963
|
type: Directive,
|
|
9898
9964
|
args: [{
|
|
9899
9965
|
selector: 'dbx-bar,[dbxBar]',
|
|
9900
9966
|
host: {
|
|
9901
|
-
class: 'dbx-bar'
|
|
9902
|
-
'[class]': 'cssClassSignal()',
|
|
9903
|
-
'[style.--dbx-bg-color-current]': 'bgColorStyleSignal()',
|
|
9904
|
-
'[style.--dbx-color-current]': 'colorStyleSignal()'
|
|
9967
|
+
class: 'dbx-bar'
|
|
9905
9968
|
},
|
|
9906
9969
|
standalone: true
|
|
9907
9970
|
}]
|
|
9908
|
-
}]
|
|
9971
|
+
}] });
|
|
9909
9972
|
|
|
9910
9973
|
/**
|
|
9911
|
-
* A
|
|
9974
|
+
* A header bar displaying an optional icon and text label, useful as a section divider.
|
|
9975
|
+
*
|
|
9976
|
+
* To give it a themed background apply `[dbxColor]` directly on the host — the inner `<dbx-bar>` paints from the
|
|
9977
|
+
* inherited tokens via the `dbx-bar-header.dbx-color .dbx-bar` SCSS.
|
|
9912
9978
|
*
|
|
9913
9979
|
* @dbxWebComponent
|
|
9914
9980
|
* @dbxWebSlug bar-header
|
|
@@ -9921,7 +9987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9921
9987
|
*
|
|
9922
9988
|
* @example
|
|
9923
9989
|
* ```html
|
|
9924
|
-
* <dbx-bar-header header="Members" icon="group">
|
|
9990
|
+
* <dbx-bar-header header="Members" icon="group" dbxColor="primary">
|
|
9925
9991
|
* <button mat-icon-button><mat-icon>add</mat-icon></button>
|
|
9926
9992
|
* </dbx-bar-header>
|
|
9927
9993
|
* ```
|
|
@@ -9929,10 +9995,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9929
9995
|
class DbxBarHeaderComponent {
|
|
9930
9996
|
text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
9931
9997
|
icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
9932
|
-
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
9933
9998
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxBarHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9934
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxBarHeaderComponent, isStandalone: true, selector: "dbx-bar-header", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }
|
|
9935
|
-
<dbx-bar
|
|
9999
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxBarHeaderComponent, isStandalone: true, selector: "dbx-bar-header", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-bar-header dbx-hint" }, ngImport: i0, template: `
|
|
10000
|
+
<dbx-bar>
|
|
9936
10001
|
@if (icon()) {
|
|
9937
10002
|
<mat-icon class="button-spacer">{{ icon() }}</mat-icon>
|
|
9938
10003
|
}
|
|
@@ -9941,14 +10006,14 @@ class DbxBarHeaderComponent {
|
|
|
9941
10006
|
}
|
|
9942
10007
|
<ng-content></ng-content>
|
|
9943
10008
|
</dbx-bar>
|
|
9944
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: DbxBarDirective, selector: "dbx-bar,[dbxBar]"
|
|
10009
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: DbxBarDirective, selector: "dbx-bar,[dbxBar]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9945
10010
|
}
|
|
9946
10011
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxBarHeaderComponent, decorators: [{
|
|
9947
10012
|
type: Component,
|
|
9948
10013
|
args: [{
|
|
9949
10014
|
selector: 'dbx-bar-header',
|
|
9950
10015
|
template: `
|
|
9951
|
-
<dbx-bar
|
|
10016
|
+
<dbx-bar>
|
|
9952
10017
|
@if (icon()) {
|
|
9953
10018
|
<mat-icon class="button-spacer">{{ icon() }}</mat-icon>
|
|
9954
10019
|
}
|
|
@@ -9965,11 +10030,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9965
10030
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9966
10031
|
standalone: true
|
|
9967
10032
|
}]
|
|
9968
|
-
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }]
|
|
10033
|
+
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }] } });
|
|
9969
10034
|
|
|
9970
10035
|
/**
|
|
9971
10036
|
* A page-level toolbar with left and right content slots, built on Angular Material's mat-toolbar.
|
|
9972
10037
|
*
|
|
10038
|
+
* To give it a themed background apply `[dbxColor]` directly on the host — the inner `mat-toolbar` maps its
|
|
10039
|
+
* `--mat-toolbar-*` colors to the inherited tokens via the `dbx-pagebar.dbx-color mat-toolbar` SCSS.
|
|
10040
|
+
*
|
|
9973
10041
|
* @dbxWebComponent
|
|
9974
10042
|
* @dbxWebSlug pagebar
|
|
9975
10043
|
* @dbxWebCategory layout
|
|
@@ -9981,7 +10049,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9981
10049
|
*
|
|
9982
10050
|
* @example
|
|
9983
10051
|
* ```html
|
|
9984
|
-
* <dbx-pagebar>
|
|
10052
|
+
* <dbx-pagebar dbxColor="primary">
|
|
9985
10053
|
* <h2>Settings</h2>
|
|
9986
10054
|
* <span class="spacer"></span>
|
|
9987
10055
|
* <button mat-stroked-button>Save</button>
|
|
@@ -9989,36 +10057,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9989
10057
|
* ```
|
|
9990
10058
|
*/
|
|
9991
10059
|
class DbxPagebarComponent {
|
|
9992
|
-
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
9993
|
-
cssClassSignal = computed(() => {
|
|
9994
|
-
const color = this.color();
|
|
9995
|
-
return color ? `dbx-bar-${color}` : '';
|
|
9996
|
-
}, ...(ngDevMode ? [{ debugName: "cssClassSignal" }] : /* istanbul ignore next */ []));
|
|
9997
10060
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxPagebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9998
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
9999
|
-
<mat-toolbar class="dbx-pagebar dbx-flex-bar"
|
|
10061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: DbxPagebarComponent, isStandalone: true, selector: "dbx-pagebar", ngImport: i0, template: `
|
|
10062
|
+
<mat-toolbar class="dbx-pagebar dbx-flex-bar">
|
|
10000
10063
|
<ng-content select="[left]"></ng-content>
|
|
10001
10064
|
<span class="spacer"></span>
|
|
10002
10065
|
<ng-content select="[right]"></ng-content>
|
|
10003
10066
|
</mat-toolbar>
|
|
10004
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
10067
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i1$3.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10005
10068
|
}
|
|
10006
10069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxPagebarComponent, decorators: [{
|
|
10007
10070
|
type: Component,
|
|
10008
10071
|
args: [{
|
|
10009
10072
|
selector: 'dbx-pagebar',
|
|
10010
10073
|
template: `
|
|
10011
|
-
<mat-toolbar class="dbx-pagebar dbx-flex-bar"
|
|
10074
|
+
<mat-toolbar class="dbx-pagebar dbx-flex-bar">
|
|
10012
10075
|
<ng-content select="[left]"></ng-content>
|
|
10013
10076
|
<span class="spacer"></span>
|
|
10014
10077
|
<ng-content select="[right]"></ng-content>
|
|
10015
10078
|
</mat-toolbar>
|
|
10016
10079
|
`,
|
|
10017
|
-
imports: [
|
|
10080
|
+
imports: [MatToolbarModule],
|
|
10018
10081
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10019
10082
|
standalone: true
|
|
10020
10083
|
}]
|
|
10021
|
-
}]
|
|
10084
|
+
}] });
|
|
10022
10085
|
|
|
10023
10086
|
const importsAndExports$d = [DbxBarDirective, DbxBarHeaderComponent, DbxPagebarComponent];
|
|
10024
10087
|
/**
|
|
@@ -11281,7 +11344,6 @@ function resolveSideNavDisplayMode(mode, allowedModes) {
|
|
|
11281
11344
|
class DbxSidenavComponent extends AbstractTransitionWatcherDirective {
|
|
11282
11345
|
_sidenavSub = cleanSubscription();
|
|
11283
11346
|
_screenMediaService = inject(DbxScreenMediaService);
|
|
11284
|
-
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
11285
11347
|
position = input('start', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
11286
11348
|
/**
|
|
11287
11349
|
* Overrides the responsive display mode. When set, the sidenav ignores screen-width breakpoints and uses this mode instead.
|
|
@@ -11405,9 +11467,9 @@ class DbxSidenavComponent extends AbstractTransitionWatcherDirective {
|
|
|
11405
11467
|
}
|
|
11406
11468
|
}
|
|
11407
11469
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxSidenavComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11408
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.11", type: DbxSidenavComponent, isStandalone: true, selector: "dbx-sidenav", inputs: {
|
|
11470
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.11", type: DbxSidenavComponent, isStandalone: true, selector: "dbx-sidenav", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, allowedModes: { classPropertyName: "allowedModes", publicName: "allowedModes", isSignal: true, isRequired: false, transformFunction: null }, anchors: { classPropertyName: "anchors", publicName: "anchors", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: MatSidenav, descendants: true, isSignal: true }], exportAs: ["sidenav"], usesInheritance: true, ngImport: i0, template: `
|
|
11409
11471
|
<mat-sidenav-container class="dbx-sidenav" [ngClass]="cssClassesSignal()">
|
|
11410
|
-
<mat-sidenav [
|
|
11472
|
+
<mat-sidenav [position]="position()" [disableClose]="disableBackdropSignal()" [mode]="drawerSignal()">
|
|
11411
11473
|
<ng-content select="[top]"></ng-content>
|
|
11412
11474
|
<dbx-anchor-list class="dbx-sidenav-anchor-list" [anchors]="anchors()"></dbx-anchor-list>
|
|
11413
11475
|
<span class="spacer"></span>
|
|
@@ -11418,7 +11480,7 @@ class DbxSidenavComponent extends AbstractTransitionWatcherDirective {
|
|
|
11418
11480
|
<ng-content></ng-content>
|
|
11419
11481
|
</mat-sidenav-content>
|
|
11420
11482
|
</mat-sidenav-container>
|
|
11421
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "
|
|
11483
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1$4.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1$4.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1$4.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: DbxRouterAnchorModule }, { kind: "component", type: DbxAnchorListComponent, selector: "dbx-anchor-list", inputs: ["anchors"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11422
11484
|
}
|
|
11423
11485
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxSidenavComponent, decorators: [{
|
|
11424
11486
|
type: Component,
|
|
@@ -11427,7 +11489,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11427
11489
|
exportAs: 'sidenav',
|
|
11428
11490
|
template: `
|
|
11429
11491
|
<mat-sidenav-container class="dbx-sidenav" [ngClass]="cssClassesSignal()">
|
|
11430
|
-
<mat-sidenav [
|
|
11492
|
+
<mat-sidenav [position]="position()" [disableClose]="disableBackdropSignal()" [mode]="drawerSignal()">
|
|
11431
11493
|
<ng-content select="[top]"></ng-content>
|
|
11432
11494
|
<dbx-anchor-list class="dbx-sidenav-anchor-list" [anchors]="anchors()"></dbx-anchor-list>
|
|
11433
11495
|
<span class="spacer"></span>
|
|
@@ -11439,11 +11501,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11439
11501
|
</mat-sidenav-content>
|
|
11440
11502
|
</mat-sidenav-container>
|
|
11441
11503
|
`,
|
|
11442
|
-
imports: [NgClass,
|
|
11504
|
+
imports: [NgClass, MatSidenavModule, DbxRouterAnchorModule, DbxAnchorListComponent],
|
|
11443
11505
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11444
11506
|
standalone: true
|
|
11445
11507
|
}]
|
|
11446
|
-
}], propDecorators: {
|
|
11508
|
+
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], sidenav: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSidenav), { isSignal: true }] }], allowedModes: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedModes", required: false }] }], anchors: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchors", required: false }] }] } });
|
|
11447
11509
|
|
|
11448
11510
|
/**
|
|
11449
11511
|
* Default icon displayed on the sidenav toggle button.
|
|
@@ -11499,7 +11561,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11499
11561
|
*
|
|
11500
11562
|
* @example
|
|
11501
11563
|
* ```html
|
|
11502
|
-
* <dbx-sidenav-pagebar sidenavMenuIcon="menu"
|
|
11564
|
+
* <dbx-sidenav-pagebar sidenavMenuIcon="menu" dbxColor="primary">
|
|
11503
11565
|
* <span left>Left Content</span>
|
|
11504
11566
|
* <span>Right Content</span>
|
|
11505
11567
|
* </dbx-sidenav-pagebar>
|
|
@@ -11509,7 +11571,7 @@ class DbxSidenavPagebarComponent extends DbxPagebarComponent {
|
|
|
11509
11571
|
sidenavMenuIcon = input(...(ngDevMode ? [undefined, { debugName: "sidenavMenuIcon" }] : /* istanbul ignore next */ []));
|
|
11510
11572
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxSidenavPagebarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11511
11573
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxSidenavPagebarComponent, isStandalone: true, selector: "dbx-sidenav-pagebar", inputs: { sidenavMenuIcon: { classPropertyName: "sidenavMenuIcon", publicName: "sidenavMenuIcon", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
11512
|
-
<dbx-pagebar class="dbx-sidenav-pagebar"
|
|
11574
|
+
<dbx-pagebar class="dbx-sidenav-pagebar">
|
|
11513
11575
|
<span left>
|
|
11514
11576
|
<dbx-sidenav-button [sidenavMenuIcon]="sidenavMenuIcon()"></dbx-sidenav-button>
|
|
11515
11577
|
<dbx-button-spacer></dbx-button-spacer>
|
|
@@ -11517,14 +11579,14 @@ class DbxSidenavPagebarComponent extends DbxPagebarComponent {
|
|
|
11517
11579
|
</span>
|
|
11518
11580
|
<ng-content right></ng-content>
|
|
11519
11581
|
</dbx-pagebar>
|
|
11520
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DbxPagebarComponent, selector: "dbx-pagebar"
|
|
11582
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxPagebarComponent, selector: "dbx-pagebar" }, { kind: "component", type: DbxSidenavButtonComponent, selector: "dbx-sidenav-button", inputs: ["sidenavMenuIcon"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11521
11583
|
}
|
|
11522
11584
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxSidenavPagebarComponent, decorators: [{
|
|
11523
11585
|
type: Component,
|
|
11524
11586
|
args: [{
|
|
11525
11587
|
selector: 'dbx-sidenav-pagebar',
|
|
11526
11588
|
template: `
|
|
11527
|
-
<dbx-pagebar class="dbx-sidenav-pagebar"
|
|
11589
|
+
<dbx-pagebar class="dbx-sidenav-pagebar">
|
|
11528
11590
|
<span left>
|
|
11529
11591
|
<dbx-sidenav-button [sidenavMenuIcon]="sidenavMenuIcon()"></dbx-sidenav-button>
|
|
11530
11592
|
<dbx-button-spacer></dbx-button-spacer>
|
|
@@ -11562,15 +11624,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11562
11624
|
*/
|
|
11563
11625
|
class DbxSidenavPageComponent {
|
|
11564
11626
|
parent = inject(DbxSidenavComponent);
|
|
11565
|
-
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
11566
11627
|
sidenavMenuIcon = input(...(ngDevMode ? [undefined, { debugName: "sidenavMenuIcon" }] : /* istanbul ignore next */ []));
|
|
11567
11628
|
mobileOnly = input(false, ...(ngDevMode ? [{ debugName: "mobileOnly" }] : /* istanbul ignore next */ []));
|
|
11568
11629
|
mobileOnly$ = toObservable(this.mobileOnly);
|
|
11569
11630
|
hidePagebar$ = this.mobileOnly$.pipe(switchMap((mobileOnly) => (mobileOnly ? this.parent.mode$.pipe(map((x) => x !== SideNavDisplayMode.MOBILE)) : of(false))), shareReplay(1));
|
|
11570
11631
|
hidePagebarSignal = toSignal(this.hidePagebar$, { initialValue: false });
|
|
11571
11632
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxSidenavPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11572
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxSidenavPageComponent, isStandalone: true, selector: "dbx-sidenav-page", inputs: {
|
|
11573
|
-
<dbx-sidenav-pagebar [sidenavMenuIcon]="sidenavMenuIcon()"
|
|
11633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxSidenavPageComponent, isStandalone: true, selector: "dbx-sidenav-page", inputs: { sidenavMenuIcon: { classPropertyName: "sidenavMenuIcon", publicName: "sidenavMenuIcon", isSignal: true, isRequired: false, transformFunction: null }, mobileOnly: { classPropertyName: "mobileOnly", publicName: "mobileOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-pagebar-hide": "hidePagebarSignal()" }, classAttribute: "d-block" }, ngImport: i0, template: `
|
|
11634
|
+
<dbx-sidenav-pagebar [sidenavMenuIcon]="sidenavMenuIcon()">
|
|
11574
11635
|
<ng-content left select="[navLeft]"></ng-content>
|
|
11575
11636
|
<ng-content select="[navRight]"></ng-content>
|
|
11576
11637
|
</dbx-sidenav-pagebar>
|
|
@@ -11584,7 +11645,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11584
11645
|
args: [{
|
|
11585
11646
|
selector: 'dbx-sidenav-page',
|
|
11586
11647
|
template: `
|
|
11587
|
-
<dbx-sidenav-pagebar [sidenavMenuIcon]="sidenavMenuIcon()"
|
|
11648
|
+
<dbx-sidenav-pagebar [sidenavMenuIcon]="sidenavMenuIcon()">
|
|
11588
11649
|
<ng-content left select="[navLeft]"></ng-content>
|
|
11589
11650
|
<ng-content select="[navRight]"></ng-content>
|
|
11590
11651
|
</dbx-sidenav-pagebar>
|
|
@@ -11600,7 +11661,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11600
11661
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11601
11662
|
standalone: true
|
|
11602
11663
|
}]
|
|
11603
|
-
}], propDecorators: {
|
|
11664
|
+
}], propDecorators: { sidenavMenuIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavMenuIcon", required: false }] }], mobileOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileOnly", required: false }] }] } });
|
|
11604
11665
|
|
|
11605
11666
|
/**
|
|
11606
11667
|
* Structural directive that conditionally renders its host element based on the current {@link SideNavDisplayMode} of the parent {@link DbxSidenavComponent}.
|
|
@@ -14092,7 +14153,7 @@ class DbxListComponent {
|
|
|
14092
14153
|
}
|
|
14093
14154
|
}
|
|
14094
14155
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14095
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxListComponent, isStandalone: true, selector: "dbx-list", inputs: { padded: { classPropertyName: "padded", publicName: "padded", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, hasMore: { classPropertyName: "hasMore", publicName: "hasMore", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contentScrolled: "contentScrolled" }, host: { attributes: { "role": "list" }, properties: { "class.dbx-list-padded": "padded()" }, classAttribute: "d-block dbx-list" }, ngImport: i0, template: "<dbx-loading [context]=\"context\" [linear]=\"true\"></dbx-loading>\n<div dbxListInternalContent [hide]=\"hideContentSignal()\" infinite-scroll [infiniteScrollDistance]=\"infiniteScrollDistanceSignal()\" [infiniteScrollUpDistance]=\"infiniteScrollDistanceSignal()\" [infiniteScrollThrottle]=\"infiniteScrollThrottleSignal()\" [scrollWindow]=\"false\" (scrolled)=\"onScrollDown()\" (scrolledUp)=\"onScrollUp()\">\n <ng-content select=\"[top]\"></ng-content>\n <dbx-injection [config]=\"injectedComponentConfigSignal()\"></dbx-injection>\n <ng-content select=\"[bottom]\"></ng-content>\n @if (isEndSignal()) {\n <ng-content select=\"[end]\"></ng-content>\n }\n</div>\n@if (isEmptyAndNotLoadingSignal()) {\n <ng-content select=\"[empty]\"></ng-content>\n}\n@if (isEmptyLoadingSignal()) {\n <ng-content select=\"[emptyLoading]\"></ng-content>\n}\n", dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: DbxListInternalContentDirective, selector: "[dbxListInternalContent]", inputs: ["hide"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "
|
|
14156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxListComponent, isStandalone: true, selector: "dbx-list", inputs: { padded: { classPropertyName: "padded", publicName: "padded", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, hasMore: { classPropertyName: "hasMore", publicName: "hasMore", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contentScrolled: "contentScrolled" }, host: { attributes: { "role": "list" }, properties: { "class.dbx-list-padded": "padded()" }, classAttribute: "d-block dbx-list" }, ngImport: i0, template: "<dbx-loading [context]=\"context\" [linear]=\"true\"></dbx-loading>\n<div dbxListInternalContent [hide]=\"hideContentSignal()\" infinite-scroll [infiniteScrollDistance]=\"infiniteScrollDistanceSignal()\" [infiniteScrollUpDistance]=\"infiniteScrollDistanceSignal()\" [infiniteScrollThrottle]=\"infiniteScrollThrottleSignal()\" [scrollWindow]=\"false\" (scrolled)=\"onScrollDown()\" (scrolledUp)=\"onScrollUp()\">\n <ng-content select=\"[top]\"></ng-content>\n <dbx-injection [config]=\"injectedComponentConfigSignal()\"></dbx-injection>\n <ng-content select=\"[bottom]\"></ng-content>\n @if (isEndSignal()) {\n <ng-content select=\"[end]\"></ng-content>\n }\n</div>\n@if (isEmptyAndNotLoadingSignal()) {\n <ng-content select=\"[empty]\"></ng-content>\n}\n@if (isEmptyLoadingSignal()) {\n <ng-content select=\"[emptyLoading]\"></ng-content>\n}\n", dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: DbxListInternalContentDirective, selector: "[dbxListInternalContent]", inputs: ["hide"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "diameter", "linear", "loading", "error", "context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14096
14157
|
}
|
|
14097
14158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxListComponent, decorators: [{
|
|
14098
14159
|
type: Component,
|
|
@@ -14701,9 +14762,21 @@ class DbxStyleService {
|
|
|
14701
14762
|
_defaultConfig = new BehaviorSubject(inject(DEFAULT_DBX_STYLE_CONFIG_TOKEN));
|
|
14702
14763
|
_config = new BehaviorSubject(undefined);
|
|
14703
14764
|
_styleClassSuffix = new BehaviorSubject(undefined);
|
|
14765
|
+
_supplement = new BehaviorSubject(undefined);
|
|
14704
14766
|
config$ = this._config.pipe(switchMap((x) => x ?? this._defaultConfig), filterMaybe(), distinctUntilChanged(), shareReplay(1));
|
|
14705
14767
|
styleClassSuffix$ = this._styleClassSuffix.pipe(distinctUntilChanged(), shareReplay(1));
|
|
14706
14768
|
styleClassName$ = this.getStyleClassWithConfig(this.config$);
|
|
14769
|
+
/**
|
|
14770
|
+
* The currently active style supplement, or undefined when none is set.
|
|
14771
|
+
*/
|
|
14772
|
+
supplement$ = this._supplement.pipe(switchMap((x) => x ?? of(undefined)), distinctUntilChanged(), shareReplay(1));
|
|
14773
|
+
/**
|
|
14774
|
+
* The flattened body application: the root style class plus any supplement classes, alongside the supplement inline styles.
|
|
14775
|
+
*/
|
|
14776
|
+
styleApplication$ = combineLatest([this.styleClassName$, this.supplement$]).pipe(map(([styleClassName, supplement]) => ({
|
|
14777
|
+
classes: [styleClassName, ...(supplement?.classes ?? [])],
|
|
14778
|
+
style: supplement?.style ?? {}
|
|
14779
|
+
})), shareReplay(1));
|
|
14707
14780
|
/**
|
|
14708
14781
|
* Returns the style class given the input configuration.
|
|
14709
14782
|
*
|
|
@@ -14788,10 +14861,29 @@ class DbxStyleService {
|
|
|
14788
14861
|
this._config.next(undefined);
|
|
14789
14862
|
}
|
|
14790
14863
|
}
|
|
14864
|
+
/**
|
|
14865
|
+
* Sets the active style supplement (classes + inline styles) layered on top of the configured style on the body.
|
|
14866
|
+
*
|
|
14867
|
+
* @param supplement - A supplement value or observable, or nullish to clear the current supplement.
|
|
14868
|
+
*/
|
|
14869
|
+
setSupplement(supplement) {
|
|
14870
|
+
this._supplement.next(supplement == null ? undefined : asObservable(supplement));
|
|
14871
|
+
}
|
|
14872
|
+
/**
|
|
14873
|
+
* Clears the active supplement if it matches the given reference.
|
|
14874
|
+
*
|
|
14875
|
+
* @param supplement - The supplement reference to compare against the current supplement.
|
|
14876
|
+
*/
|
|
14877
|
+
unsetSupplement(supplement) {
|
|
14878
|
+
if (this._supplement.value === supplement) {
|
|
14879
|
+
this._supplement.next(undefined);
|
|
14880
|
+
}
|
|
14881
|
+
}
|
|
14791
14882
|
destroy() {
|
|
14792
14883
|
this._defaultConfig.complete();
|
|
14793
14884
|
this._config.complete();
|
|
14794
14885
|
this._styleClassSuffix.complete();
|
|
14886
|
+
this._supplement.complete();
|
|
14795
14887
|
}
|
|
14796
14888
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStyleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14797
14889
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStyleService });
|
|
@@ -14923,9 +15015,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
14923
15015
|
}], ctorParameters: () => [] });
|
|
14924
15016
|
|
|
14925
15017
|
/**
|
|
14926
|
-
* Applies the current
|
|
15018
|
+
* Applies the current {@link DbxStyleService} body application — the active style class, any supplement classes, and
|
|
15019
|
+
* supplement inline styles (CSS custom properties) — to the document `<body>` element.
|
|
14927
15020
|
*
|
|
14928
|
-
* Place this directive on a root-level element so that the body tag receives the active style
|
|
15021
|
+
* Place this directive on a root-level element so that the body tag receives the active style.
|
|
14929
15022
|
*
|
|
14930
15023
|
* @dbxWebComponent
|
|
14931
15024
|
* @dbxWebSlug style-body
|
|
@@ -14943,17 +15036,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
14943
15036
|
class DbxStyleBodyDirective {
|
|
14944
15037
|
_styleService = inject(DbxStyleService);
|
|
14945
15038
|
_renderer = inject(Renderer2);
|
|
14946
|
-
|
|
15039
|
+
_classes = [];
|
|
15040
|
+
_styleKeys = [];
|
|
14947
15041
|
constructor() {
|
|
14948
|
-
cleanSubscription(this._styleService.
|
|
14949
|
-
const
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
15042
|
+
cleanSubscription(this._styleService.styleApplication$.pipe(delay(0)).subscribe((application) => {
|
|
15043
|
+
const nextClasses = application.classes.filter(Boolean);
|
|
15044
|
+
const nextClassSet = new Set(nextClasses);
|
|
15045
|
+
// Diff classes: remove ones no longer present, add new ones.
|
|
15046
|
+
this._classes.forEach((currentClass) => {
|
|
15047
|
+
if (!nextClassSet.has(currentClass)) {
|
|
15048
|
+
this._renderer.removeClass(document.body, currentClass);
|
|
15049
|
+
}
|
|
15050
|
+
});
|
|
15051
|
+
const currentClassSet = new Set(this._classes);
|
|
15052
|
+
nextClasses.forEach((nextClass) => {
|
|
15053
|
+
if (!currentClassSet.has(nextClass)) {
|
|
15054
|
+
this._renderer.addClass(document.body, nextClass);
|
|
15055
|
+
}
|
|
15056
|
+
});
|
|
15057
|
+
this._classes = nextClasses;
|
|
15058
|
+
// Diff inline styles: custom properties (e.g. --mat-sys-*) require setProperty/removeProperty.
|
|
15059
|
+
const bodyStyle = document.body.style;
|
|
15060
|
+
const nextStyle = application.style;
|
|
15061
|
+
const nextStyleKeys = Object.keys(nextStyle).filter((key) => nextStyle[key] != null);
|
|
15062
|
+
const nextStyleKeySet = new Set(nextStyleKeys);
|
|
15063
|
+
this._styleKeys.forEach((currentKey) => {
|
|
15064
|
+
if (!nextStyleKeySet.has(currentKey)) {
|
|
15065
|
+
bodyStyle.removeProperty(currentKey);
|
|
15066
|
+
}
|
|
15067
|
+
});
|
|
15068
|
+
nextStyleKeys.forEach((key) => {
|
|
15069
|
+
bodyStyle.setProperty(key, String(nextStyle[key]));
|
|
15070
|
+
});
|
|
15071
|
+
this._styleKeys = nextStyleKeys;
|
|
14957
15072
|
}));
|
|
14958
15073
|
}
|
|
14959
15074
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStyleBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -15254,16 +15369,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
15254
15369
|
* @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
|
|
15255
15370
|
* @dbxWebContentProjection Optional fallback content rendered when `icon` is not supplied (e.g. a custom icon component).
|
|
15256
15371
|
* @dbxWebMinimalExample ```html
|
|
15257
|
-
* <dbx-icon-tile [icon]="'verified'"
|
|
15372
|
+
* <dbx-icon-tile [icon]="'verified'" dbxColor="success"></dbx-icon-tile>
|
|
15258
15373
|
* ```
|
|
15259
15374
|
*
|
|
15260
15375
|
* @example
|
|
15261
15376
|
* ```html
|
|
15262
|
-
* <dbx-icon-tile [icon]="'check'"
|
|
15377
|
+
* <dbx-icon-tile [icon]="'check'" dbxColor="primary" [dbxColorTone]="18"></dbx-icon-tile>
|
|
15263
15378
|
*
|
|
15264
|
-
* <dbx-icon-tile [icon]="'star'" [round]="true"
|
|
15379
|
+
* <dbx-icon-tile [icon]="'star'" [round]="true" dbxColor="accent"></dbx-icon-tile>
|
|
15265
15380
|
*
|
|
15266
|
-
* <dbx-icon-tile
|
|
15381
|
+
* <dbx-icon-tile dbxColor="accent">
|
|
15267
15382
|
* <my-custom-glyph></my-custom-glyph>
|
|
15268
15383
|
* </dbx-icon-tile>
|
|
15269
15384
|
* ```
|
|
@@ -15327,7 +15442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
15327
15442
|
* @dbxWebRelated icon-tile, dbx-color, list-two-line-item
|
|
15328
15443
|
* @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
|
|
15329
15444
|
* @dbxWebMinimalExample ```html
|
|
15330
|
-
* <div dbxIconTile
|
|
15445
|
+
* <div dbxIconTile dbxColor="primary" [dbxColorTone]="18">
|
|
15331
15446
|
* <mat-icon>star</mat-icon>
|
|
15332
15447
|
* </div>
|
|
15333
15448
|
* ```
|
|
@@ -15335,7 +15450,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
15335
15450
|
* @example
|
|
15336
15451
|
* ```html
|
|
15337
15452
|
* <div class="dbx-list-two-line-item dbx-list-two-line-item-with-icon">
|
|
15338
|
-
* <div class="item-icon" dbxIconTile
|
|
15453
|
+
* <div class="item-icon" dbxIconTile dbxColor="primary" [dbxColorTone]="18">
|
|
15339
15454
|
* <mat-icon>check_circle</mat-icon>
|
|
15340
15455
|
* </div>
|
|
15341
15456
|
* <div class="item-left">
|
|
@@ -15446,7 +15561,7 @@ class DbxStepBlockComponent {
|
|
|
15446
15561
|
}
|
|
15447
15562
|
<ng-content></ng-content>
|
|
15448
15563
|
</div>
|
|
15449
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DbxIconTileComponent, selector: "dbx-icon-tile", inputs: ["icon", "round"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15564
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxIconTileComponent, selector: "dbx-icon-tile", inputs: ["icon", "round"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15450
15565
|
}
|
|
15451
15566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStepBlockComponent, decorators: [{
|
|
15452
15567
|
type: Component,
|
|
@@ -15687,6 +15802,11 @@ const DEFAULT_DBX_CHIP_TONE = 18;
|
|
|
15687
15802
|
/**
|
|
15688
15803
|
* Renders a styled chip element with optional small, block, and color modes.
|
|
15689
15804
|
*
|
|
15805
|
+
* Hosts a {@link DbxColorDirective} that provides the color tokens + `.dbx-color` marker the chip's
|
|
15806
|
+
* `.dbx-chip.dbx-color` SCSS paints from. The color can be supplied either through the {@link color}/{@link display}
|
|
15807
|
+
* inputs (pushed into the host directive) or by binding `[dbxColor]` directly; the chip's tone handling (default
|
|
15808
|
+
* {@link DEFAULT_DBX_CHIP_TONE} → tonal text) applies to both.
|
|
15809
|
+
*
|
|
15690
15810
|
* @dbxWebComponent
|
|
15691
15811
|
* @dbxWebSlug chip
|
|
15692
15812
|
* @dbxWebCategory text
|
|
@@ -15702,11 +15822,31 @@ const DEFAULT_DBX_CHIP_TONE = 18;
|
|
|
15702
15822
|
* ```
|
|
15703
15823
|
*/
|
|
15704
15824
|
class DbxChipDirective {
|
|
15705
|
-
|
|
15825
|
+
_dbxColorDirective = inject(DbxColorDirective, { self: true });
|
|
15826
|
+
constructor() {
|
|
15827
|
+
let originalColor;
|
|
15828
|
+
let overridden = false;
|
|
15829
|
+
// Pushes the chip's resolved color (color input > display config) into the host DbxColorDirective so it stays the
|
|
15830
|
+
// single token provider on the element. The directive's own value is restored once the chip stops supplying a color.
|
|
15831
|
+
effect(() => {
|
|
15832
|
+
const color = this.colorSignal();
|
|
15833
|
+
if (color != null) {
|
|
15834
|
+
if (!overridden) {
|
|
15835
|
+
originalColor = untracked(this._dbxColorDirective.dbxColor);
|
|
15836
|
+
overridden = true;
|
|
15837
|
+
}
|
|
15838
|
+
this._dbxColorDirective.dbxColor.set(color);
|
|
15839
|
+
}
|
|
15840
|
+
else if (overridden) {
|
|
15841
|
+
this._dbxColorDirective.dbxColor.set(originalColor);
|
|
15842
|
+
overridden = false;
|
|
15843
|
+
}
|
|
15844
|
+
});
|
|
15845
|
+
}
|
|
15706
15846
|
small = input(...(ngDevMode ? [undefined, { debugName: "small" }] : /* istanbul ignore next */ []));
|
|
15707
15847
|
block = input(...(ngDevMode ? [undefined, { debugName: "block" }] : /* istanbul ignore next */ []));
|
|
15708
15848
|
/**
|
|
15709
|
-
* Theme color or {@link DbxColorConfig} applied to the chip
|
|
15849
|
+
* Theme color or {@link DbxColorConfig} applied to the chip, pushed into the host {@link DbxColorDirective}.
|
|
15710
15850
|
*
|
|
15711
15851
|
* When {@link display} is also set, its color is used as a fallback.
|
|
15712
15852
|
*/
|
|
@@ -15727,44 +15867,32 @@ class DbxChipDirective {
|
|
|
15727
15867
|
const display = this.display();
|
|
15728
15868
|
return this.color() ?? display?.color;
|
|
15729
15869
|
}, ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
|
|
15730
|
-
_configSignal = computed(() => {
|
|
15731
|
-
const value = this.colorSignal();
|
|
15732
|
-
return isDbxColorConfig(value) ? (this._colorService?.expandColorConfig(value) ?? value) : undefined;
|
|
15733
|
-
}, ...(ngDevMode ? [{ debugName: "_configSignal" }] : /* istanbul ignore next */ []));
|
|
15734
15870
|
/**
|
|
15735
|
-
*
|
|
15871
|
+
* The effective color on the host {@link DbxColorDirective} — either pushed from {@link colorSignal} or bound
|
|
15872
|
+
* directly via `[dbxColor]`. Drives the chip's tone/tonal handling.
|
|
15736
15873
|
*/
|
|
15737
|
-
|
|
15738
|
-
/**
|
|
15739
|
-
* Inline `--dbx-color-current` value applied when a {@link DbxColorConfig} is bound. Resolves to `null` for named-color strings.
|
|
15740
|
-
*/
|
|
15741
|
-
colorStyleSignal = computed(() => this._configSignal()?.contrast ?? null, ...(ngDevMode ? [{ debugName: "colorStyleSignal" }] : /* istanbul ignore next */ []));
|
|
15874
|
+
effectiveColorSignal = computed(() => this._dbxColorDirective.dbxColor(), ...(ngDevMode ? [{ debugName: "effectiveColorSignal" }] : /* istanbul ignore next */ []));
|
|
15742
15875
|
toneSignal = computed(() => {
|
|
15743
15876
|
const display = this.display();
|
|
15744
|
-
|
|
15745
|
-
return this.tone() ?? display?.tone ?? _config?.tone ?? DEFAULT_DBX_CHIP_TONE;
|
|
15877
|
+
return this.tone() ?? display?.tone ?? this._dbxColorDirective.effectiveToneSignal() ?? DEFAULT_DBX_CHIP_TONE;
|
|
15746
15878
|
}, ...(ngDevMode ? [{ debugName: "toneSignal" }] : /* istanbul ignore next */ []));
|
|
15747
15879
|
styleSignal = computed(() => {
|
|
15748
15880
|
const display = this.display();
|
|
15749
15881
|
const small = this.small() ?? display?.small;
|
|
15750
15882
|
const block = this.block() ?? display?.block;
|
|
15751
|
-
const color = this.colorSignal();
|
|
15752
15883
|
let style = small ? 'dbx-chip-small' : '';
|
|
15753
15884
|
if (block) {
|
|
15754
15885
|
style = style + ' dbx-chip-block';
|
|
15755
15886
|
}
|
|
15756
|
-
if (color) {
|
|
15757
|
-
style = style + ' ' + dbxColorBackground(color);
|
|
15758
|
-
}
|
|
15759
15887
|
return style;
|
|
15760
15888
|
}, ...(ngDevMode ? [{ debugName: "styleSignal" }] : /* istanbul ignore next */ []));
|
|
15761
15889
|
/**
|
|
15762
|
-
* Sets `--dbx-color-bg-tone` on the host to control the background opacity
|
|
15890
|
+
* Sets `--dbx-color-bg-tone` on the host to control the background opacity of the painted chip surface.
|
|
15763
15891
|
* Only applied when a color is set.
|
|
15764
15892
|
*/
|
|
15765
15893
|
bgToneStyleSignal = computed(() => {
|
|
15766
15894
|
const tone = this.toneSignal();
|
|
15767
|
-
const color = this.
|
|
15895
|
+
const color = this.effectiveColorSignal();
|
|
15768
15896
|
if (color) {
|
|
15769
15897
|
return `${tone}%`;
|
|
15770
15898
|
}
|
|
@@ -15777,11 +15905,11 @@ class DbxChipDirective {
|
|
|
15777
15905
|
*/
|
|
15778
15906
|
isTonalSignal = computed(() => {
|
|
15779
15907
|
const tone = this.toneSignal();
|
|
15780
|
-
const color = this.
|
|
15908
|
+
const color = this.effectiveColorSignal();
|
|
15781
15909
|
return Boolean(color) && tone < 100;
|
|
15782
15910
|
}, ...(ngDevMode ? [{ debugName: "isTonalSignal" }] : /* istanbul ignore next */ []));
|
|
15783
15911
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
15784
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxChipDirective, isStandalone: true, selector: "dbx-chip", inputs: { small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "styleSignal()", "class.dbx-color-tonal": "isTonalSignal()", "style.--dbx-color-bg-tone": "bgToneStyleSignal()",
|
|
15912
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxChipDirective, isStandalone: true, selector: "dbx-chip", inputs: { small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "styleSignal()", "class.dbx-color-tonal": "isTonalSignal()", "style.--dbx-color-bg-tone": "bgToneStyleSignal()" }, classAttribute: "dbx-chip" }, hostDirectives: [{ directive: DbxColorDirective }], ngImport: i0 });
|
|
15785
15913
|
}
|
|
15786
15914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipDirective, decorators: [{
|
|
15787
15915
|
type: Directive,
|
|
@@ -15789,16 +15917,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
15789
15917
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
15790
15918
|
selector: 'dbx-chip',
|
|
15791
15919
|
host: {
|
|
15792
|
-
class: 'dbx-chip
|
|
15920
|
+
class: 'dbx-chip',
|
|
15793
15921
|
'[class]': 'styleSignal()',
|
|
15794
15922
|
'[class.dbx-color-tonal]': 'isTonalSignal()',
|
|
15795
|
-
'[style.--dbx-color-bg-tone]': 'bgToneStyleSignal()'
|
|
15796
|
-
'[style.--dbx-bg-color-current]': 'bgColorStyleSignal()',
|
|
15797
|
-
'[style.--dbx-color-current]': 'colorStyleSignal()'
|
|
15923
|
+
'[style.--dbx-color-bg-tone]': 'bgToneStyleSignal()'
|
|
15798
15924
|
},
|
|
15925
|
+
hostDirectives: [DbxColorDirective],
|
|
15799
15926
|
standalone: true
|
|
15800
15927
|
}]
|
|
15801
|
-
}], propDecorators: { small: [{ type: i0.Input, args: [{ isSignal: true, alias: "small", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }] } });
|
|
15928
|
+
}], ctorParameters: () => [], propDecorators: { small: [{ type: i0.Input, args: [{ isSignal: true, alias: "small", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }] } });
|
|
15802
15929
|
|
|
15803
15930
|
/**
|
|
15804
15931
|
* Renders a row of colored chips from an array of {@link DbxChipDisplay} items.
|
|
@@ -15994,7 +16121,7 @@ class DbxNumberWithLimitComponent {
|
|
|
15994
16121
|
}
|
|
15995
16122
|
<span>{{ suffixSignal() }}</span>
|
|
15996
16123
|
</span>
|
|
15997
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16124
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15998
16125
|
}
|
|
15999
16126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxNumberWithLimitComponent, decorators: [{
|
|
16000
16127
|
type: Component,
|
|
@@ -16448,7 +16575,7 @@ class DbxZipBlobPreviewComponent {
|
|
|
16448
16575
|
this.selectedNodeSignal.set(selectedNode?.parent);
|
|
16449
16576
|
};
|
|
16450
16577
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxZipBlobPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16451
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxZipBlobPreviewComponent, isStandalone: true, selector: "dbx-zip-blob-preview", inputs: { blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null }, downloadFileName: { classPropertyName: "downloadFileName", publicName: "downloadFileName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<dbx-loading [context]=\"context\">\n <div class=\"dbx-flex-bar dbx-zip-blob-preview-toolbar\">\n <dbx-button [disabled]=\"!selectedNodeSignal()\" icon=\"arrow_upward\" text=\"Back\" (buttonClick)=\"backClicked()\"></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-button [disabled]=\"!selectedNodeSignal()\" icon=\"home\" text=\"Home\" (buttonClick)=\"homeClicked()\"></dbx-button>\n <dbx-spacer></dbx-spacer>\n @if (downloadZipFileBlobButtonConfigSignal()) {\n <dbx-download-blob-button [config]=\"downloadZipFileBlobButtonConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n <dbx-bar-header class=\"dbx-zip-blob-preview-header\" [icon]=\"selectedNodeIconSignal()\" [text]=\"selectedNodePathSignal()\"></dbx-bar-header>\n <div class=\"dbx-zip-blob-preview-content\">\n @switch (modeSignal()) {\n @case ('view_directory') {\n <dbx-zip-preview-file-entry-list [state]=\"listEntriesState$\" [dbxListTitleGroup]=\"listTitleGroupDelegate\" [dbxListItemModifier] [dbxListItemAnchorModifier]=\"makeEntryAnchor\"></dbx-zip-preview-file-entry-list>\n }\n @case ('view_entry') {\n <dbx-embed class=\"dbx-zip-blob-preview-content-embed\" [blob]=\"selectedFileEntryBlobSignal()\"></dbx-embed>\n }\n }\n </div>\n</dbx-loading>\n", dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "customContent", "allowClickPropagation", "mode"] }, { kind: "component", type: DbxBarHeaderComponent, selector: "dbx-bar-header", inputs: ["text", "icon"
|
|
16578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxZipBlobPreviewComponent, isStandalone: true, selector: "dbx-zip-blob-preview", inputs: { blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null }, downloadFileName: { classPropertyName: "downloadFileName", publicName: "downloadFileName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<dbx-loading [context]=\"context\">\n <div class=\"dbx-flex-bar dbx-zip-blob-preview-toolbar\">\n <dbx-button [disabled]=\"!selectedNodeSignal()\" icon=\"arrow_upward\" text=\"Back\" (buttonClick)=\"backClicked()\"></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-button [disabled]=\"!selectedNodeSignal()\" icon=\"home\" text=\"Home\" (buttonClick)=\"homeClicked()\"></dbx-button>\n <dbx-spacer></dbx-spacer>\n @if (downloadZipFileBlobButtonConfigSignal()) {\n <dbx-download-blob-button [config]=\"downloadZipFileBlobButtonConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n <dbx-bar-header class=\"dbx-zip-blob-preview-header\" [icon]=\"selectedNodeIconSignal()\" [text]=\"selectedNodePathSignal()\"></dbx-bar-header>\n <div class=\"dbx-zip-blob-preview-content\">\n @switch (modeSignal()) {\n @case ('view_directory') {\n <dbx-zip-preview-file-entry-list [state]=\"listEntriesState$\" [dbxListTitleGroup]=\"listTitleGroupDelegate\" [dbxListItemModifier] [dbxListItemAnchorModifier]=\"makeEntryAnchor\"></dbx-zip-preview-file-entry-list>\n }\n @case ('view_entry') {\n <dbx-embed class=\"dbx-zip-blob-preview-content-embed\" [blob]=\"selectedFileEntryBlobSignal()\"></dbx-embed>\n }\n }\n </div>\n</dbx-loading>\n", dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "customContent", "allowClickPropagation", "mode"] }, { kind: "component", type: DbxBarHeaderComponent, selector: "dbx-bar-header", inputs: ["text", "icon"] }, { kind: "directive", type: DbxListTitleGroupDirective, selector: "[dbxListTitleGroup]", inputs: ["dbxListTitleGroup"] }, { kind: "component", type: DbxZipPreviewEntryListComponent, selector: "dbx-zip-preview-file-entry-list" }, { kind: "component", type: DbxEmbedComponent, selector: "dbx-embed", inputs: ["embedElement", "sanitizeUrl", "srcUrl", "type", "blob"], outputs: ["embedElementChange", "sanitizeUrlChange", "srcUrlChange", "typeChange", "blobChange"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "diameter", "linear", "loading", "error", "context"] }, { kind: "directive", type: DbxValueListItemModifierDirective, selector: "dbxListItemModifier,[dbxListItemModifier]", inputs: ["dbxListItemModifier"] }, { kind: "directive", type: DbxListItemAnchorModifierDirective, selector: "[dbxListItemAnchorModifier]", inputs: ["dbxListItemAnchorModifier"] }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "directive", type: DbxSpacerDirective, selector: "dbx-spacer, [dbxSpacer]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16452
16579
|
}
|
|
16453
16580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxZipBlobPreviewComponent, decorators: [{
|
|
16454
16581
|
type: Component,
|
|
@@ -16502,7 +16629,7 @@ class DbxZipPreviewComponent {
|
|
|
16502
16629
|
<dbx-loading [context]="context">
|
|
16503
16630
|
<dbx-zip-blob-preview [downloadFileName]="downloadFileName()" [blob]="zipFileBlobSignal()"></dbx-zip-blob-preview>
|
|
16504
16631
|
</dbx-loading>
|
|
16505
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "
|
|
16632
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "diameter", "linear", "loading", "error", "context"] }, { kind: "component", type: DbxZipBlobPreviewComponent, selector: "dbx-zip-blob-preview", inputs: ["blob", "downloadFileName"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16506
16633
|
}
|
|
16507
16634
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxZipPreviewComponent, decorators: [{
|
|
16508
16635
|
type: Component,
|