@brickclay-org/ui 0.0.95 → 0.0.97

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
@@ -16,7 +16,7 @@ import * as i1$1 from '@angular/cdk/scrolling';
16
16
  declare const BrickclayIcons: {
17
17
  readonly arrowleft: "assets/icons/chevron-left.svg";
18
18
  readonly arrowRight: "assets/icons/chevron-right.svg";
19
- readonly calenderIcon: "assets/icons/calender.svg";
19
+ readonly calenderIcon: "assets/icons/custom-calender.svg";
20
20
  readonly timerIcon: "assets/icons/timer.svg";
21
21
  };
22
22
 
@@ -117,7 +117,7 @@ declare class BkCustomCalendar implements OnInit, OnDestroy, OnChanges, ControlV
117
117
  brickclayIcons: {
118
118
  readonly arrowleft: "assets/icons/chevron-left.svg";
119
119
  readonly arrowRight: "assets/icons/chevron-right.svg";
120
- readonly calenderIcon: "assets/icons/calender.svg";
120
+ readonly calenderIcon: "assets/icons/custom-calender.svg";
121
121
  readonly timerIcon: "assets/icons/timer.svg";
122
122
  };
123
123
  show: boolean;
@@ -355,7 +355,7 @@ declare class BkScheduledDatePicker implements OnInit {
355
355
 
356
356
  declare class BkTimePicker implements OnInit, OnChanges, AfterViewInit, ControlValueAccessor {
357
357
  required: boolean;
358
- /** @deprecated Prefer [(ngModel)]. When ngModel is not used, this sets the initial/current time. */
358
+ /** @deprecated Prefer [(ngModel)] */
359
359
  value: string | null;
360
360
  label: string;
361
361
  placeholder: string;
@@ -366,61 +366,45 @@ declare class BkTimePicker implements OnInit, OnChanges, AfterViewInit, ControlV
366
366
  timeFormat: 12 | 24;
367
367
  showSeconds: boolean;
368
368
  change: EventEmitter<string | null>;
369
- /** Alias for (change) for backward compatibility */
370
369
  timeChange: EventEmitter<string | null>;
371
370
  pickerOpened: EventEmitter<string>;
372
371
  pickerClosed: EventEmitter<string>;
373
- /** CVA: called when the control value is set (e.g. ngModel or programmatic) */
374
372
  private onChange;
375
- /** CVA: called when the control is touched (blur / close picker) */
376
373
  private onTouched;
377
374
  disabled: boolean;
378
375
  timeScrollElements: QueryList<ElementRef>;
379
376
  minuteScrollElements: QueryList<ElementRef>;
380
377
  secondScrollElements: QueryList<ElementRef>;
381
- /** Cyclic wheel: item height and cycle size (0-59). Middle block starts at CYCLE_SIZE * ITEM_HEIGHT */
382
378
  private readonly ITEM_HEIGHT;
383
379
  private readonly WHEEL_CYCLE;
384
380
  private readonly MIDDLE_OFFSET;
385
- private readonly VIEWPORT_HEIGHT;
386
- /** Repeated 0-59 for infinite scroll (minutes and seconds) */
387
381
  wheelMinutes: number[];
388
382
  wheelSeconds: number[];
389
383
  showPicker: boolean;
390
384
  currentHour: number;
391
385
  currentMinute: number;
392
- currentAMPM: string;
393
386
  currentSecond: number;
394
- /** When null, input shows placeholder; otherwise the selected time string. */
387
+ currentAMPM: string;
395
388
  private _modelValue;
396
389
  brickclayIcons: {
397
390
  readonly arrowleft: "assets/icons/chevron-left.svg";
398
391
  readonly arrowRight: "assets/icons/chevron-right.svg";
399
- readonly calenderIcon: "assets/icons/calender.svg";
392
+ readonly calenderIcon: "assets/icons/custom-calender.svg";
400
393
  readonly timerIcon: "assets/icons/timer.svg";
401
394
  };
402
395
  writeValue(value: string | null): void;
403
396
  registerOnChange(fn: (value: string | null) => void): void;
404
397
  registerOnTouched(fn: () => void): void;
405
398
  setDisabledState(isDisabled: boolean): void;
406
- /** Display string for the input; empty when value is null. */
407
399
  getDisplayValue(): string;
408
- /** True when a time is selected (show clear button). */
409
400
  get hasValue(): boolean;
410
- /** Reset dropdown to default time (used when opening with null value). 12h → 12:00 PM, 24h → 00:00 */
411
401
  private setDefaultsForDropdown;
412
- /** Clear the time value and notify CVA. */
413
402
  clear(): void;
414
- /** Call when control loses focus or picker closes (for CVA touched state). */
415
403
  markAsTouched(): void;
416
404
  ngOnInit(): void;
417
405
  ngAfterViewInit(): void;
418
- /** @param timeStr Optional; when not provided uses this.value (from @Input). Empty/null sets defaults. */
406
+ ngOnChanges(changes: SimpleChanges): void;
419
407
  parseTimeValue(timeStr?: string | null): void;
420
- getHours(): number[];
421
- getMinutes(): number[];
422
- getSeconds(): number[];
423
- getAMPMOptions(): string[];
424
408
  parseTimeStringToComponents(timeStr: string): {
425
409
  hour: number;
426
410
  minute: number;
@@ -435,19 +419,16 @@ declare class BkTimePicker implements OnInit, OnChanges, AfterViewInit, ControlV
435
419
  onAMPMChange(ampm: string): void;
436
420
  updateTime(): void;
437
421
  scrollToSelectedTimes(): void;
438
- /** Position wheel so the selected value is at the top of the viewport. */
439
422
  private initMinuteWheelScroll;
440
423
  private initSecondWheelScroll;
441
- /** Scroll position -> value 0-59 (value at top of viewport). Recenter when in first or third block. */
442
- private wheelScrollToValue;
443
- onMinuteWheelScroll(): void;
444
- onSecondWheelScroll(): void;
445
424
  onDocumentClick(event: MouseEvent): void;
446
425
  private previousCloseCounter;
447
- ngOnChanges(changes: SimpleChanges): void;
448
- onInputKeydown(event: KeyboardEvent): void;
426
+ getHours(): number[];
427
+ getAMPMOptions(): string[];
428
+ onMinuteWheelScroll(): void;
429
+ onSecondWheelScroll(): void;
449
430
  static ɵfac: i0.ɵɵFactoryDeclaration<BkTimePicker, never>;
450
- static ɵcmp: i0.ɵɵComponentDeclaration<BkTimePicker, "bk-time-picker", never, { "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "position": { "alias": "position"; "required": false; }; "pickerId": { "alias": "pickerId"; "required": false; }; "closePicker": { "alias": "closePicker"; "required": false; }; "timeFormat": { "alias": "timeFormat"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; }, { "change": "change"; "timeChange": "timeChange"; "pickerOpened": "pickerOpened"; "pickerClosed": "pickerClosed"; }, never, never, true, never>;
431
+ static ɵcmp: i0.ɵɵComponentDeclaration<BkTimePicker, "bk-time-picker", never, { "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "position": { "alias": "position"; "required": false; }; "pickerId": { "alias": "pickerId"; "required": false; }; "closePicker": { "alias": "closePicker"; "required": false; }; "timeFormat": { "alias": "timeFormat"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "change": "change"; "timeChange": "timeChange"; "pickerOpened": "pickerOpened"; "pickerClosed": "pickerClosed"; }, never, never, true, never>;
451
432
  }
452
433
 
453
434
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickclay-org/ui",
3
- "version": "0.0.95",
3
+ "version": "0.0.97",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "ng-add": {
6
6
  "save": "dependencies"
@@ -0,0 +1,12 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 1.5V3.75" stroke="black" stroke-width="1.25" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M12 1.5V3.75" stroke="black" stroke-width="1.25" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M2.625 6.81836H15.375" stroke="black" stroke-width="1.3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M15.75 6.375V12.75C15.75 15 14.625 16.5 12 16.5H6C3.375 16.5 2.25 15 2.25 12.75V6.375C2.25 4.125 3.375 2.625 6 2.625H12C14.625 2.625 15.75 4.125 15.75 6.375Z" stroke="black" stroke-width="1.3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M11.7693 10.2754H11.7761" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M11.7693 12.5254H11.7761" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
8
+ <path d="M8.99588 10.2754H9.00262" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
9
+ <path d="M8.99588 12.5254H9.00262" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
10
+ <path d="M6.22244 10.2754H6.22918" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <path d="M6.22244 12.5254H6.22918" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
12
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7.875 14.925V3.075C7.875 1.95 7.395 1.5 6.2025 1.5H3.1725C1.98 1.5 1.5 1.95 1.5 3.075V14.925C1.5 16.05 1.98 16.5 3.1725 16.5H6.2025C7.395 16.5 7.875 16.05 7.875 14.925Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M16.5 14.925V3.075C16.5 1.95 16.02 1.5 14.8275 1.5H11.7975C10.605 1.5 10.125 1.95 10.125 3.075V14.925C10.125 16.05 10.605 16.5 11.7975 16.5H14.8275C16.02 16.5 16.5 16.05 16.5 14.925Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>