@masterteam/components 0.0.262 → 0.0.263

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.262",
3
+ "version": "0.0.263",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -19,7 +19,9 @@ declare class DateField implements ControlValueAccessor, OnInit, OnChanges {
19
19
  /**
20
20
  * Hides the calendar and edits only the clock time. The bound value stays a
21
21
  * full `Date` — PrimeNG keeps the existing date part (or today's, when the
22
- * control is empty) — so the wire format is unchanged.
22
+ * control is empty) — but that date part is scratch state: a wall-clock
23
+ * `HH:mm:ss` string is accepted on write, and consumers storing a `Time`
24
+ * value are expected to serialize only the clock back out.
23
25
  */
24
26
  readonly timeOnly: _angular_core.InputSignal<boolean>;
25
27
  readonly minDate: _angular_core.InputSignal<Date | null | undefined>;
@@ -372,9 +372,9 @@ declare class EntityDate {
372
372
  readonly viewType: _angular_core.InputSignal<"Date" | "DateTime" | "Time">;
373
373
  readonly displayName: _angular_core.Signal<string>;
374
374
  /**
375
- * `Time` carries the same full ISO instant as `DateTime` — only the rendered
376
- * format is narrowed to the clock time, so the value still lands in the
377
- * viewer's timezone exactly like its `DateTime` sibling.
375
+ * `Time` carries a wall-clock value (`HH:mm:ss`) with no date and no zone, so
376
+ * `mtDateFormat` renders it as stored instead of shifting it into the
377
+ * viewer's timezone the way its `DateTime` sibling is shifted.
378
378
  */
379
379
  readonly resolvedViewType: _angular_core.Signal<MTDateFormatType>;
380
380
  readonly displayValue: _angular_core.Signal<unknown>;
@@ -501,8 +501,8 @@ declare class TableValueResolver {
501
501
  private static readonly EXPORTABLE_ENTITY_VIEW_TYPES;
502
502
  /**
503
503
  * `Time` is sortable and exportable but not filterable: a time-of-day has no
504
- * meaningful date-range filter, and the stored value is a full instant, so a
505
- * date picker would silently filter by day instead of by clock time.
504
+ * meaningful date-range filter, and a date picker cannot express one — it
505
+ * would silently filter by day instead of by clock time.
506
506
  */
507
507
  private static readonly FILTERABLE_ENTITY_VIEW_TYPES;
508
508
  /**
@@ -571,6 +571,13 @@ declare class TableValueResolver {
571
571
  static normalizeTextSortValue(value: unknown): string | null;
572
572
  static normalizeNumericSortValue(value: unknown): number | null;
573
573
  static normalizeDateSortValue(value: unknown): number | null;
574
+ /**
575
+ * Order a `Time` cell by seconds since midnight. The stored shape is a
576
+ * wall-clock `HH:mm:ss`, which `Date` cannot parse at all; values still held
577
+ * as a full instant contribute their local clock, so a column holding both
578
+ * shapes still sorts by time of day rather than by the date part.
579
+ */
580
+ static normalizeClockSortValue(value: unknown): number | null;
574
581
  /**
575
582
  * Resolves an entity column's view type from the column def, falling back to
576
583
  * a sample row's cell. Public because grouping decides what it can bucket
@@ -1143,6 +1143,31 @@ declare const REQUEST_CONTEXT: HttpContextToken<RequestContextConfig>;
1143
1143
  declare function getLightColor(hexColor: string): string;
1144
1144
  declare function getContrastColor(bgColor: string): string;
1145
1145
 
1146
+ /**
1147
+ * Helpers for wall-clock values — the `HH:mm:ss` shape a `Time` property
1148
+ * stores. A time of day carries no calendar date and no timezone, so it is
1149
+ * never serialized as an instant: `new Date('09:30:00')` is `Invalid Date`,
1150
+ * and pushing the clock through UTC would shift it by the viewer's offset.
1151
+ */
1152
+ /** A wall-clock time, already range-checked. */
1153
+ interface ClockTimeParts {
1154
+ hours: number;
1155
+ minutes: number;
1156
+ seconds: number;
1157
+ }
1158
+ /**
1159
+ * Parse a bare `H:mm`, `HH:mm`, or `HH:mm:ss` string — a trailing fractional
1160
+ * second, as .NET `TimeOnly`/`TimeSpan` may emit, is ignored. Returns `null`
1161
+ * for anything else, including full timestamps, which callers parse as dates.
1162
+ */
1163
+ declare function parseClockTime(value: unknown): ClockTimeParts | null;
1164
+ /** Read the local wall-clock time off a `Date`, or `null` for an invalid one. */
1165
+ declare function toClockTimeParts(date: Date): ClockTimeParts | null;
1166
+ /** Format a wall-clock time as the `HH:mm:ss` text the backend stores. */
1167
+ declare function formatClockTime(parts: ClockTimeParts): string;
1168
+ /** Seconds since midnight — the comparable form of a wall-clock time. */
1169
+ declare function clockTimeToSeconds(parts: ClockTimeParts): number;
1170
+
1146
1171
  type MTDateFormatType = 'date' | 'dateTime' | 'time';
1147
1172
  declare class MTDateFormatPipe implements PipeTransform {
1148
1173
  private readonly locale;
@@ -1152,5 +1177,5 @@ declare class MTDateFormatPipe implements PipeTransform {
1152
1177
  static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
1153
1178
  }
1154
1179
 
1155
- export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, wrapValidatorWithMessage };
1156
- export type { ApiRequestConfig, BaseFieldConstructorConfig, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DSColorScale, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupCheckListPropertyConfig, LookupMatrixCellConfig, LookupModuleCheckListFieldRuntimeContext, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTDesignIdentity, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, ScheduleItemSelectorFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
1180
+ export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, parseClockTime, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, toClockTimeParts, wrapValidatorWithMessage };
1181
+ export type { ApiRequestConfig, BaseFieldConstructorConfig, ClockTimeParts, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DSColorScale, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupCheckListPropertyConfig, LookupMatrixCellConfig, LookupModuleCheckListFieldRuntimeContext, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTDesignIdentity, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, ScheduleItemSelectorFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };