oasys-lib 2.24.0-theming.1 → 2.24.1
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/oasys-lib.mjs +38 -95
- package/fesm2022/oasys-lib.mjs.map +1 -1
- package/index.d.ts +28 -48
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/bloomandwild/variables.css +1 -15
- package/src/assets/bloomon/variables.css +1 -15
- package/src/assets/global/scss-breakpoints.scss +1 -1
- package/src/assets/style.scss +12 -14
- package/src/assets/bloomandwild-loyalty-tier-1/variables.css +0 -1356
- package/src/assets/bloomandwild-loyalty-tier-2/variables.css +0 -1350
- package/src/assets/bloomon-loyalty-tier-1/variables.css +0 -1356
- package/src/assets/bloomon-loyalty-tier-2/variables.css +0 -1350
package/fesm2022/oasys-lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Directive, Injectable, DOCUMENT, Inject, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, HostListener, EventEmitter, ViewChild, Output, ContentChild, NgModule, HostBinding, signal, forwardRef, computed, input, CUSTOM_ELEMENTS_SCHEMA, ViewChildren, ContentChildren
|
|
2
|
+
import { inject, ElementRef, Directive, Injectable, DOCUMENT, Inject, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, HostListener, EventEmitter, ViewChild, Output, ContentChild, NgModule, HostBinding, signal, forwardRef, computed, input, CUSTOM_ELEMENTS_SCHEMA, ViewChildren, ContentChildren } from '@angular/core';
|
|
3
3
|
import { BehaviorSubject, Subject, Observable } from 'rxjs';
|
|
4
4
|
import { takeUntil, take, map } from 'rxjs/operators';
|
|
5
5
|
import * as i1 from '@angular/cdk/layout';
|
|
@@ -3853,8 +3853,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3853
3853
|
args: ['document:click', ['$event.target']]
|
|
3854
3854
|
}] } });
|
|
3855
3855
|
|
|
3856
|
+
/** @deprecated Import the standalone ComboboxComponent directly instead. */
|
|
3856
3857
|
/**
|
|
3857
|
-
* @deprecated Import the standalone ComboboxComponent directly instead.
|
|
3858
3858
|
* @ngModule OasysComboboxModule
|
|
3859
3859
|
* @description
|
|
3860
3860
|
*
|
|
@@ -4076,6 +4076,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4076
4076
|
}] } });
|
|
4077
4077
|
|
|
4078
4078
|
/** @deprecated Import the standalone tab components (OasysTabGroupComponent, OasysTabComponent, OasysTabActiveComponent, OasysTabHeaderComponent) directly instead. */
|
|
4079
|
+
/**
|
|
4080
|
+
* @ngModule OasysTabsModule
|
|
4081
|
+
* @description
|
|
4082
|
+
*
|
|
4083
|
+
* Tabs provide a structured way to organize and navigate through different areas of an application.
|
|
4084
|
+
*
|
|
4085
|
+
* @usageNotes
|
|
4086
|
+
*
|
|
4087
|
+
* @example
|
|
4088
|
+
* <ui-tab-group tab_size=${args['tab_size']} >
|
|
4089
|
+
* <!-- Tab -->
|
|
4090
|
+
* <ui-tab tab_label="${args['tab_label']}">
|
|
4091
|
+
* <!-- Tab content -->
|
|
4092
|
+
* </ui-tab>
|
|
4093
|
+
*
|
|
4094
|
+
* <!-- Tab -->
|
|
4095
|
+
* <ui-tab tab_label="Tab 2">
|
|
4096
|
+
* <!-- Tab content -->
|
|
4097
|
+
* </ui-tab>
|
|
4098
|
+
*
|
|
4099
|
+
* <!-- Tab -->
|
|
4100
|
+
* <ui-tab tab_label="Tab 3" [tab_active]=${args['tab_active']}>
|
|
4101
|
+
* <!-- Tab content -->
|
|
4102
|
+
* </ui-tab>
|
|
4103
|
+
* </ui-tab-group>
|
|
4104
|
+
*
|
|
4105
|
+
* Pug:
|
|
4106
|
+
* ui-tab-group(tab_size="${args['tab_size']}")
|
|
4107
|
+
* ui-tab(tab_label="${args['tab_label']}")
|
|
4108
|
+
* <!-- Tab content body -->
|
|
4109
|
+
*
|
|
4110
|
+
* ui-tab(tab_label="Tab 2" tab_active="${args['tab_active']}")
|
|
4111
|
+
* <!-- Tab content body -->
|
|
4112
|
+
* @OasysLib
|
|
4113
|
+
*/
|
|
4079
4114
|
class OasysTabsModule {
|
|
4080
4115
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OasysTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4081
4116
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: OasysTabsModule, imports: [OasysTabGroupComponent,
|
|
@@ -4195,98 +4230,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4195
4230
|
}]
|
|
4196
4231
|
}] });
|
|
4197
4232
|
|
|
4198
|
-
const THEME_VALUE = {
|
|
4199
|
-
DEFAULT: 'default',
|
|
4200
|
-
TIER_1: 'loyalty-tier-1',
|
|
4201
|
-
TIER_2: 'loyalty-tier-2',
|
|
4202
|
-
};
|
|
4203
|
-
const SCOPED_THEME_CLASSES = [THEME_VALUE.TIER_1, THEME_VALUE.TIER_2];
|
|
4204
|
-
class OasysThemeDirective {
|
|
4205
|
-
uiThemeDashed = input(THEME_VALUE.DEFAULT, ...(ngDevMode ? [{ debugName: "uiThemeDashed", alias: 'ui-theme' }] : [{ alias: 'ui-theme' }]));
|
|
4206
|
-
uiThemeCamel = input(undefined, ...(ngDevMode ? [{ debugName: "uiThemeCamel", alias: 'uiTheme' }] : [{ alias: 'uiTheme' }]));
|
|
4207
|
-
elementRef = inject(ElementRef);
|
|
4208
|
-
appliedDefaultBrandClass;
|
|
4209
|
-
appliedTheme;
|
|
4210
|
-
constructor() {
|
|
4211
|
-
effect(() => {
|
|
4212
|
-
const nextTheme = this.uiThemeCamel() ?? this.uiThemeDashed();
|
|
4213
|
-
this.applyTheme(nextTheme);
|
|
4214
|
-
});
|
|
4215
|
-
}
|
|
4216
|
-
applyTheme(nextTheme) {
|
|
4217
|
-
if (nextTheme === this.appliedTheme)
|
|
4218
|
-
return;
|
|
4219
|
-
const host = this.elementRef.nativeElement;
|
|
4220
|
-
const classList = host.classList;
|
|
4221
|
-
if (nextTheme !== THEME_VALUE.DEFAULT) {
|
|
4222
|
-
// Remove previously applied default reset class.
|
|
4223
|
-
if (this.appliedDefaultBrandClass) {
|
|
4224
|
-
classList.remove(this.appliedDefaultBrandClass);
|
|
4225
|
-
this.appliedDefaultBrandClass = undefined;
|
|
4226
|
-
}
|
|
4227
|
-
// Remove all scoped theme classes before applying the next one.
|
|
4228
|
-
SCOPED_THEME_CLASSES.forEach((themeClass) => {
|
|
4229
|
-
classList.remove(themeClass);
|
|
4230
|
-
});
|
|
4231
|
-
if (!classList.contains(nextTheme))
|
|
4232
|
-
classList.add(nextTheme);
|
|
4233
|
-
this.appliedTheme = nextTheme;
|
|
4234
|
-
return;
|
|
4235
|
-
}
|
|
4236
|
-
SCOPED_THEME_CLASSES.forEach((themeClass) => {
|
|
4237
|
-
classList.remove(themeClass);
|
|
4238
|
-
});
|
|
4239
|
-
const defaultBrandClass = this.findNearestBrandTokenClass(host);
|
|
4240
|
-
if (defaultBrandClass) {
|
|
4241
|
-
if (this.appliedDefaultBrandClass && this.appliedDefaultBrandClass !== defaultBrandClass) {
|
|
4242
|
-
classList.remove(this.appliedDefaultBrandClass);
|
|
4243
|
-
}
|
|
4244
|
-
classList.add(defaultBrandClass);
|
|
4245
|
-
this.appliedDefaultBrandClass = defaultBrandClass;
|
|
4246
|
-
}
|
|
4247
|
-
else if (this.appliedDefaultBrandClass) {
|
|
4248
|
-
classList.remove(this.appliedDefaultBrandClass);
|
|
4249
|
-
this.appliedDefaultBrandClass = undefined;
|
|
4250
|
-
}
|
|
4251
|
-
this.appliedTheme = nextTheme;
|
|
4252
|
-
}
|
|
4253
|
-
findNearestBrandTokenClass(host) {
|
|
4254
|
-
let node = host.parentElement;
|
|
4255
|
-
while (node) {
|
|
4256
|
-
const classList = node.classList;
|
|
4257
|
-
for (let i = 0; i < classList.length; i += 1) {
|
|
4258
|
-
const className = classList.item(i);
|
|
4259
|
-
if (className?.startsWith('brand-tokens-'))
|
|
4260
|
-
return className;
|
|
4261
|
-
}
|
|
4262
|
-
node = node.parentElement;
|
|
4263
|
-
}
|
|
4264
|
-
return undefined;
|
|
4265
|
-
}
|
|
4266
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OasysThemeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4267
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type: OasysThemeDirective, isStandalone: true, selector: "[ui-theme], [uiTheme]", inputs: { uiThemeDashed: { classPropertyName: "uiThemeDashed", publicName: "ui-theme", isSignal: true, isRequired: false, transformFunction: null }, uiThemeCamel: { classPropertyName: "uiThemeCamel", publicName: "uiTheme", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
4268
|
-
}
|
|
4269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OasysThemeDirective, decorators: [{
|
|
4270
|
-
type: Directive,
|
|
4271
|
-
args: [{
|
|
4272
|
-
selector: '[ui-theme], [uiTheme]',
|
|
4273
|
-
standalone: true,
|
|
4274
|
-
}]
|
|
4275
|
-
}], ctorParameters: () => [], propDecorators: { uiThemeDashed: [{ type: i0.Input, args: [{ isSignal: true, alias: "ui-theme", required: false }] }], uiThemeCamel: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiTheme", required: false }] }] } });
|
|
4276
|
-
|
|
4277
|
-
class OasysDirectivesModule {
|
|
4278
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OasysDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4279
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: OasysDirectivesModule, imports: [OasysHrefDirective, OasysAutofocusDirective, OasysThemeDirective], exports: [OasysHrefDirective, OasysAutofocusDirective, OasysThemeDirective] });
|
|
4280
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OasysDirectivesModule });
|
|
4281
|
-
}
|
|
4282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OasysDirectivesModule, decorators: [{
|
|
4283
|
-
type: NgModule,
|
|
4284
|
-
args: [{
|
|
4285
|
-
imports: [OasysHrefDirective, OasysAutofocusDirective, OasysThemeDirective],
|
|
4286
|
-
exports: [OasysHrefDirective, OasysAutofocusDirective, OasysThemeDirective],
|
|
4287
|
-
}]
|
|
4288
|
-
}] });
|
|
4289
|
-
|
|
4290
4233
|
/*
|
|
4291
4234
|
* Public API Surface of oasys-lib
|
|
4292
4235
|
*/
|
|
@@ -4295,5 +4238,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4295
4238
|
* Generated bundle index. Do not edit.
|
|
4296
4239
|
*/
|
|
4297
4240
|
|
|
4298
|
-
export { BannerComponent, BreadcrumbsComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipComponent, ComboboxComponent, DividerComponent, FormErrorsComponent, FormGroupComponent, HeroComponent, IconComponent, ImageComponent, LayoutBoxComponent, LayoutContainerComponent, LayoutGridColumnComponent, LayoutGridComponent, LayoutStackComponent, MEDIA_BASE_URL_TOKEN, OasysAlertCancelDirective, OasysAlertComponent, OasysAlertConfirmDirective, OasysAlertContentDirective, OasysAlertModule, OasysAlertTitleDirective,
|
|
4241
|
+
export { BannerComponent, BreadcrumbsComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipComponent, ComboboxComponent, DividerComponent, FormErrorsComponent, FormGroupComponent, HeroComponent, IconComponent, ImageComponent, LayoutBoxComponent, LayoutContainerComponent, LayoutGridColumnComponent, LayoutGridComponent, LayoutStackComponent, MEDIA_BASE_URL_TOKEN, OasysAlertCancelDirective, OasysAlertComponent, OasysAlertConfirmDirective, OasysAlertContentDirective, OasysAlertModule, OasysAlertTitleDirective, BannerComponent as OasysBannerComponent, OasysBannerModule, OasysBreadcrumbModule, BreadcrumbsComponent as OasysBreadcrumbsComponent, OasysButtonComponent, OasysButtonGroupComponent, OasysButtonGroupModule, OasysButtonModule, CardComponent as OasysCardComponent, OasysCardModule, CarouselComponent as OasysCarouselComponent, OasysCarouselModule, CheckboxComponent as OasysCheckboxComponent, OasysCheckboxModule, ChipComponent as OasysChipComponent, OasysChipModule, ComboboxComponent as OasysComboboxComponent, OasysComboboxModule, DividerComponent as OasysDividerComponent, OasysDividerModule, FormErrorsComponent as OasysFormErrorsComponent, OasysFormErrorsModule, OasysFormErrorsSummaryComponent, OasysFormErrorsSummaryItemComponent, OasysFormErrorsSummaryTitleComponent, FormGroupComponent as OasysFormGroupComponent, OasysFormGroupModule, OasysHeadingComponent, OasysHeadingModule, HeroComponent as OasysHeroComponent, OasysHeroModule, IconComponent as OasysIconComponent, OasysIconModule, ImageComponent as OasysImageComponent, OasysImageModule, LayoutBoxComponent as OasysLayoutBoxComponent, LayoutContainerComponent as OasysLayoutContainerComponent, LayoutGridColumnComponent as OasysLayoutGridColumnComponent, LayoutGridComponent as OasysLayoutGridComponent, OasysLayoutModule, LayoutStackComponent as OasysLayoutStackComponent, OasysPillComponent, OasysPillGroupComponent, OasysPillGroupModule, OasysPillModule, ProgressBarComponent as OasysProgressBarComponent, PromoCardComponent as OasysPromoCardComponent, OasysPromoCardModule, RadioComponent as OasysRadioComponent, OasysRadioModule, SectionComponent as OasysSectionComponent, SelectCardComponent as OasysSelectCardComponent, OasysSelectCardModule, SeoBlockComponent as OasysSeoBlockComponent, OasysSeoBlockModule, OasysTabComponent, OasysTabGroupComponent, OasysTabsModule, TextComponent as OasysTextComponent, TextInputComponent as OasysTextInputComponent, OasysTextInputModule, OasysTextModule, ProgressBarComponent, PromoCardComponent, ROUTING_HANDLER, RadioComponent, SWIPER_PROVIDER_TOKEN, SectionComponent, SectionModule, SelectCardComponent, SeoBlockComponent, SwiperProvider, TextComponent };
|
|
4299
4242
|
//# sourceMappingURL=oasys-lib.mjs.map
|