globuswebcomponents 2.9.2 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cjs/gb-avatar_44.cjs.entry.js +151 -101
  2. package/dist/cjs/globuscomponents.cjs.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/reusableModels-_LRAKnsh.js.map +1 -1
  5. package/dist/collection/components/gb-button/readme.md +2 -0
  6. package/dist/collection/components/gb-dropdown-items-with-shortcut/gb-dropdown-items-with-shortcut.css +0 -1
  7. package/dist/collection/components/gb-filter-modal/gb-filter-modal.css +4 -0
  8. package/dist/collection/components/gb-filter-modal/gb-filter-modal.js +2 -2
  9. package/dist/collection/components/gb-filter-modal/gb-filter-modal.js.map +1 -1
  10. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js +16 -4
  11. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js.map +1 -1
  12. package/dist/collection/components/gb-input-field/gb-input-field.js +14 -2
  13. package/dist/collection/components/gb-input-field/gb-input-field.js.map +1 -1
  14. package/dist/collection/components/gb-table/gb-table.css +26 -13
  15. package/dist/collection/components/gb-table/gb-table.js +158 -97
  16. package/dist/collection/components/gb-table/gb-table.js.map +1 -1
  17. package/dist/collection/components/gb-toggle-base/gb-toggle-base.js +1 -1
  18. package/dist/collection/components/gb-toggle-base/gb-toggle-base.js.map +1 -1
  19. package/dist/collection/models/reusableModels.js.map +1 -1
  20. package/dist/components/gb-avatar-dropdown.js +1 -1
  21. package/dist/components/gb-contact-help-dropdown.js +1 -1
  22. package/dist/components/gb-dropdown-items-with-shortcut.js +1 -1
  23. package/dist/components/gb-filter-modal.js +1 -1
  24. package/dist/components/gb-header.js +5 -5
  25. package/dist/components/gb-help-dropdown.js +1 -1
  26. package/dist/components/gb-input-dropdown.js +1 -1
  27. package/dist/components/gb-input-field.js +1 -1
  28. package/dist/components/gb-nav-bar.js +1 -1
  29. package/dist/components/gb-pagination.js +1 -1
  30. package/dist/components/gb-table-header.js +1 -1
  31. package/dist/components/gb-table.js +126 -98
  32. package/dist/components/gb-table.js.map +1 -1
  33. package/dist/components/gb-toggle-base.js +1 -1
  34. package/dist/components/gb-toggle.js +1 -1
  35. package/dist/components/{p-3Du3w-pS.js → p-6u1HaWoe.js} +3 -3
  36. package/dist/components/p-6u1HaWoe.js.map +1 -0
  37. package/dist/components/{p-Co457UXm.js → p-B1U9qYyf.js} +3 -3
  38. package/dist/components/{p-Co457UXm.js.map → p-B1U9qYyf.js.map} +1 -1
  39. package/dist/components/{p-CBwlEMQ5.js → p-B1q7GSUP.js} +19 -7
  40. package/dist/components/p-B1q7GSUP.js.map +1 -0
  41. package/dist/components/{p-BAGZEYW2.js → p-B8V2b584.js} +5 -5
  42. package/dist/components/p-B8V2b584.js.map +1 -0
  43. package/dist/components/{p-VqHJf1uS.js → p-BDEe2hS1.js} +4 -4
  44. package/dist/components/{p-VqHJf1uS.js.map → p-BDEe2hS1.js.map} +1 -1
  45. package/dist/components/{p-fASCuyDJ.js → p-CgRjoJ7j.js} +3 -3
  46. package/dist/components/{p-fASCuyDJ.js.map → p-CgRjoJ7j.js.map} +1 -1
  47. package/dist/components/{p-_h_4WkXb.js → p-D9WlXXTb.js} +3 -3
  48. package/dist/components/{p-_h_4WkXb.js.map → p-D9WlXXTb.js.map} +1 -1
  49. package/dist/components/{p-Dfb-OutP.js → p-DIorYzCL.js} +3 -3
  50. package/dist/components/{p-Dfb-OutP.js.map → p-DIorYzCL.js.map} +1 -1
  51. package/dist/components/{p-btCkXoB_.js → p-Dy0A4tjX.js} +3 -3
  52. package/dist/components/{p-btCkXoB_.js.map → p-Dy0A4tjX.js.map} +1 -1
  53. package/dist/components/{p-CT7vYQvP.js → p-FycGmteh.js} +3 -3
  54. package/dist/components/{p-CT7vYQvP.js.map → p-FycGmteh.js.map} +1 -1
  55. package/dist/components/p-cHn6O-Kf.js.map +1 -1
  56. package/dist/components/{p-BJOkCh_x.js → p-xpOcvUAn.js} +16 -4
  57. package/dist/components/p-xpOcvUAn.js.map +1 -0
  58. package/dist/docs.json +64 -17
  59. package/dist/esm/gb-avatar_44.entry.js +151 -101
  60. package/dist/esm/globuscomponents.js +1 -1
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/reusableModels-cHn6O-Kf.js.map +1 -1
  63. package/dist/globuscomponents/globuscomponents.esm.js +1 -1
  64. package/dist/globuscomponents/{p-2fe0e837.entry.js → p-c75bc3c7.entry.js} +2 -2
  65. package/dist/globuscomponents/p-c75bc3c7.entry.js.map +1 -0
  66. package/dist/globuscomponents/p-cHn6O-Kf.js.map +1 -1
  67. package/dist/globuscomponents/readme.md +2 -0
  68. package/dist/types/components/gb-table/gb-table.d.ts +10 -1
  69. package/dist/types/components.d.ts +32 -16
  70. package/dist/types/models/reusableModels.d.ts +2 -0
  71. package/package.json +1 -1
  72. package/dist/components/p-3Du3w-pS.js.map +0 -1
  73. package/dist/components/p-BAGZEYW2.js.map +0 -1
  74. package/dist/components/p-BJOkCh_x.js.map +0 -1
  75. package/dist/components/p-CBwlEMQ5.js.map +0 -1
  76. package/dist/globuscomponents/p-2fe0e837.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"p-cHn6O-Kf.js","sources":["src/models/reusableModels.ts"],"sourcesContent":["export type GeneralSizes = 'xxxxl' | 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs' | 'profile_lg' | 'profile_md' | 'profile_sm';\r\n\r\nexport type GeneralHierarchies = 'primary' | 'secondary_gray' | 'secondary_color' | 'tertiary_gray' | 'tertiary_color' | 'link_gray' | 'link_color';\r\n\r\nexport enum StateEnum {\r\n Default = 'default',\r\n Disabled = 'disabled',\r\n}\r\n\r\nexport type ArrowPositions = 'bottom_center' | 'bottom_left' | 'bottom_right' | 'top_center' | 'left' | 'right' | 'none' | 'center';\r\n\r\nexport type CheckBoxVariants = 'checkbox' | 'check_circle' | 'radio';\r\n\r\nexport enum BorderWeights {\r\n VeryLight = 'very_light',\r\n Light = 'light',\r\n Regular = 'regular',\r\n Heavy = 'heavy',\r\n}\r\n\r\nexport enum OnlineIndicatorStates {\r\n Online = 'online',\r\n Offline = 'offline',\r\n}\r\n\r\nexport type BreakPoints = 'desktop' | 'mobile';\r\n\r\nexport type FileUploadIconType = 'solid' | 'outline';\r\n\r\nexport type FileUploadStates = 'default' | 'in_progress' | 'complete' | 'hover' | 'disabled' | 'error';\r\n\r\nexport type GeneralColors = 'default' | 'gray' | 'primary' | 'error' | 'warning' | 'success' | 'discovery' | 'information' | 'pink' | 'purple' | 'white';\r\n\r\nexport type PaginationNumberShapes = 'square' | 'circle';\r\n\r\nexport type PaginationTypes =\r\n | 'page_default'\r\n | 'page_minimal_center_aligned'\r\n | 'card_default'\r\n | 'card_minimal_right_aligned'\r\n | 'card_minimal_left_aligned'\r\n | 'card_minimal_center_aligned'\r\n | 'card_button_group_right_aligned'\r\n | 'card_button_group_left_aligned'\r\n | 'card_button_group_center_aligned';\r\n\r\nexport type TabTypes =\r\n | 'button_primary'\r\n | 'button_gray'\r\n | 'button_white'\r\n | 'rounded_button_white'\r\n | 'underline'\r\n | 'underline_filled'\r\n | 'line'\r\n | 'button_white_border'\r\n | 'rounded_button_white_border'\r\n | 'button_gray_border';\r\n\r\nexport type GeneralBackgroundCategories = 'plain_background' | 'colored_background';\r\n\r\nexport type InputFieldTypes =\r\n | 'default'\r\n | 'icon_leading'\r\n | 'leading_dropdown'\r\n | 'trailing_dropdown'\r\n | 'leading_text'\r\n | 'payment_input'\r\n | 'tags'\r\n | 'trailing_button'\r\n | 'password'\r\n | 'password_icon_leading'\r\n | 'count';\r\n\r\nexport type DropdownTypes = 'default' | 'icon_leading' | 'avatar_leading' | 'dot_leading' | 'checkbox' | 'search' | 'tags';\r\n\r\nexport type ColorTypes = 'gray' | 'blue' | 'cyan' | 'pink' | 'purple' | 'green' | 'yellow' | 'red' | 'white';\r\n\r\nexport type DropdownItemTypes = string | number | { name: string | number; username: string; selected?: boolean };\r\n\r\nexport type PaginationDotTypes = 'dot' | 'line';\r\n\r\nexport type FileIconStyles = 'default' | 'gray' | 'solid';\r\n\r\nexport type FileIconTypes = 'pdf' | 'csv' | 'jpg' | 'jpeg' | 'ppt' | 'pptx' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'svg' | 'txt' | 'zip' | 'rar' | 'mp3' | 'mp4' | 'png' | 'empty';\r\n\r\nexport type TableCellTypes = 'text' | 'lead_text' | 'lead_checkbox' | 'badge';\r\n\r\nexport type ProgressStepStatus = 'incomplete' | 'current' | 'complete';\r\n\r\nexport type ProgressStepTypes = 'icon_only' | 'icon_left' | 'icon_top' | 'text_line' | 'featured_icon_left' | 'featured_icon_top';\r\n\r\nexport type ProgressStepStates = 'default' | 'destructive';\r\n\r\nexport type BadgeTypes = 'pill_color' | 'pill_outline' | 'badge_color' | 'badge_modern';\r\n\r\nexport type GeneralStyles = 'standard' | 'compact';\r\n\r\nexport type StateType = 'default' | 'disabled' | 'applied' | 'loading';\r\n\r\nexport type ButtonGroupTypes = 'false' | 'leading' | 'only' | 'dot' | 'checkbox';\r\n\r\nexport type ThemeTypes = 'system' | 'light' | 'dark';\r\n\r\nexport type BadgeIconTypes = 'dot' | 'avatar' | 'icon_leading' | 'icon_trailing' | 'country' | 'only' | 'false';\r\n\r\nexport type DropdownRoles = { badgeLabel: string; badgeColor: GeneralColors; badgeType: BadgeTypes };\r\n\r\nexport type StepperType = {\r\n state: ProgressStepStates;\r\n status: ProgressStepStatus;\r\n label?: string;\r\n supportingText?: string;\r\n};\r\n\r\nexport type DetailCellType = 'information' | 'document' | 'status' | 'button';\r\n\r\nexport type MetricFeaturedIconTypes = 'glassmorphism' | 'circular_filled';\r\n\r\nexport interface DropdownListGroup {\r\n icon: string;\r\n label: string;\r\n shortcut: string;\r\n}\r\n\r\nexport type CloseButtonPositions = 'left' | 'right';\r\n\r\nexport interface Notification {\r\n label: string;\r\n time: string;\r\n desc: string;\r\n icon: string;\r\n}\r\n\r\nexport type IllustrationTypes = 'cloud' | 'box' | 'documents' | 'credit_card';\r\n\r\nexport type PatternTypes = 'circles' | 'grid' | 'grid_dot' | 'squares';\r\n\r\nexport type MobilePosition = 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right';\r\n\r\nexport interface TableColumn {\r\n key: string;\r\n label: string;\r\n supportingText?: string | ((row: any) => string);\r\n width?: string;\r\n align?: 'left' | 'center' | 'right';\r\n stickyRight?: boolean;\r\n helpIcon?: boolean;\r\n sortable?: boolean;\r\n sortType?: 'string' | 'number' | 'date';\r\n visible?: boolean;\r\n sortComparator?: (a: any, b: any) => number;\r\n cellComponent?: string;\r\n cellActionType?: 'dropdown' | 'void';\r\n cellProps?: ((row: any) => { [key: string]: any }) | { [key: string]: any };\r\n cellSlots?: {\r\n default?: {\r\n tag?: string; // e.g., 'p', 'span' to wrap content\r\n content: (row: any) => string | any; // Function to get slot content\r\n };\r\n named?: {\r\n [slotName: string]: {\r\n tag: string; // e.g., 'p', 'h1', 'span'\r\n content: (row: any) => string | any; // Function to get slot content\r\n };\r\n };\r\n };\r\n onClick?: () => void;\r\n mobile?: {\r\n position?: MobilePosition;\r\n };\r\n}\r\n\r\nexport interface RowAction {\r\n label: string;\r\n icon?: string;\r\n action: string; // emitted event name\r\n disabled?: boolean;\r\n destructive?: boolean;\r\n type?: 'button' | 'dropdown';\r\n}\r\n\r\nexport interface DropdownOption {\r\n label: string;\r\n icon?: string;\r\n action: string; // emitted event name\r\n disabled?: boolean;\r\n}\r\n\r\nexport type PortalPlacement =\r\n | 'top'\r\n | 'top-start'\r\n | 'top-end'\r\n | 'bottom'\r\n | 'bottom-start'\r\n | 'bottom-end'\r\n | 'left'\r\n | 'left-start'\r\n | 'left-end'\r\n | 'right'\r\n | 'right-start'\r\n | 'right-end';\r\n\r\n export interface FilterConfig {\r\n title: string;\r\n enableDateRange: boolean;\r\n showClearButton?: boolean;\r\n additionalFields?: {\r\n tag: string;\r\n key: string;\r\n event: string;\r\n props: any;\r\n default?: any;\r\n }[];\r\n initialValues: {\r\n pageNumber: number;\r\n pageSize: number;\r\n };\r\n }"],"names":[],"mappings":"AAIY,IAAA;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,GAGpB,EAAA,CAAA,CAAA;AAMW,IAAA;AAAZ,CAAA,UAAY,aAAa,EAAA;AACvB,IAAA,aAAA,CAAA,WAAA,CAAA,GAAA,YAAwB;AACxB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EALW,aAAa,KAAb,aAAa,GAKxB,EAAA,CAAA,CAAA;AAEW,IAAA;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,qBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"p-cHn6O-Kf.js","sources":["src/models/reusableModels.ts"],"sourcesContent":["export type GeneralSizes = 'xxxxl' | 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs' | 'profile_lg' | 'profile_md' | 'profile_sm';\r\n\r\nexport type GeneralHierarchies = 'primary' | 'secondary_gray' | 'secondary_color' | 'tertiary_gray' | 'tertiary_color' | 'link_gray' | 'link_color';\r\n\r\nexport enum StateEnum {\r\n Default = 'default',\r\n Disabled = 'disabled',\r\n}\r\n\r\nexport type ArrowPositions = 'bottom_center' | 'bottom_left' | 'bottom_right' | 'top_center' | 'left' | 'right' | 'none' | 'center';\r\n\r\nexport type CheckBoxVariants = 'checkbox' | 'check_circle' | 'radio';\r\n\r\nexport enum BorderWeights {\r\n VeryLight = 'very_light',\r\n Light = 'light',\r\n Regular = 'regular',\r\n Heavy = 'heavy',\r\n}\r\n\r\nexport enum OnlineIndicatorStates {\r\n Online = 'online',\r\n Offline = 'offline',\r\n}\r\n\r\nexport type BreakPoints = 'desktop' | 'mobile';\r\n\r\nexport type FileUploadIconType = 'solid' | 'outline';\r\n\r\nexport type FileUploadStates = 'default' | 'in_progress' | 'complete' | 'hover' | 'disabled' | 'error';\r\n\r\nexport type GeneralColors = 'default' | 'gray' | 'primary' | 'error' | 'warning' | 'success' | 'discovery' | 'information' | 'pink' | 'purple' | 'white';\r\n\r\nexport type PaginationNumberShapes = 'square' | 'circle';\r\n\r\nexport type PaginationTypes =\r\n | 'page_default'\r\n | 'page_minimal_center_aligned'\r\n | 'card_default'\r\n | 'card_minimal_right_aligned'\r\n | 'card_minimal_left_aligned'\r\n | 'card_minimal_center_aligned'\r\n | 'card_button_group_right_aligned'\r\n | 'card_button_group_left_aligned'\r\n | 'card_button_group_center_aligned';\r\n\r\nexport type TabTypes =\r\n | 'button_primary'\r\n | 'button_gray'\r\n | 'button_white'\r\n | 'rounded_button_white'\r\n | 'underline'\r\n | 'underline_filled'\r\n | 'line'\r\n | 'button_white_border'\r\n | 'rounded_button_white_border'\r\n | 'button_gray_border';\r\n\r\nexport type GeneralBackgroundCategories = 'plain_background' | 'colored_background';\r\n\r\nexport type InputFieldTypes =\r\n | 'default'\r\n | 'icon_leading'\r\n | 'leading_dropdown'\r\n | 'trailing_dropdown'\r\n | 'leading_text'\r\n | 'payment_input'\r\n | 'tags'\r\n | 'trailing_button'\r\n | 'password'\r\n | 'password_icon_leading'\r\n | 'count';\r\n\r\nexport type DropdownTypes = 'default' | 'icon_leading' | 'avatar_leading' | 'dot_leading' | 'checkbox' | 'search' | 'tags';\r\n\r\nexport type ColorTypes = 'gray' | 'blue' | 'cyan' | 'pink' | 'purple' | 'green' | 'yellow' | 'red' | 'white';\r\n\r\nexport type DropdownItemTypes = string | number | { name: string | number; username: string; selected?: boolean };\r\n\r\nexport type PaginationDotTypes = 'dot' | 'line';\r\n\r\nexport type FileIconStyles = 'default' | 'gray' | 'solid';\r\n\r\nexport type FileIconTypes = 'pdf' | 'csv' | 'jpg' | 'jpeg' | 'ppt' | 'pptx' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'svg' | 'txt' | 'zip' | 'rar' | 'mp3' | 'mp4' | 'png' | 'empty';\r\n\r\nexport type TableCellTypes = 'text' | 'lead_text' | 'lead_checkbox' | 'badge';\r\n\r\nexport type ProgressStepStatus = 'incomplete' | 'current' | 'complete';\r\n\r\nexport type ProgressStepTypes = 'icon_only' | 'icon_left' | 'icon_top' | 'text_line' | 'featured_icon_left' | 'featured_icon_top';\r\n\r\nexport type ProgressStepStates = 'default' | 'destructive';\r\n\r\nexport type BadgeTypes = 'pill_color' | 'pill_outline' | 'badge_color' | 'badge_modern';\r\n\r\nexport type GeneralStyles = 'standard' | 'compact';\r\n\r\nexport type StateType = 'default' | 'disabled' | 'applied' | 'loading';\r\n\r\nexport type ButtonGroupTypes = 'false' | 'leading' | 'only' | 'dot' | 'checkbox';\r\n\r\nexport type ThemeTypes = 'system' | 'light' | 'dark';\r\n\r\nexport type BadgeIconTypes = 'dot' | 'avatar' | 'icon_leading' | 'icon_trailing' | 'country' | 'only' | 'false';\r\n\r\nexport type DropdownRoles = { badgeLabel: string; badgeColor: GeneralColors; badgeType: BadgeTypes };\r\n\r\nexport type StepperType = {\r\n state: ProgressStepStates;\r\n status: ProgressStepStatus;\r\n label?: string;\r\n supportingText?: string;\r\n};\r\n\r\nexport type DetailCellType = 'information' | 'document' | 'status' | 'button';\r\n\r\nexport type MetricFeaturedIconTypes = 'glassmorphism' | 'circular_filled';\r\n\r\nexport interface DropdownListGroup {\r\n icon: string;\r\n label: string;\r\n shortcut: string;\r\n}\r\n\r\nexport type CloseButtonPositions = 'left' | 'right';\r\n\r\nexport interface Notification {\r\n label: string;\r\n time: string;\r\n desc: string;\r\n icon: string;\r\n}\r\n\r\nexport type IllustrationTypes = 'cloud' | 'box' | 'documents' | 'credit_card';\r\n\r\nexport type PatternTypes = 'circles' | 'grid' | 'grid_dot' | 'squares';\r\n\r\nexport type MobilePosition = 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right';\r\n\r\nexport interface TableColumn {\r\n key: string;\r\n label: string;\r\n transform?: {\r\n \r\n }\r\n value?: (row: any) => any;\r\n supportingText?: string | ((row: any) => string);\r\n width?: string;\r\n align?: 'left' | 'center' | 'right';\r\n stickyRight?: boolean;\r\n helpIcon?: boolean;\r\n sortable?: boolean;\r\n sortType?: 'string' | 'number' | 'date';\r\n visible?: boolean;\r\n sortComparator?: (a: any, b: any) => number;\r\n cellComponent?: string;\r\n cellActionType?: 'dropdown' | 'void';\r\n cellProps?: ((row: any) => { [key: string]: any }) | { [key: string]: any };\r\n cellSlots?: {\r\n default?: {\r\n tag?: string; // e.g., 'p', 'span' to wrap content\r\n content: (row: any) => string | any; // Function to get slot content\r\n };\r\n named?: {\r\n [slotName: string]: {\r\n tag: string; // e.g., 'p', 'h1', 'span'\r\n content: (row: any) => string | any; // Function to get slot content\r\n };\r\n };\r\n };\r\n onClick?: () => void;\r\n mobile?: {\r\n position?: MobilePosition;\r\n };\r\n}\r\n\r\nexport interface RowAction {\r\n label: string;\r\n icon?: string;\r\n action: string; // emitted event name\r\n disabled?: boolean;\r\n destructive?: boolean;\r\n type?: 'button' | 'dropdown';\r\n}\r\n\r\nexport interface DropdownOption {\r\n label: string;\r\n icon?: string;\r\n action: string; // emitted event name\r\n disabled?: boolean;\r\n}\r\n\r\nexport type PortalPlacement =\r\n | 'top'\r\n | 'top-start'\r\n | 'top-end'\r\n | 'bottom'\r\n | 'bottom-start'\r\n | 'bottom-end'\r\n | 'left'\r\n | 'left-start'\r\n | 'left-end'\r\n | 'right'\r\n | 'right-start'\r\n | 'right-end';\r\n\r\n export interface FilterConfig {\r\n title: string;\r\n enableDateRange: boolean;\r\n showClearButton?: boolean;\r\n additionalFields?: {\r\n tag: string;\r\n key: string;\r\n event: string;\r\n props: any;\r\n default?: any;\r\n }[];\r\n initialValues: {\r\n pageNumber: number;\r\n pageSize: number;\r\n };\r\n }"],"names":[],"mappings":"AAIY,IAAA;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,GAGpB,EAAA,CAAA,CAAA;AAMW,IAAA;AAAZ,CAAA,UAAY,aAAa,EAAA;AACvB,IAAA,aAAA,CAAA,WAAA,CAAA,GAAA,YAAwB;AACxB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EALW,aAAa,KAAb,aAAa,GAKxB,EAAA,CAAA,CAAA;AAEW,IAAA;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,qBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;;;"}
@@ -54,6 +54,7 @@ Type: `Promise<HTMLButtonElement>`
54
54
  - [gb-file-upload](../gb-file-upload)
55
55
  - [gb-file-upload-item-base](../gb-file-upload-item-base)
56
56
  - [gb-filter-button](../gb-filter-button)
57
+ - [gb-filter-modal](../gb-filter-modal)
57
58
  - [gb-input-dropdown](../gb-input-dropdown)
58
59
  - [gb-input-field](../gb-input-field)
59
60
  - [gb-modal-action](../gb-modal-action)
@@ -82,6 +83,7 @@ graph TD;
82
83
  gb-file-upload --> gb-button
83
84
  gb-file-upload-item-base --> gb-button
84
85
  gb-filter-button --> gb-button
86
+ gb-filter-modal --> gb-button
85
87
  gb-input-dropdown --> gb-button
86
88
  gb-input-field --> gb-button
87
89
  gb-modal-action --> gb-button
@@ -61,6 +61,7 @@ export declare class GbTable {
61
61
  actionsType: 'none' | 'dropdown' | '';
62
62
  showCheckbox: boolean;
63
63
  tableHeadColor: 'gray' | 'blue';
64
+ rowKey: string | ((row: any) => string);
64
65
  internalCurrentPage: number;
65
66
  internalPageSize: number;
66
67
  openRowIndex: number | null;
@@ -79,8 +80,9 @@ export declare class GbTable {
79
80
  y: number;
80
81
  };
81
82
  showFilterModalInternal: boolean;
83
+ isFilterModalVisible: boolean;
82
84
  internalLoading: boolean;
83
- rowActionClick: EventEmitter<{
85
+ rowActionClicked: EventEmitter<{
84
86
  action: string;
85
87
  row: any;
86
88
  }>;
@@ -98,6 +100,10 @@ export declare class GbTable {
98
100
  rowClicked: EventEmitter<{
99
101
  row: any;
100
102
  }>;
103
+ applyFilters: EventEmitter<{
104
+ filters: any;
105
+ pagination: any;
106
+ }>;
101
107
  private isDraggingModal;
102
108
  private dragOffset;
103
109
  private actionButtonRefs;
@@ -112,6 +118,7 @@ export declare class GbTable {
112
118
  private checkScrollability;
113
119
  private handleAction;
114
120
  private renderCell;
121
+ private getCellValue;
115
122
  emitPaginationDetails({ detail }: {
116
123
  detail: any;
117
124
  }): void;
@@ -121,6 +128,7 @@ export declare class GbTable {
121
128
  private get sortedData();
122
129
  private get allSelected();
123
130
  private get isIndeterminate();
131
+ private getRowId;
124
132
  private toggleAll;
125
133
  private toggleRow;
126
134
  private emitSelection;
@@ -147,6 +155,7 @@ export declare class GbTable {
147
155
  private onModalPointerUp;
148
156
  private openFilterModal;
149
157
  private closeFilterModal;
158
+ onApplyFilters(detail: any): void;
150
159
  disconnectedCallback(): void;
151
160
  render(): any;
152
161
  }
@@ -2214,15 +2214,15 @@ export namespace Components {
2214
2214
  */
2215
2215
  "actionsType": 'none' | 'dropdown' | '';
2216
2216
  /**
2217
- * @default [ { key: 'id', label: '#', width: '70px', sortable: true, sortType: 'string', mobile: { position: 'top_left' } }, { key: 'date', label: 'Date', mobile: { position: 'bottom_left' } }, { key: 'name', label: 'Name', sortable: true, sortType: 'string', helpIcon: true, supportingText: row => row.role, mobile: { position: 'top_right' } }, { key: 'role', label: 'Role' }, { key: 'amount', label: 'Amount', align: 'right', sortable: true, sortType: 'number' }, { key: 'status', label: 'Status', cellComponent: 'gb-badge', cellProps: row => ({ color: row.status === 'Completed' ? 'success' : 'error', type: 'badge_modern', size: 'sm', icon: 'dot' }), cellSlots: { default: { tag: 'p', content: row => row.status, // Get status value from row }, }, }, ]
2217
+ * @default [ // { key: 'id', label: '#', width: '70px', sortable: true, sortType: 'string', mobile: { position: 'top_left' } }, // { key: 'date', label: 'Date', value: row => row.date.toLocaleString(), mobile: { position: 'bottom_left' } }, // { key: 'name', label: 'Name', sortable: true, sortType: 'string', helpIcon: true, supportingText: row => row.role, mobile: { position: 'top_right' } }, // { key: 'role', label: 'Role' }, // { key: 'amount', label: 'Amount', align: 'right', sortable: true, sortType: 'number' }, // { // key: 'status', // label: 'Status', // cellComponent: 'gb-badge', // cellProps: row => ({ color: row.status === 'Completed' ? 'success' : 'error', type: 'badge_modern', size: 'sm', icon: 'dot' }), // cellSlots: { // default: { // tag: 'p', // content: row => row.status, // }, // }, // }, ]
2218
2218
  */
2219
2219
  "columns": TableColumn[];
2220
2220
  /**
2221
- * @default [ // { // id: '#30011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', // date: 'Jan 1, 2022', // name: 'Emma Johnson', // role: 'Frontend Developer', // level: 'Today', // customer: 'John Doe', // amount: '$120.00', // status: 'Completed', // }, { id: '#3002', date: 'Jan 2, 2022', name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, { id: '#3003', date: 'Jan 3, 2022', name: 'Olivia Brown', role: 'UI Designer', level: 'Today', customer: 'Michael Lee', amount: '$230.75', status: 'Cancelled' }, { id: '#3004', date: 'Jan 4, 2022', name: 'Noah Davis', role: 'DevOps Engineer', level: 'Today', customer: 'Emily Clark', amount: '$59.99', status: 'Completed' }, { id: '#3005', date: 'Jan 5, 2022', name: 'Ava Martinez', role: 'Product Manager', level: 'Today', customer: 'Daniel Harris', amount: '$410.00', status: 'Pending' }, { id: '#3006', date: 'Jan 6, 2022', name: 'William Garcia', role: 'QA Engineer', level: 'Today', customer: 'Sophia Lewis', amount: '$150.20', status: 'Completed' }, { id: '#3007', date: 'Jan 7, 2022', name: 'Isabella Rodriguez', role: 'Business Analyst', level: 'Today', customer: 'James Walker', amount: '$78.40', status: 'Pending' }, { id: '#3008', date: 'Jan 8, 2022', name: 'James Wilson', role: 'Fullstack Developer', level: 'Today', customer: 'Mia Hall', amount: '$300.00', status: 'Completed' }, { id: '#3009', date: 'Jan 9, 2022', name: 'Sophia Anderson', role: 'UX Researcher', level: 'Today', customer: 'Benjamin Allen', amount: '$95.60', status: 'Cancelled' }, { id: '#3010', date: 'Jan 10, 2022', name: 'Benjamin Thomas', role: 'Mobile Developer', level: 'Today', customer: 'Charlotte Young', amount: '$210.10', status: 'Completed' }, { id: '#3011', date: 'Jan 11, 2022', name: 'Mia Taylor', role: 'Data Analyst', level: 'Today', customer: 'Lucas King', amount: '$180.00', status: 'Pending' }, { id: '#3012', date: 'Jan 12, 2022', name: 'Lucas Moore', role: 'Cloud Engineer', level: 'Today', customer: 'Amelia Scott', amount: '$420.75', status: 'Completed' }, { id: '#3013', date: 'Jan 13, 2022', name: 'Charlotte Jackson', role: 'Security Engineer', level: 'Today', customer: 'Elijah Green', amount: '$65.90', status: 'Cancelled' }, { id: '#3014', date: 'Jan 14, 2022', name: 'Elijah Martin', role: 'Technical Lead', level: 'Today', customer: 'Harper Adams', amount: '$510.30', status: 'Completed' }, { id: '#3015', date: 'Jan 15, 2022', name: 'Amelia Lee', role: 'Scrum Master', level: 'Today', customer: 'Alexander Baker', amount: '$99.99', status: 'Pending' }, { id: '#3016', date: 'Jan 16, 2022', name: 'Harper Perez', role: 'Frontend Developer', level: 'Today', customer: 'Ella Nelson', amount: '$275.45', status: 'Completed' }, { id: '#3017', date: 'Jan 17, 2022', name: 'Alexander White', role: 'Backend Developer', level: 'Today', customer: 'Matthew Carter', amount: '$340.00', status: 'Pending' }, { id: '#3018', date: 'Jan 18, 2022', name: 'Ella Harris', role: 'UI Designer', level: 'Today', customer: 'Avery Mitchell', amount: '$88.80', status: 'Completed' }, { id: '#3019', date: 'Jan 19, 2022', name: 'Matthew Clark', role: 'DevOps Engineer', level: 'Today', customer: 'Evelyn Perez', amount: '$190.25', status: 'Cancelled' }, { id: '#3020', date: 'Jan 20, 2022', name: 'Avery Lewis', role: 'Product Manager', level: 'Today', customer: 'Henry Roberts', amount: '$600.00', status: 'Completed' }, { id: '#3021', date: 'Jan 21, 2022', name: 'Evelyn Walker', role: 'QA Engineer', level: 'Today', customer: 'Luna Turner', amount: '$72.30', status: 'Pending' }, { id: '#3022', date: 'Jan 22, 2022', name: 'Henry Hall', role: 'Business Analyst', level: 'Today', customer: 'Jack Phillips', amount: '$310.40', status: 'Completed' }, { id: '#3023', date: 'Jan 23, 2022', name: 'Luna Allen', role: 'Fullstack Developer', level: 'Today', customer: 'Sofia Campbell', amount: '$145.00', status: 'Cancelled' }, { id: '#3024', date: 'Jan 24, 2022', name: 'Jack Young', role: 'UX Researcher', level: 'Today', customer: 'David Parker', amount: '$260.70', status: 'Completed' }, { id: '#3025', date: 'Jan 25, 2022', name: 'Sofia Hernandez', role: 'Mobile Developer', level: 'Today', customer: 'Grace Evans', amount: '$89.10', status: 'Pending' }, { id: '#3026', date: 'Jan 26, 2022', name: 'David King', role: 'Data Analyst', level: 'Today', customer: 'Samuel Edwards', amount: '$410.90', status: 'Completed' }, { id: '#3027', date: 'Jan 27, 2022', name: 'Grace Wright', role: 'Cloud Engineer', level: 'Today', customer: 'Chloe Collins', amount: '$130.55', status: 'Cancelled' }, { id: '#3028', date: 'Jan 28, 2022', name: 'Samuel Scott', role: 'Security Engineer', level: 'Today', customer: 'Victoria Stewart', amount: '$555.00', status: 'Completed' }, { id: '#3029', date: 'Jan 29, 2022', name: 'Chloe Green', role: 'Technical Lead', level: 'Today', customer: 'Nathan Morris', amount: '$205.25', status: 'Pending' }, { id: '#3030', date: 'Jan 30, 2022', name: 'Nathan Adams', role: 'Scrum Master', level: 'Today', customer: 'Zoe Rogers', amount: '$320.80', status: 'Completed' }, ]
2221
+ * @default [ // { // id: '#30011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', // date: 'Jan 1, 2022', // name: 'Emma Johnson', // role: 'Frontend Developer', // level: 'Today', // customer: 'John Doe', // amount: '$120.00', // status: 'Completed', // }, // { id: '#3002', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3003', date: new Date(), name: 'Liam Smith', role: 'Frontend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3004', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3005', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3006', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3003', date: 'Jan 3, 2022', name: 'Olivia Brown', role: 'UI Designer', level: 'Today', customer: 'Michael Lee', amount: '$230.75', status: 'Cancelled' }, // { id: '#3004', date: 'Jan 4, 2022', name: 'Noah Davis', role: 'DevOps Engineer', level: 'Today', customer: 'Emily Clark', amount: '$59.99', status: 'Completed' }, // { id: '#3005', date: 'Jan 5, 2022', name: 'Ava Martinez', role: 'Product Manager', level: 'Today', customer: 'Daniel Harris', amount: '$410.00', status: 'Pending' }, // { id: '#3006', date: 'Jan 6, 2022', name: 'William Garcia', role: 'QA Engineer', level: 'Today', customer: 'Sophia Lewis', amount: '$150.20', status: 'Completed' }, // { id: '#3007', date: 'Jan 7, 2022', name: 'Isabella Rodriguez', role: 'Business Analyst', level: 'Today', customer: 'James Walker', amount: '$78.40', status: 'Pending' }, // { id: '#3008', date: 'Jan 8, 2022', name: 'James Wilson', role: 'Fullstack Developer', level: 'Today', customer: 'Mia Hall', amount: '$300.00', status: 'Completed' }, // { id: '#3009', date: 'Jan 9, 2022', name: 'Sophia Anderson', role: 'UX Researcher', level: 'Today', customer: 'Benjamin Allen', amount: '$95.60', status: 'Cancelled' }, // { id: '#3010', date: 'Jan 10, 2022', name: 'Benjamin Thomas', role: 'Mobile Developer', level: 'Today', customer: 'Charlotte Young', amount: '$210.10', status: 'Completed' }, // { id: '#3011', date: 'Jan 11, 2022', name: 'Mia Taylor', role: 'Data Analyst', level: 'Today', customer: 'Lucas King', amount: '$180.00', status: 'Pending' }, // { id: '#3012', date: 'Jan 12, 2022', name: 'Lucas Moore', role: 'Cloud Engineer', level: 'Today', customer: 'Amelia Scott', amount: '$420.75', status: 'Completed' }, // { id: '#3013', date: 'Jan 13, 2022', name: 'Charlotte Jackson', role: 'Security Engineer', level: 'Today', customer: 'Elijah Green', amount: '$65.90', status: 'Cancelled' }, // { id: '#3014', date: 'Jan 14, 2022', name: 'Elijah Martin', role: 'Technical Lead', level: 'Today', customer: 'Harper Adams', amount: '$510.30', status: 'Completed' }, // { id: '#3015', date: 'Jan 15, 2022', name: 'Amelia Lee', role: 'Scrum Master', level: 'Today', customer: 'Alexander Baker', amount: '$99.99', status: 'Pending' }, // { id: '#3016', date: 'Jan 16, 2022', name: 'Harper Perez', role: 'Frontend Developer', level: 'Today', customer: 'Ella Nelson', amount: '$275.45', status: 'Completed' }, // { id: '#3017', date: 'Jan 17, 2022', name: 'Alexander White', role: 'Backend Developer', level: 'Today', customer: 'Matthew Carter', amount: '$340.00', status: 'Pending' }, // { id: '#3018', date: 'Jan 18, 2022', name: 'Ella Harris', role: 'UI Designer', level: 'Today', customer: 'Avery Mitchell', amount: '$88.80', status: 'Completed' }, // { id: '#3019', date: 'Jan 19, 2022', name: 'Matthew Clark', role: 'DevOps Engineer', level: 'Today', customer: 'Evelyn Perez', amount: '$190.25', status: 'Cancelled' }, // { id: '#3020', date: 'Jan 20, 2022', name: 'Avery Lewis', role: 'Product Manager', level: 'Today', customer: 'Henry Roberts', amount: '$600.00', status: 'Completed' }, // { id: '#3021', date: 'Jan 21, 2022', name: 'Evelyn Walker', role: 'QA Engineer', level: 'Today', customer: 'Luna Turner', amount: '$72.30', status: 'Pending' }, // { id: '#3022', date: 'Jan 22, 2022', name: 'Henry Hall', role: 'Business Analyst', level: 'Today', customer: 'Jack Phillips', amount: '$310.40', status: 'Completed' }, // { id: '#3023', date: 'Jan 23, 2022', name: 'Luna Allen', role: 'Fullstack Developer', level: 'Today', customer: 'Sofia Campbell', amount: '$145.00', status: 'Cancelled' }, // { id: '#3024', date: 'Jan 24, 2022', name: 'Jack Young', role: 'UX Researcher', level: 'Today', customer: 'David Parker', amount: '$260.70', status: 'Completed' }, // { id: '#3025', date: 'Jan 25, 2022', name: 'Sofia Hernandez', role: 'Mobile Developer', level: 'Today', customer: 'Grace Evans', amount: '$89.10', status: 'Pending' }, // { id: '#3026', date: 'Jan 26, 2022', name: 'David King', role: 'Data Analyst', level: 'Today', customer: 'Samuel Edwards', amount: '$410.90', status: 'Completed' }, // { id: '#3027', date: 'Jan 27, 2022', name: 'Grace Wright', role: 'Cloud Engineer', level: 'Today', customer: 'Chloe Collins', amount: '$130.55', status: 'Cancelled' }, // { id: '#3028', date: 'Jan 28, 2022', name: 'Samuel Scott', role: 'Security Engineer', level: 'Today', customer: 'Victoria Stewart', amount: '$555.00', status: 'Completed' }, // { id: '#3029', date: 'Jan 29, 2022', name: 'Chloe Green', role: 'Technical Lead', level: 'Today', customer: 'Nathan Morris', amount: '$205.25', status: 'Pending' }, // { id: '#3030', date: 'Jan 30, 2022', name: 'Nathan Adams', role: 'Scrum Master', level: 'Today', customer: 'Zoe Rogers', amount: '$320.80', status: 'Completed' }, ]
2222
2222
  */
2223
2223
  "data": any[];
2224
2224
  /**
2225
- * @default [ { label: 'View', action: 'view', icon: 'assets/view.svg', disabled: false }, { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', disabled: false }, { label: 'Delete', action: 'delete', icon: 'assets/delete-02.svg', disabled: true }, ]
2225
+ * @default [ // { label: 'View', action: 'view', icon: 'assets/view.svg', disabled: false }, // { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', disabled: false }, // { label: 'Delete', action: 'delete', icon: 'assets/delete-02.svg', disabled: true }, ]
2226
2226
  */
2227
2227
  "dropdownOptions"?: DropdownOption[];
2228
2228
  /**
@@ -2268,11 +2268,15 @@ export namespace Components {
2268
2268
  totalItems?: number;
2269
2269
  };
2270
2270
  /**
2271
- * @default [ { label: '', action: '', icon: 'assets/more-horizontal.svg', type: 'dropdown' }, { label: 'View Details', action: 'view_details', icon: 'assets/view.svg', type: 'button' }, { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', type: 'button' }, ]
2271
+ * @default [ // { label: '', action: '', icon: 'assets/more-horizontal.svg', type: 'dropdown' }, // { label: 'View Details', action: 'view_details', icon: 'assets/view.svg', type: 'button' }, // { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', type: 'button' }, ]
2272
2272
  */
2273
2273
  "rowActions": RowAction[];
2274
2274
  /**
2275
- * @default true
2275
+ * @default 'id'
2276
+ */
2277
+ "rowKey": string | ((row: any) => string);
2278
+ /**
2279
+ * @default false
2276
2280
  */
2277
2281
  "showActionsColumn": boolean;
2278
2282
  /**
@@ -2280,11 +2284,11 @@ export namespace Components {
2280
2284
  */
2281
2285
  "showCheckbox": boolean;
2282
2286
  /**
2283
- * @default true
2287
+ * @default false
2284
2288
  */
2285
2289
  "stickyFirstColumn": boolean;
2286
2290
  /**
2287
- * @default true
2291
+ * @default false
2288
2292
  */
2289
2293
  "stickyLastColumn": boolean;
2290
2294
  /**
@@ -3814,13 +3818,17 @@ declare global {
3814
3818
  new (): HTMLGbTabButtonBaseElement;
3815
3819
  };
3816
3820
  interface HTMLGbTableElementEventMap {
3817
- "rowActionClick": { action: string; row: any };
3821
+ "rowActionClicked": { action: string; row: any };
3818
3822
  "pageItemSelected": { pageSize: any; pageNumber: number };
3819
3823
  "selectionChanged": any[];
3820
3824
  "inputValueChanged": void;
3821
3825
  "dateChange": string | string[];
3822
3826
  "exportClicked": { dataType: string; exportType: string };
3823
3827
  "rowClicked": { row: any };
3828
+ "applyFilters": {
3829
+ filters: any;
3830
+ pagination: any;
3831
+ };
3824
3832
  }
3825
3833
  interface HTMLGbTableElement extends Components.GbTable, HTMLStencilElement {
3826
3834
  addEventListener<K extends keyof HTMLGbTableElementEventMap>(type: K, listener: (this: HTMLGbTableElement, ev: GbTableCustomEvent<HTMLGbTableElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -6442,15 +6450,15 @@ declare namespace LocalJSX {
6442
6450
  */
6443
6451
  "actionsType"?: 'none' | 'dropdown' | '';
6444
6452
  /**
6445
- * @default [ { key: 'id', label: '#', width: '70px', sortable: true, sortType: 'string', mobile: { position: 'top_left' } }, { key: 'date', label: 'Date', mobile: { position: 'bottom_left' } }, { key: 'name', label: 'Name', sortable: true, sortType: 'string', helpIcon: true, supportingText: row => row.role, mobile: { position: 'top_right' } }, { key: 'role', label: 'Role' }, { key: 'amount', label: 'Amount', align: 'right', sortable: true, sortType: 'number' }, { key: 'status', label: 'Status', cellComponent: 'gb-badge', cellProps: row => ({ color: row.status === 'Completed' ? 'success' : 'error', type: 'badge_modern', size: 'sm', icon: 'dot' }), cellSlots: { default: { tag: 'p', content: row => row.status, // Get status value from row }, }, }, ]
6453
+ * @default [ // { key: 'id', label: '#', width: '70px', sortable: true, sortType: 'string', mobile: { position: 'top_left' } }, // { key: 'date', label: 'Date', value: row => row.date.toLocaleString(), mobile: { position: 'bottom_left' } }, // { key: 'name', label: 'Name', sortable: true, sortType: 'string', helpIcon: true, supportingText: row => row.role, mobile: { position: 'top_right' } }, // { key: 'role', label: 'Role' }, // { key: 'amount', label: 'Amount', align: 'right', sortable: true, sortType: 'number' }, // { // key: 'status', // label: 'Status', // cellComponent: 'gb-badge', // cellProps: row => ({ color: row.status === 'Completed' ? 'success' : 'error', type: 'badge_modern', size: 'sm', icon: 'dot' }), // cellSlots: { // default: { // tag: 'p', // content: row => row.status, // }, // }, // }, ]
6446
6454
  */
6447
6455
  "columns"?: TableColumn[];
6448
6456
  /**
6449
- * @default [ // { // id: '#30011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', // date: 'Jan 1, 2022', // name: 'Emma Johnson', // role: 'Frontend Developer', // level: 'Today', // customer: 'John Doe', // amount: '$120.00', // status: 'Completed', // }, { id: '#3002', date: 'Jan 2, 2022', name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, { id: '#3003', date: 'Jan 3, 2022', name: 'Olivia Brown', role: 'UI Designer', level: 'Today', customer: 'Michael Lee', amount: '$230.75', status: 'Cancelled' }, { id: '#3004', date: 'Jan 4, 2022', name: 'Noah Davis', role: 'DevOps Engineer', level: 'Today', customer: 'Emily Clark', amount: '$59.99', status: 'Completed' }, { id: '#3005', date: 'Jan 5, 2022', name: 'Ava Martinez', role: 'Product Manager', level: 'Today', customer: 'Daniel Harris', amount: '$410.00', status: 'Pending' }, { id: '#3006', date: 'Jan 6, 2022', name: 'William Garcia', role: 'QA Engineer', level: 'Today', customer: 'Sophia Lewis', amount: '$150.20', status: 'Completed' }, { id: '#3007', date: 'Jan 7, 2022', name: 'Isabella Rodriguez', role: 'Business Analyst', level: 'Today', customer: 'James Walker', amount: '$78.40', status: 'Pending' }, { id: '#3008', date: 'Jan 8, 2022', name: 'James Wilson', role: 'Fullstack Developer', level: 'Today', customer: 'Mia Hall', amount: '$300.00', status: 'Completed' }, { id: '#3009', date: 'Jan 9, 2022', name: 'Sophia Anderson', role: 'UX Researcher', level: 'Today', customer: 'Benjamin Allen', amount: '$95.60', status: 'Cancelled' }, { id: '#3010', date: 'Jan 10, 2022', name: 'Benjamin Thomas', role: 'Mobile Developer', level: 'Today', customer: 'Charlotte Young', amount: '$210.10', status: 'Completed' }, { id: '#3011', date: 'Jan 11, 2022', name: 'Mia Taylor', role: 'Data Analyst', level: 'Today', customer: 'Lucas King', amount: '$180.00', status: 'Pending' }, { id: '#3012', date: 'Jan 12, 2022', name: 'Lucas Moore', role: 'Cloud Engineer', level: 'Today', customer: 'Amelia Scott', amount: '$420.75', status: 'Completed' }, { id: '#3013', date: 'Jan 13, 2022', name: 'Charlotte Jackson', role: 'Security Engineer', level: 'Today', customer: 'Elijah Green', amount: '$65.90', status: 'Cancelled' }, { id: '#3014', date: 'Jan 14, 2022', name: 'Elijah Martin', role: 'Technical Lead', level: 'Today', customer: 'Harper Adams', amount: '$510.30', status: 'Completed' }, { id: '#3015', date: 'Jan 15, 2022', name: 'Amelia Lee', role: 'Scrum Master', level: 'Today', customer: 'Alexander Baker', amount: '$99.99', status: 'Pending' }, { id: '#3016', date: 'Jan 16, 2022', name: 'Harper Perez', role: 'Frontend Developer', level: 'Today', customer: 'Ella Nelson', amount: '$275.45', status: 'Completed' }, { id: '#3017', date: 'Jan 17, 2022', name: 'Alexander White', role: 'Backend Developer', level: 'Today', customer: 'Matthew Carter', amount: '$340.00', status: 'Pending' }, { id: '#3018', date: 'Jan 18, 2022', name: 'Ella Harris', role: 'UI Designer', level: 'Today', customer: 'Avery Mitchell', amount: '$88.80', status: 'Completed' }, { id: '#3019', date: 'Jan 19, 2022', name: 'Matthew Clark', role: 'DevOps Engineer', level: 'Today', customer: 'Evelyn Perez', amount: '$190.25', status: 'Cancelled' }, { id: '#3020', date: 'Jan 20, 2022', name: 'Avery Lewis', role: 'Product Manager', level: 'Today', customer: 'Henry Roberts', amount: '$600.00', status: 'Completed' }, { id: '#3021', date: 'Jan 21, 2022', name: 'Evelyn Walker', role: 'QA Engineer', level: 'Today', customer: 'Luna Turner', amount: '$72.30', status: 'Pending' }, { id: '#3022', date: 'Jan 22, 2022', name: 'Henry Hall', role: 'Business Analyst', level: 'Today', customer: 'Jack Phillips', amount: '$310.40', status: 'Completed' }, { id: '#3023', date: 'Jan 23, 2022', name: 'Luna Allen', role: 'Fullstack Developer', level: 'Today', customer: 'Sofia Campbell', amount: '$145.00', status: 'Cancelled' }, { id: '#3024', date: 'Jan 24, 2022', name: 'Jack Young', role: 'UX Researcher', level: 'Today', customer: 'David Parker', amount: '$260.70', status: 'Completed' }, { id: '#3025', date: 'Jan 25, 2022', name: 'Sofia Hernandez', role: 'Mobile Developer', level: 'Today', customer: 'Grace Evans', amount: '$89.10', status: 'Pending' }, { id: '#3026', date: 'Jan 26, 2022', name: 'David King', role: 'Data Analyst', level: 'Today', customer: 'Samuel Edwards', amount: '$410.90', status: 'Completed' }, { id: '#3027', date: 'Jan 27, 2022', name: 'Grace Wright', role: 'Cloud Engineer', level: 'Today', customer: 'Chloe Collins', amount: '$130.55', status: 'Cancelled' }, { id: '#3028', date: 'Jan 28, 2022', name: 'Samuel Scott', role: 'Security Engineer', level: 'Today', customer: 'Victoria Stewart', amount: '$555.00', status: 'Completed' }, { id: '#3029', date: 'Jan 29, 2022', name: 'Chloe Green', role: 'Technical Lead', level: 'Today', customer: 'Nathan Morris', amount: '$205.25', status: 'Pending' }, { id: '#3030', date: 'Jan 30, 2022', name: 'Nathan Adams', role: 'Scrum Master', level: 'Today', customer: 'Zoe Rogers', amount: '$320.80', status: 'Completed' }, ]
6457
+ * @default [ // { // id: '#30011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', // date: 'Jan 1, 2022', // name: 'Emma Johnson', // role: 'Frontend Developer', // level: 'Today', // customer: 'John Doe', // amount: '$120.00', // status: 'Completed', // }, // { id: '#3002', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3003', date: new Date(), name: 'Liam Smith', role: 'Frontend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3004', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3005', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3006', date: new Date(), name: 'Liam Smith', role: 'Backend Developer', level: 'Today', customer: 'Sarah Wilson', amount: '$85.50', status: 'Pending' }, // { id: '#3003', date: 'Jan 3, 2022', name: 'Olivia Brown', role: 'UI Designer', level: 'Today', customer: 'Michael Lee', amount: '$230.75', status: 'Cancelled' }, // { id: '#3004', date: 'Jan 4, 2022', name: 'Noah Davis', role: 'DevOps Engineer', level: 'Today', customer: 'Emily Clark', amount: '$59.99', status: 'Completed' }, // { id: '#3005', date: 'Jan 5, 2022', name: 'Ava Martinez', role: 'Product Manager', level: 'Today', customer: 'Daniel Harris', amount: '$410.00', status: 'Pending' }, // { id: '#3006', date: 'Jan 6, 2022', name: 'William Garcia', role: 'QA Engineer', level: 'Today', customer: 'Sophia Lewis', amount: '$150.20', status: 'Completed' }, // { id: '#3007', date: 'Jan 7, 2022', name: 'Isabella Rodriguez', role: 'Business Analyst', level: 'Today', customer: 'James Walker', amount: '$78.40', status: 'Pending' }, // { id: '#3008', date: 'Jan 8, 2022', name: 'James Wilson', role: 'Fullstack Developer', level: 'Today', customer: 'Mia Hall', amount: '$300.00', status: 'Completed' }, // { id: '#3009', date: 'Jan 9, 2022', name: 'Sophia Anderson', role: 'UX Researcher', level: 'Today', customer: 'Benjamin Allen', amount: '$95.60', status: 'Cancelled' }, // { id: '#3010', date: 'Jan 10, 2022', name: 'Benjamin Thomas', role: 'Mobile Developer', level: 'Today', customer: 'Charlotte Young', amount: '$210.10', status: 'Completed' }, // { id: '#3011', date: 'Jan 11, 2022', name: 'Mia Taylor', role: 'Data Analyst', level: 'Today', customer: 'Lucas King', amount: '$180.00', status: 'Pending' }, // { id: '#3012', date: 'Jan 12, 2022', name: 'Lucas Moore', role: 'Cloud Engineer', level: 'Today', customer: 'Amelia Scott', amount: '$420.75', status: 'Completed' }, // { id: '#3013', date: 'Jan 13, 2022', name: 'Charlotte Jackson', role: 'Security Engineer', level: 'Today', customer: 'Elijah Green', amount: '$65.90', status: 'Cancelled' }, // { id: '#3014', date: 'Jan 14, 2022', name: 'Elijah Martin', role: 'Technical Lead', level: 'Today', customer: 'Harper Adams', amount: '$510.30', status: 'Completed' }, // { id: '#3015', date: 'Jan 15, 2022', name: 'Amelia Lee', role: 'Scrum Master', level: 'Today', customer: 'Alexander Baker', amount: '$99.99', status: 'Pending' }, // { id: '#3016', date: 'Jan 16, 2022', name: 'Harper Perez', role: 'Frontend Developer', level: 'Today', customer: 'Ella Nelson', amount: '$275.45', status: 'Completed' }, // { id: '#3017', date: 'Jan 17, 2022', name: 'Alexander White', role: 'Backend Developer', level: 'Today', customer: 'Matthew Carter', amount: '$340.00', status: 'Pending' }, // { id: '#3018', date: 'Jan 18, 2022', name: 'Ella Harris', role: 'UI Designer', level: 'Today', customer: 'Avery Mitchell', amount: '$88.80', status: 'Completed' }, // { id: '#3019', date: 'Jan 19, 2022', name: 'Matthew Clark', role: 'DevOps Engineer', level: 'Today', customer: 'Evelyn Perez', amount: '$190.25', status: 'Cancelled' }, // { id: '#3020', date: 'Jan 20, 2022', name: 'Avery Lewis', role: 'Product Manager', level: 'Today', customer: 'Henry Roberts', amount: '$600.00', status: 'Completed' }, // { id: '#3021', date: 'Jan 21, 2022', name: 'Evelyn Walker', role: 'QA Engineer', level: 'Today', customer: 'Luna Turner', amount: '$72.30', status: 'Pending' }, // { id: '#3022', date: 'Jan 22, 2022', name: 'Henry Hall', role: 'Business Analyst', level: 'Today', customer: 'Jack Phillips', amount: '$310.40', status: 'Completed' }, // { id: '#3023', date: 'Jan 23, 2022', name: 'Luna Allen', role: 'Fullstack Developer', level: 'Today', customer: 'Sofia Campbell', amount: '$145.00', status: 'Cancelled' }, // { id: '#3024', date: 'Jan 24, 2022', name: 'Jack Young', role: 'UX Researcher', level: 'Today', customer: 'David Parker', amount: '$260.70', status: 'Completed' }, // { id: '#3025', date: 'Jan 25, 2022', name: 'Sofia Hernandez', role: 'Mobile Developer', level: 'Today', customer: 'Grace Evans', amount: '$89.10', status: 'Pending' }, // { id: '#3026', date: 'Jan 26, 2022', name: 'David King', role: 'Data Analyst', level: 'Today', customer: 'Samuel Edwards', amount: '$410.90', status: 'Completed' }, // { id: '#3027', date: 'Jan 27, 2022', name: 'Grace Wright', role: 'Cloud Engineer', level: 'Today', customer: 'Chloe Collins', amount: '$130.55', status: 'Cancelled' }, // { id: '#3028', date: 'Jan 28, 2022', name: 'Samuel Scott', role: 'Security Engineer', level: 'Today', customer: 'Victoria Stewart', amount: '$555.00', status: 'Completed' }, // { id: '#3029', date: 'Jan 29, 2022', name: 'Chloe Green', role: 'Technical Lead', level: 'Today', customer: 'Nathan Morris', amount: '$205.25', status: 'Pending' }, // { id: '#3030', date: 'Jan 30, 2022', name: 'Nathan Adams', role: 'Scrum Master', level: 'Today', customer: 'Zoe Rogers', amount: '$320.80', status: 'Completed' }, ]
6450
6458
  */
6451
6459
  "data"?: any[];
6452
6460
  /**
6453
- * @default [ { label: 'View', action: 'view', icon: 'assets/view.svg', disabled: false }, { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', disabled: false }, { label: 'Delete', action: 'delete', icon: 'assets/delete-02.svg', disabled: true }, ]
6461
+ * @default [ // { label: 'View', action: 'view', icon: 'assets/view.svg', disabled: false }, // { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', disabled: false }, // { label: 'Delete', action: 'delete', icon: 'assets/delete-02.svg', disabled: true }, ]
6454
6462
  */
6455
6463
  "dropdownOptions"?: DropdownOption[];
6456
6464
  /**
@@ -6485,11 +6493,15 @@ declare namespace LocalJSX {
6485
6493
  * @default false
6486
6494
  */
6487
6495
  "loading"?: boolean;
6496
+ "onApplyFilters"?: (event: GbTableCustomEvent<{
6497
+ filters: any;
6498
+ pagination: any;
6499
+ }>) => void;
6488
6500
  "onDateChange"?: (event: GbTableCustomEvent<string | string[]>) => void;
6489
6501
  "onExportClicked"?: (event: GbTableCustomEvent<{ dataType: string; exportType: string }>) => void;
6490
6502
  "onInputValueChanged"?: (event: GbTableCustomEvent<void>) => void;
6491
6503
  "onPageItemSelected"?: (event: GbTableCustomEvent<{ pageSize: any; pageNumber: number }>) => void;
6492
- "onRowActionClick"?: (event: GbTableCustomEvent<{ action: string; row: any }>) => void;
6504
+ "onRowActionClicked"?: (event: GbTableCustomEvent<{ action: string; row: any }>) => void;
6493
6505
  "onRowClicked"?: (event: GbTableCustomEvent<{ row: any }>) => void;
6494
6506
  "onSelectionChanged"?: (event: GbTableCustomEvent<any[]>) => void;
6495
6507
  /**
@@ -6503,11 +6515,15 @@ declare namespace LocalJSX {
6503
6515
  totalItems?: number;
6504
6516
  };
6505
6517
  /**
6506
- * @default [ { label: '', action: '', icon: 'assets/more-horizontal.svg', type: 'dropdown' }, { label: 'View Details', action: 'view_details', icon: 'assets/view.svg', type: 'button' }, { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', type: 'button' }, ]
6518
+ * @default [ // { label: '', action: '', icon: 'assets/more-horizontal.svg', type: 'dropdown' }, // { label: 'View Details', action: 'view_details', icon: 'assets/view.svg', type: 'button' }, // { label: 'Edit', action: 'edit', icon: 'assets/pencil-edit-01.svg', type: 'button' }, ]
6507
6519
  */
6508
6520
  "rowActions"?: RowAction[];
6509
6521
  /**
6510
- * @default true
6522
+ * @default 'id'
6523
+ */
6524
+ "rowKey"?: string | ((row: any) => string);
6525
+ /**
6526
+ * @default false
6511
6527
  */
6512
6528
  "showActionsColumn"?: boolean;
6513
6529
  /**
@@ -6515,11 +6531,11 @@ declare namespace LocalJSX {
6515
6531
  */
6516
6532
  "showCheckbox"?: boolean;
6517
6533
  /**
6518
- * @default true
6534
+ * @default false
6519
6535
  */
6520
6536
  "stickyFirstColumn"?: boolean;
6521
6537
  /**
6522
- * @default true
6538
+ * @default false
6523
6539
  */
6524
6540
  "stickyLastColumn"?: boolean;
6525
6541
  /**
@@ -76,6 +76,8 @@ export type MobilePosition = 'top_left' | 'top_right' | 'bottom_left' | 'bottom_
76
76
  export interface TableColumn {
77
77
  key: string;
78
78
  label: string;
79
+ transform?: {};
80
+ value?: (row: any) => any;
79
81
  supportingText?: string | ((row: any) => string);
80
82
  width?: string;
81
83
  align?: 'left' | 'center' | 'right';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "globuswebcomponents",
3
- "version": "2.9.2",
3
+ "version": "2.10.2",
4
4
  "description": "Globus One",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- {"file":"p-3Du3w-pS.js","mappings":";;AAAA,MAAM,eAAe,GAAG,8zuEAA8zuE;;MCQz0uE,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAQ2B,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AA0ClD;IAvCS,iBAAiB,GAAA;AACvB,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;AAC5B,YAAA,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO;YAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;;;IAIzC,MA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,CAAE,EAAA,EACvI,CACE,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,0GAA0G,EAC5G,MAAM,EAAC,SAAS,kBACH,KAAK,EAAA,gBAAA,EACH,OAAO,EACN,iBAAA,EAAA,OAAO,GACvB,CACE,IACJ,IAAI,CACF;SACT;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/gb-toggle-base/gb-toggle-base.css?tag=gb-toggle-base&encapsulation=shadow","src/components/gb-toggle-base/gb-toggle-base.tsx"],"sourcesContent":["@import './../../global/global.css';\r\n\r\n/* Basic Styles for the Toggle */\r\ninput[type=\"checkbox\"] {\r\n display: none; /* Hide native checkbox */\r\n}\r\n\r\nlabel {\r\n display: inline-block;\r\n border-radius: var(--rounded-lg);\r\n position: relative;\r\n background-color: var(--color-background-gray-subtle, #E3E8EF);\r\n cursor: pointer;\r\n transition: background-color 0.3s ease;\r\n padding: 0.125rem;\r\n}\r\n\r\nlabel.sm{\r\n width: 2.25rem;\r\n height: 1.25rem;\r\n}\r\n\r\nlabel.md{\r\n width: 2.75rem;\r\n height: 1.5rem;\r\n}\r\n\r\nlabel.pressed.default {\r\n background-color: var(--color-background-selected, #075db2);\r\n}\r\n\r\nlabel.disabled{\r\n background-color: var(--color-background-disabled, #F6F8FA);\r\n}\r\n\r\nlabel.pressed.disabled {\r\n background-color: var(--color-background-gray-subtle, #E3E8EF); /* Light gray background when pressed and in disabled state */\r\n}\r\n\r\n/* Circle inside the toggle */\r\nlabel::before {\r\n content: '';\r\n position: absolute;\r\n background-color: var(--color-icon-inverse, #FFFFFF);\r\n border-radius: 50%;\r\n transition: transform 0.3s ease;\r\n filter: drop-shadow(0px 1px 2px rgba(16, 24, 40, 0.06)) drop-shadow(0px 1px 3px rgba(16, 24, 40, 0.10));\r\n}\r\n\r\nlabel.sm::before{\r\n width: 1rem;\r\n height: 1rem;\r\n top: 0.25rem;\r\n left: 0.25rem;\r\n}\r\n\r\nlabel.md::before{\r\n width: 1.25rem;\r\n height: 1.25rem;\r\n top: 0.24rem;\r\n left: 0.25rem;\r\n}\r\n\r\nlabel.sm.pressed::before {\r\n transform: translateX(16px); /* Move the white circle to the right when pressed */\r\n}\r\n\r\nlabel.md.pressed::before {\r\n transform: translateX(20px); /* Move the white circle to the right when pressed */\r\n}\r\n\r\nlabel.disabled::before {\r\n background-color: var(--color-icon-disabled, #CDD5DF); /* Change circle background when disabled */\r\n}\r\n\r\nlabel.pressed.disabled::before {\r\n background-color: var(--color-background-gray-bold, #9AA4B2); /* Change circle background when disabled */\r\n}\r\n\r\n/* Checkmark SVG Styles */\r\n.default_checked_svg,\r\n.disabled_checked_svg {\r\n position: absolute;\r\n transform: translate(-50%, -50%);\r\n width: 12px;\r\n height: 12px;\r\n display: none; /* Hidden by default */\r\n}\r\n\r\n.pressed .default_checked_svg {\r\n display: block; /* Show checkmark when pressed and default */\r\n}\r\n\r\n.pressed .disabled_checked_svg {\r\n display: block; /* Show checkmark when pressed and disabled */\r\n}\r\n\r\n.default_checked_svg.sm,\r\n.disabled_checked_svg.sm{\r\n top: 0.75rem;\r\n right: 0;\r\n}\r\n\r\n.default_checked_svg.md,\r\n.disabled_checked_svg.md{\r\n top: 0.85rem;\r\n right: 0.1rem;\r\n}\r\n\r\n\r\n","import { Component, Event, EventEmitter, h, Prop } from \"@stencil/core\";\r\nimport { GeneralSizes, StateEnum } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-toggle-base',\r\n styleUrl: 'gb-toggle-base.css',\r\n shadow: true,\r\n})\r\nexport class GbToggleBase {\r\n @Prop() size: GeneralSizes;\r\n @Prop() state: StateEnum;\r\n @Prop({ mutable: true }) pressed: boolean = false;\r\n @Event() toggleClicked: EventEmitter<boolean>;\r\n\r\n private handleToggleClick() {\r\n if (this.state === 'default') {\r\n this.pressed = !this.pressed;\r\n this.toggleClicked.emit(this.pressed);\r\n }\r\n }\r\n\r\n render() {\r\n return [\r\n <input type=\"checkbox\" id=\"customCheckbox\" class={`${this.pressed ? 'pressed' : ''}`} readonly />,\r\n <label\r\n onClick={() => this.handleToggleClick()}\r\n class={`${this.size} ${this.state} ${this.pressed ? 'pressed' : ''}`}\r\n htmlFor=\"customCheckbox\"\r\n >\r\n {this.pressed && this.state === 'default' ? (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" class={`default_checked_svg ${this.size}`}>\r\n <path\r\n d=\"M2.08325 6.04167C2.08325 6.04167 2.70825 6.04167 3.54159 7.5C3.54159 7.5 5.85776 3.68056 7.91659 2.91667\"\r\n stroke=\"#075DB2\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n ) : this.pressed && this.state === 'disabled' ? (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" class={`disabled_checked_svg ${this.size}`}>\r\n <path\r\n d=\"M2.08325 6.04167C2.08325 6.04167 2.70825 6.04167 3.54159 7.5C3.54159 7.5 5.85776 3.68056 7.91659 2.91667\"\r\n stroke=\"#E3E8EF\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n ) : null}\r\n </label>,\r\n ];\r\n }\r\n}"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-BAGZEYW2.js","mappings":";;;;;AAAA,MAAM,gBAAgB,GAAG,i5sEAAi5sE;;;;;;;;;;;;;;MCQ75sE,aAAa,iBAAAA,kBAAA,CAAA,MAAA,aAAA,SAAAC,CAAA,CAAA;AAL1B,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;QAMU,IAAA,CAAA,YAAY,GAAiB;AACnC,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,eAAe,EAAE,IAAI;AACrB,YAAA,eAAe,EAAE,IAAI;AACrB,YAA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IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAA,EACnG,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,cAAA,CAAmB,CACT,CACR,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,KAAK,EAAA,EACd,CAAW,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAA,EAC5F,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,OAAA,CAAY,CACF,CACR,CACF,CACF,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/gb-filter-modal/gb-filter-modal.css?tag=gb-filter-modal&encapsulation=shadow","src/components/gb-filter-modal/gb-filter-modal.tsx"],"sourcesContent":["@import './../../global/global.css';\r\n\r\n.filter_modal_wrapper {\r\n background-color: white;\r\n width: 27.5rem;\r\n height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: var(--rounded-none);\r\n background: var(--color-surface, #ffffff);\r\n box-shadow: var(--shadow-sm);\r\n}\r\n\r\n.filter_modal_header {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: flex-start;\r\n align-self: stretch;\r\n border-bottom: 1px solid var(--color-border-subtler, #e3e8ef);\r\n position: relative;\r\n}\r\n\r\n.filter_modal_content {\r\n display: flex;\r\n padding: var(--spacing-5) var(--spacing-6) var(--spacing-5) var(--spacing-16);\r\n align-items: flex-start;\r\n gap: 1rem;\r\n align-self: stretch;\r\n}\r\n\r\n.close_button {\r\n position: absolute;\r\n left: 1rem;\r\n bottom: 0.5rem;\r\n}\r\n\r\n.filter_content_container {\r\n display: flex;\r\n flex: 1 0 0;\r\n justify-content: center;\r\n align-items: flex-start;\r\n gap: 0.5rem;\r\n align-self: stretch;\r\n}\r\n\r\n.filter_content {\r\n display: flex;\r\n padding: var(--spacing-4) 1.5rem;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n gap: var(--spacing-6);\r\n flex: 1 0 0;\r\n}\r\n\r\n.field {\r\n width: 100%;\r\n}\r\n\r\n.filter_modal_actions {\r\n display: flex;\r\n padding: var(--spacing-none) 0 0 0;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: flex-start;\r\n align-self: stretch;\r\n border-top: 1px solid var(--color-border-subtler, #e3e8ef);\r\n}\r\n\r\n.modal_actions_content {\r\n display: flex;\r\n padding: var(--spacing-4) var(--spacing-6);\r\n align-items: center;\r\n gap: var(--spacing-5);\r\n align-self: stretch;\r\n}\r\n\r\n.btn {\r\n width: 100%;\r\n}\r\n","import { Component, Prop, State, Event, EventEmitter, h, Fragment } from '@stencil/core';\r\nimport { FilterConfig } from '../../models/reusableModels';\r\n\r\n@Component({\r\n tag: 'gb-filter-modal',\r\n styleUrl: 'gb-filter-modal.css',\r\n shadow: true,\r\n})\r\nexport class GbFilterModal {\r\n @Prop() filterConfig: FilterConfig = {\r\n title: 'Filter',\r\n enableDateRange: true,\r\n showClearButton: true,\r\n additionalFields: [\r\n {\r\n tag: 'gb-input-dropdown',\r\n key: 'approvalStatus',\r\n event: 'dropdownItemSelected',\r\n props: {\r\n type: 'tags',\r\n icon: false,\r\n showLabel: true,\r\n label: 'Approval status',\r\n placeholder: 'Select approval status',\r\n items: ['Draft', 'Pending', 'Approved', 'Rejected'],\r\n destructive: false,\r\n },\r\n default: {\r\n value: [],\r\n },\r\n },\r\n {\r\n tag: 'gb-slider',\r\n key: 'amountRange',\r\n event: 'thumbValueChanged',\r\n props: {\r\n showHeading: true,\r\n heading: 'Amount range',\r\n },\r\n default: {\r\n leftControl: 50,\r\n rightControl: 100,\r\n },\r\n },\r\n {\r\n tag: 'gb-input-dropdown',\r\n key: 'disbursementStatus',\r\n event: 'dropdownItemSelected',\r\n props: {\r\n type: 'default',\r\n showLabel: true,\r\n label: 'Disbursement status',\r\n placeholder: 'Select disbursement status',\r\n items: ['Disbursed', 'Not Disbursed'],\r\n },\r\n },\r\n // {\r\n // tag: 'gb-input-dropdown',\r\n // key: 'facilityCategory',\r\n // props: {\r\n // showLabel: true,\r\n // label: 'Facility category',\r\n // placeholder: 'Select facility category',\r\n // items: ['Retail', 'Commercial', 'Corporate'],\r\n // },\r\n // },\r\n ],\r\n initialValues: {\r\n pageNumber: 1,\r\n pageSize: 10,\r\n },\r\n };\r\n @State() formValues: Record<string, any> = {};\r\n @State() renderKey = 0;\r\n @Event() applyFilters: EventEmitter<Record<string, any>>;\r\n @Event() clearFilters: EventEmitter<void>;\r\n @Event() close: EventEmitter<void>;\r\n\r\n componentWillLoad() {\r\n this.formValues = {\r\n ...(this.filterConfig.initialValues || {}),\r\n };\r\n\r\n // this.filterConfig.additionalFields?.forEach(field => {\r\n // if (this.formValues[field.key] === undefined) {\r\n // this.formValues[field.key] = null;\r\n // }\r\n // });\r\n\r\n if (this.filterConfig.enableDateRange) {\r\n this.formValues.startDate = null;\r\n this.formValues.endDate = null;\r\n }\r\n }\r\n\r\n handleFieldChange(key: string, value: any) {\r\n this.formValues = {\r\n ...this.formValues,\r\n [key]: value,\r\n };\r\n\r\n }\r\n\r\n handleClearClick() {\r\n const resetValues = {\r\n ...(this.filterConfig.initialValues || {}),\r\n };\r\n\r\n this.filterConfig.additionalFields?.forEach(field => {\r\n resetValues[field.key] = field.default ?? null;\r\n });\r\n\r\n this.formValues = resetValues;\r\n this.renderKey++;\r\n }\r\n\r\n handleApplyClick() {\r\n const { pageNumber, pageSize, ...filters } = this.formValues;\r\n // console.log({\r\n // filters,\r\n // pagination: {\r\n // pageNumber: pageNumber ?? 1,\r\n // pageSize: pageSize ?? 10,\r\n // },\r\n // });\r\n\r\n this.applyFilters.emit({\r\n filters,\r\n pagination: {\r\n pageNumber: pageNumber ?? 1,\r\n pageSize: pageSize ?? 10,\r\n },\r\n });\r\n }\r\n\r\n capitalize(str: string) {\r\n return str.charAt(0).toUpperCase() + str.slice(1);\r\n }\r\n\r\n emitCloseEvent() {\r\n this.close.emit();\r\n }\r\n\r\n render() {\r\n return (\r\n <div class=\"filter_modal_wrapper\">\r\n <div class=\"filter_modal_header\">\r\n <div class=\"filter_modal_content\">\r\n <gb-button-close size=\"sm\" color=\"gray\" class=\"close_button\" onClick={() => this.emitCloseEvent()}></gb-button-close>\r\n <p class=\"display-xs-semi-bold\">{this.filterConfig.title}</p>\r\n </div>\r\n </div>\r\n <div class=\"filter_content_container\">\r\n <div class=\"filter_content\" key={this.renderKey}>\r\n {this.filterConfig.additionalFields && (\r\n <>\r\n {this.filterConfig.additionalFields.map(field => {\r\n const Tag = field.tag;\r\n\r\n const eventHandler = {\r\n [`on${this.capitalize(field.event)}`]: (e: CustomEvent) => this.handleFieldChange(field.key, e.detail),\r\n };\r\n\r\n return (\r\n <div class=\"field\">\r\n <Tag {...field.props} {...eventHandler} />\r\n </div>\r\n );\r\n })}\r\n </>\r\n )}\r\n </div>\r\n </div>\r\n <div class=\"filter_modal_actions\">\r\n <div class=\"modal_actions_content\">\r\n <div class=\"btn\">\r\n <gb-button size=\"xl\" hierarchy=\"secondary_gray\" icon=\"default\" onClick={() => this.handleClearClick()}>\r\n <p>Clear filter</p>\r\n </gb-button>\r\n </div>\r\n <div class=\"btn\">\r\n <gb-button size=\"xl\" hierarchy=\"primary\" icon=\"default\" onClick={() => this.handleApplyClick()}>\r\n <p>Apply</p>\r\n </gb-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"],"version":3}