@brickclay-org/ui 0.0.67 → 0.0.69

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/index.d.ts CHANGED
@@ -621,6 +621,8 @@ interface TableColumn<T = any> {
621
621
  headerClass?: string;
622
622
  cellClass?: string;
623
623
  formatter?: (row: T) => string;
624
+ badges?: TableBadge[];
625
+ icons?: TableIcon[];
624
626
  /** show / hide both th + td */
625
627
  visible?: boolean;
626
628
  }
@@ -630,6 +632,19 @@ interface TableAction {
630
632
  tooltip: string;
631
633
  hasPermission: boolean;
632
634
  }
635
+ interface TableBadge {
636
+ label: string;
637
+ variant: BadgeVariant;
638
+ color: BadgeColor;
639
+ size: BadgeSize;
640
+ dot: 'left' | 'right' | 'none';
641
+ customClass: string;
642
+ }
643
+ interface TableIcon {
644
+ toolTipLabel?: string | string[];
645
+ tooltipPosition?: 'left' | 'right' | 'top' | 'bottom';
646
+ url: string;
647
+ }
633
648
 
634
649
  type SortDirection = 'asc' | 'desc';
635
650
  declare class BkGrid<T = any> {
@@ -658,6 +673,7 @@ declare class BkGrid<T = any> {
658
673
  dropList(event: CdkDragDrop<T[]>): void;
659
674
  onDragMoved(event: CdkDragMove<any>): void;
660
675
  onDragStart(event: CdkDragStart<any>): void;
676
+ getBadge(row: T, column: TableColumn<T>): TableBadge | undefined;
661
677
  static ɵfac: i0.ɵɵFactoryDeclaration<BkGrid<any>, never>;
662
678
  static ɵcmp: i0.ɵɵComponentDeclaration<BkGrid<any>, "bk-grid", never, { "draggable": { "alias": "draggable"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "result": { "alias": "result"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "actionClick": "actionClick"; "sortChange": "sortChange"; "dragDropChange": "dragDropChange"; }, never, never, true, never>;
663
679
  }
@@ -1991,5 +2007,39 @@ declare class BkFileCard implements OnInit {
1991
2007
  static ɵcmp: i0.ɵɵComponentDeclaration<BkFileCard, "bk-file-card", never, { "id": { "alias": "id"; "required": false; }; "state": { "alias": "state"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "fileSize": { "alias": "fileSize"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; }, { "remove": "remove"; }, never, never, true, never>;
1992
2008
  }
1993
2009
 
1994
- export { BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BkAvatar, BkAvatarUploader, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkColumnFilterService, BkColumnSelect, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkFileCard, BkFilePicker, BkGrid, BkHierarchicalSelect, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToastr, BkToastrService, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, CalendarSelection, ColumnFilterOption, getDialogBackdropAnimation, getDialogPanelAnimation };
1995
- export type { AvatarFallback, AvatarSize, AvatarVariant, BadgeColor, BadgeSize, BadgeVariant, BkAnimationKeyframes, BkAvatarFallback, BkAvatarSize, BkDialogAnimation, BkDialogConfig, BkDialogPosition, BkInputAutoCapitalize, BkInputAutoComplete, BkInputMode, BkInputType, BkTextAreaAutoCapitalize, BkTextAreaAutoComplete, BkTextAreaInputMode, ButtonSize, ButtonVariant, CalendarRange, CountryOption, DotPosition, DotStatus, FileState, GroupItem, GroupMode, HierarchicalNode, IconButtonSize, IconButtonVariant, IconOrientation, PillColor, PillSize, PillVariant, ScheduledDateSelection, SortDirection, SpinnerSize, TabItem, TableAction, TableColumn, TimeConfiguration, ToastConfig, ToastMessage, ToastMethodOptions, ToastPosition, ToastSeverity };
2010
+ interface BkPageSize {
2011
+ key: number;
2012
+ value: number;
2013
+ }
2014
+ declare class BkPagination implements OnChanges {
2015
+ pageSize?: number;
2016
+ total?: number;
2017
+ changePageSize: EventEmitter<number>;
2018
+ pageChanged: EventEmitter<number>;
2019
+ pages: number[];
2020
+ activePage: number;
2021
+ activePageChange: EventEmitter<number>;
2022
+ pager: number;
2023
+ isMenuHovered: boolean;
2024
+ startingPage: number;
2025
+ endingPage: number;
2026
+ pageSizesList: BkPageSize[];
2027
+ constructor();
2028
+ ngOnChanges(): any;
2029
+ getTotalPagesValue(): number;
2030
+ private updateStartEndPages;
2031
+ private getPageCount;
2032
+ private getArrayOfPage;
2033
+ paginate(): number[];
2034
+ onClickPage(pageNumber: number): void;
2035
+ changeSize(event: any): void;
2036
+ get startIndex(): number;
2037
+ get endIndex(): number;
2038
+ get totalItems(): number;
2039
+ getTotalPages(): number;
2040
+ static ɵfac: i0.ɵɵFactoryDeclaration<BkPagination, never>;
2041
+ static ɵcmp: i0.ɵɵComponentDeclaration<BkPagination, "bk-pagination", never, { "pageSize": { "alias": "pageSize"; "required": false; }; "total": { "alias": "total"; "required": false; }; "activePage": { "alias": "activePage"; "required": false; }; }, { "changePageSize": "changePageSize"; "pageChanged": "pageChanged"; "activePageChange": "activePageChange"; }, never, never, true, never>;
2042
+ }
2043
+
2044
+ export { BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BkAvatar, BkAvatarUploader, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkColumnFilterService, BkColumnSelect, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkFileCard, BkFilePicker, BkGrid, BkHierarchicalSelect, BkIconButton, BkInput, BkInputChips, BkPagination, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToastr, BkToastrService, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, CalendarSelection, ColumnFilterOption, getDialogBackdropAnimation, getDialogPanelAnimation };
2045
+ export type { AvatarFallback, AvatarSize, AvatarVariant, BadgeColor, BadgeSize, BadgeVariant, BkAnimationKeyframes, BkAvatarFallback, BkAvatarSize, BkDialogAnimation, BkDialogConfig, BkDialogPosition, BkInputAutoCapitalize, BkInputAutoComplete, BkInputMode, BkInputType, BkPageSize, BkTextAreaAutoCapitalize, BkTextAreaAutoComplete, BkTextAreaInputMode, ButtonSize, ButtonVariant, CalendarRange, CountryOption, DotPosition, DotStatus, FileState, GroupItem, GroupMode, HierarchicalNode, IconButtonSize, IconButtonVariant, IconOrientation, PillColor, PillSize, PillVariant, ScheduledDateSelection, SortDirection, SpinnerSize, TabItem, TableAction, TableBadge, TableColumn, TableIcon, TimeConfiguration, ToastConfig, ToastMessage, ToastMethodOptions, ToastPosition, ToastSeverity };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickclay-org/ui",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "ng-add": {
6
6
  "save": "dependencies"
@@ -31,6 +31,5 @@
31
31
  "types": "./index.d.ts",
32
32
  "default": "./fesm2022/brickclay-org-ui.mjs"
33
33
  }
34
- },
35
- "description": "A comprehensive Angular UI component library with calendar, checkbox, radio, and toggle components"
34
+ }
36
35
  }
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 11.3333L8.66667 8L12 4.66667M7.33333 11.3333L4 8L7.33333 4.66667" stroke="#141414" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 11.3333L8.66667 7.99996L12 4.66663M7.33333 11.3333L4 7.99996L7.33333 4.66663" stroke="#BBBDC5" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 17.3333L13.3333 14L10 10.6666M14.6667 17.3333L18 14L14.6667 10.6666" stroke="#141414" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4 11.3333L7.33333 8L4 4.66667M8.66667 11.3333L12 8L8.66667 4.66667" stroke="#BBBDC5" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_268_7)">
3
+ <path d="M5 9L1 5L5 1" stroke="#15191E" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_268_7">
7
+ <rect width="6" height="10" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 9L5 5L1 1" stroke="#15191E" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
File without changes
package/src/styles.css CHANGED
@@ -23,4 +23,5 @@
23
23
  @import './lib/column-select/components/column-select/column-select.css';
24
24
  @import './lib/file-picker/file-picker.css';
25
25
  @import './lib/file-card/file-card.css';
26
+ @import './lib/pagination/pagination.css';
26
27
 
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = default_1;
4
- const tasks_1 = require("@angular-devkit/schematics/tasks");
5
- const dependencies_1 = require("@schematics/angular/utility/dependencies");
6
- function default_1(options) {
7
- return (tree, context) => {
8
- context.logger.info('🚀 Setting up @brickclay-org/ui library...');
9
- // 1. Read user's Angular version from package.json
10
- const angularCore = (0, dependencies_1.getPackageJsonDependency)(tree, '@angular/core');
11
- if (!angularCore) {
12
- throw new Error('❌ Cannot find @angular/core in package.json. Make sure this is an Angular project.');
13
- }
14
- // 2. Extract major version (e.g., "^19.0.0" -> "19" or "~18.2.0" -> "18")
15
- const angularVersion = angularCore.version;
16
- const majorVersionMatch = angularVersion.match(/(\d+)/);
17
- if (!majorVersionMatch) {
18
- throw new Error(`❌ Could not determine Angular version from ${angularVersion}`);
19
- }
20
- const majorVersion = parseInt(majorVersionMatch[0], 10);
21
- // 3. Validate Angular version is in supported range (17-21)
22
- if (majorVersion < 17 || majorVersion > 21) {
23
- throw new Error(`❌ @brickclay-org/ui library supports Angular versions 17-21, but found Angular ${majorVersion}.\n` +
24
- `Please upgrade or downgrade your Angular version.`);
25
- }
26
- context.logger.info(`✅ Detected Angular version: ${majorVersion}`);
27
- // 4. Check if user already has CDK installed
28
- const existingCdk = (0, dependencies_1.getPackageJsonDependency)(tree, '@angular/cdk');
29
- if (existingCdk) {
30
- const existingCdkMajor = existingCdk.version.match(/(\d+)/)?.[0];
31
- // Check if existing CDK version matches Angular version
32
- if (existingCdkMajor && parseInt(existingCdkMajor) === majorVersion) {
33
- context.logger.info(`✅ Using existing @angular/cdk@${existingCdk.version}`);
34
- }
35
- else {
36
- context.logger.warn(`⚠️ Found @angular/cdk@${existingCdk.version} but you have Angular ${majorVersion}.\n` +
37
- ` Consider updating CDK to match your Angular version: npm install @angular/cdk@^${majorVersion}.0.0`);
38
- }
39
- }
40
- else {
41
- // Install matching CDK version
42
- const cdkVersion = `^${majorVersion}.0.0`;
43
- (0, dependencies_1.addPackageJsonDependency)(tree, {
44
- type: dependencies_1.NodeDependencyType.Default,
45
- name: '@angular/cdk',
46
- version: cdkVersion,
47
- });
48
- context.logger.info(`✅ Installing @angular/cdk@${cdkVersion} to match Angular ${majorVersion}`);
49
- }
50
- // 5. Schedule npm install
51
- context.addTask(new tasks_1.NodePackageInstallTask());
52
- context.logger.info('');
53
- context.logger.info('🎉 Brickclay library has been successfully configured!');
54
- context.logger.info('');
55
- context.logger.info('📚 Next steps:');
56
- context.logger.info(' 1. Import components from "@brickclay-org/ui" in your modules or standalone components');
57
- context.logger.info('');
58
- return tree;
59
- };
60
- }