@infineon/infineon-design-system-stencil 30.8.0 → 30.8.1--canary.1587.fd2b9aba1b7855044b70d3973173cccccd328d65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  2. package/dist/cjs/ifx-basic-table.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-table.cjs.entry.js +68 -60
  4. package/dist/cjs/ifx-table.cjs.entry.js.map +1 -1
  5. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/table-advanced-version/buttonCellRenderer.js +46 -55
  8. package/dist/collection/components/table-advanced-version/buttonCellRenderer.js.map +1 -1
  9. package/dist/collection/components/table-advanced-version/interfaces.js +1 -1
  10. package/dist/collection/components/table-advanced-version/interfaces.js.map +1 -1
  11. package/dist/collection/components/table-advanced-version/table.css +10 -0
  12. package/dist/collection/components/table-advanced-version/table.js +46 -3
  13. package/dist/collection/components/table-advanced-version/table.js.map +1 -1
  14. package/dist/collection/components/table-advanced-version/table.stories.js +90 -123
  15. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  16. package/dist/collection/components/table-basic-version/table.css +10 -0
  17. package/dist/components/ifx-basic-table.js +1 -1
  18. package/dist/components/ifx-basic-table.js.map +1 -1
  19. package/dist/components/ifx-table.js +72 -61
  20. package/dist/components/ifx-table.js.map +1 -1
  21. package/dist/esm/ifx-basic-table.entry.js +1 -1
  22. package/dist/esm/ifx-basic-table.entry.js.map +1 -1
  23. package/dist/esm/ifx-table.entry.js +68 -60
  24. package/dist/esm/ifx-table.entry.js.map +1 -1
  25. package/dist/esm/infineon-design-system-stencil.js +1 -1
  26. package/dist/esm/loader.js +1 -1
  27. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  28. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  29. package/dist/infineon-design-system-stencil/{p-6c739e13.entry.js → p-366148e2.entry.js} +2 -2
  30. package/dist/infineon-design-system-stencil/p-366148e2.entry.js.map +1 -0
  31. package/dist/infineon-design-system-stencil/p-b196748d.entry.js +2 -0
  32. package/dist/infineon-design-system-stencil/p-b196748d.entry.js.map +1 -0
  33. package/dist/types/components/table-advanced-version/buttonCellRenderer.d.ts +8 -7
  34. package/dist/types/components/table-advanced-version/interfaces.d.ts +6 -1
  35. package/dist/types/components/table-advanced-version/table.d.ts +4 -0
  36. package/dist/types/components/table-advanced-version/table.stories.d.ts +13 -0
  37. package/dist/types/components.d.ts +2 -0
  38. package/package.json +1 -1
  39. package/dist/infineon-design-system-stencil/p-210f9ccc.entry.js +0 -2
  40. package/dist/infineon-design-system-stencil/p-210f9ccc.entry.js.map +0 -1
  41. package/dist/infineon-design-system-stencil/p-6c739e13.entry.js.map +0 -1
