geonetwork-ui 2.4.0-dev.9075aa64 → 2.4.0-dev.9b37393d

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 (174) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +3 -3
  3. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +1 -16
  4. package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +18 -2
  5. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +78 -39
  6. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  7. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  8. package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +4 -16
  9. package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +4 -2
  10. package/esm2022/libs/feature/editor/src/lib/components/import-record/import-record.component.mjs +93 -0
  11. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +6 -3
  12. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.mjs +19 -0
  13. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +23 -10
  14. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +3 -3
  15. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +3 -3
  16. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +4 -8
  17. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +10 -7
  18. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +6 -3
  19. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +3 -3
  20. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +5 -5
  21. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -2
  22. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -3
  23. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +6 -4
  24. package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +1 -1
  25. package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
  26. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +6 -6
  27. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  28. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -4
  29. package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +5 -3
  30. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +8 -1
  31. package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +11 -4
  32. package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +9 -3
  33. package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +3 -3
  34. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +3 -3
  35. package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +3 -3
  36. package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +3 -3
  37. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +5 -3
  38. package/esm2022/libs/util/shared/src/lib/services/theme.service.mjs +2 -1
  39. package/esm2022/translations/de.json +9 -0
  40. package/esm2022/translations/en.json +9 -0
  41. package/esm2022/translations/es.json +9 -0
  42. package/esm2022/translations/fr.json +9 -0
  43. package/esm2022/translations/it.json +9 -0
  44. package/esm2022/translations/nl.json +9 -0
  45. package/esm2022/translations/pt.json +9 -0
  46. package/fesm2022/geonetwork-ui.mjs +388 -186
  47. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  48. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  49. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  50. package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
  51. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +0 -1
  52. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  53. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +6 -0
  54. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
  55. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +12 -7
  56. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  57. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +7 -0
  58. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  59. package/libs/feature/editor/src/index.d.ts +1 -0
  60. package/libs/feature/editor/src/index.d.ts.map +1 -1
  61. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +1 -5
  62. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -1
  63. package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts +2 -1
  64. package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts.map +1 -1
  65. package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts +33 -0
  66. package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts.map +1 -0
  67. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -1
  68. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts +9 -0
  69. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts.map +1 -0
  70. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +5 -2
  71. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
  72. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +1 -3
  73. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -1
  74. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
  75. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -1
  76. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -1
  77. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
  78. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  79. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +1 -0
  80. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts.map +1 -1
  81. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  82. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +2 -2
  83. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -1
  84. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
  85. package/libs/ui/inputs/src/index.d.ts +1 -0
  86. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  87. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  88. package/libs/ui/inputs/src/lib/badge/badge.component.d.ts.map +1 -1
  89. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  90. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  91. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -1
  92. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
  93. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +2 -2
  94. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -1
  95. package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
  96. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +1 -1
  97. package/libs/util/shared/src/lib/services/theme.service.d.ts.map +1 -1
  98. package/package.json +1 -1
  99. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  100. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +1 -2
  101. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +0 -27
  102. package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +20 -1
  103. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +132 -68
  104. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +10 -0
  105. package/src/libs/feature/editor/src/index.ts +1 -0
  106. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +12 -22
  107. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +1 -13
  108. package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +1 -0
  109. package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.html +43 -0
  110. package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.ts +129 -0
  111. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.css +4 -0
  112. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +13 -33
  113. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +2 -0
  114. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.css +0 -0
  115. package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.ts → form-field-date-updated/form-field-date-updated.component.ts} +4 -4
  116. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +3 -2
  117. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +35 -3
  118. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +8 -0
  119. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +1 -0
  120. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +13 -6
  121. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +0 -9
  122. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +1 -1
  123. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +16 -5
  124. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.css +4 -0
  125. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +2 -1
  126. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +2 -0
  127. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +4 -0
  128. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +16 -14
  129. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +19 -20
  130. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +2 -2
  131. package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
  132. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +30 -29
  133. package/src/libs/feature/editor/src/lib/fields.config.ts +5 -3
  134. package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +3 -0
  135. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -0
  136. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +13 -20
  137. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -1
  138. package/src/libs/ui/inputs/src/index.ts +1 -0
  139. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +25 -18
  140. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +38 -24
  141. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +4 -1
  142. package/src/libs/ui/inputs/src/lib/badge/badge.component.html +12 -3
  143. package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +2 -1
  144. package/src/libs/ui/inputs/src/lib/button/button.component.ts +15 -1
  145. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +7 -2
  146. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +13 -6
  147. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +7 -1
  148. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.css +7 -2
  149. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.html +27 -23
  150. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +7 -1
  151. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.css +4 -0
  152. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +6 -2
  153. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +4 -0
  154. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +29 -21
  155. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +4 -3
  156. package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +1 -1
  157. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +8 -3
  158. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +4 -3
  159. package/src/libs/util/shared/src/lib/services/theme.service.ts +1 -0
  160. package/tailwind.base.config.js +1 -0
  161. package/tailwind.base.css +30 -4
  162. package/translations/de.json +9 -0
  163. package/translations/en.json +9 -0
  164. package/translations/es.json +9 -0
  165. package/translations/fr.json +9 -0
  166. package/translations/it.json +9 -0
  167. package/translations/nl.json +9 -0
  168. package/translations/pt.json +9 -0
  169. package/translations/sk.json +9 -0
  170. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +0 -19
  171. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +0 -9
  172. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +0 -1
  173. /package/src/libs/feature/editor/src/lib/components/{record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css → import-record/import-record.component.css} +0 -0
  174. /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.html → form-field-date-updated/form-field-date-updated.component.html} +0 -0
