@socialgouv/modeles-social 4.133.0 → 4.134.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.134.0](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.133.0...v4.134.0) (2024-04-16)
7
+
8
+ ### Features
9
+
10
+ - desinstaller ancienne contrib ([#5712](https://github.com/SocialGouv/code-du-travail-numerique/issues/5712)) ([a9504ba](https://github.com/SocialGouv/code-du-travail-numerique/commit/a9504ba0ceda5ac44d373704ae302b7f3306014d)), closes [#5752](https://github.com/SocialGouv/code-du-travail-numerique/issues/5752)
11
+
6
12
  # [4.133.0](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.132.0...v4.133.0) (2024-04-09)
7
13
 
8
14
  ### Bug Fixes
@@ -1,4 +1,3 @@
1
1
  declare function parseIdcc(idcc: string): number;
2
2
  declare function formatIdcc(num: number | string): string;
3
- declare function extractMdxContentUrl(markdown: string | null | undefined): string | null | undefined;
4
- export { extractMdxContentUrl, formatIdcc, parseIdcc };
3
+ export { formatIdcc, parseIdcc };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseIdcc = exports.formatIdcc = exports.extractMdxContentUrl = void 0;
3
+ exports.parseIdcc = exports.formatIdcc = void 0;
4
4
  function parseIdcc(idcc) {
5
5
  return parseInt(idcc, 10);
6
6
  }
@@ -9,13 +9,3 @@ function formatIdcc(num) {
9
9
  return "0000".concat(num).slice(-4);
10
10
  }
11
11
  exports.formatIdcc = formatIdcc;
12
- // Extract external content url from Content tag markdown
13
- function extractMdxContentUrl(markdown) {
14
- var _a, _b;
15
- if (!markdown)
16
- return;
17
- // Check Content tag exist on markdown
18
- var contentTag = /<Content\s.*?href="([^"]+)"/.exec(markdown);
19
- return (_b = (_a = contentTag === null || contentTag === void 0 ? void 0 : contentTag[1]) === null || _a === void 0 ? void 0 : _a.match(/\bhttps?:\/\/(www\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)/gi)) === null || _b === void 0 ? void 0 : _b[0];
20
- }
21
- exports.extractMdxContentUrl = extractMdxContentUrl;
@@ -1,4 +1,3 @@
1
1
  declare function parseIdcc(idcc: string): number;
2
2
  declare function formatIdcc(num: number | string): string;
3
- declare function extractMdxContentUrl(markdown: string | null | undefined): string | null | undefined;
4
- export { extractMdxContentUrl, formatIdcc, parseIdcc };
3
+ export { formatIdcc, parseIdcc };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseIdcc = exports.formatIdcc = exports.extractMdxContentUrl = void 0;
3
+ exports.parseIdcc = exports.formatIdcc = void 0;
4
4
  function parseIdcc(idcc) {
5
5
  return parseInt(idcc, 10);
6
6
  }
@@ -9,13 +9,3 @@ function formatIdcc(num) {
9
9
  return "0000".concat(num).slice(-4);
10
10
  }
11
11
  exports.formatIdcc = formatIdcc;
12
- // Extract external content url from Content tag markdown
13
- function extractMdxContentUrl(markdown) {
14
- var _a, _b;
15
- if (!markdown)
16
- return;
17
- // Check Content tag exist on markdown
18
- var contentTag = /<Content\s.*?href="([^"]+)"/.exec(markdown);
19
- return (_b = (_a = contentTag === null || contentTag === void 0 ? void 0 : contentTag[1]) === null || _a === void 0 ? void 0 : _a.match(/\bhttps?:\/\/(www\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)/gi)) === null || _b === void 0 ? void 0 : _b[0];
20
- }
21
- exports.extractMdxContentUrl = extractMdxContentUrl;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
7
- "version": "4.133.0",
7
+ "version": "4.134.0",
8
8
  "description": "Les règles publicodes des simulateurs de code du travail numérique",
9
9
  "main": "./lib/index.js",
10
10
  "types": "./lib/index.d.ts",
@@ -50,5 +50,5 @@
50
50
  "yarn lint --fix --quiet"
51
51
  ]
52
52
  },
53
- "gitHead": "adc3138626f97f9be3fa2b18540019bd420a57d5"
53
+ "gitHead": "45c1e498ce863647abe5055e08facfd977f4a856"
54
54
  }
@@ -6,16 +6,4 @@ function formatIdcc(num: number | string): string {
6
6
  return `0000${num}`.slice(-4);
7
7
  }
8
8
 
