monkey-front-core 0.0.613 → 0.0.615

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.
@@ -312,10 +312,11 @@ class MonkeyEcxUtils {
312
312
  return doc;
313
313
  }
314
314
  if (doc.length === 14) {
315
- formated = doc
316
- .replace(/^(\d{2})(\d)/, '$1.$2')
317
- .replace(/^(\d{2})\.(\d{3})(\d)/, '$1.$2.$3')
318
- .replace(/\.(\d{3})(\d)/, '.$1/$2')
315
+ const cleaned = doc.replace(/[^A-Za-z0-9]/g, '').toUpperCase();
316
+ formated = cleaned
317
+ .replace(/^([A-Z0-9]{2})([A-Z0-9])/, '$1.$2')
318
+ .replace(/^([A-Z0-9]{2})\.([A-Z0-9]{3})([A-Z0-9])/, '$1.$2.$3')
319
+ .replace(/\.(\w{3})(\w)/, '.$1/$2')
319
320
  .replace(/(\d{4})(\d)/, '$1-$2');
320
321
  }
321
322
  else {
@@ -6477,7 +6478,12 @@ const urlHasField = (url, field) => {
6477
6478
  };
6478
6479
  class MonkeyEcxCommonsSelectors {
6479
6480
  static getSelectors(reducer) {
6480
- const selectState = createFeatureSelector(reducer.featureKey);
6481
+ const feature = reducer?.featureKey || reducer?.featureName;
6482
+ if (!feature) {
6483
+ console.error(`MECX Core - getSelectors -> featureKey or featureName must be declared`);
6484
+ throw new Error(`MECX Core - getSelectors -> featureKey or featureName must be declared`);
6485
+ }
6486
+ const selectState = createFeatureSelector(feature);
6481
6487
  const selectAll = createSelector(selectState, reducer.selectAll);
6482
6488
  const selectByIdentifier = (props) => {
6483
6489
  return createSelector(selectAll, (entities) => {