commons-shared-web-ui 0.0.41 → 0.0.43

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
@@ -89,6 +89,12 @@ interface FormLabels {
89
89
  previousLabel?: string;
90
90
  addLabel?: string;
91
91
  removeLabel?: string;
92
+ /** File upload error messages. Supports placeholders: {fileName}, {maxSizeMB}, {maxFiles} */
93
+ fileTypeError?: string;
94
+ fileSizeError?: string;
95
+ maxFilesError?: string;
96
+ fileUploadFailed?: string;
97
+ fileDeleteFailed?: string;
92
98
  }
93
99
  interface SubmitConfig {
94
100
  apiUrl: string;
@@ -227,6 +233,22 @@ interface StepperConfig {
227
233
  showStep?: boolean;
228
234
  isHorizontal?: boolean;
229
235
  }
236
+ /**
237
+ * Describes a clickable action icon rendered as a suffix inside a TEXT_INPUT
238
+ * or NUMBER_INPUT field. Multiple icons can be shown side-by-side.
239
+ * When clicked, the field name and actionId are emitted via the
240
+ * SmartFormComponent's `suffixActionClick` output.
241
+ */
242
+ interface SuffixActionIcon {
243
+ /** Material icon name (e.g. 'edit', 'refresh', 'check', 'lock') */
244
+ icon: string;
245
+ /** Unique action identifier emitted on click (e.g. 'enable_edit', 'reset_code') */
246
+ actionId: string;
247
+ /** Optional tooltip shown on hover */
248
+ tooltip?: string;
249
+ /** Optional custom color override (e.g. '#16A34A' for a green check icon) */
250
+ color?: string;
251
+ }
230
252
  interface FieldConfig {
231
253
  name?: string;
232
254
  label?: string;
@@ -259,6 +281,12 @@ interface FieldConfig {
259
281
  suffix?: string;
260
282
  /** Whether the field is read-only (shows lock icon) */
261
283
  readonly?: boolean;
284
+ /**
285
+ * Clickable action icons rendered as suffixes inside the input.
286
+ * Ignored when `readonly` is true (the built-in lock icon takes precedence).
287
+ * Each icon emits a `suffixActionClick` event with `{ fieldName, actionId }`.
288
+ */
289
+ suffixActionIcons?: SuffixActionIcon[];
262
290
  sectionConfig?: SectionConfig;
263
291
  /**
264
292
  * Cross-field validation config for SUBFIELDS groups.
@@ -310,6 +338,10 @@ interface DateConfig {
310
338
  allowFuture?: boolean;
311
339
  minDate?: string;
312
340
  maxDate?: string;
341
+ /** When true, the text input is readonly (picker-only, no keyboard entry). */
342
+ inputReadonly?: boolean;
343
+ /** Name of a sibling field whose value is used as the dynamic minimum date. */
344
+ minDateField?: string;
313
345
  }
314
346
  interface OptionConfig$1 {
315
347
  optionClass?: string;
@@ -1110,6 +1142,11 @@ declare class SmartFormController {
1110
1142
  fileAdded$: Subject<any>;
1111
1143
  fileUploadFinished$: Subject<any>;
1112
1144
  fileRemoved$: Subject<any>;
1145
+ /** Emitted when a suffixActionIcon is clicked inside a form field */
1146
+ suffixActionClick$: Subject<{
1147
+ fieldName: string;
1148
+ actionId: string;
1149
+ }>;
1113
1150
  initialize(initialData: {
1114
1151
  [key: string]: any;
1115
1152
  }): void;
@@ -1185,6 +1222,11 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
1185
1222
  fileAdded: EventEmitter<any>;
1186
1223
  fileUploadFinished: EventEmitter<any>;
1187
1224
  fileRemoved: EventEmitter<any>;
1225
+ /** Emitted when a suffixActionIcon is clicked. Payload: { fieldName, actionId } */
1226
+ suffixActionClick: EventEmitter<{
1227
+ fieldName: string;
1228
+ actionId: string;
1229
+ }>;
1188
1230
  /** Emitted whenever the active section step changes. Carries current state so the
1189
1231
  * host can show/hide Previous/Next/Submit buttons in its own footer. */
1190
1232
  stepChange: EventEmitter<{
@@ -1303,7 +1345,7 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
1303
1345
  private _codeToFieldName;
1304
1346
  private _codeToLabel;
1305
1347
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormComponent, never>;
1306
- static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; "stepChange": "stepChange"; }, never, never, false, never>;
1348
+ static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; "suffixActionClick": "suffixActionClick"; "stepChange": "stepChange"; }, never, never, false, never>;
1307
1349
  }
1308
1350
 
1309
1351
  declare class FormSectionComponent implements OnInit, OnDestroy {
@@ -1418,6 +1460,7 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1418
1460
  value: any;
1419
1461
  isVisible: boolean;
1420
1462
  showPassword: boolean;
1463
+ dynamicMinDate: string | null;
1421
1464
  isMultiDropdownOpen: boolean;
1422
1465
  isDragOver: boolean;
1423
1466
  fileUploadError: string;
@@ -1530,6 +1573,8 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1530
1573
  fg: FormGroup;
1531
1574
  }): number;
1532
1575
  ngAfterViewInit(): void;
1576
+ /** Handles click on a suffix action icon and emits via the controller */
1577
+ onSuffixActionClick(actionId: string): void;
1533
1578
  ngOnDestroy(): void;
1534
1579
  registerControl(): void;
1535
1580
  getValidators(): ValidatorFn[];
@@ -1543,6 +1588,7 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1543
1588
  */
1544
1589
  setupMatchValidation(): void;
1545
1590
  setupVisibility(): void;
1591
+ setupMinDateField(): void;
1546
1592
  setupGeneratedField(): void;
1547
1593
  evaluateFormula(context: {
1548
1594
  [key: string]: any;
@@ -1556,6 +1602,7 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1556
1602
  /** Builds HttpHeaders using the token stored in the SmartFormController (sourced from configJSON)
1557
1603
  * merged with any custom headers declared in optionConfig.headers.
1558
1604
  */
1605
+ private _fileLabel;
1559
1606
  private getHeaders;
1560
1607
  updateValue(newValue: any): void;
1561
1608
  onCheckboxListChange(code: string, checked: boolean): void;
@@ -1984,6 +2031,7 @@ declare class DropdownComponent implements ControlValueAccessor, OnInit, OnChang
1984
2031
  config?: DropdownConfig;
1985
2032
  labels?: DropdownLabels;
1986
2033
  options: DropdownOption[];
2034
+ selectedValue?: any;
1987
2035
  placeholder: string;
1988
2036
  label: string;
1989
2037
  multiple: boolean;
@@ -2069,7 +2117,7 @@ declare class DropdownComponent implements ControlValueAccessor, OnInit, OnChang
2069
2117
  [key: string]: string | undefined;
2070
2118
  };
2071
2119
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
2072
- static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "lib-dropdown", never, { "config": { "alias": "config"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "fontSize": { "alias": "fontSize"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "fontFamily": { "alias": "fontFamily"; "required": false; }; "labelColor": { "alias": "labelColor"; "required": false; }; "labelFontSize": { "alias": "labelFontSize"; "required": false; }; "labelFontWeight": { "alias": "labelFontWeight"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "borderColor": { "alias": "borderColor"; "required": false; }; "borderWidth": { "alias": "borderWidth"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "fontWeight": { "alias": "fontWeight"; "required": false; }; "color": { "alias": "color"; "required": false; }; "placeholderColor": { "alias": "placeholderColor"; "required": false; }; "focusBorderColor": { "alias": "focusBorderColor"; "required": false; }; "errorColor": { "alias": "errorColor"; "required": false; }; "disabledBackgroundColor": { "alias": "disabledBackgroundColor"; "required": false; }; "disabledColor": { "alias": "disabledColor"; "required": false; }; "boxShadow": { "alias": "boxShadow"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
2120
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "lib-dropdown", never, { "config": { "alias": "config"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "options": { "alias": "options"; "required": false; }; "selectedValue": { "alias": "selectedValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "fontSize": { "alias": "fontSize"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "fontFamily": { "alias": "fontFamily"; "required": false; }; "labelColor": { "alias": "labelColor"; "required": false; }; "labelFontSize": { "alias": "labelFontSize"; "required": false; }; "labelFontWeight": { "alias": "labelFontWeight"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "borderColor": { "alias": "borderColor"; "required": false; }; "borderWidth": { "alias": "borderWidth"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "fontWeight": { "alias": "fontWeight"; "required": false; }; "color": { "alias": "color"; "required": false; }; "placeholderColor": { "alias": "placeholderColor"; "required": false; }; "focusBorderColor": { "alias": "focusBorderColor"; "required": false; }; "errorColor": { "alias": "errorColor"; "required": false; }; "disabledBackgroundColor": { "alias": "disabledBackgroundColor"; "required": false; }; "disabledColor": { "alias": "disabledColor"; "required": false; }; "boxShadow": { "alias": "boxShadow"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
2073
2121
  }
2074
2122
 
2075
2123
  interface CheckboxOption {
@@ -3257,6 +3305,7 @@ interface TableColumn {
3257
3305
  headerClass?: string;
3258
3306
  sticky?: boolean;
3259
3307
  labelPath?: string;
3308
+ emptyValue?: string;
3260
3309
  dateFormat?: string;
3261
3310
  clickAction?: 'route' | 'callback';
3262
3311
  clickRoute?: string;
@@ -3373,6 +3422,9 @@ interface TableConfig {
3373
3422
  token?: string;
3374
3423
  tokenHeader?: string;
3375
3424
  editingRowClass?: string;
3425
+ /** Fallback text for any cell whose value is null, undefined, or empty string.
3426
+ * Overridden per-column via TableColumn.emptyValue. Library default: '-' */
3427
+ emptyValue?: string;
3376
3428
  }
3377
3429
  interface SearchConfig {
3378
3430
  enabled: boolean;
@@ -4035,4 +4087,4 @@ declare class SnackbarModule {
4035
4087
  }
4036
4088
 
4037
4089
  export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FieldConfiguratorComponent, FieldSelectionComponent, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FilterTableSelectorComponent, FilterTableSelectorModule, FormBuilderModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
4038
- export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, HierarchyCfg, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableColumnSubField, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableRowSaveEvent, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
4090
+ export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, HierarchyCfg, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SuffixActionIcon, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableColumnSubField, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableRowSaveEvent, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commons-shared-web-ui",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",