9
- // Extract external content url from Content tag markdown
10
- function extractMdxContentUrl(
11
- markdown: string | null | undefined
12
- ): string | null | undefined {
13
- if (!markdown) return;
14
- // Check Content tag exist on markdown
15
- const contentTag = /<Content\s.*?href="([^"]+)"/.exec(markdown);
16
- return contentTag?.[1]?.match(
17
- /\bhttps?:\/\/(www\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)/gi
18
- )?.[0];
19
- }
20
-
21
- export { extractMdxContentUrl, formatIdcc, parseIdcc };
9
+ export { formatIdcc, parseIdcc };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var __1 = require("..");
4
- var tests = [
5
- {
6
- data: '<Content href="https://www.service-public.fr/professionnels-entreprises/vosdroits/F33693"/>',
7
- label: "External content SP",
8
- url: "https://www.service-public.fr/professionnels-entreprises/vosdroits/F33693",
9
- },
10
- {
11
- data: '<Content href="https://www.service-public.fr/particuliers/vosdroits/F31897"/>\n\n<HDN>\n\nLa durée du délai de carence entre 2 CDD prévue par le code du travail s’applique sauf si une convention ou un accord collectif de branche étendu fixe cette durée.\n\n</HDN>\n\n_Source_ :\n[Article L1244-3-1 du code du travail](https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000035639421&cidTexte=LEGITEXT000006072050&dateTexte=20191029&oldAction=rechCodeArticle&fastReqId=554557662&nbResultRech=1)',
12
- label: "External content SP with Mdx",
13
- url: "https://www.service-public.fr/particuliers/vosdroits/F31897",
14
- },
15
- {
16
- data: 'Le code du travail prévoit plusieurs congés pour événements familiaux (naissance, mariage, etc.).\n\n<Content href="https://travail-emploi.gouv.fr/droit-du-travail/les-absences-pour-maladie-et-conges-pour-evenements-familiaux/article/les-conges-pour-evenements-familiaux"/>\n\n<HDN>\n\nL’employeur applique la mesure la plus favorable pour l’ensemble des salariés, que cette mesure soit prévue par la loi, une convention ou un accord collectif de branche et/ou d’entreprise. Le contrat de travail peut toujours prévoir des mesures plus favorables, qui s’appliqueront.\n\n</HDN>',
17
- label: "External content MT with Mdx",
18
- url: "https://travail-emploi.gouv.fr/droit-du-travail/les-absences-pour-maladie-et-conges-pour-evenements-familiaux/article/les-conges-pour-evenements-familiaux",
19
- },
20
- {
21
- data: '<Content href="https://www.service-public.fr/particuliers/vosdroits/F31897"> </Content>\n\n<HDN>\n\nLa durée du délai de carence entre 2 CDD prévue par le code du travail s’applique sauf si une convention ou un accord collectif de branche étendu fixe cette durée.\n\n</HDN>\n\n_Source_ :\n[Article L1244-3-1 du code du travail](https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000035639421&cidTexte=LEGITEXT000006072050&dateTexte=20191029&oldAction=rechCodeArticle&fastReqId=554557662&nbResultRech=1)',
22
- label: "External content SP with open Mdx content tags",
23
- url: "https://www.service-public.fr/particuliers/vosdroits/F31897",
24
- },
25
- ];
26
- tests.forEach(function (t) {
27
- test("should extract url from ".concat(t.label, " correctly"), function () {
28
- expect((0, __1.extractMdxContentUrl)(t.data)).toMatch(t.url);
29
- });
30
- });
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var __1 = require("..");
4
- var tests = [
5
- {
6
- data: '<Content href="https://www.service-public.fr/professionnels-entreprises/vosdroits/F33693"/>',
7
- label: "External content SP",
8
- url: "https://www.service-public.fr/professionnels-entreprises/vosdroits/F33693",
9
- },
10
- {
11
- data: '<Content href="https://www.service-public.fr/particuliers/vosdroits/F31897"/>\n\n<HDN>\n\nLa durée du délai de carence entre 2 CDD prévue par le code du travail s’applique sauf si une convention ou un accord collectif de branche étendu fixe cette durée.\n\n</HDN>\n\n_Source_ :\n[Article L1244-3-1 du code du travail](https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000035639421&cidTexte=LEGITEXT000006072050&dateTexte=20191029&oldAction=rechCodeArticle&fastReqId=554557662&nbResultRech=1)',
12
- label: "External content SP with Mdx",
13
- url: "https://www.service-public.fr/particuliers/vosdroits/F31897",
14
- },
15
- {
16
- data: 'Le code du travail prévoit plusieurs congés pour événements familiaux (naissance, mariage, etc.).\n\n<Content href="https://travail-emploi.gouv.fr/droit-du-travail/les-absences-pour-maladie-et-conges-pour-evenements-familiaux/article/les-conges-pour-evenements-familiaux"/>\n\n<HDN>\n\nL’employeur applique la mesure la plus favorable pour l’ensemble des salariés, que cette mesure soit prévue par la loi, une convention ou un accord collectif de branche et/ou d’entreprise. Le contrat de travail peut toujours prévoir des mesures plus favorables, qui s’appliqueront.\n\n</HDN>',
17
- label: "External content MT with Mdx",
18
- url: "https://travail-emploi.gouv.fr/droit-du-travail/les-absences-pour-maladie-et-conges-pour-evenements-familiaux/article/les-conges-pour-evenements-familiaux",
19
- },
20
- {
21
- data: '<Content href="https://www.service-public.fr/particuliers/vosdroits/F31897"> </Content>\n\n<HDN>\n\nLa durée du délai de carence entre 2 CDD prévue par le code du travail s’applique sauf si une convention ou un accord collectif de branche étendu fixe cette durée.\n\n</HDN>\n\n_Source_ :\n[Article L1244-3-1 du code du travail](https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000035639421&cidTexte=LEGITEXT000006072050&dateTexte=20191029&oldAction=rechCodeArticle&fastReqId=554557662&nbResultRech=1)',
22
- label: "External content SP with open Mdx content tags",
23
- url: "https://www.service-public.fr/particuliers/vosdroits/F31897",
24
- },
25
- ];
26
- tests.forEach(function (t) {
27
- test("should extract url from ".concat(t.label, " correctly"), function () {
28
- expect((0, __1.extractMdxContentUrl)(t.data)).toMatch(t.url);
29
- });
30
- });
@@ -1,30 +0,0 @@
1
- import { extractMdxContentUrl } from "..";
2
-
3
- const tests = [
4
- {
5
- data: '<Content href="https://www.service-public.fr/professionnels-entreprises/vosdroits/F33693"/>',
6
- label: "External content SP",
7
- url: "https://www.service-public.fr/professionnels-entreprises/vosdroits/F33693",
8
- },
9
- {
10
- data: '<Content href="https://www.service-public.fr/particuliers/vosdroits/F31897"/>\n\n<HDN>\n\nLa durée du délai de carence entre 2 CDD prévue par le code du travail s’applique sauf si une convention ou un accord collectif de branche étendu fixe cette durée.\n\n</HDN>\n\n_Source_ :\n[Article L1244-3-1 du code du travail](https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000035639421&cidTexte=LEGITEXT000006072050&dateTexte=20191029&oldAction=rechCodeArticle&fastReqId=554557662&nbResultRech=1)',
11
- label: "External content SP with Mdx",
12
- url: "https://www.service-public.fr/particuliers/vosdroits/F31897",
13
- },
14
- {
15
- data: 'Le code du travail prévoit plusieurs congés pour événements familiaux (naissance, mariage, etc.).\n\n<Content href="https://travail-emploi.gouv.fr/droit-du-travail/les-absences-pour-maladie-et-conges-pour-evenements-familiaux/article/les-conges-pour-evenements-familiaux"/>\n\n<HDN>\n\nL’employeur applique la mesure la plus favorable pour l’ensemble des salariés, que cette mesure soit prévue par la loi, une convention ou un accord collectif de branche et/ou d’entreprise. Le contrat de travail peut toujours prévoir des mesures plus favorables, qui s’appliqueront.\n\n</HDN>',
16
- label: "External content MT with Mdx",
17
- url: "https://travail-emploi.gouv.fr/droit-du-travail/les-absences-pour-maladie-et-conges-pour-evenements-familiaux/article/les-conges-pour-evenements-familiaux",
18
- },
19
- {
20
- data: '<Content href="https://www.service-public.fr/particuliers/vosdroits/F31897"> </Content>\n\n<HDN>\n\nLa durée du délai de carence entre 2 CDD prévue par le code du travail s’applique sauf si une convention ou un accord collectif de branche étendu fixe cette durée.\n\n</HDN>\n\n_Source_ :\n[Article L1244-3-1 du code du travail](https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000035639421&cidTexte=LEGITEXT000006072050&dateTexte=20191029&oldAction=rechCodeArticle&fastReqId=554557662&nbResultRech=1)',
21
- label: "External content SP with open Mdx content tags",
22
- url: "https://www.service-public.fr/particuliers/vosdroits/F31897",
23
- },
24
- ];
25
-
26
- tests.forEach((t) => {
27
- test(`should extract url from ${t.label} correctly`, () => {
28
- expect(extractMdxContentUrl(t.data)).toMatch(t.url);
29
- });
30
- });