@duyluonganduin/acl-web-components 0.0.48 → 0.0.50
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/dist/acl-web-components.cjs +1 -1
- package/dist/acl-web-components.d.ts +461 -0
- package/dist/acl-web-components.iife.js +717 -192
- package/dist/acl-web-components.js +115 -105
- package/dist/{anduin-date-picker-oFZyH03y.js → anduin-table-8Tp0vpg-.js} +2714 -1601
- package/dist/{anduin-date-picker-BHLmPYcA.cjs → anduin-table-Cj9IrT0Q.cjs} +704 -179
- package/dist/jsx.d.ts +44 -0
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +447 -0
- package/dist/react.js +186 -161
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./anduin-date-picker-BHLmPYcA.cjs"),o=':root{--color-gray-0: oklch(1 0 0);--color-gray-1: oklch(.9846 .0017 247.84);--color-gray-2: oklch(.9515 .0046 258.32);--color-gray-3: oklch(.9336 .0058 264.53);--color-gray-4: oklch(.8618 .0141 258.35);--color-gray-5: oklch(.7073 .0268 263.28);--color-gray-6: oklch(.6528 .0316 266.24);--color-gray-7: oklch(.5371 .0337 264.24);--color-gray-8: oklch(.3544 .0326 260.94);--color-gray-9: oklch(.2776 .0341 255.81);--color-danger-1: oklch(.9437 .0174 17.47);--color-danger-2: oklch(.8643 .0573 18.32);--color-danger-3: oklch(.712 .1517 21.64);--color-danger-4: oklch(.5948 .2165 26.91);--color-danger-5: oklch(.531 .2147 28.91);--color-primary-1: oklch(.9474 .0256 221.57);--color-primary-2: oklch(.8652 .066 236.86);--color-primary-3: oklch(.7219 .1335 240.15);--color-primary-4: oklch(.5679 .1784 254.76);--color-primary-5: oklch(.4682 .1548 255.23);--color-success-1: oklch(.9276 .0541 150.91);--color-success-2: oklch(.8592 .1078 149.75);--color-success-3: oklch(.6953 .1711 149.14);--color-success-4: oklch(.6149 .1634 148.21);--color-success-5: oklch(.5075 .136 146.46);--color-warning-1: oklch(.9549 .0496 88.08);--color-warning-2: oklch(.912 .0811 83.56);--color-warning-3: oklch(.8282 .1628 78.73);--color-warning-4: oklch(.7325 .1512 75.97);--color-warning-5: oklch(.5329 .1098 82);--color-semantic-gray-0: oklch(1 0 0);--color-semantic-gray-1: oklch(.9846 .0017 247.84);--color-semantic-gray-2: oklch(.9515 .0046 258.32);--color-semantic-gray-3: oklch(.9336 .0058 264.53);--color-semantic-gray-4: oklch(.8618 .0141 258.35);--color-semantic-gray-5: oklch(.7073 .0268 263.28);--color-semantic-gray-6: oklch(.6528 .0316 266.24);--color-semantic-gray-7: oklch(.5371 .0337 264.24);--color-semantic-gray-8: oklch(.3544 .0326 260.94);--color-semantic-gray-9: oklch(.2776 .0341 255.81);--color-semantic-danger-1: oklch(.9437 .0174 17.47);--color-semantic-danger-2: oklch(.8643 .0573 18.32);--color-semantic-danger-3: oklch(.712 .1517 21.64);--color-semantic-danger-4: oklch(.5948 .2165 26.91);--color-semantic-danger-5: oklch(.531 .2147 28.91);--color-semantic-primary-1: oklch(.9474 .0256 221.57);--color-semantic-primary-2: oklch(.8652 .066 236.86);--color-semantic-primary-3: oklch(.7219 .1335 240.15);--color-semantic-primary-4: oklch(.5679 .1784 254.76);--color-semantic-primary-5: oklch(.4682 .1548 255.23);--color-semantic-success-1: oklch(.9276 .0541 150.91);--color-semantic-success-2: oklch(.8592 .1078 149.75);--color-semantic-success-3: oklch(.6953 .1711 149.14);--color-semantic-success-4: oklch(.6149 .1634 148.21);--color-semantic-success-5: oklch(.5075 .136 146.46);--color-semantic-warning-1: oklch(.9549 .0496 88.08);--color-semantic-warning-2: oklch(.912 .0811 83.56);--color-semantic-warning-3: oklch(.8282 .1628 78.73);--color-semantic-warning-4: oklch(.7325 .1512 75.97);--color-semantic-warning-5: oklch(.5329 .1098 82);--color-purple-50: oklch(.9676 .016 286.1);--color-purple-100: oklch(.9434 .0255 288.32);--color-purple-200: oklch(.8927 .0519 287.71);--color-purple-300: oklch(.81 .0925 287.61);--color-purple-400: oklch(.7048 .1478 287.77);--color-purple-500: oklch(.5961 .2043 286.53);--color-purple-600: oklch(.5316 .2303 286.64);--color-purple-700: oklch(.471 .2307 285.3);--color-purple-800: oklch(.4148 .2014 285.43);--color-purple-900: oklch(.3654 .17 286.37);--color-purple-950: oklch(.2734 .1288 284.42);--color-white: var(--color-gray-0);--font-sans: system-ui, -apple-system, Roboto, Oxygen, Cantarell, Ubuntu, "Segoe UI", sans-serif;--font-mono: monospace;--text-9: 9px;--text-10: 10px;--text-11: 11px;--text-12: 12px;--text-13: 13px;--text-15: 15px;--text-17: 17px;--text-20: 20px;--text-23: 23px;--text-26: 26px;--text-30: 30px;--text-35: 35px;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--leading-16: 16px;--leading-20: 20px;--leading-24: 24px;--leading-28: 28px;--leading-32: 32px;--leading-40: 40px;--leading-44: 44px;--leading-r1p5: 1.5;--radius-0: 0;--radius-2: 2px;--radius-3: 3px;--radius-4: 4px;--radius-6: 6px;--radius-8: 8px;--radius-12: 12px;--radius-16: 16px;--radius-20: 20px;--radius-24: 24px;--radius-full: 9999px;--shadow-1: 0px 1px 2px rgba(29, 41, 57, .07);--shadow-2: 0px 1px 2px rgba(29, 41, 57, .04), 0px 2px 8px rgba(29, 41, 57, .08);--shadow-3: 0px 2px 8px rgba(29, 41, 57, .08), 0px 8px 24px rgba(29, 41, 57, .12);--shadow-4: 0px 4px 8px rgba(29, 41, 57, .08), 0px 16px 48px rgba(29, 41, 57, .16);--spacing-px: 1px;--spacing-0: 0;--spacing-2: 2px;--spacing-4: 4px;--spacing-6: 6px;--spacing-8: 8px;--spacing-12: 12px;--spacing-16: 16px;--spacing-20: 20px;--spacing-24: 24px;--spacing-28: 28px;--spacing-32: 32px;--spacing-40: 40px;--spacing-48: 48px;--spacing-56: 56px;--spacing-64: 64px;--spacing-128: 128px;--spacing-256: 256px;--z-0: 0;--z-1: 1;--z-2: 2;--z-3: 3;--z-4: 4;--z-5: 5;--z-999: 999;--z-9999: 9999}body{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--text-13)}';if(typeof document<"u"&&!document.getElementById("acl-tokens")){const i=document.createElement("style");i.id="acl-tokens",i.textContent=o,document.head.appendChild(i)}exports.AnduinAvatar=n.AnduinAvatar;exports.AnduinBadge=n.AnduinBadge;exports.AnduinBadgeCount=n.AnduinBadgeCount;exports.AnduinButton=n.AnduinButton;exports.AnduinCalendar=n.AnduinCalendar;exports.AnduinCallout=n.AnduinCallout;exports.AnduinCheckbox=n.AnduinCheckbox;exports.AnduinDateInput=n.AnduinDateInput;exports.AnduinDatePicker=n.AnduinDatePicker;exports.AnduinDateRange=n.AnduinDateRange;exports.AnduinDateRangeDefault=n.AnduinDateRangeDefault;exports.AnduinDateRangeEnd=n.AnduinDateRangeEnd;exports.AnduinDateRangePanel=n.AnduinDateRangePanel;exports.AnduinDateRangeStart=n.AnduinDateRangeStart;exports.AnduinDivider=n.AnduinDivider;exports.AnduinDot=n.AnduinDot;exports.AnduinDrawer=n.AnduinDrawer;exports.AnduinDrawerClose=n.AnduinDrawerClose;exports.AnduinDropdown=n.AnduinDropdown;exports.AnduinField=n.AnduinField;exports.AnduinFieldDescription=n.AnduinFieldDescription;exports.AnduinFieldError=n.AnduinFieldError;exports.AnduinFieldGroup=n.AnduinFieldGroup;exports.AnduinFieldLabel=n.AnduinFieldLabel;exports.AnduinFileIcon=n.AnduinFileIcon;exports.AnduinIcon=n.AnduinIcon;exports.AnduinInput=n.AnduinInput;exports.AnduinLoadingState=n.AnduinLoadingState;exports.AnduinMenu=n.AnduinMenu;exports.AnduinMenuItem=n.AnduinMenuItem;exports.AnduinModal=n.AnduinModal;exports.AnduinModalClose=n.AnduinModalClose;exports.AnduinNavigation=n.AnduinNavigation;exports.AnduinNavigationItem=n.AnduinNavigationItem;exports.AnduinPagination=n.AnduinPagination;exports.AnduinPaginationFirstPage=n.AnduinPaginationFirstPage;exports.AnduinPaginationLastPage=n.AnduinPaginationLastPage;exports.AnduinPopover=n.AnduinPopover;exports.AnduinPopoverClose=n.AnduinPopoverClose;exports.AnduinProgress=n.AnduinProgress;exports.AnduinRadio=n.AnduinRadio;exports.AnduinRadioGroup=n.AnduinRadioGroup;exports.AnduinResizableHandle=n.AnduinResizableHandle;exports.AnduinResizablePanel=n.AnduinResizablePanel;exports.AnduinResizablePanelGroup=n.AnduinResizablePanelGroup;exports.AnduinSidebar=n.AnduinSidebar;exports.AnduinSidebarAction=n.AnduinSidebarAction;exports.AnduinSidebarBadge=n.AnduinSidebarBadge;exports.AnduinSidebarContent=n.AnduinSidebarContent;exports.AnduinSidebarFooter=n.AnduinSidebarFooter;exports.AnduinSidebarGroup=n.AnduinSidebarGroup;exports.AnduinSidebarGroupLabel=n.AnduinSidebarGroupLabel;exports.AnduinSidebarHeader=n.AnduinSidebarHeader;exports.AnduinSidebarMenu=n.AnduinSidebarMenu;exports.AnduinSidebarMenuItem=n.AnduinSidebarMenuItem;exports.AnduinSidebarSeparator=n.AnduinSidebarSeparator;exports.AnduinSkeleton=n.AnduinSkeleton;exports.AnduinSparkleSpinner=n.AnduinSparkleSpinner;exports.AnduinSpinner=n.AnduinSpinner;exports.AnduinSuggestion=n.AnduinSuggestion;exports.AnduinSwitcher=n.AnduinSwitcher;exports.AnduinTabContent=n.AnduinTabContent;exports.AnduinTabTrigger=n.AnduinTabTrigger;exports.AnduinTabs=n.AnduinTabs;exports.AnduinTabsList=n.AnduinTabsList;exports.AnduinTag=n.AnduinTag;exports.AnduinTagClose=n.AnduinTagClose;exports.AnduinTextarea=n.AnduinTextarea;exports.AnduinTimeline=n.AnduinTimeline;exports.AnduinTimelineDate=n.AnduinTimelineDate;exports.AnduinTimelineGroup=n.AnduinTimelineGroup;exports.AnduinTimelineItem=n.AnduinTimelineItem;exports.AnduinTimelineLabel=n.AnduinTimelineLabel;exports.AnduinTimelineTitle=n.AnduinTimelineTitle;exports.AnduinToast=n.AnduinToast;exports.AnduinToaster=n.AnduinToaster;exports.AnduinToggleGroup=n.AnduinToggleGroup;exports.AnduinToggleGroupItem=n.AnduinToggleGroupItem;exports.AnduinTooltip=n.AnduinTooltip;exports.AnduinTooltipContent=n.AnduinTooltipContent;exports.AnduinTooltipTrigger=n.AnduinTooltipTrigger;exports.AnduinWell=n.AnduinWell;exports.AnduinWellClose=n.AnduinWellClose;exports.BADGE_STYLES=n.BADGE_STYLES;exports.CALENDAR_CHANGE=n.CALENDAR_CHANGE;exports.CALENDAR_DAY_HOVER=n.CALENDAR_DAY_HOVER;exports.CHECKBOX_CHANGE=n.CHECKBOX_CHANGE;exports.DATE_INPUT_CHANGE=n.DATE_INPUT_CHANGE;exports.DATE_PICKER_CHANGE=n.DATE_PICKER_CHANGE;exports.DATE_RANGE_CHANGE=n.DATE_RANGE_CHANGE;exports.DRAWER_AFTER_CLOSE_EVENT=n.DRAWER_AFTER_CLOSE_EVENT;exports.DRAWER_CLOSE_EVENT=n.DRAWER_CLOSE_EVENT;exports.DROPDOWN_CHANGE=n.DROPDOWN_CHANGE;exports.FIELD_LABEL_CLICK=n.FIELD_LABEL_CLICK;exports.FIELD_LABEL_CLICK_COORDINATED=n.FIELD_LABEL_CLICK_COORDINATED;exports.FILE_ICONS=n.FILE_ICONS;exports.INPUT_CHANGE=n.INPUT_CHANGE;exports.INPUT_CLEAR=n.INPUT_CLEAR;exports.MENU_ITEM_CLICK=n.MENU_ITEM_CLICK;exports.MODAL_AFTER_CLOSE_EVENT=n.MODAL_AFTER_CLOSE_EVENT;exports.MODAL_CLOSE_EVENT=n.MODAL_CLOSE_EVENT;exports.NAVIGATION_CHANGE=n.NAVIGATION_CHANGE;exports.NAVIGATION_ITEM_CLICK=n.NAVIGATION_ITEM_CLICK;exports.PAGINATION_CHANGE=n.PAGINATION_CHANGE;exports.PAGINATION_JUMP=n.PAGINATION_JUMP;exports.POPOVER_CLOSE=n.POPOVER_CLOSE;exports.POPOVER_OPEN_CHANGE=n.POPOVER_OPEN_CHANGE;exports.RADIO_CHANGE=n.RADIO_CHANGE;exports.RADIO_GROUP_CHANGE=n.RADIO_GROUP_CHANGE;exports.RESIZE_EVENT=n.RESIZE_EVENT;exports.SIDEBAR_SELECT=n.SIDEBAR_SELECT;exports.SUGGESTION_CHANGE=n.SUGGESTION_CHANGE;exports.SUGGESTION_CLEAR=n.SUGGESTION_CLEAR;exports.SUGGESTION_SELECT=n.SUGGESTION_SELECT;exports.SWITCHER_CHANGE=n.SWITCHER_CHANGE;exports.TAB_CHANGE=n.TAB_CHANGE;exports.TAB_TRIGGER_CLICK=n.TAB_TRIGGER_CLICK;exports.TAB_VALUE_CHANGED=n.TAB_VALUE_CHANGED;exports.TAG_CLOSE_CLICK=n.TAG_CLOSE_CLICK;exports.TEXTAREA_CHANGE=n.TEXTAREA_CHANGE;exports.TOGGLE_GROUP_CHANGE=n.TOGGLE_GROUP_CHANGE;exports.TOGGLE_GROUP_ITEM_CHANGE=n.TOGGLE_GROUP_ITEM_CHANGE;exports.TOGGLE_GROUP_ITEM_CLICK=n.TOGGLE_GROUP_ITEM_CLICK;exports.TOGGLE_GROUP_ITEM_DESELECT=n.TOGGLE_GROUP_ITEM_DESELECT;exports.TOGGLE_GROUP_ITEM_SELECT=n.TOGGLE_GROUP_ITEM_SELECT;exports.TOOLTIP_CONTENT_POPUP_MOUNTED=n.TOOLTIP_CONTENT_POPUP_MOUNTED;exports.TOOLTIP_CONTENT_POPUP_UNMOUNTED=n.TOOLTIP_CONTENT_POPUP_UNMOUNTED;exports.TOOLTIP_HIDE=n.TOOLTIP_HIDE;exports.TOOLTIP_SHOW=n.TOOLTIP_SHOW;exports.TOOLTIP_TRIGGER_MOUNTED=n.TOOLTIP_TRIGGER_MOUNTED;exports.TOOLTIP_VISIBILITY_CHANGED=n.TOOLTIP_VISIBILITY_CHANGED;exports.WELL_CLOSE_CLICK=n.WELL_CLOSE_CLICK;exports.addMonths=n.addMonths;exports.formatISODate=n.formatISODate;exports.getBadgeVariantClass=n.getBadgeVariantClass;exports.parseISODate=n.parseISODate;exports.resolveFileIcon=n.resolveFileIcon;exports.startOfToday=n.startOfToday;exports.toast=n.toast;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./anduin-table-Cj9IrT0Q.cjs"),o=':root{--color-gray-0: oklch(1 0 0);--color-gray-1: oklch(.9846 .0017 247.84);--color-gray-2: oklch(.9515 .0046 258.32);--color-gray-3: oklch(.9336 .0058 264.53);--color-gray-4: oklch(.8618 .0141 258.35);--color-gray-5: oklch(.7073 .0268 263.28);--color-gray-6: oklch(.6528 .0316 266.24);--color-gray-7: oklch(.5371 .0337 264.24);--color-gray-8: oklch(.3544 .0326 260.94);--color-gray-9: oklch(.2776 .0341 255.81);--color-danger-1: oklch(.9437 .0174 17.47);--color-danger-2: oklch(.8643 .0573 18.32);--color-danger-3: oklch(.712 .1517 21.64);--color-danger-4: oklch(.5948 .2165 26.91);--color-danger-5: oklch(.531 .2147 28.91);--color-primary-1: oklch(.9474 .0256 221.57);--color-primary-2: oklch(.8652 .066 236.86);--color-primary-3: oklch(.7219 .1335 240.15);--color-primary-4: oklch(.5679 .1784 254.76);--color-primary-5: oklch(.4682 .1548 255.23);--color-success-1: oklch(.9276 .0541 150.91);--color-success-2: oklch(.8592 .1078 149.75);--color-success-3: oklch(.6953 .1711 149.14);--color-success-4: oklch(.6149 .1634 148.21);--color-success-5: oklch(.5075 .136 146.46);--color-warning-1: oklch(.9549 .0496 88.08);--color-warning-2: oklch(.912 .0811 83.56);--color-warning-3: oklch(.8282 .1628 78.73);--color-warning-4: oklch(.7325 .1512 75.97);--color-warning-5: oklch(.5329 .1098 82);--color-semantic-gray-0: oklch(1 0 0);--color-semantic-gray-1: oklch(.9846 .0017 247.84);--color-semantic-gray-2: oklch(.9515 .0046 258.32);--color-semantic-gray-3: oklch(.9336 .0058 264.53);--color-semantic-gray-4: oklch(.8618 .0141 258.35);--color-semantic-gray-5: oklch(.7073 .0268 263.28);--color-semantic-gray-6: oklch(.6528 .0316 266.24);--color-semantic-gray-7: oklch(.5371 .0337 264.24);--color-semantic-gray-8: oklch(.3544 .0326 260.94);--color-semantic-gray-9: oklch(.2776 .0341 255.81);--color-semantic-danger-1: oklch(.9437 .0174 17.47);--color-semantic-danger-2: oklch(.8643 .0573 18.32);--color-semantic-danger-3: oklch(.712 .1517 21.64);--color-semantic-danger-4: oklch(.5948 .2165 26.91);--color-semantic-danger-5: oklch(.531 .2147 28.91);--color-semantic-primary-1: oklch(.9474 .0256 221.57);--color-semantic-primary-2: oklch(.8652 .066 236.86);--color-semantic-primary-3: oklch(.7219 .1335 240.15);--color-semantic-primary-4: oklch(.5679 .1784 254.76);--color-semantic-primary-5: oklch(.4682 .1548 255.23);--color-semantic-success-1: oklch(.9276 .0541 150.91);--color-semantic-success-2: oklch(.8592 .1078 149.75);--color-semantic-success-3: oklch(.6953 .1711 149.14);--color-semantic-success-4: oklch(.6149 .1634 148.21);--color-semantic-success-5: oklch(.5075 .136 146.46);--color-semantic-warning-1: oklch(.9549 .0496 88.08);--color-semantic-warning-2: oklch(.912 .0811 83.56);--color-semantic-warning-3: oklch(.8282 .1628 78.73);--color-semantic-warning-4: oklch(.7325 .1512 75.97);--color-semantic-warning-5: oklch(.5329 .1098 82);--color-purple-50: oklch(.9676 .016 286.1);--color-purple-100: oklch(.9434 .0255 288.32);--color-purple-200: oklch(.8927 .0519 287.71);--color-purple-300: oklch(.81 .0925 287.61);--color-purple-400: oklch(.7048 .1478 287.77);--color-purple-500: oklch(.5961 .2043 286.53);--color-purple-600: oklch(.5316 .2303 286.64);--color-purple-700: oklch(.471 .2307 285.3);--color-purple-800: oklch(.4148 .2014 285.43);--color-purple-900: oklch(.3654 .17 286.37);--color-purple-950: oklch(.2734 .1288 284.42);--color-white: var(--color-gray-0);--font-sans: system-ui, -apple-system, Roboto, Oxygen, Cantarell, Ubuntu, "Segoe UI", sans-serif;--font-mono: monospace;--text-9: 9px;--text-10: 10px;--text-11: 11px;--text-12: 12px;--text-13: 13px;--text-15: 15px;--text-17: 17px;--text-20: 20px;--text-23: 23px;--text-26: 26px;--text-30: 30px;--text-35: 35px;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--leading-16: 16px;--leading-20: 20px;--leading-24: 24px;--leading-28: 28px;--leading-32: 32px;--leading-40: 40px;--leading-44: 44px;--leading-r1p5: 1.5;--radius-0: 0;--radius-2: 2px;--radius-3: 3px;--radius-4: 4px;--radius-6: 6px;--radius-8: 8px;--radius-12: 12px;--radius-16: 16px;--radius-20: 20px;--radius-24: 24px;--radius-full: 9999px;--shadow-1: 0px 1px 2px rgba(29, 41, 57, .07);--shadow-2: 0px 1px 2px rgba(29, 41, 57, .04), 0px 2px 8px rgba(29, 41, 57, .08);--shadow-3: 0px 2px 8px rgba(29, 41, 57, .08), 0px 8px 24px rgba(29, 41, 57, .12);--shadow-4: 0px 4px 8px rgba(29, 41, 57, .08), 0px 16px 48px rgba(29, 41, 57, .16);--spacing-px: 1px;--spacing-0: 0;--spacing-2: 2px;--spacing-4: 4px;--spacing-6: 6px;--spacing-8: 8px;--spacing-12: 12px;--spacing-16: 16px;--spacing-20: 20px;--spacing-24: 24px;--spacing-28: 28px;--spacing-32: 32px;--spacing-40: 40px;--spacing-48: 48px;--spacing-56: 56px;--spacing-64: 64px;--spacing-128: 128px;--spacing-256: 256px;--z-0: 0;--z-1: 1;--z-2: 2;--z-3: 3;--z-4: 4;--z-5: 5;--z-999: 999;--z-9999: 9999}body{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--text-13)}';if(typeof document<"u"&&!document.getElementById("acl-tokens")){const i=document.createElement("style");i.id="acl-tokens",i.textContent=o,document.head.appendChild(i)}exports.AnduinAvatar=n.AnduinAvatar;exports.AnduinBadge=n.AnduinBadge;exports.AnduinBadgeCount=n.AnduinBadgeCount;exports.AnduinButton=n.AnduinButton;exports.AnduinCalendar=n.AnduinCalendar;exports.AnduinCallout=n.AnduinCallout;exports.AnduinCheckbox=n.AnduinCheckbox;exports.AnduinDateInput=n.AnduinDateInput;exports.AnduinDatePicker=n.AnduinDatePicker;exports.AnduinDateRange=n.AnduinDateRange;exports.AnduinDateRangeDefault=n.AnduinDateRangeDefault;exports.AnduinDateRangeEnd=n.AnduinDateRangeEnd;exports.AnduinDateRangePanel=n.AnduinDateRangePanel;exports.AnduinDateRangeStart=n.AnduinDateRangeStart;exports.AnduinDivider=n.AnduinDivider;exports.AnduinDot=n.AnduinDot;exports.AnduinDrawer=n.AnduinDrawer;exports.AnduinDrawerClose=n.AnduinDrawerClose;exports.AnduinDropdown=n.AnduinDropdown;exports.AnduinField=n.AnduinField;exports.AnduinFieldDescription=n.AnduinFieldDescription;exports.AnduinFieldError=n.AnduinFieldError;exports.AnduinFieldGroup=n.AnduinFieldGroup;exports.AnduinFieldLabel=n.AnduinFieldLabel;exports.AnduinFileIcon=n.AnduinFileIcon;exports.AnduinIcon=n.AnduinIcon;exports.AnduinInput=n.AnduinInput;exports.AnduinLoadingState=n.AnduinLoadingState;exports.AnduinMenu=n.AnduinMenu;exports.AnduinMenuItem=n.AnduinMenuItem;exports.AnduinModal=n.AnduinModal;exports.AnduinModalClose=n.AnduinModalClose;exports.AnduinNavigation=n.AnduinNavigation;exports.AnduinNavigationItem=n.AnduinNavigationItem;exports.AnduinPagination=n.AnduinPagination;exports.AnduinPaginationFirstPage=n.AnduinPaginationFirstPage;exports.AnduinPaginationLastPage=n.AnduinPaginationLastPage;exports.AnduinPopover=n.AnduinPopover;exports.AnduinPopoverClose=n.AnduinPopoverClose;exports.AnduinProgress=n.AnduinProgress;exports.AnduinRadio=n.AnduinRadio;exports.AnduinRadioGroup=n.AnduinRadioGroup;exports.AnduinResizableHandle=n.AnduinResizableHandle;exports.AnduinResizablePanel=n.AnduinResizablePanel;exports.AnduinResizablePanelGroup=n.AnduinResizablePanelGroup;exports.AnduinSidebar=n.AnduinSidebar;exports.AnduinSidebarAction=n.AnduinSidebarAction;exports.AnduinSidebarBadge=n.AnduinSidebarBadge;exports.AnduinSidebarContent=n.AnduinSidebarContent;exports.AnduinSidebarFooter=n.AnduinSidebarFooter;exports.AnduinSidebarGroup=n.AnduinSidebarGroup;exports.AnduinSidebarGroupLabel=n.AnduinSidebarGroupLabel;exports.AnduinSidebarHeader=n.AnduinSidebarHeader;exports.AnduinSidebarMenu=n.AnduinSidebarMenu;exports.AnduinSidebarMenuItem=n.AnduinSidebarMenuItem;exports.AnduinSidebarSeparator=n.AnduinSidebarSeparator;exports.AnduinSkeleton=n.AnduinSkeleton;exports.AnduinSparkleSpinner=n.AnduinSparkleSpinner;exports.AnduinSpinner=n.AnduinSpinner;exports.AnduinSuggestion=n.AnduinSuggestion;exports.AnduinSwitcher=n.AnduinSwitcher;exports.AnduinTabContent=n.AnduinTabContent;exports.AnduinTabTrigger=n.AnduinTabTrigger;exports.AnduinTable=n.AnduinTable;exports.AnduinTabs=n.AnduinTabs;exports.AnduinTabsList=n.AnduinTabsList;exports.AnduinTag=n.AnduinTag;exports.AnduinTagClose=n.AnduinTagClose;exports.AnduinTextarea=n.AnduinTextarea;exports.AnduinTimeline=n.AnduinTimeline;exports.AnduinTimelineDate=n.AnduinTimelineDate;exports.AnduinTimelineGroup=n.AnduinTimelineGroup;exports.AnduinTimelineItem=n.AnduinTimelineItem;exports.AnduinTimelineLabel=n.AnduinTimelineLabel;exports.AnduinTimelineTitle=n.AnduinTimelineTitle;exports.AnduinToast=n.AnduinToast;exports.AnduinToaster=n.AnduinToaster;exports.AnduinToggleGroup=n.AnduinToggleGroup;exports.AnduinToggleGroupItem=n.AnduinToggleGroupItem;exports.AnduinTooltip=n.AnduinTooltip;exports.AnduinTooltipContent=n.AnduinTooltipContent;exports.AnduinTooltipTrigger=n.AnduinTooltipTrigger;exports.AnduinWell=n.AnduinWell;exports.AnduinWellClose=n.AnduinWellClose;exports.BADGE_STYLES=n.BADGE_STYLES;exports.CALENDAR_CHANGE=n.CALENDAR_CHANGE;exports.CALENDAR_DAY_HOVER=n.CALENDAR_DAY_HOVER;exports.CHECKBOX_CHANGE=n.CHECKBOX_CHANGE;exports.DATE_INPUT_CHANGE=n.DATE_INPUT_CHANGE;exports.DATE_PICKER_CHANGE=n.DATE_PICKER_CHANGE;exports.DATE_RANGE_CHANGE=n.DATE_RANGE_CHANGE;exports.DRAWER_AFTER_CLOSE_EVENT=n.DRAWER_AFTER_CLOSE_EVENT;exports.DRAWER_CLOSE_EVENT=n.DRAWER_CLOSE_EVENT;exports.DROPDOWN_CHANGE=n.DROPDOWN_CHANGE;exports.FIELD_LABEL_CLICK=n.FIELD_LABEL_CLICK;exports.FIELD_LABEL_CLICK_COORDINATED=n.FIELD_LABEL_CLICK_COORDINATED;exports.FILE_ICONS=n.FILE_ICONS;exports.INPUT_CHANGE=n.INPUT_CHANGE;exports.INPUT_CLEAR=n.INPUT_CLEAR;exports.MENU_ITEM_CLICK=n.MENU_ITEM_CLICK;exports.MODAL_AFTER_CLOSE_EVENT=n.MODAL_AFTER_CLOSE_EVENT;exports.MODAL_CLOSE_EVENT=n.MODAL_CLOSE_EVENT;exports.NAVIGATION_CHANGE=n.NAVIGATION_CHANGE;exports.NAVIGATION_ITEM_CLICK=n.NAVIGATION_ITEM_CLICK;exports.PAGINATION_CHANGE=n.PAGINATION_CHANGE;exports.PAGINATION_JUMP=n.PAGINATION_JUMP;exports.POPOVER_CLOSE=n.POPOVER_CLOSE;exports.POPOVER_OPEN_CHANGE=n.POPOVER_OPEN_CHANGE;exports.RADIO_CHANGE=n.RADIO_CHANGE;exports.RADIO_GROUP_CHANGE=n.RADIO_GROUP_CHANGE;exports.RESIZE_EVENT=n.RESIZE_EVENT;exports.SIDEBAR_SELECT=n.SIDEBAR_SELECT;exports.SUGGESTION_CHANGE=n.SUGGESTION_CHANGE;exports.SUGGESTION_CLEAR=n.SUGGESTION_CLEAR;exports.SUGGESTION_SELECT=n.SUGGESTION_SELECT;exports.SWITCHER_CHANGE=n.SWITCHER_CHANGE;exports.TABLE_CELL_CONTEXT_MENU=n.TABLE_CELL_CONTEXT_MENU;exports.TABLE_COLUMN_CLICK=n.TABLE_COLUMN_CLICK;exports.TABLE_COLUMN_RESIZE=n.TABLE_COLUMN_RESIZE;exports.TABLE_GROUP_TOGGLE=n.TABLE_GROUP_TOGGLE;exports.TABLE_ROW_CLICK=n.TABLE_ROW_CLICK;exports.TABLE_ROW_COLLAPSE=n.TABLE_ROW_COLLAPSE;exports.TABLE_ROW_EXPAND=n.TABLE_ROW_EXPAND;exports.TABLE_SELECTION_CHANGE=n.TABLE_SELECTION_CHANGE;exports.TABLE_SORT=n.TABLE_SORT;exports.TAB_CHANGE=n.TAB_CHANGE;exports.TAB_TRIGGER_CLICK=n.TAB_TRIGGER_CLICK;exports.TAB_VALUE_CHANGED=n.TAB_VALUE_CHANGED;exports.TAG_CLOSE_CLICK=n.TAG_CLOSE_CLICK;exports.TEXTAREA_CHANGE=n.TEXTAREA_CHANGE;exports.TOGGLE_GROUP_CHANGE=n.TOGGLE_GROUP_CHANGE;exports.TOGGLE_GROUP_ITEM_CHANGE=n.TOGGLE_GROUP_ITEM_CHANGE;exports.TOGGLE_GROUP_ITEM_CLICK=n.TOGGLE_GROUP_ITEM_CLICK;exports.TOGGLE_GROUP_ITEM_DESELECT=n.TOGGLE_GROUP_ITEM_DESELECT;exports.TOGGLE_GROUP_ITEM_SELECT=n.TOGGLE_GROUP_ITEM_SELECT;exports.TOOLTIP_CONTENT_POPUP_MOUNTED=n.TOOLTIP_CONTENT_POPUP_MOUNTED;exports.TOOLTIP_CONTENT_POPUP_UNMOUNTED=n.TOOLTIP_CONTENT_POPUP_UNMOUNTED;exports.TOOLTIP_HIDE=n.TOOLTIP_HIDE;exports.TOOLTIP_SHOW=n.TOOLTIP_SHOW;exports.TOOLTIP_TRIGGER_MOUNTED=n.TOOLTIP_TRIGGER_MOUNTED;exports.TOOLTIP_VISIBILITY_CHANGED=n.TOOLTIP_VISIBILITY_CHANGED;exports.WELL_CLOSE_CLICK=n.WELL_CLOSE_CLICK;exports.addMonths=n.addMonths;exports.formatISODate=n.formatISODate;exports.getBadgeVariantClass=n.getBadgeVariantClass;exports.parseISODate=n.parseISODate;exports.resolveFileIcon=n.resolveFileIcon;exports.startOfToday=n.startOfToday;exports.toast=n.toast;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
import { nothing } from 'lit';
|
|
4
|
+
import { PropertyValues } from 'lit';
|
|
4
5
|
import { TemplateResult } from 'lit-html';
|
|
5
6
|
|
|
6
7
|
/** Add `count` months, clamping the day to the target month's length. */
|
|
@@ -1024,6 +1025,229 @@ export declare class AnduinTabContent extends LitElement {
|
|
|
1024
1025
|
render(): TemplateResult<1>;
|
|
1025
1026
|
}
|
|
1026
1027
|
|
|
1028
|
+
/**
|
|
1029
|
+
* anduin-table — displays tabular data with sorting, frozen columns, row
|
|
1030
|
+
* selection, tree data, grouping, and virtual scrolling.
|
|
1031
|
+
*
|
|
1032
|
+
* Columns and data are set as JS properties rather than attributes, because
|
|
1033
|
+
* both are structured values:
|
|
1034
|
+
*
|
|
1035
|
+
* @example
|
|
1036
|
+
* const table = document.querySelector('anduin-table')
|
|
1037
|
+
* table.columns = [
|
|
1038
|
+
* { type: 'selection' },
|
|
1039
|
+
* { field: 'fullName', title: 'Full name', isSortable: true, isFrozen: true },
|
|
1040
|
+
* { field: 'email', title: 'Email address', width: 220 },
|
|
1041
|
+
* { field: 'address.city', title: 'City' },
|
|
1042
|
+
* ]
|
|
1043
|
+
* table.data = employees
|
|
1044
|
+
*
|
|
1045
|
+
* Layout, height, loading, and selection behaviour are plain attributes:
|
|
1046
|
+
*
|
|
1047
|
+
* @example
|
|
1048
|
+
* <anduin-table layout="fit-columns" max-height="480px" selectable="selectable">
|
|
1049
|
+
* <div slot="empty">No employees found</div>
|
|
1050
|
+
* </anduin-table>
|
|
1051
|
+
*/
|
|
1052
|
+
export declare class AnduinTable extends LitElement {
|
|
1053
|
+
static styles: CSSResult;
|
|
1054
|
+
/** The columns to render, in display order. Set as a property, not an attribute. */
|
|
1055
|
+
columns: TableAnyColumn<any>[];
|
|
1056
|
+
/** The rows to render. Set as a property, not an attribute. */
|
|
1057
|
+
data: any[];
|
|
1058
|
+
/** How column widths are resolved. */
|
|
1059
|
+
layout: TableLayout;
|
|
1060
|
+
/** `virtual` only paints rows inside the viewport, and needs a bounded height. */
|
|
1061
|
+
renderMode: TableRenderMode;
|
|
1062
|
+
/** Row height in pixels. Virtual mode requires every row to be this tall. */
|
|
1063
|
+
rowHeight: number;
|
|
1064
|
+
/** CSS height for the table, e.g. `80vh`. */
|
|
1065
|
+
height: string;
|
|
1066
|
+
/** CSS max-height for the table, e.g. `600px`. */
|
|
1067
|
+
maxHeight: string;
|
|
1068
|
+
/** CSS min-height for the table. */
|
|
1069
|
+
minHeight: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* Let users drag a column's right edge to resize it, and double-click that
|
|
1072
|
+
* edge to put the column back on automatic width. On by default, matching the
|
|
1073
|
+
* reference table. Turn it off table-wide with `resizable-columns="false"`, or
|
|
1074
|
+
* per column with `isResizable: false`.
|
|
1075
|
+
*/
|
|
1076
|
+
resizableColumns: boolean;
|
|
1077
|
+
/** Present the table as a plain list, with no column headings. */
|
|
1078
|
+
hideHeader: boolean;
|
|
1079
|
+
/** Cover the table with a loading indicator. Slot `loading` to replace it. */
|
|
1080
|
+
loading: boolean;
|
|
1081
|
+
/** How rows respond to being clicked. */
|
|
1082
|
+
selectable: TableSelectableMode;
|
|
1083
|
+
/** The field holding each row's unique id. Falls back to the row's position. */
|
|
1084
|
+
indexColumn: string;
|
|
1085
|
+
/** Table-wide horizontal alignment. A column's own `align` wins. */
|
|
1086
|
+
columnAlign: TableAlign;
|
|
1087
|
+
/** Table-wide vertical alignment. A column's own `verticalAlign` wins. */
|
|
1088
|
+
columnVerticalAlign: TableVerticalAlign;
|
|
1089
|
+
/** The field currently sorted by. Set it to sort the table initially. */
|
|
1090
|
+
sortField: string;
|
|
1091
|
+
/** Direction of the current sort. */
|
|
1092
|
+
sortDirection: TableSortDirection;
|
|
1093
|
+
/** Treat `data` as a tree, reading each row's children from `tree-children-field`. */
|
|
1094
|
+
dataTree: boolean;
|
|
1095
|
+
/** The field holding a row's child rows in tree mode. */
|
|
1096
|
+
treeChildrenField: string;
|
|
1097
|
+
/** Pixels of indentation per tree level. */
|
|
1098
|
+
treeChildIndent: number;
|
|
1099
|
+
/** Group rows by this field. Rows sharing a value are collected under a heading. */
|
|
1100
|
+
groupBy: string;
|
|
1101
|
+
/** The currently selected rows. Assign to control the selection from outside. */
|
|
1102
|
+
selectedRows: any[];
|
|
1103
|
+
/** Decides whether a row's checkbox is disabled. */
|
|
1104
|
+
isRowDisabled?: (data: any) => boolean;
|
|
1105
|
+
/** Decides whether a tree row starts out expanded. */
|
|
1106
|
+
onStartExpanded?: (data: any) => boolean;
|
|
1107
|
+
/**
|
|
1108
|
+
* Extra tokens for a row, for highlighting rows by their data. They are added
|
|
1109
|
+
* both as classes and as `part` names, so a consumer can reach them from
|
|
1110
|
+
* outside the shadow root — including for hover and other states:
|
|
1111
|
+
*
|
|
1112
|
+
* anduin-table::part(overdue) { background: var(--color-danger-1); }
|
|
1113
|
+
* anduin-table::part(overdue):hover { background: var(--color-danger-2); }
|
|
1114
|
+
*/
|
|
1115
|
+
rowClass?: (data: any, index: number) => string;
|
|
1116
|
+
/** Renders a group heading. Defaults to `value (count)`. */
|
|
1117
|
+
renderGroupHeader?: (value: unknown, count: number, rows: any[]) => unknown;
|
|
1118
|
+
/** Keys of the tree rows the user has expanded. */
|
|
1119
|
+
private expandedKeys;
|
|
1120
|
+
/** Keys of the groups the user has collapsed. Groups start expanded. */
|
|
1121
|
+
private collapsedGroups;
|
|
1122
|
+
/** Scroll offset driving the virtual window. Named to avoid HTMLElement.scrollTop. */
|
|
1123
|
+
private virtualScrollTop;
|
|
1124
|
+
/** Height of the virtual viewport, tracked so the window stays filled. */
|
|
1125
|
+
private viewportHeight;
|
|
1126
|
+
/** Whether the table is scrolled away from its left edge. */
|
|
1127
|
+
private scrolledX;
|
|
1128
|
+
/** Whether there is still content to the right of the viewport. */
|
|
1129
|
+
private scrollableXEnd;
|
|
1130
|
+
/** Widths the user has dragged columns to, keyed by column. */
|
|
1131
|
+
private resizedWidths;
|
|
1132
|
+
/** The column currently being dragged, for the handle's active styling. */
|
|
1133
|
+
private resizingKey;
|
|
1134
|
+
/** Anchor row for shift-click and shift-drag range selection. */
|
|
1135
|
+
private rangeAnchorKey;
|
|
1136
|
+
/** True while a shift-drag range selection is in progress. */
|
|
1137
|
+
private isDraggingRange;
|
|
1138
|
+
/** Rows selected when the current drag began, so the drag can be re-applied. */
|
|
1139
|
+
private dragBaseKeys;
|
|
1140
|
+
/** Whether the current drag is adding to or removing from the selection. */
|
|
1141
|
+
private dragSelects;
|
|
1142
|
+
private resizeObserver?;
|
|
1143
|
+
/** Rows expanded automatically, so `onStartExpanded` only applies once per key. */
|
|
1144
|
+
private autoExpandedKeys;
|
|
1145
|
+
/** In-flight column drag: where it started and how wide the column was then. */
|
|
1146
|
+
private resizeDrag;
|
|
1147
|
+
/** rAF handle, so a drag repaints once per frame instead of once per pointer event. */
|
|
1148
|
+
private resizeFrame;
|
|
1149
|
+
/**
|
|
1150
|
+
* Selection keys for the current render pass. Recomputing the set per cell
|
|
1151
|
+
* would make rendering quadratic in the row count, which virtual mode exists
|
|
1152
|
+
* to avoid. Refreshed in `willUpdate`.
|
|
1153
|
+
*/
|
|
1154
|
+
private renderSelectedKeys;
|
|
1155
|
+
/** Selectable rows for the current render pass, for the header's checkbox. */
|
|
1156
|
+
private renderSelectableRows;
|
|
1157
|
+
/** The sorted, flattened, grouped row list. Rebuilt only when its inputs change. */
|
|
1158
|
+
private cachedRenderRows;
|
|
1159
|
+
private rowsDirty;
|
|
1160
|
+
connectedCallback(): void;
|
|
1161
|
+
disconnectedCallback(): void;
|
|
1162
|
+
firstUpdated(): void;
|
|
1163
|
+
/**
|
|
1164
|
+
* Scrolling a virtual table re-renders on every frame, but only the visible
|
|
1165
|
+
* window changes — the row list itself does not. Rebuild it only when one of
|
|
1166
|
+
* its actual inputs changes, so scrolling stays cheap at 10k+ rows.
|
|
1167
|
+
*/
|
|
1168
|
+
willUpdate(changed: PropertyValues): void;
|
|
1169
|
+
updated(changed: PropertyValues): void;
|
|
1170
|
+
private get scrollEl();
|
|
1171
|
+
/** A stable identity for a row, used for selection and expansion state. */
|
|
1172
|
+
private keyFor;
|
|
1173
|
+
private get selectedKeySet();
|
|
1174
|
+
private rowIsDisabled;
|
|
1175
|
+
/**
|
|
1176
|
+
* Frozen columns stick to whichever edge they are nearest: a leading run of
|
|
1177
|
+
* frozen columns pins left, a trailing run pins right. An explicit
|
|
1178
|
+
* `isFrozen: 'left' | 'right'` overrides that.
|
|
1179
|
+
*/
|
|
1180
|
+
private get frozenSides();
|
|
1181
|
+
/** Measures header widths and pins each frozen column at the right offset. */
|
|
1182
|
+
private applyFrozenOffsets;
|
|
1183
|
+
private get sortedColumn();
|
|
1184
|
+
private sortRows;
|
|
1185
|
+
private onHeaderClick;
|
|
1186
|
+
/** Sorts, flattens the tree, and inserts group headings. */
|
|
1187
|
+
private buildRenderRows;
|
|
1188
|
+
private buildFlatRows;
|
|
1189
|
+
private buildGroupedRows;
|
|
1190
|
+
private isExpanded;
|
|
1191
|
+
private toggleTreeRow;
|
|
1192
|
+
private toggleGroup;
|
|
1193
|
+
/** Expands every tree row that has children. */
|
|
1194
|
+
expandAll(): void;
|
|
1195
|
+
/** Collapses every tree row. */
|
|
1196
|
+
collapseAll(): void;
|
|
1197
|
+
/** Every selectable row currently on screen, in visual order. */
|
|
1198
|
+
private get selectableRows();
|
|
1199
|
+
private commitSelection;
|
|
1200
|
+
private setRowSelected;
|
|
1201
|
+
private toggleAllRows;
|
|
1202
|
+
/** Selects (or clears) every row between the anchor and `row`, inclusive. */
|
|
1203
|
+
private selectRange;
|
|
1204
|
+
private onRowMouseDown;
|
|
1205
|
+
private onRowMouseEnter;
|
|
1206
|
+
private onWindowMouseUp;
|
|
1207
|
+
private onRowClick;
|
|
1208
|
+
private onCellContextMenu;
|
|
1209
|
+
private onScroll;
|
|
1210
|
+
private syncHorizontalScrollState;
|
|
1211
|
+
/**
|
|
1212
|
+
* Sizing for one column's header and body cells.
|
|
1213
|
+
*
|
|
1214
|
+
* `fit-data-stretch` hands all the slack to the final column, so that one is
|
|
1215
|
+
* given `width: 100%` instead of its own width. Everywhere else an explicit
|
|
1216
|
+
* `width` is pinned with a matching max-width: under `table-layout: auto` a
|
|
1217
|
+
* bare `width` is only a suggestion, and long content would blow past it.
|
|
1218
|
+
*/
|
|
1219
|
+
/** A stable identity for a column, used to remember a dragged width. */
|
|
1220
|
+
private columnKey;
|
|
1221
|
+
/** The width to lay a column out at: a dragged width beats the configured one. */
|
|
1222
|
+
private widthFor;
|
|
1223
|
+
/**
|
|
1224
|
+
* True for the final column under fit-data-stretch, which absorbs the slack.
|
|
1225
|
+
* Dragging that column opts it out — the user asked for a specific width, and
|
|
1226
|
+
* stretching would immediately overrule them.
|
|
1227
|
+
*/
|
|
1228
|
+
private isStretchColumn;
|
|
1229
|
+
/** Marks how a column is sized, so the layout CSS can treat the cases apart. */
|
|
1230
|
+
private sizingClass;
|
|
1231
|
+
private cellStyle;
|
|
1232
|
+
private isColumnResizable;
|
|
1233
|
+
private onResizeStart;
|
|
1234
|
+
private onResizeMove;
|
|
1235
|
+
private onResizeEnd;
|
|
1236
|
+
/** Double-clicking the handle puts the column back on automatic width. */
|
|
1237
|
+
private onResizeReset;
|
|
1238
|
+
/** Clears every dragged width, putting all columns back on automatic sizing. */
|
|
1239
|
+
resetColumnWidths(): void;
|
|
1240
|
+
private alignClass;
|
|
1241
|
+
private renderHeaderCell;
|
|
1242
|
+
private renderCell;
|
|
1243
|
+
private get firstDataColumnIndex();
|
|
1244
|
+
private renderRow;
|
|
1245
|
+
private renderGroupRow;
|
|
1246
|
+
private get columnCount();
|
|
1247
|
+
private renderPlaceholder;
|
|
1248
|
+
render(): TemplateResult<1>;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1027
1251
|
export declare class AnduinTabs extends LitElement {
|
|
1028
1252
|
static styles: CSSResult;
|
|
1029
1253
|
defaultValue: string;
|
|
@@ -1455,6 +1679,222 @@ export declare const TAB_TRIGGER_CLICK = "anduin-tab:trigger-click";
|
|
|
1455
1679
|
|
|
1456
1680
|
export declare const TAB_VALUE_CHANGED = "anduin-tab:value-changed";
|
|
1457
1681
|
|
|
1682
|
+
/** Fired on right-click over a data cell, so consumers can open their own menu. */
|
|
1683
|
+
export declare const TABLE_CELL_CONTEXT_MENU = "anduin-table:cell-context-menu";
|
|
1684
|
+
|
|
1685
|
+
/** Fired when any column header is clicked, sortable or not. */
|
|
1686
|
+
export declare const TABLE_COLUMN_CLICK = "anduin-table:column-click";
|
|
1687
|
+
|
|
1688
|
+
/** Fired when a column is resized by dragging, or reset by double-click. */
|
|
1689
|
+
export declare const TABLE_COLUMN_RESIZE = "anduin-table:column-resize";
|
|
1690
|
+
|
|
1691
|
+
/** Fired when a group header is expanded or collapsed. */
|
|
1692
|
+
export declare const TABLE_GROUP_TOGGLE = "anduin-table:group-toggle";
|
|
1693
|
+
|
|
1694
|
+
/** Fired when a data row is clicked. */
|
|
1695
|
+
export declare const TABLE_ROW_CLICK = "anduin-table:row-click";
|
|
1696
|
+
|
|
1697
|
+
/** Fired when a tree row is collapsed. */
|
|
1698
|
+
export declare const TABLE_ROW_COLLAPSE = "anduin-table:row-collapse";
|
|
1699
|
+
|
|
1700
|
+
/** Fired when a tree row is expanded. */
|
|
1701
|
+
export declare const TABLE_ROW_EXPAND = "anduin-table:row-expand";
|
|
1702
|
+
|
|
1703
|
+
/** Fired whenever the set of selected rows changes. */
|
|
1704
|
+
export declare const TABLE_SELECTION_CHANGE = "anduin-table:selection-change";
|
|
1705
|
+
|
|
1706
|
+
/** Fired when a sortable column header is activated. */
|
|
1707
|
+
export declare const TABLE_SORT = "anduin-table:sort";
|
|
1708
|
+
|
|
1709
|
+
/** Horizontal alignment of a column's content. */
|
|
1710
|
+
export declare type TableAlign = 'left' | 'center' | 'right';
|
|
1711
|
+
|
|
1712
|
+
/** Any entry accepted by the `columns` property. */
|
|
1713
|
+
export declare type TableAnyColumn<T = unknown> = TableColumn<T> | TableSelectionColumn<T>;
|
|
1714
|
+
|
|
1715
|
+
/** `detail` of `anduin-table:cell-context-menu`. */
|
|
1716
|
+
export declare interface TableCellContextMenuDetail<T = unknown> {
|
|
1717
|
+
data: T;
|
|
1718
|
+
key: string;
|
|
1719
|
+
index: number;
|
|
1720
|
+
column: TableColumn<T>;
|
|
1721
|
+
/** Viewport coordinates of the click, for positioning a menu. */
|
|
1722
|
+
x: number;
|
|
1723
|
+
y: number;
|
|
1724
|
+
originalEvent: MouseEvent;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
/** What `renderCell` receives. */
|
|
1728
|
+
export declare interface TableCellRenderProps<T = unknown> {
|
|
1729
|
+
/** The row's underlying model. */
|
|
1730
|
+
data: T;
|
|
1731
|
+
/** The value at `column.field`, resolved through dot notation. */
|
|
1732
|
+
value: unknown;
|
|
1733
|
+
/** Index of the row in the sorted, flattened row list. */
|
|
1734
|
+
rowIndex: number;
|
|
1735
|
+
/** The column being rendered. */
|
|
1736
|
+
column: TableColumn<T>;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* A column definition.
|
|
1741
|
+
*
|
|
1742
|
+
* `renderCell` / `renderHeader` may return anything Lit can render: a string, a
|
|
1743
|
+
* number, a DOM `Node`, or a Lit `TemplateResult`. Returning a `Node` is the
|
|
1744
|
+
* portable choice for consumers that are not using Lit themselves.
|
|
1745
|
+
*/
|
|
1746
|
+
export declare interface TableColumn<T = unknown> {
|
|
1747
|
+
/** The model property this column shows. Supports dot notation (`address.city`). */
|
|
1748
|
+
field: string;
|
|
1749
|
+
/** The column heading. */
|
|
1750
|
+
title?: string;
|
|
1751
|
+
/** Column width in pixels. */
|
|
1752
|
+
width?: number;
|
|
1753
|
+
/** Lower bound for the column's width in pixels. */
|
|
1754
|
+
minWidth?: number;
|
|
1755
|
+
/** Show a sort control in the header and let users sort by this column. */
|
|
1756
|
+
isSortable?: boolean;
|
|
1757
|
+
/** Stick the column to the left or right edge while the table scrolls sideways. */
|
|
1758
|
+
isFrozen?: TableFrozen;
|
|
1759
|
+
/** Horizontal alignment for this column, overriding the table-wide default. */
|
|
1760
|
+
align?: TableAlign;
|
|
1761
|
+
/** Vertical alignment for this column, overriding the table-wide default. */
|
|
1762
|
+
verticalAlign?: TableVerticalAlign;
|
|
1763
|
+
/** Horizontal alignment for the header cell. Defaults to `align`. */
|
|
1764
|
+
headerAlign?: TableAlign;
|
|
1765
|
+
/** Hide the cell's content until its row is hovered, selected, or focused. */
|
|
1766
|
+
showOnRowHover?: boolean;
|
|
1767
|
+
/** Let users drag this column's edge to resize it. Defaults to the table's setting. */
|
|
1768
|
+
isResizable?: boolean;
|
|
1769
|
+
/** Renders the cell body. Defaults to the raw value at `field`. */
|
|
1770
|
+
renderCell?: (props: TableCellRenderProps<T>) => unknown;
|
|
1771
|
+
/** Renders the header body. Defaults to `title`. */
|
|
1772
|
+
renderHeader?: (props: TableHeaderRenderProps<T>) => unknown;
|
|
1773
|
+
/** Compares two rows. Return <0, 0, or >0. Defaults to comparing `field`. */
|
|
1774
|
+
sortWith?: (sorter: TableColumnSorter<T>) => number;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
/** `detail` of `anduin-table:column-click`. */
|
|
1778
|
+
export declare interface TableColumnClickDetail<T = unknown> {
|
|
1779
|
+
column: TableColumn<T>;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
/** `detail` of `anduin-table:column-resize`. */
|
|
1783
|
+
export declare interface TableColumnResizeDetail<T = unknown> {
|
|
1784
|
+
column: TableAnyColumn<T>;
|
|
1785
|
+
field: string;
|
|
1786
|
+
/** The column's new width in pixels, or null when it was reset to automatic. */
|
|
1787
|
+
width: number | null;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
/** What a column's `sortWith` receives. Either side may be missing. */
|
|
1791
|
+
export declare interface TableColumnSorter<T = unknown> {
|
|
1792
|
+
a: T | undefined;
|
|
1793
|
+
b: T | undefined;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
/** Which edge a frozen column sticks to. `true` picks the edge from its position. */
|
|
1797
|
+
export declare type TableFrozen = boolean | 'left' | 'right';
|
|
1798
|
+
|
|
1799
|
+
/** `detail` of `anduin-table:group-toggle`. */
|
|
1800
|
+
export declare interface TableGroupToggleDetail<T = unknown> {
|
|
1801
|
+
value: unknown;
|
|
1802
|
+
rows: T[];
|
|
1803
|
+
expanded: boolean;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
/** What `renderHeader` receives. */
|
|
1807
|
+
export declare interface TableHeaderRenderProps<T = unknown> {
|
|
1808
|
+
column: TableColumn<T>;
|
|
1809
|
+
/** The column's current sort direction, or null when it is not sorted. */
|
|
1810
|
+
sortDirection: TableSortDirection | null;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* How column widths are resolved.
|
|
1815
|
+
* - `fit-data` size columns to their content (default)
|
|
1816
|
+
* - `fit-columns` size columns to divide up the table's width exactly
|
|
1817
|
+
* - `fit-data-fill` size to content, but rows always span the full width
|
|
1818
|
+
* - `fit-data-stretch` size to content, stretching the last column
|
|
1819
|
+
* - `fit-data-table` size to content, shrinking the table to their total
|
|
1820
|
+
*/
|
|
1821
|
+
export declare type TableLayout = 'fit-data' | 'fit-columns' | 'fit-data-fill' | 'fit-data-stretch' | 'fit-data-table';
|
|
1822
|
+
|
|
1823
|
+
/** Render mode. `virtual` only paints the rows inside the viewport. */
|
|
1824
|
+
export declare type TableRenderMode = 'basic' | 'virtual';
|
|
1825
|
+
|
|
1826
|
+
/** `detail` of `anduin-table:row-click`. */
|
|
1827
|
+
export declare interface TableRowClickDetail<T = unknown> {
|
|
1828
|
+
data: T;
|
|
1829
|
+
key: string;
|
|
1830
|
+
index: number;
|
|
1831
|
+
originalEvent: MouseEvent;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
/** `detail` of `anduin-table:row-expand` and `anduin-table:row-collapse`. */
|
|
1835
|
+
export declare interface TableRowExpandDetail<T = unknown> {
|
|
1836
|
+
data: T;
|
|
1837
|
+
key: string;
|
|
1838
|
+
expanded: boolean;
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* How rows respond to being clicked.
|
|
1843
|
+
* - `unselectable` rows cannot be selected
|
|
1844
|
+
* - `clickable` rows report clicks but never select (default)
|
|
1845
|
+
* - `selectable` clicking a row toggles its selection
|
|
1846
|
+
* - `selectable-by-clicking` click, then shift-click, to select a range
|
|
1847
|
+
* - `selectable-by-dragging` shift and drag across rows to select a range
|
|
1848
|
+
*/
|
|
1849
|
+
export declare type TableSelectableMode = 'unselectable' | 'clickable' | 'selectable' | 'selectable-by-clicking' | 'selectable-by-dragging';
|
|
1850
|
+
|
|
1851
|
+
/** What the selection column's `renderCell` receives. */
|
|
1852
|
+
export declare interface TableSelectionCellRenderProps<T = unknown> {
|
|
1853
|
+
data: T;
|
|
1854
|
+
isChecked: boolean;
|
|
1855
|
+
isDisabled: boolean;
|
|
1856
|
+
onChange: (checked: boolean) => void;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
/** `detail` of `anduin-table:selection-change`. */
|
|
1860
|
+
export declare interface TableSelectionChangeDetail<T = unknown> {
|
|
1861
|
+
selectedRows: T[];
|
|
1862
|
+
selectedKeys: string[];
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
/**
|
|
1866
|
+
* A checkbox column. Put it in `columns` wherever the checkboxes should appear —
|
|
1867
|
+
* usually first. It carries the same layout options as a normal column.
|
|
1868
|
+
*/
|
|
1869
|
+
export declare interface TableSelectionColumn<T = unknown> extends Omit<TableColumn<T>, 'field' | 'renderCell' | 'renderHeader' | 'sortWith' | 'isSortable'> {
|
|
1870
|
+
type: 'selection';
|
|
1871
|
+
field?: string;
|
|
1872
|
+
/** Replaces the row checkbox, e.g. with an anduin-switcher. */
|
|
1873
|
+
renderCell?: (props: TableSelectionCellRenderProps<T>) => unknown;
|
|
1874
|
+
/** Replaces the header checkbox, e.g. with a "Select all" button. */
|
|
1875
|
+
renderHeader?: (props: TableSelectionHeaderRenderProps) => unknown;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/** What the selection column's `renderHeader` receives. */
|
|
1879
|
+
export declare interface TableSelectionHeaderRenderProps {
|
|
1880
|
+
areAllRowsSelected: boolean;
|
|
1881
|
+
hasSelectedRow: boolean;
|
|
1882
|
+
onChange: (checked: boolean) => void;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
/** `detail` of `anduin-table:sort`. */
|
|
1886
|
+
export declare interface TableSortDetail<T = unknown> {
|
|
1887
|
+
field: string;
|
|
1888
|
+
direction: TableSortDirection | null;
|
|
1889
|
+
column: TableColumn<T>;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
/** Sort direction of the currently sorted column. */
|
|
1893
|
+
export declare type TableSortDirection = 'asc' | 'desc';
|
|
1894
|
+
|
|
1895
|
+
/** Vertical alignment of a column's content within its row. */
|
|
1896
|
+
export declare type TableVerticalAlign = 'top' | 'middle' | 'bottom';
|
|
1897
|
+
|
|
1458
1898
|
export declare const TAG_CLOSE_CLICK = "anduin-tag-close:click";
|
|
1459
1899
|
|
|
1460
1900
|
export declare type TagVariant = 'gray' | 'primary' | 'success' | 'warning' | 'danger' | 'boldGray' | 'boldPrimary' | 'boldSuccess' | 'boldWarning' | 'boldDanger' | 'customAqua' | 'customBlue' | 'customBlueGreen' | 'customGreen' | 'customHotPink' | 'customIndigo' | 'customMagenta' | 'customOrange' | 'customPink' | 'customPurple' | 'customRed' | 'customYellow' | 'customYellowGreen' | 'customYellowOrange';
|
|
@@ -1513,3 +1953,24 @@ export declare const TOOLTIP_VISIBILITY_CHANGED = "anduin-tooltip:visibility-cha
|
|
|
1513
1953
|
export declare const WELL_CLOSE_CLICK = "anduin-well-close:click";
|
|
1514
1954
|
|
|
1515
1955
|
export { }
|
|
1956
|
+
|
|
1957
|
+
declare global {
|
|
1958
|
+
interface HTMLElementTagNameMap {
|
|
1959
|
+
'anduin-table': AnduinTable
|
|
1960
|
+
'anduin-pagination': AnduinPagination
|
|
1961
|
+
'anduin-pagination-first-page': AnduinPaginationFirstPage
|
|
1962
|
+
'anduin-pagination-last-page': AnduinPaginationLastPage
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
interface HTMLElementEventMap {
|
|
1966
|
+
'anduin-table:sort': CustomEvent<TableSortDetail>
|
|
1967
|
+
'anduin-table:column-click': CustomEvent<TableColumnClickDetail>
|
|
1968
|
+
'anduin-table:column-resize': CustomEvent<TableColumnResizeDetail>
|
|
1969
|
+
'anduin-table:row-click': CustomEvent<TableRowClickDetail>
|
|
1970
|
+
'anduin-table:selection-change': CustomEvent<TableSelectionChangeDetail>
|
|
1971
|
+
'anduin-table:cell-context-menu': CustomEvent<TableCellContextMenuDetail>
|
|
1972
|
+
'anduin-table:row-expand': CustomEvent<TableRowExpandDetail>
|
|
1973
|
+
'anduin-table:row-collapse': CustomEvent<TableRowExpandDetail>
|
|
1974
|
+
'anduin-table:group-toggle': CustomEvent<TableGroupToggleDetail>
|
|
1975
|
+
}
|
|
1976
|
+
}
|