LP1850473 Manually silence ESLint HTML errors Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
LP1850473 More button linting Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
LP2043899 Revised org select field labels Reverses course on the new label strategy introduced in bug 1999158, which proved incompatible with some components with user-configurable labels (e.g. patron edit). Rather than introducing a <label> tag by default, we now use the more familiar ARIA label strategy in places where the field does not have a visible label. We will need to revisit these, as all form fields should have visible labels per WCAG, but the ARIA label serves to resolve the immediate problem for screen reader users. Affects all uses of <eg-org-select> and <eg-org-family-select>. Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
LP1999158 Form labels for eg-org-select component Adds input directives to <eg-org-select> to support <label> tags with various options. Label tags are included alongside inputs unless explicitly suppressed. Where a visible label would disrupt the current layout, the "visually-hidden" CSS class may be used to hide the label visually while leaving it available to screen readers. All current instances of <eg-org-select> have been updated. Where labels already existed, those with specific layout requirements have been adjusted only to add missing "for" attributes, and the component's automatic output is suppressed with "visually-hidden". While this sometimes results in two <label> tags being present in the DOM, this is valid and doesn't cause any issues. Signed-off-by: Stephanie Leary <stephanie.leary@equinoxOLI.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Garry Collum <gcollum@gmail.com> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
LP1615714 Sandbox: accessible buttons & links Adds several new examples to the Sandbox demonstrating the proper use of ARIA labels and title attributes to create accessible buttons and links, including icons. Also demonstrates four counterexamples, showing why they cause problems for assistive technology users. There is additional commentary in the HTML comments above each button. Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Garry Collum <gcollum@gmail.com> Signed-off-by: Steven Mayo <smayo@georgialibraries.org>
LP1615714 Accessible names for Material Icons Adds ARIA labels or hidden text, as appropriate, to ensure that Material Icons are announced to screen reader users in a sensible way rather than having the icon keyword read as if it were normal text. In buttons containing an icon with no text, both ARIA labels and title attributes are used so that the tooltip matches the button's accessible name. This helps sighted users of dictation software identify the button's name. The icon keyword is hidden from screen readers with the aria-hidden attribute. In buttons with both an icon and text, the icon keyword is hidden from screen readers. Where icons appeared in inline text rather than a button or link, a visually-hidden span has been added to mirror the existing title attribute (tooltip), unless the icon was purely decorative. As part of this cleanup, several <a click()> elements were identified that had not already been addressed in other bug reports related to keyboard navigation support. These have been changed to <button>, and button types have been specified throughout. Other small role and alt text errors identified by the Axe linter have also been corrected. Note that this branch does not include labels for the grid flair icons (bug 1818086) or the grid actions toolbar (bug 1833726), which are being addressed separately. Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Garry Collum <gcollum@gmail.com> Signed-off-by: Steven Mayo <smayo@georgialibraries.org>
LP2000482 Angular 15 and Bootstrap 5 upgrade Includes numerous markup and CSS adjustments to cope with Bootstrap 5. This patch is a squash of patches authored by Bill Erickson and Stephanie Leary. Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbergja@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP1934164 egDueDate and egOrgDateInContext Angular pipes These support displaying dates in the timezone of a specified org unit. Example: {{circ.xact_start() | egOrgDateInContext:circ.circ_lib():circ.duration()}} The format service also gets a dateOnlyIntervalField parameter to display dates as dates or dates + time depending on whether the provided duration is day-granular. Also adds a handy pipe (egDueDate) which takes a circulation as its value and collects the correct parameters to display the due date in the correct time zone and with the correct dateOnlyIntervalField value. Example: {{circ | egDueDate}} Includes Sandbox examples. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <js7389@princeton.edu>
LP1739277 Angular org selector style callback Allow the caller of an <eg-org-select> to pass a function which is called against each org unit in the list to determine what CSS class(es) should be applied to the org unit label in the list. Includes sandbox example. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jennifer Bruch <jbruch@sparkpa.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
LP#1904244: fm-editor: add a linkedSearchConditions field option This option allows the caller to specify conditions to add when retrieving values for a linked field, e.g., to specify that only active values should be fetched. Example usage: [fieldOptions]="{fund:{linkedSearchConditions:{'active':'t'}}}" If the underlying record has a value set for the linked field, that value will be included when preloadLinkedValues and the value doesn't otherwise meet the search conditions. This patch also sorts the values if preloadLinkedValues is used. Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: Ruth Frasur <rfrasur@library.in.gov> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP1865898 Scan Item as Missing Pieces Angular Port Port the 'Scan Item As Missing Pieces' staff client interface to Angular. Interface displays additional data (title/author/callnum) during the staff confirmation step. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Mike Risher <mrisher@catalyte.io> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1850547: new Angular file-reader component This adds a ControlValueAccessor wrapper around a file reader form input. Any file loaded via that input is interpreted as a text file whose lines are to be split into an array on newlines, with leading and trailng whitespace removed. Usage is: <eg-file-reader [(ngModel)]="fileContents"> </eg-file-reader> Sponsored-by: Evergreen Community Development Initiative Sponsored-by: Georgia Public Library Service Sponsored-by: Indiana State Library Sponsored-by: C/W MARS Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Tiffany Little <tlittle@georgialibraries.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP1850555 Item location selector improvements * Ensure that the desired location is always available in the selector regardless of whether the staff have permission to use the location. * Display org unit short name for selected locations simimilar to how they are displayed in the selector dropdown. * Adds an <Unset> option in cases where the new 'required' flag is set to false. This explicitly makes it possible for staff to clear the value. * Gracefully handle cases where locations from no org units are eligible for display. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
LP1850555 Angular Item (Copy) Location Select Component <eg-item-location-select .../> Adds a new item location select component which filters the list of displayed locations based on a permission-check org or a specific context org unit. Values in the selector are decorated with the org unit short name in parens after the location name to clarify the owning lib. Sandbox example included. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
LP#1835982: add GridCellTextGenerator to the btGrid in the sandbox This patch also adds a usage note: since the GridCellTextGenerator only has access to the row object but a cellTemplate can be passed arbitrary context in addition to the row, a GridCellTextGenerator that needs that additional context to have the print content match the displayed content may require that the caller stick it in the row object. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
LP#1858138: remove remaining uses of showLinkSelector Now that showLinkSelector is deprecated and does nothing, remove current uses of it. To test ------- [1] Apply the patch. [2] Visit Angular admin interfaces that have grids that refer to linked IDL classes, e.g., - Local Admin -> Carousels (carousel type) - Server Admin -> Weights Association (circ weights and hold weights) - Local Admin -> Item Tags (copy tag type) - Acq Admin -> EDI Accounts (provider) [3] Verify that the columns for linked fields display the appropriate selector field rather than the numeric ID. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP1858138 Sandbox example of simple grid filtering Adds a trimmed down grid example demonstrating consistent filtering and link selector display for auto and manual fields without requiring any additional grid markup to define basic column behevior. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1824391 Hatch print-to-file Angular edition Adds support for the Angular hatch service for sending 'bare' text/plain print-to-file requests. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jason Boyer <JBoyer@eoli.info>
LP1840050 Modularize various standalone components + more. Create container modules for the String, Translate, FM record editor, and Admin Page components & services. This simplifies imports and allows us to avoid requiring these modules on pages that don't need them. In particular, the staff splash page now loads fewer imports, which should improve initial load/login time. Additionally some components were enhanced. FM record editor now has a eg-fm-record-editor-action component so users can pass in an action, rendered as a button at the bottom of the editor. FM record editor gets a delete record option and hideBanner option. FM record editor now better handles real-time updates of its underlying recordId and record values, including updates to some editor callers to migrate to the modified API (replace recId with recordId). Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1832897: add Angular widget to for selecting multiple linked rows This component provides a widget to allow the user to select multiple linked rows. In particularly, it is meant to handle IDL fields whose underlying database columns are intarrays that refer to records in another IDL class. The widget's user interface consists of an eg-combobox for selecting new values to add to the list and a list of the existing values. The component has the following attributes: - idlClass: IDL class of the records being linked to - linkedLibraryLabel: if supplied, specifies that the display label in the comboox should include the library shortname as found in the specified field. - startValue: init value to display This component emits onChange events. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>