@@ -1,4 +1,3 @@
1
- //default
2
1
  const columnDefs = [
3
2
  { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },
4
3
  { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },
@@ -18,66 +17,59 @@ const rowData = [
18
17
  { make: 'Audi', model: '3', price: 72000 },
19
18
  { make: 'Landrover', model: 'x', price: 72000 },
20
19
  ];
21
- //table with button col
22
20
  const columnDefsWithButtonCol = [
23
21
  { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },
24
22
  { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },
25
23
  { headerName: 'Price', field: 'price' },
26
24
  { headerName: 'Age', field: 'age' },
27
- { headerName: '', field: 'button' }
25
+ {
26
+ headerName: '',
27
+ field: 'button',
28
+ }
28
29
  ];
29
30
  const rowDataWithButtonCol = [
30
31
  {
31
- make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: 'something about Toyota'
32
+ make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: {
33
+ disabled: false,
34
+ variant: "secondary",
35
+ size: "s",
36
+ target: "_blank",
37
+ href: "https://www.w3schools.com/",
38
+ theme: "default",
39
+ type: "button",
40
+ fullWidth: true,
41
+ text: "Toyota Button"
42
+ }
43
+ },
44
+ {
45
+ make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: {
46
+ disabled: false,
47
+ variant: "secondary",
48
+ size: "s",
49
+ target: "_blank",
50
+ href: "https://www.w3schools.com/",
51
+ theme: "default",
52
+ type: "button",
53
+ fullWidth: true,
54
+ text: "Ford Button"
55
+ }
32
56
  },
33
- { make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: 'something about Ford' },
34
57
  {
35
58
  make: 'Porsche', model: 'Boxster', price: 72000, button: {
36
59
  disabled: false,
37
60
  variant: "secondary",
38
61
  size: "s",
39
62
  target: "_blank",
40
- color: "secondary",
41
- text: "Button"
42
- // ... you can extend this as per the properties of `ifx-button`
63
+ href: "https://www.w3schools.com/",
64
+ theme: "default",
65
+ type: "button",
66
+ fullWidth: true,
67
+ text: "Porsche Button"
43
68
  }
44
69
  }
45
70
  ];
46
- //other example
47
- // const columnDefsDragAndDrop = [
48
- // { valueGetter: '"Drag"', dndSource: true },
49
- // { field: 'id' },
50
- // { field: 'color' },
51
- // { field: 'value1' },
52
- // { field: 'value2' },
53
- // ];
54
- // var rowIdSequence = 100;
55
- // function getRowDataDragAndDrop() {
56
- // var rowDataDragAndDrop = [];
57
- // [
58
- // 'Red',
59
- // 'Green',
60
- // 'Blue',
61
- // 'Red',
62
- // 'Green',
63
- // 'Blue',
64
- // 'Red',
65
- // 'Green',
66
- // 'Blue',
67
- // ].forEach(function (color) {
68
- // var newDataItem = {
69
- // id: rowIdSequence++,
70
- // color: color,
71
- // value1: Math.floor(Math.random() * 100),
72
- // value2: Math.floor(Math.random() * 100),
73
- // };
74
- // rowDataDragAndDrop.push(newDataItem);
75
- // });
76
- // return rowDataDragAndDrop;
77
- // }
78
71
  export default {
79
72
  title: 'Components/Table (advanced)',
80
- // tags: ['autodocs'],
81
73
  args: {
82
74
  tableHeight: 'auto',
83
75
  pagination: false,
@@ -85,6 +77,11 @@ export default {
85
77
  currentPage: 1,
86
78
  rowHeight: 40,
87
79
  showLoading: false,
80
+ buttonRendererOptions: {
81
+ onButtonClick: (params, event) => {
82
+ console.log('Button clicked:', params, event);
83
+ }
84
+ }
88
85
  },
89
86
  argTypes: {
90
87
  tableHeight: {
@@ -126,81 +123,31 @@ export default {
126
123
  detail: 'Standard row values:\nmake: "Toyota", \nmodel: "Celica", \nprice: 35000 \n\nSpecial row values (incl buttons):\nmake: "Porsche",\nmodel: "Boxster",\nprice: "72000",\nbutton: { \ndisabled: false (optional),\nvariant: "outline" (optional)\nsize: "s" (optional),\ntext: "Button"\n...other ifx-button properties\n}',
127
124
  },
128
125
  },
129
- }
126
+ },
127
+ buttonRendererOptions: {
128
+ control: 'object',
129
+ description: 'Options for button cell renderer, including event handlers.',
130
+ table: {
131
+ type: {
132
+ summary: 'Button Renderer Options',
133
+ detail: 'Custom event handlers and other options for the button cell renderer in the table.'
134
+ },
135
+ },
136
+ },
130
137
  }
131
138
  };
