@geotab/zenith 3.18.0 → 3.19.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/README.md +9 -0
- package/dist/chart/accessibleChart/accessibleChartTable.d.ts +1 -1
- package/dist/chart/accessibleChart/accessibleChartTable.js +29 -6
- package/dist/chart/accessibleChart/interfaces.d.ts +8 -2
- package/dist/chart/barChart.d.ts +3 -1
- package/dist/chart/barChart.js +5 -3
- package/dist/chart/lineChart.d.ts +3 -1
- package/dist/chart/lineChart.js +5 -3
- package/dist/chart/pieChart.d.ts +3 -1
- package/dist/chart/pieChart.js +5 -3
- package/dist/chart/utils/isEmptyDataPoint.d.ts +1 -0
- package/dist/chart/utils/isEmptyDataPoint.js +5 -0
- package/dist/dataGrid/columns/mainColumn/mainColumnWrapper.d.ts +2 -0
- package/dist/dataGrid/columns/mainColumn/mainColumnWrapper.js +2 -2
- package/dist/fileUpload/components/filePreview.d.ts +15 -0
- package/dist/fileUpload/components/filePreview.js +272 -0
- package/dist/fileUpload/components/previewableFile.d.ts +16 -0
- package/dist/fileUpload/components/previewableFile.js +48 -0
- package/dist/fileUpload/components/resolveFileActions.d.ts +10 -0
- package/dist/fileUpload/components/resolveFileActions.js +11 -0
- package/dist/fileUpload/components/uploadedFilesSection.d.ts +9 -1
- package/dist/fileUpload/components/uploadedFilesSection.js +91 -16
- package/dist/fileUpload/components/useFilePreview.d.ts +12 -0
- package/dist/fileUpload/components/useFilePreview.js +85 -0
- package/dist/fileUpload/fileUpload.d.ts +1 -1
- package/dist/fileUpload/fileUpload.js +63 -2
- package/dist/fileUpload/fileUploadType.d.ts +35 -0
- package/dist/filtersBar/components/filtersBarSearch/filtersBarSearch.d.ts +1 -1
- package/dist/formSection/components/formSectionCard.js +1 -1
- package/dist/icons/iconEngine.d.ts +3 -0
- package/dist/icons/iconEngine.js +12 -0
- package/dist/index.css +74 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12 -10
- package/dist/inputAdornments/inputAdornments.d.ts +3 -1
- package/dist/inputAdornments/inputAdornments.js +2 -2
- package/dist/lineChartMini/lineChartMini.d.ts +3 -1
- package/dist/lineChartMini/lineChartMini.js +5 -3
- package/dist/modal/modal.d.ts +2 -0
- package/dist/primaryIcon/primaryIcon.d.ts +3 -1
- package/dist/primaryIcon/primaryIcon.js +3 -3
- package/dist/searchInputRaw/searchInputRaw.js +4 -2
- package/dist/searchInputRaw/types.d.ts +2 -0
- package/dist/textInputRaw/textInputRaw.js +1 -1
- package/dist/textInputRaw/types.d.ts +2 -0
- package/esm/chart/accessibleChart/accessibleChartTable.d.ts +1 -1
- package/esm/chart/accessibleChart/accessibleChartTable.js +29 -6
- package/esm/chart/accessibleChart/interfaces.d.ts +8 -2
- package/esm/chart/barChart.d.ts +3 -1
- package/esm/chart/barChart.js +5 -3
- package/esm/chart/lineChart.d.ts +3 -1
- package/esm/chart/lineChart.js +5 -3
- package/esm/chart/pieChart.d.ts +3 -1
- package/esm/chart/pieChart.js +5 -3
- package/esm/chart/utils/isEmptyDataPoint.d.ts +1 -0
- package/esm/chart/utils/isEmptyDataPoint.js +1 -0
- package/esm/dataGrid/columns/mainColumn/mainColumnWrapper.d.ts +2 -0
- package/esm/dataGrid/columns/mainColumn/mainColumnWrapper.js +2 -2
- package/esm/fileUpload/components/filePreview.d.ts +15 -0
- package/esm/fileUpload/components/filePreview.js +263 -0
- package/esm/fileUpload/components/previewableFile.d.ts +16 -0
- package/esm/fileUpload/components/previewableFile.js +43 -0
- package/esm/fileUpload/components/resolveFileActions.d.ts +10 -0
- package/esm/fileUpload/components/resolveFileActions.js +7 -0
- package/esm/fileUpload/components/uploadedFilesSection.d.ts +9 -1
- package/esm/fileUpload/components/uploadedFilesSection.js +91 -16
- package/esm/fileUpload/components/useFilePreview.d.ts +12 -0
- package/esm/fileUpload/components/useFilePreview.js +81 -0
- package/esm/fileUpload/fileUpload.d.ts +1 -1
- package/esm/fileUpload/fileUpload.js +63 -2
- package/esm/fileUpload/fileUploadType.d.ts +35 -0
- package/esm/filtersBar/components/filtersBarSearch/filtersBarSearch.d.ts +1 -1
- package/esm/formSection/components/formSectionCard.js +1 -1
- package/esm/icons/iconEngine.d.ts +3 -0
- package/esm/icons/iconEngine.js +8 -0
- package/esm/index.d.ts +3 -1
- package/esm/index.js +1 -0
- package/esm/inputAdornments/inputAdornments.d.ts +3 -1
- package/esm/inputAdornments/inputAdornments.js +2 -2
- package/esm/lineChartMini/lineChartMini.d.ts +3 -1
- package/esm/lineChartMini/lineChartMini.js +5 -3
- package/esm/modal/modal.d.ts +2 -0
- package/esm/primaryIcon/primaryIcon.d.ts +3 -1
- package/esm/primaryIcon/primaryIcon.js +3 -3
- package/esm/searchInputRaw/searchInputRaw.js +4 -2
- package/esm/searchInputRaw/types.d.ts +2 -0
- package/esm/textInputRaw/textInputRaw.js +1 -1
- package/esm/textInputRaw/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,16 +9,16 @@ exports.IconAttachment2 = exports.IconAttachment = exports.IconAt = exports.Icon
|
|
|
9
9
|
exports.IconBuilding = exports.IconBucket = exports.IconBubbles = exports.IconBubbleNotification = exports.IconBubbleAnnotation6 = exports.IconBubbleAnnotation5 = exports.IconBubbleAnnotation4 = exports.IconBubbleAnnotation2 = exports.IconBubbleAnnotation = exports.IconBubble6 = exports.IconBubble5 = exports.IconBubble4 = exports.IconBubble3 = exports.IconBubble2 = exports.IconBubble = exports.IconBrush = exports.IconBrowser = exports.IconBrokenLink = exports.IconBreak = exports.IconBranches = exports.IconBookmarkSelectedHover = exports.IconBookmarkPlus = exports.IconBookmarkFill = exports.IconBookmarkDelete = exports.IconBookmarkCheck = exports.IconBookmark = exports.IconBook2 = exports.IconBook = exports.IconBold = exports.IconBluetooth = exports.IconBitcoin = exports.IconBeta = exports.IconBell = exports.IconBatteryMedium = exports.IconBatteryLow2 = exports.IconBatteryLow = exports.IconBatteryLoading = exports.IconBatteryFull = exports.IconBatteryError = exports.IconBasket2 = exports.IconBasket = exports.IconBagLuggage2 = exports.IconBagLuggage = exports.IconBag2 = exports.IconBag = exports.IconBadge = exports.IconBackward = exports.IconAutoSize = exports.IconAudio = exports.IconAttachmentFile = void 0;
|
|
10
10
|
exports.IconCloudCheck = exports.IconCloud2 = exports.IconCloud = exports.IconCloseSquare = exports.IconCloseCircle = exports.IconClose = exports.IconClockTimer = exports.IconClockSnooze = exports.IconClock2 = exports.IconClock = exports.IconClipboard2 = exports.IconClipboard = exports.IconCircle = exports.IconChromecast = exports.IconChevronTopSmall = exports.IconChevronTop = exports.IconChevronStepper = exports.IconChevronRightSmall = exports.IconChevronRight = exports.IconChevronLeftSmall = exports.IconChevronLeft = exports.IconChevronGrabberVertical = exports.IconChevronGrabberHorizontal = exports.IconChevronDownSmall = exports.IconChevronDoubleUp = exports.IconChevronDoubleRight = exports.IconChevronDoubleLeft = exports.IconChevronDoubleDown = exports.IconChevronBottom = exports.IconCheckbox = exports.IconCheckRadio = exports.IconCheck = exports.IconChart8 = exports.IconChart7 = exports.IconChart6 = exports.IconChart5 = exports.IconChart4 = exports.IconChart3 = exports.IconChart2 = exports.IconChart = exports.IconCanBus = exports.IconCameraAction = exports.IconCamera3 = exports.IconCamera2 = exports.IconCamera = exports.IconCalendar = exports.IconCalculator = exports.IconBusiness = exports.IconBulletList = exports.IconBulkSelect = void 0;
|
|
11
11
|
exports.IconDiamondWarning = exports.IconDeviceUptimeDisconnected = exports.IconDeviceUptime = exports.IconDelete3 = exports.IconDelete2 = exports.IconDelete = exports.IconCycle = exports.IconCursorClick = exports.IconCursorBox = exports.IconCursor3 = exports.IconCursor2 = exports.IconCursor = exports.IconCup = exports.IconCryptoCoin = exports.IconCrypto = exports.IconCrop = exports.IconCreditCard3 = exports.IconCreditCard2 = exports.IconCreditCard = exports.IconCornerUpRight = exports.IconCornerUpLeft = exports.IconCornerRightUp = exports.IconCornerRightDown = exports.IconCornerLeftUp = exports.IconCornerLeftDown = exports.IconCornerDownRight = exports.IconCornerDownLeft = exports.IconCopy5 = exports.IconCopy4 = exports.IconCopy3 = exports.IconCopy2 = exports.IconCopy = exports.IconConstruction = exports.IconConsole = exports.IconConnectDevices = exports.IconCompass = exports.IconCommunity = exports.IconColorPicker = exports.IconColor = exports.IconCode2 = exports.IconCode = exports.IconCmd2 = exports.IconCmd = exports.IconCloudUpload = exports.IconCloudSync = exports.IconCloudQuestion = exports.IconCloudOff2 = exports.IconCloudOff = exports.IconCloudLines = exports.IconCloudDownload = void 0;
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.Waiting = exports.UserFormatProvider = exports.useDrive = exports.ThemeProvider = exports.ThemeDrive = exports.ThemeDark = exports.useLanguage = exports.useDirection = exports.injectString = exports.dictionaries = exports.LanguageProvider = exports.getFirstFocusableItem = exports.getNewFocusableItem = exports.HeaderButtonsProvider = exports.useExperimentalFeature = exports.EXPERIMENTAL_FLAGS = exports.ZenithExperimentalProvider = exports.AbortablePromise = void 0;
|
|
12
|
+
exports.IconFingerPrint = exports.IconFilterDesc = exports.IconFilterAsc = exports.IconFilter3Desc = exports.IconFilter3Asc = exports.IconFilter3 = exports.IconFilter2 = exports.IconFilter = exports.IconFileSync5 = exports.IconFileSync4 = exports.IconFileSync3 = exports.IconFileSync2 = exports.IconFileSync = exports.IconFileLocked = exports.IconFileCopy = exports.IconFile = exports.IconFaceId = exports.IconEyeOff = exports.IconEye = exports.IconExpand = exports.IconException = exports.IconExcel = exports.IconEvse = exports.IconEuro = exports.IconEthereum = exports.IconEsc = exports.IconEngine = exports.IconEmailNotification = exports.IconEmail2 = exports.IconEmail = exports.IconEditSmall = exports.IconEditBig = exports.IconEdit2 = exports.IconEdit = exports.IconDvir = exports.IconDriver = exports.IconDrive = exports.IconDownload = exports.IconDotVertical = exports.IconDotHorizontal = exports.IconDotGrid = exports.IconDoorOpen = exports.IconDoorClosed = exports.IconDollar = exports.IconDocumentWithLines = exports.IconDocument = exports.IconDock = exports.IconDispatchAsset = exports.IconDisk2 = exports.IconDisk = void 0;
|
|
13
|
+
exports.IconInspect = exports.IconInfoSquare = exports.IconInfoCircle = exports.IconInbox = exports.IconImages2 = exports.IconImages = exports.IconImage = exports.IconImac = exports.IconIcon = exports.IconITS = exports.IconHumidity = exports.IconHourglass = exports.IconHomeSimple = exports.IconHomeRoof = exports.IconHomeDoor2 = exports.IconHomeDoor = exports.IconHistory = exports.IconHexonalWarning = exports.IconHeart = exports.IconHeadphones = exports.IconHarness = exports.IconGrids2 = exports.IconGrids = exports.IconGraphStatistics = exports.IconGraphPresentation = exports.IconGraphLines = exports.IconGraphChart = exports.IconGraph = exports.IconGrab = exports.IconGlobus = exports.IconGift = exports.IconGeotabSales = exports.IconGeotabDrive = exports.IconGamepad = exports.IconFuelGas = exports.IconFork = exports.IconFolders = exports.IconFolderUpload = exports.IconFolderShared = exports.IconFolderRestricted = exports.IconFolderFilters = exports.IconFolderDownload = exports.IconFolderDelete = exports.IconFolderCloud2 = exports.IconFolderCloud = exports.IconFolderBookmarks = exports.IconFolderAdd = exports.IconFolder2 = exports.IconFolder = exports.IconFocus = void 0;
|
|
14
|
+
exports.IconMenu2 = exports.IconMenu = exports.IconMemory2 = exports.IconMemory = exports.IconMedal = exports.IconMarketplace = exports.IconMap = exports.IconMagicEyes = exports.IconMagic2 = exports.IconMagic = exports.IconMacbook = exports.IconLowDataQuality = exports.IconLogout = exports.IconLogin = exports.IconLock = exports.IconLocationOff = exports.IconLocationMap = exports.IconLocationCompass = exports.IconLoader = exports.IconList = exports.IconLinkLines = exports.IconLink3 = exports.IconLink2 = exports.IconLink = exports.IconLightning = exports.IconLightBulb = exports.IconLifeBuoy = exports.IconLeaf = exports.IconLayoutWindow5 = exports.IconLayoutWindow4 = exports.IconLayoutWindow3 = exports.IconLayoutWindow2 = exports.IconLayoutWindow = exports.IconLayoutTopbar = exports.IconLayoutTop = exports.IconLayoutSidebar = exports.IconLayoutSearch = exports.IconLayoutRight = exports.IconLayoutLeft = exports.IconLayoutColumn = exports.IconLayoutBottom = exports.IconLayout = exports.IconLayers = exports.IconLaptop = exports.IconLab = exports.IconKeyboardUp2 = exports.IconKeyboardUp = exports.IconKeyboardDown = exports.IconKeyboard = exports.IconItalic = void 0;
|
|
15
|
+
exports.IconPhoneMobile = exports.IconPhone = exports.IconPerformance = exports.IconPercent = exports.IconPeopleLike = exports.IconPeopleGroup2 = exports.IconPeopleGroup = exports.IconPeople = exports.IconPencil2 = exports.IconPencil = exports.IconPause = exports.IconPassword = exports.IconPaperPlane = exports.IconPackage3 = exports.IconPackage2 = exports.IconPackage = exports.IconPDF = exports.IconOptAlt = exports.IconOpt = exports.IconOpen2 = exports.IconOpen = exports.IconOnDuty = exports.IconNumberedList = exports.IconNotifications = exports.IconNotificationOff = exports.IconNotificationBell = exports.IconNotificationAlarm = exports.IconNote = exports.IconNewspaper = exports.IconNews = exports.IconNavigationFooterExpanded = exports.IconNavigationFooterCollapsed = exports.IconMyGeotab = exports.IconMyAdmin = exports.IconMove2 = exports.IconMove = exports.IconMouseScrollUp = exports.IconMouseScrollDown = exports.IconMouse = exports.IconMoon = exports.IconMoney = exports.IconMobi = exports.IconMinusSquare = exports.IconMinusCircle = exports.IconMinus = exports.IconMinimize = exports.IconMicrophone2 = exports.IconMicrophone = exports.IconMenuCircle = exports.IconMenu3 = void 0;
|
|
16
|
+
exports.IconSettings2 = exports.IconSettings1 = exports.IconServer3 = exports.IconServer2 = exports.IconServer = exports.IconSend = exports.IconSecuredLines = exports.IconSecured = exports.IconSeatbelt = exports.IconSearchPage = exports.IconSearchLines = exports.IconSearchDocument = exports.IconSearch = exports.IconSdCard = exports.IconRuler = exports.IconRoute = exports.IconRotateRepeat2 = exports.IconRotateRepeat = exports.IconRotateCounterclockwise = exports.IconRotateClockwise = exports.IconResizeSmall = exports.IconResizeBig = exports.IconRepeat2 = exports.IconRepeat = exports.IconRemovePeople = exports.IconRefrigeration = exports.IconRedo2 = exports.IconRedo = exports.IconRecord = exports.IconReceipt = exports.IconRadar = exports.IconQuestion = exports.IconPuzzle = exports.IconPullRequest = exports.IconProcessor = exports.IconPrinter = exports.IconPound = exports.IconPotato = exports.IconPlusSquare = exports.IconPlusLines = exports.IconPlusFile = exports.IconPlusCircle = exports.IconPlus = exports.IconPlay = exports.IconPinLocation3 = exports.IconPinLocation2 = exports.IconPinLocation = exports.IconPinFilled = exports.IconPin2 = exports.IconPin = void 0;
|
|
17
|
+
exports.IconUndo = exports.IconUnderline = exports.IconUmbrella = exports.IconTruck = exports.IconTrendNeutral = exports.IconTrailer = exports.IconToggleSmall = exports.IconToggleLarge = exports.IconThumbsUp = exports.IconThumbsDown = exports.IconThermometer = exports.IconThermograph = exports.IconTextSize = exports.IconTelevision2 = exports.IconTelevision = exports.IconTarget3 = exports.IconTarget2 = exports.IconTarget = exports.IconTachographTimeCard = exports.IconTachograph = exports.IconTable = exports.IconSupport = exports.IconSun = exports.IconStrikeThrough = exports.IconStore = exports.IconStorage = exports.IconStopwatch = exports.IconStarFilled = exports.IconStarAi = exports.IconStar = exports.IconSquare = exports.IconSpeaker = exports.IconSortVertical = exports.IconSortHorizontal = exports.IconSort2Vertical = exports.IconSort2Horizontal = exports.IconSmiley = exports.IconSign = exports.IconSidebar = exports.IconShield4 = exports.IconShield3 = exports.IconShield2 = exports.IconShield = exports.IconShare3 = exports.IconShare = exports.IconSettings8 = exports.IconSettings7 = exports.IconSettings6 = exports.IconSettings4 = exports.IconSettings3 = void 0;
|
|
18
|
+
exports.getDefaultDatasetStyle = exports.htmlLegendPlugin = exports.LEGEND_PLUGIN_ID = exports.LineChart = exports.useLayoutSize = exports.LayoutFullScreenProvider = exports.useLayoutFullScreen = exports.LayoutFullScreenElementProvider = exports.useLayoutFullScreenElement = exports.Layout = exports.ImageTapToUpload = exports.ImageNothingFound = exports.ImageNoMatchingAssets = exports.ImageLooking = exports.ImageCloudUpload = exports.ImageAdjustFilter = exports.IconZoom2 = exports.IconZoom = exports.IconZone = exports.IconYen = exports.IconWrite = exports.IconWrench = exports.IconWorld = exports.IconWorkday = exports.IconWifi2 = exports.IconWifi = exports.IconWhisper = exports.IconWebcam = exports.IconWatch2 = exports.IconWatch = exports.IconWarning = exports.IconWallet1 = exports.IconWallet = exports.IconVolumeOn = exports.IconVolumeOff = exports.IconVolumeMinimum = exports.IconVolumeHalf = exports.IconVolumeFull = exports.IconVolumeDown = exports.IconVoice = exports.IconVisitPage = exports.IconVideoReplay = exports.IconVideo2 = exports.IconVideo = exports.IconUsbHub = exports.IconUsb = exports.IconUpload = exports.IconUnlocked = exports.IconUndock = exports.IconUndo2 = void 0;
|
|
19
|
+
exports.Select = exports.SearchInput = exports.Range = exports.RadioGroup = exports.Radio = exports.getProgressIndicatorPercent = exports.getProgressIndicatorValue = exports.ProgressIndicatorType = exports.ProgressBar = exports.ProgreesBarSize = exports.ProgressBarType = exports.PrimaryIcon = exports.Popup = exports.PillExpandable = exports.PillBox = exports.DEFAULT_MAX_PILLS = exports.Pill = exports.PaginationType = exports.Pagination = exports.PageLayout = exports.PageContentLayout = exports.PageHeaderMenu = exports.PageHeaderMenuDisplayName = exports.PageHeaderButton = exports.PageHeaderButtonDisplayName = exports.PageHeader = exports.PageHeaderDisplayName = exports.Notification = exports.getPredefinedFocusableItem = exports.DialogContentNew = exports.Modal = exports.MODAL_SCROLL_LOCK_CLASS = exports.MobileSheet = exports.MiniTabs = exports.MiniTabsSize = exports.isLink = exports.isButton = exports.findPrevFocusable = exports.findNextFocusable = exports.findLastFocusable = exports.findFirstFocusable = exports.Menu = exports.ControlledMenu = exports.isDragNotClick = exports.changeOrder = exports.ListItem = exports.List = exports.ItemData = exports.ItemCompact = exports.LineChartMini = void 0;
|
|
20
|
+
exports.Tooltip = exports.removeArrowClasses = exports.calculateArrowPosition = exports.ToggleButtonRaw = exports.ToggleButton = exports.Toast = exports.useToast = exports.TimePicker = exports.TextareaRaw = exports.Textarea = exports.TextInputRaw = exports.TextInput = exports.TextIconButton = exports.ButtonIconPosition = exports.Tabs = exports.TabsDisplayName = exports.ActionLinkColumn = exports.CheckboxColumn = exports.MainColumn = exports.ActionsColumn = exports.getSortableValue = exports.ColumnSortDirection = exports.getEmptySelection = exports.Table = exports.useShowMore = exports.useNestedRows = exports.NestedData = exports.DEFAULT_SHOW_MORE_CAP = exports.TabBarContent = exports.TabBar = exports.SummaryTileBarDisplayName = exports.SummaryTileBar = exports.getTypeClassName = exports.SummaryTileTrigger = exports.SummaryTile = exports.SummaryTileDisplayName = exports.SummaryTileSize = exports.SummaryTileType = exports.Summary = exports.Summaries = exports.Stepper = exports.SortControl = exports.SortDirections = exports.Skeleton = exports.LazyContent = exports.SidePanel = exports.CUSTOM_POPUP_COMPONENT_CLASSNAME = exports.SidePanelCloseReason = exports.isChildPopup = exports.SelectField = void 0;
|
|
21
|
+
exports.Waiting = exports.UserFormatProvider = exports.useDrive = exports.ThemeProvider = exports.ThemeDrive = exports.ThemeDark = exports.useLanguage = exports.useDirection = exports.injectString = exports.dictionaries = exports.LanguageProvider = exports.getFirstFocusableItem = exports.getNewFocusableItem = exports.HeaderButtonsProvider = exports.useExperimentalFeature = exports.EXPERIMENTAL_FLAGS = exports.ZenithExperimentalProvider = exports.AbortablePromise = exports.getTrendIndicatorDirection = void 0;
|
|
22
22
|
/* eslint-disable max-len */
|
|
23
23
|
var absolute_1 = require("./absolute/absolute");
|
|
24
24
|
Object.defineProperty(exports, "Absolute", { enumerable: true, get: function () { return absolute_1.Absolute; } });
|
|
@@ -869,6 +869,8 @@ var iconEmail2_1 = require("./icons/iconEmail2");
|
|
|
869
869
|
Object.defineProperty(exports, "IconEmail2", { enumerable: true, get: function () { return iconEmail2_1.IconEmail2; } });
|
|
870
870
|
var iconEmailNotification_1 = require("./icons/iconEmailNotification");
|
|
871
871
|
Object.defineProperty(exports, "IconEmailNotification", { enumerable: true, get: function () { return iconEmailNotification_1.IconEmailNotification; } });
|
|
872
|
+
var iconEngine_1 = require("./icons/iconEngine");
|
|
873
|
+
Object.defineProperty(exports, "IconEngine", { enumerable: true, get: function () { return iconEngine_1.IconEngine; } });
|
|
872
874
|
var iconEsc_1 = require("./icons/iconEsc");
|
|
873
875
|
Object.defineProperty(exports, "IconEsc", { enumerable: true, get: function () { return iconEsc_1.IconEsc; } });
|
|
874
876
|
var iconEthereum_1 = require("./icons/iconEthereum");
|
|
@@ -27,8 +27,10 @@ export interface IInputAdornments {
|
|
|
27
27
|
ariaHaspopup?: boolean | "dialog" | "menu" | "grid" | "true" | "false" | "listbox" | "tree";
|
|
28
28
|
ariaExpanded?: boolean | "true" | "false";
|
|
29
29
|
autocomplete?: string;
|
|
30
|
+
/** Rendered as `data-analytics-id` on the input */
|
|
31
|
+
dataAnalyticsId?: string;
|
|
30
32
|
}
|
|
31
33
|
export declare const InputAdornments: {
|
|
32
|
-
({ id, value, className, disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType, autoFocus, name, onBlur, ref, ariaLabel, ariaDescribedby, role, ariaAutocomplete, ariaControls, ariaHaspopup, ariaExpanded, autocomplete }: IInputAdornments): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
({ id, value, className, disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType, autoFocus, name, onBlur, ref, ariaLabel, ariaDescribedby, role, ariaAutocomplete, ariaControls, ariaHaspopup, ariaExpanded, autocomplete, dataAnalyticsId }: IInputAdornments): import("react/jsx-runtime").JSX.Element;
|
|
33
35
|
displayName: string;
|
|
34
36
|
};
|
|
@@ -7,7 +7,7 @@ const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
|
7
7
|
const textInputRaw_1 = require("../textInputRaw/textInputRaw");
|
|
8
8
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
9
9
|
const useMobileClassName_1 = require("../utils/theme/useMobileClassName");
|
|
10
|
-
const InputAdornments = ({ id, value, className = "", disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType = "text", autoFocus, name, onBlur, ref, ariaLabel, ariaDescribedby, role, ariaAutocomplete, ariaControls, ariaHaspopup, ariaExpanded, autocomplete }) => {
|
|
10
|
+
const InputAdornments = ({ id, value, className = "", disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType = "text", autoFocus, name, onBlur, ref, ariaLabel, ariaDescribedby, role, ariaAutocomplete, ariaControls, ariaHaspopup, ariaExpanded, autocomplete, dataAnalyticsId }) => {
|
|
11
11
|
const disabledClassName = disabled ? "zen-input-adornments--disabled" : "";
|
|
12
12
|
const driveComponentClass = (0, useDriveClassName_1.useDriveClassName)("zen-input-adornments");
|
|
13
13
|
const mobileComponentClass = (0, useMobileClassName_1.useMobileClassName)("zen-input-adornments");
|
|
@@ -25,7 +25,7 @@ const InputAdornments = ({ id, value, className = "", disabled, isError, maxLeng
|
|
|
25
25
|
!value ? "zen-input-adornments__wrapper--empty" : "",
|
|
26
26
|
className
|
|
27
27
|
]), [className, endAdornment, value]);
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: classes, children: [!!startAdornment && (0, jsx_runtime_1.jsx)("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--start", children: startAdornment }), (0, jsx_runtime_1.jsx)("div", { className: wrapperClasses, children: (0, jsx_runtime_1.jsx)(textInputRaw_1.TextInputRaw, { name: name, onBlur: onBlur, ref: ref, id: id, value: value, maxLength: maxLength, isError: isError, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown, onFocus: onFocus, disabled: disabled, type: inputType, autoFocus: autoFocus, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, role: role, ariaAutocomplete: ariaAutocomplete, ariaControls: ariaControls, ariaHaspopup: ariaHaspopup, ariaExpanded: ariaExpanded === undefined ? undefined : ariaExpanded === "true" || ariaExpanded === true, autocomplete: autocomplete, className: "zen-input-adornments__input zen-input-adornments__input--border-none" }) }), !!endAdornment && (0, jsx_runtime_1.jsx)("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--end", children: endAdornment })] }));
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: classes, children: [!!startAdornment && (0, jsx_runtime_1.jsx)("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--start", children: startAdornment }), (0, jsx_runtime_1.jsx)("div", { className: wrapperClasses, children: (0, jsx_runtime_1.jsx)(textInputRaw_1.TextInputRaw, { name: name, onBlur: onBlur, ref: ref, id: id, value: value, maxLength: maxLength, isError: isError, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown, onFocus: onFocus, disabled: disabled, type: inputType, autoFocus: autoFocus, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, role: role, ariaAutocomplete: ariaAutocomplete, ariaControls: ariaControls, ariaHaspopup: ariaHaspopup, ariaExpanded: ariaExpanded === undefined ? undefined : ariaExpanded === "true" || ariaExpanded === true, autocomplete: autocomplete, dataAnalyticsId: dataAnalyticsId, className: "zen-input-adornments__input zen-input-adornments__input--border-none" }) }), !!endAdornment && (0, jsx_runtime_1.jsx)("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--end", children: endAdornment })] }));
|
|
29
29
|
};
|
|
30
30
|
exports.InputAdornments = InputAdornments;
|
|
31
31
|
exports.InputAdornments.displayName = "InputAdornments";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
2
2
|
import type { ChartData, ChartOptions } from "chart.js/auto";
|
|
3
|
+
import { IChartAccessibilityOptions } from "../chart/accessibleChart/interfaces";
|
|
3
4
|
import "./lineChartMini.less";
|
|
4
5
|
export interface ILineChartMini extends IZenComponentProps {
|
|
5
6
|
data: ChartData<"line">;
|
|
6
7
|
options?: ChartOptions<"line">;
|
|
8
|
+
accessibility?: IChartAccessibilityOptions;
|
|
7
9
|
}
|
|
8
|
-
export declare const LineChartMini: ({ data, options, ...rest }: ILineChartMini) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const LineChartMini: ({ data, options, accessibility, ...rest }: ILineChartMini) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -109,9 +109,10 @@ const LineChartMini = _a => {
|
|
|
109
109
|
var _b, _c;
|
|
110
110
|
var {
|
|
111
111
|
data,
|
|
112
|
-
options = {}
|
|
112
|
+
options = {},
|
|
113
|
+
accessibility
|
|
113
114
|
} = _a,
|
|
114
|
-
rest = __rest(_a, ["data", "options"]);
|
|
115
|
+
rest = __rest(_a, ["data", "options", "accessibility"]);
|
|
115
116
|
const {
|
|
116
117
|
translate
|
|
117
118
|
} = (0, useLanguage_1.useLanguage)();
|
|
@@ -160,7 +161,8 @@ const LineChartMini = _a => {
|
|
|
160
161
|
}), (0, jsx_runtime_1.jsx)(accessibleChart_1.AccessibleChart, {
|
|
161
162
|
type: "line-mini",
|
|
162
163
|
data: adaptedData,
|
|
163
|
-
narrativeId: narrativeId
|
|
164
|
+
narrativeId: narrativeId,
|
|
165
|
+
accessibility: accessibility
|
|
164
166
|
})]
|
|
165
167
|
});
|
|
166
168
|
};
|
package/dist/modal/modal.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ interface IButtons extends IButtonIconProps {
|
|
|
24
24
|
className?: string;
|
|
25
25
|
title?: string;
|
|
26
26
|
disabled?: boolean;
|
|
27
|
+
/** Rendered as `data-analytics-id` on the button */
|
|
28
|
+
dataAnalyticsId?: string;
|
|
27
29
|
}
|
|
28
30
|
interface IPrimaryButtons extends IButtons {
|
|
29
31
|
type?: "primary" | "destructive";
|
|
@@ -10,5 +10,7 @@ export interface IPrimaryIcon extends IZenComponentProps {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
style?: "primary" | "secondary";
|
|
13
|
+
/** Rendered as `data-analytics-id` on the button or link. Not rendered when the icon is a plain div. */
|
|
14
|
+
dataAnalyticsId?: string;
|
|
13
15
|
}
|
|
14
|
-
export declare const PrimaryIcon: ({ icon, className, onClick, link, target, title, disabled, style }: IPrimaryIcon) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const PrimaryIcon: ({ icon, className, onClick, link, target, title, disabled, style, dataAnalyticsId }: IPrimaryIcon) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
7
7
|
const renderIcon_1 = require("./renderIcon");
|
|
8
|
-
const PrimaryIcon = ({ icon, className, onClick, link, target, title, disabled, style }) => {
|
|
8
|
+
const PrimaryIcon = ({ icon, className, onClick, link, target, title, disabled, style, dataAnalyticsId }) => {
|
|
9
9
|
const iconNode = (0, react_1.useMemo)(() => (0, renderIcon_1.renderIcon)(icon, className), [icon, className]);
|
|
10
10
|
const topClassName = (0, react_1.useMemo)(() => (0, classNames_1.classNames)([
|
|
11
11
|
"zen-primary-icon",
|
|
@@ -15,10 +15,10 @@ const PrimaryIcon = ({ icon, className, onClick, link, target, title, disabled,
|
|
|
15
15
|
className || ""
|
|
16
16
|
]), [onClick, link, className, disabled, style]);
|
|
17
17
|
if (onClick) {
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)("button", { className: topClassName, onClick: onClick, disabled: disabled, title: title, "aria-label": title, children: iconNode }));
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("button", { className: topClassName, onClick: onClick, disabled: disabled, title: title, "aria-label": title, "data-analytics-id": dataAnalyticsId, children: iconNode }));
|
|
19
19
|
}
|
|
20
20
|
if (link) {
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)("a", { className: topClassName, href: disabled ? undefined : link, target: target, title: title, "aria-label": title, children: iconNode }));
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("a", { className: topClassName, href: disabled ? undefined : link, target: target, title: title, "aria-label": title, "data-analytics-id": dataAnalyticsId, children: iconNode }));
|
|
22
22
|
}
|
|
23
23
|
return (0, jsx_runtime_1.jsx)("div", { className: topClassName, children: iconNode });
|
|
24
24
|
};
|
|
@@ -149,7 +149,8 @@ const SearchInputRaw = props => {
|
|
|
149
149
|
ariaControls,
|
|
150
150
|
ariaHaspopup,
|
|
151
151
|
ariaExpanded,
|
|
152
|
-
autocomplete = "off"
|
|
152
|
+
autocomplete = "off",
|
|
153
|
+
dataAnalyticsId
|
|
153
154
|
} = props;
|
|
154
155
|
const {
|
|
155
156
|
name,
|
|
@@ -243,7 +244,8 @@ const SearchInputRaw = props => {
|
|
|
243
244
|
ariaControls: ariaControls,
|
|
244
245
|
ariaHaspopup: ariaHaspopup,
|
|
245
246
|
ariaExpanded: ariaExpanded === undefined ? undefined : ariaExpanded === "true" || ariaExpanded === true,
|
|
246
|
-
autocomplete: autocomplete
|
|
247
|
+
autocomplete: autocomplete,
|
|
248
|
+
dataAnalyticsId: dataAnalyticsId
|
|
247
249
|
})
|
|
248
250
|
}));
|
|
249
251
|
};
|
|
@@ -29,6 +29,8 @@ export interface ISearchInputRawBase {
|
|
|
29
29
|
ariaExpanded?: boolean | "true" | "false";
|
|
30
30
|
/** HTML autocomplete attribute for the underlying input. Defaults to "off" to suppress browser autofill. */
|
|
31
31
|
autocomplete?: string;
|
|
32
|
+
/** Rendered as `data-analytics-id` on the input */
|
|
33
|
+
dataAnalyticsId?: string;
|
|
32
34
|
}
|
|
33
35
|
export interface ISearchInputRawDefault extends ISearchInputRawBase {
|
|
34
36
|
value: string;
|
|
@@ -24,7 +24,7 @@ const TextInputRaw = (props) => {
|
|
|
24
24
|
props.isError ? "zen-text-input--error" : ""
|
|
25
25
|
]), value: maxLength ? value.substring(0, maxLength) : value, placeholder: props.placeholder, disabled: disabled, onChange: onChange, onKeyDown: props.onKeyDown, onBlur: onBlur, maxLength: maxLength, autoComplete: props.autocomplete,
|
|
26
26
|
// TODO: add tests
|
|
27
|
-
min: min, max: max, step: props.step, autoFocus: props.autoFocus, required: !!required, onFocus: props.onFocus, minLength: minLength, name: name, pattern: pattern, role: props.role }, (0, getAriaAttributes_1.getAriaAttributes)(props), { "aria-expanded": props.ariaExpanded === undefined ? undefined : props.ariaExpanded === "true" || props.ariaExpanded === true })));
|
|
27
|
+
min: min, max: max, step: props.step, autoFocus: props.autoFocus, required: !!required, onFocus: props.onFocus, minLength: minLength, name: name, pattern: pattern, role: props.role, "data-analytics-id": props.dataAnalyticsId }, (0, getAriaAttributes_1.getAriaAttributes)(props), { "aria-expanded": props.ariaExpanded === undefined ? undefined : props.ariaExpanded === "true" || props.ariaExpanded === true })));
|
|
28
28
|
};
|
|
29
29
|
exports.TextInputRaw = TextInputRaw;
|
|
30
30
|
exports.TextInputRaw.displayName = "TextInputRaw";
|
|
@@ -10,6 +10,8 @@ export interface ITextInputRawBase {
|
|
|
10
10
|
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
11
11
|
type?: string;
|
|
12
12
|
autocomplete?: string;
|
|
13
|
+
/** Rendered as `data-analytics-id` on the input */
|
|
14
|
+
dataAnalyticsId?: string;
|
|
13
15
|
ariaLabelledby?: string;
|
|
14
16
|
role?: string;
|
|
15
17
|
ariaAutocomplete?: "list" | "none" | "inline" | "both";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IAccessibleChart } from "./interfaces";
|
|
2
|
-
export declare const AccessibleChartTable: ({ type, data, options }: IAccessibleChart) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AccessibleChartTable: ({ type, data, options, accessibility }: IAccessibleChart) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,7 @@ import { userFormatContext } from "../../utils/userFormat/userFormatContext";
|
|
|
6
6
|
import { formatDate } from "../../utils/formatDate";
|
|
7
7
|
import { resampleArrayEvenly } from "../utils/resampleArrayEvenly";
|
|
8
8
|
import { isDateString } from "../utils/isDateString";
|
|
9
|
+
import { isEmptyDataPoint } from "../utils/isEmptyDataPoint";
|
|
9
10
|
import { getFormattedLabel } from "../utils/getFormattedLabel";
|
|
10
11
|
import { truncateDecimals } from "../../utils/truncateDecimals";
|
|
11
12
|
import { calculateMinTruncationPrecision } from "../utils/calculateMinTruncationPrecision";
|
|
@@ -207,8 +208,10 @@ const getYLabels = (type, data) => {
|
|
|
207
208
|
export const AccessibleChartTable = ({
|
|
208
209
|
type,
|
|
209
210
|
data,
|
|
210
|
-
options
|
|
211
|
+
options,
|
|
212
|
+
accessibility
|
|
211
213
|
}) => {
|
|
214
|
+
const renderTableCell = accessibility === null || accessibility === void 0 ? void 0 : accessibility.renderTableCell;
|
|
212
215
|
const {
|
|
213
216
|
translate
|
|
214
217
|
} = useLanguage();
|
|
@@ -285,11 +288,20 @@ export const AccessibleChartTable = ({
|
|
|
285
288
|
const dsXKey = ds.x instanceof Date ? ds.x.toISOString() : ds.x.toString();
|
|
286
289
|
return dsXKey === yLabel.toString();
|
|
287
290
|
});
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
291
|
+
if (!matchingDataPoint) {
|
|
292
|
+
return _jsx("td", {
|
|
293
|
+
children: "-"
|
|
294
|
+
}, dsIndex);
|
|
292
295
|
}
|
|
296
|
+
if (renderTableCell) {
|
|
297
|
+
// Same index the tooltip uses: trend datasets stay in the count, filteredDatasets drops them
|
|
298
|
+
const datasetIndex = data.datasets.indexOf(dataset);
|
|
299
|
+
return _jsx("td", {
|
|
300
|
+
children: isEmptyDataPoint(matchingDataPoint.y) ? "-" : renderTableCell(matchingDataPoint, datasetIndex, dataset)
|
|
301
|
+
}, dsIndex);
|
|
302
|
+
}
|
|
303
|
+
const yValue = matchingDataPoint.y;
|
|
304
|
+
const cellContent = typeof yValue === "number" ? truncateDecimals(yValue, datasetDecimalPlaces) : yValue;
|
|
293
305
|
return _jsx("td", {
|
|
294
306
|
children: cellContent
|
|
295
307
|
}, dsIndex);
|
|
@@ -301,6 +313,11 @@ export const AccessibleChartTable = ({
|
|
|
301
313
|
}), data.datasets.map((dataset, dsIndex) => {
|
|
302
314
|
const yValue = dataset.data[yIndex];
|
|
303
315
|
const datasetDecimalPlaces = decimalPlacesPerDataset.get(dsIndex);
|
|
316
|
+
if (renderTableCell) {
|
|
317
|
+
return _jsx("td", {
|
|
318
|
+
children: isEmptyDataPoint(yValue) ? "" : renderTableCell(yValue, dsIndex, dataset)
|
|
319
|
+
}, dsIndex);
|
|
320
|
+
}
|
|
304
321
|
return _jsx("td", {
|
|
305
322
|
children: typeof yValue === "number" ? truncateDecimals(yValue, datasetDecimalPlaces) : yValue
|
|
306
323
|
}, dsIndex);
|
|
@@ -311,8 +328,14 @@ export const AccessibleChartTable = ({
|
|
|
311
328
|
children: yLabel.toString()
|
|
312
329
|
}), data.datasets.map((dataset, dsIndex) => {
|
|
313
330
|
var _a;
|
|
314
|
-
const y = (_a = dataset.data[yIndex]) === null || _a === void 0 ? void 0 : _a.y;
|
|
315
331
|
const datasetDecimalPlaces = decimalPlacesPerDataset.get(dsIndex);
|
|
332
|
+
if (renderTableCell) {
|
|
333
|
+
const dataPoint = dataset.data[yIndex];
|
|
334
|
+
return _jsx("td", {
|
|
335
|
+
children: isEmptyDataPoint(dataPoint) ? "" : renderTableCell(dataPoint, dsIndex, dataset)
|
|
336
|
+
}, dsIndex);
|
|
337
|
+
}
|
|
338
|
+
const y = (_a = dataset.data[yIndex]) === null || _a === void 0 ? void 0 : _a.y;
|
|
316
339
|
const yValue = typeof y === "number" ? truncateDecimals(y, datasetDecimalPlaces) : y || "";
|
|
317
340
|
return _jsx("td", {
|
|
318
341
|
children: yValue
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { ChartData, ChartDataset } from "chart.js";
|
|
2
3
|
import { IBarChartData, IBarChartDataset, IBarChartOptions, IBarChartPoint } from "../barChart/interfaces";
|
|
3
4
|
import { ILineChartData, ILineChartDataset, ILineChartOptions, ILineChartPoint } from "../lineChart/interfaces";
|
|
4
|
-
import { IPieChartData } from "../pieChart/interfaces";
|
|
5
|
+
import { IPieChartData, IPieChartDataset } from "../pieChart/interfaces";
|
|
5
6
|
import { BarChartType, LineChartType, PieChartType } from "../chart";
|
|
6
7
|
export type AccessibleChartData = ILineChartData | IBarChartData | IPieChartData | ChartData<"line">;
|
|
7
8
|
export type AccessibleChartType = LineChartType | BarChartType | PieChartType | "line-mini";
|
|
8
|
-
export type AccessibleChartDataset = ILineChartDataset | IBarChartDataset | ChartDataset<"line"
|
|
9
|
+
export type AccessibleChartDataset = ILineChartDataset | IBarChartDataset | ChartDataset<"line"> | IPieChartDataset;
|
|
10
|
+
export type AccessibleTableCellRenderer = (dataPoint: ILineChartPoint | IBarChartPoint | number, datasetIndex: number, dataset: AccessibleChartDataset) => ReactNode;
|
|
11
|
+
export interface IChartAccessibilityOptions {
|
|
12
|
+
renderTableCell?: AccessibleTableCellRenderer;
|
|
13
|
+
}
|
|
9
14
|
export interface IAccessibleChart {
|
|
10
15
|
data: AccessibleChartData;
|
|
11
16
|
type: AccessibleChartType;
|
|
12
17
|
options?: ILineChartOptions | IBarChartOptions;
|
|
13
18
|
narrativeId?: string;
|
|
19
|
+
accessibility?: IChartAccessibilityOptions;
|
|
14
20
|
}
|
|
15
21
|
export interface IChartTrend {
|
|
16
22
|
trendDirection: "increases" | "decreases" | "flat" | "complex" | "undefined";
|
package/esm/chart/barChart.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ILegendOptions } from "./plugins/legend/interfaces";
|
|
|
8
8
|
import { ITooltipOptions } from "./plugins/tooltip/interfaces";
|
|
9
9
|
import { IChartInsight } from "./chartInsight/chartInsight";
|
|
10
10
|
import { IChartSummary } from "./interfaces";
|
|
11
|
+
import { IChartAccessibilityOptions } from "./accessibleChart/interfaces";
|
|
11
12
|
export interface IBarChart extends IZenComponentProps {
|
|
12
13
|
data: IBarChartData;
|
|
13
14
|
options?: IBarChartOptions;
|
|
@@ -17,5 +18,6 @@ export interface IBarChart extends IZenComponentProps {
|
|
|
17
18
|
insight?: IChartInsight | false;
|
|
18
19
|
summary?: IChartSummary | false;
|
|
19
20
|
plugins?: Plugin<"bar">[];
|
|
21
|
+
accessibility?: IChartAccessibilityOptions;
|
|
20
22
|
}
|
|
21
|
-
export declare const BarChart: ({ data, options, axis, insight, summary, legend, tooltip, plugins, className, ...rest }: IBarChart) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const BarChart: ({ data, options, axis, insight, summary, legend, tooltip, plugins, className, accessibility, ...rest }: IBarChart) => import("react/jsx-runtime").JSX.Element;
|
package/esm/chart/barChart.js
CHANGED
|
@@ -78,9 +78,10 @@ export const BarChart = _a => {
|
|
|
78
78
|
legend,
|
|
79
79
|
tooltip,
|
|
80
80
|
plugins,
|
|
81
|
-
className
|
|
81
|
+
className,
|
|
82
|
+
accessibility
|
|
82
83
|
} = _a,
|
|
83
|
-
rest = __rest(_a, ["data", "options", "axis", "insight", "summary", "legend", "tooltip", "plugins", "className"]);
|
|
84
|
+
rest = __rest(_a, ["data", "options", "axis", "insight", "summary", "legend", "tooltip", "plugins", "className", "accessibility"]);
|
|
84
85
|
const {
|
|
85
86
|
translate
|
|
86
87
|
} = useLanguage();
|
|
@@ -169,7 +170,8 @@ export const BarChart = _a => {
|
|
|
169
170
|
type: "bar",
|
|
170
171
|
data: chartData,
|
|
171
172
|
options: chartOptions,
|
|
172
|
-
narrativeId: narrativeId
|
|
173
|
+
narrativeId: narrativeId,
|
|
174
|
+
accessibility: accessibility
|
|
173
175
|
})]
|
|
174
176
|
});
|
|
175
177
|
};
|
package/esm/chart/lineChart.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ILegendOptions } from "./plugins/legend/interfaces";
|
|
|
8
8
|
import { ILineOptions } from "./plugins/linePlugin/interfaces";
|
|
9
9
|
import { IChartInsight } from "./chartInsight/chartInsight";
|
|
10
10
|
import { IChartSummary } from "./interfaces";
|
|
11
|
+
import { IChartAccessibilityOptions } from "./accessibleChart/interfaces";
|
|
11
12
|
export interface ILineChart extends IZenComponentProps {
|
|
12
13
|
data: ILineChartData;
|
|
13
14
|
options?: ILineChartOptions;
|
|
@@ -17,5 +18,6 @@ export interface ILineChart extends IZenComponentProps {
|
|
|
17
18
|
summary?: IChartSummary | false;
|
|
18
19
|
tooltip?: ILineOptions | false;
|
|
19
20
|
plugins?: Plugin<"line">[];
|
|
21
|
+
accessibility?: IChartAccessibilityOptions;
|
|
20
22
|
}
|
|
21
|
-
export declare const LineChart: ({ data, options, axis, insight, summary, legend, tooltip, plugins, className, ...rest }: ILineChart) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const LineChart: ({ data, options, axis, insight, summary, legend, tooltip, plugins, className, accessibility, ...rest }: ILineChart) => import("react/jsx-runtime").JSX.Element;
|
package/esm/chart/lineChart.js
CHANGED
|
@@ -81,9 +81,10 @@ export const LineChart = _a => {
|
|
|
81
81
|
legend,
|
|
82
82
|
tooltip,
|
|
83
83
|
plugins,
|
|
84
|
-
className
|
|
84
|
+
className,
|
|
85
|
+
accessibility
|
|
85
86
|
} = _a,
|
|
86
|
-
rest = __rest(_a, ["data", "options", "axis", "insight", "summary", "legend", "tooltip", "plugins", "className"]);
|
|
87
|
+
rest = __rest(_a, ["data", "options", "axis", "insight", "summary", "legend", "tooltip", "plugins", "className", "accessibility"]);
|
|
87
88
|
const {
|
|
88
89
|
translate
|
|
89
90
|
} = useLanguage();
|
|
@@ -187,7 +188,8 @@ export const LineChart = _a => {
|
|
|
187
188
|
type: "line",
|
|
188
189
|
data: chartData,
|
|
189
190
|
options: chartOptions,
|
|
190
|
-
narrativeId: narrativeId
|
|
191
|
+
narrativeId: narrativeId,
|
|
192
|
+
accessibility: accessibility
|
|
191
193
|
})]
|
|
192
194
|
});
|
|
193
195
|
};
|
package/esm/chart/pieChart.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IPieChartData, IPieChartOptions, IPieLegendOptions } from "./pieChart/i
|
|
|
7
7
|
import { ITooltipOptions } from "./plugins/tooltip/interfaces";
|
|
8
8
|
import { IChartInsight } from "./chartInsight/chartInsight";
|
|
9
9
|
import { IChartSummary } from "./interfaces";
|
|
10
|
+
import { IChartAccessibilityOptions } from "./accessibleChart/interfaces";
|
|
10
11
|
export interface IPieChart extends IZenComponentProps {
|
|
11
12
|
data: IPieChartData;
|
|
12
13
|
options?: IPieChartOptions;
|
|
@@ -15,5 +16,6 @@ export interface IPieChart extends IZenComponentProps {
|
|
|
15
16
|
legend?: IPieLegendOptions | false;
|
|
16
17
|
tooltip?: ITooltipOptions | false;
|
|
17
18
|
plugins?: Plugin<"pie">[];
|
|
19
|
+
accessibility?: IChartAccessibilityOptions;
|
|
18
20
|
}
|
|
19
|
-
export declare const PieChart: ({ data, options, insight, summary, legend, tooltip, plugins, className, ...rest }: IPieChart) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const PieChart: ({ data, options, insight, summary, legend, tooltip, plugins, className, accessibility, ...rest }: IPieChart) => import("react/jsx-runtime").JSX.Element;
|
package/esm/chart/pieChart.js
CHANGED
|
@@ -73,9 +73,10 @@ export const PieChart = _a => {
|
|
|
73
73
|
legend,
|
|
74
74
|
tooltip,
|
|
75
75
|
plugins,
|
|
76
|
-
className
|
|
76
|
+
className,
|
|
77
|
+
accessibility
|
|
77
78
|
} = _a,
|
|
78
|
-
rest = __rest(_a, ["data", "options", "insight", "summary", "legend", "tooltip", "plugins", "className"]);
|
|
79
|
+
rest = __rest(_a, ["data", "options", "insight", "summary", "legend", "tooltip", "plugins", "className", "accessibility"]);
|
|
79
80
|
const {
|
|
80
81
|
isHorizontal
|
|
81
82
|
} = options;
|
|
@@ -186,7 +187,8 @@ export const PieChart = _a => {
|
|
|
186
187
|
}), _jsx(AccessibleChart, {
|
|
187
188
|
type: "pie",
|
|
188
189
|
data: data,
|
|
189
|
-
narrativeId: narrativeId
|
|
190
|
+
narrativeId: narrativeId,
|
|
191
|
+
accessibility: accessibility
|
|
190
192
|
})]
|
|
191
193
|
});
|
|
192
194
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isEmptyDataPoint: (value: unknown) => value is null | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const isEmptyDataPoint = (value) => value === null || value === undefined;
|
|
@@ -9,6 +9,8 @@ interface IActionIcon<T> {
|
|
|
9
9
|
createSize?: (entity: T) => TIconSize;
|
|
10
10
|
createTitle?: (entity: T, isNested: boolean) => string | undefined;
|
|
11
11
|
createLink?: (entity: T, isNested: boolean) => string | undefined;
|
|
12
|
+
/** Value for `data-analytics-id` on the icon button or link */
|
|
13
|
+
createDataAnalyticsId?: (entity: T, isNested: boolean) => string | undefined;
|
|
12
14
|
condition?: (entity: T, isNested: boolean) => boolean;
|
|
13
15
|
onClick?: TOnClick<T>;
|
|
14
16
|
className?: string | undefined;
|
|
@@ -42,7 +42,7 @@ export class MainColumnWrapper {
|
|
|
42
42
|
return title;
|
|
43
43
|
}
|
|
44
44
|
renderIcon(entity, isNested) {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
46
46
|
const Icon = this.options.icon ? this.options.icon.createIcon(entity, isNested) : null;
|
|
47
47
|
if (!Icon) {
|
|
48
48
|
return null;
|
|
@@ -58,6 +58,6 @@ export class MainColumnWrapper {
|
|
|
58
58
|
const link = (_d = (_c = this.options.icon) === null || _c === void 0 ? void 0 : _c.createLink) === null || _d === void 0 ? void 0 : _d.call(_c, entity, isNested);
|
|
59
59
|
const title = (_f = (_e = this.options.icon) === null || _e === void 0 ? void 0 : _e.createTitle) === null || _f === void 0 ? void 0 : _f.call(_e, entity, isNested);
|
|
60
60
|
const iconClassName = (_g = this.options.icon) === null || _g === void 0 ? void 0 : _g.className;
|
|
61
|
-
return (_jsx(PrimaryIcon, { icon: Icon, className: iconClassName, style: isNested ? "secondary" : undefined, onClick: handleOnClick, link: link, title: title, disabled: isDisabled }));
|
|
61
|
+
return (_jsx(PrimaryIcon, { icon: Icon, className: iconClassName, style: isNested ? "secondary" : undefined, onClick: handleOnClick, link: link, title: title, disabled: isDisabled, dataAnalyticsId: (_j = (_h = this.options.icon) === null || _h === void 0 ? void 0 : _h.createDataAnalyticsId) === null || _j === void 0 ? void 0 : _j.call(_h, entity, isNested) }));
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IUploadedFile } from "../fileUploadType";
|
|
2
|
+
import { IPreviewState } from "./previewableFile";
|
|
3
|
+
interface IFilePreviewProps {
|
|
4
|
+
/** Base for `data-analytics-id` on the preview buttons */
|
|
5
|
+
analyticsBase: string;
|
|
6
|
+
preview: IPreviewState | null;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** When provided, a Download action is shown in the preview (modal footer or inline header) */
|
|
9
|
+
onDownload?: (file: IUploadedFile) => void;
|
|
10
|
+
/** Disables the Open in new tab and Download actions, mirroring the row buttons while uploading or when the component is disabled */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
translate: (key: string) => string;
|
|
13
|
+
}
|
|
14
|
+
export declare const FilePreview: ({ analyticsBase, preview, onClose, onDownload, disabled, translate }: IFilePreviewProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export {};
|