@ui5/webcomponents 2.22.1-rc.0 → 2.23.0-rc.1

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 (155) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/DateComponentBase.d.ts +8 -0
  4. package/dist/DateComponentBase.js +10 -8
  5. package/dist/DateComponentBase.js.map +1 -1
  6. package/dist/DayPicker.d.ts +16 -1
  7. package/dist/DayPicker.js +28 -7
  8. package/dist/DayPicker.js.map +1 -1
  9. package/dist/Form.d.ts +9 -25
  10. package/dist/Form.js +42 -207
  11. package/dist/Form.js.map +1 -1
  12. package/dist/FormGroup.d.ts +11 -0
  13. package/dist/FormGroup.js +3 -0
  14. package/dist/FormGroup.js.map +1 -1
  15. package/dist/FormItem.d.ts +2 -0
  16. package/dist/FormItem.js.map +1 -1
  17. package/dist/FormTemplate.js +26 -15
  18. package/dist/FormTemplate.js.map +1 -1
  19. package/dist/Icon.d.ts +19 -0
  20. package/dist/Icon.js +17 -0
  21. package/dist/Icon.js.map +1 -1
  22. package/dist/IconTemplate.js +4 -1
  23. package/dist/IconTemplate.js.map +1 -1
  24. package/dist/ListItem.d.ts +2 -0
  25. package/dist/ListItem.js +4 -0
  26. package/dist/ListItem.js.map +1 -1
  27. package/dist/ListItemTemplate.js +1 -1
  28. package/dist/ListItemTemplate.js.map +1 -1
  29. package/dist/MenuItem.d.ts +1 -0
  30. package/dist/MultiInput.js +2 -1
  31. package/dist/MultiInput.js.map +1 -1
  32. package/dist/Panel.d.ts +2 -23
  33. package/dist/Panel.js +2 -52
  34. package/dist/Panel.js.map +1 -1
  35. package/dist/PanelTemplate.js +3 -6
  36. package/dist/PanelTemplate.js.map +1 -1
  37. package/dist/TabContainer.js +4 -2
  38. package/dist/TabContainer.js.map +1 -1
  39. package/dist/TableRowActionBase.d.ts +1 -1
  40. package/dist/TableRowActionBase.js +1 -1
  41. package/dist/TableRowActionBase.js.map +1 -1
  42. package/dist/TableRowActionNavigation.d.ts +2 -1
  43. package/dist/TableRowActionNavigation.js +11 -1
  44. package/dist/TableRowActionNavigation.js.map +1 -1
  45. package/dist/Token.js +9 -5
  46. package/dist/Token.js.map +1 -1
  47. package/dist/Tokenizer.js +19 -5
  48. package/dist/Tokenizer.js.map +1 -1
  49. package/dist/TreeItemBase.d.ts +1 -0
  50. package/dist/css/themes/Form.css +1 -1
  51. package/dist/css/themes/FormItem.css +1 -1
  52. package/dist/css/themes/FormItemSpan.css +1 -1
  53. package/dist/css/themes/FormLayout.css +1 -1
  54. package/dist/css/themes/Icon.css +1 -1
  55. package/dist/css/themes/Panel.css +1 -1
  56. package/dist/css/themes/Table.css +1 -1
  57. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  58. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  59. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  60. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  61. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  62. package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +0 -1
  63. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  64. package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +0 -1
  65. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  66. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  67. package/dist/custom-elements-internal.json +50 -8
  68. package/dist/custom-elements.json +45 -8
  69. package/dist/form-utils/FormUtils.d.ts +9 -0
  70. package/dist/form-utils/FormUtils.js +47 -0
  71. package/dist/form-utils/FormUtils.js.map +1 -0
  72. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  73. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  74. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  75. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  76. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  77. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  78. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  79. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  80. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  81. package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
  82. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  83. package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
  84. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  85. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  86. package/dist/generated/themes/Form.css.d.ts +1 -1
  87. package/dist/generated/themes/Form.css.js +1 -1
  88. package/dist/generated/themes/Form.css.js.map +1 -1
  89. package/dist/generated/themes/FormItem.css.d.ts +1 -1
  90. package/dist/generated/themes/FormItem.css.js +1 -1
  91. package/dist/generated/themes/FormItem.css.js.map +1 -1
  92. package/dist/generated/themes/FormItemSpan.css.d.ts +1 -1
  93. package/dist/generated/themes/FormItemSpan.css.js +1 -1
  94. package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
  95. package/dist/generated/themes/FormLayout.css.d.ts +1 -1
  96. package/dist/generated/themes/FormLayout.css.js +1 -1
  97. package/dist/generated/themes/FormLayout.css.js.map +1 -1
  98. package/dist/generated/themes/Icon.css.d.ts +1 -1
  99. package/dist/generated/themes/Icon.css.js +1 -1
  100. package/dist/generated/themes/Icon.css.js.map +1 -1
  101. package/dist/generated/themes/Panel.css.d.ts +1 -1
  102. package/dist/generated/themes/Panel.css.js +1 -1
  103. package/dist/generated/themes/Panel.css.js.map +1 -1
  104. package/dist/generated/themes/Table.css.d.ts +1 -1
  105. package/dist/generated/themes/Table.css.js +1 -1
  106. package/dist/generated/themes/Table.css.js.map +1 -1
  107. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
  108. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  109. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  110. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
  111. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  112. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  113. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
  114. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  115. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  116. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
  117. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  118. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  119. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
  120. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  121. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  122. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
  123. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +0 -1
  124. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
  125. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
  126. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  127. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  128. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
  129. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +0 -1
  130. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
  131. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
  132. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  133. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  134. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
  135. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  136. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  137. package/dist/vscode.html-custom-data.json +9 -4
  138. package/dist/web-types.json +26 -9
  139. package/package.json +9 -9
  140. package/src/FormTemplate.tsx +41 -23
  141. package/src/IconTemplate.tsx +18 -0
  142. package/src/ListItemTemplate.tsx +1 -1
  143. package/src/PanelTemplate.tsx +6 -12
  144. package/src/i18n/messagebundle_en.properties +341 -0
  145. package/src/i18n/messagebundle_en_US_sappsd.properties +1 -0
  146. package/src/i18n/messagebundle_en_US_saprigi.properties +1 -0
  147. package/src/i18n/messagebundle_en_US_saptrc.properties +1 -0
  148. package/src/themes/Form.css +4 -2
  149. package/src/themes/FormItem.css +5 -51
  150. package/src/themes/FormItemSpan.css +9 -9
  151. package/src/themes/FormLayout.css +30 -113
  152. package/src/themes/Icon.css +6 -0
  153. package/src/themes/Panel.css +2 -19
  154. package/src/themes/Table.css +1 -4
  155. package/src/themes/base/Panel-parameters.css +0 -1
package/dist/Form.js CHANGED
@@ -9,25 +9,16 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
9
9
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
10
10
  import property from "@ui5/webcomponents-base/dist/decorators/property.js";
11
11
  import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
12
- import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
12
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
13
13
  import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
14
14
  import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js";
15
+ // Utils
16
+ import { getFormItemLayoutValue, getGroupsColSpan } from "./form-utils/FormUtils.js";
15
17
  // Template
16
18
  import FormTemplate from "./FormTemplate.js";
17
19
  // Styles
18
20
  import FormCss from "./generated/themes/Form.css.js";
19
21
  import { FORM_ACCESSIBLE_NAME } from "./generated/i18n/i18n-defaults.js";
