@socialgouv/modeles-social 4.205.0 → 4.206.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.
Files changed (119) hide show
  1. package/lib/modeles/base/ineligibility-indemnite-licenciement.js +17 -17
  2. package/lib/modeles/base/ineligibility-indemnite-precarite.js +8 -11
  3. package/lib/modeles/base/ineligibility-rupture-conventionnelle.js +14 -13
  4. package/lib/modeles/base/salary.js +11 -15
  5. package/lib/modeles/base/seniority.js +6 -26
  6. package/lib/modeles/common/dismissal-reason.js +4 -7
  7. package/lib/modeles/common/factory/dismissal-reasons.js +7 -10
  8. package/lib/modeles/common/factory/ineligibility-indemnite-licenciement.js +7 -10
  9. package/lib/modeles/common/factory/ineligibility-indemnite-precarite.js +11 -14
  10. package/lib/modeles/common/factory/ineligibility-rupture-conventionnelle.js +7 -10
  11. package/lib/modeles/common/factory/salary.js +23 -26
  12. package/lib/modeles/common/factory/seniority.js +7 -10
  13. package/lib/modeles/common/seniority.js +33 -37
  14. package/lib/modeles/common/supported-agreements.js +4 -6
  15. package/lib/modeles/common/utils/array.js +6 -6
  16. package/lib/modeles/common/utils/common.js +3 -6
  17. package/lib/modeles/common/utils/constants.js +1 -1
  18. package/lib/modeles/common/utils/date.js +14 -16
  19. package/lib/modeles/common/utils/formula.js +42 -47
  20. package/lib/modeles/common/utils/global.js +1 -1
  21. package/lib/modeles/common/utils/notifications.js +26 -38
  22. package/lib/modeles/common/utils/references.js +6 -10
  23. package/lib/modeles/common/utils/seniority.js +41 -54
  24. package/lib/modeles/conventions/1090_automobiles/seniority.js +21 -46
  25. package/lib/modeles/conventions/1404_sedima/ineligibility-indemnite-licenciement.js +8 -29
  26. package/lib/modeles/conventions/1404_sedima/seniority.js +30 -61
  27. package/lib/modeles/conventions/1483_habillement_textiles_commerce_de_detail/salary.js +19 -31
  28. package/lib/modeles/conventions/1483_habillement_textiles_commerce_de_detail/seniority.js +10 -38
  29. package/lib/modeles/conventions/1486_bureaux_etudes_techniques/dismissal-reason.js +4 -7
  30. package/lib/modeles/conventions/1486_bureaux_etudes_techniques/ineligibility-indemnite-precarite.js +5 -25
  31. package/lib/modeles/conventions/1486_bureaux_etudes_techniques/salary.js +12 -16
  32. package/lib/modeles/conventions/1486_bureaux_etudes_techniques/seniority.js +19 -42
  33. package/lib/modeles/conventions/1501_restauration_rapide/dismissal-reason.js +4 -7
  34. package/lib/modeles/conventions/1505_commerces_detail_fruits_legumes/seniority.js +12 -40
  35. package/lib/modeles/conventions/1516_organismes_formation/ineligibility-indemnite-precarite.js +5 -25
  36. package/lib/modeles/conventions/1516_organismes_formation/salary.js +18 -30
  37. package/lib/modeles/conventions/1516_organismes_formation/seniority.js +28 -51
  38. package/lib/modeles/conventions/1517_commerces_de_detail_non_alimentaires/seniority.js +8 -29
  39. package/lib/modeles/conventions/1518_education_loisirs/seniority.js +12 -40
  40. package/lib/modeles/conventions/1527_immobilier/salary.js +9 -13
  41. package/lib/modeles/conventions/1527_immobilier/seniority.js +33 -67
  42. package/lib/modeles/conventions/1596_batiment_ouvriers_employes/seniority.js +12 -40
  43. package/lib/modeles/conventions/1597_batiment_employes_ouvriers_bis/seniority.js +12 -40
  44. package/lib/modeles/conventions/1606_bricolage/salary.js +6 -10
  45. package/lib/modeles/conventions/1606_bricolage/seniority.js +8 -29
  46. package/lib/modeles/conventions/1672_societes_assurances/salary.js +14 -24
  47. package/lib/modeles/conventions/1672_societes_assurances/seniority.js +63 -83
  48. package/lib/modeles/conventions/16_transports_routiers/dismissal-reason.js +4 -7
  49. package/lib/modeles/conventions/16_transports_routiers/salary.js +29 -36
  50. package/lib/modeles/conventions/16_transports_routiers/seniority.js +44 -72
  51. package/lib/modeles/conventions/1702_ouvriers_travaux_public/dismissal-reason.js +4 -7
  52. package/lib/modeles/conventions/1702_ouvriers_travaux_public/salary.js +21 -31
  53. package/lib/modeles/conventions/1702_ouvriers_travaux_public/seniority.js +12 -40
  54. package/lib/modeles/conventions/1740_batiment_region_parisienne/salary.js +21 -31
  55. package/lib/modeles/conventions/1740_batiment_region_parisienne/seniority.js +12 -40
  56. package/lib/modeles/conventions/176_industrie_pharmaceutique/seniority.js +30 -61
  57. package/lib/modeles/conventions/1996_pharmacie/dismissal-reason.js +4 -7
  58. package/lib/modeles/conventions/1996_pharmacie/seniority.js +33 -63
  59. package/lib/modeles/conventions/2098_personnel_presta_service_tertiaire/dismissal-reason.js +4 -7
  60. package/lib/modeles/conventions/2098_personnel_presta_service_tertiaire/ineligibility-indemnite-precarite.js +5 -25
  61. package/lib/modeles/conventions/2098_personnel_presta_service_tertiaire/salary.js +9 -12
  62. package/lib/modeles/conventions/2098_personnel_presta_service_tertiaire/seniority.js +12 -40
  63. package/lib/modeles/conventions/2120_banque/dismissal-reason.js +4 -7
  64. package/lib/modeles/conventions/2120_banque/salary.js +15 -19
  65. package/lib/modeles/conventions/2120_banque/seniority.js +60 -86
  66. package/lib/modeles/conventions/2148_telecommunications/salary.js +14 -24
  67. package/lib/modeles/conventions/2148_telecommunications/seniority.js +12 -41
  68. package/lib/modeles/conventions/2216_commerces_detail_alimentation/dismissal-reason.js +4 -7
  69. package/lib/modeles/conventions/2216_commerces_detail_alimentation/seniority.js +30 -53
  70. package/lib/modeles/conventions/2511_sport/ineligibility-indemnite-precarite.js +5 -25
  71. package/lib/modeles/conventions/2511_sport/seniority.js +20 -46
  72. package/lib/modeles/conventions/2596_coiffure/ineligibility-indemnite-licenciement.js +8 -29
  73. package/lib/modeles/conventions/2596_coiffure/salary.js +19 -29
  74. package/lib/modeles/conventions/2609_batiment_etam/salary.js +10 -14
  75. package/lib/modeles/conventions/2609_batiment_etam/seniority.js +12 -40
  76. package/lib/modeles/conventions/2614_travaux_publics/salary.js +11 -16
  77. package/lib/modeles/conventions/2614_travaux_publics/seniority.js +12 -40
  78. package/lib/modeles/conventions/275_transport_aerien_personnel_au_sol/seniority.js +20 -46
  79. package/lib/modeles/conventions/292_plasturgie/salary.js +19 -24
  80. package/lib/modeles/conventions/292_plasturgie/seniority.js +12 -40
  81. package/lib/modeles/conventions/2941_aide_accompagnement_soins_services_domicile/seniority.js +34 -64
  82. package/lib/modeles/conventions/3043_entreprises_proprete/seniority.js +10 -38
  83. package/lib/modeles/conventions/3127_entreprises_services_a_la_personne/ineligibility-indemnite-precarite.js +5 -25
  84. package/lib/modeles/conventions/3239_particuliers_employeurs_domicile/ineligibility-indemnite-licenciement.js +10 -31
  85. package/lib/modeles/conventions/3239_particuliers_employeurs_domicile/ineligibility-rupture-conventionnelle.js +7 -27
  86. package/lib/modeles/conventions/3239_particuliers_employeurs_domicile/salary.js +8 -12
  87. package/lib/modeles/conventions/3239_particuliers_employeurs_domicile/seniority.js +26 -49
  88. package/lib/modeles/conventions/3248_metallurgie/seniority.js +67 -93
  89. package/lib/modeles/conventions/44_industries_chimiques/salary.js +16 -22
  90. package/lib/modeles/conventions/44_industries_chimiques/seniority.js +24 -55
  91. package/lib/modeles/conventions/573_commerces_de_gros/dismissal-reason.js +4 -7
  92. package/lib/modeles/conventions/573_commerces_de_gros/salary.js +12 -16
  93. package/lib/modeles/conventions/675_habillement_commerce_succursales/dismissal-reason.js +4 -7
  94. package/lib/modeles/conventions/675_habillement_commerce_succursales/salary.js +22 -27
  95. package/lib/modeles/conventions/86_publicite_francaise/salary.js +8 -13
  96. package/lib/publicodes/HeuresRechercheEmploiPublicodes.js +51 -61
  97. package/lib/publicodes/IndemniteDepart/Agreement.js +17 -13
  98. package/lib/publicodes/IndemniteDepart/AgreementRuptureCo.js +29 -42
  99. package/lib/publicodes/IndemniteDepart/ExplanationBuilderIndemniteLicenciement.js +3 -23
  100. package/lib/publicodes/IndemniteDepart/ExplanationBuilderRuptureCo.js +21 -42
  101. package/lib/publicodes/IndemniteDepart/IndemniteDepartPublicodes.js +36 -57
  102. package/lib/publicodes/IndemniteDepart/Legal.js +19 -17
  103. package/lib/publicodes/IndemniteDepart/utils/mapper.js +53 -47
  104. package/lib/publicodes/IndemniteLicenciementPublicodes.js +13 -38
  105. package/lib/publicodes/IndemnitePrecaritePublicodes.js +33 -59
  106. package/lib/publicodes/PreavisDemissionPublicodes.js +24 -51
  107. package/lib/publicodes/PreavisLicenciementPublicodes.js +24 -51
  108. package/lib/publicodes/PreavisRetraitePublicodes.js +12 -29
  109. package/lib/publicodes/PublicodesBase.js +66 -78
  110. package/lib/publicodes/RuptureConventionnellePublicodes.js +14 -39
  111. package/lib/publicodes/SingletonPublicodesHelper.js +53 -52
  112. package/lib/publicodes/common/ExplanationBuilder.js +22 -24
  113. package/lib/publicodes/common/ResultBuilder.js +34 -36
  114. package/lib/publicodes/common/comparator.js +24 -28
  115. package/lib/publicodes/common/mapper.js +1 -1
  116. package/lib/publicodes/types.js +9 -10
  117. package/lib/publicodes/utils/merge-missing-args.js +6 -10
  118. package/lib/publicodes/utils/preavis-retraite.js +10 -10
  119. package/package.json +10 -9
