@genexus/genexus-ide-ui 1.1.43 → 1.1.45

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 (104) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-ai-message.cjs.entry.js +1 -1
  3. package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +1 -1
  4. package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
  5. package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
  6. package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
  7. package/dist/cjs/gx-ide-select-user-team.cjs.entry.js +1 -1
  8. package/dist/cjs/gx-ide-select-user-team.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gx-ide-start-page.cjs.entry.js +33 -20
  10. package/dist/cjs/gx-ide-start-page.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js +2 -2
  12. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +2 -2
  13. package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js +1 -1
  14. package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +1 -1
  15. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +2 -2
  16. package/dist/cjs/gx-ide-ww-files.cjs.entry.js +1 -1
  17. package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
  18. package/dist/cjs/{helpers-21c9cd02.js → helpers-263b5f4e.js} +3 -7
  19. package/dist/cjs/helpers-263b5f4e.js.map +1 -0
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/{tabular-grid-render-4350dbaf.js → tabular-grid-render-b1767da2.js} +2 -2
  22. package/dist/cjs/{tabular-grid-render-4350dbaf.js.map → tabular-grid-render-b1767da2.js.map} +1 -1
  23. package/dist/collection/common/helpers.js +3 -7
  24. package/dist/collection/common/helpers.js.map +1 -1
  25. package/dist/collection/components/select-user-team/select-user-team.css +0 -2
  26. package/dist/collection/components/start-page/gx-ide-assets/start-page/langs/start-page.lang.en.json +4 -0
  27. package/dist/collection/components/start-page/gx-ide-assets/start-page/langs/start-page.lang.ja.json +4 -0
  28. package/dist/collection/components/start-page/gx-ide-assets/start-page/langs/start-page.lang.zh.json +4 -0
  29. package/dist/collection/components/start-page/start-page.css +78 -13
  30. package/dist/collection/components/start-page/start-page.js +104 -44
  31. package/dist/collection/components/start-page/start-page.js.map +1 -1
  32. package/dist/components/gx-ide-select-user-team.js +1 -1
  33. package/dist/components/gx-ide-select-user-team.js.map +1 -1
  34. package/dist/components/gx-ide-start-page.js +38 -23
  35. package/dist/components/gx-ide-start-page.js.map +1 -1
  36. package/dist/components/helpers.js +2 -6
  37. package/dist/components/helpers.js.map +1 -1
  38. package/dist/esm/genexus-ide-ui.js +1 -1
  39. package/dist/esm/gx-ide-ai-message.entry.js +1 -1
  40. package/dist/esm/gx-ide-dashboard-home.entry.js +1 -1
  41. package/dist/esm/gx-ide-new-environment.entry.js +1 -1
  42. package/dist/esm/gx-ide-new-kb.entry.js +1 -1
  43. package/dist/esm/gx-ide-object-selector.entry.js +1 -1
  44. package/dist/esm/gx-ide-select-user-team.entry.js +1 -1
  45. package/dist/esm/gx-ide-select-user-team.entry.js.map +1 -1
  46. package/dist/esm/gx-ide-start-page.entry.js +33 -20
  47. package/dist/esm/gx-ide-start-page.entry.js.map +1 -1
  48. package/dist/esm/gx-ide-team-dev-bring-changes.entry.js +2 -2
  49. package/dist/esm/gx-ide-team-dev-commit.entry.js +2 -2
  50. package/dist/esm/gx-ide-team-dev-history.entry.js +1 -1
  51. package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +1 -1
  52. package/dist/esm/gx-ide-team-dev-update.entry.js +2 -2
  53. package/dist/esm/gx-ide-ww-files.entry.js +1 -1
  54. package/dist/esm/gx-ide-ww-images.entry.js +1 -1
  55. package/dist/esm/{helpers-7960f084.js → helpers-b180a2d1.js} +3 -7
  56. package/dist/esm/helpers-b180a2d1.js.map +1 -0
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/{tabular-grid-render-f7eb612b.js → tabular-grid-render-96d67a8c.js} +2 -2
  59. package/dist/esm/{tabular-grid-render-f7eb612b.js.map → tabular-grid-render-96d67a8c.js.map} +1 -1
  60. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  61. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  62. package/dist/genexus-ide-ui/gx-ide-assets/start-page/langs/start-page.lang.en.json +4 -0
  63. package/dist/genexus-ide-ui/gx-ide-assets/start-page/langs/start-page.lang.ja.json +4 -0
  64. package/dist/genexus-ide-ui/gx-ide-assets/start-page/langs/start-page.lang.zh.json +4 -0
  65. package/dist/genexus-ide-ui/{p-8c867f9a.entry.js → p-072419f9.entry.js} +2 -2
  66. package/dist/genexus-ide-ui/{p-ed87224f.entry.js → p-083d8e94.entry.js} +3 -3
  67. package/dist/genexus-ide-ui/{p-646ddf49.entry.js → p-11a60dbe.entry.js} +2 -2
  68. package/dist/genexus-ide-ui/{p-12b563fe.entry.js → p-137a252f.entry.js} +2 -2
  69. package/dist/genexus-ide-ui/{p-8c15538c.js → p-1972b953.js} +10 -13
  70. package/dist/genexus-ide-ui/p-1972b953.js.map +1 -0
  71. package/dist/genexus-ide-ui/{p-59908901.entry.js → p-24573081.entry.js} +2 -2
  72. package/dist/genexus-ide-ui/{p-7f091892.entry.js → p-31c1b79d.entry.js} +2 -2
  73. package/dist/genexus-ide-ui/{p-5624d287.entry.js → p-3ccd331f.entry.js} +2 -2
  74. package/dist/genexus-ide-ui/{p-2b38e18e.entry.js → p-57ed2623.entry.js} +2 -2
  75. package/dist/genexus-ide-ui/{p-4cc2b3e6.entry.js → p-6f5cf136.entry.js} +6 -6
  76. package/dist/genexus-ide-ui/p-6f5cf136.entry.js.map +1 -0
  77. package/dist/genexus-ide-ui/{p-c1ad1cc6.entry.js → p-7a28161f.entry.js} +2 -2
  78. package/dist/genexus-ide-ui/{p-4e3ad78d.entry.js → p-a58048e9.entry.js} +3 -3
  79. package/dist/genexus-ide-ui/{p-4b680e46.entry.js → p-af975c83.entry.js} +2 -2
  80. package/dist/genexus-ide-ui/{p-77c2e69d.js → p-c8270f7d.js} +2 -2
  81. package/dist/genexus-ide-ui/{p-a7883e6b.entry.js → p-d18c51fe.entry.js} +3 -3
  82. package/dist/genexus-ide-ui/{p-e2b0ee82.entry.js → p-d67ff6a5.entry.js} +566 -543
  83. package/dist/genexus-ide-ui/p-d67ff6a5.entry.js.map +1 -0
  84. package/dist/types/components/start-page/start-page.d.ts +32 -19
  85. package/dist/types/components.d.ts +18 -2
  86. package/package.json +1 -1
  87. package/dist/cjs/helpers-21c9cd02.js.map +0 -1
  88. package/dist/esm/helpers-7960f084.js.map +0 -1
  89. package/dist/genexus-ide-ui/p-4cc2b3e6.entry.js.map +0 -1
  90. package/dist/genexus-ide-ui/p-8c15538c.js.map +0 -1
  91. package/dist/genexus-ide-ui/p-e2b0ee82.entry.js.map +0 -1
  92. /package/dist/genexus-ide-ui/{p-8c867f9a.entry.js.map → p-072419f9.entry.js.map} +0 -0
  93. /package/dist/genexus-ide-ui/{p-ed87224f.entry.js.map → p-083d8e94.entry.js.map} +0 -0
  94. /package/dist/genexus-ide-ui/{p-646ddf49.entry.js.map → p-11a60dbe.entry.js.map} +0 -0
  95. /package/dist/genexus-ide-ui/{p-12b563fe.entry.js.map → p-137a252f.entry.js.map} +0 -0
  96. /package/dist/genexus-ide-ui/{p-59908901.entry.js.map → p-24573081.entry.js.map} +0 -0
  97. /package/dist/genexus-ide-ui/{p-7f091892.entry.js.map → p-31c1b79d.entry.js.map} +0 -0
  98. /package/dist/genexus-ide-ui/{p-5624d287.entry.js.map → p-3ccd331f.entry.js.map} +0 -0
  99. /package/dist/genexus-ide-ui/{p-2b38e18e.entry.js.map → p-57ed2623.entry.js.map} +0 -0
  100. /package/dist/genexus-ide-ui/{p-c1ad1cc6.entry.js.map → p-7a28161f.entry.js.map} +0 -0
  101. /package/dist/genexus-ide-ui/{p-4e3ad78d.entry.js.map → p-a58048e9.entry.js.map} +0 -0
  102. /package/dist/genexus-ide-ui/{p-4b680e46.entry.js.map → p-af975c83.entry.js.map} +0 -0
  103. /package/dist/genexus-ide-ui/{p-77c2e69d.js.map → p-c8270f7d.js.map} +0 -0
  104. /package/dist/genexus-ide-ui/{p-a7883e6b.entry.js.map → p-d18c51fe.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/common/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAWlC,MAAM,UAAU,GAAG;IACjB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,QAAQ;IACR,UAAU;CACX,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAoB,EAAE,EAAE;;IAC9D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,YAAY,GAAG,MAAA,OAAO,CAAC,UAAU,0CAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpE,MAAM,kBAAkB,GACtB,MAAA,OAAO,CAAC,UAAU,0CAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAExD,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,EAAE,CAAC,EAAE;QACzB,OAAO,CAAC,IAAI,CACV,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CACrE,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAC,EAAE,CAAC,EAAE;QAC/B,OAAO,CAAC,IAAI,CACV,GAAG;YACD,GAAG,EAAE,CAAC,YAA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EAAE;IAC3B,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,MAAM,CAAC,EAAE;QAC3B,MAAM,KAAK,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAC5B,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE,IAAI,MAAM,CAAC,EAAE,KAAK,EAAE,CAC9C,CAAC;QACF,OAAO,CACL,mBACE,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAC,UAAU,EAChB,YAAY,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,EACvC,OAAO,EAAE,MAAM,CAAC,KAAK,EACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,4BAA4B,EACrC,WAAW,EAAE,MAAM,CAAC,QAAQ,EAC5B,GAAG,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,GACjB,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { h } from \"@stencil/core\";\n\nimport {\n ChCheckboxCustomEvent,\n ComboBoxModel,\n TreeViewItemModel\n} from \"@genexus/chameleon-controls-library\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nimport { GxOption } from \"./types\";\n\nconst daysOfWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\n\n/**\n * @param element an HTMLElement\n * @returns an alphabetically ordered array of all the parts and exportparts the element contains.\n */\nexport const getElementSelectorParts = (element: HTMLElement) => {\n const queries: string[] = [];\n const elementParts = element.shadowRoot?.querySelectorAll(`[part]`);\n const elementExportParts =\n element.shadowRoot?.querySelectorAll(`[exportparts]`);\n\n elementParts?.forEach(el => {\n queries.push(\n `${element.tagName.toLowerCase()}::part(${el.getAttribute(\"part\")})`\n );\n });\n elementExportParts?.forEach(el => {\n queries.push(\n ...[\n ...el.getAttribute(\"exportparts\").matchAll(/(?:[\\w-]+:)?([\\w-]+)/g)\n ].map(item => `${element.tagName.toLowerCase()}::part(${item[1]})`)\n );\n });\n\n return queries.sort();\n};\n\n/**\n * @param selector a part selector\n * @returns A reference to the element the part belongs to.\n */\nexport const querySelectorPart = (selector: string) => {\n const querySelectorDeep = (\n element: HTMLElement,\n parts: string\n ): HTMLElement => {\n const shadow = element.shadowRoot;\n const partList = parts.split(\" \");\n\n const partElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[part~=\"${partName}\"]`).join(\"\")\n );\n if (partElement) {\n return partElement;\n }\n\n const exportPartElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[exportparts*=\"${partName}\"]`).join(\"\")\n );\n if (exportPartElement) {\n const exportPartList: string[] = [];\n const exportparts = exportPartElement.getAttribute(\"exportparts\");\n\n partList.forEach(partItem => {\n const exportPartName = exportparts.match(\n `(?:([\\\\w-]+):)?(${partItem})`\n )[1];\n if (exportPartName) {\n exportPartList.push(exportPartName);\n }\n });\n\n if (partList.length === exportPartList.length) {\n return querySelectorDeep(exportPartElement, exportPartList.join(\" \"));\n }\n }\n\n return null;\n };\n\n const selectorItems = selector.match(\"(.*)::part\\\\(([^)]+)\\\\)\");\n const entity = selectorItems[1];\n const partName = selectorItems[2];\n\n return querySelectorDeep(document.querySelector(entity), partName);\n};\n\nconst daysFromToday = (date: Date): number => {\n const today = new Date();\n // To calculate the time difference of two dates\n const timeDifference = today.getTime() - date.getTime();\n // To calculate the no. of days between two dates\n const daysDifference = timeDifference / (1000 * 3600 * 24);\n return Math.floor(daysDifference);\n};\n\n// - - - - - - - - - - - -\n// Date Functions\n// - - - - - - - - - - - -\n\nconst isToday = (date: Date): boolean => {\n const today = new Date();\n if (today.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nconst isYesterday = (date: Date): boolean => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n if (yesterday.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nexport const formatDate = (\n date: Date,\n type: FormatDateType = \"date-time\"\n): string => {\n let formattedDate;\n // validate date\n // undefined or null\n if (date === undefined || date === null) {\n return \"\";\n }\n // If the date object is invalid it will return 'NaN' on getTime() and NaN is never equal to itself\n const dateIsValid = date.getTime() === date.getTime();\n if (!dateIsValid) {\n return \"Invalid date\";\n }\n let locale = \"en-US\";\n const lang = document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf();\n if (lang === \"es\") {\n locale = \"es-ES\";\n }\n formattedDate = date.toLocaleDateString(locale);\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const time = `${hours}:${minutes}`;\n if (type === \"date-time\") {\n formattedDate += ` ${date.toLocaleTimeString()}`;\n } else if (type === \"date-time-short\") {\n // No seconds\n if (locale === \"es-ES\") {\n formattedDate = `${year}-${month}-${day} ${time}`;\n } else {\n formattedDate = `${month}/${day}/${year} ${time}`;\n }\n } else if (\"pretty\") {\n const daysPassedFromToday = daysFromToday(date);\n const today = new Date();\n const currentYear = today.getFullYear();\n if (isToday(date)) {\n return `Today ${time}`;\n } else if (isYesterday(date)) {\n return `Yesterday ${time}`;\n } else if (daysPassedFromToday <= 7) {\n // If one week or less, just show the day of the week, and the time\n const day = daysOfWeek[date.getDay()];\n return `${day} ${time}`;\n } else if (currentYear === year) {\n // If current year, show day number and month name. Example: November 17th\n if (locale === \"es-ES\") {\n formattedDate = `${day} de ${date.toLocaleString(\"es-ES\", {\n month: \"long\"\n })} ${time}`;\n } else {\n formattedDate = `${date.toLocaleString(\"en-US\", {\n month: \"long\"\n })} ${day} ${time}`;\n }\n } else {\n // Display date as usual\n formattedDate = formatDate(date, \"date-time-short\");\n }\n }\n return formattedDate;\n};\n\nexport type FormatDateType =\n | \"date\"\n | \"date-time\"\n | \"date-time-short\"\n | \"pretty\";\n\n// - - - - - - - - - - - -\n// /End of Date Functions\n// - - - - - - - - - - - -\n\n/* Count the total tree nodes (by default it does not count the first level nodes)*/\nexport const countTreeItems = (\n treeModel: TreeViewItemModel[],\n children = false\n): number => {\n let totalNodes = 0;\n treeModel.forEach(node => {\n children && totalNodes++;\n if (node.items) {\n totalNodes += countTreeItems(node.items, true);\n }\n });\n return totalNodes;\n};\n\n/**\n * @description it evaluates the initial selected combo item\n * @param options an array of GxOption\n * @returns the initial combo value, which in this case is the id\n */\nexport const setInitialComboValue = (options: GxOption[]): string => {\n const selected = options.find(option => option.selected);\n if (selected) {\n return selected.value || selected.id;\n } else {\n return options[0].value || options[0].id;\n }\n};\n\nexport const escapeRegExp = (str: string) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n/**\n * @description this function highlights the character(s) that match(es) the filter value.\n * hiChar comes from (hi)light (Char)acters\n * @param text the string to find the filter value on\n * @param filterValue the filter value\n * @returns a span element\n */\nexport const hiChar = function (text: string, filterValue: string) {\n if (text && filterValue) {\n const escapedFilterValue = escapeRegExp(filterValue);\n const re = new RegExp(escapedFilterValue, \"gi\");\n return (\n <span\n innerHTML={text.replace(re, '<span class=\"hiChar\">$&</span>')}\n ></span>\n );\n } else {\n return text;\n }\n};\n\nexport const closeOnOutsideClickHandler = (\n eventInfo: PointerEvent,\n ref: HTMLElement\n): true | void => {\n if (!eventInfo.composedPath().includes(ref)) {\n return true;\n }\n};\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label\n // startImgSrc: option.iconName\n }));\n\nexport const renderChCheckboxItems = (\n options: GxOption[] | undefined,\n frontEndCheckboxInputHandler: (\n event: ChCheckboxCustomEvent<string> | InputEvent\n ) => void,\n checkedIds: string[]\n): HTMLChCheckboxElement[] => {\n return options?.map(option => {\n const value = checkedIds?.find(\n id => option.value === id || option.id === id\n );\n return (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={value}\n onInput={frontEndCheckboxInputHandler}\n startImgSrc={option.iconName}\n key={option.value || option.id}\n ></ch-checkbox>\n );\n });\n};\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/common/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAWlC,MAAM,UAAU,GAAG;IACjB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,QAAQ;IACR,UAAU;CACX,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAoB,EAAE,EAAE;;IAC9D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,YAAY,GAAG,MAAA,OAAO,CAAC,UAAU,0CAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpE,MAAM,kBAAkB,GACtB,MAAA,OAAO,CAAC,UAAU,0CAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAExD,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,EAAE,CAAC,EAAE;QACzB,OAAO,CAAC,IAAI,CACV,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CACrE,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAC,EAAE,CAAC,EAAE;QAC/B,OAAO,CAAC,IAAI,CACV,GAAG;YACD,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;SACpE,CAAC,GAAG,CAAC,IAAI,CAA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,CAAC,EAAE,KAAK,EAAE,CAC9C,CAAC;QACF,OAAO,CACL,mBACE,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAC,UAAU,EAChB,YAAY,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,EACvC,OAAO,EAAE,MAAM,CAAC,KAAK,EACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,4BAA4B,EACrC,WAAW,EAAE,MAAM,CAAC,QAAQ,EAC5B,GAAG,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,GACjB,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { h } from \"@stencil/core\";\n\nimport {\n ChCheckboxCustomEvent,\n ComboBoxModel,\n TreeViewItemModel\n} from \"@genexus/chameleon-controls-library\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nimport { GxOption } from \"./types\";\n\nconst daysOfWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\n\n/**\n * @param element an HTMLElement\n * @returns an alphabetically ordered array of all the parts and exportparts the element contains.\n */\nexport const getElementSelectorParts = (element: HTMLElement) => {\n const queries: string[] = [];\n const elementParts = element.shadowRoot?.querySelectorAll(`[part]`);\n const elementExportParts =\n element.shadowRoot?.querySelectorAll(`[exportparts]`);\n\n elementParts?.forEach(el => {\n queries.push(\n `${element.tagName.toLowerCase()}::part(${el.getAttribute(\"part\")})`\n );\n });\n elementExportParts?.forEach(el => {\n queries.push(\n ...[\n ...el.getAttribute(\"exportparts\").matchAll(/(?:[\\w-]+:)?([\\w-]+)/g)\n ].map(item => `${element.tagName.toLowerCase()}::part(${item[1]})`)\n );\n });\n\n return queries.sort();\n};\n\n/**\n * @param selector a part selector\n * @returns A reference to the element the part belongs to.\n */\nexport const querySelectorPart = (selector: string) => {\n const querySelectorDeep = (\n element: HTMLElement,\n parts: string\n ): HTMLElement => {\n const shadow = element.shadowRoot;\n const partList = parts.split(\" \");\n\n const partElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[part~=\"${partName}\"]`).join(\"\")\n );\n if (partElement) {\n return partElement;\n }\n\n const exportPartElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[exportparts*=\"${partName}\"]`).join(\"\")\n );\n if (exportPartElement) {\n const exportPartList: string[] = [];\n const exportparts = exportPartElement.getAttribute(\"exportparts\");\n\n partList.forEach(partItem => {\n const exportPartName = exportparts.match(\n `(?:([\\\\w-]+):)?(${partItem})`\n )[1];\n if (exportPartName) {\n exportPartList.push(exportPartName);\n }\n });\n\n if (partList.length === exportPartList.length) {\n return querySelectorDeep(exportPartElement, exportPartList.join(\" \"));\n }\n }\n\n return null;\n };\n\n const selectorItems = selector.match(\"(.*)::part\\\\(([^)]+)\\\\)\");\n const entity = selectorItems[1];\n const partName = selectorItems[2];\n\n return querySelectorDeep(document.querySelector(entity), partName);\n};\n\nconst daysFromToday = (date: Date): number => {\n const today = new Date();\n // To calculate the time difference of two dates\n const timeDifference = today.getTime() - date.getTime();\n // To calculate the no. of days between two dates\n const daysDifference = timeDifference / (1000 * 3600 * 24);\n return Math.floor(daysDifference);\n};\n\n// - - - - - - - - - - - -\n// Date Functions\n// - - - - - - - - - - - -\n\nconst isToday = (date: Date): boolean => {\n const today = new Date();\n if (today.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nconst isYesterday = (date: Date): boolean => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n if (yesterday.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nexport const formatDate = (\n date: Date,\n type: FormatDateType = \"date-time\"\n): string => {\n let formattedDate;\n // validate date\n // undefined or null\n if (date === undefined || date === null) {\n return \"\";\n }\n // If the date object is invalid it will return 'NaN' on getTime() and NaN is never equal to itself\n const dateIsValid = date.getTime() === date.getTime();\n if (!dateIsValid) {\n return \"Invalid date\";\n }\n let locale = \"en-US\";\n const lang = document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf();\n if (lang === \"es\") {\n locale = \"es-ES\";\n }\n formattedDate = date.toLocaleDateString(locale);\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const time = `${hours}:${minutes}`;\n if (type === \"date-time\") {\n formattedDate += ` ${date.toLocaleTimeString()}`;\n } else if (type === \"date-time-short\") {\n // No seconds\n formattedDate = `${year}/${month}/${day} ${time}`;\n } else {\n // pretty\n const daysPassedFromToday = daysFromToday(date);\n const today = new Date();\n const currentYear = today.getFullYear();\n if (isToday(date)) {\n return `Today ${time}`;\n } else if (isYesterday(date)) {\n return `Yesterday ${time}`;\n } else if (daysPassedFromToday <= 7) {\n // If one week or less, just show the day of the week, and the time\n const day = daysOfWeek[date.getDay()];\n return `${day} ${time}`;\n } else if (currentYear === year) {\n // If current year, show day number and month name. Example: November 17th\n if (locale === \"es-ES\") {\n formattedDate = `${day} de ${date.toLocaleString(\"es-ES\", {\n month: \"long\"\n })} ${time}`;\n } else {\n formattedDate = `${date.toLocaleString(\"en-US\", {\n month: \"long\"\n })} ${day} ${time}`;\n }\n } else {\n // Display date as usual\n formattedDate = formatDate(date, \"date-time-short\");\n }\n }\n return formattedDate;\n};\n\nexport type FormatDateType =\n | \"date\"\n | \"date-time\"\n | \"date-time-short\"\n | \"pretty\";\n\n// - - - - - - - - - - - -\n// /End of Date Functions\n// - - - - - - - - - - - -\n\n/* Count the total tree nodes (by default it does not count the first level nodes)*/\nexport const countTreeItems = (\n treeModel: TreeViewItemModel[],\n children = false\n): number => {\n let totalNodes = 0;\n treeModel.forEach(node => {\n children && totalNodes++;\n if (node.items) {\n totalNodes += countTreeItems(node.items, true);\n }\n });\n return totalNodes;\n};\n\n/**\n * @description it evaluates the initial selected combo item\n * @param options an array of GxOption\n * @returns the initial combo value, which in this case is the id\n */\nexport const setInitialComboValue = (options: GxOption[]): string => {\n const selected = options.find(option => option.selected);\n if (selected) {\n return selected.value || selected.id;\n } else {\n return options[0].value || options[0].id;\n }\n};\n\nexport const escapeRegExp = (str: string) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n/**\n * @description this function highlights the character(s) that match(es) the filter value.\n * hiChar comes from (hi)light (Char)acters\n * @param text the string to find the filter value on\n * @param filterValue the filter value\n * @returns a span element\n */\nexport const hiChar = function (text: string, filterValue: string) {\n if (text && filterValue) {\n const escapedFilterValue = escapeRegExp(filterValue);\n const re = new RegExp(escapedFilterValue, \"gi\");\n return (\n <span\n innerHTML={text.replace(re, '<span class=\"hiChar\">$&</span>')}\n ></span>\n );\n } else {\n return text;\n }\n};\n\nexport const closeOnOutsideClickHandler = (\n eventInfo: PointerEvent,\n ref: HTMLElement\n): true | void => {\n if (!eventInfo.composedPath().includes(ref)) {\n return true;\n }\n};\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label\n // startImgSrc: option.iconName\n }));\n\nexport const renderChCheckboxItems = (\n options: GxOption[] | undefined,\n frontEndCheckboxInputHandler: (\n event: ChCheckboxCustomEvent<string> | InputEvent\n ) => void,\n checkedIds: string[]\n): HTMLChCheckboxElement[] => {\n return options?.map(option => {\n const value = checkedIds?.find(\n id => option.value === id || option.id === id\n );\n return (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={value}\n onInput={frontEndCheckboxInputHandler}\n startImgSrc={option.iconName}\n key={option.value || option.id}\n ></ch-checkbox>\n );\n });\n};\n"]}
