@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/fesm2022/masterteam-components-date-field.mjs +17 -2
- package/fesm2022/masterteam-components-date-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +3 -3
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +34 -8
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-uploader.mjs +28 -2
- package/fesm2022/masterteam-components-uploader.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +67 -4
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-date-field.d.ts +3 -1
- package/types/masterteam-components-entities.d.ts +3 -3
- package/types/masterteam-components-table.d.ts +9 -2
- package/types/masterteam-components.d.ts +27 -2
package/package.json
CHANGED
|
@@ -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) —
|
|
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
|
|
376
|
-
*
|
|
377
|
-
* viewer's timezone
|
|
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
|
|
505
|
-
*
|
|
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 };
|