commons-shared-web-ui 0.0.43 → 0.0.44

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
@@ -300,6 +300,7 @@ interface FieldConfig {
300
300
  phoneConfig?: PhoneConfig;
301
301
  numberConfig?: NumberConfig;
302
302
  dateConfig?: DateConfig;
303
+ timeConfig?: TimeConfig;
303
304
  optionConfig?: OptionConfig$1;
304
305
  autocompleteConfig?: AutocompleteConfig;
305
306
  generatedConfig?: GeneratedConfig;
@@ -336,6 +337,8 @@ interface NumberConfig {
336
337
  }
337
338
  interface DateConfig {
338
339
  allowFuture?: boolean;
340
+ /** When false, dates before today are disabled (today is the minimum). When true (default), all past dates are allowed. */
341
+ allowPast?: boolean;
339
342
  minDate?: string;
340
343
  maxDate?: string;
341
344
  /** When true, the text input is readonly (picker-only, no keyboard entry). */
@@ -343,6 +346,20 @@ interface DateConfig {
343
346
  /** Name of a sibling field whose value is used as the dynamic minimum date. */
344
347
  minDateField?: string;
345
348
  }
349
+ interface TimeConfig {
350
+ /** Explicit minimum time in "HH:mm" 24-hour format (e.g. "09:00"). */
351
+ minTime?: string;
352
+ /** Explicit maximum time in "HH:mm" 24-hour format (e.g. "18:00"). */
353
+ maxTime?: string;
354
+ /** When true, the input is readonly. */
355
+ inputReadonly?: boolean;
356
+ /**
357
+ * Name of a sibling TIME field whose value is used as the dynamic minimum time.
358
+ * When the sibling changes, this field's minimum updates and any now-invalid
359
+ * value (earlier than the new minimum) is cleared. Mirrors DateConfig.minDateField.
360
+ */
361
+ minTimeField?: string;
362
+ }
346
363
  interface OptionConfig$1 {
347
364
  optionClass?: string;
348
365
  optionUrl?: string;
@@ -1461,6 +1478,21 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1461
1478
  isVisible: boolean;
1462
1479
  showPassword: boolean;
1463
1480
  dynamicMinDate: string | null;
1481
+ dynamicMinTime: string | null;
1482
+ /**
1483
+ * Effective minimum date for the datepicker.
1484
+ * Priority: dynamic (sibling field) → explicit minDate → today (when allowPast is false).
1485
+ * When allowPast is not false, past dates stay allowed unless an explicit min is set.
1486
+ */
1487
+ get effectiveMinDate(): string | null;
1488
+ /**
1489
+ * Effective minimum time for the time input.
1490
+ * Priority: dynamic (sibling field) → explicit minTime.
1491
+ * Mirrors {@link effectiveMinDate} for TIME fields.
1492
+ */
1493
+ get effectiveMinTime(): string | null;
1494
+ /** Effective maximum time for the time input (explicit maxTime only). */
1495
+ get effectiveMaxTime(): string | null;
1464
1496
  isMultiDropdownOpen: boolean;
1465
1497
  isDragOver: boolean;
1466
1498
  fileUploadError: string;
@@ -1589,6 +1621,13 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1589
1621
  setupMatchValidation(): void;
1590
1622
  setupVisibility(): void;
1591
1623
  setupMinDateField(): void;
1624
+ /**
1625
+ * Wires up a dynamic minimum for a TIME field from a sibling TIME field
1626
+ * (config.timeConfig.minTimeField). When the source changes, this field's
1627
+ * minimum updates and any now-invalid value (earlier than the new minimum)
1628
+ * is cleared. Mirrors {@link setupMinDateField} for TIME fields.
1629
+ */
1630
+ setupMinTimeField(): void;
1592
1631
  setupGeneratedField(): void;
1593
1632
  evaluateFormula(context: {
1594
1633
  [key: string]: any;
@@ -1599,6 +1638,16 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1599
1638
  [key: string]: any;
1600
1639
  }): void;
1601
1640
  private getValueByPath;
1641
+ /**
1642
+ * Replaces `{placeholder}` tokens in a URL with values resolved from the
1643
+ * current form data (supports dot / array-index paths via getValueByPath).
1644
+ * Returns the interpolated URL plus whether EVERY token was resolved.
1645
+ *
1646
+ * Used by the delete flows: when a required id (e.g. `{entityId}`) is missing
1647
+ * — as in CREATE mode before the entity exists — `resolved` is false and the
1648
+ * caller skips the server delete and just removes the item from the form.
1649
+ */
1650
+ private resolveUrlPlaceholders;
1602
1651
  /** Builds HttpHeaders using the token stored in the SmartFormController (sourced from configJSON)
1603
1652
  * merged with any custom headers declared in optionConfig.headers.
1604
1653
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commons-shared-web-ui",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",