@@ -6,7 +6,6 @@
6
6
  inline-size: 100%;
7
7
  align-items: center;
8
8
  justify-content: center;
9
- padding: var(--mer-spacing--xl);
10
9
  }
11
10
 
12
11
  .slide {
@@ -16,7 +15,6 @@
16
15
  max-block-size: 700px;
17
16
  max-inline-size: 1100px;
18
17
  background-color: var(--mer-surface__elevation--01);
19
- border-radius: var(--mer-spacing--md);
20
18
  overflow: hidden;
21
19
  }
22
20
  .slide__illustration {
@@ -8,6 +8,10 @@
8
8
  "description": "Create a new Knowledge Base to start working.",
9
9
  "buttonCaption": "New Knowledge Base"
10
10
  },
11
+ "viewSamples": {
12
+ "title": "View Samples",
13
+ "description": "Explore our samples. Search, discover, and chat with the assistant to find exactly what you need."
14
+ },
11
15
  "openExistingProject": {
12
16
  "title": "Open Existing Project",
13
17
  "description": "You can open a project from the server, whether it's a GeneXus Next Start project or any other project.",
@@ -8,6 +8,10 @@
8
8
  "description": "作業を開始するための新しいナレッジベースを作成します。",
9
9
  "buttonCaption": "新規ナレッジベース"
10
10
  },