@@ -1,31 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IneligibilityLegalIndemniteLicenciement = void 0;
4
- var IneligibilityLegalIndemniteLicenciement = /** @class */ (function () {
5
- function IneligibilityLegalIndemniteLicenciement() {
6
- }
7
- IneligibilityLegalIndemniteLicenciement.prototype.getContractIneligibility = function (args) {
4
+ class IneligibilityLegalIndemniteLicenciement {
5
+ getContractIneligibility(args) {
8
6
  if (args.typeContratTravail && args.typeContratTravail === "cdd") {
9
- return "\n <p>\n L\u2019indemnit\u00E9 de licenciement ne concerne pas les salari\u00E9s en CDD et en contrat de travail temporaire.\n </p>\n ";
7
+ return `
8
+ <p>
9
+ L’indemnité de licenciement ne concerne pas les salariés en CDD et en contrat de travail temporaire.
10
+ </p>
11
+ `;
10
12
  }
11
13
  else if (args.licenciementFauteGrave &&
12
14
  args.licenciementFauteGrave === "oui") {
13
15
  return "<p>L’indemnité de licenciement n’est pas due en cas de faute grave (ou lourde). Lorsqu’il est invoqué, le motif de faute grave doit apparaître précisément dans le courrier. Reportez-vous à la lettre de notification de licenciement.</p>";
14
16
  }
15
- };
16
- IneligibilityLegalIndemniteLicenciement.prototype.getSeniorityIneligibility = function (args) {
17
- var _a;
18
- var ANCIENNETE_MINIALE_EN_ANNEE = 8 / 12;
17
+ }
18
+ getSeniorityIneligibility(args) {
19
+ const ANCIENNETE_MINIALE_EN_ANNEE = 8 / 12;
19
20
  if (args["contrat salarié . indemnité de licenciement . ancienneté requise en année"] &&
20
21
  args["contrat salarié . indemnité de licenciement . inaptitude suite à un accident ou maladie professionnelle"] === "non" &&
21
- Math.max(parseFloat(args["contrat salarié . indemnité de licenciement . ancienneté requise en année"]), parseFloat((_a = args["contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année"]) !== null && _a !== void 0 ? _a : "0")) < ANCIENNETE_MINIALE_EN_ANNEE) {
22
+ Math.max(parseFloat(args["contrat salarié . indemnité de licenciement . ancienneté requise en année"]), parseFloat(args["contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année"] ?? "0")) < ANCIENNETE_MINIALE_EN_ANNEE) {
22
23
  return "<p>L’indemnité de licenciement n’est pas due lorsque l’ancienneté dans l’entreprise est inférieure à 8 mois.</p>";
23
24
  }
24
- };
25
- IneligibilityLegalIndemniteLicenciement.prototype.getIneligibility = function (args) {
26
- var _a;
27
- return ((_a = this.getContractIneligibility(args)) !== null && _a !== void 0 ? _a : this.getSeniorityIneligibility(args));
28
- };
29
- return IneligibilityLegalIndemniteLicenciement;
30
- }());
25
+ }
26
+ getIneligibility(args) {
27
+ return (this.getContractIneligibility(args) ??
28
+ this.getSeniorityIneligibility(args));
29
+ }
30
+ }
31
31
  exports.IneligibilityLegalIndemniteLicenciement = IneligibilityLegalIndemniteLicenciement;
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IneligibilityLegalIndemnitePrecarite = void 0;
4
- var IneligibilityLegalIndemnitePrecarite = /** @class */ (function () {
5
- function IneligibilityLegalIndemnitePrecarite() {
6
- }
7
- IneligibilityLegalIndemnitePrecarite.prototype.getCDDIneligibility = function (args) {
4
+ class IneligibilityLegalIndemnitePrecarite {
5
+ getCDDIneligibility(args) {
8
6
  if (args["contrat salarié . finContratPeriodeDessai"] === "oui") {
9
7
  return "Lorsque le CDD a été rompu pendant la période d’essai, le salarié en CDD n’a pas le droit à une prime de précarité.";
10
8
  }
@@ -20,8 +18,8 @@ var IneligibilityLegalIndemnitePrecarite = /** @class */ (function () {
20
18
  else if (args["contrat salarié . refusRenouvellementAuto"] === "oui") {
21
19
  return "Le salarié en CDD qui refuse le renouvellement de son CDD alors que son contrat prévoyait dès l’origine son renouvellement et ses modalités de renouvellement n’a pas le droit à une prime de précarité.";
22
20
  }
23
- };
24
- IneligibilityLegalIndemnitePrecarite.prototype.getCTTIneligibility = function (args) {
21
+ }
22
+ getCTTIneligibility(args) {
25
23
  if (args["contrat salarié . cttFormation"] === "oui") {
26
24
  return "Ce type de contrat ne permet pas au salarié d’avoir droit à une prime de précarité.";
27
25
  }
@@ -34,8 +32,8 @@ var IneligibilityLegalIndemnitePrecarite = /** @class */ (function () {
34
32
  else if (args["contrat salarié . refusSouplesse"] === "oui") {
35
33
  return "Le salarié en contrat d'intérim qui refuse la mise en œuvre de la souplesse prévue dans son contrat n’a pas le droit à une prime de précarité.";
36
34
  }
37
- };
38
- IneligibilityLegalIndemnitePrecarite.prototype.getIneligibility = function (args) {
35
+ }
36
+ getIneligibility(args) {
39
37
  if (args["contrat salarié . contractType"] === "'CDD'" &&
40
38
  args["contrat salarié . type de cdd"] === "'Autres'") {
41
39
  return this.getCDDIneligibility(args);
@@ -46,7 +44,6 @@ var IneligibilityLegalIndemnitePrecarite = /** @class */ (function () {
46
44
  else {
47
45
  return "Ce type de contrat ne permet pas au salarié d’avoir droit à une prime de précarité.";
48
46
  }
49
- };
50
- return IneligibilityLegalIndemnitePrecarite;
51
- }());
47
+ }
48
+ }
52
49
  exports.IneligibilityLegalIndemnitePrecarite = IneligibilityLegalIndemnitePrecarite;
@@ -1,23 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IneligibilityRuptureConventionnelle = void 0;
4
- var IneligibilityRuptureConventionnelle = /** @class */ (function () {
5
- function IneligibilityRuptureConventionnelle() {
6
- }
7
- IneligibilityRuptureConventionnelle.prototype.getContractIneligibility = function (args) {
4
+ class IneligibilityRuptureConventionnelle {
5
+ getContractIneligibility(args) {
8
6
  if (args.typeContratTravail && args.typeContratTravail === "cdd") {
9
- return "\n <p>\n La rupture conventionnelle ne concerne pas les salari\u00E9s en CDD ou en contrat d'int\u00E9rim.\n </p>\n ";
7
+ return `
8
+ <p>
9
+ La rupture conventionnelle ne concerne pas les salariés en CDD ou en contrat d'intérim.
10
+ </p>
11
+ `;
10
12
  }
11
- };
12
- IneligibilityRuptureConventionnelle.prototype.getSeniorityIneligibility = function () {
13
+ }
14
+ getSeniorityIneligibility() {
13
15
  return undefined;
14
- };
15
- IneligibilityRuptureConventionnelle.prototype.getIneligibility = function (args) {
16
- var contractIneligility = this.getContractIneligibility(args);
16
+ }
17
+ getIneligibility(args) {
18
+ const contractIneligility = this.getContractIneligibility(args);
17
19
  if (contractIneligility) {
18
20
  return contractIneligility;
19
21
  }
20
- };
21
- return IneligibilityRuptureConventionnelle;
22
- }());
22
+ }
23
+ }
23
24
  exports.IneligibilityRuptureConventionnelle = IneligibilityRuptureConventionnelle;
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReferenceSalaryLegal = void 0;
4
- var common_1 = require("../common");
5
- var ReferenceSalaryLegal = /** @class */ (function () {
6
- function ReferenceSalaryLegal() {
7
- }
4
+ const common_1 = require("../common");
5
+ class ReferenceSalaryLegal {
8
6
  /**
9
7
  * Règle :
10
8
  * - soit 1/12*S1
@@ -14,21 +12,19 @@ var ReferenceSalaryLegal = /** @class */ (function () {
14
12
  * S : total des salaires perçus lors des 3 derniers mois précédant le jour de l'envoi de la lettre de licenciement (brut)
15
13
  * P : prime(s) ou gratification(s) de caractère annuel ou exceptionnel versée(s) pendant cette période (prise en compte prorata temporis)
16
14
  **/
17
- ReferenceSalaryLegal.prototype.computeReferenceSalary = function (_a) {
18
- var _b = _a.salaires, salaires = _b === void 0 ? [] : _b;
19
- var rankedSalaires = (0, common_1.rankByMonthArrayDescFrench)(salaires);
20
- var primeValues = rankedSalaires.map(function (v) { return v.prime; }).filter(common_1.nonNullable);
21
- var salaryValues = rankedSalaires.map(function (a) { return a.value; }).filter(common_1.nonNullable);
22
- var moyenneSalaires = 0;
23
- var moyenne3DerniersMoisSalaires = 0;
15
+ computeReferenceSalary({ salaires = [], }) {
16
+ const rankedSalaires = (0, common_1.rankByMonthArrayDescFrench)(salaires);
17
+ const primeValues = rankedSalaires.map((v) => v.prime).filter(common_1.nonNullable);
18
+ const salaryValues = rankedSalaires.map((a) => a.value).filter(common_1.nonNullable);
19
+ let moyenneSalaires = 0;
20
+ let moyenne3DerniersMoisSalaires = 0;
24
21
  // calcul du salaire de reference
25
22
  moyenneSalaires = (0, common_1.sum)(salaryValues) / salaires.length;
26
23
  moyenne3DerniersMoisSalaires =
27
24
  (0, common_1.sum)(primeValues) / 12 +
28
25
  ((0, common_1.sum)(salaryValues.slice(0, 3)) - (0, common_1.sum)(primeValues)) / 3;
29
- var max = Math.max(moyenneSalaires, moyenne3DerniersMoisSalaires);
26
+ const max = Math.max(moyenneSalaires, moyenne3DerniersMoisSalaires);
30
27
  return isNaN(max) ? 0 : max;
31
- };
32
- return ReferenceSalaryLegal;
33
- }());
28
+ }
29
+ }
34
30
  exports.ReferenceSalaryLegal = ReferenceSalaryLegal;
@@ -1,23 +1,8 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
3
  exports.SeniorityLegal = exports.LEGAL_MOTIFS = void 0;
19
- var motif_keys_1 = require("../common/motif-keys");
20
- var seniority_1 = require("../common/seniority");
4
+ const motif_keys_1 = require("../common/motif-keys");
5
+ const seniority_1 = require("../common/seniority");
21
6
  exports.LEGAL_MOTIFS = [
22
7
  {
23
8
  key: motif_keys_1.MotifKeys.maladieNonPro,
@@ -44,14 +29,9 @@ exports.LEGAL_MOTIFS = [
44
29
  { key: motif_keys_1.MotifKeys.greve, label: "Grève", value: 1 },
45
30
  { key: motif_keys_1.MotifKeys.miseAPied, label: "Mise à pied", value: 1 },
46
31
  ];
47
- var SeniorityLegal = /** @class */ (function (_super) {
48
- __extends(SeniorityLegal, _super);
49
- function SeniorityLegal() {
50
- return _super !== null && _super.apply(this, arguments) || this;
51
- }
52
- SeniorityLegal.prototype.getMotifs = function () {
32
+ class SeniorityLegal extends seniority_1.SeniorityDefault {
33
+ getMotifs() {
53
34
  return exports.LEGAL_MOTIFS;
54
- };
55
- return SeniorityLegal;
56
- }(seniority_1.SeniorityDefault));
35
+ }
36
+ }
57
37
  exports.SeniorityLegal = SeniorityLegal;
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DismissalReasonDefault = void 0;
4
- var DismissalReasonDefault = /** @class */ (function () {
5
- function DismissalReasonDefault() {
6
- }
7
- DismissalReasonDefault.prototype.dismissalTypes = function () {
4
+ class DismissalReasonDefault {
5
+ dismissalTypes() {
8
6
  return [];
9
- };
10
- return DismissalReasonDefault;
11
- }());
7
+ }
8
+ }
12
9
  exports.DismissalReasonDefault = DismissalReasonDefault;
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DismissalReasonFactory = void 0;
4
- var conventions_1 = require("../../conventions");
5
- var __1 = require("..");
6
- var dismissal_reason_1 = require("../dismissal-reason");
7
- var DismissalReasonFactory = /** @class */ (function () {
8
- function DismissalReasonFactory() {
9
- }
10
- DismissalReasonFactory.prototype.create = function (idcc) {
4
+ const conventions_1 = require("../../conventions");
5
+ const __1 = require("..");
6
+ const dismissal_reason_1 = require("../dismissal-reason");
7
+ class DismissalReasonFactory {
8
+ create(idcc) {
11
9
  switch (idcc) {
12
10
  case __1.SupportedCc.IDCC0573:
13
11
  return new conventions_1.DismissalReason573();
@@ -33,7 +31,6 @@ var DismissalReasonFactory = /** @class */ (function () {
33
31
  default:
34
32
  return new dismissal_reason_1.DismissalReasonDefault();
35
33
  }
36
- };
37
- return DismissalReasonFactory;
38
- }());
34
+ }
35
+ }
39
36
  exports.DismissalReasonFactory = DismissalReasonFactory;
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IneligibilityIndemniteLicenciementFactory = void 0;
4
- var base_1 = require("../../base");
5
- var conventions_1 = require("../../conventions");
6
- var __1 = require("..");
7
- var IneligibilityIndemniteLicenciementFactory = /** @class */ (function () {
8
- function IneligibilityIndemniteLicenciementFactory() {
9
- }
10
- IneligibilityIndemniteLicenciementFactory.prototype.create = function (idcc) {
4
+ const base_1 = require("../../base");
5
+ const conventions_1 = require("../../conventions");
6
+ const __1 = require("..");
7
+ class IneligibilityIndemniteLicenciementFactory {
8
+ create(idcc) {
11
9
  switch (idcc) {
12
10
  case __1.SupportedCc.IDCC3239:
13
11
  return new conventions_1.IneligibilityLegalIndemniteLicenciement3239();
@@ -18,7 +16,6 @@ var IneligibilityIndemniteLicenciementFactory = /** @class */ (function () {
18
16
  default:
19
17
  return new base_1.IneligibilityLegalIndemniteLicenciement();
20
18
  }
21
- };
22
- return IneligibilityIndemniteLicenciementFactory;
23
- }());
19
+ }
20
+ }
24
21
  exports.IneligibilityIndemniteLicenciementFactory = IneligibilityIndemniteLicenciementFactory;
@@ -1,17 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IneligibilityIndemnitePrecariteFactory = void 0;
4
- var base_1 = require("../../base");
5
- var __1 = require("..");
6
- var ineligibility_indemnite_precarite_1 = require("../../conventions/1486_bureaux_etudes_techniques/ineligibility-indemnite-precarite");
7
- var ineligibility_indemnite_precarite_2 = require("../../conventions/1516_organismes_formation/ineligibility-indemnite-precarite");
8
- var ineligibility_indemnite_precarite_3 = require("../../conventions/2098_personnel_presta_service_tertiaire/ineligibility-indemnite-precarite");
9
- var ineligibility_indemnite_precarite_4 = require("../../conventions/2511_sport/ineligibility-indemnite-precarite");
10
- var ineligibility_indemnite_precarite_5 = require("../../conventions/3127_entreprises_services_a_la_personne/ineligibility-indemnite-precarite");
11
- var IneligibilityIndemnitePrecariteFactory = /** @class */ (function () {
12
- function IneligibilityIndemnitePrecariteFactory() {
13
- }
14
- IneligibilityIndemnitePrecariteFactory.prototype.create = function (idcc) {
4
+ const base_1 = require("../../base");
5
+ const __1 = require("..");
6
+ const ineligibility_indemnite_precarite_1 = require("../../conventions/1486_bureaux_etudes_techniques/ineligibility-indemnite-precarite");
7
+ const ineligibility_indemnite_precarite_2 = require("../../conventions/1516_organismes_formation/ineligibility-indemnite-precarite");
8
+ const ineligibility_indemnite_precarite_3 = require("../../conventions/2098_personnel_presta_service_tertiaire/ineligibility-indemnite-precarite");
9
+ const ineligibility_indemnite_precarite_4 = require("../../conventions/2511_sport/ineligibility-indemnite-precarite");
10
+ const ineligibility_indemnite_precarite_5 = require("../../conventions/3127_entreprises_services_a_la_personne/ineligibility-indemnite-precarite");
11
+ class IneligibilityIndemnitePrecariteFactory {
12
+ create(idcc) {
15
13
  switch (idcc) {
16
14
  case __1.SupportedCc.IDCC1486:
17
15
  return new ineligibility_indemnite_precarite_1.IneligibilityIndemnitePrecarite1486();
@@ -26,7 +24,6 @@ var IneligibilityIndemnitePrecariteFactory = /** @class */ (function () {
26
24
  default:
27
25
  return new base_1.IneligibilityLegalIndemnitePrecarite();
28
26
  }
29
- };
30
- return IneligibilityIndemnitePrecariteFactory;
31
- }());
27
+ }
28
+ }
32
29
  exports.IneligibilityIndemnitePrecariteFactory = IneligibilityIndemnitePrecariteFactory;
@@ -1,20 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IneligibilityRuptureConventionnelleFactory = void 0;
4
- var base_1 = require("../../base");
5
- var conventions_1 = require("../../conventions");
6
- var __1 = require("..");
7
- var IneligibilityRuptureConventionnelleFactory = /** @class */ (function () {
8
- function IneligibilityRuptureConventionnelleFactory() {
9
- }
10
- IneligibilityRuptureConventionnelleFactory.prototype.create = function (idcc) {
4
+ const base_1 = require("../../base");
5
+ const conventions_1 = require("../../conventions");
6
+ const __1 = require("..");
7
+ class IneligibilityRuptureConventionnelleFactory {
8
+ create(idcc) {
11
9
  switch (idcc) {
12
10
  case __1.SupportedCc.IDCC3239:
13
11
  return new conventions_1.IneligibilityRuptureConventionnelle3239();
14
12
  default:
15
13
  return new base_1.IneligibilityRuptureConventionnelle();
16
14
  }
17
- };
18
- return IneligibilityRuptureConventionnelleFactory;
19
- }());
15
+ }
16
+ }
20
17
  exports.IneligibilityRuptureConventionnelleFactory = IneligibilityRuptureConventionnelleFactory;
@@ -1,29 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReferenceSalaryFactory = void 0;
4
- var base_1 = require("../../base");
5
- var conventions_1 = require("../../conventions");
6
- var _16_transports_routiers_1 = require("../../conventions/16_transports_routiers");
7
- var _44_industries_chimiques_1 = require("../../conventions/44_industries_chimiques");
8
- var _86_publicite_francaise_1 = require("../../conventions/86_publicite_francaise");
9
- var _292_plasturgie_1 = require("../../conventions/292_plasturgie");
10
- var _573_commerces_de_gros_1 = require("../../conventions/573_commerces_de_gros");
11
- var _675_habillement_commerce_succursales_1 = require("../../conventions/675_habillement_commerce_succursales");
12
- var _1486_bureaux_etudes_techniques_1 = require("../../conventions/1486_bureaux_etudes_techniques");
13
- var _1516_organismes_formation_1 = require("../../conventions/1516_organismes_formation");
14
- var _1527_immobilier_1 = require("../../conventions/1527_immobilier");
15
- var _1672_societes_assurances_1 = require("../../conventions/1672_societes_assurances");
16
- var _1702_ouvriers_travaux_public_1 = require("../../conventions/1702_ouvriers_travaux_public");
17
- var _1740_batiment_region_parisienne_1 = require("../../conventions/1740_batiment_region_parisienne");
18
- var _2098_personnel_presta_service_tertiaire_1 = require("../../conventions/2098_personnel_presta_service_tertiaire");
19
- var salary_1 = require("../../conventions/2148_telecommunications/salary");
20
- var salary_2 = require("../../conventions/2596_coiffure/salary");
21
- var _3239_particuliers_employeurs_domicile_1 = require("../../conventions/3239_particuliers_employeurs_domicile");
22
- var __1 = require("..");
23
- var ReferenceSalaryFactory = /** @class */ (function () {
24
- function ReferenceSalaryFactory() {
25
- }
26
- ReferenceSalaryFactory.prototype.create = function (idcc) {
4
+ const base_1 = require("../../base");
5
+ const conventions_1 = require("../../conventions");
6
+ const _16_transports_routiers_1 = require("../../conventions/16_transports_routiers");
7
+ const _44_industries_chimiques_1 = require("../../conventions/44_industries_chimiques");
8
+ const _86_publicite_francaise_1 = require("../../conventions/86_publicite_francaise");
9
+ const _292_plasturgie_1 = require("../../conventions/292_plasturgie");
10
+ const _573_commerces_de_gros_1 = require("../../conventions/573_commerces_de_gros");
11
+ const _675_habillement_commerce_succursales_1 = require("../../conventions/675_habillement_commerce_succursales");
12
+ const _1486_bureaux_etudes_techniques_1 = require("../../conventions/1486_bureaux_etudes_techniques");
13
+ const _1516_organismes_formation_1 = require("../../conventions/1516_organismes_formation");
14
+ const _1527_immobilier_1 = require("../../conventions/1527_immobilier");
15
+ const _1672_societes_assurances_1 = require("../../conventions/1672_societes_assurances");
16
+ const _1702_ouvriers_travaux_public_1 = require("../../conventions/1702_ouvriers_travaux_public");
17
+ const _1740_batiment_region_parisienne_1 = require("../../conventions/1740_batiment_region_parisienne");
18
+ const _2098_personnel_presta_service_tertiaire_1 = require("../../conventions/2098_personnel_presta_service_tertiaire");
19
+ const salary_1 = require("../../conventions/2148_telecommunications/salary");
20
+ const salary_2 = require("../../conventions/2596_coiffure/salary");
21
+ const _3239_particuliers_employeurs_domicile_1 = require("../../conventions/3239_particuliers_employeurs_domicile");
22
+ const __1 = require("..");
23
+ class ReferenceSalaryFactory {
24
+ create(idcc) {
27
25
  switch (idcc) {
28
26
  case __1.SupportedCc.IDCC1516:
29
27
  return new _1516_organismes_formation_1.ReferenceSalary1516();
@@ -71,7 +69,6 @@ var ReferenceSalaryFactory = /** @class */ (function () {
71
69
  default:
72
70
  return new base_1.ReferenceSalaryLegal();
73
71
  }
74
- };
75
- return ReferenceSalaryFactory;
76
- }());
72
+ }
73
+ }
77
74
  exports.ReferenceSalaryFactory = ReferenceSalaryFactory;
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SeniorityFactory = void 0;
4
- var base_1 = require("../../base");
5
- var conventions_1 = require("../../conventions");
6
- var index_1 = require("../index");
7
- var SeniorityFactory = /** @class */ (function () {
8
- function SeniorityFactory() {
9
- }
10
- SeniorityFactory.prototype.create = function (idcc) {
4
+ const base_1 = require("../../base");
5
+ const conventions_1 = require("../../conventions");
6
+ const index_1 = require("../index");
7
+ class SeniorityFactory {
8
+ create(idcc) {
11
9
  switch (idcc) {
12
10
  case index_1.SupportedCc.IDCC2511:
13
11
  return new conventions_1.Seniority2511();
@@ -77,7 +75,6 @@ var SeniorityFactory = /** @class */ (function () {
77
75
  default:
78
76
  return new base_1.SeniorityLegal();
79
77
  }
80
- };
81
- return SeniorityFactory;
82
- }());
78
+ }
79
+ }
83
80
  exports.SeniorityFactory = SeniorityFactory;
@@ -1,50 +1,47 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SeniorityDefault = void 0;
4
- var date_fns_1 = require("date-fns");
5
- var index_1 = require("./index");
6
- var SeniorityDefault = /** @class */ (function () {
7
- function SeniorityDefault() {
8
- }
9
- SeniorityDefault.prototype.mapSituation = function (args) {
10
- var _a, _b;
11
- var absencePeriods = args.absencePeriods
4
+ const date_fns_1 = require("date-fns");
5
+ const index_1 = require("./index");
6
+ class SeniorityDefault {
7
+ mapSituation(args) {
8
+ const absencePeriods = args.absencePeriods
12
9
  ? JSON.parse(args.absencePeriods)
13
10
  : [];
14
11
  return {
15
- absencePeriods: absencePeriods,
16
- dateEntree: (_a = args["contrat salarié . indemnité de licenciement . date d'entrée"]) !== null && _a !== void 0 ? _a : "",
17
- dateSortie: (_b = args["contrat salarié . indemnité de licenciement . date de sortie"]) !== null && _b !== void 0 ? _b : "",
12
+ absencePeriods,
13
+ dateEntree: args["contrat salarié . indemnité de licenciement . date d'entrée"] ??
14
+ "",
15
+ dateSortie: args["contrat salarié . indemnité de licenciement . date de sortie"] ??
16
+ "",
18
17
  };
19
- };
20
- SeniorityDefault.prototype.mapRequiredSituation = function (args) {
21
- var _a, _b, _c;
22
- var absencePeriods = args.absencePeriods
18
+ }
19
+ mapRequiredSituation(args) {
20
+ const absencePeriods = args.absencePeriods
23
21
  ? JSON.parse(args.absencePeriods)
24
22
  : [];
25
23
  return {
26
- absencePeriods: absencePeriods,
27
- dateEntree: (_a = args["contrat salarié . indemnité de licenciement . date d'entrée"]) !== null && _a !== void 0 ? _a : "",
28
- dateNotification: (_b = args["contrat salarié . indemnité de licenciement . date de notification"]) !== null && _b !== void 0 ? _b : "",
29
- dateSortie: (_c = args["contrat salarié . indemnité de licenciement . date de sortie"]) !== null && _c !== void 0 ? _c : "",
24
+ absencePeriods,
25
+ dateEntree: args["contrat salarié . indemnité de licenciement . date d'entrée"] ??
26
+ "",
27
+ dateNotification: args["contrat salarié . indemnité de licenciement . date de notification"] ?? "",
28
+ dateSortie: args["contrat salarié . indemnité de licenciement . date de sortie"] ??
29
+ "",
30
30
  };
31
- };
32
- SeniorityDefault.prototype.computeSeniority = function (_a) {
33
- var dateEntree = _a.dateEntree, dateSortie = _a.dateSortie, _b = _a.absencePeriods, absencePeriods = _b === void 0 ? [] : _b;
31
+ }
32
+ computeSeniority({ dateEntree, dateSortie, absencePeriods = [], }) {
34
33
  return this.compute(dateEntree, dateSortie, absencePeriods);
35
- };
36
- SeniorityDefault.prototype.computeRequiredSeniority = function (_a) {
37
- var dateEntree = _a.dateEntree, dateNotification = _a.dateNotification, _b = _a.absencePeriods, absencePeriods = _b === void 0 ? [] : _b;
34
+ }
35
+ computeRequiredSeniority({ dateEntree, dateNotification, absencePeriods = [], }) {
38
36
  return this.compute(dateEntree, dateNotification, absencePeriods);
39
- };
40
- SeniorityDefault.prototype.compute = function (from, to, absences) {
41
- var _this = this;
42
- var dEntree = (0, index_1.parseDate)(from);
43
- var dSortie = (0, date_fns_1.addDays)((0, index_1.parseDate)(to), 1);
44
- var totalAbsence = absences
45
- .filter(function (period) { return Boolean(period.durationInMonth); })
46
- .reduce(function (total, item) {
47
- var m = _this.getMotifs().find(function (motif) { return motif.key === item.motif.key; });
37
+ }
38
+ compute(from, to, absences) {
39
+ const dEntree = (0, index_1.parseDate)(from);
40
+ const dSortie = (0, date_fns_1.addDays)((0, index_1.parseDate)(to), 1);
41
+ const totalAbsence = absences
42
+ .filter((period) => Boolean(period.durationInMonth))
43
+ .reduce((total, item) => {
44
+ const m = this.getMotifs().find((motif) => motif.key === item.motif.key);
48
45
  if (!m || !item.durationInMonth) {
49
46
  return total;
50
47
  }
@@ -53,7 +50,6 @@ var SeniorityDefault = /** @class */ (function () {
53
50
  return {
54
51
  value: ((0, date_fns_1.differenceInMonths)(dSortie, dEntree) - totalAbsence) / 12,
55
52
  };
56
- };
57
- return SeniorityDefault;
58
- }());
53
+ }
54
+ }
59
55
  exports.SeniorityDefault = SeniorityDefault;
@@ -52,9 +52,8 @@ var SupportedCc;
52
52
  SupportedCc["IDCC3248"] = "3248";
53
53
  SupportedCc["default"] = "default";
54
54
  })(SupportedCc || (exports.SupportedCc = SupportedCc = {}));
55
- var getSupportedAgreement = function (idcc) {
56
- for (var _i = 0, _a = Object.values(SupportedCc); _i < _a.length; _i++) {
57
- var value = _a[_i];
55
+ const getSupportedAgreement = (idcc) => {
56
+ for (const value of Object.values(SupportedCc)) {
58
57
  if (value === idcc.toString()) {
59
58
  return value;
60
59
  }
@@ -69,9 +68,8 @@ var SupportedAgreementHorsAni;
69
68
  SupportedAgreementHorsAni["IDCC2511"] = "2511";
70
69
  SupportedAgreementHorsAni["IDCC2941"] = "2941";
71
70
  })(SupportedAgreementHorsAni || (exports.SupportedAgreementHorsAni = SupportedAgreementHorsAni = {}));
72
- var getSupportedAgreementHorsAni = function (idcc) {
73
- for (var _i = 0, _a = Object.values(SupportedAgreementHorsAni); _i < _a.length; _i++) {
74
- var value = _a[_i];
71
+ const getSupportedAgreementHorsAni = (idcc) => {
72
+ for (const value of Object.values(SupportedAgreementHorsAni)) {
75
73
  if (value === idcc.toString()) {
76
74
  return value;
77
75
  }
@@ -5,8 +5,8 @@ exports.nonNullable = nonNullable;
5
5
  function nonNullable(value) {
6
6
  return value !== null && value !== undefined;
7
7
  }
8
- var enumToArray = function (enumObject) {
9
- return Object.keys(enumObject).map(function (key) {
8
+ const enumToArray = (enumObject) => {
9
+ return Object.keys(enumObject).map((key) => {
10
10
  return {
11
11
  label: key,
12
12
  value: enumObject[key],
@@ -14,16 +14,16 @@ var enumToArray = function (enumObject) {
14
14
  });
15
15
  };
16
16
  exports.enumToArray = enumToArray;
17
- var mergeTwoArray = function (left, right) {
17
+ const mergeTwoArray = (left, right) => {
18
18
  if (left.length === 0) {
19
19
  return right;
20
20
  }
21
21
  if (right.length === 0) {
22
22
  return left;
23
23
  }
24
- var merged = left.concat(right);
25
- return merged.reduce(function (acc, current) {
26
- var index = acc.findIndex(function (data) { return Object.keys(data)[0] === Object.keys(current)[0]; });
24
+ const merged = left.concat(right);
25
+ return merged.reduce((acc, current) => {
26
+ const index = acc.findIndex((data) => Object.keys(data)[0] === Object.keys(current)[0]);
27
27
  if (index === -1) {
28
28
  return acc.concat(current);
29
29
  }
@@ -5,13 +5,10 @@ exports.isFloat = isFloat;
5
5
  function isFloat(n) {
6
6
  return Number(n) === n && n % 1 !== 0;
7
7
  }
8
- var sum = function (values) {
9
- return values.reduce(function (a, b) { return a + b; }, 0);
10
- };
8
+ const sum = (values) => values.reduce((a, b) => a + b, 0);
11
9
  exports.sum = sum;
12
- var round = function (value, decimals) {
13
- if (decimals === void 0) { decimals = 2; }
14
- var tenToPower = Math.pow(10, decimals);
10
+ const round = (value, decimals = 2) => {
11
+ const tenToPower = Math.pow(10, decimals);
15
12
  return Math.round(value * tenToPower) / tenToPower;
16
13
  };
17
14
  exports.round = round;