@@ -19,6 +19,7 @@ export * from './lib/star-toggle/star-toggle.component'
19
19
  export * from './lib/text-area/text-area.component'
20
20
  export * from './lib/text-input/text-input.component'
21
21
  export * from './lib/ui-inputs.module'
22
+ export * from './lib/url-input/url-input.component'
22
23
  export * from './lib/viewport-intersector/viewport-intersector.component'
23
24
  export * from './lib/previous-next-buttons/previous-next-buttons.component'
24
25
  export * from './lib/switch-toggle/switch-toggle.component'
@@ -1,28 +1,35 @@
1
- :host {
2
- --input-height: 3.5em;
1
+ span {
2
+ --icon-padding: var(--gn-ui-text-input-border-size, 2px);
3
+ --icon-width: calc(var(--gn-ui-text-input-padding, 0.6em) * 2 + 1.25em);
3
4
  }
4
- .clear-btn {
5
- width: var(--input-height);
6
- height: 100%;
5
+ /* this is because we don't want to change the popup alert font size */
6
+ span > *:not(gn-ui-popup-alert) {
7
+ font-size: var(--gn-ui-text-input-font-size, 1em);
7
8
  }
8
- .search-btn {
9
- width: var(--input-height);
10
- height: 100%;
11
- border-left-width: 0.1em;
9
+
10
+ input:placeholder-shown {
11
+ text-overflow: ellipsis;
12
+ }
13
+ gn-ui-button {
14
+ --gn-ui-button-rounded: 0;
15
+ --gn-ui-button-width: var(--icon-width);
16
+ --gn-ui-button-padding: 0;
17
+ font-size: 1em;
12
18
  }
13
19
  mat-icon {
14
20
  width: 100%;
15
21
  height: 100%;
16
- padding: 0.65em;
17
- font-size: 1.5em;
18
- }
19
- input {
20
- height: var(--input-height);
21
- padding: 1.05em;
22
- padding-right: calc(2 * var(--input-height));
22
+ font-size: calc(
23
+ 0.9em + 11px
24
+ ); /* this formula gives a good icon size across different font size values */
25
+ line-height: 0.8em;
26
+ display: grid;
27
+ align-items: center;
28
+ justify-content: center;
23
29
  }
24
- input:placeholder-shown {
25
- text-overflow: ellipsis;
30
+ gn-ui-button:last-of-type {
31
+ --gn-ui-button-rounded: 0 var(--gn-ui-text-input-rounded, 0.25em)
32
+ var(--gn-ui-text-input-rounded, 0.25em) 0;
26
33
  }
27
34
 
28
35
  .mat-mdc-option.suggestion.mat-mdc-option-active {
@@ -1,34 +1,47 @@
1
- <div class="relative">
1
+ <span class="w-full inline-block relative">
2
+ <div
3
+ class="absolute inset-y-[--icon-padding] left-[--icon-padding] w-[--icon-width] pointer-events-none"
4
+ *ngIf="!allowSubmit"
5
+ >
6
+ <mat-icon class="material-symbols-outlined text-primary"> search </mat-icon>
7
+ </div>
2
8
  <input
3
9
  #searchInput
4
10
  type="text"
5
- class="appearance-none focus:outline-white focus:outline-2 focus:outline-dotted focus:outline-offset-2 leading-tight rounded w-full text-black shadow-xl focus:shadow-[0_0_24px_0_rgba(21,40,184,0.09)]"
11
+ class="gn-ui-text-input"
12
+ [ngClass]="{
13
+ 'px-[--icon-width]': !allowSubmit
14
+ }"
6
15
  [placeholder]="placeholder"
7
16
  [formControl]="control"
8
17
  [matAutocomplete]="auto"
9
18
  (keyup.enter)="handleEnter(searchInput.value)"
10
19
  />
11
- <div class="flex flex-row absolute inset-y-0 right-0">
12
- <button
13
- type="button"
14
- class="text-primary-lightest hover:text-primary hover:bg-gray-50 transition-all duration-100 clear-btn"
15
- *ngIf="searchInput.value"
16
- aria-label="Clear"
17
- (click)="clear()"
18
- >
19
- <mat-icon class="material-symbols-outlined">close</mat-icon>
20
- </button>
21
- <button
22
- type="button"
23
- class="text-primary bg-white hover:text-primary-darkest hover:bg-gray-100 border-gray-300 hover:border-gray-500 transition-all duration-100 search-btn rounded-r"
24
- aria-label="Trigger search"
25
- *ngIf="allowSubmit"
26
- data-test="autocomplete-submit-btn"
27
- (click)="handleClickSearch()"
28
- >
29
- <mat-icon class="material-symbols-outlined">search</mat-icon>
30
- </button>
31
- </div>
20
+ <gn-ui-button
21
+ type="light"
22
+ extraClass="border-0 text-primary-lightest hover:text-primary focus:text-primary absolute inset-y-[--icon-padding] {{
23
+ allowSubmit
24
+ ? 'right-[calc(var(--icon-width)+var(--icon-padding))]'
25
+ : 'right-[--icon-padding]'
26
+ }}"
27
+ data-test="clear-btn"
28
+ *ngIf="searchInput.value"
29
+ aria-label="Clear"
30
+ (buttonClick)="clear()"
31
+ >
32
+ <mat-icon class="material-symbols-outlined">close</mat-icon>
33
+ </gn-ui-button>
34
+ <gn-ui-button
35
+ type="light"
36
+ extraClass="border-0 border-l-[1px] border-gray-300 hover:border-gray-500 text-primary hover:text-primary-darkest focus:text-primary-darkest absolute inset-y-[--icon-padding] right-[--icon-padding]"
37
+ aria-label="Trigger search"
38
+ *ngIf="allowSubmit"
39
+ data-test="autocomplete-submit-btn"
40
+ (buttonClick)="handleClickSearch()"
41
+ >
42
+ <mat-icon class="material-symbols-outlined">search</mat-icon>
43
+ </gn-ui-button>
44
+
32
45
  <gn-ui-popup-alert
33
46
  *ngIf="error"
34
47
  class="absolute mt-2 w-full top-[100%] left-0"
@@ -39,7 +52,8 @@
39
52
  <span translate>search.autocomplete.error</span>
40
53
  {{ error }}
41
54
  </gn-ui-popup-alert>
42
- </div>
55
+ </span>
56
+
43
57
  <mat-autocomplete
44
58
  #auto="matAutocomplete"
45
59
  (optionSelected)="handleSelection($event)"
@@ -36,6 +36,7 @@ import { MatIconModule } from '@angular/material/icon'
36
36
  import { PopupAlertComponent } from '../../../../../../libs/ui/widgets/src'
37
37
  import { CommonModule } from '@angular/common'
38
38
  import { TranslateModule } from '@ngx-translate/core'
39
+ import { ButtonComponent } from '../button/button.component'
39
40
 
40
41
  export type AutocompleteItem = unknown
41
42
 
@@ -52,6 +53,7 @@ export type AutocompleteItem = unknown
52
53
  CommonModule,
53
54
  TranslateModule,
54
55
  ReactiveFormsModule,
56
+ ButtonComponent,
55
57
  ],
56
58
  })