11
+ "viewSamples": {
12
+ "title": "View Samples",
13
+ "description": "Explore our samples. Search, discover, and chat with the assistant to find exactly what you need."
14
+ },
11
15
  "openExistingProject": {
12
16
  "title": "既存プロジェクトを開く",
13
17
  "description": "サーバーからプロジェクトを開くことができます。GeneXus Next Startプロジェクトまたはその他のプロジェクトを開くことができます。",
@@ -8,6 +8,10 @@
8
8
  "description": "Create a new Knowledge Base to start working.",
9
9
  "buttonCaption": "New Knowledge Base"
10
10
  },
11
+ "viewSamples": {
12
+ "title": "View Samples",
13
+ "description": "Explore our samples. Search, discover, and chat with the assistant to find exactly what you need."
14
+ },
11
15
  "openExistingProject": {
12
16
  "title": "Open Existing Project",
13
17
  "description": "You can open a project from the server, whether it's a GeneXus Next Start project or any other project.",
@@ -4,6 +4,10 @@
4
4
  Found on /common/helpers.tsx hiChar function is used to add a span/class to every character that matches a search value. It is used to help the user see why the filter results are filtered. The span/class on the characters are useless without proper styling.
5
5
  */
6
6
  :host {
7
+ --spacing-body-block-start: var(--mer-spacing--lg);
8
+ --spacing-body-block-end: var(--mer-spacing--lg);
9
+ --spacing-body-inline-start: var(--mer-spacing--lg);
10
+ --spacing-body-inline-end: var(--mer-spacing--lg);
7
11
  display: grid;
8
12
  block-size: 100%;
9
13
  overflow: auto;
@@ -16,8 +20,7 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
16
20
  overflow: auto;
17
21
  opacity: 0;
18
22
  grid-template-rows: max-content 1fr;
19
- gap: var(--mer-spacing--xl);
20
- min-block-size: 635px;
23
+ gap: var(--mer-spacing--lg);
21
24
  }
22
25
 
23
26
  @keyframes bounce {
@@ -48,15 +51,21 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
48
51
  .card-filled,
49
52
  .card-outlined {
50
53
  display: grid;
51
- gap: var(--mer-spacing--xl);
54
+ gap: var(--mer-spacing--md);
52
55
  align-content: space-between;
53
- border: var(--mer-border__width--sm) solid var(--mer-border-color__on-surface);
54
- border-radius: var(--mer-border__radius--sm);
55
- padding: var(--mer-spacing--lg);
56
+ border-radius: var(--mer-border__radius--md);
56
57
  }
57
58
 
58
59
  .card-filled {
59
60
  background-color: var(--mer-surface__elevation--01);
61
+ padding: var(--mer-spacing--md);
62
+ }
63
+
64
+ .card-outlined {
65
+ border: var(--mer-border__width--sm) solid var(--mer-border-color__on-surface);
66
+ grid-template-columns: max-content 1fr;
67
+ align-items: center;
68
+ padding: var(--mer-spacing--md) var(--mer-spacing--md) var(--mer-spacing--xs) var(--mer-spacing--md);
60
69
  }
61
70
 
62
71
  .icon-capsule {
@@ -69,15 +78,20 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
69
78
  border-radius: 50%;
70
79
  border: var(--mer-border__width--sm) dashed var(--mer-border-color__on-elevation--02);
71
80
  }
81
+ .icon-capsule .icon-circular {
82
+ --ch-image-size: 20px;
83
+ }
72
84
 
73
85
  .card__header {
74
86
  display: grid;
75
87
  gap: var(--mer-spacing--sm);
88
+ justify-items: self-start;
76
89
  }
77
90
 
78
91
  .card__header-description {
79
92
  display: grid;
80
- gap: var(--mer-spacing--2xs);
93
+ gap: var(--mer-spacing--xs);
94
+ --font-weight-regular: 300;
81
95
  }
82
96
 
83
97
  .section-create-new-kb {
@@ -87,14 +101,22 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
87
101
  }
88
102
  .section-create-new-kb__header {
89
103
  display: grid;
90
- gap: var(--mer-spacing--2xs);
104
+ gap: var(--mer-spacing--xs);
105
+ }
106
+ .section-create-new-kb__title {
107
+ color: var(--mer-text__bright);
108
+ font-weight: 500;
91
109
  }
92
110
  .section-create-new-kb__actions {
93
111
  display: grid;
94
112
  gap: var(--mer-spacing--md);
95
113
  overflow-x: auto;
96
114
  grid-auto-flow: column;
97
- grid-auto-columns: 430px;
115
+ grid-auto-columns: 372px;
116
+ }
117
+
118
+ .samples-buttons-container {
119
+ flex-wrap: wrap;
98
120
  }
99
121
 
100
122
  .section-secondary {
@@ -103,9 +125,20 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
103
125
  position: relative;
104
126
  overflow: auto;
105
127
  }
128
+ .section-secondary__title {
129
+ display: grid;
130
+ grid-template-columns: 1fr max-content 1fr;
131
+ gap: var(--mer-spacing--md);
132
+ align-items: center;
133
+ font-weight: 300;
134
+ }
135
+ .section-secondary__title::before, .section-secondary__title::after {
136
+ content: "";
137
+ block-size: var(--mer-border__width--sm);
138
+ background-color: var(--mer-border-color__on-elevation--01);
139
+ }
106
140
  .section-secondary__actions {
107
141
  display: grid;
108
- gap: var(--mer-spacing--sm);
109
142
  }
110
143
  .section-secondary__actions--two-cards {
111
144
  grid-template-columns: repeat(2, minmax(430px, 1fr));
@@ -114,11 +147,21 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
114
147
  grid-auto-columns: 670px;
115
148
  }
116
149
 
150
+ .section-no-kbs {
151
+ display: grid;
152
+ block-size: 100%;
153
+ position: relative;
154
+ overflow: auto;
155
+ grid-template-rows: max-content max-content;
156
+ gap: var(--mer-spacing--md);
157
+ }
158
+
117
159
  .section-kbs {
118
160
  background-color: var(--mer-surface__elevation--01);
119
161
  border-radius: var(--mer-border__radius--sm);
120
162
  padding: var(--mer-spacing--sm);
121
163
  display: grid;
164
+ container-type: inline-size;
122
165
  grid-template-rows: auto 1fr;
123
166
  overflow: hidden;
124
167
  }
@@ -127,7 +170,7 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
127
170
  grid-template-columns: max-content 230px;
128
171
  align-items: center;
129
172
  gap: var(--mer-spacing--xl);
130
- border-block-end: var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--03);
173
+ border-block-end: var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);
131
174
  padding-block-end: var(--mer-spacing--sm);
