@mintplayer/ng-bootstrap 22.16.0 → 22.17.0

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.
@@ -2,9 +2,16 @@ import * as i0 from '@angular/core';
2
2
  import { Pipe } from '@angular/core';
3
3
 
4
4
  class BsLinifyPipe {
5
+ /**
6
+ * Splits text into lines, normalizing CRLF first.
7
+ *
8
+ * The `/g` flag is load-bearing: without it only the FIRST CRLF was rewritten
9
+ * and every later line of Windows-authored text kept a trailing `\r`, which
10
+ * then rode along into whatever the consumer rendered or compared.
11
+ */
5
12
  transform(value, removeEmptyEntries = true) {
6
13
  const split = value
7
- .replace('\r\n', '\n')
14
+ .replace(/\r\n/g, '\n')
8
15
  .split('\n');
9
16
  return removeEmptyEntries
10
17
  ? split.filter((line) => line !== '')
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-linify.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/linify/src/linify.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/linify/mintplayer-ng-bootstrap-linify.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsLinify',\n})\nexport class BsLinifyPipe implements PipeTransform {\n transform(value: string, removeEmptyEntries = true) {\n const split = value\n .replace('\\r\\n', '\\n')\n .split('\\n');\n\n return removeEmptyEntries\n ? split.filter((line) => line !== '')\n : split;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,YAAY,CAAA;AACvB,IAAA,SAAS,CAAC,KAAa,EAAE,kBAAkB,GAAG,IAAI,EAAA;QAChD,MAAM,KAAK,GAAG;AACX,aAAA,OAAO,CAAC,MAAM,EAAE,IAAI;aACpB,KAAK,CAAC,IAAI,CAAC;AAEd,QAAA,OAAO;AACL,cAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE;cAClC,KAAK;IACX;8GATW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,UAAU;AACjB,iBAAA;;;ACJD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-linify.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/linify/src/linify.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/linify/mintplayer-ng-bootstrap-linify.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsLinify',\n})\nexport class BsLinifyPipe implements PipeTransform {\n /**\n * Splits text into lines, normalizing CRLF first.\n *\n * The `/g` flag is load-bearing: without it only the FIRST CRLF was rewritten\n * and every later line of Windows-authored text kept a trailing `\\r`, which\n * then rode along into whatever the consumer rendered or compared.\n */\n transform(value: string, removeEmptyEntries = true) {\n const split = value\n .replace(/\\r\\n/g, '\\n')\n .split('\\n');\n\n return removeEmptyEntries\n ? split.filter((line) => line !== '')\n : split;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,YAAY,CAAA;AACvB;;;;;;AAMG;AACH,IAAA,SAAS,CAAC,KAAa,EAAE,kBAAkB,GAAG,IAAI,EAAA;QAChD,MAAM,KAAK,GAAG;AACX,aAAA,OAAO,CAAC,OAAO,EAAE,IAAI;aACrB,KAAK,CAAC,IAAI,CAAC;AAEd,QAAA,OAAO;AACL,cAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE;cAClC,KAAK;IACX;8GAhBW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,UAAU;AACjB,iBAAA;;;ACJD;;AAEG;;;;"}
@@ -2,12 +2,22 @@ import * as i0 from '@angular/core';
2
2
  import { Pipe } from '@angular/core';
3
3
 
4
4
  class BsSlugifyPipe {
5
+ /**
6
+ * Turns a title into a URL slug.
7
+ *
8
+ * Latin text is still decomposed and stripped of diacritics, so `Crème` stays
9
+ * `creme` and existing slugs are unchanged. What changed is the character
10
+ * class: it keeps letters and numbers in ANY script (`\p{L}\p{N}`) instead of
11
+ * ASCII `\w`. The old class removed every character of a script with no Latin
12
+ * decomposition, so a non-Latin title slugified to the empty string — a route
13
+ * segment that cannot work rather than one that merely looks unfamiliar.
14
+ */
5
15
  transform(value) {
6
16
  return value.toString().toLowerCase()
7
17
  .replace(/\s+/g, '-') // Replace spaces with -
8
18
  .normalize("NFD").replace(/[\u0300-\u036f]/g, "") // Remove diacritics
9
- .replace(/[^\w\-]+/g, '') // Remove all non-word chars
10
- .replace(/\-\-+/g, '-') // Replace multiple - with single -
19
+ .replace(/[^\p{L}\p{N}_-]+/gu, '') // Remove all non-word chars
20
+ .replace(/-{2,}/g, '-') // Replace multiple - with single -
11
21
  .replace(/^-+/, '') // Trim - from start of text
12
22
  .replace(/-+$/, ''); // Trim - from end of text
13
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-slugify.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/slugify/src/slugify.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/slugify/mintplayer-ng-bootstrap-slugify.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsSlugify',\n pure: true,\n})\nexport class BsSlugifyPipe implements PipeTransform {\n transform(value: string) {\n return value.toString().toLowerCase()\n .replace(/\\s+/g, '-') // Replace spaces with -\n .normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") // Remove diacritics\n .replace(/[^\\w\\-]+/g, '') // Remove all non-word chars\n .replace(/\\-\\-+/g, '-') // Replace multiple - with single -\n .replace(/^-+/, '') // Trim - from start of text\n .replace(/-+$/, ''); // Trim - from end of text\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,aAAa,CAAA;AACxB,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW;AAChC,aAAA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AAChD,aAAA,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;AACxB,aAAA,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;AACtB,aAAA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;AAClB,aAAA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxB;8GATW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AACjB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-slugify.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/slugify/src/slugify.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/slugify/mintplayer-ng-bootstrap-slugify.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsSlugify',\n pure: true,\n})\nexport class BsSlugifyPipe implements PipeTransform {\n /**\n * Turns a title into a URL slug.\n *\n * Latin text is still decomposed and stripped of diacritics, so `Crème` stays\n * `creme` and existing slugs are unchanged. What changed is the character\n * class: it keeps letters and numbers in ANY script (`\\p{L}\\p{N}`) instead of\n * ASCII `\\w`. The old class removed every character of a script with no Latin\n * decomposition, so a non-Latin title slugified to the empty string — a route\n * segment that cannot work rather than one that merely looks unfamiliar.\n */\n transform(value: string) {\n return value.toString().toLowerCase()\n .replace(/\\s+/g, '-') // Replace spaces with -\n .normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") // Remove diacritics\n .replace(/[^\\p{L}\\p{N}_-]+/gu, '') // Remove all non-word chars\n .replace(/-{2,}/g, '-') // Replace multiple - with single -\n .replace(/^-+/, '') // Trim - from start of text\n .replace(/-+$/, ''); // Trim - from end of text\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,aAAa,CAAA;AACxB;;;;;;;;;AASG;AACH,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW;AAChC,aAAA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AAChD,aAAA,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC;AACjC,aAAA,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;AACtB,aAAA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;AAClB,aAAA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxB;8GAnBW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AACjB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -2,18 +2,23 @@ import * as i0 from '@angular/core';
2
2
  import { Pipe } from '@angular/core';
3
3
 
4
4
  class BsWordCountPipe {
5
+ /**
6
+ * Counts words, where a word is any run of non-whitespace.
7
+ *
8
+ * Splits on `/\s+/` rather than collapsing whitespace and splitting on a
9
+ * literal space: the earlier version collapsed only runs of TWO or more
10
+ * whitespace characters, so a single newline or tab between two words was
11
+ * neither collapsed nor split on and the pair counted as one word — while two
12
+ * or more whitespace characters happened to work, which is what made it hard
13
+ * to notice.
14
+ */
5
15
  transform(value) {
6
- if ((value === null) || (value === '')) {
16
+ if (!value)
7
17
  return 0;
8
- }
9
- else {
10
- return value
11
- .replace(/(^\s+)|(\s+$)/gi, '')
12
- .replace(/\s{2,}/gi, ' ')
13
- .split(' ')
14
- .filter(w => w !== '')
15
- .length;
16
- }
18
+ return value
19
+ .split(/\s+/)
20
+ .filter((word) => word !== '')
21
+ .length;
17
22
  }
18
23
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsWordCountPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
19
24
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: BsWordCountPipe, isStandalone: true, name: "bsWordCount" }); }
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-word-count.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/word-count/src/word-count.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/word-count/mintplayer-ng-bootstrap-word-count.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsWordCount',\n pure: true,\n})\nexport class BsWordCountPipe implements PipeTransform {\n transform(value: string) {\n if ((value === null) || (value === '')) {\n return 0;\n } else {\n return value\n .replace(/(^\\s+)|(\\s+$)/gi, '')\n .replace(/\\s{2,}/gi, ' ')\n .split(' ')\n .filter(w => w !== '')\n .length;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,eAAe,CAAA;AAC1B,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,IAAI,CAAC,KAAK,KAAK,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC,EAAE;AACtC,YAAA,OAAO,CAAC;QACV;aAAO;AACL,YAAA,OAAO;AACJ,iBAAA,OAAO,CAAC,iBAAiB,EAAE,EAAE;AAC7B,iBAAA,OAAO,CAAC,UAAU,EAAE,GAAG;iBACvB,KAAK,CAAC,GAAG;iBACT,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE;AACpB,iBAAA,MAAM;QACX;IACF;8GAZW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,aAAa;AACnB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-word-count.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/word-count/src/word-count.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/word-count/mintplayer-ng-bootstrap-word-count.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsWordCount',\n pure: true,\n})\nexport class BsWordCountPipe implements PipeTransform {\n /**\n * Counts words, where a word is any run of non-whitespace.\n *\n * Splits on `/\\s+/` rather than collapsing whitespace and splitting on a\n * literal space: the earlier version collapsed only runs of TWO or more\n * whitespace characters, so a single newline or tab between two words was\n * neither collapsed nor split on and the pair counted as one word — while two\n * or more whitespace characters happened to work, which is what made it hard\n * to notice.\n */\n transform(value: string) {\n if (!value) return 0;\n return value\n .split(/\\s+/)\n .filter((word) => word !== '')\n .length;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,eAAe,CAAA;AAC1B;;;;;;;;;AASG;AACH,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,CAAC;AACpB,QAAA,OAAO;aACJ,KAAK,CAAC,KAAK;aACX,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE;AAC5B,aAAA,MAAM;IACX;8GAjBW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,aAAa;AACnB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-bootstrap",
3
3
  "private": false,
4
- "version": "22.16.0",
4
+ "version": "22.17.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -2,6 +2,13 @@ import * as i0 from '@angular/core';
2
2
  import { PipeTransform } from '@angular/core';
3
3
 
4
4
  declare class BsLinifyPipe implements PipeTransform {
5
+ /**
6
+ * Splits text into lines, normalizing CRLF first.
7
+ *
8
+ * The `/g` flag is load-bearing: without it only the FIRST CRLF was rewritten
9
+ * and every later line of Windows-authored text kept a trailing `\r`, which
10
+ * then rode along into whatever the consumer rendered or compared.
11
+ */
5
12
  transform(value: string, removeEmptyEntries?: boolean): string[];
6
13
  static ɵfac: i0.ɵɵFactoryDeclaration<BsLinifyPipe, never>;
7
14
  static ɵpipe: i0.ɵɵPipeDeclaration<BsLinifyPipe, "bsLinify", true>;
@@ -2,6 +2,16 @@ import * as i0 from '@angular/core';
2
2
  import { PipeTransform } from '@angular/core';
3
3
 
4
4
  declare class BsSlugifyPipe implements PipeTransform {
5
+ /**
6
+ * Turns a title into a URL slug.
7
+ *
8
+ * Latin text is still decomposed and stripped of diacritics, so `Crème` stays
9
+ * `creme` and existing slugs are unchanged. What changed is the character
10
+ * class: it keeps letters and numbers in ANY script (`\p{L}\p{N}`) instead of
11
+ * ASCII `\w`. The old class removed every character of a script with no Latin
12
+ * decomposition, so a non-Latin title slugified to the empty string — a route
13
+ * segment that cannot work rather than one that merely looks unfamiliar.
14
+ */
5
15
  transform(value: string): string;
6
16
  static ɵfac: i0.ɵɵFactoryDeclaration<BsSlugifyPipe, never>;
7
17
  static ɵpipe: i0.ɵɵPipeDeclaration<BsSlugifyPipe, "bsSlugify", true>;
@@ -2,6 +2,16 @@ import * as i0 from '@angular/core';
2
2
  import { PipeTransform } from '@angular/core';
3
3
 
4
4
  declare class BsWordCountPipe implements PipeTransform {
5
+ /**
6
+ * Counts words, where a word is any run of non-whitespace.
7
+ *
8
+ * Splits on `/\s+/` rather than collapsing whitespace and splitting on a
9
+ * literal space: the earlier version collapsed only runs of TWO or more
10
+ * whitespace characters, so a single newline or tab between two words was
11
+ * neither collapsed nor split on and the pair counted as one word — while two
12
+ * or more whitespace characters happened to work, which is what made it hard
13
+ * to notice.
14
+ */
5
15
  transform(value: string): number;
6
16
  static ɵfac: i0.ɵɵFactoryDeclaration<BsWordCountPipe, never>;
7
17
  static ɵpipe: i0.ɵɵPipeDeclaration<BsWordCountPipe, "bsWordCount", true>;