20
- const additionalStylesMap = new Map();
21
- const StepColumn = {
22
- "S": 1,
23
- "M": 2,
24
- "L": 3,
25
- "XL": 6,
26
- };
27
- const breakpoints = ["S", "M", "L", "Xl"];
28
- const MAX_FORM_ITEM_CELLS = 12;
29
- const DEFAULT_FORM_ITEM_LAYOUT = "4fr 8fr 0fr";
30
- const DEFAULT_FORM_ITEM_LAYOUT_S = "1fr";
31
22
  /**
32
23
  * @class
33
24
  *
@@ -121,23 +112,7 @@ const DEFAULT_FORM_ITEM_LAYOUT_S = "1fr";
121
112
  *
122
113
  * ### Navigation flow
123
114
  *
124
- * The Form component supports two layout options for keyboard navigation:
125
- *
126
- * #### Simple form
127
- *
128
- * In this "simple form" layout, each `ui5-form-item` acts as a standalone group
129
- * with one item, so focus moves horizontally across the grid from one `ui5-form-item` to the next.
130
- * This layout is ideal for simpler forms and supports custom arrangements, e.g.,
131
- *
132
- * ```
133
- * | 1 | 2 |
134
- * | 3 |
135
- * | 4 | 5 |
136
- * ```
137
- *
138
- * #### Complex form
139
- *
140
- * In this layout, items are grouped into `ui5-form-group` elements, allowing more complex configurations:
115
+ * Items are grouped into `ui5-form-group` elements, allowing the following navigation:
141
116
  *
142
117
  * - **Single-Column Group**: Focus moves vertically down from one item to the next.
143
118
  * ```
@@ -271,22 +246,17 @@ let Form = Form_1 = class Form extends UI5Element {
271
246
  }
272
247
  onBeforeRendering() {
273
248
  // Parse the layout and set it to the FormGroups/FormItems.
274
- this.setColumnLayout();
275
- // Parse the labelSpan and emptySpan and set it to the FormGroups/FormItems.
276
- this.setFormItemLayout();
249
+ this.parseLayoutConfiguration();
277
250
  // Define how many columns a group should take.
278
251
  this.setGroupsColSpan();
279
252
  // Set item spacing
280
253
  this.setItemsState();
281
254
  }
282
255
  onAfterRendering() {
283
- // Create additional CSS for number of columns that are not supported by default.
284
- this.createAdditionalCSSStyleSheet();
285
256
  this.setFastNavGroup();
286
257
  }
287
- setColumnLayout() {
288
- const layoutArr = this.layout.split(" ");
289
- layoutArr.forEach((breakpoint) => {
258
+ parseLayoutConfiguration() {
259
+ this.layout.split(" ").forEach((breakpoint) => {
290
260
  if (breakpoint.startsWith("S")) {
291
261
  this.columnsS = parseInt(breakpoint.slice(1));
292
262
  }
@@ -300,8 +270,6 @@ let Form = Form_1 = class Form extends UI5Element {
300
270
  this.columnsXl = parseInt(breakpoint.slice(2));
301
271
  }
302
272
  });
303
- }
304
- parseFormItemSpan() {
305
273
  this.labelSpan.split(" ").forEach((breakpoint) => {
306
274
  if (breakpoint.startsWith("S")) {
307
275
  this.labelSpanS = parseInt(breakpoint.slice(1));
@@ -331,43 +299,25 @@ let Form = Form_1 = class Form extends UI5Element {
331
299
  }
332
300
  });
333
301
  }
334
- setFormItemLayout() {
335
- this.parseFormItemSpan();
336
- [
337
- {
338
- breakpoint: "S",
339
- labelSpan: this.labelSpanS,
340
- emptySpan: this.emptySpanS,
341
- },
342
- {
343
- breakpoint: "M",
344
- labelSpan: this.labelSpanM,
345
- emptySpan: this.emptySpanM,
346
- },
347
- {
348
- breakpoint: "L",
349
- labelSpan: this.labelSpanL,
350
- emptySpan: this.emptySpanL,
351
- },
352
- {
353
- breakpoint: "XL",
354
- labelSpan: this.labelSpanXl,
355
- emptySpan: this.emptySpanXl,
356
- },
357
- ].forEach(layout => {
358
- if (this.isValidFormItemLayout(layout.labelSpan, layout.emptySpan)) {
359
- const formItemLayout = layout.labelSpan === MAX_FORM_ITEM_CELLS ? `1fr` : `${layout.labelSpan}fr ${MAX_FORM_ITEM_CELLS - (layout.labelSpan + layout.emptySpan)}fr ${layout.emptySpan}fr`;
360
- this.style.setProperty(`--ui5-form-item-layout-${layout.breakpoint}`, formItemLayout);
361
- }
362
- else {
363
- // eslint-disable-next-line
364
- console.warn(`Form :: invalid usage of emptySpan and/or labelSpan in ${layout.breakpoint} size. The labelSpan must be <=12 and when emptySpace is used - their combined values must not exceed 11.`);
365
- this.style.setProperty(`--ui5-form-item-layout-${layout.breakpoint}`, layout.breakpoint === "S" ? DEFAULT_FORM_ITEM_LAYOUT_S : DEFAULT_FORM_ITEM_LAYOUT);
366
- }
367
- });
368
- }
369
- isValidFormItemLayout(labelSpan, emptySpan) {
370
- return emptySpan === 0 ? labelSpan <= MAX_FORM_ITEM_CELLS : labelSpan + emptySpan <= MAX_FORM_ITEM_CELLS - 1;
302
+ getFormItemLayout(breakpoint) {
303
+ let labelSpan, emptySpan;
304
+ if (breakpoint === "S") {
305
+ labelSpan = this.labelSpanS;
306
+ emptySpan = this.emptySpanS;
307
+ }
308
+ else if (breakpoint === "M") {
309
+ labelSpan = this.labelSpanM;
310
+ emptySpan = this.emptySpanM;
311
+ }
312
+ else if (breakpoint === "L") {
313
+ labelSpan = this.labelSpanL;
314
+ emptySpan = this.emptySpanL;
315
+ }
316
+ else if (breakpoint === "XL") {
317
+ labelSpan = this.labelSpanXl;
318
+ emptySpan = this.emptySpanXl;
319
+ }
320
+ return getFormItemLayoutValue(breakpoint, labelSpan, emptySpan);
371
321
  }
372
322
  setFastNavGroup() {
373
323
  if (this.hasGroupItems) {
@@ -386,37 +336,12 @@ let Form = Form_1 = class Form extends UI5Element {
386
336
  return itemB?.items.length - itemA?.items.length;
387
337
  });
388
338
  sortedItems.forEach((item, idx) => {
389
- item.colsXl = this.getGroupsColSpan(this.columnsXl, itemsCount, idx, item);
390
- item.colsL = this.getGroupsColSpan(this.columnsL, itemsCount, idx, item);
391
- item.colsM = this.getGroupsColSpan(this.columnsM, itemsCount, idx, item);
392
- item.colsS = this.getGroupsColSpan(this.columnsS, itemsCount, idx, item);
339
+ item.colsXl = getGroupsColSpan(this.columnsXl, itemsCount, idx, item, "XL");
340
+ item.colsL = getGroupsColSpan(this.columnsL, itemsCount, idx, item, "L");
341
+ item.colsM = getGroupsColSpan(this.columnsM, itemsCount, idx, item, "M");
342
+ item.colsS = getGroupsColSpan(this.columnsS, itemsCount, idx, item, "S");
393
343
  });
394
344
  }
395
- getGroupsColSpan(cols, groups, index, group) {
396
- // Case 0: column span is set from outside.
397
- if (group.columnSpan) {
398
- return group.columnSpan;
399
- }
400
- // CASE 1: The number of available columns match the number of groups, or only 1 column is available - each group takes 1 column.
401
- // For example: 1 column - 1 group, 2 columns - 2 groups, 3 columns - 3 groups, 4columns - 4 groups
402
- if (cols === 1 || cols <= groups) {
403
- return 1;
404
- }
405
- // CASE 2: The number of available columns IS multiple of the number of groups.
406
- // For example: 2 column - 1 group, 3 columns - 1 groups, 4 columns - 1 group, 4 columns - 2 groups
407
- if (cols % groups === 0) {
408
- return cols / groups;
409
- }
410
- // CASE 3: The number of available columns IS NOT multiple of the number of groups.
411
- const MIN_COL_SPAN = 1;
412
- const delta = cols - groups;
413
- // 7 cols & 4 groups => 2, 2, 2, 1
414
- if (delta <= groups) {
415
- return index < delta ? MIN_COL_SPAN + 1 : MIN_COL_SPAN;
416
- }
417
- // 7 cols & 3 groups => 3, 2, 2
418
- return index === 0 ? MIN_COL_SPAN + (delta - groups) + 1 : MIN_COL_SPAN + 1;
419
- }
420
345
  setItemsState() {
421
346
  this.items.forEach((item) => {
422
347
  item.itemSpacing = this.itemSpacing;
@@ -452,24 +377,6 @@ let Form = Form_1 = class Form extends UI5Element {
452
377
  }
453
378
  get groupItemsInfo() {
454
379
  return this.items.map((groupItem, index) => {
455
- const items = this.getItemsInfo(Array.from(groupItem.children));
456
- breakpoints.forEach(breakpoint => {
457
- const cols = ((groupItem[`cols${breakpoint}`]) || 1);
458
- const rows = Math.ceil(items.length / cols);
459
- const total = cols * rows;
460
- const lastRowColumns = (cols - (total - items.length) - 1); // all other indecies start from 0
461
- let currentItem = 0;
462
- for (let i = 0; i < total; i++) {
463
- const column = Math.floor(i / rows);
464
- const row = i % rows;
465
- if (row === rows - 1 && column > lastRowColumns) {
466
- // eslint-disable-next-line no-continue
467
- continue;
468
- }
469
- items[currentItem].item.style.setProperty(`--ui5-form-item-order-${breakpoint}`, `${column + row * cols}`);
470
- currentItem++;
471
- }
472
- });
473
380
  const accessibleNameRef = groupItem.effectiveAccessibleNameRef;
474
381
  return {
475
382
  groupItem,
@@ -489,81 +396,9 @@ let Form = Form_1 = class Form extends UI5Element {
489
396
  return (items || this.items).map((item) => {
490
397
  return {
491
398
  item,
492
- // eslint-disable-next-line
493
- // TODO: remove classes and classMap after deleting the hbs template
494
- classes: item.columnSpan ? `ui5-form-item-span-${item.columnSpan}` : "",
495
- classMap: {
496
- [`ui5-form-item-span-${item.columnSpan}`]: item.columnSpan !== undefined,
497
- },
498
399
  };
499
400
  });
500
401
  }
501
- createAdditionalCSSStyleSheet() {
502
- [
503
- { breakpoint: "S", columns: this.columnsS },
504
- { breakpoint: "M", columns: this.columnsM },
505
- { breakpoint: "L", columns: this.columnsL },
506
- { breakpoint: "XL", columns: this.columnsXl },
507
- ].forEach(step => {
508
- const additionalStyle = this.getAdditionalCSS(step.breakpoint, step.columns);
509
- if (additionalStyle) {
510
- this.shadowRoot.adoptedStyleSheets = [...this.shadowRoot.adoptedStyleSheets, this.getCSSStyleSheet(additionalStyle)];
511
- }
512
- });
513
- }
514
- getAdditionalCSS(step, colsNumber) {
515
- if (StepColumn[step] >= colsNumber) {
516
- return;
517
- }
518
- const key = `${step}-${colsNumber}`;
519
- if (!additionalStylesMap.has(key)) {
520
- let containerQuery;
521
- let supporedColumnsNumber = StepColumn.S;
522
- let stepSpanCSS = "";
523
- let cols = colsNumber;
524
- if (step === "S") {
525
- supporedColumnsNumber = StepColumn.S;
526
- containerQuery = `@container (max-width: 599px) {`;
527
- }
528
- else if (step === "M") {
529
- supporedColumnsNumber = StepColumn.M;
530
- containerQuery = `@container (min-width: 600px) and (max-width: 1023px) {`;
531
- }
532
- else if (step === "L") {
533
- supporedColumnsNumber = StepColumn.L;
534
- containerQuery = `@container (min-width: 1024px) and (max-width: 1439px) {`;
535
- }
536
- else if (step === "XL") {
537
- containerQuery = `@container (min-width: 1440px) {`;
538
- supporedColumnsNumber = StepColumn.XL;
539
- }
540
- while (cols > supporedColumnsNumber) {
541
- stepSpanCSS += `
542
- :host([columns-${step.toLocaleLowerCase()}="${cols}"]) .ui5-form-layout {
543
- grid-template-columns: repeat(${cols}, 1fr);
544
- }
545
-
546
- .ui5-form-column-span${step}-${cols},
547
- .ui5-form-item-span-${cols} {
548
- grid-column: span ${cols};
549
- }
550
-
551
- .ui5-form-column-span${step}-${cols} .ui5-form-group-layout {
552
- grid-template-columns: repeat(${cols}, 1fr);
553
- }
554
- `;
555
- cols--;
556
- }
557
- const css = `${containerQuery}${stepSpanCSS}}`;
558
- additionalStylesMap.set(key, css);
559
- }
560
- return additionalStylesMap.get(key);
561
- }
562
- getCSSStyleSheet(cssText) {
563
- const style = new CSSStyleSheet();
564
- style.replaceSync(cssText);
565
- return style;
566
- }
567
402
  };
568
403
  __decorate([
569
404
  property()
@@ -604,40 +439,40 @@ __decorate([
604
439
  })
605
440
  ], Form.prototype, "items", void 0);
606
441
  __decorate([
607
- property({ type: Number })
442
+ property({ type: Number, noAttribute: true })
608
443
  ], Form.prototype, "columnsS", void 0);
609
444
  __decorate([
610
- property({ type: Number })
445
+ property({ type: Number, noAttribute: true })
611
446
  ], Form.prototype, "labelSpanS", void 0);
612
447
  __decorate([
613
- property({ type: Number })
448
+ property({ type: Number, noAttribute: true })
614
449
  ], Form.prototype, "emptySpanS", void 0);
615
450
  __decorate([
616
- property({ type: Number })
451
+ property({ type: Number, noAttribute: true })
617
452
  ], Form.prototype, "columnsM", void 0);
618
453
  __decorate([
619
- property({ type: Number })
454
+ property({ type: Number, noAttribute: true })
620
455
  ], Form.prototype, "labelSpanM", void 0);
621
456
  __decorate([
622
- property({ type: Number })
457
+ property({ type: Number, noAttribute: true })
623
458
  ], Form.prototype, "emptySpanM", void 0);
624
459
  __decorate([
625
- property({ type: Number })
460
+ property({ type: Number, noAttribute: true })
626
461
  ], Form.prototype, "columnsL", void 0);
627
462
  __decorate([
628
- property({ type: Number })
463
+ property({ type: Number, noAttribute: true })
629
464
  ], Form.prototype, "labelSpanL", void 0);
630
465
  __decorate([
631
- property({ type: Number })
466
+ property({ type: Number, noAttribute: true })
632
467
  ], Form.prototype, "emptySpanL", void 0);
633
468
  __decorate([
634
- property({ type: Number })
469
+ property({ type: Number, noAttribute: true })
635
470
  ], Form.prototype, "columnsXl", void 0);
636
471
  __decorate([
637
- property({ type: Number })
472
+ property({ type: Number, noAttribute: true })
638
473
  ], Form.prototype, "labelSpanXl", void 0);
639
474
  __decorate([
640
- property({ type: Number })
475
+ property({ type: Number, noAttribute: true })
641
476
  ], Form.prototype, "emptySpanXl", void 0);
642
477
  __decorate([
643
478
  i18n("@ui5/webcomponents")
package/dist/Form.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sourceRoot":"","sources":["../src/Form.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAG/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAE1G,WAAW;AACX,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAOrD,OAAO,EA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ADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACZ;AAEf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACb;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACb;AAEd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACX;AAEhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACX;AA/BT;IADN,IAAI,CAAC,oBAAoB,CAAC;8BACG;AA/IzB,IAAI;IANT,aAAa,CAAC;QACd,GAAG,EAAE,UAAU;QACf,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,YAAY;KACtB,CAAC;GACI,IAAI,CA0fT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type { AriaRole } from \"@ui5/webcomponents-base\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\n// Template\nimport FormTemplate from \"./FormTemplate.js\";\n\n// Styles\nimport FormCss from \"./generated/themes/Form.css.js\";\n\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type FormAccessibleMode from \"./types/FormAccessibleMode.js\";\nimport type FormGroup from \"./FormGroup.js\";\nimport type TitleLevel from \"./types/TitleLevel.js\";\n\nimport { FORM_ACCESSIBLE_NAME } from \"./generated/i18n/i18n-defaults.js\";\n\nconst additionalStylesMap = new Map<string, string>();\n\nconst StepColumn = {\n\t\"S\": 1,\n\t\"M\": 2,\n\t\"L\": 3,\n\t\"XL\": 6,\n};\n\nconst breakpoints = [\"S\", \"M\", \"L\", \"Xl\"];\nconst MAX_FORM_ITEM_CELLS = 12;\nconst DEFAULT_FORM_ITEM_LAYOUT = \"4fr 8fr 0fr\";\nconst DEFAULT_FORM_ITEM_LAYOUT_S = \"1fr\";\n\n/**\n * Interface for components that can be slotted inside `ui5-form` as items.\n * @public\n * @since 2.0.0\n */\ninterface IFormItem extends UI5Element {\n\titemSpacing: `${FormItemSpacing}`;\n\treadonly isGroup: boolean;\n\tcolsXl?: number;\n\tcolsL?: number;\n\tcolsM?: number;\n\tcolsS?: number;\n\tcolumnSpan?: number;\n\theaderText?: string;\n\theaderLevel?: `${TitleLevel}`;\n\taccessibleMode?: `${FormAccessibleMode}`;\n}\n\ntype GroupItemsInfo = {\n\tgroupItem: IFormItem,\n\titems: Array<ItemsInfo>,\n\taccessibleName: string | undefined,\n\taccessibleNameInner: string | undefined,\n\taccessibleNameRef: string | undefined,\n\taccessibleNameRefInner: string | undefined,\n\trole: AriaRole | undefined,\n}\n\ntype ItemsInfo = {\n\titem: IFormItem,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The Form is a layout component that arranges labels and form fields (like input fields) pairs\n * into a specific number of columns.\n *\n * **Note:** The Form web component is a layout component, it isn't a replacement for the native `form` HTML element.\n * The Form web component does not provide any APIs for form submission.\n *\n * ### Structure\n *\n * - **Form** (`ui5-form`) is the top-level container component, responsible for the content layout and responsiveness.\n * - **FormGroup** (`ui5-form-group`) enables the grouping of the Form content.\n * - **FormItem** (`ui5-form-item`) is a pair of label and form fields and can be used directly in a Form, or as part of a FormGroup.\n *\n * The simplest Form (`ui5-form`) consists of a header area on top,\n * displaying a header text (see the `headingText` property) and content below - an arbitrary number of FormItems (ui5-form-item),\n * representing the pairs of label and form fields.\n *\n * And, there is also \"grouping\" available to assist the implementation of richer UIs.\n * This is enabled by the FormGroup (`ui5-form-group`) component.\n * In this case, the Form is structured into FormGroups and each FormGroup consists of FormItems.\n *\n * ### Responsiveness\n *\n * The Form component reacts and changes its layout on predefined breakpoints.\n * Depending on its size, the Form content (FormGroups and FormItems) gets divided into one or more columns as follows:\n * - **S** (0 - 599px) – 1 column is recommended (default: 1)\n * - **M** (600px - 1023px) – up to 2 columns are recommended (default: 1)\n * - **L** (1024px - 1439px) - up to 3 columns are recommended (default: 2)\n * - **XL** (>= 1440px) – up to 6 columns are recommended (default: 3)\n *\n * To change the layout, use the `layout` property - f.e. layout=\"S1 M2 L3 XL6\".\n *\n * ### Groups\n *\n * To make better use of screen space, there is built-in logic to determine how many columns should a FormGroup occupy.\n *\n * - **Example #1** (perfect match):\n * 4 columns and 4 groups: each group will use 1 column.\n *\n * - **Example #2** (balanced distribution):\n * 4 columns and 2 groups: each group will use 2 columns.\n * 6 columns and 2 groups: each group will use 3 columns.\n *\n * - **Example #3** (unbalanced distribution):\n * 3 columns and 2 groups: the larger one will use 2 columns, the smaller 1 column.\n * 5 columns and 3 groups: two of the groups will use 2 columns each, the smallest 1 column.\n *\n * **Note:** The size of a group element is determined by the number of FormItems assigned to it.\n * In the case of equality, the first in the DOM will use more columns, and the last - fewer columns.\n *\n * - **Example #4** (more groups than columns):\n * 3 columns and 4 groups: each FormGroup uses only 1 column, the last FormGroup will wrap on the second row.\n *\n * ### Groups Column Span\n *\n * To influence the built-in group distribution, described in the previous section,\n * you can use the FormGroup's `columnSpan` property, that defines how many columns the group should expand to.\n *\n * ### Items Column Span\n *\n * FormItem's columnSpan property defines how many columns the form item should expand to inside a form group or the form.\n *\n * ### Items Label Span\n *\n * The placement of the labels depends on the size of the used column.\n * If there is enough space, the labels are next to their associated fields, otherwise - above the fields.\n * By default, the labels take 4/12 of the FormItem, leaving 8/12 parts to associated fields.\n * You can control what space the labels should take via the `labelSpan` property.\n *\n * **For example:** To always place the labels on top set: `labelSpan=\"S12 M12 L12 XL12\"` property.\n *\n * ### Items Empty Span\n *\n * By default, a form item spans 12 cells, fully divided between its label and field, with no empty space at the end:\n * - **Label:** occupies 4 cells.\n * - **Field:** occupies 8 cells.\n *\n * The `emptySpan` property provides additional layout flexibility by defining empty space at the form item’s end.\n *\n * **For example:** Setting \"S0 M0 L3 XL3\" (or just \"L3 XL3\") adjusts the layout as follows:\n * - **Label:** remains 4 cells.\n * - **Field:** is reduced to 5 cells.\n * - **Empty space:** 3 cells are added at the end.\n *\n * Greater values increase the empty space at the end of the form item, reducing the space available for the label and its field.\n * However, setting `emptySpan` to 1 cell is recommended and typically sufficient to achieve a balanced layout.\n *\n * ### Navigation flow\n *\n * The Form component supports two layout options for keyboard navigation:\n *\n * #### Simple form\n *\n * In this \"simple form\" layout, each `ui5-form-item` acts as a standalone group\n * with one item, so focus moves horizontally across the grid from one `ui5-form-item` to the next.\n * This layout is ideal for simpler forms and supports custom arrangements, e.g.,\n *\n * ```\n * | 1 | 2 |\n * | 3 |\n * | 4 | 5 |\n * ```\n *\n * #### Complex form\n *\n * In this layout, items are grouped into `ui5-form-group` elements, allowing more complex configurations:\n *\n * - **Single-Column Group**: Focus moves vertically down from one item to the next.\n * ```\n * | 1 |\n * | 2 |\n * | 3 |\n * ```\n *\n * - **Multi-Column Group**: Focus moves horizontally within each row, advancing to the next row after completing the current one.\n * ```\n * | 1 | 4 |\n * | 2 | 5 |\n * | 3 | 6 |\n * ```\n *\n * ### Keyboard Handling\n *\n * - [Tab] - Moves the focus to the next interactive element within the Form/FormGroup (if available) or to the next element in the tab chain outside the Form\n * - [Shift] + [Tab] - Moves the focus to the previous interactive element within the Form/FormGroup (if available) or to the previous element in the tab chain outside the Form\n * - [F6] - Moves the focus to the first interactive element of the next FormGroup (if available) or to the next element in the tab chain outside the Form\n * - [Shift] + [F6] - Moves the focus to the first interactive element of the previous FormGroup (if available) or to the previous element in the tab chain outside the Form\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/Form.js\";\n * - import @ui5/webcomponents/dist/FormGroup.js\";\n * - import @ui5/webcomponents/dist/FormItem.js\";\n *\n * @csspart header - Used to style the wrapper of the header.\n * @csspart layout - Used to style the element defining the form column layout.\n * @csspart column - Used to style a single column of the form column layout.\n *\n * @public\n * @since 2.0.0\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form\",\n\trenderer: jsxRenderer,\n\tstyles: FormCss,\n\ttemplate: FormTemplate,\n})\nclass Form extends UI5Element {\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.10.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines id (or many ids) of the element (or elements) that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.16.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the accessibility mode of the component in \"edit\" and \"display\" use-cases.\n\t *\n\t * Based on the mode, the component renders different HTML elements and ARIA attributes,\n\t * which are appropriate for the use-case.\n\t *\n\t * **Usage:**\n\t * - Set this property to \"Display\", when the form consists of non-editable (e.g. texts) form items.\n\t * - Set this property to \"Edit\", when the form consists of editable (e.g. input fields) form items.\n\t *\n\t * @default \"Display\"\n\t * @since 2.16.0\n\t * @public\n\t */\n\t@property()\n\taccessibleMode: `${FormAccessibleMode}` = \"Display\";\n\n\t/**\n\t * Defines the number of columns to distribute the form content by breakpoint.\n\t *\n\t * Supported values:\n\t * - `S` - 1 column by default (1 column is recommended)\n\t * - `M` - 1 column by default (up to 2 columns are recommended)\n\t * - `L` - 2 columns by default (up to 3 columns are recommended)\n\t * - `XL` - 3 columns by default (up to 6 columns are recommended)\n\t *\n\t * @default \"S1 M1 L2 XL3\"\n\t * @public\n\t */\n\t@property()\n\tlayout = \"S1 M1 L2 XL3\"\n\n\t/**\n\t * Defines the width proportion of the labels and fields of a form item by breakpoint.\n\t *\n\t * By default, the labels take 4/12 (or 1/3) of the form item in M,L and XL sizes,\n\t * and 12/12 in S size, e.g in S the label is on top of its associated field.\n\t *\n\t * The supported values are between 1 and 12. Greater the number, more space the label will use.\n\t *\n\t * **Note:** If \"12\" is set, the label will be displayed on top of its assosiated field.\n\t *\n\t * @default \"S12 M4 L4 XL4\"\n\t * @public\n\t */\n\t@property()\n\tlabelSpan = \"S12 M4 L4 XL4\";\n\n\t/**\n\t * Defines the number of cells that are empty at the end of each form item, configurable by breakpoint.\n\t *\n\t * By default, a form item spans 12 cells, fully divided between its label (4 cells) and field (8 cells), with no empty space at the end.\n\t * The `emptySpan` provides additional layout flexibility by defining empty space at the form item’s end.\n\t *\n\t * **Note:**\n\t * - The maximum allowable empty space is 10 cells. At least 1 cell each must remain for the label and the field.\n\t * - When `emptySpan` is specified (greater than 0), ensure that the combined value of `emptySpan` and `labelSpan` does not exceed 11. This guarantees a minimum of 1 cell for the field.\n\t *\n\t * @default \"S0 M0 L0 XL0\"\n\t * @since 2.5.0\n\t * @public\n\t */\n\t@property()\n\temptySpan = \"S0 M0 L0 XL0\";\n\n\t/**\n\t * Defines the header text of the component.\n\t *\n\t * **Note:** The property gets overridden by the `header` slot.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the compoennt heading level,\n\t * set by the `headerText`.\n\t * @default \"H2\"\n\t * @since 2.10.0\n\t * @public\n\t*/\n\t@property()\n\theaderLevel: `${TitleLevel}` = \"H2\";\n\n\t/**\n\t * Defines the vertical spacing between form items.\n\t *\n\t * **Note:** If the Form is meant to be switched between \"display\"(\"non-edit\") and \"edit\" modes,\n\t * we recommend using \"Large\" item spacing in \"display\"(\"non-edit\") mode, and \"Normal\" - for \"edit\" mode,\n\t * to avoid \"jumping\" effect, caused by the hight difference between texts in \"display\"(\"non-edit\") mode and the input fields in \"edit\" mode.\n\t *\n\t * @default \"Normal\"\n\t * @public\n\t */\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\";\n\n\t/**\n\t * Defines the component header area.\n\t *\n\t * **Note:** When a `header` is provided, the `headerText` property is ignored.\n\t * @public\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the component content - FormGroups or FormItems.\n\t *\n\t * **Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\n\t * Either use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: true,\n\t})\n\titems!: DefaultSlot<IFormItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tcolumnsS = 1;\n\t@property({ type: Number })\n\tlabelSpanS = 12\n\t@property({ type: Number })\n\temptySpanS = 0\n\n\t@property({ type: Number })\n\tcolumnsM = 1;\n\t@property({ type: Number })\n\tlabelSpanM = 4;\n\t@property({ type: Number })\n\temptySpanM = 0\n\n\t@property({ type: Number })\n\tcolumnsL = 2;\n\t@property({ type: Number })\n\tlabelSpanL = 4;\n\t@property({ type: Number })\n\temptySpanL = 0\n\n\t@property({ type: Number })\n\tcolumnsXl = 3;\n\t@property({ type: Number })\n\tlabelSpanXl = 4;\n\t@property({ type: Number })\n\temptySpanXl = 0;\n\n\tonBeforeRendering() {\n\t\t// Parse the layout and set it to the FormGroups/FormItems.\n\t\tthis.setColumnLayout();\n\n\t\t// Parse the labelSpan and emptySpan and set it to the FormGroups/FormItems.\n\t\tthis.setFormItemLayout();\n\n\t\t// Define how many columns a group should take.\n\t\tthis.setGroupsColSpan();\n\n\t\t// Set item spacing\n\t\tthis.setItemsState();\n\t}\n\n\tonAfterRendering() {\n\t\t// Create additional CSS for number of columns that are not supported by default.\n\t\tthis.createAdditionalCSSStyleSheet();\n\n\t\tthis.setFastNavGroup();\n\t}\n\n\tsetColumnLayout() {\n\t\tconst layoutArr = this.layout.split(\" \");\n\t\tlayoutArr.forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.columnsS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.columnsM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.columnsL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.columnsXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\t}\n\n\tparseFormItemSpan() {\n\t\tthis.labelSpan.split(\" \").forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.labelSpanS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.labelSpanM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.labelSpanL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.labelSpanXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\n\t\tthis.emptySpan.split(\" \").forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.emptySpanS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.emptySpanM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.emptySpanL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.emptySpanXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\t}\n\n\tsetFormItemLayout() {\n\t\tthis.parseFormItemSpan();\n\n\t\t[\n\t\t\t{\n\t\t\t\tbreakpoint: \"S\",\n\t\t\t\tlabelSpan: this.labelSpanS,\n\t\t\t\temptySpan: this.emptySpanS,\n\t\t\t},\n\t\t\t{\n\t\t\t\tbreakpoint: \"M\",\n\t\t\t\tlabelSpan: this.labelSpanM,\n\t\t\t\temptySpan: this.emptySpanM,\n\t\t\t},\n\t\t\t{\n\t\t\t\tbreakpoint: \"L\",\n\t\t\t\tlabelSpan: this.labelSpanL,\n\t\t\t\temptySpan: this.emptySpanL,\n\t\t\t},\n\t\t\t{\n\t\t\t\tbreakpoint: \"XL\",\n\t\t\t\tlabelSpan: this.labelSpanXl,\n\t\t\t\temptySpan: this.emptySpanXl,\n\t\t\t},\n\t\t].forEach(layout => {\n\t\t\tif (this.isValidFormItemLayout(layout.labelSpan, layout.emptySpan)) {\n\t\t\t\tconst formItemLayout = layout.labelSpan === MAX_FORM_ITEM_CELLS ? `1fr` : `${layout.labelSpan}fr ${MAX_FORM_ITEM_CELLS - (layout.labelSpan + layout.emptySpan)}fr ${layout.emptySpan}fr`;\n\t\t\t\tthis.style.setProperty(`--ui5-form-item-layout-${layout.breakpoint}`, formItemLayout);\n\t\t\t} else {\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tconsole.warn(`Form :: invalid usage of emptySpan and/or labelSpan in ${layout.breakpoint} size. The labelSpan must be <=12 and when emptySpace is used - their combined values must not exceed 11.`)\n\t\t\t\tthis.style.setProperty(`--ui5-form-item-layout-${layout.breakpoint}`, layout.breakpoint === \"S\" ? DEFAULT_FORM_ITEM_LAYOUT_S : DEFAULT_FORM_ITEM_LAYOUT);\n\t\t\t}\n\t\t});\n\t}\n\n\tisValidFormItemLayout(labelSpan: number, emptySpan: number) {\n\t\treturn emptySpan === 0 ? labelSpan <= MAX_FORM_ITEM_CELLS : labelSpan + emptySpan <= MAX_FORM_ITEM_CELLS - 1;\n\t}\n\n\tsetFastNavGroup() {\n\t\tif (this.hasGroupItems) {\n\t\t\tthis.removeAttribute(\"data-sap-ui-fastnavgroup\");\n\t\t} else {\n\t\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t}\n\t}\n\n\tsetGroupsColSpan() {\n\t\tif (!this.hasGroupItems) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst itemsCount = this.items.length;\n\t\tconst sortedItems = [...this.items].sort((itemA: IFormItem, itemB: IFormItem) => {\n\t\t\treturn (itemB as FormGroup)?.items.length - (itemA as FormGroup)?.items.length;\n\t\t});\n\n\t\tsortedItems.forEach((item: IFormItem, idx: number) => {\n\t\t\titem.colsXl = this.getGroupsColSpan(this.columnsXl, itemsCount, idx, item);\n\t\t\titem.colsL = this.getGroupsColSpan(this.columnsL, itemsCount, idx, item);\n\t\t\titem.colsM = this.getGroupsColSpan(this.columnsM, itemsCount, idx, item);\n\t\t\titem.colsS = this.getGroupsColSpan(this.columnsS, itemsCount, idx, item);\n\t\t});\n\t}\n\n\tgetGroupsColSpan(cols: number, groups: number, index: number, group: IFormItem): number {\n\t\t// Case 0: column span is set from outside.\n\t\tif (group.columnSpan) {\n\t\t\treturn group.columnSpan;\n\t\t}\n\n\t\t// CASE 1: The number of available columns match the number of groups, or only 1 column is available - each group takes 1 column.\n\t\t// For example: 1 column - 1 group, 2 columns - 2 groups, 3 columns - 3 groups, 4columns - 4 groups\n\t\tif (cols === 1 || cols <= groups) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// CASE 2: The number of available columns IS multiple of the number of groups.\n\t\t// For example: 2 column - 1 group, 3 columns - 1 groups, 4 columns - 1 group, 4 columns - 2 groups\n\t\tif (cols % groups === 0) {\n\t\t\treturn cols / groups;\n\t\t}\n\n\t\t// CASE 3: The number of available columns IS NOT multiple of the number of groups.\n\t\tconst MIN_COL_SPAN = 1;\n\t\tconst delta = cols - groups;\n\n\t\t// 7 cols & 4 groups => 2, 2, 2, 1\n\t\tif (delta <= groups) {\n\t\t\treturn index < delta ? MIN_COL_SPAN + 1 : MIN_COL_SPAN;\n\t\t}\n\n\t\t// 7 cols & 3 groups => 3, 2, 2\n\t\treturn index === 0 ? MIN_COL_SPAN + (delta - groups) + 1 : MIN_COL_SPAN + 1;\n\t}\n\n\tsetItemsState() {\n\t\tthis.items.forEach((item: IFormItem) => {\n\t\t\titem.itemSpacing = this.itemSpacing;\n\t\t\titem.accessibleMode = this.accessibleMode;\n\t\t});\n\t}\n\n\tget hasGroupItems(): boolean {\n\t\treturn this.items.some((item: IFormItem) => item.isGroup);\n\t}\n\n\tget hasHeader(): boolean {\n\t\treturn this.hasCustomHeader || this.hasHeaderText;\n\t}\n\n\tget hasHeaderText(): boolean {\n\t\treturn !!this.headerText;\n\t}\n\n\tget hasCustomHeader(): boolean {\n\t\treturn !!this.header.length;\n\t}\n\n\tget effectiveAccessibleName() {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\n\t\treturn this.hasHeader ? undefined : Form.i18nBundle.getText(FORM_ACCESSIBLE_NAME);\n\t}\n\n\tget effectiveАccessibleNameRef(): string | undefined {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.hasHeaderText && !this.hasCustomHeader ? `${this._id}-header-text` : undefined;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\treturn this.hasGroupItems ? \"region\" : \"form\";\n\t}\n\n\tget groupItemsInfo(): Array<GroupItemsInfo> {\n\t\treturn this.items.map((groupItem: IFormItem, index: number) => {\n\t\t\tconst items = this.getItemsInfo((Array.from(groupItem.children) as Array<IFormItem>));\n\t\t\tbreakpoints.forEach(breakpoint => {\n\t\t\t\tconst cols = ((groupItem[`cols${breakpoint}` as keyof IFormItem]) as number || 1);\n\t\t\t\tconst rows = Math.ceil(items.length / cols);\n\t\t\t\tconst total = cols * rows;\n\t\t\t\tconst lastRowColumns = (cols - (total - items.length) - 1); // all other indecies start from 0\n\t\t\t\tlet currentItem = 0;\n\n\t\t\t\tfor (let i = 0; i < total; i++) {\n\t\t\t\t\tconst column = Math.floor(i / rows);\n\t\t\t\t\tconst row = i % rows;\n\n\t\t\t\t\tif (row === rows - 1 && column > lastRowColumns) {\n\t\t\t\t\t\t// eslint-disable-next-line no-continue\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\titems[currentItem].item.style.setProperty(`--ui5-form-item-order-${breakpoint}`, `${column + row * cols}`);\n\t\t\t\t\tcurrentItem++;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst accessibleNameRef = (groupItem as FormGroup).effectiveAccessibleNameRef;\n\n\t\t\treturn {\n\t\t\t\tgroupItem,\n\t\t\t\taccessibleName: this.accessibleMode === \"Edit\" ? (groupItem as FormGroup).getEffectiveAccessibleName(index) : undefined,\n\t\t\t\taccessibleNameInner: this.accessibleMode === \"Edit\" ? undefined : (groupItem as FormGroup).getEffectiveAccessibleName(index),\n\t\t\t\taccessibleNameRef: this.accessibleMode === \"Edit\" ? accessibleNameRef : undefined,\n\t\t\t\taccessibleNameRefInner: this.accessibleMode === \"Edit\" ? undefined : accessibleNameRef,\n\t\t\t\titems: this.getItemsInfo((Array.from(groupItem.children) as Array<IFormItem>)),\n\t\t\t\trole: this.accessibleMode === \"Edit\" ? \"form\" : undefined,\n\t\t\t};\n\t\t});\n\t}\n\n\tget itemsInfo(): Array<ItemsInfo> {\n\t\treturn this.getItemsInfo();\n\t}\n\n\tgetItemsInfo(items?: Array<IFormItem>): Array<ItemsInfo> {\n\t\treturn (items || this.items).map((item: IFormItem) => {\n\t\t\treturn {\n\t\t\t\titem,\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\t// TODO: remove classes and classMap after deleting the hbs template\n\t\t\t\tclasses: item.columnSpan ? `ui5-form-item-span-${item.columnSpan}` : \"\",\n\t\t\t\tclassMap: {\n\t\t\t\t\t[`ui5-form-item-span-${item.columnSpan}`]: item.columnSpan !== undefined,\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\t}\n\n\tcreateAdditionalCSSStyleSheet() {\n\t\t[\n\t\t\t{ breakpoint: \"S\", columns: this.columnsS },\n\t\t\t{ breakpoint: \"M\", columns: this.columnsM },\n\t\t\t{ breakpoint: \"L\", columns: this.columnsL },\n\t\t\t{ breakpoint: \"XL\", columns: this.columnsXl },\n\t\t].forEach(step => {\n\t\t\tconst additionalStyle: string | undefined = this.getAdditionalCSS(step.breakpoint, step.columns);\n\n\t\t\tif (additionalStyle) {\n\t\t\t\tthis.shadowRoot!.adoptedStyleSheets = [...this.shadowRoot!.adoptedStyleSheets, this.getCSSStyleSheet(additionalStyle)];\n\t\t\t}\n\t\t});\n\t}\n\n\tgetAdditionalCSS(step: string, colsNumber: number): string | undefined {\n\t\tif (StepColumn[step as keyof typeof StepColumn] >= colsNumber) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst key = `${step}-${colsNumber}`;\n\n\t\tif (!additionalStylesMap.has(key)) {\n\t\t\tlet containerQuery;\n\t\t\tlet supporedColumnsNumber = StepColumn.S;\n\t\t\tlet stepSpanCSS = \"\";\n\t\t\tlet cols = colsNumber;\n\n\t\t\tif (step === \"S\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.S;\n\t\t\t\tcontainerQuery = `@container (max-width: 599px) {`;\n\t\t\t} else if (step === \"M\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.M;\n\t\t\t\tcontainerQuery = `@container (min-width: 600px) and (max-width: 1023px) {`;\n\t\t\t} else if (step === \"L\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.L;\n\t\t\t\tcontainerQuery = `@container (min-width: 1024px) and (max-width: 1439px) {`;\n\t\t\t} else if (step === \"XL\") {\n\t\t\t\tcontainerQuery = `@container (min-width: 1440px) {`;\n\t\t\t\tsupporedColumnsNumber = StepColumn.XL;\n\t\t\t}\n\n\t\t\twhile (cols > supporedColumnsNumber) {\n\t\t\t\tstepSpanCSS += `\n\t\t\t\t:host([columns-${step.toLocaleLowerCase()}=\"${cols}\"]) .ui5-form-layout {\n\t\t\t\t\tgrid-template-columns: repeat(${cols}, 1fr);\n\t\t\t\t}\n\n\t\t\t\t.ui5-form-column-span${step}-${cols},\n\t\t\t\t.ui5-form-item-span-${cols} {\n\t\t\t\t\tgrid-column: span ${cols};\n\t\t\t\t}\n\n\t\t\t\t.ui5-form-column-span${step}-${cols} .ui5-form-group-layout {\n\t\t\t\t\tgrid-template-columns: repeat(${cols}, 1fr);\n\t\t\t\t}\n\t\t\t\t`;\n\t\t\t\tcols--;\n\t\t\t}\n\n\t\t\tconst css = `${containerQuery}${stepSpanCSS}}`;\n\t\t\tadditionalStylesMap.set(key, css);\n\t\t}\n\n\t\treturn additionalStylesMap.get(key)!;\n\t}\n\n\tgetCSSStyleSheet(cssText: string): CSSStyleSheet {\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(cssText);\n\t\treturn style;\n\t}\n}\n\nForm.define();\n\nexport default Form;\nexport type {\n\tIFormItem,\n};\n"]}
1
+ {"version":3,"file":"Form.js","sourceRoot":"","sources":["../src/Form.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAG/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAE1G,QAAQ;AACR,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGrF,WAAW;AACX,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAOrD,OAAO,EAAE,oBAAoB,E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aultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type { AriaRole } from \"@ui5/webcomponents-base\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\n// Utils\nimport { getFormItemLayoutValue, getGroupsColSpan } from \"./form-utils/FormUtils.js\";\nimport type { Breakpoint } from \"./form-utils/FormUtils.js\";\n\n// Template\nimport FormTemplate from \"./FormTemplate.js\";\n\n// Styles\nimport FormCss from \"./generated/themes/Form.css.js\";\n\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type FormAccessibleMode from \"./types/FormAccessibleMode.js\";\nimport type FormGroup from \"./FormGroup.js\";\nimport type TitleLevel from \"./types/TitleLevel.js\";\n\nimport { FORM_ACCESSIBLE_NAME } from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * Interface for components that can be slotted inside `ui5-form` as items.\n * @public\n * @since 2.0.0\n */\ninterface IFormItem extends UI5Element {\n\titemSpacing: `${FormItemSpacing}`;\n\treadonly isGroup: boolean;\n\tcolsXl?: number;\n\tcolsL?: number;\n\tcolsM?: number;\n\tcolsS?: number;\n\tcolSpan?: string;\n\tcolumnSpan?: number;\n\theaderText?: string;\n\theaderLevel?: `${TitleLevel}`;\n\taccessibleMode?: `${FormAccessibleMode}`;\n}\n\ntype GroupItemsInfo = {\n\tgroupItem: IFormItem,\n\titems: Array<ItemsInfo>,\n\taccessibleName: string | undefined,\n\taccessibleNameInner: string | undefined,\n\taccessibleNameRef: string | undefined,\n\taccessibleNameRefInner: string | undefined,\n\trole: AriaRole | undefined,\n}\n\ntype ItemsInfo = {\n\titem: IFormItem,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The Form is a layout component that arranges labels and form fields (like input fields) pairs\n * into a specific number of columns.\n *\n * **Note:** The Form web component is a layout component, it isn't a replacement for the native `form` HTML element.\n * The Form web component does not provide any APIs for form submission.\n *\n * ### Structure\n *\n * - **Form** (`ui5-form`) is the top-level container component, responsible for the content layout and responsiveness.\n * - **FormGroup** (`ui5-form-group`) enables the grouping of the Form content.\n * - **FormItem** (`ui5-form-item`) is a pair of label and form fields and can be used directly in a Form, or as part of a FormGroup.\n *\n * The simplest Form (`ui5-form`) consists of a header area on top,\n * displaying a header text (see the `headingText` property) and content below - an arbitrary number of FormItems (ui5-form-item),\n * representing the pairs of label and form fields.\n *\n * And, there is also \"grouping\" available to assist the implementation of richer UIs.\n * This is enabled by the FormGroup (`ui5-form-group`) component.\n * In this case, the Form is structured into FormGroups and each FormGroup consists of FormItems.\n *\n * ### Responsiveness\n *\n * The Form component reacts and changes its layout on predefined breakpoints.\n * Depending on its size, the Form content (FormGroups and FormItems) gets divided into one or more columns as follows:\n * - **S** (0 - 599px) – 1 column is recommended (default: 1)\n * - **M** (600px - 1023px) – up to 2 columns are recommended (default: 1)\n * - **L** (1024px - 1439px) - up to 3 columns are recommended (default: 2)\n * - **XL** (>= 1440px) – up to 6 columns are recommended (default: 3)\n *\n * To change the layout, use the `layout` property - f.e. layout=\"S1 M2 L3 XL6\".\n *\n * ### Groups\n *\n * To make better use of screen space, there is built-in logic to determine how many columns should a FormGroup occupy.\n *\n * - **Example #1** (perfect match):\n * 4 columns and 4 groups: each group will use 1 column.\n *\n * - **Example #2** (balanced distribution):\n * 4 columns and 2 groups: each group will use 2 columns.\n * 6 columns and 2 groups: each group will use 3 columns.\n *\n * - **Example #3** (unbalanced distribution):\n * 3 columns and 2 groups: the larger one will use 2 columns, the smaller 1 column.\n * 5 columns and 3 groups: two of the groups will use 2 columns each, the smallest 1 column.\n *\n * **Note:** The size of a group element is determined by the number of FormItems assigned to it.\n * In the case of equality, the first in the DOM will use more columns, and the last - fewer columns.\n *\n * - **Example #4** (more groups than columns):\n * 3 columns and 4 groups: each FormGroup uses only 1 column, the last FormGroup will wrap on the second row.\n *\n * ### Groups Column Span\n *\n * To influence the built-in group distribution, described in the previous section,\n * you can use the FormGroup's `columnSpan` property, that defines how many columns the group should expand to.\n *\n * ### Items Column Span\n *\n * FormItem's columnSpan property defines how many columns the form item should expand to inside a form group or the form.\n *\n * ### Items Label Span\n *\n * The placement of the labels depends on the size of the used column.\n * If there is enough space, the labels are next to their associated fields, otherwise - above the fields.\n * By default, the labels take 4/12 of the FormItem, leaving 8/12 parts to associated fields.\n * You can control what space the labels should take via the `labelSpan` property.\n *\n * **For example:** To always place the labels on top set: `labelSpan=\"S12 M12 L12 XL12\"` property.\n *\n * ### Items Empty Span\n *\n * By default, a form item spans 12 cells, fully divided between its label and field, with no empty space at the end:\n * - **Label:** occupies 4 cells.\n * - **Field:** occupies 8 cells.\n *\n * The `emptySpan` property provides additional layout flexibility by defining empty space at the form item’s end.\n *\n * **For example:** Setting \"S0 M0 L3 XL3\" (or just \"L3 XL3\") adjusts the layout as follows:\n * - **Label:** remains 4 cells.\n * - **Field:** is reduced to 5 cells.\n * - **Empty space:** 3 cells are added at the end.\n *\n * Greater values increase the empty space at the end of the form item, reducing the space available for the label and its field.\n * However, setting `emptySpan` to 1 cell is recommended and typically sufficient to achieve a balanced layout.\n *\n * ### Navigation flow\n *\n * Items are grouped into `ui5-form-group` elements, allowing the following navigation:\n *\n * - **Single-Column Group**: Focus moves vertically down from one item to the next.\n * ```\n * | 1 |\n * | 2 |\n * | 3 |\n * ```\n *\n * - **Multi-Column Group**: Focus moves horizontally within each row, advancing to the next row after completing the current one.\n * ```\n * | 1 | 4 |\n * | 2 | 5 |\n * | 3 | 6 |\n * ```\n *\n * ### Keyboard Handling\n *\n * - [Tab] - Moves the focus to the next interactive element within the Form/FormGroup (if available) or to the next element in the tab chain outside the Form\n * - [Shift] + [Tab] - Moves the focus to the previous interactive element within the Form/FormGroup (if available) or to the previous element in the tab chain outside the Form\n * - [F6] - Moves the focus to the first interactive element of the next FormGroup (if available) or to the next element in the tab chain outside the Form\n * - [Shift] + [F6] - Moves the focus to the first interactive element of the previous FormGroup (if available) or to the previous element in the tab chain outside the Form\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/Form.js\";\n * - import @ui5/webcomponents/dist/FormGroup.js\";\n * - import @ui5/webcomponents/dist/FormItem.js\";\n *\n * @csspart header - Used to style the wrapper of the header.\n * @csspart layout - Used to style the element defining the form column layout.\n * @csspart column - Used to style a single column of the form column layout.\n *\n * @public\n * @since 2.0.0\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form\",\n\trenderer: jsxRenderer,\n\tstyles: FormCss,\n\ttemplate: FormTemplate,\n})\nclass Form extends UI5Element {\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.10.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines id (or many ids) of the element (or elements) that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.16.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the accessibility mode of the component in \"edit\" and \"display\" use-cases.\n\t *\n\t * Based on the mode, the component renders different HTML elements and ARIA attributes,\n\t * which are appropriate for the use-case.\n\t *\n\t * **Usage:**\n\t * - Set this property to \"Display\", when the form consists of non-editable (e.g. texts) form items.\n\t * - Set this property to \"Edit\", when the form consists of editable (e.g. input fields) form items.\n\t *\n\t * @default \"Display\"\n\t * @since 2.16.0\n\t * @public\n\t */\n\t@property()\n\taccessibleMode: `${FormAccessibleMode}` = \"Display\";\n\n\t/**\n\t * Defines the number of columns to distribute the form content by breakpoint.\n\t *\n\t * Supported values:\n\t * - `S` - 1 column by default (1 column is recommended)\n\t * - `M` - 1 column by default (up to 2 columns are recommended)\n\t * - `L` - 2 columns by default (up to 3 columns are recommended)\n\t * - `XL` - 3 columns by default (up to 6 columns are recommended)\n\t *\n\t * @default \"S1 M1 L2 XL3\"\n\t * @public\n\t */\n\t@property()\n\tlayout = \"S1 M1 L2 XL3\"\n\n\t/**\n\t * Defines the width proportion of the labels and fields of a form item by breakpoint.\n\t *\n\t * By default, the labels take 4/12 (or 1/3) of the form item in M,L and XL sizes,\n\t * and 12/12 in S size, e.g in S the label is on top of its associated field.\n\t *\n\t * The supported values are between 1 and 12. Greater the number, more space the label will use.\n\t *\n\t * **Note:** If \"12\" is set, the label will be displayed on top of its assosiated field.\n\t *\n\t * @default \"S12 M4 L4 XL4\"\n\t * @public\n\t */\n\t@property()\n\tlabelSpan = \"S12 M4 L4 XL4\";\n\n\t/**\n\t * Defines the number of cells that are empty at the end of each form item, configurable by breakpoint.\n\t *\n\t * By default, a form item spans 12 cells, fully divided between its label (4 cells) and field (8 cells), with no empty space at the end.\n\t * The `emptySpan` provides additional layout flexibility by defining empty space at the form item’s end.\n\t *\n\t * **Note:**\n\t * - The maximum allowable empty space is 10 cells. At least 1 cell each must remain for the label and the field.\n\t * - When `emptySpan` is specified (greater than 0), ensure that the combined value of `emptySpan` and `labelSpan` does not exceed 11. This guarantees a minimum of 1 cell for the field.\n\t *\n\t * @default \"S0 M0 L0 XL0\"\n\t * @since 2.5.0\n\t * @public\n\t */\n\t@property()\n\temptySpan = \"S0 M0 L0 XL0\";\n\n\t/**\n\t * Defines the header text of the component.\n\t *\n\t * **Note:** The property gets overridden by the `header` slot.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the compoennt heading level,\n\t * set by the `headerText`.\n\t * @default \"H2\"\n\t * @since 2.10.0\n\t * @public\n\t*/\n\t@property()\n\theaderLevel: `${TitleLevel}` = \"H2\";\n\n\t/**\n\t * Defines the vertical spacing between form items.\n\t *\n\t * **Note:** If the Form is meant to be switched between \"display\"(\"non-edit\") and \"edit\" modes,\n\t * we recommend using \"Large\" item spacing in \"display\"(\"non-edit\") mode, and \"Normal\" - for \"edit\" mode,\n\t * to avoid \"jumping\" effect, caused by the hight difference between texts in \"display\"(\"non-edit\") mode and the input fields in \"edit\" mode.\n\t *\n\t * @default \"Normal\"\n\t * @public\n\t */\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\";\n\n\t/**\n\t * Defines the component header area.\n\t *\n\t * **Note:** When a `header` is provided, the `headerText` property is ignored.\n\t * @public\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the component content - FormGroups or FormItems.\n\t *\n\t * **Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\n\t * Either use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\n\t *\n\t * **Note:** As of version 2.23.0 the support for standalone FormItems (not belonging to a group) is deprecated.\n\t * We recommend using FormGroups, as they provide better accessibility and layout options.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: true,\n\t})\n\titems!: DefaultSlot<IFormItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\tcolumnsS = 1;\n\t@property({ type: Number, noAttribute: true })\n\tlabelSpanS = 12\n\t@property({ type: Number, noAttribute: true })\n\temptySpanS = 0\n\n\t@property({ type: Number, noAttribute: true })\n\tcolumnsM = 1;\n\t@property({ type: Number, noAttribute: true })\n\tlabelSpanM = 4;\n\t@property({ type: Number, noAttribute: true })\n\temptySpanM = 0\n\n\t@property({ type: Number, noAttribute: true })\n\tcolumnsL = 2;\n\t@property({ type: Number, noAttribute: true })\n\tlabelSpanL = 4;\n\t@property({ type: Number, noAttribute: true })\n\temptySpanL = 0\n\n\t@property({ type: Number, noAttribute: true })\n\tcolumnsXl = 3;\n\t@property({ type: Number, noAttribute: true })\n\tlabelSpanXl = 4;\n\t@property({ type: Number, noAttribute: true })\n\temptySpanXl = 0;\n\n\tonBeforeRendering() {\n\t\t// Parse the layout and set it to the FormGroups/FormItems.\n\t\tthis.parseLayoutConfiguration();\n\n\t\t// Define how many columns a group should take.\n\t\tthis.setGroupsColSpan();\n\n\t\t// Set item spacing\n\t\tthis.setItemsState();\n\t}\n\n\tonAfterRendering() {\n\t\tthis.setFastNavGroup();\n\t}\n\n\tparseLayoutConfiguration() {\n\t\tthis.layout.split(\" \").forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.columnsS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.columnsM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.columnsL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.columnsXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\n\t\tthis.labelSpan.split(\" \").forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.labelSpanS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.labelSpanM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.labelSpanL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.labelSpanXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\n\t\tthis.emptySpan.split(\" \").forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.emptySpanS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.emptySpanM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.emptySpanL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.emptySpanXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\t}\n\n\tgetFormItemLayout(breakpoint: Breakpoint) {\n\t\tlet labelSpan,\n\t\t\temptySpan;\n\n\t\tif (breakpoint === \"S\") {\n\t\t\tlabelSpan = this.labelSpanS;\n\t\t\temptySpan = this.emptySpanS;\n\t\t} else if (breakpoint === \"M\") {\n\t\t\tlabelSpan = this.labelSpanM;\n\t\t\temptySpan = this.emptySpanM;\n\t\t} else if (breakpoint === \"L\") {\n\t\t\tlabelSpan = this.labelSpanL;\n\t\t\temptySpan = this.emptySpanL;\n\t\t} else if (breakpoint === \"XL\") {\n\t\t\tlabelSpan = this.labelSpanXl;\n\t\t\temptySpan = this.emptySpanXl;\n\t\t}\n\n\t\treturn getFormItemLayoutValue(breakpoint, labelSpan, emptySpan);\n\t}\n\n\tsetFastNavGroup() {\n\t\tif (this.hasGroupItems) {\n\t\t\tthis.removeAttribute(\"data-sap-ui-fastnavgroup\");\n\t\t} else {\n\t\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t}\n\t}\n\n\tsetGroupsColSpan() {\n\t\tif (!this.hasGroupItems) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst itemsCount = this.items.length;\n\t\tconst sortedItems = [...this.items].sort((itemA: IFormItem, itemB: IFormItem) => {\n\t\t\treturn (itemB as FormGroup)?.items.length - (itemA as FormGroup)?.items.length;\n\t\t});\n\n\t\tsortedItems.forEach((item: IFormItem, idx: number) => {\n\t\t\titem.colsXl = getGroupsColSpan(this.columnsXl, itemsCount, idx, item, \"XL\");\n\t\t\titem.colsL = getGroupsColSpan(this.columnsL, itemsCount, idx, item, \"L\");\n\t\t\titem.colsM = getGroupsColSpan(this.columnsM, itemsCount, idx, item, \"M\");\n\t\t\titem.colsS = getGroupsColSpan(this.columnsS, itemsCount, idx, item, \"S\");\n\t\t});\n\t}\n\n\tsetItemsState() {\n\t\tthis.items.forEach((item: IFormItem) => {\n\t\t\titem.itemSpacing = this.itemSpacing;\n\t\t\titem.accessibleMode = this.accessibleMode;\n\t\t});\n\t}\n\n\tget hasGroupItems(): boolean {\n\t\treturn this.items.some((item: IFormItem) => item.isGroup);\n\t}\n\n\tget hasHeader(): boolean {\n\t\treturn this.hasCustomHeader || this.hasHeaderText;\n\t}\n\n\tget hasHeaderText(): boolean {\n\t\treturn !!this.headerText;\n\t}\n\n\tget hasCustomHeader(): boolean {\n\t\treturn !!this.header.length;\n\t}\n\n\tget effectiveAccessibleName() {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\n\t\treturn this.hasHeader ? undefined : Form.i18nBundle.getText(FORM_ACCESSIBLE_NAME);\n\t}\n\n\tget effectiveАccessibleNameRef(): string | undefined {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.hasHeaderText && !this.hasCustomHeader ? `${this._id}-header-text` : undefined;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\treturn this.hasGroupItems ? \"region\" : \"form\";\n\t}\n\n\tget groupItemsInfo(): Array<GroupItemsInfo> {\n\t\treturn this.items.map((groupItem: IFormItem, index: number) => {\n\t\t\tconst accessibleNameRef = (groupItem as FormGroup).effectiveAccessibleNameRef;\n\n\t\t\treturn {\n\t\t\t\tgroupItem,\n\t\t\t\taccessibleName: this.accessibleMode === \"Edit\" ? (groupItem as FormGroup).getEffectiveAccessibleName(index) : undefined,\n\t\t\t\taccessibleNameInner: this.accessibleMode === \"Edit\" ? undefined : (groupItem as FormGroup).getEffectiveAccessibleName(index),\n\t\t\t\taccessibleNameRef: this.accessibleMode === \"Edit\" ? accessibleNameRef : undefined,\n\t\t\t\taccessibleNameRefInner: this.accessibleMode === \"Edit\" ? undefined : accessibleNameRef,\n\t\t\t\titems: this.getItemsInfo((Array.from(groupItem.children) as Array<IFormItem>)),\n\t\t\t\trole: this.accessibleMode === \"Edit\" ? \"form\" : undefined,\n\t\t\t};\n\t\t});\n\t}\n\n\tget itemsInfo(): Array<ItemsInfo> {\n\t\treturn this.getItemsInfo();\n\t}\n\n\tgetItemsInfo(items?: Array<IFormItem>): Array<ItemsInfo> {\n\t\treturn (items || this.items).map((item: IFormItem) => {\n\t\t\treturn {\n\t\t\t\titem,\n\t\t\t};\n\t\t});\n\t}\n}\n\nForm.define();\n\nexport default Form;\nexport type {\n\tIFormItem,\n};\n"]}
@@ -51,10 +51,21 @@ declare class FormGroup extends UI5Element implements IFormItem {
51
51
  * Defines column span of the component,
52
52
  * e.g how many columns the group should span to.
53
53
  *
54
+ * **Note:** If this property is set, it has higher priority than `colSpan` and `colSpan` will be ignored.
55
+ *
54
56
  * @default undefined
55
57
  * @public
56
58
  */
57
59
  columnSpan?: number;
60
+ /**
61
+ * Defines the number of columns to distribute the form content by breakpoint (S1 M2 L3 XL4 for example).
62
+ *
63
+ * **Note:** This property is ignored if `columnSpan` is set, as it is expected that the column span is defined.
64
+ *
65
+ * @default undefined
66
+ * @public
67
+ */
68
+ colSpan?: string;
58
69
  /**
59
70
  * Defines the accessible ARIA name of the component.
60
71
  * @default undefined
package/dist/FormGroup.js CHANGED
@@ -94,6 +94,9 @@ __decorate([
94
94
  __decorate([
95
95
  property({ type: Number })
96
96
  ], FormGroup.prototype, "columnSpan", void 0);
97
+ __decorate([
98
+ property()
99
+ ], FormGroup.prototype, "colSpan", void 0);
97
100
  __decorate([
98
101
  property()
99
102
  ], FormGroup.prototype, "accessibleName", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"FormGroup.js","sourceRoot":"","sources":["../src/FormGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UA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CAAC,cAAc,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACnD,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,CAAC;IAED,IAAI,OAAO;QACV,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AAvGA;IADC,QAAQ,EAAE;6CACS;AAUpB;IADC,QAAQ,EAAE;8CACyB;AAUpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACP;AASpB;IADC,QAAQ,EAAE;iDACa;AASxB;IADC,QAAQ,EAAE;oDACgB;AAU3B;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;KACf,CAAC;wCAC4B;AAM9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAChB;AAGX;IADC,QAAQ,EAAE;8CACkC;AAGtC;IADN,IAAI,CAAC,oBAAoB,CAAC;mCACG;AA7EzB,SAAS;IAJd,aAAa,CAAC;QACd,GAAG,EAAE,gBAAgB;QACrB,cAAc,EAAE,IAAI;KACpB,CAAC;GACI,SAAS,CA+Gd;AAED,SAAS,CAAC,MAAM,EAAE,CAAC;AAEnB,eAAe,SAAS,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\nimport type FormItem from \"./FormItem.js\";\nimport type { IFormItem } from \"./Form.js\";\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type TitleLevel from \"./types/TitleLevel.js\";\n\nimport { FORM_GROUP_ACCESSIBLE_NAME } from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The FormGroup (ui5-form-group) represents a group inside the Form (ui5-form) component\n * and it consists of FormItem (ui5-form-item) components.\n *\n * The layout of the FormGroup is mostly defined and controlled by the overarching Form (ui5-form) component.\n * Still, one can influence the layout via the FormGroup's `columnSpan` property,\n * that defines how many columns the group should expand to.\n *\n * ### Usage\n *\n * Тhe FormGroup (ui5-form-group) allows to split a Form into groups,\n * e.g to group FormItems that logically belong together.\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/FormGroup.js\";\n *\n * @public\n * @implements {IFormItem}\n * @since 2.0.0\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form-group\",\n\tfastNavigation: true,\n})\nclass FormGroup extends UI5Element implements IFormItem {\n\t/**\n\t * Defines header text of the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the compoennt heading level,\n\t * set by the `headerText`.\n\t * @default \"H3\"\n\t * @public\n\t * @since 2.10.0\n\t*/\n\t@property()\n\theaderLevel: `${TitleLevel}` = \"H3\";\n\n\t/**\n\t * Defines column span of the component,\n\t * e.g how many columns the group should span to.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tcolumnSpan?: number;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.16.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines id (or many ids) of the element (or elements) that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.16.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the items of the component.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\titems!: DefaultSlot<FormItem>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tcolsS = 1;\n\n\t@property({ type: Number })\n\tcolsM = 1;\n\n\t@property({ type: Number })\n\tcolsL = 1;\n\n\t@property({ type: Number })\n\tcolsXl = 1;\n\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\";\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonBeforeRendering() {\n\t\tthis.processFormItems();\n\t}\n\n\tprocessFormItems() {\n\t\tthis.items.forEach((item: FormItem) => {\n\t\t\titem.itemSpacing = this.itemSpacing;\n\t\t});\n\t}\n\n\tgetEffectiveAccessibleName(index: number) {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\n\t\tif (this.headerText) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn FormGroup.i18nBundle.getText(FORM_GROUP_ACCESSIBLE_NAME, index + 1);\n\t}\n\n\tget effectiveAccessibleNameRef() {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.headerText ? `${this._id}-group-header-text` : undefined;\n\t}\n\n\tget isGroup() {\n\t\treturn true;\n\t}\n}\n\nFormGroup.define();\n\nexport default FormGroup;\n"]}