132
175
  }
133
176
  .section-kbs__header--no-border {
@@ -156,13 +199,19 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
156
199
  grid-auto-rows: 1fr;
157
200
  overflow: hidden;
158
201
  }
202
+ @container (max-width: 768px) {
203
+ .section-kbs__list {
204
+ grid-template-columns: 1fr;
205
+ }
206
+ }
159
207
 
160
208
  .kb__item {
209
+ --font-weight-regular: 300;
161
210
  background-color: var(--mer-surface__elevation--02);
162
211
  padding: var(--mer-spacing--sm);
163
212
  display: grid;
164
- grid-template-columns: 284px 1fr;
165
- gap: var(--mer-spacing--md);
213
+ grid-template-columns: auto max-content;
214
+ gap: var(--mer-spacing--3xl);
166
215
  }
167
216
  .kb__details {
168
217
  display: grid;
@@ -176,6 +225,7 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
176
225
  text-overflow: ellipsis;
177
226
  text-decoration: underline;
178
227
  cursor: pointer;
228
+ display: inline-block;
179
229
  }
180
230
  .kb__name:hover {
181
231
  color: var(--mer-text__bright);
@@ -184,6 +234,8 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
184
234
  overflow: hidden;
185
235
  white-space: nowrap;
186
236
  text-overflow: ellipsis;
237
+ text-align: end;
238
+ font-variant-numeric: tabular-nums;
187
239
  }
