@brickclay-org/ui 0.0.68 → 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
  }
@@ -2026,4 +2042,4 @@ declare class BkPagination implements OnChanges {
2026
2042
  }
2027
2043
 
2028
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 };
2029
- 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, TableColumn, TimeConfiguration, ToastConfig, ToastMessage, ToastMethodOptions, ToastPosition, ToastSeverity };
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.68",
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
  }
@@ -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
- }