57
59
  export class AutocompleteComponent
@@ -64,7 +66,8 @@ export class AutocompleteComponent
64
66
  @Input() preventCompleteOnSelection = false
65
67
  @Input() autoFocus = false
66
68
  @Input() minCharacterCount? = 3
67
- @Input() allowSubmit = true
69
+ // this will show a submit button next to the input; if false, a search icon will appear on the left
70
+ @Input() allowSubmit = false
68
71
  @Output() itemSelected = new EventEmitter<AutocompleteItem>()
69
72
  @Output() inputSubmitted = new EventEmitter<string>()
70
73
  @Output() inputCleared = new EventEmitter<void>()
@@ -8,11 +8,20 @@
8
8
  >
9
9
  <span><ng-content></ng-content></span>
10
10
  <gn-ui-button
11
- class="material-symbols-outlined cursor-pointer text-xs"
11
+ type="light"
12
12
  *ngIf="removable"
13
13
  (buttonClick)="removeBadge()"
14
- extraClass="p-1 bg-transparent border-0 border-transparent "
14
+ class="ml-1 -my-[0.4em] -mr-[0.45em]"
15
+ extraClass="border-0"
16
+ style="
17
+ --gn-ui-button-padding: 0;
18
+ --gn-ui-button-font-size: 0.8em;
19
+ --gn-ui-button-width: 1.4em;
20
+ --gn-ui-button-height: 1.4em;
21
+ --gn-ui-button-rounded: 1.4em;
22
+ --gn-ui-button-background: white;
23
+ "
15
24
  >