188
240
 
189
241
  .hiChar {
@@ -210,4 +262,17 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
210
262
  .card__footer {
211
263
  font-weight: var(--mer-font__weight--light) !important;
212
264
  --control__font-weight--regular: var(--mer-font__weight--light);
265
+ }
266
+
267
+ .card__header-description {
268
+ --line-height-tight: 1.7;
269
+ --font-weight-regular: 300;
270
+ }
271
+
272
+ .card__header-title {
273
+ color: var(--mer-text__bright);
274
+ }
275
+
276
+ .button-tertiary-no-padding-inline-start.button-tertiary {
277
+ padding-inline-start: 0;
213
278
  }
@@ -14,7 +14,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
14
14
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
15
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
16
  };
17
- var _GxIdeStartPage_instances, _GxIdeStartPage_componentLocale, _GxIdeStartPage_userLanguage, _GxIdeStartPage_createKBClickHandler, _GxIdeStartPage_openKbClickHandler, _GxIdeStartPage_filterKbs, _GxIdeStartPage_renderKbsSection, _GxIdeStartPage_renderKbs, _GxIdeStartPage_evaluateContentToRender, _GxIdeStartPage_renderSecondarySection;
17
+ var _GxIdeStartPage_instances, _GxIdeStartPage_componentLocale, _GxIdeStartPage_userLanguage, _GxIdeStartPage_createKBClickHandler, _GxIdeStartPage_filterKbs, _GxIdeStartPage_openKbClickHandler, _GxIdeStartPage_evaluateContentToRender, _GxIdeStartPage_renderKbsSection, _GxIdeStartPage_renderKbs, _GxIdeStartPage_renderSecondarySection;
18
18
  // Stencil
