monkey-front-core 0.0.459 → 0.0.461
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/monkeyecx-pagination.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-store.mjs +1 -1
- package/esm2020/lib/core/services/store/index.mjs +3 -1
- package/esm2020/lib/core/services/store/monkeyecx-store.actions.mjs +24 -0
- package/esm2020/lib/core/services/store/monkeyecx-store.selector.mjs +68 -0
- package/fesm2015/monkey-front-core.mjs +95 -1
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +91 -1
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/monkeyecx-pagination.d.ts +2 -1
- package/lib/core/interfaces/monkeyecx-store.d.ts +3 -0
- package/lib/core/services/store/index.d.ts +2 -0
- package/lib/core/services/store/monkeyecx-store.actions.d.ts +51 -0
- package/lib/core/services/store/monkeyecx-store.selector.d.ts +28 -0
- package/monkey-front-core-0.0.461.tgz +0 -0
- package/package.json +2 -1
- package/monkey-front-core-0.0.459.tgz +0 -0
|
@@ -27,6 +27,7 @@ import { datadogRum } from '@datadog/browser-rum';
|
|
|
27
27
|
import * as i1$5 from '@angular/service-worker';
|
|
28
28
|
import { ServiceWorkerModule } from '@angular/service-worker';
|
|
29
29
|
import { initialize } from 'launchdarkly-js-client-sdk';
|
|
30
|
+
import { parseUrl } from 'query-string';
|
|
30
31
|
|
|
31
32
|
class AlertsComponent {
|
|
32
33
|
constructor(modalService) {
|
|
@@ -5531,6 +5532,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
5531
5532
|
}]
|
|
5532
5533
|
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxLoggedHandlingService }]; }, propDecorators: { doCall: [], doGenericCall: [] } });
|
|
5533
5534
|
|
|
5535
|
+
class MonkeyEcxCommonsActions {
|
|
5536
|
+
static getActions(actionName) {
|
|
5537
|
+
const clear = createAction(`[${actionName}] Clear All`, props());
|
|
5538
|
+
const load = createAction(`[${actionName}] Load`, props());
|
|
5539
|
+
const loadPagination = createAction(`[${actionName} Pagination] Load`, props());
|
|
5540
|
+
const updateAll = createAction(`[${actionName}] Update All`, props());
|
|
5541
|
+
const removeOne = createAction(`[${actionName}] Remove One`, props());
|
|
5542
|
+
const updateControl = createAction(`[${actionName}] Update Control`, props());
|
|
5543
|
+
const updatePage = createAction(`[${actionName}] Update Page`, props());
|
|
5544
|
+
const updateLinks = createAction(`[${actionName}] Update Links`, props());
|
|
5545
|
+
return {
|
|
5546
|
+
clear,
|
|
5547
|
+
load,
|
|
5548
|
+
loadPagination,
|
|
5549
|
+
removeOne,
|
|
5550
|
+
updateAll,
|
|
5551
|
+
updateControl,
|
|
5552
|
+
updateLinks,
|
|
5553
|
+
updatePage
|
|
5554
|
+
};
|
|
5555
|
+
}
|
|
5556
|
+
}
|
|
5557
|
+
|
|
5558
|
+
const urlHasField = (url, field) => {
|
|
5559
|
+
const obj = parseUrl(url);
|
|
5560
|
+
return !!obj?.query?.[field];
|
|
5561
|
+
};
|
|
5562
|
+
class MonkeyEcxCommonsSelectors {
|
|
5563
|
+
static getSelectors(reducer) {
|
|
5564
|
+
const selectState = createFeatureSelector(reducer.featureKey);
|
|
5565
|
+
const selectAll = createSelector(selectState, reducer.selectAll);
|
|
5566
|
+
const selectByIdentifier = (props) => {
|
|
5567
|
+
return createSelector(selectAll, (entities) => {
|
|
5568
|
+
const result = entities.filter((_) => {
|
|
5569
|
+
return _.identifier === props.identifier;
|
|
5570
|
+
});
|
|
5571
|
+
return result;
|
|
5572
|
+
});
|
|
5573
|
+
};
|
|
5574
|
+
const selectPagination = (props) => {
|
|
5575
|
+
return createSelector(selectState, (state) => {
|
|
5576
|
+
return state?.pagination?.[props.identifier];
|
|
5577
|
+
});
|
|
5578
|
+
};
|
|
5579
|
+
const selectControl = () => {
|
|
5580
|
+
return createSelector(selectState, (state) => {
|
|
5581
|
+
return state.control;
|
|
5582
|
+
});
|
|
5583
|
+
};
|
|
5584
|
+
const selectPage = (props) => {
|
|
5585
|
+
return createSelector(selectState, (state) => {
|
|
5586
|
+
return state.page?.[props.identifier];
|
|
5587
|
+
});
|
|
5588
|
+
};
|
|
5589
|
+
const paginationHasDifference = (props) => {
|
|
5590
|
+
return createSelector(selectState, (state) => {
|
|
5591
|
+
const { pagination } = state;
|
|
5592
|
+
const { identifier, url } = props;
|
|
5593
|
+
let hasDifference = false;
|
|
5594
|
+
let hasField = false;
|
|
5595
|
+
try {
|
|
5596
|
+
const handlePaginationUrl = parseUrl(`${pagination?.[identifier]?.url}`);
|
|
5597
|
+
const handleUrl = parseUrl(`${url}`);
|
|
5598
|
+
hasDifference =
|
|
5599
|
+
handlePaginationUrl?.query?.search !== handleUrl?.query?.search ||
|
|
5600
|
+
handlePaginationUrl?.query?.sort !== handleUrl?.query?.sort;
|
|
5601
|
+
hasField = urlHasField(url, 'search') || urlHasField(url, 'sort');
|
|
5602
|
+
}
|
|
5603
|
+
catch (e) {
|
|
5604
|
+
// not to do
|
|
5605
|
+
}
|
|
5606
|
+
return {
|
|
5607
|
+
hasDifference,
|
|
5608
|
+
hasField
|
|
5609
|
+
};
|
|
5610
|
+
});
|
|
5611
|
+
};
|
|
5612
|
+
return {
|
|
5613
|
+
selectState,
|
|
5614
|
+
selectAll,
|
|
5615
|
+
selectControl,
|
|
5616
|
+
selectByIdentifier,
|
|
5617
|
+
selectPagination,
|
|
5618
|
+
selectPage,
|
|
5619
|
+
paginationHasDifference
|
|
5620
|
+
};
|
|
5621
|
+
}
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5534
5624
|
/**
|
|
5535
5625
|
* Classe genérica que recebe duas interfaces como tipos genéricos.
|
|
5536
5626
|
*
|
|
@@ -6255,5 +6345,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
6255
6345
|
* Generated bundle index. Do not edit.
|
|
6256
6346
|
*/
|
|
6257
6347
|
|
|
6258
|
-
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsResolveService, MonkeyEcxCommonsService, MonkeyEcxCommonsStoreService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDisplaySupportPhone, 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, MonkeyEcxLinksModel, 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, differentFromZero, documentValidator, documentValidatorByType, emailValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
6348
|
+
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsActions, MonkeyEcxCommonsResolveService, MonkeyEcxCommonsSelectors, MonkeyEcxCommonsService, MonkeyEcxCommonsStoreService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDisplaySupportPhone, 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, MonkeyEcxLinksModel, 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, differentFromZero, documentValidator, documentValidatorByType, emailValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
6259
6349
|
//# sourceMappingURL=monkey-front-core.mjs.map
|