coer-elements 2.0.17 → 2.0.18

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.
Files changed (34) hide show
  1. package/extensions/lib/string.extension.d.ts +12 -10
  2. package/fesm2022/coer-elements-components.mjs +9 -9
  3. package/fesm2022/coer-elements-components.mjs.map +1 -1
  4. package/fesm2022/coer-elements-extensions.mjs +16 -21
  5. package/fesm2022/coer-elements-extensions.mjs.map +1 -1
  6. package/fesm2022/coer-elements-guards.mjs +7 -7
  7. package/fesm2022/coer-elements-guards.mjs.map +1 -1
  8. package/fesm2022/coer-elements-pages.mjs +2 -2
  9. package/fesm2022/coer-elements-pages.mjs.map +1 -1
  10. package/fesm2022/coer-elements-tools.mjs +75 -50
  11. package/fesm2022/coer-elements-tools.mjs.map +1 -1
  12. package/interfaces/lib/option.interface.d.ts +1 -0
  13. package/package.json +5 -5
  14. package/styles/coer-elements.css +790 -485
  15. package/styles/index.scss +2 -1
  16. package/styles/{layout.scss → layout-flex.scss} +39 -7
  17. package/styles/layout-grid.scss +14 -0
  18. package/styles/space.scss +15 -15
  19. package/tools/lib/string.tools.d.ts +16 -0
  20. package/tools/lib/tools.d.ts +0 -10
  21. package/tools/public-api.d.ts +14 -13
  22. /package/tools/lib/{breadcrumbs.class.d.ts → breadcrumbs.tools.d.ts} +0 -0
  23. /package/tools/lib/{colors.class.d.ts → colors.tools.d.ts} +0 -0
  24. /package/tools/lib/{control-value.class.d.ts → control-value.tools.d.ts} +0 -0
  25. /package/tools/lib/{date-time.class.d.ts → date-time.tools.d.ts} +0 -0
  26. /package/tools/lib/{elements-html.class.d.ts → elements-html.tools.d.ts} +0 -0
  27. /package/tools/lib/{files.class.d.ts → files.tools.d.ts} +0 -0
  28. /package/tools/lib/{filters.class.d.ts → filters.tools.d.ts} +0 -0
  29. /package/tools/lib/{menu.class.d.ts → menu.tools.d.ts} +0 -0
  30. /package/tools/lib/{page.class.d.ts → page.tools.d.ts} +0 -0
  31. /package/tools/lib/{screen.class.d.ts → screen.tools.d.ts} +0 -0
  32. /package/tools/lib/{section.class.d.ts → section.tools.d.ts} +0 -0
  33. /package/tools/lib/{service.class.d.ts → service.tools.d.ts} +0 -0
  34. /package/tools/lib/{source.class.d.ts → source.tools.d.ts} +0 -0
@@ -1,21 +1,23 @@
1
1
  declare global {
2
2
  interface String {
3
- /** */
4
- removeAccents(): string;
5
- /** Clean extra whitespaces */
6
- cleanUpBlanks(): string;
7
- /** Set First Char To Lower */
3
+ /** Sets the first character to lowercase */
8
4
  firstCharToLower(): string;
9
- /** Set First Char To Upper */
5
+ /** Sets the first character to uppercase */
10
6
  firstCharToUpper(): string;
11
- /** Remove last char */
12
- removeLastChar(value: string): string;
7
+ /** Clean extra whitespaces */
8
+ cleanUpBlanks(): string;
9
+ /** Apply title formatting */
10
+ toTitle(): string;
11
+ /** Removes the last character */
12
+ removeLastChar(): string;
13
+ /** Removes accents and special characters */
14
+ removeAccents(onlyAlphaNumeric?: boolean): string;
15
+ /** Validates if both strings are equal */
16
+ equals(value: string | number | null | undefined, sensitive?: boolean): boolean;
13
17
  /** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
14
18
  isOnlyWhiteSpace(): boolean;
15
19
  /** Returns true if has string value and is not only whitespace, false otherwise */
16
20
  isNotOnlyWhiteSpace(): boolean;
17
- /** Returns true if value is equals */
18
- equals(value: string | null | undefined, sensitive?: boolean): boolean;
19
21
  }
20
22
  }
21
23
  export {};
@@ -36,7 +36,7 @@ import { MatTabsModule } from '@angular/material/tabs';
36
36
  import { MatTimepickerModule } from '@angular/material/timepicker';
37
37
  import * as i2$a from '@angular/material/toolbar';
38
38
  import { MatToolbarModule } from '@angular/material/toolbar';