16
- close
25
+ <mat-icon class="material-symbols-outlined leading-[1.1]">close</mat-icon>
17
26
  </gn-ui-button>
18
27
  </div>
@@ -7,6 +7,7 @@ import {
7
7
  Output,
8
8
  } from '@angular/core'
9
9
  import { ButtonComponent } from '../button/button.component'
10
+ import { MatIconModule } from '@angular/material/icon'
10
11
 
11
12
  @Component({
12
13
  selector: 'gn-ui-badge',
@@ -14,7 +15,7 @@ import { ButtonComponent } from '../button/button.component'
14
15
  styleUrls: ['./badge.component.css'],
15
16
  changeDetection: ChangeDetectionStrategy.OnPush,
16
17
  standalone: true,
17
- imports: [CommonModule, ButtonComponent],
18
+ imports: [CommonModule, ButtonComponent, MatIconModule],
18
19
  })
19
20
  export class BadgeComponent {
20
21
  @Input() clickable? = false
@@ -18,7 +18,14 @@ export class ButtonComponent {
18
18
  private btnClass = 'gn-ui-btn-default'
19
19
 
20
20
  @Input() set type(
21
- value: 'primary' | 'secondary' | 'default' | 'outline' | 'light'
21
+ value:
22
+ | 'primary'
23
+ | 'secondary'
24
+ | 'default'
25
+ | 'outline'
26
+ | 'light'
27
+ | 'gray'
28
+ | 'black'
22
29
  ) {
23
30
  // btn-classes are written in full to be picked up by tailwind
24
31
  switch (value) {
@@ -34,6 +41,13 @@ export class ButtonComponent {
34
41
  case 'light':
35
42
  this.btnClass = 'gn-ui-btn-light'
36
43
  break
44
+ case 'gray':
45
+ this.btnClass = 'gn-ui-btn-gray'
46
+ break
47
+ case 'black':
48
+ this.btnClass = 'gn-ui-btn-black'
49
+ break
50
+ case 'default':
37
51
  default:
38
52
  this.btnClass = 'gn-ui-btn-default'
39
53
  break
@@ -1,3 +1,8 @@
1
- mat-datepicker-toggle {
2
- @apply text-primary;
1
+ :host {
2
+ --gn-ui-button-rounded: 8px;
3
+ --gn-ui-button-width: 32px;
4
+ --gn-ui-button-padding: 0;
5
+
6
+ --side-padding: calc(var(--gn-ui-text-input-padding, 0.6em) - 6px);
7
+ --text-padding: calc(var(--side-padding) + 40px);
3
8
  }
@@ -1,12 +1,19 @@
1
- <div
2
- class="flex items-center justify-between rounded-lg border border-gray-300 bg-white"
3
- >
1
+ <span class="w-full inline-block relative">
4
2
  <input
5
- class="pl-3"
3
+ class="gn-ui-text-input pr-[var(--text-padding)]"
6
4
  [matDatepicker]="picker"
7
5
  [value]="date"
8
6
  (dateChange)="dateChange.emit($event.value)"
9
7
  />
10
- <mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
11
- </div>
8
+ <gn-ui-button
9
+ type="light"
10
+ (buttonClick)="picker.open()"
11
+ extraClass="absolute inset-y-[var(--side-padding)] right-[var(--side-padding)]"
12
+ data-cy="date-picker-button"
13
+ >
14
+ <mat-icon class="material-symbols-outlined text-primary"
15
+ >calendar_today</mat-icon
16
+ >
17
+ </gn-ui-button>
18
+ </span>
12
19
  <mat-datepicker #picker></mat-datepicker>
@@ -8,6 +8,7 @@ import {
8
8
  import { MatNativeDateModule } from '@angular/material/core'
9
9
  import { MatDatepickerModule } from '@angular/material/datepicker'
10
10
  import { MatIconModule } from '@angular/material/icon'
11
+ import { ButtonComponent } from '../button/button.component'
11
12
 
12
13
  @Component({
13
14
  selector: 'gn-ui-date-picker',
@@ -15,7 +16,12 @@ import { MatIconModule } from '@angular/material/icon'
15
16
  styleUrls: ['./date-picker.component.css'],
16
17
  changeDetection: ChangeDetectionStrategy.OnPush,
17
18
  standalone: true,
18
- imports: [MatIconModule, MatNativeDateModule, MatDatepickerModule],
19
+ imports: [
20
+ MatIconModule,
21
+ MatNativeDateModule,
22
+ MatDatepickerModule,
23
+ ButtonComponent,
24
+ ],
19
25
  })
20
26
  export class DatePickerComponent {
21
27
  @Input() date: Date
@@ -1,3 +1,8 @@
1
- mat-datepicker-toggle {
2
- @apply text-primary;
1
+ :host {
2
+ --gn-ui-button-rounded: 8px;
3
+ --gn-ui-button-width: 32px;
4
+ --gn-ui-button-padding: 0;
5
+
6
+ --side-padding: calc(var(--gn-ui-text-input-padding, 0.6em) - 6px);
7
+ --text-padding: calc(var(--side-padding) + 40px);
3
8
  }
@@ -1,24 +1,28 @@
1
- <div
2
- class="flex items-center justify-between rounded-lg border border-gray-300 bg-white"
3
- >
4
- <div class="pl-3 flex justify-center">
5
- <mat-date-range-input [rangePicker]="picker" class="w-full">
6
- <input
7
- matStartDate
8
- placeholder="Start date"
9
- [value]="startDate"
10
- (dateInput)="startDateChange.emit($event.value)"
11
- />
12
- <input
13
- matEndDate
14
- placeholder="End date"
15
- [value]="endDate"
16
- (dateInput)="endDateChange.emit($event.value)"
17
- />
18
- </mat-date-range-input>
19
- </div>
20
- <mat-datepicker-toggle matSuffix [for]="picker">
21
- <mat-icon>calendar_today</mat-icon>
22
- </mat-datepicker-toggle>
23
- </div>
1
+ <span class="w-full inline-block relative">
2
+ <mat-date-range-input [rangePicker]="picker" class="gn-ui-text-input">
3
+ <input
4
+ matStartDate
5
+ placeholder="Start date"
6
+ [value]="startDate"
7
+ (dateInput)="startDateChange.emit($event.value)"
8
+ />
9
+ <input
10
+ matEndDate
11
+ placeholder="End date"
12
+ [value]="endDate"
13
+ (dateInput)="endDateChange.emit($event.value)"
14
+ />
15
+ </mat-date-range-input>
16
+
17
+ <gn-ui-button
18
+ type="light"
19
+ (buttonClick)="picker.open()"
20
+ extraClass="absolute inset-y-[var(--side-padding)] right-[var(--side-padding)]"
21
+ data-cy="date-picker-button"
22
+ >
23
+ <mat-icon class="material-symbols-outlined text-primary"
24
+ >date_range</mat-icon
25
+ >
26
+ </gn-ui-button>
27
+ </span>
24
28
  <mat-date-range-picker #picker></mat-date-range-picker>
@@ -8,6 +8,7 @@ import {
8
8
  import { MatNativeDateModule } from '@angular/material/core'
9
9
  import { MatDatepickerModule } from '@angular/material/datepicker'
10
10
  import { MatIconModule } from '@angular/material/icon'
11
+ import { ButtonComponent } from '../button/button.component'
11
12
 
12
13
  @Component({
13
14
  selector: 'gn-ui-date-range-picker',
@@ -15,7 +16,12 @@ import { MatIconModule } from '@angular/material/icon'
15
16
  styleUrls: ['./date-range-picker.component.css'],
16
17
  changeDetection: ChangeDetectionStrategy.OnPush,
17
18
  standalone: true,
18
- imports: [MatIconModule, MatNativeDateModule, MatDatepickerModule],
19
+ imports: [
20
+ MatIconModule,
21
+ MatNativeDateModule,
22
+ MatDatepickerModule,
23
+ ButtonComponent,
24
+ ],
19
25
  })
20
26
  export class DateRangePickerComponent {
21
27
  @Input() startDate: Date
@@ -0,0 +1,4 @@
1
+ :host {
2
+ --gn-ui-button-padding: 8px 8px;
3
+ --gn-ui-button-rounded: 8px;
4
+ }
@@ -4,10 +4,13 @@
4
4
  class="flex-1 border-2 border-dashed rounded-lg p-6 flex flex-col items-center justify-center gap-4 transition-colors duration-100"
5
5
  [ngClass]="{
6
6
  'border-primary-lighter bg-primary-white': dragFilesOver,
7
- 'border-gray-300': !dragFilesOver
7
+ 'border-gray-300': !dragFilesOver,
8
+ 'cursor-pointer hover:border-gray-500': !isUploadInProgress
8
9
  }"
10
+ [attr.tabindex]="isUploadInProgress ? null : 0"
9
11
  (dragFilesOver)="handleDragFilesOver($event)"
10
12
  (dropFiles)="handleDropFiles($event)"
13
+ (keydown.enter)="fileInput.click()"
11
14
  >
12
15
  <div
13
16
  class="w-14 h-14 rounded-md bg-gray-50 grid"
@@ -26,7 +29,7 @@
26
29
  </div>
27
30
  <div
28
31
  *ngIf="isUploadInProgress"
29
- class="w-14 h-14 grid items-center justify-center"
32
+ class="w-14 h-14 grid items-center justify-center relative"
30
33
  >
31
34
  <div class="text-gray-100 absolute">
32
35
  <mat-progress-spinner
@@ -70,6 +73,7 @@
70
73
  <span class="border-b border-gray-300 grow"></span>
71
74
  </p>
72
75
  <input
76
+ #fileInput
73
77
  type="file"
74
78
  class="hidden"
75
79
  (change)="handleFileInput($event)"
@@ -0,0 +1,4 @@
1
+ :host {
2
+ --gn-ui-button-padding: 8px 8px;
3
+ --gn-ui-button-rounded: 8px;
4
+ }
@@ -5,15 +5,15 @@
5
5
  <div class="w-full h-full flex flex-col gap-2">
6
6
  <div class="flex-1 group relative">
7
7
  <img
8
- class="w-full h-full object-cover border-2 border-gray-300 rounded-lg"
8
+ class="w-full object-cover border-2 border-gray-300 rounded-lg h-[172px]"
9
9
  [alt]="altText"
10
10
  loading="lazy"
11
11
  [src]="previewUrl"
12
12
  />
13
13
  <gn-ui-button
14
- [extraClass]="
15
- 'bg-gray-200 absolute right-2 bottom-2 invisible group-hover:visible'
16
- "
14
+ type="outline"
15
+ style="--gn-ui-button-height: 40px; --gn-ui-button-width: 40px"
16
+ extraClass="absolute right-2 bottom-2 invisible group-hover:visible bg-background"
17
17
  (buttonClick)="handleDelete()"
18
18
  >
19
19
  <mat-icon class="material-symbols-outlined">delete</mat-icon>
@@ -24,21 +24,23 @@
24
24
  [placeholder]="'input.image.altTextPlaceholder' | translate"
25
25
  [value]="altText ?? ''"
26
26
  (valueChange)="handleAltTextChange($event)"
27
+ extraClass="gn-ui-editor-textarea"
27
28
  ></gn-ui-text-input>
28
- <div class="flex flex-row gap-2">
29
- <gn-ui-button
30
- [extraClass]="'bg-gray-200 font-bold'"
31
- (buttonClick)="handleDelete()"
32
- >
33
- <mat-icon class="material-symbols-outlined me-1">delete</mat-icon>
29
+ <div class="flex flex-row gap-2 mt-2">
30
+ <gn-ui-button type="gray" (buttonClick)="handleDelete()">
31
+ <mat-icon class="material-symbols-outlined me-1 text-primary"
32
+ >delete</mat-icon
33
+ >
34
34
  {{ 'input.image.delete' | translate }}
35
35
  </gn-ui-button>
36
36
  <gn-ui-button
37
37
  *ngIf="!showAltTextInput"
38
- [extraClass]="'bg-gray-200 font-bold'"
38
+ type="gray"
39
39
  (buttonClick)="toggleAltTextInput()"
40
40
  >
41
- <mat-icon class="material-symbols-outlined me-1">add</mat-icon>
41
+ <mat-icon class="material-symbols-outlined me-1 text-primary"
42
+ >add</mat-icon
43
+ >
42
44
  {{ 'input.image.displayAltTextInput' | translate }}
43
45
  </gn-ui-button>
44
46
  </div>
@@ -49,11 +51,17 @@
49
51
  <div class="w-full h-full flex flex-col gap-2">
50
52
  <label
51
53
  gnUiFilesDrop
52
- class="flex-1 border-2 border-dashed rounded-lg p-6 flex flex-col items-center justify-center gap-4"
54
+ class="flex-1 border-2 border-dashed rounded-lg p-6 flex flex-col items-center justify-center gap-4 transition-colors duration-100"
53
55
  [ngClass]="{
54
56
  'border-primary-lighter bg-primary-white': dragFilesOver,
55
- 'border-gray-300': !dragFilesOver
57
+ 'border-gray-300': !dragFilesOver,
58
+ 'cursor-pointer hover:border-gray-500':
59
+ !isUploadInProgress && !uploadError && !showUrlInput
56
60
  }"
61
+ [attr.tabindex]="
62
+ isUploadInProgress || uploadError || showUrlInput ? null : 0
63
+ "
64
+ (keydown.enter)="fileInput.click()"
57
65
  (dragFilesOver)="handleDragFilesOver($event)"
58
66
  (dropFiles)="handleDropFiles($event)"
59
67
  >
@@ -75,7 +83,7 @@
75
83
 
76
84
  <div
77
85
  *ngIf="isUploadInProgress && !uploadError"
78
- class="w-14 h-14 grid items-center justify-center"
86
+ class="w-14 h-14 grid items-center justify-center relative"
79
87
  >
80
88
  <div class="text-gray-100 absolute">
81
89
  <mat-progress-spinner
@@ -118,6 +126,7 @@
118
126
  </p>
119
127
  </div>
120
128
  <input
129
+ #fileInput
121
130
  type="file"
122
131
  class="hidden"
123
132
  (change)="handleFileInput($event)"
@@ -125,12 +134,11 @@
125
134
  />
126
135
  </label>
127
136
 
128
- <div *ngIf="!showUrlInput" class="flex-none">
129
- <gn-ui-button
130
- [extraClass]="'bg-gray-200 font-bold'"
131
- (buttonClick)="displayUrlInput()"
132
- >
133
- <mat-icon class="material-symbols-outlined me-1">link</mat-icon>
137
+ <div *ngIf="!showUrlInput" class="flex-none mt-2">
138
+ <gn-ui-button (buttonClick)="displayUrlInput()" type="gray">
139
+ <mat-icon class="material-symbols-outlined me-1 text-primary"
140
+ >link</mat-icon
141
+ >
134
142
  {{ 'input.image.displayUrlInput' | translate }}
135
143
  </gn-ui-button>
136
144
  </div>
@@ -11,15 +11,16 @@
11
11
  }
12
12
 
13
13
  .mat-button-toggle-appearance-standard {
14
- color: var(--color-main);
14
+ color: black;
15
15
  background-color: var(--color-gray-200);
16
16
  border-radius: 4px;
17
17
  border-left: none;
18
+ font-family: var(--font-family-main);
18
19
  }
19
20
 
20
21
  .mat-button-toggle-appearance-standard.mat-button-toggle-checked {
21
- background-color: var(--color-main);
22
- color: var(--color-primary-white);
22
+ background-color: black;
23
+ color: var(--color-background);
23
24
  }
24
25
 
25
26
  button.mat-button-toggle-button.mat-focus-indicator.mat-button-toggle-label-content {
@@ -30,7 +30,7 @@
30
30
  [disabled]="disabled || input.value === ''"
31
31
  (buttonClick)="handleChange(input)"
32
32
  >
33
- <mat-icon class="material-symbols-outlined text-[20px] leading-[26px]">
33
+ <mat-icon class="material-symbols-outlined text-[20px] leading-[24px]">
34
34
  arrow_upward
35
35
  </mat-icon>
36
36
  </gn-ui-button>
@@ -1,9 +1,10 @@
1
- <div class="h-full flex flex-col">
1
+ <div class="h-full flex flex-col" *ngIf="label; else onlyContent">
2
2
  <div class="flex-none w-full flex flex-row items-center">
3
3
  <span class="flex-none font-bold">{{ label }}</span>
4
4
  <div class="flex-1 flex justify-end items-center">
5
5
  <ng-content select="[form-field-interaction]"></ng-content>
6
6
  <span
7
+ *ngIf="hint"
7
8
  class="material-symbols-outlined m-2 gn-ui-icon-small"
8
9
  [matTooltip]="hint"
9
10
  matTooltipPosition="above"
@@ -12,7 +13,11 @@
12
13
  </span>
13
14
  </div>
14
15
  </div>
15
- <div class="flex-1 overflow-y-auto">
16
- <ng-content></ng-content>
16
+ <div class="flex-1 mt-2">
17
+ <ng-container *ngTemplateOutlet="onlyContent"> </ng-container>
17
18
  </div>
18
19
  </div>
20
+
21
+ <ng-template #onlyContent>
22
+ <ng-content></ng-content>
23
+ </ng-template>
@@ -1,6 +1,7 @@
1
1
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
2
  import { MatIconModule } from '@angular/material/icon'
3
3
  import { MatTooltipModule } from '@angular/material/tooltip'
4
+ import { CommonModule } from '@angular/common'
4
5
 
5
6
  @Component({
6
7
  selector: 'gn-ui-form-field-wrapper',
@@ -8,9 +9,9 @@ import { MatTooltipModule } from '@angular/material/tooltip'
8
9
  styleUrls: ['./form-field-wrapper.component.css'],
9
10
  changeDetection: ChangeDetectionStrategy.OnPush,
10
11
  standalone: true,
11
- imports: [MatIconModule, MatTooltipModule],
12
+ imports: [MatIconModule, MatTooltipModule, CommonModule],
12
13
  })
13
14
  export class FormFieldWrapperComponent {
14
- @Input() label: string
15
- @Input() hint: string
15
+ @Input() label?: string
16
+ @Input() hint?: string
16
17
  }
@@ -109,6 +109,7 @@ export class ThemeService {
109
109
  applyColor('gray-700', scale(0.7))
110
110
  applyColor('gray-800', scale(0.8))
111
111
  applyColor('gray-900', scale(0.9))
112
+ applyColor('gray-950', scale(0.95))
112
113
 
113
114
  if (mainFont) {
114
115
  document.documentElement.style.setProperty(`--font-family-main`, mainFont)
@@ -30,6 +30,7 @@ module.exports = {
30
30
  700: 'var(--color-gray-700)',
31
31
  800: 'var(--color-gray-800)',
32
32
  900: 'var(--color-gray-900)',
33
+ 950: 'var(--color-gray-950)',
33
34
  },
34
35
  orange: {
35
36
  50: '#fff8f1',