monkey-front-core 0.0.295 → 0.0.297
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/core/interfaces/index.mjs +10 -9
- package/esm2020/lib/core/interfaces/monkeyecx-storage.mjs +2 -0
- package/esm2020/lib/store/actions/index.mjs +2 -0
- package/esm2020/lib/store/actions/monkeyecx-storage.actions.mjs +8 -0
- package/esm2020/lib/store/index.mjs +3 -0
- package/esm2020/lib/store/reducers/index.mjs +3 -0
- package/esm2020/lib/store/reducers/monkeyecx-seeder.reducer.mjs +18 -0
- package/esm2020/lib/store/reducers/monkeyecx-storage.reducer.mjs +40 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/monkey-front-core.mjs +91 -1
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +101 -1
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/index.d.ts +9 -8
- package/lib/core/interfaces/monkeyecx-storage.d.ts +38 -0
- package/lib/store/actions/index.d.ts +1 -0
- package/lib/store/actions/monkeyecx-storage.actions.d.ts +23 -0
- package/lib/store/index.d.ts +2 -0
- package/lib/store/reducers/index.d.ts +2 -0
- package/lib/store/reducers/monkeyecx-seeder.reducer.d.ts +2 -0
- package/lib/store/reducers/monkeyecx-storage.reducer.d.ts +13 -0
- package/monkey-front-core-0.0.297.tgz +0 -0
- package/package.json +7 -3
- package/public-api.d.ts +1 -0
- package/monkey-front-core-0.0.295.tgz +0 -0
|
@@ -24,6 +24,8 @@ import { datadogRum } from '@datadog/browser-rum';
|
|
|
24
24
|
import * as i1$5 from '@angular/service-worker';
|
|
25
25
|
import { ServiceWorkerModule } from '@angular/service-worker';
|
|
26
26
|
import { initialize } from 'launchdarkly-js-client-sdk';
|
|
27
|
+
import { createAction, props, createReducer, on } from '@ngrx/store';
|
|
28
|
+
import { createEntityAdapter } from '@ngrx/entity';
|
|
27
29
|
|
|
28
30
|
class AlertsComponent {
|
|
29
31
|
constructor(modalService) {
|
|
@@ -5423,6 +5425,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
5423
5425
|
}]
|
|
5424
5426
|
}] });
|
|
5425
5427
|
|
|
5428
|
+
const clear = createAction('[MECX Core Storage] Clear All');
|
|
5429
|
+
const create = createAction('[MECX Core Storage] Create', props());
|
|
5430
|
+
const updateControl = createAction('[MECX Core Storage] Update Control', props());
|
|
5431
|
+
const updateOne = createAction('[MECX Core Storage] Update One', props());
|
|
5432
|
+
const deleteOne = createAction('[MECX Core Storage] Delete One', props());
|
|
5433
|
+
|
|
5434
|
+
var monkeyecxStorage_actions = /*#__PURE__*/Object.freeze({
|
|
5435
|
+
__proto__: null,
|
|
5436
|
+
clear: clear,
|
|
5437
|
+
create: create,
|
|
5438
|
+
updateControl: updateControl,
|
|
5439
|
+
updateOne: updateOne,
|
|
5440
|
+
deleteOne: deleteOne
|
|
5441
|
+
});
|
|
5442
|
+
|
|
5443
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
5444
|
+
__proto__: null,
|
|
5445
|
+
monkeyecxStorage: monkeyecxStorage_actions
|
|
5446
|
+
});
|
|
5447
|
+
|
|
5448
|
+
const seederReducer = (reducer) => {
|
|
5449
|
+
return (state, action) => {
|
|
5450
|
+
/* if (action.type === INIT || action.type === UPDATE) {
|
|
5451
|
+
const storageValue = localStorage.getItem('state');
|
|
5452
|
+
if (storageValue) {
|
|
5453
|
+
try {
|
|
5454
|
+
return JSON.parse(storageValue);
|
|
5455
|
+
} catch {
|
|
5456
|
+
localStorage.removeItem('state');
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
} */
|
|
5460
|
+
const nextState = reducer(state, action);
|
|
5461
|
+
localStorage.setItem('state', JSON.stringify(nextState));
|
|
5462
|
+
return nextState;
|
|
5463
|
+
};
|
|
5464
|
+
};
|
|
5465
|
+
|
|
5466
|
+
var monkeyecxSeeder_reducer = /*#__PURE__*/Object.freeze({
|
|
5467
|
+
__proto__: null,
|
|
5468
|
+
seederReducer: seederReducer
|
|
5469
|
+
});
|
|
5470
|
+
|
|
5471
|
+
const featureKey = 'mecx-core-storage';
|
|
5472
|
+
const adapter = createEntityAdapter({
|
|
5473
|
+
selectId: (item) => {
|
|
5474
|
+
return item.username;
|
|
5475
|
+
}
|
|
5476
|
+
});
|
|
5477
|
+
const initialState = adapter.getInitialState({
|
|
5478
|
+
control: {
|
|
5479
|
+
isLoading: false
|
|
5480
|
+
},
|
|
5481
|
+
error: null
|
|
5482
|
+
});
|
|
5483
|
+
const reducer = createReducer(initialState, on(clear, (state) => {
|
|
5484
|
+
return adapter.removeAll(state);
|
|
5485
|
+
}), on(create, (state, action) => {
|
|
5486
|
+
return adapter.upsertMany(action.data, {
|
|
5487
|
+
...state
|
|
5488
|
+
});
|
|
5489
|
+
}), on(updateControl, (state, action) => {
|
|
5490
|
+
return {
|
|
5491
|
+
...state,
|
|
5492
|
+
control: {
|
|
5493
|
+
...state.control,
|
|
5494
|
+
...action.data
|
|
5495
|
+
}
|
|
5496
|
+
};
|
|
5497
|
+
}), on(updateOne, (state, action) => {
|
|
5498
|
+
const { username } = action.data;
|
|
5499
|
+
return adapter.upsertOne({ ...action.data, username }, {
|
|
5500
|
+
...state
|
|
5501
|
+
});
|
|
5502
|
+
}), on(deleteOne, (state, action) => {
|
|
5503
|
+
const { username } = action.data;
|
|
5504
|
+
return adapter.removeOne(username, state);
|
|
5505
|
+
}));
|
|
5506
|
+
const { selectAll, selectEntities, selectIds, selectTotal } = adapter.getSelectors();
|
|
5507
|
+
|
|
5508
|
+
var monkeyecxStorage_reducer = /*#__PURE__*/Object.freeze({
|
|
5509
|
+
__proto__: null,
|
|
5510
|
+
featureKey: featureKey,
|
|
5511
|
+
adapter: adapter,
|
|
5512
|
+
initialState: initialState,
|
|
5513
|
+
reducer: reducer,
|
|
5514
|
+
selectAll: selectAll,
|
|
5515
|
+
selectEntities: selectEntities,
|
|
5516
|
+
selectIds: selectIds,
|
|
5517
|
+
selectTotal: selectTotal
|
|
5518
|
+
});
|
|
5519
|
+
|
|
5520
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
5521
|
+
__proto__: null,
|
|
5522
|
+
fromMonkeyecxSeeder: monkeyecxSeeder_reducer,
|
|
5523
|
+
fromMonkeyecxStorage: monkeyecxStorage_reducer
|
|
5524
|
+
});
|
|
5525
|
+
|
|
5426
5526
|
/*
|
|
5427
5527
|
* Public API Surface of monkey-front-core
|
|
5428
5528
|
*/
|
|
@@ -5431,5 +5531,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
5431
5531
|
* Generated bundle index. Do not edit.
|
|
5432
5532
|
*/
|
|
5433
5533
|
|
|
5434
|
-
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
5534
|
+
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, index$1 as actions, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, index as reducers, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
5435
5535
|
//# sourceMappingURL=monkey-front-core.mjs.map
|