commons-shared-web-ui 0.0.42 → 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
@@ -233,6 +233,22 @@ interface StepperConfig {
233
233
  showStep?: boolean;
234
234
  isHorizontal?: boolean;
235
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
+ }
236
252
  interface FieldConfig {
237
253
  name?: string;
238
254
  label?: string;
@@ -265,6 +281,12 @@ interface FieldConfig {
265
281
  suffix?: string;
266
282
  /** Whether the field is read-only (shows lock icon) */
267
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[];
268
290
  sectionConfig?: SectionConfig;
269
291
  /**
270
292
  * Cross-field validation config for SUBFIELDS groups.
@@ -1120,6 +1142,11 @@ declare class SmartFormController {
1120
1142
  fileAdded$: Subject<any>;
1121
1143
  fileUploadFinished$: Subject<any>;
1122
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
+ }>;
1123
1150
  initialize(initialData: {
1124
1151
  [key: string]: any;
1125
1152
  }): void;
@@ -1195,6 +1222,11 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
1195
1222
  fileAdded: EventEmitter<any>;
1196
1223
  fileUploadFinished: EventEmitter<any>;
1197
1224
  fileRemoved: EventEmitter<any>;
1225
+ /** Emitted when a suffixActionIcon is clicked. Payload: { fieldName, actionId } */
1226
+ suffixActionClick: EventEmitter<{
1227
+ fieldName: string;
1228
+ actionId: string;
1229
+ }>;
1198
1230
  /** Emitted whenever the active section step changes. Carries current state so the
1199
1231
  * host can show/hide Previous/Next/Submit buttons in its own footer. */
1200
1232
  stepChange: EventEmitter<{
@@ -1313,7 +1345,7 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
1313
1345
  private _codeToFieldName;
1314
1346
  private _codeToLabel;
1315
1347
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormComponent, never>;
1316
- 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>;
1317
1349
  }
1318
1350
 
1319
1351
  declare class FormSectionComponent implements OnInit, OnDestroy {
@@ -1541,6 +1573,8 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1541
1573
  fg: FormGroup;
1542
1574
  }): number;
1543
1575
  ngAfterViewInit(): void;
1576
+ /** Handles click on a suffix action icon and emits via the controller */
1577
+ onSuffixActionClick(actionId: string): void;
1544
1578
  ngOnDestroy(): void;
1545
1579
  registerControl(): void;
1546
1580
  getValidators(): ValidatorFn[];
@@ -4053,4 +4087,4 @@ declare class SnackbarModule {
4053
4087
  }
4054
4088
 
4055
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 };
4056
- 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.42",
3
+ "version": "0.0.43",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",