132
139
  const DefaultTemplate = (args) => {
133
- if (args.filterOrientation === 'none') {
134
- const table = `<ifx-table
135
- row-height="${args.rowHeight}"
136
- cols='${JSON.stringify(args.columnDefs)}'
137
- rows='${JSON.stringify(args.rowData)}'
138
- table-height="${args.tableHeight}"
139
- pagination="${args.pagination}"
140
- pagination-page-size="${args.paginationPageSize}"
141
- filter-orientation="${args.filterOrientation}">
142
- </ifx-table>`;
143
- return table;
144
- }
145
- else {
146
- //sidebar
147
- const filterAccordions = args.columnDefs.map(column => {
148
- const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];
149
- const filterOptions = uniqueColValues.map((option, index) => {
150
- return `<ifx-list-entry slot="slot${index}" label="${option}" value="false"></ifx-list-entry>`;
151
- }).join('');
152
- return `
153
- <ifx-filter-accordion slot="filter-accordion" filter-group-name="${column.field}">
154
- <ifx-list slot="list" type="checkbox" name="${column.field}" max-visible-items="6">
155
- ${filterOptions}
156
- </ifx-list>
157
- </ifx-filter-accordion>
158
- `;
159
- }).join('');
160
- //topbar
161
- const filterComponents = args.columnDefs.map((column, index) => {
162
- const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];
163
- const options = uniqueColValues.map(option => ({
164
- value: option,
165
- label: option,
166
- selected: false
167
- }));
168
- // Directly use JSON.stringify without replacing quotes
169
- const optionsString = JSON.stringify(options);
170
- return `
171
- <ifx-set-filter slot="filter-component-${index + 1}"
172
- options='${optionsString}'
173
- filter-label='${column.headerName}'
174
- filter-name='${column.field}'
175
- type='multi-select'
176
- search-enabled='true'>
177
- </ifx-set-filter>
178
- `;
179
- }).join('\n');
180
- const filterTypeGroupComponent = args.filterOrientation === 'sidebar'
181
- ? `<ifx-filter-type-group slot="sidebar-filter">
182
- <div slot="filter-search">
183
- <ifx-filter-search filter-orientation="sidebar" filter-name="search"></ifx-filter-search>
184
- </div>
185
- ${filterAccordions}
186
- </ifx-filter-type-group>`
187
- :
188
- `<ifx-filter-bar slot="topbar-filter" max-shown-filters="3">
189
- <ifx-filter-search slot="filter-search" filter-orientation="topbar"></ifx-filter-search>
190
- ${filterComponents}
191
- </ifx-filter-bar>`;
192
- const table = `<ifx-table
193
- row-height="${args.rowHeight}"
194
- cols='${JSON.stringify(args.columnDefs)}'
195
- rows='${JSON.stringify(args.rowData)}'
196
- table-height="${args.tableHeight}"
197
- pagination="${args.pagination}"
198
- pagination-page-size="${args.paginationPageSize}"
199
- filter-orientation="${args.filterOrientation}">
200
- ${filterTypeGroupComponent}
201
- </ifx-table>`;
202
- return table;
203
- }
140
+ const table = `
141
+ <ifx-table
142
+ row-height="${args.rowHeight}"
143
+ cols='${JSON.stringify(args.columnDefs)}'
144
+ rows='${JSON.stringify(args.rowData)}'
145
+ table-height="${args.tableHeight}"
146
+ pagination="${args.pagination}"
147
+ pagination-page-size="${args.paginationPageSize}"
148
+ filter-orientation="${args.filterOrientation}">
149
+ </ifx-table>`;
150
+ return table;
204
151
  };
205
152
  export const Pagination = DefaultTemplate.bind({});