19
19
  import { Host, h } from "@stencil/core";
20
20
  // Other Libraries
@@ -24,6 +24,7 @@ import { ja, zhCN, enUS } from "date-fns/locale";
24
24
  // Custom
25
25
  import { Locale } from "../../common/locale";
26
26
  // const locale = enUS; // use `zhCN` for Chinese, `ja` for Japanese, `enUS` for English
27
+ import { formatDate } from "../../common/helpers";
27
28
  const LANGS_DATE_FNS_MAP = {
28
29
  "en": enUS,
29
30
  "ja": ja,
@@ -73,13 +74,13 @@ export class GxIdeStartPage {
73
74
  event.stopPropagation();
74
75
  this.createKBCallback(fromServer);
75
76
  });
77
+ _GxIdeStartPage_filterKbs.set(this, (event) => {
78
+ this.kbFilterValue = event.detail;
79
+ });
76
80
  _GxIdeStartPage_openKbClickHandler.set(this, (kbId) => (event) => {
77
81
  event.stopPropagation();
78
82
  this.openKbCallback(kbId);
79
83
  });
80
- _GxIdeStartPage_filterKbs.set(this, (event) => {
81
- this.kbFilterValue = event.detail;
82
- });
83
84
  _GxIdeStartPage_renderKbsSection.set(this, () => {
84
85
  const hideKbsFilter = this.kbs.length < this.kbsFilterThreshold;
85
86
  const kbsListEmpty = this.filteredKbs.length === 0;
@@ -118,9 +119,14 @@ export class GxIdeStartPage {
118
119
  locale: __classPrivateFieldGet(this, _GxIdeStartPage_userLanguage, "f")
119
120
  })
120
121
  : undefined;
122
+ // convert date to date format, since toISOString() requires date as Date.
123
+ const dateAsDate = kb.lastOpenedDate
124
+ ? new Date(kb.lastOpenedDate)
125
+ : undefined;
126
+ let dateFormated = formatDate(dateAsDate, "date-time-short");
121
127
  // icon
122
128
  const kbIcon = (_a = kb.icon) !== null && _a !== void 0 ? _a : KB_DEFAULT_ICON;
123
- return (h("article", { class: "kb__item", key: index }, h("div", { class: "kb__details" }, h("ch-image", { class: "icon-md", src: kbIcon }), h("p", { class: "body-regular-m kb__name", onClick: __classPrivateFieldGet(this, _GxIdeStartPage_openKbClickHandler, "f").call(this, kb.id) }, kb.name)), relativeDate && (h("div", { class: "body-regular-m kb__modified" }, `${__classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").recentKBs.opened} ${relativeDate}`))));
129
+ return (h("article", { class: "kb__item", key: index }, h("div", { class: "kb__details" }, h("ch-image", { class: "icon-md", src: kbIcon }), h("button", { class: "body-regular-m kb__name", onClick: __classPrivateFieldGet(this, _GxIdeStartPage_openKbClickHandler, "f").call(this, kb.id) }, kb.name)), relativeDate && (h("p", { class: "body-regular-m kb__modified" }, `${__classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").recentKBs.opened}`, " ", h("time", { dateTime: dateFormated }, dateFormated)))));
124
130
  });
125
131
  });
