@devopmaat/badaboom 1.2.3 → 1.3.2
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/fesm2022/devopmaat-badaboom.mjs +591 -271
- package/fesm2022/devopmaat-badaboom.mjs.map +1 -1
- package/lib/application/common/full-table/bdb-full-table.component.d.ts +2 -1
- package/lib/application/common/table/_bdb-table-theme.scss +71 -0
- package/lib/application/common/table/bdb-table.component.d.ts +4 -3
- package/lib/application/media/media-display/media-display.component.d.ts +23 -0
- package/lib/application/media/media-full-table/media-full-table.component.d.ts +24 -0
- package/lib/application/media/media-table/media-table.component.d.ts +21 -0
- package/lib/application/media/media-type.pipe.d.ts +8 -0
- package/lib/application/media/media-upload/media-drop.directive.d.ts +27 -0
- package/lib/application/media/media-upload/media-upload.component.d.ts +15 -0
- package/lib/application/task-log/task-log-outcome.pipe.d.ts +1 -1
- package/lib/application/task-log/task-log-status.pipe.d.ts +1 -1
- package/lib/bdb-options.d.ts +3 -0
- package/lib/common/alert/_bdb-alert-theme.scss +39 -0
- package/lib/common/alert/bdb-alert.component.d.ts +3 -13
- package/lib/common/alert-error-response/bdb-alert-error-response.component.d.ts +0 -2
- package/lib/common/collapse-row/{_collapse-row-theme.scss → _bdb-collapse-row-theme.scss} +6 -5
- package/lib/common/field/_bdb-field-theme.scss +39 -0
- package/lib/common/file-size.pipe.d.ts +7 -0
- package/lib/common/youtube-player/youtube-player.component.d.ts +14 -0
- package/lib/domain/enums/media-type.d.ts +1 -0
- package/lib/domain/enums/task-log-outcome.d.ts +1 -0
- package/lib/domain/enums/task-log-status.d.ts +1 -0
- package/lib/styles/_core-theme.scss +48 -10
- package/lib/styles/_theme.scss +57 -140
- package/lib/styles/material/_badge-theme.scss +46 -0
- package/lib/styles/material/_button-theme.scss +66 -0
- package/lib/styles/material/_card-theme.scss +41 -0
- package/lib/styles/material/_checkbox-theme.scss +35 -0
- package/lib/styles/material/_chips-theme.scss +37 -0
- package/lib/styles/material/_datepicker-theme.scss +36 -0
- package/lib/styles/material/_fab-theme.scss +50 -0
- package/lib/styles/material/_form-field-theme.scss +48 -0
- package/lib/styles/material/_icon-button-theme.scss +52 -0
- package/lib/styles/material/{_progress-spinner-m3-theme.scss → _icon-theme.scss} +12 -4
- package/lib/styles/material/_option-theme.scss +45 -0
- package/lib/styles/material/_progress-bar-theme.scss +39 -0
- package/lib/styles/material/_progress-spinner-theme.scss +35 -0
- package/lib/styles/material/_radio-theme.scss +47 -0
- package/lib/styles/material/_slide-toggle-theme.scss +39 -0
- package/lib/styles/material/_slider-theme.scss +59 -0
- package/lib/styles/material/_stepper-theme.scss +45 -0
- package/lib/styles/material/_tabs-theme.scss +32 -0
- package/lib/styles/material/_toolbar-theme.scss +41 -0
- package/package.json +5 -6
- package/public-api.d.ts +9 -2
- package/esm2022/devopmaat-badaboom.mjs +0 -5
- package/esm2022/lib/application/common/bdb-data-source.mjs +0 -42
- package/esm2022/lib/application/common/full-table/bdb-full-table.component.mjs +0 -57
- package/esm2022/lib/application/common/paginator/bdb-paginator.component.mjs +0 -37
- package/esm2022/lib/application/common/query-input/bdb-query-input.component.mjs +0 -44
- package/esm2022/lib/application/common/search/bdb-search-wrapper.component.mjs +0 -33
- package/esm2022/lib/application/common/search/bdb-search.component.mjs +0 -163
- package/esm2022/lib/application/common/table/bdb-cell.directive.mjs +0 -20
- package/esm2022/lib/application/common/table/bdb-column-builder.mjs +0 -100
- package/esm2022/lib/application/common/table/bdb-column-options.mjs +0 -2
- package/esm2022/lib/application/common/table/bdb-column-type.mjs +0 -12
- package/esm2022/lib/application/common/table/bdb-column.mjs +0 -2
- package/esm2022/lib/application/common/table/bdb-context-action.mjs +0 -2
- package/esm2022/lib/application/common/table/bdb-table.component.mjs +0 -192
- package/esm2022/lib/application/common/table/dynamic.pipe.mjs +0 -26
- package/esm2022/lib/application/exception-log/exception-log-table/exception-log-table.component.mjs +0 -49
- package/esm2022/lib/application/task-log/task-log-outcome.pipe.mjs +0 -31
- package/esm2022/lib/application/task-log/task-log-status.pipe.mjs +0 -29
- package/esm2022/lib/application/task-log-parameter/task-log-parameter-value.pipe.mjs +0 -49
- package/esm2022/lib/application/user/user-table/user-table.component.mjs +0 -68
- package/esm2022/lib/bdb-auth-options.mjs +0 -39
- package/esm2022/lib/bdb-options.mjs +0 -25
- package/esm2022/lib/common/alert/bdb-alert.component.mjs +0 -40
- package/esm2022/lib/common/alert-error-response/bdb-alert-error-response.component.mjs +0 -108
- package/esm2022/lib/common/bdb-flex-child.directive.mjs +0 -24
- package/esm2022/lib/common/bdb-flex.directive.mjs +0 -112
- package/esm2022/lib/common/bdb-form-error.directive.mjs +0 -74
- package/esm2022/lib/common/bdb-grid-child.directive.mjs +0 -81
- package/esm2022/lib/common/bdb-grid.directive.mjs +0 -107
- package/esm2022/lib/common/bdb-palette.mjs +0 -2
- package/esm2022/lib/common/boolean-display/bdb-boolean-display.component.mjs +0 -23
- package/esm2022/lib/common/collapse-row/collapse-row.component.mjs +0 -31
- package/esm2022/lib/common/color.mjs +0 -26
- package/esm2022/lib/common/constructor.mjs +0 -2
- package/esm2022/lib/common/field/bdb-field.component.mjs +0 -20
- package/esm2022/lib/common/function.pipe.mjs +0 -20
- package/esm2022/lib/common/layout-error.mjs +0 -6
- package/esm2022/lib/common/linked-list.mjs +0 -53
- package/esm2022/lib/common/plain-number-pipe.mjs +0 -20
- package/esm2022/lib/domain/auth/account-info.mjs +0 -2
- package/esm2022/lib/domain/auth/account.service.mjs +0 -32
- package/esm2022/lib/domain/auth/auth.service.mjs +0 -119
- package/esm2022/lib/domain/auth/reset-password-token.mjs +0 -2
- package/esm2022/lib/domain/auth/token-expired.interceptor.mjs +0 -21
- package/esm2022/lib/domain/auth/token-reponse.mjs +0 -2
- package/esm2022/lib/domain/auth/token.interceptor.mjs +0 -17
- package/esm2022/lib/domain/common/bdb-filter.mjs +0 -2
- package/esm2022/lib/domain/common/bdb-request.mjs +0 -2
- package/esm2022/lib/domain/common/bdb-response.mjs +0 -2
- package/esm2022/lib/domain/common/entities/bdb-entity-read.mjs +0 -2
- package/esm2022/lib/domain/common/entities/bdb-entity-update.mjs +0 -2
- package/esm2022/lib/domain/common/entities/bdb-entity.mjs +0 -2
- package/esm2022/lib/domain/common/services/bdb-service-cr.mjs +0 -7
- package/esm2022/lib/domain/common/services/bdb-service-crd.mjs +0 -7
- package/esm2022/lib/domain/common/services/bdb-service-cru.mjs +0 -7
- package/esm2022/lib/domain/common/services/bdb-service-crud.mjs +0 -7
- package/esm2022/lib/domain/common/services/bdb-service-r.mjs +0 -10
- package/esm2022/lib/domain/common/services/bdb-service-rd.mjs +0 -7
- package/esm2022/lib/domain/common/services/bdb-service-ru.mjs +0 -7
- package/esm2022/lib/domain/common/services/bdb-service-rud.mjs +0 -7
- package/esm2022/lib/domain/common/services/bdb-service.mjs +0 -11
- package/esm2022/lib/domain/entities/exception-log/exception-log-read.mjs +0 -2
- package/esm2022/lib/domain/entities/exception-log/exception-log.mjs +0 -2
- package/esm2022/lib/domain/entities/exception-log/exception-log.service.mjs +0 -17
- package/esm2022/lib/domain/entities/media/media-read.mjs +0 -2
- package/esm2022/lib/domain/entities/media/media.mjs +0 -2
- package/esm2022/lib/domain/entities/media/media.service.mjs +0 -27
- package/esm2022/lib/domain/entities/role/role-read.mjs +0 -2
- package/esm2022/lib/domain/entities/role/role.mjs +0 -2
- package/esm2022/lib/domain/entities/role/role.service.mjs +0 -17
- package/esm2022/lib/domain/entities/task-log/task-log-create.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log/task-log-read.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log/task-log.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log/task-log.service.mjs +0 -20
- package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter-create.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter-read.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter.service.mjs +0 -17
- package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule-create.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule-read.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule-update.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule.mjs +0 -2
- package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule.service.mjs +0 -17
- package/esm2022/lib/domain/entities/user/user-create.mjs +0 -2
- package/esm2022/lib/domain/entities/user/user-read.mjs +0 -2
- package/esm2022/lib/domain/entities/user/user-update.mjs +0 -2
- package/esm2022/lib/domain/entities/user/user.mjs +0 -2
- package/esm2022/lib/domain/entities/user/user.service.mjs +0 -17
- package/esm2022/lib/domain/entities/user-role/user-role-create.mjs +0 -2
- package/esm2022/lib/domain/entities/user-role/user-role-read.mjs +0 -2
- package/esm2022/lib/domain/entities/user-role/user-role.mjs +0 -2
- package/esm2022/lib/domain/entities/user-role/user-role.service.mjs +0 -17
- package/esm2022/lib/domain/enums/media-type.mjs +0 -7
- package/esm2022/lib/domain/enums/task-log-outcome.mjs +0 -9
- package/esm2022/lib/domain/enums/task-log-parameter-type.mjs +0 -8
- package/esm2022/lib/domain/enums/task-log-status.mjs +0 -8
- package/esm2022/lib/domain/tasks/task-log-scheduler.service.mjs +0 -26
- package/esm2022/lib/domain/tasks/task-log-type-parameter.mjs +0 -2
- package/esm2022/lib/domain/tasks/task-log-type.mjs +0 -2
- package/esm2022/lib/domain/tasks/task-log-type.service.mjs +0 -44
- package/esm2022/lib/lib.config.mjs +0 -67
- package/esm2022/lib/presentation/access-denied-page/access-denied-page.component.mjs +0 -51
- package/esm2022/lib/presentation/auth-container/auth-container.component.mjs +0 -12
- package/esm2022/lib/presentation/forgot-password-page/forgot-password-page.component.mjs +0 -75
- package/esm2022/lib/presentation/invalid-token-page/invalid-token-page.component.mjs +0 -26
- package/esm2022/lib/presentation/logged-out.guard.mjs +0 -16
- package/esm2022/lib/presentation/login-page/login-page.component.mjs +0 -90
- package/esm2022/lib/presentation/logout-page/logout-page.component.mjs +0 -33
- package/esm2022/lib/presentation/reset-password-page/reset-password-page.component.mjs +0 -102
- package/esm2022/lib/presentation/reset-password.resolver.mjs +0 -25
- package/esm2022/lib/presentation/role.guard.mjs +0 -28
- package/esm2022/public-api.mjs +0 -112
- package/lib/application/common/query-input/_bdb-query-input-m2-theme.scss +0 -17
- package/lib/application/common/query-input/_bdb-query-input-m3-theme.scss +0 -30
- package/lib/application/common/search/_bdb-search-m2-theme.scss +0 -12
- package/lib/application/common/table/_bdb-table-m2-theme.scss +0 -48
- package/lib/application/common/table/_bdb-table-m3-theme.scss +0 -70
- package/lib/common/_button-m2-theme.scss +0 -87
- package/lib/common/_icon-m2-theme.scss +0 -32
- package/lib/common/alert/_bdb-alert-m2-theme.scss +0 -34
- package/lib/common/alert/_bdb-alert-m3-theme.scss +0 -29
- package/lib/common/boolean-display/_bdb-boolean-display-m2-theme.scss +0 -18
- package/lib/common/boolean-display/_bdb-boolean-display-m3-theme.scss +0 -27
- package/lib/common/color.d.ts +0 -14
- package/lib/common/constructor.d.ts +0 -2
- package/lib/common/field/_bdb-field-m2-theme.scss +0 -13
- package/lib/common/field/_bdb-field-m3-theme.scss +0 -56
- package/lib/styles/material/_badge-m3-theme.scss +0 -35
- package/lib/styles/material/_button-m3-theme.scss +0 -84
- package/lib/styles/material/_card-m3-theme.scss +0 -34
- package/lib/styles/material/_checkbox-m3-theme.scss +0 -54
- package/lib/styles/material/_chips-m3-theme.scss +0 -58
- package/lib/styles/material/_datepicker-m3-theme.scss +0 -84
- package/lib/styles/material/_fab-m3-theme.scss +0 -84
- package/lib/styles/material/_form-field-m3-theme.scss +0 -36
- package/lib/styles/material/_icon-m3-theme.scss +0 -32
- package/lib/styles/material/_option-m3-theme.scss +0 -34
- package/lib/styles/material/_progress-bar-m3-theme.scss +0 -31
- package/lib/styles/material/_radio-m3-theme.scss +0 -42
- package/lib/styles/material/_slide-toggle-m3-theme.scss +0 -68
- package/lib/styles/material/_slider-m3-theme.scss +0 -48
- package/lib/styles/material/_stepper-m3-theme.scss +0 -44
- package/lib/styles/material/_tabs-m3-theme.scss +0 -32
- package/lib/styles/material/_toolbar-m3-theme.scss +0 -63
- /package/lib/common/collapse-row/{collapse-row.component.d.ts → bdb-collapse-row.component.d.ts} +0 -0
- /package/lib/common/{plain-number-pipe.d.ts → plain-number.pipe.d.ts} +0 -0
|
@@ -11,6 +11,7 @@ export declare class BdbFullTableComponent<TEntityRead extends BdbEntity> {
|
|
|
11
11
|
dataSource: BdbDataSource<TEntityRead>;
|
|
12
12
|
columns: BdbColumn<TEntityRead, unknown>[];
|
|
13
13
|
displayedColumns: string[];
|
|
14
|
+
autoLoad?: boolean;
|
|
14
15
|
selection?: SelectionModel<TEntityRead>;
|
|
15
16
|
contextActions: BdbContextAction<TEntityRead>[];
|
|
16
17
|
rowColor?: (x: TEntityRead) => BdbM3Palette;
|
|
@@ -22,5 +23,5 @@ export declare class BdbFullTableComponent<TEntityRead extends BdbEntity> {
|
|
|
22
23
|
}>;
|
|
23
24
|
cellTemplates: QueryList<BdbCellDirective> | undefined;
|
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<BdbFullTableComponent<any>, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BdbFullTableComponent<any>, "bdb-full-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; }; "rowColor": { "alias": "rowColor"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; }, { "rowClick": "rowClick"; "contextAction": "contextAction"; }, ["cellTemplates"], ["toolbar-item"], true, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BdbFullTableComponent<any>, "bdb-full-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "autoLoad": { "alias": "autoLoad"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; }; "rowColor": { "alias": "rowColor"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; }, { "rowClick": "rowClick"; "contextAction": "contextAction"; }, ["cellTemplates"], ["toolbar-item"], true, never>;
|
|
26
27
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:color';
|
|
3
|
+
@use '@angular/material' as mat;
|
|
4
|
+
@use '../../../styles/core-theme' as bdb;
|
|
5
|
+
|
|
6
|
+
@mixin color($mat-theme, $bdb-theme) {
|
|
7
|
+
& {
|
|
8
|
+
.bdb-table > tbody > tr {
|
|
9
|
+
&:hover {
|
|
10
|
+
background-color: var(--bdb-table-row-info-hover);
|
|
11
|
+
}
|
|
12
|
+
&.selected {
|
|
13
|
+
background-color: var(--bdb-table-row-info-selected);
|
|
14
|
+
&:hover {
|
|
15
|
+
background-color: var(--bdb-table-row-info-selected-hover);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@each $palette-name in bdb.$palette-names {
|
|
21
|
+
$bg: bdb.bdb-get-theme-color($mat-theme, $bdb-theme, $palette-name, 40);
|
|
22
|
+
--bdb-table-row-#{$palette-name}: light-dark(
|
|
23
|
+
#{color.change($bg, $lightness: 93%)},
|
|
24
|
+
#{color.change($bg, $lightness: 10%)}
|
|
25
|
+
);
|
|
26
|
+
--bdb-table-row-#{$palette-name}-hover: light-dark(
|
|
27
|
+
#{color.change($bg, $lightness: 90%)},
|
|
28
|
+
#{color.change($bg, $lightness: 15%)}
|
|
29
|
+
);
|
|
30
|
+
--bdb-table-row-#{$palette-name}-selected: light-dark(
|
|
31
|
+
#{color.change($bg, $lightness: 75%)},
|
|
32
|
+
#{color.change($bg, $lightness: 25%)}
|
|
33
|
+
);
|
|
34
|
+
--bdb-table-row-#{$palette-name}-selected-hover: light-dark(
|
|
35
|
+
#{color.change($bg, $lightness: 65%)},
|
|
36
|
+
#{color.change($bg, $lightness: 30%)}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
.bdb-table > tbody > tr {
|
|
40
|
+
@each $palette-name in bdb.$palette-names {
|
|
41
|
+
&.#{$palette-name},
|
|
42
|
+
&.bdb-#{$palette-name} {
|
|
43
|
+
background-color: var(--bdb-table-row-#{$palette-name});
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: var(--bdb-table-row-#{$palette-name}-hover);
|
|
46
|
+
}
|
|
47
|
+
&.selected {
|
|
48
|
+
background-color: var(--bdb-table-row-#{$palette-name}-selected);
|
|
49
|
+
&:hover {
|
|
50
|
+
background-color: var(--bdb-table-row-#{$palette-name}-selected-hover);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin typography($theme) {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@mixin theme($mat-theme, $bdb-theme) {
|
|
64
|
+
@if mat.theme-has($mat-theme, color) {
|
|
65
|
+
@include color($mat-theme, $bdb-theme);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// @if mat.theme-has($mat-theme, typography) {
|
|
69
|
+
// @include typography($mat-theme);
|
|
70
|
+
// }
|
|
71
|
+
}
|
|
@@ -9,12 +9,13 @@ import { BdbDataSource } from '../bdb-data-source';
|
|
|
9
9
|
import { BdbContextAction } from './bdb-context-action';
|
|
10
10
|
import { BdbCellDirective } from './bdb-cell.directive';
|
|
11
11
|
import { BdbColumnType } from './bdb-column-type';
|
|
12
|
-
import {
|
|
12
|
+
import { BdbM3Palette } from '../../../common/bdb-palette';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
export declare class BdbTableComponent<TRead extends BdbEntity> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
15
15
|
private readonly _onDestroy;
|
|
16
16
|
columns: BdbColumn<TRead, unknown>[];
|
|
17
17
|
dataSource: BdbDataSource<TRead>;
|
|
18
|
+
autoLoad?: boolean;
|
|
18
19
|
displayedColumns: string[];
|
|
19
20
|
contextActions: BdbContextAction<TRead>[];
|
|
20
21
|
selection?: SelectionModel<TRead>;
|
|
@@ -34,7 +35,7 @@ export declare class BdbTableComponent<TRead extends BdbEntity> implements OnIni
|
|
|
34
35
|
x: string;
|
|
35
36
|
y: string;
|
|
36
37
|
};
|
|
37
|
-
rowColor?: (x: TRead) =>
|
|
38
|
+
rowColor?: (x: TRead) => BdbM3Palette;
|
|
38
39
|
trackById: TrackByFunction<BdbEntity>;
|
|
39
40
|
ngOnInit(): void;
|
|
40
41
|
ngOnChanges(): void;
|
|
@@ -53,5 +54,5 @@ export declare class BdbTableComponent<TRead extends BdbEntity> implements OnIni
|
|
|
53
54
|
[klass: string]: unknown;
|
|
54
55
|
} | undefined;
|
|
55
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<BdbTableComponent<any>, never>;
|
|
56
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BdbTableComponent<any>, "bdb-table[dataSource]", never, { "columns": { "alias": "columns"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "selectOnRowClick": { "alias": "selectOnRowClick"; "required": false; }; "selectedRowClass": { "alias": "selectedRowClass"; "required": false; }; "isClickable": { "alias": "isClickable"; "required": false; }; "rowColor": { "alias": "rowColor"; "required": false; }; }, { "rowClick": "rowClick"; "contextAction": "contextAction"; }, ["cellTemplates"], ["*"], true, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BdbTableComponent<any>, "bdb-table[dataSource]", never, { "columns": { "alias": "columns"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "autoLoad": { "alias": "autoLoad"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "selectOnRowClick": { "alias": "selectOnRowClick"; "required": false; }; "selectedRowClass": { "alias": "selectedRowClass"; "required": false; }; "isClickable": { "alias": "isClickable"; "required": false; }; "rowColor": { "alias": "rowColor"; "required": false; }; }, { "rowClick": "rowClick"; "contextAction": "contextAction"; }, ["cellTemplates"], ["*"], true, never>;
|
|
57
58
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { MediaType } from '../../../domain/enums/media-type';
|
|
3
|
+
import { Media } from '../../../domain/entities/media/media';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class BdbMediaDisplayComponent implements OnChanges {
|
|
6
|
+
media?: Media;
|
|
7
|
+
mode: 'preview' | 'live';
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
alt?: string;
|
|
11
|
+
bdbOptions: import("../../../bdb-options").BdbOptions;
|
|
12
|
+
src?: string;
|
|
13
|
+
mediaType: typeof MediaType;
|
|
14
|
+
hasError: boolean;
|
|
15
|
+
noMediaUrl?: string;
|
|
16
|
+
ngOnChanges(): void;
|
|
17
|
+
getSource(media?: Media, download?: boolean): string | undefined;
|
|
18
|
+
errorHandler(): void;
|
|
19
|
+
getDownloadUrl(): string | undefined;
|
|
20
|
+
getFileExtension(fileName: string): string | undefined;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BdbMediaDisplayComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BdbMediaDisplayComponent, "bdb-media-display", never, { "media": { "alias": "media"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { MediaRead } from '../../../domain/entities/media/media-read';
|
|
3
|
+
import { BdbContextAction } from '../../common/table/bdb-context-action';
|
|
4
|
+
import { BdbDataSource } from '../../common/bdb-data-source';
|
|
5
|
+
import { BdbColumnBuilder } from '../../common/table/bdb-column-builder';
|
|
6
|
+
import { BdbColumn } from '../../common/table/bdb-column';
|
|
7
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class MediaFullTableComponent {
|
|
10
|
+
dataSource: BdbDataSource<MediaRead>;
|
|
11
|
+
displayedColumns: string[];
|
|
12
|
+
selection?: SelectionModel<MediaRead>;
|
|
13
|
+
showToolbar: boolean;
|
|
14
|
+
contextActions: BdbContextAction<MediaRead>[];
|
|
15
|
+
contextAction: EventEmitter<{
|
|
16
|
+
action: BdbContextAction<MediaRead>;
|
|
17
|
+
row: MediaRead;
|
|
18
|
+
}>;
|
|
19
|
+
rowClick: EventEmitter<MediaRead>;
|
|
20
|
+
cb: BdbColumnBuilder<MediaRead>;
|
|
21
|
+
columns: BdbColumn<MediaRead, unknown>[];
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaFullTableComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MediaFullTableComponent, "bdb-media-full-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; }; }, { "contextAction": "contextAction"; "rowClick": "rowClick"; }, never, ["toolbar-item", "*"], true, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { BdbDataSource } from '../../common/bdb-data-source';
|
|
3
|
+
import { BdbColumn } from '../../common/table/bdb-column';
|
|
4
|
+
import { BdbContextAction } from '../../common/table/bdb-context-action';
|
|
5
|
+
import { MediaRead } from '../../../domain/entities/media/media-read';
|
|
6
|
+
import { BdbColumnBuilder } from '../../common/table/bdb-column-builder';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class MediaTableComponent {
|
|
9
|
+
dataSource: BdbDataSource<MediaRead>;
|
|
10
|
+
displayedColumns: string[];
|
|
11
|
+
contextActions: BdbContextAction<MediaRead>[];
|
|
12
|
+
contextAction: EventEmitter<{
|
|
13
|
+
action: BdbContextAction<MediaRead>;
|
|
14
|
+
row: MediaRead;
|
|
15
|
+
}>;
|
|
16
|
+
rowClick: EventEmitter<MediaRead>;
|
|
17
|
+
cb: BdbColumnBuilder<MediaRead>;
|
|
18
|
+
columns: BdbColumn<MediaRead, unknown>[];
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaTableComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MediaTableComponent, "bdb-media-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; }; }, { "contextAction": "contextAction"; "rowClick": "rowClick"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { MediaType } from '../../domain/enums/media-type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MediaTypePipe implements PipeTransform {
|
|
5
|
+
transform(value: MediaType | undefined): string | undefined;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaTypePipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MediaTypePipe, "mediaType", true>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { MediaService } from '../../../domain/entities/media/media.service';
|
|
4
|
+
import { Media } from '../../../domain/entities/media/media';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface ImageFile {
|
|
7
|
+
file: File;
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
10
|
+
declare enum DropClass {
|
|
11
|
+
Default = "drop-box",// Default color
|
|
12
|
+
Over = "drop-hover"
|
|
13
|
+
}
|
|
14
|
+
export declare class MediaDropDirective {
|
|
15
|
+
private service;
|
|
16
|
+
dropStart: EventEmitter<unknown>;
|
|
17
|
+
dropComplete: EventEmitter<Media>;
|
|
18
|
+
dropError: EventEmitter<HttpErrorResponse>;
|
|
19
|
+
constructor(service: MediaService);
|
|
20
|
+
hostClass: DropClass;
|
|
21
|
+
dragOver(event: DragEvent): void;
|
|
22
|
+
dragLeave(event: DragEvent): void;
|
|
23
|
+
drop(event: DragEvent): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaDropDirective, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MediaDropDirective, "[bdbMediaDrop]", never, {}, { "dropStart": "dropStart"; "dropComplete": "dropComplete"; "dropError": "dropError"; }, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
3
|
+
import { Media } from '../../../domain/entities/media/media';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class BdbMediaUploadComponent {
|
|
6
|
+
size: number;
|
|
7
|
+
icon: string;
|
|
8
|
+
mediaUploaded: EventEmitter<Media>;
|
|
9
|
+
dropError: EventEmitter<HttpErrorResponse | undefined>;
|
|
10
|
+
onDropComplete($event: Media | undefined): void;
|
|
11
|
+
onDropError($event: HttpErrorResponse): void;
|
|
12
|
+
onDropStart(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BdbMediaUploadComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BdbMediaUploadComponent, "bdb-media-upload", never, { "size": { "alias": "size"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, { "mediaUploaded": "mediaUploaded"; "dropError": "dropError"; }, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -2,7 +2,7 @@ import { PipeTransform } from '@angular/core';
|
|
|
2
2
|
import { TaskLogOutcome } from '../../domain/enums/task-log-outcome';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TaskLogOutcomePipe implements PipeTransform {
|
|
5
|
-
transform(value: TaskLogOutcome): string;
|
|
5
|
+
transform(value: TaskLogOutcome | undefined): string | undefined;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TaskLogOutcomePipe, never>;
|
|
7
7
|
static ɵpipe: i0.ɵɵPipeDeclaration<TaskLogOutcomePipe, "taskLogOutcome", true>;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import { PipeTransform } from '@angular/core';
|
|
|
2
2
|
import { TaskLogStatus } from '../../domain/enums/task-log-status';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TaskLogStatusPipe implements PipeTransform {
|
|
5
|
-
transform(value: TaskLogStatus): string;
|
|
5
|
+
transform(value: TaskLogStatus | undefined): string | undefined;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TaskLogStatusPipe, never>;
|
|
7
7
|
static ɵpipe: i0.ɵɵPipeDeclaration<TaskLogStatusPipe, "taskLogStatus", true>;
|
|
8
8
|
}
|
package/lib/bdb-options.d.ts
CHANGED
|
@@ -2,13 +2,16 @@ import { InjectionToken } from '@angular/core';
|
|
|
2
2
|
import { BdbAuthOptions, BdbAuthOptionsConfigure } from './bdb-auth-options';
|
|
3
3
|
export interface BdbOptions {
|
|
4
4
|
backendUrl: string;
|
|
5
|
+
mediaUrl: string;
|
|
5
6
|
authOptions?: BdbAuthOptions;
|
|
6
7
|
}
|
|
7
8
|
export declare class BdbOptionsBuilder {
|
|
8
9
|
private _backendUrl;
|
|
10
|
+
private _mediaUrl;
|
|
9
11
|
private _auth?;
|
|
10
12
|
constructor(configure: BdbOptionsConfigure);
|
|
11
13
|
set backendUrl(url: string);
|
|
14
|
+
set mediaUrl(url: string);
|
|
12
15
|
addAuth(configure: BdbAuthOptionsConfigure): void;
|
|
13
16
|
build(): BdbOptions;
|
|
14
17
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@angular/material' as mat;
|
|
3
|
+
@use '../../styles/core-theme' as bdb;
|
|
4
|
+
|
|
5
|
+
@mixin color($theme) {
|
|
6
|
+
@each $palette-name in bdb.$palette-names {
|
|
7
|
+
$bg: bdb.palette-color($palette-name);
|
|
8
|
+
$fg: bdb.on-palette-color($palette-name);
|
|
9
|
+
$bg-container: bdb.palette-color($palette-name, true);
|
|
10
|
+
$fg-container: bdb.on-palette-color($palette-name, true);
|
|
11
|
+
.#{$palette-name}.bdb-alert {
|
|
12
|
+
--bdb-alert-container-color: #{$bg};
|
|
13
|
+
--bdb-alert-icon-color: #{$fg};
|
|
14
|
+
--bdb-alert-border-color: #{$bg};
|
|
15
|
+
--bdb-alert-content-color: #{$fg-container};
|
|
16
|
+
--bdb-alert-content-container-color: inherit;
|
|
17
|
+
}
|
|
18
|
+
.#{$palette-name}-container.bdb-alert {
|
|
19
|
+
--bdb-alert-container-color: #{$bg};
|
|
20
|
+
--bdb-alert-icon-color: #{$fg};
|
|
21
|
+
--bdb-alert-border-color: #{$bg};
|
|
22
|
+
--bdb-alert-content-container-color: #{$bg-container};
|
|
23
|
+
--bdb-alert-content-color: #{$fg-container};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin typography($theme) {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin theme($theme) {
|
|
32
|
+
@if mat.theme-has($theme, color) {
|
|
33
|
+
@include color($theme);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@if mat.theme-has($theme, typography) {
|
|
37
|
+
@include typography($theme);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { CanColor } from '../color';
|
|
3
|
-
import { BdbPalette } from '../bdb-palette';
|
|
4
1
|
import * as i0 from "@angular/core";
|
|
5
|
-
declare
|
|
6
|
-
new (_elementRef: ElementRef): {
|
|
7
|
-
_elementRef: ElementRef;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare class BdbAlertComponent extends _BdbAlertBase implements CanColor {
|
|
2
|
+
export declare class BdbAlertComponent {
|
|
11
3
|
class: string;
|
|
12
|
-
color: BdbPalette;
|
|
13
4
|
label: string;
|
|
14
5
|
icon: string;
|
|
15
6
|
inline: boolean;
|
|
16
|
-
constructor(
|
|
7
|
+
constructor();
|
|
17
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<BdbAlertComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BdbAlertComponent, "bdb-alert", never, { "
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BdbAlertComponent, "bdb-alert", never, { "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
19
10
|
}
|
|
20
|
-
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
2
2
|
import { OnChanges } from '@angular/core';
|
|
3
|
-
import { BdbPalette } from '../bdb-palette';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class BdbAlertErrorResponseComponent implements OnChanges {
|
|
6
5
|
value: HttpErrorResponse | undefined | null;
|
|
7
6
|
loginFailed: boolean;
|
|
8
7
|
alertClass: string;
|
|
9
|
-
color: BdbPalette;
|
|
10
8
|
icon: string;
|
|
11
9
|
label: string;
|
|
12
10
|
message: string;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '@angular/material' as mat;
|
|
3
|
+
@use '../../styles/core-theme' as bdb;
|
|
3
4
|
|
|
4
5
|
@mixin color($theme) {
|
|
5
6
|
.bdb-collapse-row .indicator {
|
|
6
7
|
.top,
|
|
7
8
|
.middle,
|
|
8
9
|
.bottom {
|
|
9
|
-
color: var(--sys-on-surface);
|
|
10
|
-
background-color: var(--sys-surface-container);
|
|
10
|
+
color: var(--mat-sys-on-surface);
|
|
11
|
+
background-color: var(--mat-sys-surface-container);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
@each $palette-name in
|
|
15
|
+
@each $palette-name in bdb.$palette-names {
|
|
15
16
|
.bdb-collapse-row.#{$palette-name} .indicator {
|
|
16
17
|
.top,
|
|
17
18
|
.middle,
|
|
18
19
|
.bottom {
|
|
19
|
-
color:
|
|
20
|
-
background-color:
|
|
20
|
+
color: bdb.palette-color($palette-name);
|
|
21
|
+
background-color: bdb.palette-color($palette-name, true);
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@angular/material' as mat;
|
|
3
|
+
@use '../../styles/core-theme' as bdb;
|
|
4
|
+
|
|
5
|
+
@mixin color($theme) {
|
|
6
|
+
& {
|
|
7
|
+
--bdb-field-border-color: var(--mat-sys-surface-container-high);
|
|
8
|
+
--bdb-field-color: var(--mat-sys-on-surface);
|
|
9
|
+
--bdb-field-label-color: var(--mat-sys-on-surface-variant);
|
|
10
|
+
|
|
11
|
+
@if mat.get-theme-type($theme) == dark {
|
|
12
|
+
--bdb-field-container-color: var(--mat-sys-surface-container);
|
|
13
|
+
} @else {
|
|
14
|
+
--bdb-field-container-color: var(--mat-sys-surface-container-low);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@each $palette-name in bdb.$palette-names {
|
|
19
|
+
.bdb-field.#{$palette-name} {
|
|
20
|
+
border-bottom-color: bdb.palette-color($palette-name);
|
|
21
|
+
}
|
|
22
|
+
.bdb-field.#{$palette-name}-container {
|
|
23
|
+
border-bottom-color: bdb.palette-color($palette-name, true);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin typography($theme) {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin theme($theme) {
|
|
32
|
+
@if mat.theme-has($theme, color) {
|
|
33
|
+
@include color($theme);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@if mat.theme-has($theme, typography) {
|
|
37
|
+
@include typography($theme);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FileSizePipe implements PipeTransform {
|
|
4
|
+
transform(bytes: number | undefined): string | undefined;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileSizePipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FileSizePipe, "fileSize", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BdbYoutubePlayerComponent implements AfterViewInit {
|
|
4
|
+
private changeDetectorRef;
|
|
5
|
+
youTubePlayer: ElementRef<HTMLDivElement>;
|
|
6
|
+
videoHeight: number | undefined;
|
|
7
|
+
videoWidth: number | undefined;
|
|
8
|
+
videoId?: string;
|
|
9
|
+
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
10
|
+
ngAfterViewInit(): void;
|
|
11
|
+
onResize(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BdbYoutubePlayerComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BdbYoutubePlayerComponent, "bdb-youtube-player", never, { "videoId": { "alias": "videoId"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use 'sass:list';
|
|
3
4
|
@use '@angular/material' as mat;
|
|
4
5
|
|
|
@@ -7,23 +8,60 @@ $badaboom-palettes: 'info', 'success', 'warn';
|
|
|
7
8
|
|
|
8
9
|
$palette-names: list.join($material-palettes, $badaboom-palettes, $separator: auto, $bracketed: auto);
|
|
9
10
|
|
|
10
|
-
@function bdb-get-theme-color($bdb-theme, $palette-name, $hue) {
|
|
11
|
+
@function bdb-get-theme-color($mat-theme, $bdb-theme, $palette-name, $hue) {
|
|
11
12
|
@if not list.index($palette-names, $palette-name) {
|
|
12
13
|
@error "#{$palette-name} is not a valid BaDaBoom palette. Expected one of #{$palette-names}.";
|
|
13
14
|
}
|
|
14
|
-
@if
|
|
15
|
-
$colors: map
|
|
16
|
-
@if type-of($colors) == 'map' {
|
|
17
|
-
$palette-map: map
|
|
18
|
-
@if type-of($palette-map) == 'map' {
|
|
19
|
-
@return map
|
|
15
|
+
@if list.index($badaboom-palettes, $palette-name) {
|
|
16
|
+
$colors: map.get($bdb-theme, color);
|
|
17
|
+
@if meta.type-of($colors) == 'map' {
|
|
18
|
+
$palette-map: map.get($colors, $palette-name);
|
|
19
|
+
@if meta.type-of($palette-map) == 'map' {
|
|
20
|
+
@return map.get($palette-map, $hue);
|
|
20
21
|
} @else {
|
|
21
|
-
@
|
|
22
|
+
@error "Make sure `#{$palette-name}` is a Sass map.";
|
|
22
23
|
}
|
|
23
24
|
} @else {
|
|
24
|
-
@
|
|
25
|
+
@error "Make sure `color` is a Sass map.";
|
|
25
26
|
}
|
|
26
27
|
} @else {
|
|
27
|
-
|
|
28
|
+
$colors: map.get($mat-theme, color);
|
|
29
|
+
$palette: red;
|
|
30
|
+
@if ($palette-name == 'primary' or $palette-name == 'tertiary') {
|
|
31
|
+
$palette: map.get($colors, $palette-name);
|
|
32
|
+
} @else {
|
|
33
|
+
// only primary and tertiary are directly accessible, other palettes are nested in primary (for reasons that elude and vex me)
|
|
34
|
+
$primary-palette: map.get($colors, primary);
|
|
35
|
+
$palette: map.get($primary-palette, $palette-name);
|
|
36
|
+
}
|
|
37
|
+
@return map.get($palette, $hue);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@function palette-color($palette-name, $container: false) {
|
|
42
|
+
@if not list.index($palette-names, $palette-name) {
|
|
43
|
+
@error "#{$palette-name} is not a valid BaDaBoom palette. Expected one of #{$palette-names}.";
|
|
44
|
+
}
|
|
45
|
+
$prefix: '--bdb-sys';
|
|
46
|
+
@if list.index($material-palettes, $palette-name) {
|
|
47
|
+
$prefix: '--mat-sys';
|
|
48
|
+
}
|
|
49
|
+
@if ($container) {
|
|
50
|
+
@return var(#{$prefix}-#{$palette-name}-container);
|
|
51
|
+
}
|
|
52
|
+
@return var(#{$prefix}-#{$palette-name});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@function on-palette-color($palette-name, $container: false) {
|
|
56
|
+
@if not list.index($palette-names, $palette-name) {
|
|
57
|
+
@error "#{$palette-name} is not a valid BaDaBoom palette. Expected one of #{$palette-names}.";
|
|
58
|
+
}
|
|
59
|
+
$prefix: '--bdb-sys';
|
|
60
|
+
@if list.index($material-palettes, $palette-name) {
|
|
61
|
+
$prefix: '--mat-sys';
|
|
62
|
+
}
|
|
63
|
+
@if ($container) {
|
|
64
|
+
@return var(#{$prefix}-on-#{$palette-name}-container);
|
|
28
65
|
}
|
|
66
|
+
@return var(#{$prefix}-on-#{$palette-name});
|
|
29
67
|
}
|