@indigina/ui-kit 1.0.143 → 1.0.145
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/esm2020/lib/components/kit-toastr/kit-toastr.module.mjs +19 -13
- package/esm2020/lib/components/kit-toastr/kit-toastr.service.mjs +22 -4
- package/esm2020/public-api.mjs +2 -2
- package/fesm2015/indigina-ui-kit.mjs +40 -15
- package/fesm2015/indigina-ui-kit.mjs.map +1 -1
- package/fesm2020/indigina-ui-kit.mjs +40 -15
- package/fesm2020/indigina-ui-kit.mjs.map +1 -1
- package/lib/components/kit-toastr/kit-toastr.module.d.ts +8 -2
- package/lib/components/kit-toastr/kit-toastr.service.d.ts +15 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -19,7 +19,7 @@ import { DateInputsModule, DateRangePopupComponent, DateRangeService, TimePicker
|
|
|
19
19
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
20
20
|
import { TooltipDirective, TooltipModule } from '@progress/kendo-angular-tooltip';
|
|
21
21
|
import * as i1$3 from 'ngx-toastr';
|
|
22
|
-
import { ToastrModule } from 'ngx-toastr';
|
|
22
|
+
import { ToastrModule, TOAST_CONFIG, DefaultGlobalConfig } from 'ngx-toastr';
|
|
23
23
|
import * as i3 from '@angular/router';
|
|
24
24
|
import { RouterModule } from '@angular/router';
|
|
25
25
|
import { v4 } from 'uuid';
|
|
@@ -2205,19 +2205,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
2205
2205
|
}] });
|
|
2206
2206
|
|
|
2207
2207
|
class KitToastrModule {
|
|
2208
|
+
static forRoot(config = {}) {
|
|
2209
|
+
return {
|
|
2210
|
+
ngModule: ToastrModule,
|
|
2211
|
+
providers: [
|
|
2212
|
+
{
|
|
2213
|
+
provide: TOAST_CONFIG,
|
|
2214
|
+
useValue: {
|
|
2215
|
+
default: DefaultGlobalConfig,
|
|
2216
|
+
config,
|
|
2217
|
+
},
|
|
2218
|
+
},
|
|
2219
|
+
],
|
|
2220
|
+
};
|
|
2221
|
+
}
|
|
2208
2222
|
}
|
|
2209
2223
|
KitToastrModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KitToastrModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2210
|
-
KitToastrModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KitToastrModule
|
|
2211
|
-
KitToastrModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KitToastrModule
|
|
2212
|
-
ToastrModule.forRoot(),
|
|
2213
|
-
]] });
|
|
2224
|
+
KitToastrModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KitToastrModule });
|
|
2225
|
+
KitToastrModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KitToastrModule });
|
|
2214
2226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KitToastrModule, decorators: [{
|
|
2215
|
-
type: NgModule
|
|
2216
|
-
args: [{
|
|
2217
|
-
imports: [
|
|
2218
|
-
ToastrModule.forRoot(),
|
|
2219
|
-
],
|
|
2220
|
-
}]
|
|
2227
|
+
type: NgModule
|
|
2221
2228
|
}] });
|
|
2222
2229
|
|
|
2223
2230
|
const DEFAULT_TOASTR_CLASS = 'ngx-toastr display-block kit-toastr';
|
|
@@ -2229,6 +2236,17 @@ var KitToastrType;
|
|
|
2229
2236
|
KitToastrType["SUCCESS"] = "toast-success";
|
|
2230
2237
|
KitToastrType["WARNING"] = "toast-warning";
|
|
2231
2238
|
})(KitToastrType || (KitToastrType = {}));
|
|
2239
|
+
var KitToastrPosition;
|
|
2240
|
+
(function (KitToastrPosition) {
|
|
2241
|
+
KitToastrPosition["TOP_CENTER"] = "toast-top-center";
|
|
2242
|
+
KitToastrPosition["TOP_LEFT"] = "toast-top-left";
|
|
2243
|
+
KitToastrPosition["TOP_RIGHT"] = "toast-top-right";
|
|
2244
|
+
KitToastrPosition["BOTTOM_CENTER"] = "toast-bottom-center";
|
|
2245
|
+
KitToastrPosition["BOTTOM_LEFT"] = "toast-bottom-left";
|
|
2246
|
+
KitToastrPosition["BOTTOM_RIGHT"] = "toast-bottom-right";
|
|
2247
|
+
KitToastrPosition["TOP_FULL_WIDTH"] = "toast-top-full-width";
|
|
2248
|
+
KitToastrPosition["BOTTOM_FULL_WIDTH"] = "toast-bottom-full-width";
|
|
2249
|
+
})(KitToastrPosition || (KitToastrPosition = {}));
|
|
2232
2250
|
class KitToastrService {
|
|
2233
2251
|
constructor(toastrService, rendererFactory2) {
|
|
2234
2252
|
this.toastrService = toastrService;
|
|
@@ -2237,7 +2255,10 @@ class KitToastrService {
|
|
|
2237
2255
|
}
|
|
2238
2256
|
show(config) {
|
|
2239
2257
|
const toastr = this.toastrService.show(config.message, config.title, this.getConfig(config));
|
|
2240
|
-
|
|
2258
|
+
if (config.overlay) {
|
|
2259
|
+
toastr.onHidden.subscribe(() => this.removeOverlayContainerClass());
|
|
2260
|
+
this.addOverlayContainerClass();
|
|
2261
|
+
}
|
|
2241
2262
|
// "onTap" occurs whenever toastr has been clicked up
|
|
2242
2263
|
// so we need to remove them only if "dismissible" is set
|
|
2243
2264
|
if (config.dismissible) {
|
|
@@ -2249,9 +2270,13 @@ class KitToastrService {
|
|
|
2249
2270
|
}
|
|
2250
2271
|
getConfig(baseConfig) {
|
|
2251
2272
|
const tapToDismissClass = baseConfig.dismissible && 'kit-toastr-dismissible' || '';
|
|
2273
|
+
const defaultPosition = KitToastrPosition.TOP_CENTER;
|
|
2274
|
+
const defaultTimeout = 3000;
|
|
2252
2275
|
return {
|
|
2253
|
-
positionClass:
|
|
2254
|
-
disableTimeOut:
|
|
2276
|
+
positionClass: baseConfig.position || defaultPosition,
|
|
2277
|
+
disableTimeOut: baseConfig.disableTimeout,
|
|
2278
|
+
timeOut: baseConfig.timeout || defaultTimeout,
|
|
2279
|
+
progressBar: baseConfig.progressbar,
|
|
2255
2280
|
tapToDismiss: baseConfig.dismissible,
|
|
2256
2281
|
toastClass: `${DEFAULT_TOASTR_CLASS} ${baseConfig.type} ${tapToDismissClass}`,
|
|
2257
2282
|
};
|
|
@@ -3173,5 +3198,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
3173
3198
|
* Generated bundle index. Do not edit.
|
|
3174
3199
|
*/
|
|
3175
3200
|
|
|
3176
|
-
export { AbstractKitCtaPanelConfirmationComponent, KitAutocompleteComponent, KitAutocompleteModule, KitAutocompleteState, KitButtonComponent, KitButtonIconPosition, KitButtonKind, KitButtonModule, KitButtonType, KitCheckboxComponent, KitCheckboxModule, KitCheckboxState, KitCtaPanelAbstractConfirmationComponent, KitCtaPanelAbstractConfirmationModule, KitCtaPanelActionComponent, KitCtaPanelActionModule, KitCtaPanelConfirmationComponent, KitCtaPanelConfirmationModule, KitCtaPanelItemComponent, KitCtaPanelItemModule, KitCtaPanelItemType, KitDaterangeComponent, KitDaterangeIconPosition, KitDaterangeModule, KitDaterangeType, KitDatetimepickerComponent, KitDatetimepickerModule, KitDialogActionsComponent, KitDialogActionsModule, KitDialogComponent, KitDialogModule, KitDialogService, KitDropdownComponent, KitDropdownModule, KitDropdownState, KitInputMessageComponent, KitInputMessageModule, KitInputMessageType, KitLoaderComponent, KitLoaderModule, KitLocationStepperComponent, KitLocationStepperModule, KitNavigationTabsComponent, KitNavigationTabsItemIconType, KitNavigationTabsModule, KitNoteComponent, KitNoteModule, KitNotificationComponent, KitNotificationModule, KitNotificationType, KitNumericTextboxComponent, KitNumericTextboxModule, KitPillComponent, KitPillModule, KitQueryParamsName, KitQueryParamsService, KitRadioButtonComponent, KitRadioButtonModule, KitSvgIcon, KitSvgIconComponent, KitSvgIconModule, KitSvgSpriteComponent, KitSvgSpriteModule, KitSwitchComponent, KitSwitchMode, KitSwitchModule, KitSwitchState, KitTextLabelComponent, KitTextLabelModule, KitTextareaAutoresizeDirective, KitTextareaComponent, KitTextareaModule, KitTextareaState, KitTextboxComponent, KitTextboxModule, KitTimepickerComponent, KitTimepickerModule, KitToastrModule, KitToastrService, KitToastrType, KitToggleComponent, KitToggleModule, KitTooltipDirective, KitTooltipModule, KitTooltipPosition, KitUnitsTextboxComponent, KitUnitsTextboxDropdownPosition, KitUnitsTextboxModule, KitUnitsTextboxType, buildRandomUUID };
|
|
3201
|
+
export { AbstractKitCtaPanelConfirmationComponent, KitAutocompleteComponent, KitAutocompleteModule, KitAutocompleteState, KitButtonComponent, KitButtonIconPosition, KitButtonKind, KitButtonModule, KitButtonType, KitCheckboxComponent, KitCheckboxModule, KitCheckboxState, KitCtaPanelAbstractConfirmationComponent, KitCtaPanelAbstractConfirmationModule, KitCtaPanelActionComponent, KitCtaPanelActionModule, KitCtaPanelConfirmationComponent, KitCtaPanelConfirmationModule, KitCtaPanelItemComponent, KitCtaPanelItemModule, KitCtaPanelItemType, KitDaterangeComponent, KitDaterangeIconPosition, KitDaterangeModule, KitDaterangeType, KitDatetimepickerComponent, KitDatetimepickerModule, KitDialogActionsComponent, KitDialogActionsModule, KitDialogComponent, KitDialogModule, KitDialogService, KitDropdownComponent, KitDropdownModule, KitDropdownState, KitInputMessageComponent, KitInputMessageModule, KitInputMessageType, KitLoaderComponent, KitLoaderModule, KitLocationStepperComponent, KitLocationStepperModule, KitNavigationTabsComponent, KitNavigationTabsItemIconType, KitNavigationTabsModule, KitNoteComponent, KitNoteModule, KitNotificationComponent, KitNotificationModule, KitNotificationType, KitNumericTextboxComponent, KitNumericTextboxModule, KitPillComponent, KitPillModule, KitQueryParamsName, KitQueryParamsService, KitRadioButtonComponent, KitRadioButtonModule, KitSvgIcon, KitSvgIconComponent, KitSvgIconModule, KitSvgSpriteComponent, KitSvgSpriteModule, KitSwitchComponent, KitSwitchMode, KitSwitchModule, KitSwitchState, KitTextLabelComponent, KitTextLabelModule, KitTextareaAutoresizeDirective, KitTextareaComponent, KitTextareaModule, KitTextareaState, KitTextboxComponent, KitTextboxModule, KitTimepickerComponent, KitTimepickerModule, KitToastrModule, KitToastrPosition, KitToastrService, KitToastrType, KitToggleComponent, KitToggleModule, KitTooltipDirective, KitTooltipModule, KitTooltipPosition, KitUnitsTextboxComponent, KitUnitsTextboxDropdownPosition, KitUnitsTextboxModule, KitUnitsTextboxType, buildRandomUUID };
|
|
3177
3202
|
//# sourceMappingURL=indigina-ui-kit.mjs.map
|