126
132
  _GxIdeStartPage_renderSecondarySection.set(this, () => {
@@ -130,24 +136,26 @@ export class GxIdeStartPage {
130
136
  const multipleCards = this.secondarySection.cards.length > 2;
131
137
  return (h("section", {
132
138
  // Recent Knowledge Bases
133
- class: "section-secondary"
134
- }, h("header", null, h("h2", { class: "subtitle-regular-s" }, this.secondarySection.title)), h("section", { class: {
139
+ class: "section-no-kbs"
140
+ }, h("header", null, h("h2", { class: "body-regular-s section-secondary__title" }, this.secondarySection.title)), h("section", { class: {
135
141
  "section-secondary__actions": true,
136
142
  "section-secondary__actions--two-cards": !multipleCards,
137
143
  "section-secondary__actions--multiple-cards": multipleCards,
138
144
  "scrollable": true
139
145
  } }, this.secondarySection.cards.map((card, index) => {
140
- return (h("article", { class: "card card-outlined", key: index }, h("header", { class: "card__header" }, h("span", { class: "icon-capsule" }, h("ch-image", { class: "icon-md icon-circular", src: card.icon.src, "aria-label": card.icon.ariaLabel })), h("div", { class: "card__header-description" }, h("h2", { class: "subtitle-regular-s" }, card.title), card.description.map(paragraph => (h("p", { class: "body-regular-m" }, paragraph))))), h("footer", { class: "card__footer" }, card.action && (h("button", { class: "button-tertiary button-icon-and-text", onClick: card.action.callback && card.action.callback }, h("ch-image", { class: "icon-md", src: DETAIL_ICON }), card.action.caption)))));
146
+ return (h("article", { class: "card card-outlined", key: index }, h("span", { class: "icon-capsule" }, h("ch-image", { class: "icon-md icon-circular", src: card.icon.src, "aria-label": card.icon.ariaLabel })), h("header", { class: "card__header" }, h("h2", { class: "subtitle-semi-bold-xs card__header-title" }, card.title), card.description.map(paragraph => (h("p", { class: "body-regular-s card__header-description" }, paragraph))), card.action && (h("button", { class: "button-tertiary button-icon-and-text button-tertiary-no-padding-inline-start", onClick: card.action.callback && card.action.callback }, h("ch-image", { class: "icon-md", src: DETAIL_ICON }), card.action.caption)))));
141
147
  }))));
142
148
  });
143
- this.kbFilterValue = "";
144
149
  this.filteredKbs = undefined;
150
+ this.kbFilterValue = "";
145
151
  this.loading = true;
146
152
  this.createKBCallback = undefined;
147
- this.openKbCallback = undefined;
148
- this.secondarySection = undefined;
149
153
  this.kbs = undefined;
150
154
  this.kbsFilterThreshold = undefined;
155
+ this.openKbCallback = undefined;
156
+ this.openSampleCallback = undefined;
157
+ this.samples = undefined;
158
+ this.secondarySection = undefined;
151
159
  }
152
160
  kbFilterValueChanged(newKbFilterValue) {
153
161
  this.filteredKbs = this.kbs.filter(kb => kb.name.toLowerCase().includes(newKbFilterValue.toLocaleLowerCase()));
@@ -166,22 +174,28 @@ export class GxIdeStartPage {
166
174
  __classPrivateFieldSet(this, _GxIdeStartPage_userLanguage, LANGS_DATE_FNS_MAP[userLanguage], "f");
167
175
  }
168
176
  render() {
169
- var _a;
177
+ var _a, _b;
170
178
  this.loading =
171
179
  (!this.kbs || ((_a = this.kbs) === null || _a === void 0 ? void 0 : _a.length) === 0) && !this.secondarySection;
172
- return (h(Host, { class: "widget scrollable spacing-body" }, h("ch-theme", { model: CSS_BUNDLES }), h("main", { class: "main scrollable" }, h("section", {
180
+ const renderViewSamplesCard = ((_b = this.samples) === null || _b === void 0 ? void 0 : _b.length) && this.openSampleCallback;
181
+ return (h(Host, { class: "scrollable" }, h("ch-theme", { model: CSS_BUNDLES }), h("main", { class: "main scrollable" }, h("section", {
173
182
  // Create a new Knowledge Base
174
183
  class: "section-create-new-kb"
175
184
  }, h("header", {
176
185
  // main header
177
- class: "section-create-new__header"
178
- }, h("h1", { class: "heading-4" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createKB.title), h("p", { class: "body-regular-m" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createKB.description)), h("section", { class: "section-create-new-kb__actions scrollable" }, h("article", {
186
+ class: "section-create-new-kb__header"
187
+ }, h("h1", { class: "heading-5 section-create-new-kb__title" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createKB.title), h("p", { class: "body-regular-m" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createKB.description)), h("section", { class: "section-create-new-kb__actions scrollable" }, h("article", {
179
188
  // create project
180
189
  class: "card card-filled"
181
- }, h("header", { class: "card__header" }, h("div", { class: "card__header-description" }, h("h2", { class: "subtitle-regular-s" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createProject.title), h("p", { class: "body-regular-m" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createProject.description))), h("footer", { class: "card__footer" }, h("button", { class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeStartPage_createKBClickHandler, "f").call(this, false) }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createProject.buttonCaption))), h("article", {
190
+ }, h("header", { class: "card__header" }, h("div", { class: "card__header-description" }, h("h2", { class: "subtitle-semi-bold-xs card__header-title" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createProject.title), h("p", { class: "body-regular-s" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createProject.description))), h("footer", { class: "card__footer" }, h("button", { class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeStartPage_createKBClickHandler, "f").call(this, false) }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").createProject.buttonCaption))), h("article", {
182
191
  // open existing project
183
192
  class: "card-filled"
184
- }, h("header", { class: "card__header" }, h("div", { class: "card__header-description" }, h("h2", { class: "subtitle-regular-s" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").openExistingProject.title), h("p", { class: "body-regular-m" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").openExistingProject.description))), h("footer", { class: "card__footer" }, h("button", { class: "button-secondary cancel-btn", onClick: __classPrivateFieldGet(this, _GxIdeStartPage_createKBClickHandler, "f").call(this, true) }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").openExistingProject.buttonCaption))))), h("section", { class: "section-secondary scrollable" }, this.loading ? (h("gx-ide-loader", { class: "loader", loaderTitle: __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").recentKBs.loaderTitle, description: __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").recentKBs.loaderDescription, show: true })) : (__classPrivateFieldGet(this, _GxIdeStartPage_instances, "m", _GxIdeStartPage_evaluateContentToRender).call(this))))));
193
+ }, h("header", { class: "card__header" }, h("div", { class: "card__header-description" }, h("h2", { class: "subtitle-semi-bold-xs" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").openExistingProject.title), h("p", { class: "body-regular-s" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").openExistingProject.description))), h("footer", { class: "card__footer" }, h("button", { class: "button-secondary cancel-btn", onClick: __classPrivateFieldGet(this, _GxIdeStartPage_createKBClickHandler, "f").call(this, true) }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").openExistingProject.buttonCaption))), renderViewSamplesCard ? (h("article", {
194
+ // view samples
195
+ class: "card-filled"
196
+ }, h("header", { class: "card__header" }, h("div", { class: "card__header-description" }, h("h2", { class: "subtitle-semi-bold-xs" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").viewSamples.title), h("p", { class: "body-regular-s" }, __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").viewSamples.description))), h("footer", { class: "card__footer" }, h("div", { class: "buttons-spacer samples-buttons-container" }, this.samples.map(sample => {
197
+ return (h("button", { class: "button-secondary", onClick: () => this.openSampleCallback(sample) }, sample.name));
198
+ }))))) : null)), h("section", { class: "section-secondary scrollable" }, this.loading ? (h("gx-ide-loader", { class: "loader", loaderTitle: __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").recentKBs.loaderTitle, description: __classPrivateFieldGet(this, _GxIdeStartPage_componentLocale, "f").recentKBs.loaderDescription, show: true })) : (__classPrivateFieldGet(this, _GxIdeStartPage_instances, "m", _GxIdeStartPage_evaluateContentToRender).call(this))))));
185
199
  }
186
200
  static get is() { return "gx-ide-start-page"; }
187
201
  static get encapsulation() { return "shadow"; }
@@ -218,6 +232,44 @@ export class GxIdeStartPage {
218
232
  "text": "Callback invoked to create a new KB. It must be specified whether this create is create from server or not, through the parameter 'fromServer'."
219
233
  }
220
234
  },
235
+ "kbs": {
236
+ "type": "unknown",
237
+ "mutable": false,
238
+ "complexType": {
239
+ "original": "RecentKBData[]",
240
+ "resolved": "RecentKBData[]",
241
+ "references": {
242
+ "RecentKBData": {
243
+ "location": "local",
244
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/start-page/start-page.tsx",
245
+ "id": "src/components/start-page/start-page.tsx::RecentKBData"
246
+ }
247
+ }
248
+ },
249
+ "required": false,
250
+ "optional": false,
251
+ "docs": {
252
+ "tags": [],
253
+ "text": "User's kbs array"
254
+ }
255
+ },
256
+ "kbsFilterThreshold": {
257
+ "type": "number",
258
+ "mutable": false,
259
+ "complexType": {
260
+ "original": "number",
261
+ "resolved": "number",
262
+ "references": {}
263
+ },
264
+ "required": false,
265
+ "optional": false,
266
+ "docs": {
267
+ "tags": [],
268
+ "text": "The minimum required of kbs to display a filter."
269
+ },
270
+ "attribute": "kbs-filter-threshold",
271
+ "reflect": false
272
+ },
221
273
  "openKbCallback": {
222
274
  "type": "unknown",
223
275
  "mutable": false,
@@ -238,71 +290,79 @@ export class GxIdeStartPage {
238
290
  "text": "Callback invoked to open a KB when the user clicks on a KB card."
239
291
  }
240
292
  },
241
- "secondarySection": {
293
+ "openSampleCallback": {
242
294
  "type": "unknown",
243
295
  "mutable": false,
244
296
  "complexType": {
245
- "original": "SecondarySection",
246
- "resolved": "{ title: string; cards: CardInfo[]; }",
297
+ "original": "(sample: SampleData) => Promise<void>",
298
+ "resolved": "(sample: SampleData) => Promise<void>",
247
299
  "references": {
248
- "SecondarySection": {
300
+ "SampleData": {
249
301
  "location": "local",
250
302
  "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/start-page/start-page.tsx",
251
- "id": "src/components/start-page/start-page.tsx::SecondarySection"
303
+ "id": "src/components/start-page/start-page.tsx::SampleData"
304
+ },
305
+ "Promise": {
306
+ "location": "global",
307
+ "id": "global::Promise"
252
308
  }
253
309
  }
254
310
  },
255
- "required": false,
256
- "optional": true,
311
+ "required": true,
312
+ "optional": false,
257
313
  "docs": {
258
314
  "tags": [],
259
- "text": "The secondary section that will appear below the \"Create a new Knowledge Base\" main section. This section will be displayed if there are no recent kbs."
315
+ "text": "Callback invoked when the user clicks a button to open a sample."
260
316
  }
261
317
  },
262
- "kbs": {
318
+ "samples": {
263
319
  "type": "unknown",
264
320
  "mutable": false,
265
321
  "complexType": {
266
- "original": "RecentKBData[]",
267
- "resolved": "RecentKBData[]",
322
+ "original": "SampleData[]",
323
+ "resolved": "SampleData[]",
268
324
  "references": {
269
- "RecentKBData": {
325
+ "SampleData": {
270
326
  "location": "local",
271
327
  "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/start-page/start-page.tsx",
272
- "id": "src/components/start-page/start-page.tsx::RecentKBData"
328
+ "id": "src/components/start-page/start-page.tsx::SampleData"
273
329
  }
274
330
  }
275
331
  },
276
332
  "required": false,
277
- "optional": false,
333
+ "optional": true,
278
334
  "docs": {
279
335
  "tags": [],
280
- "text": "User's kbs array"
336
+ "text": "List of samples available to be displayed in the samples card."
281
337
  }
282
338
  },
283
- "kbsFilterThreshold": {
284
- "type": "number",
339
+ "secondarySection": {
340
+ "type": "unknown",
285
341
  "mutable": false,
286
342
  "complexType": {
287
- "original": "number",
288
- "resolved": "number",
289
- "references": {}
343
+ "original": "SecondarySection",
344
+ "resolved": "{ title: string; cards: CardInfo[]; }",
345
+ "references": {
346
+ "SecondarySection": {
347
+ "location": "local",
348
+ "path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/start-page/start-page.tsx",
349
+ "id": "src/components/start-page/start-page.tsx::SecondarySection"
350
+ }
351
+ }
290
352
  },
291
353
  "required": false,
292
- "optional": false,
354
+ "optional": true,
293
355
  "docs": {
294
356
  "tags": [],
295
- "text": "The minimum required of kbs to display a filter."
296
- },
297
- "attribute": "kbs-filter-threshold",
298
- "reflect": false
357
+ "text": "The secondary section that will appear below the \"Create a new Knowledge Base\" main section. This section will be displayed if there are no recent kbs."
358
+ }
299
359
  }
300
360
  };
301
361
  }
302
362
  static get states() {
303
363
  return {
304
- "kbFilterValue": {},
305
364
  "filteredKbs": {},
365
+ "kbFilterValue": {},
306
366
  "loading": {}
307
367
  };
308
368
  }
@@ -317,7 +377,7 @@ export class GxIdeStartPage {
317
377
  }];
318
378
  }
319
379
  }
320
- _GxIdeStartPage_componentLocale = new WeakMap(), _GxIdeStartPage_userLanguage = new WeakMap(), _GxIdeStartPage_createKBClickHandler = new WeakMap(), _GxIdeStartPage_openKbClickHandler = new WeakMap(), _GxIdeStartPage_filterKbs = new WeakMap(), _GxIdeStartPage_renderKbsSection = new WeakMap(), _GxIdeStartPage_renderKbs = new WeakMap(), _GxIdeStartPage_renderSecondarySection = new WeakMap(), _GxIdeStartPage_instances = new WeakSet(), _GxIdeStartPage_evaluateContentToRender = function _GxIdeStartPage_evaluateContentToRender() {
380
+ _GxIdeStartPage_componentLocale = new WeakMap(), _GxIdeStartPage_userLanguage = new WeakMap(), _GxIdeStartPage_createKBClickHandler = new WeakMap(), _GxIdeStartPage_filterKbs = new WeakMap(), _GxIdeStartPage_openKbClickHandler = new WeakMap(), _GxIdeStartPage_renderKbsSection = new WeakMap(), _GxIdeStartPage_renderKbs = new WeakMap(), _GxIdeStartPage_renderSecondarySection = new WeakMap(), _GxIdeStartPage_instances = new WeakSet(), _GxIdeStartPage_evaluateContentToRender = function _GxIdeStartPage_evaluateContentToRender() {
321
381
  return this.kbs && this.kbs.length > 0
322
382
  ? __classPrivateFieldGet(this, _GxIdeStartPage_renderKbsSection, "f").call(this)
323
383
  : __classPrivateFieldGet(this, _GxIdeStartPage_renderSecondarySection, "f").call(this);