@01-edu/shared 1.1.4 → 1.1.6

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/attrs-defs.js CHANGED
@@ -2438,7 +2438,7 @@ types.levelDefinition = TypeObject({
2438
2438
  check: (level, object) => {
2439
2439
  checkIntegerInBetween(level, 1, MAX_LEVEL)
2440
2440
 
2441
- const definitionsWithSameLevel = object.attrs.levelsDefinitions.filter(
2441
+ const definitionsWithSameLevel = object.attrs.levelsDefinitions?.filter(
2442
2442
  levelDefinition => levelDefinition.level === level,
2443
2443
  )
2444
2444
  if (definitionsWithSameLevel?.length > 1) {
@@ -2627,7 +2627,7 @@ types.rankDefinitionName = Literal('', {
2627
2627
  // checkNotEmpty(name): have to be commented or it's impossible
2628
2628
  // to add a new rank to the ranks definition, as default value is ''
2629
2629
  // and check is done before add
2630
- const definitionsWithSameName = object.attrs.ranksDefinitions.filter(
2630
+ const definitionsWithSameName = object.attrs.ranksDefinitions?.filter(
2631
2631
  rankDefinition => rankDefinition.name === name,
2632
2632
  )
2633
2633
  if (definitionsWithSameName?.length > 1) {
@@ -2651,7 +2651,7 @@ types.rankDefinition = TypeObject({
2651
2651
  check: (level, object) => {
2652
2652
  checkIntegerInBetween(level, 0, MAX_LEVEL)
2653
2653
 
2654
- const definitionsWithSameLevel = object.attrs.ranksDefinitions.filter(
2654
+ const definitionsWithSameLevel = object.attrs.ranksDefinitions?.filter(
2655
2655
  rankDefinition => rankDefinition.level === level,
2656
2656
  )
2657
2657
  if (definitionsWithSameLevel?.length > 1) {
@@ -3636,7 +3636,7 @@ types.timelineChunk = TypeObject({
3636
3636
  check: (month, object) => {
3637
3637
  checkIntegerInBetween(month, 1, 120)
3638
3638
 
3639
- const definitionsWithSameMonth = object.attrs.timeline.filter(
3639
+ const definitionsWithSameMonth = object.attrs.timeline?.filter(
3640
3640
  guideline => guideline.month === month,
3641
3641
  )
3642
3642
  if (definitionsWithSameMonth?.length > 1) {
@@ -3677,7 +3677,9 @@ types.timelineChunk = TypeObject({
3677
3677
  )
3678
3678
  }
3679
3679
 
3680
- const ranksNames = object.attrs.ranksDefinitions.map(({ name }) => name)
3680
+ const ranksNames = object.attrs.ranksDefinitions?.map(
3681
+ ({ name }) => name,
3682
+ )
3681
3683
  if (!ranksNames.includes(rank)) {
3682
3684
  throw Error(
3683
3685
  `Must match one of the following existing rank names: ${ranksNames.join(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@01-edu/shared",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "scripts": {
@@ -242,6 +242,12 @@ export const skillsSet = {
242
242
  name: 'Git',
243
243
  type: 'technology',
244
244
  },
245
+
246
+ // employability
247
+ employability: {
248
+ name: 'Employability',
249
+ type: 'employability',
250
+ },
245
251
  }
246
252
 
247
253
  export const skillTiers = [
@@ -269,6 +275,12 @@ export const skillTypes = [
269
275
  description:
270
276
  'Technologies gather the different programming languages, frameworks and platforms acquired from projects & piscines.',
271
277
  },
278
+ {
279
+ type: 'employability',
280
+ name: 'Employability',
281
+ description:
282
+ 'Develops professional readiness through personal branding, digital presence, and job search strategies—including portfolio building, CV writing, and effective networking.',
283
+ },
272
284
  ]
273
285
 
274
286
  export const hasRequiredSkills = (requiredSkills, userSkills) =>
package/toolbox.js CHANGED
@@ -5,7 +5,7 @@ import { onboardingTypes } from './onboarding.js'
5
5
  const keyCodes = {
6
6
  13: ({ save, value, event, allowLineBreak }) => {
7
7
  if (event.shiftKey || allowLineBreak) return false
8
- save(value)
8
+ return save(value)
9
9
  }, // enter
10
10
  27: ({ set, originalValue }) => set(originalValue), // esc
11
11
  83: ({ save, value, event }) =>