39
- import { Tools, ControlValue, CONTROL_VALUE, DateTime, Screen, ElementsHTML, CoerAlert, Files, Source, Menu, Breadcrumbs } from 'coer-elements/tools';
39
+ import { Tools, ControlValue, CONTROL_VALUE, DateTime, Screen, ElementsHTML, CoerAlert, Files, StringTools, Source, Menu, Breadcrumbs } from 'coer-elements/tools';
40
40
  import { Tooltip, Modal } from 'bootstrap';
41
41
  import { isModalOpenSIGNAL, menuSelectedSIGNAL, breakpointSIGNAL, isMenuOpenSIGNAL, isLoadingSIGNAL, navigationSIGNAL } from 'coer-elements/signals';
42
42
 
@@ -1776,11 +1776,11 @@ class CoerGridExtension extends ControlValue {
1776
1776
  let listFiltered = [];
1777
1777
  const SET_ROW = new Set();
1778
1778
  const columnList = Tools.IsNotNull(this.search?.columns)
1779
- ? this.search.columns.map(x => Tools.FirstCharToLower(x))
1779
+ ? this.search.columns.map(x => StringTools.FirstCharToLower(x))
1780
1780
  : this._gridColumns().map(x => x.columnName);
1781
1781
  for (const columnName of columnList) {
1782
1782
  listFiltered = dataSource.filter((item) => !SET_ROW.has(item['indexRow'])
1783
- && String(item[Tools.FirstCharToLower(columnName)]).trim().toUpperCase().includes(String(this._gridSearch()).trim().toUpperCase()));
1783
+ && String(item[StringTools.FirstCharToLower(columnName)]).trim().toUpperCase().includes(String(this._gridSearch()).trim().toUpperCase()));
1784
1784
  for (const { indexRow } of listFiltered) {
1785
1785
  SET_ROW.add(indexRow);
1786
1786
  }
@@ -1802,7 +1802,7 @@ class CoerGridExtension extends ControlValue {
1802
1802
  }
1803
1803
  //Clean headerName
1804
1804
  if (this.cleanColumnName() && columnName.length > 0) {
1805
- columnName = Tools.FirstCharToLower(columnName);
1805
+ columnName = StringTools.FirstCharToLower(columnName);
1806
1806
  const charArray = [];
1807
1807
  for (const char of columnName) {
1808
1808
  if (char === char.toUpperCase())
@@ -1834,7 +1834,7 @@ class CoerGridExtension extends ControlValue {
1834
1834
  };
1835
1835
  /** */
1836
1836
  this._GetCellValue = (row, columnName) => {
1837
- return row[Tools.FirstCharToLower(columnName).replaceAll(' ', '')];
1837
+ return row[StringTools.FirstCharToLower(columnName).replaceAll(' ', '')];
1838
1838
  };
1839
1839
  /** */
1840
1840
  this._GetDateFormat = (date, toLocalZone = true) => {
@@ -1850,7 +1850,7 @@ class CoerGridExtension extends ControlValue {
1850
1850
  };
1851
1851
  /** */
1852
1852
  this._GetTooltip = (prefix, row, suffix = '') => {
1853
- let column = Tools.FirstCharToLower(this.tooltipByRow()).replaceAll(' ', '');
1853
+ let column = StringTools.FirstCharToLower(this.tooltipByRow()).replaceAll(' ', '');
1854
1854
  if (suffix.length > 0) {
1855
1855
  suffix = ` ${suffix}`;
1856
1856
  }
@@ -2300,7 +2300,7 @@ class CoerGrid extends CoerGridExtension {
2300
2300
  for (const columnName in row) {
2301
2301
  if (columnName == 'indexRow')
2302
2302
  continue;
2303
- COLUMN_DATA_SOURCE.add(Tools.FirstCharToLower(columnName));
2303
+ COLUMN_DATA_SOURCE.add(StringTools.FirstCharToLower(columnName));
2304
2304
  }
2305
2305
  }
2306
2306
  }
@@ -2308,7 +2308,7 @@ class CoerGrid extends CoerGridExtension {
2308
2308
  for (const { columnName } of this._gridColumns()) {
2309
2309
  if (columnName == 'indexRow')
2310
2310
  continue;
2311
- COLUMN_DATA_SOURCE.add(Tools.FirstCharToLower(columnName));
2311
+ COLUMN_DATA_SOURCE.add(StringTools.FirstCharToLower(columnName));
2312
2312
  }
2313
2313
  }
2314
2314
  const EXPORT_DATA = [];
@@ -2344,7 +2344,7 @@ class CoerGrid extends CoerGridExtension {
2344
2344
  });
2345
2345
  return;
2346
2346
  }
2347
- const property = Tools.FirstCharToLower(columnName);
2347
+ const property = StringTools.FirstCharToLower(columnName);
2348
2348
  const row = this._value[indexRow];
2349
2349
  row[property] = value;
2350
2350
  if (input === 'coer-switch') {