@linn-it/linn-form-components-library 13.1.0 → 13.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linn-it/linn-form-components-library",
3
- "version": "13.1.0",
3
+ "version": "13.2.0",
4
4
  "private": false,
5
5
  "jest": {
6
6
  "testEnvironment": "jsdom"
package/CHANGELOG.md DELETED
@@ -1,616 +0,0 @@
1
- # Changelog
2
- ## [13.1.0] - 2022-01-10
3
- ### Added
4
- - Selector helpers: collectionSelectorHelpers, itemSelectorHelpers, paginationSelectionHelpers, processSelectorHelpers, reportSelectorHelpers
5
- - Added getName and getUserNumber user selectors
6
- ## [13.0.0] - 2021-12-08
7
- ### Changes (Breaking)
8
- - MUI 5
9
- - Integrate application state into Fetch and Update actions
10
-
11
- ## [12.7.0] - 2021-11-26
12
- ### Changes
13
- - Flip processStore working flag to false if the process request errors unexpectedly.
14
-
15
- ## [12.5.0] - 2021-11-10
16
- ### Changes
17
- - Upped react version in dependencies (peer dependencies already was) to react 17
18
- - rewrote tests to get rid of enzyme in order to allow this & removed enzyme from npm and everywhere used
19
- - upgrade other npm packages
20
- - Add wee change to Typeahead to offer built in clear button
21
-
22
-
23
- ## [12.5.0] - 2021-11-10
24
- ### Added
25
- - Added replaceRow method to useGroupEditTable hook to allow update of multiple fields at once. Use when changing a field requires dependent fields to also be updated.
26
-
27
- ## [12.4.0] - 2021-11-09
28
- ### Changes
29
- - Add openModalOnClick bool prop to Typeahead when in modal mode to set whether the modal opens as soon as the user interacts with the InputField, or only when they click the magnifying glass Icon. If you want to use it in this configuration you also need to pass a handleFieldChange function that takes the usual (propertyName, newValue) args.
30
-
31
- Defaults to true so current behaviour is maintained, i.e. modal opens as soon as user touches field. This basically facilitates optional Typeahead behaviour so a user who doesn't need to search can just enter a value straight in.
32
-
33
- ## [12.3.0] - 2021-11-03
34
- ### Changes
35
- - Add action to clear data to generic FetchApiActions action creators. Process these new actions in the collectionStore reducers.
36
-
37
- ## [12.2.0] - 2021-10-18
38
- ### Changes
39
- - Add functionality to limit and order search results in the Typeahead via passing optional number and function props respectively.
40
-
41
- ## [12.1.0] - 2021-09-20
42
- ### Changes
43
- - Dropdowns's TextField and InputLabel are now linked via the propertyName prop.
44
-
45
- ## [12.0.1] - 2021-09-15
46
- ### Changes
47
- - Update React to v17 and Material UI components.
48
-
49
- ## [11.8.0] - 2021-09-14
50
- ### Changes
51
- - Add fetchByPath to fetch and update actions to allow GETting of uri/id/path
52
-
53
- ## [11.7.2] - 2021-09-09
54
- ### Changes
55
- - Pass propertyName to InputField's that are wrapped in other components.
56
-
57
- ## [11.7.0] - 2021-09-03
58
- ### Changes
59
- - InputField's TextField and InputLabel are now linked via the propertyName prop, which is now required. This is an accesibility best practise as it allows screen readers etc. to correctly associate labels with input fields, but the benefit to us is that testing library's getByLabelText() document query now works.
60
-
61
-
62
- ## [11.6.0] - 2021-08-31
63
- ### Added
64
- - Added componentViewDisplay to editable table column options
65
- - Default option is 'value' which shows value in view mode as before.
66
- - Other option is 'nothing' which shows nothing in view mode but component when editing.
67
-
68
- ## [11.5.1] - 2021-04-26
69
- ### Added
70
- - Added clearItem to update actions
71
-
72
- ## [11.5.0] - 2021-04-19
73
- ### Added
74
- - Option to add custom style to editable table columns
75
-
76
- ## [11.4.1] - 2021-03-24
77
- ### Added
78
- - Added fetchById to FetchApiActions
79
-
80
- ## [11.4.0] - 2021-03-24
81
- ### Added
82
- - Added optional accept parameter to FetchApiActions and UpdateApiActions to allow request of different media types
83
-
84
- ## [11.3.6] - 2021-03-23
85
- ### Changed
86
- - Fixed mixed up Breadcrumbs defaultProps/PropTypes
87
-
88
- ## [11.3.5] - 2021-03-23
89
- ### Changed
90
- - Change breadcrumbs 'HOME' crumb to redirect to a specified home url. Defaults to app.linn.co.uk
91
- - Page component can optionally not render Breadcrumbs with a showBreadcrumbs bool prop. Defaults to true.
92
-
93
- ## [11.3.4] - 2021-03-19
94
- ### Changed
95
- - Added searchButtonOnly to TypeAhead to show search icon button only in modal mode
96
-
97
- ## [11.3.3] - 2021-03-11
98
- ### Changed
99
- - Added clear data action
100
-
101
- ## [11.3.2] - 2021-03-11
102
- ### Changed
103
- - Added clear data option to processes
104
-
105
- ## [11.3.1] - 2021-03-02
106
- ### Changed
107
- - Removed !important from display none on display only when printing
108
-
109
- ## [11.3.0] - 2021-02-24
110
- ### Added
111
- - Added getData option to process selectors
112
-
113
- ## [11.2.1] - 2021-02-16
114
- ### Added
115
- - Added wee style to hide something then show only when printing
116
-
117
- ## [11.2.0] - 2021-02-03
118
- ### Changed
119
- - Allow SingleEditTable to have multiline textfields. Allow newRow to be specified to render at top or bottom via new 'newRowPosition' prop. Deafults to "bottom" so no breaking/altering exsiting usages.
120
- - Allow modal version of the TypeaheadTable. Allow custon onSelect behaviour alongside default links behaviour.
121
-
122
- ## [11.1.8] - 2021-02-03
123
- ### Changed
124
- - Just needed to redeploy after trying to without logging into npm
125
-
126
- ## [11.1.7] - 2021-02-03
127
- ### Changed
128
- - Added optional "print-landscape" class to set page to print landscape
129
-
130
- ## [11.1.5] - 2021-01-29
131
- ### Changed
132
- - Allow custom debounce timer to be passed into Typeaheads. Higher debounce times mitigate against cases where searches take longer than the current debounce timer (500ms), which in turn can allow those searches late set of searchResults to arrive later than more recent searches results, and as such override the more recent and correct searchResults in redux state. This is really just a workaround but used in conjucntion with speeding up slow searches, e.g. by limiting their results sizes in the backend, it seems to solve issues in many cases.
133
-
134
- ## [11.1.4] - 2021-01-28
135
- ### Changed
136
- - Optionally limit searchItems returned from the collectionSelectors getSearchItems() function. This is to avoid huge searchResults lists freezing up UI components like Typeaheads
137
-
138
- ## [11.1.3] - 2021-01-28
139
- ### Fixed
140
- - TypeAheadDialog now auto focuses on search input field
141
- - Updated column and row documentation in single and group edit table stories
142
-
143
- ## [11.1.2] - 2021-01-27
144
- ### Changed
145
- - Pass in optional setEditStatus function to useGroupEditTable hook. This allows the table to set editStatus state in a parent component or redux state store.
146
-
147
- ## [11.1.1] - 2021-01-26
148
- ### Changed
149
- - Export useGroupEditTable hook
150
-
151
- ## [11.1.0] - 2021-01-26
152
- ### Changed
153
- - Support for limiting Typeahead to only fire off search after a set number of searchTerm characters. Also added support for the above in the table component.
154
-
155
- ## [11.0.0] - 2020-12-22
156
- ### Changed
157
- - Updated to Storybook 6 and updated story files
158
-
159
- ### Added
160
- - Components
161
- - SingleEditTable
162
- - GroupEditTable
163
- - Hooks
164
- - useGroupEditTable
165
-
166
- ### Removed
167
- - EditableTable
168
-
169
- ## [10.13.4] - 2020-01-07
170
- ### Fixed
171
- - `EditableTable` delete button logic and remove click listener which was always setting edit state to true after clicking cancel button
172
-
173
- ## [10.13.3] - 2020-01-07
174
- ### Fixed
175
- - Issue where not passing optional `isTableValid` to `EditableTable` would crash
176
-
177
- ## [10.13.2] - 2020-12-21
178
- ### Changed
179
- ## EditableTable
180
- - Fixed a weird bug where inputs were losing focus for no apparent reason
181
- - Added a groupEdit storybook example.
182
-
183
- ## [10.13.1] - 2020-12-17
184
- ### Changed
185
- ## EditableTable
186
- - Minor ui improvements for the Editable table. Rows open and optionally close on click and clickaway. Tooltips for buttons.
187
- - Delete button stays shown when row is closed if a deleteRow function is supplied.
188
- - Added optional tooltips for table cells. You pass this in as part of the columns array, in the form of a function that takes a row and derives a tooltip string from data in the row. You could return false from this function for some rows if they don't have any tooltips for that column. Storybook example updated to show how this works.
189
-
190
- ## [10.13.0] - 2020-12-16
191
- ### Added
192
- - groupEdit mode for EditableTable. This allows for editing, adding and saving of multiple rows at once in the component
193
- - added validator function to validate the complete table (e.g. for external save buttons)
194
-
195
- ## [10.12.5] - 2020-12-09
196
- ### Added
197
- - Added allowNewRowCreation option to EditableTable to stop user seeing the new row button
198
- ### Changed
199
- - Changed EditableTableRow to not show edit button when table is not editable
200
-
201
- ## [10.12.4] - 2020-12-09
202
- ### Added
203
- - Added closeEditingOnSave option to editableTable to allow editor to remain open if validation is failed
204
- - Added process data to process reducer
205
-
206
- ## [10.12.3] - 2020-12-07
207
- ### Fixed
208
- - Pass itemName into process action payload
209
- ## [10.12.2] - 2020-12-07
210
- ### Changed
211
- - Allow process action to have a payload
212
-
213
- ## [10.12.1] - 2020-11-20
214
- ### Fixed
215
-
216
- - Editable Table hides new row when it is saved and is no longer a 'new' row.
217
-
218
- ## [10.12.0] - 2020-11-20
219
- ### Fixed
220
-
221
- - Editable Table closes row on save click
222
-
223
- ## [10.11.0] - 2020-11-05
224
-
225
- ### Added
226
- - SelectedItemList optional maxHeight parameter to allow scrolling on long lists
227
-
228
- ## [10.10.3] - 2020-10-09
229
- - Updated material-ui packages
230
-
231
- ## [10.10.2] - 2020-09-16
232
-
233
- ### Fixed
234
-
235
- - Correctly set content type of delete body
236
-
237
- ## [10.10.1] - 2020-09-09
238
-
239
- ### Fixed
240
-
241
- - Can set body of delete action
242
-
243
- ## [10.10.0] - 2020-09-09
244
-
245
- ### Added
246
- - EditableTable
247
- - Delete row functionality
248
- - Optional custom update row function
249
- - Optional validate row function
250
- - Fields that are required but not editable can now be changed when creating a new row and will be read only when editing
251
- - Update styling of Save, Cancel and Delete buttons on table rows
252
- - UpdateApiActions.delete - id can be null
253
-
254
- ## [10.9.0] - 2020-09-02
255
- - Added: LinkButton component that can link to components inside the current (React Router) app via a Link component, or hrefs outside the current app with an html anchor. Optionally takes tooltip text as a prop if you want to display a tooltip, e.g. to inform the user why the button might be disabled.
256
-
257
- ## [10.8.0] - 2020-03-11
258
- - Added: smartGoBack function that can hop over the annoying oidc page to take a user to wherever they came from, whether that's inside the current app or not
259
- - Added: previousPathsSelector - selects a list of paths the user has been to inside this app from the store.
260
-
261
- ## [10.7.2] - 2020-02-25
262
- - Autofocus inputs on TableWithInlineEditing
263
- - Can now search the menu by href, e.g. you could type 'pcbwo' to find pcb works orders
264
-
265
- ## [10.7.1] - 2020-02-25
266
- - Added date utilities to index
267
-
268
- ## [10.7.0] - 2020-02-24
269
- - Added a search to the Navigation component
270
-
271
- ## [10.6.12] - 2020-02-21
272
- - Added: Updating a cell in a row in the TableWithInlineEditing can now optionally trigger updates for other cells in that row. This is useful if the result of input to one cell should auto update the other cells, e.g. if you enter a partNumber you could make the description autofill.
273
-
274
- ## [10.6.11] - 2020-02-19
275
- - Add printStyles to the build. Importing any component from this library now gives you the print styles (which will now be centrally maintained here) for free.
276
-
277
- ## [10.6.7] - 2020-02-17
278
- - Updated redux-api-middleware to v3.2.0
279
-
280
- ## [10.6.5] - 2020-02-12
281
- - Made report table 'avoid page break' style the default, but is now optional in report table and multi report table
282
-
283
- ## [10.6.4] - 2020-02-12
284
- - Added CI. All commits now run the tests and build scripts. All commits (which should only be merge commits!) to master run build -> test -> publish -> deploy. Updated the readme, replacing the old manual change integraton manual with this new process.
285
-
286
- ## [10.6.3] - 2020-02-05
287
- - pass column widths to ReportData in three sizes small/medium/large
288
-
289
- ## [10.6.1] - 2020-02-06
290
-
291
- ## Changed
292
- - Remove new row from EditableTable on clicking cancel button
293
-
294
- ## [10.6.0] - 2020-02-04
295
-
296
- ## Changed
297
- - Allow alternative text than 'Back' on the BackButton. This is really so that you can be more specified, e.g. 'Back to Menu'.
298
- - Allow a custom debounce (time in ms) to be passed into useSearch. Example of usage in TypeaheadTable.
299
- - Allow a minimum search term length before the search gets fired off. This is useful in cases like board parts lookups, where the first 4 characters are pretty meaningless (i.e. PCAS or PCSM). Defaults to one to avoid any breakage.
300
-
301
- ## [10.5.0] - 2020-01-30
302
-
303
- ## Added
304
- - UpdateApiActions: add id parameter can take null value
305
-
306
- ## [10.4.1] - 2020-01-15
307
-
308
- ## Added
309
- - TableWithInlineEditing: allow disabled and required columns
310
-
311
- ## [10.4.0] - 2020-01-14
312
-
313
- ## Added
314
- - added delete into item factory and updateApiActions & makeactions
315
-
316
- ## [10.3.8] - 2020-01-14
317
-
318
- ## Fixed
319
- - EditableTable component factory will show null dates
320
- - Added missing newRow prop to EditableTable
321
-
322
- ## [10.3.7] - 2020-01-14
323
-
324
- ## Added
325
- - Disabled option for Typeahead, defaults to false.
326
-
327
- ## [10.3.6] - 2020-01-10
328
-
329
- ## Fixed
330
- - EditableTable now correctly renders null dates in display mode
331
-
332
- ## [10.3.5] - 2020-01-10
333
-
334
- ## Changed
335
- - Default rowTitle to noWrap class in ReportTable.
336
-
337
- ## [10.3.4] - 2020-01-10
338
-
339
- ## Added
340
- - Unbreak navigation styles already applied
341
-
342
- ## [10.3.3] - 2020-01-09
343
-
344
- ## Added
345
- - Classes to be used to hide Navigation and Breadcrumbs when printing
346
-
347
- ## [10.3.2] - 2020-01-09
348
-
349
- ## Added
350
- - Editable Table stories
351
-
352
- ## Changed
353
- - Export Editable Table component
354
-
355
- ## [10.3.1] - 2020-01-09
356
-
357
- ## Changed
358
- - Highlight total columns in ReportTable
359
-
360
- ## [10.3.0] - 2020-01-07
361
-
362
- ## Added
363
- - Editable Table component
364
- - Keyboard input to Linn Week Picker
365
-
366
- ## Changed
367
- - Linn Week Picker component label prop is no longer required
368
- - Dropdown label prop is no longer required
369
-
370
- ## [10.2.5] - 2020-01-06
371
-
372
- ## Changed
373
- - Reverted theme provider back to old import using MuiThemeProvider
374
-
375
- ## [10.2.4] - 2020-01-06
376
-
377
- ## Changed
378
- - Fixed forgotten tests for loading inside application state + updated how we used MuiThemeProvider to most current way to get rid of warnings
379
-
380
- ## [10.2.3] - 2019-12-0
381
-
382
- ## Changed
383
- - Add loading inside application state in item & collection factory reducers and selectors
384
-
385
- ## [10.2.1] - 2019-12-0
386
-
387
- ## Changed
388
- - Pass placeholder text prop to the InputField in the modal as well as the main one.
389
-
390
- ## [10.2.0] - 2019-12-06
391
-
392
- ## Changed
393
-
394
- - Extended the Typeahead to be more flexible than a search that just links you to other pages. It now takes an onSelect action as an optional prop such that you can define custom behaviour, and a links boolean which you can set to false to override the default behaviour of navigating to a new page onSelect. You should provide an onSelect function and a links={false} configuration if custom behaviour is required ( and conversely should not provide an onSelect and a links={true} config, since any onSelect() bheaviour is ignored if links is true anyway).
395
-
396
- Now also takes an optional modal boolean prop which lets you display search results in a modal as opposed to below the search which is useful for using this in a form where there isn't space to displau search results in the same plane as the field.
397
-
398
- The two new props have default values such that original use cases are respected - i.e. links={true} and modal={false} - hence no breaking changes in this version.
399
-
400
- ## [10.1.0] - 2019-12-04
401
- ### Added
402
- - StateApiActions
403
- ### Changed
404
- - added application state to actions, reducers and selectors
405
-
406
- ## [10.0.4] - 2019-11-21
407
-
408
- ### Changed
409
-
410
- - added css for printing tables and used within page
411
-
412
- ## [10.0.3] - 2019-11-20
413
-
414
- ### Changed
415
-
416
- - added fix for side scrolling issue
417
-
418
- ## [10.0.1] - 2019-11-18
419
-
420
- ### Changed
421
-
422
- - Reverted formatTitle to previous version with drilldown and formatting.
423
-
424
- ## [10.0.0] - 2019-11-18
425
-
426
- ### Changed
427
-
428
- - Declared notistack and react router as peer and dev dependencies as opposed to production dependencies. This means this package will expect to find them in your consuming project at the same version as declared here.
429
-
430
- ## [9.0.3] - 2019-11-15
431
-
432
- ### Changed
433
-
434
- - Update table with inline editing to include add and delete icons, extra props for these permissions + tests
435
-
436
- ## [9.0.2] - 2019-11-13
437
-
438
- ### Fixed
439
-
440
- - ```LinnWeekPicker``` now takes strings or date objects
441
-
442
- ### Added
443
-
444
- - ```dateUtilities``` for Linn Weeks
445
- - Tests for ```LinnWeekPicker```
446
-
447
- ## [9.0.2] - 2019-11-12
448
-
449
- ### Changed
450
-
451
- - Declare @material-ui/pickers as a peer dependency and a dev dependency. This is so that the tests pass in Production without there being two instances of the package AND so that the @material-ui/pickers package is available to the storybook too. I can't think of any other way to solve this problem...
452
-
453
- ## [9.0.1] - 2019-11-12
454
-
455
- ### Changed
456
-
457
- - Use same version of react-redux as consuming projects.
458
-
459
- ## [9.0.0] - 2019-11-12
460
-
461
- ### Removed
462
-
463
- - clearSearch() and clearErrors() actionCreators from UpdateApiActions.js. We don't use these.
464
-
465
- ### Fixed
466
-
467
- - Various errors that resulted in unwanted debug warnings across numerous components.
468
-
469
- - Dropdown - Now handles an allowNoValue as well as an optionsLoading state, both passed in as props (bool).
470
-
471
- ## [8.1.0] - 2019-11-06
472
-
473
- ### Added
474
-
475
- - New Component - LinnWeekPicker
476
-
477
- ## [8.0.1] - 2019-10-31
478
-
479
- ### Fixed
480
-
481
- - Added TableWithInlineEditing to the index. I had accidentally removed it.
482
-
483
- ## [8.0.0] - 2019-10-29
484
-
485
- ### Added
486
-
487
- - TypeheadTable - a typeahead with tabulated results
488
-
489
- ### Removed
490
-
491
- - InfiniteTable
492
-
493
- ## [7.5.0] - 2019-10-29
494
-
495
- ### Added
496
-
497
- - Table with inline editing
498
-
499
- ## [7.4.2] - 2019-10-28
500
-
501
- ### Changed
502
-
503
- - Support nowrap option on report cells
504
-
505
- ## [7.4.1]
506
-
507
- ### Changed
508
-
509
- - Added missing process action type
510
-
511
- ## [7.4.0] - 2019-10-10
512
-
513
- ### Added
514
-
515
- - Added clear error method to process actions.
516
-
517
- ## [7.3.0] - 2019-10-10
518
-
519
- ### Changed
520
-
521
- - Changed initialiseOnMount to pass props into initialise when itemId not provided.
522
- Fixed broken reportOptionsFactory.
523
-
524
- ## [7.2.1] - 2019-10-10
525
-
526
- ### Added
527
-
528
- - Added makeProcessActionTypes and new rsaaType for process
529
-
530
- ## [7.2.0] - 2019-10-08
531
-
532
- ### Added
533
-
534
- - New Component - ValidatedInputDialog
535
-
536
- ### Changed
537
-
538
- - Fixed broken stories.
539
-
540
- ## [7.1.1] - 2019-10-07
541
-
542
- ### Added
543
-
544
- - ProcessActions, ProcessSelectors and processStoreFactory
545
-
546
- ## [7.1.0] - 2019-10-04
547
-
548
- ### Added
549
-
550
- - CHANGELOG.md
551
-
552
- ## [7.0.2] - 2019-10-03
553
-
554
- ### Added
555
-
556
- - Export error details message selector
557
-
558
- ## [7.0.1] - 2019-10-02
559
-
560
- ### Added
561
-
562
- - Fetch error details message selector
563
-
564
- ## [7.0.0] - 2019-09-26
565
-
566
- ### Added
567
-
568
- - Report errors
569
- - Report actions must add their item type as the first prop
570
- ```
571
- export default new ReportActions(
572
- reportTypes.whoBuiltWhat.item,
573
- reportTypes.whoBuiltWhatDetails.actionType,
574
- reportTypes.whoBuiltWhatDetails.uri,
575
- actionTypes,
576
- config.appRoot
577
- );
578
- ```
579
-
580
- ## [6.0.0] - 2019-09-23
581
-
582
- ### Added
583
-
584
- - New error style
585
- - Actions must add their item type as the first prop
586
- ```
587
- export default new FetchApiActions(
588
- itemTypes.cits.item,
589
- itemTypes.cits.actionType,
590
- itemTypes.cits.uri,
591
- actionTypes,
592
- config.appRoot
593
- );
594
- ```
595
-
596
- ### Changed
597
-
598
- - action types to shared rsaa types
599
-
600
- ## [5.0.0] - 2019-16-08
601
-
602
- ### Added
603
-
604
- - Date time picker
605
-
606
- ### Changed
607
-
608
- - Utilites functions exported from utilites file
609
- - All imports must be updated
610
- `import { getHref } from '@linn/react-components-library'`
611
- should now be
612
- `import { utilites } from '@linn/react-components-library'`
613
- and used as
614
- `utilities.getHref(item)`
615
- - Rollup config
616
- - Bundle splitting