1
+ {"version":3,"file":"FormGroup.js","sourceRoot":"","sources":["../src/FormGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU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AC,cAAc,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACnD,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,CAAC;IAED,IAAI,OAAO;QACV,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AApHA;IADC,QAAQ,EAAE;6CACS;AAUpB;IADC,QAAQ,EAAE;8CACyB;AAYpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACP;AAWpB;IADC,QAAQ,EAAE;0CACM;AASjB;IADC,QAAQ,EAAE;iDACa;AASxB;IADC,QAAQ,EAAE;oDACgB;AAU3B;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;KACf,CAAC;wCAC4B;AAM9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAChB;AAGX;IADC,QAAQ,EAAE;8CACkC;AAGtC;IADN,IAAI,CAAC,oBAAoB,CAAC;mCACG;AA1FzB,SAAS;IAJd,aAAa,CAAC;QACd,GAAG,EAAE,gBAAgB;QACrB,cAAc,EAAE,IAAI;KACpB,CAAC;GACI,SAAS,CA4Hd;AAED,SAAS,CAAC,MAAM,EAAE,CAAC;AAEnB,eAAe,SAAS,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\nimport type FormItem from \"./FormItem.js\";\nimport type { IFormItem } from \"./Form.js\";\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type TitleLevel from \"./types/TitleLevel.js\";\n\nimport { FORM_GROUP_ACCESSIBLE_NAME } from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The FormGroup (ui5-form-group) represents a group inside the Form (ui5-form) component\n * and it consists of FormItem (ui5-form-item) components.\n *\n * The layout of the FormGroup is mostly defined and controlled by the overarching Form (ui5-form) component.\n * Still, one can influence the layout via the FormGroup's `columnSpan` property,\n * that defines how many columns the group should expand to.\n *\n * ### Usage\n *\n * Тhe FormGroup (ui5-form-group) allows to split a Form into groups,\n * e.g to group FormItems that logically belong together.\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/FormGroup.js\";\n *\n * @public\n * @implements {IFormItem}\n * @since 2.0.0\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form-group\",\n\tfastNavigation: true,\n})\nclass FormGroup extends UI5Element implements IFormItem {\n\t/**\n\t * Defines header text of the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the compoennt heading level,\n\t * set by the `headerText`.\n\t * @default \"H3\"\n\t * @public\n\t * @since 2.10.0\n\t*/\n\t@property()\n\theaderLevel: `${TitleLevel}` = \"H3\";\n\n\t/**\n\t * Defines column span of the component,\n\t * e.g how many columns the group should span to.\n\t *\n\t * **Note:** If this property is set, it has higher priority than `colSpan` and `colSpan` will be ignored.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tcolumnSpan?: number;\n\n\t/**\n\t * Defines the number of columns to distribute the form content by breakpoint (S1 M2 L3 XL4 for example).\n\t *\n\t * **Note:** This property is ignored if `columnSpan` is set, as it is expected that the column span is defined.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tcolSpan?: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.16.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines id (or many ids) of the element (or elements) that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.16.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the items of the component.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\titems!: DefaultSlot<FormItem>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tcolsS = 1;\n\n\t@property({ type: Number })\n\tcolsM = 1;\n\n\t@property({ type: Number })\n\tcolsL = 1;\n\n\t@property({ type: Number })\n\tcolsXl = 1;\n\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\";\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonBeforeRendering() {\n\t\tthis.processFormItems();\n\t}\n\n\tprocessFormItems() {\n\t\tthis.items.forEach((item: FormItem) => {\n\t\t\titem.itemSpacing = this.itemSpacing;\n\t\t});\n\t}\n\n\tgetEffectiveAccessibleName(index: number) {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\n\t\tif (this.headerText) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn FormGroup.i18nBundle.getText(FORM_GROUP_ACCESSIBLE_NAME, index + 1);\n\t}\n\n\tget effectiveAccessibleNameRef() {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.headerText ? `${this._id}-group-header-text` : undefined;\n\t}\n\n\tget isGroup() {\n\t\treturn true;\n\t}\n}\n\nFormGroup.define();\n\nexport default FormGroup;\n"]}
@@ -38,6 +38,8 @@ declare class FormItem extends UI5Element implements IFormItem {
38
38
  * or the Form. The available columns can be affected by the FormGroup#columnSpan and/or the Form#layout.
39
39
  * A number bigger than the available columns won't take effect.
40
40
  *
41
+ * @deprecated As of version 2.23.0, this property is deprecated.
42
+ * **Note:** This property will not have any effect on the layout of the form item
41
43
  * @default undefined
42
44
  * @public
43
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FormItem.js","sourceRoot":"","sources":["../src/FormItem.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAE1E,WAAW;AACX,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAkCC;;WAEG;QAEH,gBAAW,GAAyB,QAAQ,CAAA;QAE5C;;WAEG;QAEH,mBAAc,GAA4B,SAAS,CAAC;IAKrD,CAAC;IAHA,IAAI,OAAO;QACV,OAAO,KAAK,CAAC;IACd,CAAC;CACD,CAAA;AApCA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACP;AAOpB;IADC,IAAI,EAAE;8CAC0B;AAYjC;IALC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;KACrB,CAAC;yCACiC;AAMnC;IADC,QAAQ,EAAE;6CACiC;AAM5C;IADC,QAAQ,EAAE;gDACyC;AA5C/C,QAAQ;IANb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;KAC1B,CAAC;GACI,QAAQ,CAiDb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n\n// Template\nimport FormItemTemplate from \"./FormItemTemplate.js\";\n\n// Styles\nimport FormItemCss from \"./generated/themes/FormItem.css.js\";\n\nimport type { IFormItem } from \"./Form.js\";\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type FormAccessibleMode from \"./types/FormAccessibleMode.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The FormItem (ui5-form-item) represents pair of a label and\n * one or more components (text or text fields), associated to it.\n *\n * ### Usage\n *\n * The FormItem is being used in FormGroup (ui5-form-group) or directly in Form (ui5-form).\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/FormItem.js\";\n *\n * @csspart layout - Used to style the parent element of the label and content parts.\n * @csspart label - Used to style the label part of the form item.\n * @csspart content - Used to style the content part of the form item.\n *\n * @constructor\n * @implements {IFormItem}\n * @public\n * @since 2.0.0\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form-item\",\n\trenderer: jsxRenderer,\n\tstyles: FormItemCss,\n\ttemplate: FormItemTemplate,\n})\nclass FormItem extends UI5Element implements IFormItem {\n\t/**\n\t * Defines the column span of the component,\n\t * e.g how many columns the component should span to.\n\t *\n\t * **Note:** The column span should be a number between 1 and the available columns of the FormGroup (when items are placed in a group)\n\t * or the Form. The available columns can be affected by the FormGroup#columnSpan and/or the Form#layout.\n\t * A number bigger than the available columns won't take effect.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tcolumnSpan?: number;\n\n\t/**\n\t * Defines the label of the component.\n\t * @public\n\t */\n\t@slot()\n\tlabelContent!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the content of the component,\n\t * associated to `labelContent`.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t})\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\"\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\taccessibleMode: `${FormAccessibleMode}` = \"Display\";\n\n\tget isGroup() {\n\t\treturn false;\n\t}\n}\n\nFormItem.define();\n\nexport default FormItem;\n"]}
1
+ {"version":3,"file":"FormItem.js","sourceRoot":"","sources":["../src/FormItem.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAE1E,WAAW;AACX,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAoCC;;WAEG;QAEH,gBAAW,GAAyB,QAAQ,CAAA;QAE5C;;WAEG;QAEH,mBAAc,GAA4B,SAAS,CAAC;IAKrD,CAAC;IAHA,IAAI,OAAO;QACV,OAAO,KAAK,CAAC;IACd,CAAC;CACD,CAAA;AApCA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACP;AAOpB;IADC,IAAI,EAAE;8CAC0B;AAYjC;IALC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;KACrB,CAAC;yCACiC;AAMnC;IADC,QAAQ,EAAE;6CACiC;AAM5C;IADC,QAAQ,EAAE;gDACyC;AA9C/C,QAAQ;IANb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;KAC1B,CAAC;GACI,QAAQ,CAmDb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n\n// Template\nimport FormItemTemplate from \"./FormItemTemplate.js\";\n\n// Styles\nimport FormItemCss from \"./generated/themes/FormItem.css.js\";\n\nimport type { IFormItem } from \"./Form.js\";\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type FormAccessibleMode from \"./types/FormAccessibleMode.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The FormItem (ui5-form-item) represents pair of a label and\n * one or more components (text or text fields), associated to it.\n *\n * ### Usage\n *\n * The FormItem is being used in FormGroup (ui5-form-group) or directly in Form (ui5-form).\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/FormItem.js\";\n *\n * @csspart layout - Used to style the parent element of the label and content parts.\n * @csspart label - Used to style the label part of the form item.\n * @csspart content - Used to style the content part of the form item.\n *\n * @constructor\n * @implements {IFormItem}\n * @public\n * @since 2.0.0\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form-item\",\n\trenderer: jsxRenderer,\n\tstyles: FormItemCss,\n\ttemplate: FormItemTemplate,\n})\nclass FormItem extends UI5Element implements IFormItem {\n\t/**\n\t * Defines the column span of the component,\n\t * e.g how many columns the component should span to.\n\t *\n\t * **Note:** The column span should be a number between 1 and the available columns of the FormGroup (when items are placed in a group)\n\t * or the Form. The available columns can be affected by the FormGroup#columnSpan and/or the Form#layout.\n\t * A number bigger than the available columns won't take effect.\n\t *\n\t * @deprecated As of version 2.23.0, this property is deprecated.\n\t * **Note:** This property will not have any effect on the layout of the form item\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tcolumnSpan?: number;\n\n\t/**\n\t * Defines the label of the component.\n\t * @public\n\t */\n\t@slot()\n\tlabelContent!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the content of the component,\n\t * associated to `labelContent`.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t})\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\"\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\taccessibleMode: `${FormAccessibleMode}` = \"Display\";\n\n\tget isGroup() {\n\t\treturn false;\n\t}\n}\n\nFormItem.define();\n\nexport default FormItem;\n"]}