206
153
  Pagination.args = {
@@ -209,32 +156,52 @@ Pagination.args = {
209
156
  rowHeight: 'default',
210
157
  columnDefs: columnDefs,
211
158
  rowData: rowData,
212
- filterOrientation: 'none'
159
+ filterOrientation: 'none',
160
+ };
161
+ const CustomCellTemplate = (args) => {
162
+ const table = `
163
+ <ifx-table
164
+ row-height="${args.rowHeight}"
165
+ cols='${JSON.stringify(args.columnDefs)}'
166
+ rows='${JSON.stringify(args.rowData)}'
167
+ table-height="${args.tableHeight}"
168
+ pagination="${args.pagination}"
169
+ pagination-page-size="${args.paginationPageSize}"
170
+ filter-orientation="${args.filterOrientation}">
171
+ </ifx-table>`;
172
+ return table;
213
173
  };
214
- export const IncludesButtons = DefaultTemplate.bind({});
174
+ export const IncludesButtons = CustomCellTemplate.bind({});
215
175
  IncludesButtons.args = {
216
176
  rowHeight: 'default',
217
177
  columnDefs: columnDefsWithButtonCol,
218
178
  rowData: rowDataWithButtonCol,
219
- filterOrientation: 'none'
179
+ filterOrientation: 'none',
180
+ pagination: false,
181
+ paginationPageSize: 10,
220
182
  };
221
183
  export const SidebarFilter = DefaultTemplate.bind({});
222
184
  SidebarFilter.args = {
223
185
  rowHeight: 'default',
224
186
  columnDefs: columnDefs,
225
187
  rowData: rowData,
226
- filterOrientation: 'sidebar'
188
+ filterOrientation: 'sidebar',
189
+ buttonRendererOptions: {
190
+ onButtonClick: (params, event) => {
191
+ console.log('Button clicked:', params, event);
192
+ }
193
+ }
227
194
  };
228
195
  export const TopbarFilter = DefaultTemplate.bind({});
229
196
  TopbarFilter.args = {
230
197
  rowHeight: 'default',
231
198
  columnDefs: columnDefs,
232
199
  rowData: rowData,
233
- filterOrientation: 'topbar'
200
+ filterOrientation: 'topbar',
201
+ buttonRendererOptions: {
202
+ onButtonClick: (params, event) => {
203
+ console.log('Button clicked:', params, event);
204
+ }
205
+ }
234
206
  };
235
- // export const DragAndDrop = DefaultTemplate.bind({});
236
- // DragAndDrop.args = {
237
- // columnDefs: columnDefsDragAndDrop,
238
- // rowData: getRowDataDragAndDrop(),
239
- // };
240
207
  //# sourceMappingURL=table.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,MAAM,UAAU,GAAG;IACjB,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;CACpC,CAAC;AAIF,MAAM,OAAO,GAAG;IACd,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IAC1D,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IACxD,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;IACnD,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;IACzC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;IAC7C,EAAE,IAAI,EAA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U,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,QAAQ;CAC5B,CAAC;AAEF,uDAAuD;AACvD,uBAAuB;AACvB,uCAAuC;AACvC,sCAAsC;AACtC,KAAK","sourcesContent":["//default\nconst columnDefs = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' }\n];\n\n\n\nconst rowData = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Bmw', model: 'x', price: 72000 },\n { make: 'Mercedes', model: 'y', price: 72000 },\n { make: 'Ferrari', model: 'z', price: 72000 },\n { make: 'Chrysler', model: 'a', price: 72000 },\n { make: 'Range rover', model: 'b', price: 72000 },\n { make: 'Tesla', model: 'x', price: 72000 },\n { make: 'Audi', model: '3', price: 72000 },\n { make: 'Landrover', model: 'x', price: 72000 },\n];\n\n//table with button col\nconst columnDefsWithButtonCol = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n { headerName: '', field: 'button' }\n];\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: 'something about Toyota'\n },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: 'something about Ford' },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n color: \"secondary\",\n text: \"Button\"\n // ... you can extend this as per the properties of `ifx-button`\n }\n }\n];\n\n\n\n//other example\n// const columnDefsDragAndDrop = [\n// { valueGetter: '\"Drag\"', dndSource: true },\n// { field: 'id' },\n// { field: 'color' },\n// { field: 'value1' },\n// { field: 'value2' },\n// ];\n\n// var rowIdSequence = 100;\n// function getRowDataDragAndDrop() {\n// var rowDataDragAndDrop = [];\n// [\n// 'Red',\n// 'Green',\n// 'Blue',\n// 'Red',\n// 'Green',\n// 'Blue',\n// 'Red',\n// 'Green',\n// 'Blue',\n// ].forEach(function (color) {\n// var newDataItem = {\n// id: rowIdSequence++,\n// color: color,\n// value1: Math.floor(Math.random() * 100),\n// value2: Math.floor(Math.random() * 100),\n// };\n// rowDataDragAndDrop.push(newDataItem);\n// });\n// return rowDataDragAndDrop;\n// }\n\n\nexport default {\n title: 'Components/Table (advanced)',\n // tags: ['autodocs'],\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n currentPage: 1,\n rowHeight: 40,\n showLoading: false,\n\n },\n argTypes: {\n tableHeight: {\n table: {\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n }\n },\n },\n paginationPageSize: {\n description: \"Results per page: minimum 10 - maximum 30\",\n control: { type: 'number', min: 10, max: 30, step: 10 }\n },\n showLoading: {\n options: [true, false],\n control: { type: 'radio' },\n },\n rowHeight: {\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n filterOrientation: {\n options: ['sidebar', 'topbar', 'none'],\n control: { type: 'radio' },\n },\n columnDefs: {\n table: {\n type: {\n summary: 'Column header options',\n detail: 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rowData: {\n table: {\n type: {\n summary: 'Row data options',\n detail: 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n }\n }\n};\n\n\n\nconst DefaultTemplate = (args) => {\n if (args.filterOrientation === 'none') {\n const table = `<ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n</ifx-table>`;\n return table;\n } else {\n //sidebar\n const filterAccordions = args.columnDefs.map(column => {\n const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];\n const filterOptions = uniqueColValues.map((option, index) => {\n return `<ifx-list-entry slot=\"slot${index}\" label=\"${option}\" value=\"false\"></ifx-list-entry>`;\n }).join('');\n\n return `\n <ifx-filter-accordion slot=\"filter-accordion\" filter-group-name=\"${column.field}\">\n <ifx-list slot=\"list\" type=\"checkbox\" name=\"${column.field}\" max-visible-items=\"6\">\n ${filterOptions}\n </ifx-list>\n </ifx-filter-accordion>\n `;\n }).join('');\n\n//topbar\nconst filterComponents = args.columnDefs.map((column, index) => {\n const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];\n const options = uniqueColValues.map(option => ({\n value: option,\n label: option,\n selected: false\n }));\n\n // Directly use JSON.stringify without replacing quotes\n const optionsString = JSON.stringify(options);\n\n return `\n <ifx-set-filter slot=\"filter-component-${index + 1}\"\n options='${optionsString}' \n filter-label='${column.headerName}'\n filter-name='${column.field}'\n type='multi-select'\n search-enabled='true'>\n </ifx-set-filter>\n `;\n }).join('\\n');\n\n\n\n const filterTypeGroupComponent = args.filterOrientation === 'sidebar'\n ? `<ifx-filter-type-group slot=\"sidebar-filter\">\n <div slot=\"filter-search\">\n <ifx-filter-search filter-orientation=\"sidebar\" filter-name=\"search\"></ifx-filter-search>\n </div>\n ${filterAccordions}\n </ifx-filter-type-group>`\n :\n `<ifx-filter-bar slot=\"topbar-filter\" max-shown-filters=\"3\">\n <ifx-filter-search slot=\"filter-search\" filter-orientation=\"topbar\"></ifx-filter-search>\n ${filterComponents}\n </ifx-filter-bar>`;\n\n const table = `<ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n ${filterTypeGroupComponent}\n</ifx-table>`;\n\n return table;\n }\n};\n\n\n\nexport const Pagination = DefaultTemplate.bind({});\nPagination.args = {\n pagination: true,\n paginationPageSize: 10,\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'none'\n\n};\n\n\nexport const IncludesButtons = DefaultTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none'\n\n};\n\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar'\n};\n\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar'\n};\n\n// export const DragAndDrop = DefaultTemplate.bind({});\n// DragAndDrop.args = {\n// columnDefs: columnDefsDragAndDrop,\n// rowData: getRowDataDragAndDrop(),\n// };"]}
1
+ {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG;IACjB,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IA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AAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,QAAQ;IAC3B,qBAAqB,EAAE;QACrB,aAAa,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;KACF;CACF,CAAC","sourcesContent":["const columnDefs = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' }\n];\n\nconst rowData = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Bmw', model: 'x', price: 72000 },\n { make: 'Mercedes', model: 'y', price: 72000 },\n { make: 'Ferrari', model: 'z', price: 72000 },\n { make: 'Chrysler', model: 'a', price: 72000 },\n { make: 'Range rover', model: 'b', price: 72000 },\n { make: 'Tesla', model: 'x', price: 72000 },\n { make: 'Audi', model: '3', price: 72000 },\n { make: 'Landrover', model: 'x', price: 72000 },\n];\n\nconst columnDefsWithButtonCol = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n { \n headerName: '', \n field: 'button',\n }\n];\n\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Toyota Button\"\n }\n },\n {\n make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Ford Button\"\n }\n },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Porsche Button\"\n }\n }\n];\n \nexport default {\n title: 'Components/Table (advanced)',\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n currentPage: 1,\n rowHeight: 40,\n showLoading: false,\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n },\n argTypes: {\n tableHeight: {\n table: {\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n }\n },\n },\n paginationPageSize: {\n description: \"Results per page: minimum 10 - maximum 30\",\n control: { type: 'number', min: 10, max: 30, step: 10 }\n },\n showLoading: {\n options: [true, false],\n control: { type: 'radio' },\n },\n rowHeight: {\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n filterOrientation: {\n options: ['sidebar', 'topbar', 'none'],\n control: { type: 'radio' },\n },\n columnDefs: {\n table: {\n type: {\n summary: 'Column header options',\n detail: 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rowData: {\n table: {\n type: {\n summary: 'Row data options',\n detail: 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n buttonRendererOptions: {\n control: 'object',\n description: 'Options for button cell renderer, including event handlers.',\n table: {\n type: {\n summary: 'Button Renderer Options',\n detail: 'Custom event handlers and other options for the button cell renderer in the table.'\n },\n },\n },\n }\n};\n\nconst DefaultTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\nexport const Pagination = DefaultTemplate.bind({});\nPagination.args = {\n pagination: true,\n paginationPageSize: 10,\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'none',\n};\n\n\nconst CustomCellTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\n\nexport const IncludesButtons = CustomCellTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none',\n pagination: false,\n paginationPageSize: 10,\n};\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n"]}
@@ -8676,6 +8676,16 @@ input[class^=ag-][type=range]:disabled {
8676
8676
  outline: none;
8677
8677
  }
8678
8678
 
8679
+ .ifx-ag-grid .ag-header-cell:not(:last-child)::before {
8680
+ content: "";
8681
+ position: absolute;
8682
+ right: 0;
8683
+ top: calc(50% - 12px);
8684
+ height: 24px;
8685
+ width: 1px;
8686
+ background-color: #BFBBBB;
8687
+ }
8688
+
8679
8689
  .ag-overlay-loading-center {
8680
8690
  border: none;
8681
8691
  background: none;