@bravobit/bb-foundation 0.21.6 → 0.22.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/auth/lib/auth.interceptor.d.ts +1 -1
- package/auth/lib/auth.module.d.ts +4 -5
- package/auth/lib/auth.service.d.ts +4 -7
- package/auth/lib/directives/abstract.directive.d.ts +12 -0
- package/auth/lib/directives/authenticated.directive.d.ts +7 -4
- package/auth/lib/directives/permission.directive.d.ts +11 -11
- package/auth/lib/guards/anonymous.guard.d.ts +8 -5
- package/auth/lib/guards/authenticated.guard.d.ts +8 -5
- package/auth/lib/guards/permission.guard.d.ts +15 -0
- package/auth/lib/interfaces/config.interface.d.ts +14 -8
- package/auth/lib/interfaces/permission.interface.d.ts +6 -0
- package/auth/lib/interfaces/provider.interface.d.ts +10 -3
- package/auth/lib/permissions/permissions.handler.d.ts +9 -0
- package/auth/lib/permissions/permissions.service.d.ts +16 -0
- package/auth/lib/providers/email.provider.d.ts +2 -8
- package/auth/lib/providers/verify.provider.d.ts +2 -6
- package/auth/public_api.d.ts +4 -4
- package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +5 -1
- package/controls/lib/control-error/control-error/control-error.animation.d.ts +1 -0
- package/controls/lib/control-error/control-error/control-error.component.d.ts +17 -0
- package/controls/lib/control-error/control-error-submit.directive.d.ts +15 -0
- package/controls/lib/control-error/control-error.defaults.d.ts +2 -0
- package/controls/lib/control-error/control-error.interface.d.ts +12 -0
- package/controls/lib/control-error/control-error.module.d.ts +9 -0
- package/controls/lib/controls.interfaces.d.ts +4 -0
- package/controls/lib/controls.module.d.ts +7 -2
- package/controls/lib/form-control/form-control/form-control.component.d.ts +31 -0
- package/controls/lib/form-control/form-control-addon/form-control-addon.component.d.ts +6 -0
- package/controls/lib/form-control/form-control-input.directive.d.ts +35 -0
- package/controls/lib/form-control/form-control.module.d.ts +11 -0
- package/controls/public_api.d.ts +9 -0
- package/dashboard/lib/dashboard/dashboard.component.d.ts +2 -1
- package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +10 -5
- package/dialog/lib/dialog-container/dialog-container.animations.d.ts +1 -0
- package/dialog/lib/dialog-container/dialog-container.component.d.ts +5 -7
- package/dialog/lib/dialog-header/dialog-header.component.d.ts +1 -3
- package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +7 -3
- package/dialog/lib/dialog-overlay/dialog-overlay.animations.d.ts +1 -0
- package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +5 -7
- package/dialog/lib/dialog.service.d.ts +4 -3
- package/elements/lib/directives/focus-trap.directive.d.ts +1 -1
- package/elements/lib/directives/focus.directive.d.ts +1 -3
- package/elements/lib/pipes/file-image.pipe.d.ts +2 -1
- package/esm2020/auth/lib/auth.interceptor.mjs +9 -12
- package/esm2020/auth/lib/auth.module.mjs +7 -17
- package/esm2020/auth/lib/auth.service.mjs +29 -55
- package/esm2020/auth/lib/directives/abstract.directive.mjs +40 -0
- package/esm2020/auth/lib/directives/authenticated.directive.mjs +25 -14
- package/esm2020/auth/lib/directives/permission.directive.mjs +24 -46
- package/esm2020/auth/lib/guards/anonymous.guard.mjs +28 -19
- package/esm2020/auth/lib/guards/authenticated.guard.mjs +31 -20
- package/esm2020/auth/lib/guards/permission.guard.mjs +53 -0
- package/esm2020/auth/lib/helpers/jwt.helper.mjs +7 -7
- package/esm2020/auth/lib/interfaces/config.interface.mjs +1 -1
- package/esm2020/auth/lib/interfaces/permission.interface.mjs +2 -0
- package/esm2020/auth/lib/interfaces/provider.interface.mjs +1 -1
- package/esm2020/auth/lib/permissions/permissions.handler.mjs +33 -0
- package/esm2020/auth/lib/permissions/permissions.service.mjs +64 -0
- package/esm2020/auth/lib/providers/email.provider.mjs +8 -9
- package/esm2020/auth/lib/providers/verify.provider.mjs +8 -5
- package/esm2020/auth/public_api.mjs +5 -5
- package/esm2020/collections/lib/collections.module.mjs +4 -4
- package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections.directive.mjs +12 -12
- package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +19 -6
- package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +4 -4
- package/esm2020/controls/lib/checkbox/checkbox.module.mjs +4 -4
- package/esm2020/controls/lib/control-error/control-error/control-error.animation.mjs +14 -0
- package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +63 -0
- package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +47 -0
- package/esm2020/controls/lib/control-error/control-error.defaults.mjs +26 -0
- package/esm2020/controls/lib/control-error/control-error.interface.mjs +3 -0
- package/esm2020/controls/lib/control-error/control-error.module.mjs +19 -0
- package/esm2020/controls/lib/controls.interfaces.mjs +2 -0
- package/esm2020/controls/lib/controls.module.mjs +45 -8
- package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +94 -0
- package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +22 -0
- package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +124 -0
- package/esm2020/controls/lib/form-control/form-control.module.mjs +33 -0
- package/esm2020/controls/public_api.mjs +10 -1
- package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +7 -6
- package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard.module.mjs +4 -4
- package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +17 -11
- package/esm2020/dialog/lib/dialog-container/dialog-container.animations.mjs +29 -0
- package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +28 -104
- package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +7 -14
- package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +4 -4
- package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +29 -8
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.animations.mjs +26 -0
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +29 -84
- package/esm2020/dialog/lib/dialog.insertion.mjs +3 -3
- package/esm2020/dialog/lib/dialog.module.mjs +4 -4
- package/esm2020/dialog/lib/dialog.service.mjs +8 -7
- package/esm2020/elements/lib/avatar/avatar.component.mjs +8 -6
- package/esm2020/elements/lib/button/button.component.mjs +6 -6
- package/esm2020/elements/lib/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/elements/lib/date-picker/date-picker.component.mjs +3 -3
- package/esm2020/elements/lib/directives/addon.directive.mjs +6 -6
- package/esm2020/elements/lib/directives/autosize.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/focus-trap.directive.mjs +5 -5
- package/esm2020/elements/lib/directives/focus.directive.mjs +7 -9
- package/esm2020/elements/lib/directives/form-submit.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/form-submitter.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/input.directive.mjs +6 -6
- package/esm2020/elements/lib/directives/template.directive.mjs +3 -3
- package/esm2020/elements/lib/dropdown/dropdown.component.mjs +6 -6
- package/esm2020/elements/lib/elements.module.mjs +4 -4
- package/esm2020/elements/lib/file-picker/file-picker.component.mjs +3 -3
- package/esm2020/elements/lib/form-control/form-control.component.mjs +3 -3
- package/esm2020/elements/lib/form-error/form-error.component.mjs +3 -3
- package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
- package/esm2020/elements/lib/icon/icon.component.mjs +3 -3
- package/esm2020/elements/lib/image-picker/image-picker.component.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-image.pipe.mjs +8 -7
- package/esm2020/elements/lib/pipes/file-size.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +3 -3
- package/esm2020/elements/lib/spinner/spinner.component.mjs +3 -3
- package/esm2020/elements/lib/tag/tag.component.mjs +3 -3
- package/esm2020/http/lib/http.module.mjs +4 -4
- package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +3 -3
- package/esm2020/http/lib/interceptors/error.interceptor.mjs +3 -3
- package/esm2020/lib/core/services/clipboard.service.mjs +5 -5
- package/esm2020/lib/core/services/exif.service.mjs +5 -5
- package/esm2020/lib/core/services/file-loader.service.mjs +3 -3
- package/esm2020/lib/core/services/image-converter.service.mjs +5 -5
- package/esm2020/lib/core/services/languages.service.mjs +3 -3
- package/esm2020/lib/core/services/network.service.mjs +7 -7
- package/esm2020/lib/core/services/patch.service.mjs +7 -7
- package/esm2020/localize/lib/localize.module.mjs +4 -4
- package/esm2020/localize/lib/localize.pipe.mjs +3 -3
- package/esm2020/localize/lib/localize.service.mjs +5 -5
- package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +3 -3
- package/esm2020/localize/lib/views/localize-template-or-string.directive.mjs +3 -3
- package/esm2020/localize/lib/views/localize-template.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/currency-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/date-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/input-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/masking.module.mjs +4 -4
- package/esm2020/masking/lib/masking.service.mjs +3 -3
- package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +5 -5
- package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +7 -7
- package/esm2020/notifications/lib/notifications.module.mjs +4 -4
- package/esm2020/notifications/lib/notifications.service.mjs +5 -5
- package/esm2020/public_api.mjs +1 -2
- package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +10 -10
- package/esm2020/recaptcha/lib/recaptcha.module.mjs +4 -4
- package/esm2020/storage/lib/storage.service.mjs +5 -5
- package/esm2020/table/lib/components/table/table.component.mjs +9 -9
- package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +3 -3
- package/esm2020/table/lib/table.module.mjs +4 -4
- package/esm2020/theming/lib/themes/checkbox-group.theme.mjs +17 -2
- package/esm2020/theming/lib/themes/checkbox.theme.mjs +35 -2
- package/esm2020/theming/lib/themes/control-error.theme.mjs +11 -0
- package/esm2020/theming/lib/themes/form-control-addon.theme.mjs +6 -0
- package/esm2020/theming/lib/themes/form-control.theme.mjs +45 -0
- package/esm2020/theming/lib/theming.data.mjs +82 -0
- package/esm2020/theming/lib/theming.directive.mjs +38 -0
- package/esm2020/theming/lib/theming.interface.mjs +2 -3
- package/esm2020/theming/lib/theming.module.mjs +12 -34
- package/esm2020/theming/lib/utils/theming.variable.mjs +41 -0
- package/esm2020/theming/public_api.mjs +6 -3
- package/fesm2015/bravobit-bb-foundation-auth.mjs +326 -284
- package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-collections.mjs +22 -22
- package/fesm2015/bravobit-bb-foundation-controls.mjs +493 -24
- package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs +29 -28
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dialog.mjs +185 -233
- package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-elements.mjs +99 -97
- package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2015/bravobit-bb-foundation-localize.mjs +20 -20
- package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2015/bravobit-bb-foundation-notifications.mjs +18 -17
- package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +16 -16
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-storage.mjs +4 -4
- package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2015/bravobit-bb-foundation-theming.mjs +251 -128
- package/fesm2015/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation.mjs +33 -73
- package/fesm2015/bravobit-bb-foundation.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-auth.mjs +306 -277
- package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-collections.mjs +22 -22
- package/fesm2020/bravobit-bb-foundation-controls.mjs +477 -24
- package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs +29 -28
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dialog.mjs +175 -233
- package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-elements.mjs +99 -97
- package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2020/bravobit-bb-foundation-localize.mjs +20 -20
- package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2020/bravobit-bb-foundation-notifications.mjs +17 -17
- package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +16 -16
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-storage.mjs +4 -4
- package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2020/bravobit-bb-foundation-theming.mjs +252 -120
- package/fesm2020/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation.mjs +32 -70
- package/fesm2020/bravobit-bb-foundation.mjs.map +1 -1
- package/lib/core/services/clipboard.service.d.ts +2 -2
- package/lib/core/services/exif.service.d.ts +1 -1
- package/lib/core/services/image-converter.service.d.ts +1 -1
- package/lib/core/services/network.service.d.ts +4 -4
- package/lib/core/services/patch.service.d.ts +4 -4
- package/localize/lib/localize.service.d.ts +1 -1
- package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
- package/notifications/lib/notifications.service.d.ts +1 -1
- package/package.json +4 -4
- package/public_api.d.ts +0 -1
- package/recaptcha/lib/recaptcha-loader.service.d.ts +3 -3
- package/storage/lib/storage.service.d.ts +1 -1
- package/theming/lib/themes/checkbox-group.theme.d.ts +14 -3
- package/theming/lib/themes/checkbox.theme.d.ts +30 -17
- package/theming/lib/themes/control-error.theme.d.ts +9 -0
- package/theming/lib/themes/form-control-addon.theme.d.ts +5 -0
- package/theming/lib/themes/form-control.theme.d.ts +32 -0
- package/theming/lib/theming.data.d.ts +17 -0
- package/theming/lib/theming.directive.d.ts +13 -0
- package/theming/lib/theming.interface.d.ts +19 -8
- package/theming/lib/theming.module.d.ts +3 -9
- package/theming/lib/utils/theming.variable.d.ts +16 -0
- package/theming/public_api.d.ts +5 -2
- package/auth/lib/directives/role.directive.d.ts +0 -16
- package/auth/lib/helpers/mapper.helper.d.ts +0 -23
- package/auth/lib/interfaces/mapper.interface.d.ts +0 -19
- package/auth/lib/permissions.service.d.ts +0 -14
- package/esm2020/auth/lib/directives/role.directive.mjs +0 -37
- package/esm2020/auth/lib/helpers/mapper.helper.mjs +0 -35
- package/esm2020/auth/lib/interfaces/mapper.interface.mjs +0 -2
- package/esm2020/auth/lib/permissions.service.mjs +0 -56
- package/esm2020/lib/core/services/platform.service.mjs +0 -42
- package/esm2020/theming/lib/themes/theme.mjs +0 -34
- package/esm2020/theming/lib/theming.service.mjs +0 -77
- package/lib/core/services/platform.service.d.ts +0 -18
- package/theming/lib/themes/theme.d.ts +0 -12
- package/theming/lib/theming.service.d.ts +0 -22
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable, Optional } from '@angular/core';
|
|
2
|
-
import { DOCUMENT } from '@angular/common';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./theming.interface";
|
|
5
|
-
export class Theming {
|
|
6
|
-
constructor(_options, _rendererFactory, _document) {
|
|
7
|
-
this._options = _options;
|
|
8
|
-
this._rendererFactory = _rendererFactory;
|
|
9
|
-
this._document = _document;
|
|
10
|
-
// Readonly data.
|
|
11
|
-
this._attribute = 'data-theme';
|
|
12
|
-
this._renderer = this._rendererFactory.createRenderer(null, null);
|
|
13
|
-
// State.
|
|
14
|
-
this._currentTheme = null;
|
|
15
|
-
this.setCssVariables();
|
|
16
|
-
this.setFirstTheme();
|
|
17
|
-
}
|
|
18
|
-
get all() {
|
|
19
|
-
return this._options?.themes ?? [];
|
|
20
|
-
}
|
|
21
|
-
get current() {
|
|
22
|
-
return this._currentTheme ?? null;
|
|
23
|
-
}
|
|
24
|
-
set(name) {
|
|
25
|
-
const theme = this.all?.find(theme => theme?.name === name);
|
|
26
|
-
if (!theme) {
|
|
27
|
-
throw new Error('Invalid theme.');
|
|
28
|
-
}
|
|
29
|
-
const document = this._document.documentElement;
|
|
30
|
-
if (!document) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
this._renderer.setAttribute(document, this._attribute, name);
|
|
34
|
-
this._currentTheme = theme;
|
|
35
|
-
}
|
|
36
|
-
setCssVariables() {
|
|
37
|
-
const style = this._renderer.createElement('style');
|
|
38
|
-
this._renderer.setAttribute(style, 'id', 'theming-style');
|
|
39
|
-
const variables = this.getCssVariables();
|
|
40
|
-
this._renderer.setProperty(style, 'innerHTML', variables);
|
|
41
|
-
const head = this._document?.head ?? null;
|
|
42
|
-
if (!head) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
this._renderer.appendChild(this._document?.head, style);
|
|
46
|
-
}
|
|
47
|
-
getCssVariables() {
|
|
48
|
-
return this.all
|
|
49
|
-
.map(theme => `:root[${this._attribute}="${theme?.name}"] {${this.getThemeContents(theme)}}`)
|
|
50
|
-
.join('\n');
|
|
51
|
-
}
|
|
52
|
-
getThemeContents(theme) {
|
|
53
|
-
const themeData = theme?.data ?? {};
|
|
54
|
-
return Object.keys(themeData)
|
|
55
|
-
.map(key => `${key}: ${themeData?.[key]};`)
|
|
56
|
-
.join(' ');
|
|
57
|
-
}
|
|
58
|
-
setFirstTheme() {
|
|
59
|
-
const theme = this.all?.[0] ?? null;
|
|
60
|
-
if (!theme) {
|
|
61
|
-
throw new Error('No theme found.');
|
|
62
|
-
}
|
|
63
|
-
const themeName = theme?.name ?? null;
|
|
64
|
-
return this.set(themeName);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
Theming.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: Theming, deps: [{ token: i1.ThemingOptions }, { token: i0.RendererFactory2 }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
68
|
-
Theming.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: Theming });
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: Theming, decorators: [{
|
|
70
|
-
type: Injectable
|
|
71
|
-
}], ctorParameters: function () { return [{ type: i1.ThemingOptions }, { type: i0.RendererFactory2 }, { type: Document, decorators: [{
|
|
72
|
-
type: Optional
|
|
73
|
-
}, {
|
|
74
|
-
type: Inject,
|
|
75
|
-
args: [DOCUMENT]
|
|
76
|
-
}] }]; } });
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWluZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYmItZm91bmRhdGlvbi90aGVtaW5nL3NyYy9saWIvdGhlbWluZy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBOEIsTUFBTSxlQUFlLENBQUM7QUFFeEYsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLGlCQUFpQixDQUFDOzs7QUFJekMsTUFBTSxPQUFPLE9BQU87SUFTaEIsWUFBb0IsUUFBd0IsRUFDeEIsZ0JBQWtDLEVBQ0osU0FBbUI7UUFGakQsYUFBUSxHQUFSLFFBQVEsQ0FBZ0I7UUFDeEIscUJBQWdCLEdBQWhCLGdCQUFnQixDQUFrQjtRQUNKLGNBQVMsR0FBVCxTQUFTLENBQVU7UUFUckUsaUJBQWlCO1FBQ0EsZUFBVSxHQUFXLFlBQVksQ0FBQztRQUNsQyxjQUFTLEdBQWMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDLENBQUM7UUFFekYsU0FBUztRQUNELGtCQUFhLEdBQWlCLElBQUksQ0FBQztRQUt2QyxJQUFJLENBQUMsZUFBZSxFQUFFLENBQUM7UUFDdkIsSUFBSSxDQUFDLGF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BgJHtrZXl9OiAke3RoZW1lRGF0YT8uW2tleV19O2ApXG4gICAgICAgICAgICAuam9pbignICcpO1xuICAgIH1cblxuICAgIHByaXZhdGUgc2V0Rmlyc3RUaGVtZSgpIHtcbiAgICAgICAgY29uc3QgdGhlbWUgPSB0aGlzLmFsbD8uWzBdID8/IG51bGw7XG4gICAgICAgIGlmICghdGhlbWUpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTm8gdGhlbWUgZm91bmQuJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0aGVtZU5hbWUgPSB0aGVtZT8ubmFtZSA/PyBudWxsO1xuICAgICAgICByZXR1cm4gdGhpcy5zZXQodGhlbWVOYW1lKTtcbiAgICB9XG5cbn1cbiJdfQ==
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class Platform {
|
|
3
|
-
private _platformId;
|
|
4
|
-
constructor(_platformId: Object);
|
|
5
|
-
isBrowser: boolean;
|
|
6
|
-
isEdge: boolean;
|
|
7
|
-
isTrident: boolean;
|
|
8
|
-
isBlink: boolean;
|
|
9
|
-
isWebkit: boolean;
|
|
10
|
-
isChrome: boolean;
|
|
11
|
-
isFirefox: boolean;
|
|
12
|
-
isSafari: boolean;
|
|
13
|
-
isAndroid: boolean;
|
|
14
|
-
isIos: boolean;
|
|
15
|
-
isDesktop: boolean;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Platform, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<Platform>;
|
|
18
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ThemeData } from '../theming.interface';
|
|
2
|
-
export declare class Theme {
|
|
3
|
-
private _name;
|
|
4
|
-
private _data?;
|
|
5
|
-
private _parsed;
|
|
6
|
-
constructor(_name: string, _data?: ThemeData);
|
|
7
|
-
get name(): string;
|
|
8
|
-
get data(): Record<string, string>;
|
|
9
|
-
update(data: ThemeData): this;
|
|
10
|
-
protected parseData(data: object, scope?: string | null): any;
|
|
11
|
-
protected getFormattedToken(key: string, scope?: string | null): string;
|
|
12
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { RendererFactory2 } from '@angular/core';
|
|
2
|
-
import { ThemingOptions } from './theming.interface';
|
|
3
|
-
import { Theme } from './themes/theme';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class Theming {
|
|
6
|
-
private _options;
|
|
7
|
-
private _rendererFactory;
|
|
8
|
-
private _document;
|
|
9
|
-
private readonly _attribute;
|
|
10
|
-
private readonly _renderer;
|
|
11
|
-
private _currentTheme;
|
|
12
|
-
constructor(_options: ThemingOptions, _rendererFactory: RendererFactory2, _document: Document);
|
|
13
|
-
get all(): Theme[];
|
|
14
|
-
get current(): Theme;
|
|
15
|
-
set(name: string): void;
|
|
16
|
-
private setCssVariables;
|
|
17
|
-
private getCssVariables;
|
|
18
|
-
private getThemeContents;
|
|
19
|
-
private setFirstTheme;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Theming, [null, null, { optional: true; }]>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<Theming>;
|
|
22
|
-
}
|