@elasticias/ui 1.0.39 → 1.0.41

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": "@elasticias/ui",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0",
@@ -1600,6 +1600,7 @@ declare class EfAppShellComponent {
1600
1600
  readonly viewport: _angular_core.Signal<_elasticias_core.EfViewport>;
1601
1601
  readonly isMobile: _angular_core.Signal<boolean>;
1602
1602
  readonly showSide: _angular_core.Signal<boolean>;
1603
+ private readonly prefs;
1603
1604
  readonly sideCollapsed: _angular_core.WritableSignal<boolean>;
1604
1605
  /** Shown in the toggle's tooltip: the button is far from the content, the shortcut is not. */
1605
1606
  readonly shortcutHint: string;
@@ -2612,6 +2613,13 @@ declare class EfFormGridComponent {
2612
2613
  * Custom actions can declare `permission` and `visible` like
2613
2614
  * `EfRowAction`. With `[context]` bound, the toolbar filters them
2614
2615
  * against `ScreenContext.isGranted()` automatically.
2616
+ *
2617
+ * Save and actions flagged `requiresWrite` follow `context.canWrite`,
2618
+ * which `AbstractDetailScreenV2` sets from its own `canWrite()` (Edit on
2619
+ * an existing record, Create on a new one or a duplicate). Binding
2620
+ * `[context]="context"` is all a screen does; it does not pass
2621
+ * `[showSaveAction]` for permissions. Without a context, or with one that
2622
+ * carries no `canWrite`, Save behaves as `[showSaveAction]` alone says.
2615
2623
  */
2616
2624
  declare class EfDetailToolbarComponent {
2617
2625
  /** Custom screen-specific actions, rendered before the standard
@@ -2648,6 +2656,10 @@ declare class EfDetailToolbarComponent {
2648
2656
  readonly canPrint: _angular_core.Signal<boolean>;
2649
2657
  readonly canDuplicate: _angular_core.Signal<boolean>;
2650
2658
  readonly canDelete: _angular_core.Signal<boolean>;
2659
+ /** The bound screen's write state; `true` when unknown (no context,
2660
+ * or a context no detail abstract has stamped), which keeps the
2661
+ * toolbar's behaviour for those callers what it always was. */
2662
+ readonly canWrite: _angular_core.Signal<boolean>;
2651
2663
  readonly canSave: _angular_core.Signal<boolean>;
2652
2664
  readonly hasStandardActions: _angular_core.Signal<boolean>;
2653
2665
  readonly hasCustomActions: _angular_core.Signal<boolean>;
@@ -3142,7 +3154,7 @@ declare abstract class AbstractEfFormControl {
3142
3154
  readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
3143
3155
  readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
3144
3156
  /** The `[disabled]` input. The **effective** disabled (input OR
3145
- * form-driven via CVA) is {@link isDisabled} — bind that in templates. */
3157
+ * form-driven via CVA, or an enclosing `[efReadOnly]` scope) is {@link isDisabled} — bind that in templates. */
3146
3158
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
3147
3159
  /** Form-driven disabled set by CVA `setDisabledState`, merged with the
3148
3160
  * `[disabled]` input. Writable signal (the input itself is read-only). */
@@ -3150,6 +3162,8 @@ declare abstract class AbstractEfFormControl {
3150
3162
  /** Effective disabled state — the `[disabled]` input OR a reactive-form
3151
3163
  * `disable()`. Templates/logic should use this, not `disabled()`. */
3152
3164
  readonly isDisabled: _angular_core.Signal<boolean>;
3165
+ /** Optional enclosing `[efReadOnly]` scope — disables the control when set. */
3166
+ private readonly readOnlyScope;
3153
3167
  /** CVA hook for subclasses: `setDisabledState(d) { this.updateDisabledState(d); }`. */
3154
3168
  protected updateDisabledState(disabled: boolean): void;
3155
3169
  /**
@@ -3613,6 +3627,10 @@ declare class EfDatepickerComponent implements ControlValueAccessor {
3613
3627
  showButtonBar: boolean;
3614
3628
  minDate?: Date;
3615
3629
  maxDate?: Date;
3630
+ /** Optional enclosing `[efReadOnly]` scope. */
3631
+ private readonly readOnlyScope;
3632
+ /** Effective disabled: the input / CVA state OR a read-only scope. */
3633
+ get isDisabled(): boolean;
3616
3634
  /**
3617
3635
  * Take focus on load. Bound explicitly rather than left unset: PrimeNG's
3618
3636
  * AutoFocus directive tests `autofocus === false`, and the control declares
@@ -3953,6 +3971,10 @@ declare class EfQuantityStepperComponent implements ControlValueAccessor {
3953
3971
  * When present, it specifies that the component should be disabled
3954
3972
  */
3955
3973
  disabled: boolean;
3974
+ /** Optional enclosing `[efReadOnly]` scope. */
3975
+ private readonly readOnlyScope;
3976
+ /** Effective disabled: the input / CVA state OR a read-only scope. */
3977
+ get isDisabled(): boolean;
3956
3978
  /**
3957
3979
  * Callback to invoke when the value changes
3958
3980
  */
@@ -4407,9 +4429,11 @@ interface EfRowAction {
4407
4429
  visible?: boolean;
4408
4430
  /**
4409
4431
  * If set, the item is hidden unless the bound `ScreenContext`
4410
- * grants this permission. Items with no `permission` always show.
4432
+ * grants this permission, or every permission in the array (e.g.
4433
+ * Duplicate needs `[Duplicate, Create]`, since a duplicate is saved
4434
+ * through create). Items with no `permission` always show.
4411
4435
  */
4412
- permission?: Permissions;
4436
+ permission?: Permissions | ReadonlyArray<Permissions>;
4413
4437
  /** Click handler. The container handles closing the popup. */
4414
4438
  command?: () => void;
4415
4439
  }
@@ -4464,6 +4488,7 @@ type EfTableDensity = 'compact' | 'default' | 'comfortable';
4464
4488
  */
4465
4489
  declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
4466
4490
  private readonly viewport;
4491
+ private readonly prefs;
4467
4492
  private readonly configuredMobileLayout;
4468
4493
  readonly isMobile: _angular_core.Signal<boolean>;
4469
4494
  /** Per-screen override of the app-wide default. */
@@ -5320,6 +5345,30 @@ declare class EfFilterPillComponent {
5320
5345
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfFilterPillComponent, "ef-filter-pill", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "labelKey": { "alias": "labelKey"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "hasClear": { "alias": "hasClear"; "required": false; "isSignal": true; }; "hasPopover": { "alias": "hasPopover"; "required": false; "isSignal": true; }; "popoverOpen": { "alias": "popoverOpen"; "required": false; "isSignal": true; }; "clearAriaKey": { "alias": "clearAriaKey"; "required": false; "isSignal": true; }; }, { "pillClick": "pillClick"; "clearClick": "clearClick"; }, never, ["[popover]"], true, never>;
5321
5346
  }
5322
5347
 
5348
+ /**
5349
+ * Scopes a read-only state to every descendant `ef-*` form control.
5350
+ *
5351
+ * Drop it on the container that wraps a form and bind whether the current
5352
+ * user lacks write access; descendant controls fold it into their effective
5353
+ * disabled state, so no per-field `[disabled]` binding is needed:
5354
+ *
5355
+ * ```html
5356
+ * <div class="detail-grid" [efReadOnly]="!canWrite()">
5357
+ * <ef-input-text name="companyName" ... />
5358
+ * <ef-select name="clientType" ... />
5359
+ * </div>
5360
+ * ```
5361
+ *
5362
+ * The input is a signal, so toggling it re-enables the controls under
5363
+ * zoneless change detection (controls read it through `isDisabled`).
5364
+ */
5365
+ declare class EfReadOnlyDirective {
5366
+ /** When true, every descendant ef-* control renders disabled. */
5367
+ readonly readOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
5368
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfReadOnlyDirective, never>;
5369
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EfReadOnlyDirective, "[efReadOnly]", never, { "readOnly": { "alias": "efReadOnly"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
5370
+ }
5371
+
5323
5372
  /**
5324
5373
  * Scopes a map of server/validation errors to its descendant `ef-*` form
5325
5374
  * controls, which auto-link by their `name` — no per-field `[errors]`
@@ -6090,5 +6139,5 @@ declare class EfEmailMetricsCardComponent {
6090
6139
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfEmailMetricsCardComponent, "ef-email-metrics-card", never, { "metrics": { "alias": "metrics"; "required": false; "isSignal": true; }; "recentEvents": { "alias": "recentEvents"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; }, { "rangeChange": "rangeChange"; }, never, never, true, never>;
6091
6140
  }
6092
6141
 
6093
- export { EF_BADGE_BG_COLORS, EF_BADGE_BG_LIGHT_COLORS, EF_BADGE_BORDER_COLORS, EF_BADGE_DEFAULTS, EF_BADGE_TEXT_COLORS, EF_CHART_PALETTE, EF_DATATABLE_ACTIONS_DEFAULTS, EF_DATATABLE_COLUMN_DEFAULTS, EF_DATATABLE_DEFAULTS, EF_DATA_CARD_MOBILE_LAYOUT, EF_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfAboutDialogComponent, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBuildStampComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, EfChangePasswordComponent, EfChartComponent, EfCheckboxComponent, EfClearButtonComponent, EfColumnHeaderTemplateDirective, EfColumnTemplateDirective, EfCompactPipe, EfConfirmDialogComponent, EfCurrencyPipe, EfDataCardComponent, EfDatatableActionBarComponent, EfDatatableComponent, EfDatepickerAdvancedComponent, EfDatepickerComponent, EfDetailToolbarComponent, EfDialogComponent, EfEmailMetricsCardComponent, EfEmptyStateComponent, EfFabComponent, EfFieldsetComponent, EfFilterDrawerComponent, EfFilterPillComponent, EfFormGridComponent, EfInputNumberComponent, EfInputTextComponent, EfKpiCardComponent, EfLabelComponent, EfModuleRailComponent, EfModuleSideComponent, EfMultiSelectComponent, EfOrderBuilderComponent, EfOrderSummaryComponent, EfOverflowTooltipDirective, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfProfileMenuComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRadioComponent, EfRankListComponent, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfShortcutsDialogComponent, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfThemeToggleComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTooltipDirective, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
6142
+ export { EF_BADGE_BG_COLORS, EF_BADGE_BG_LIGHT_COLORS, EF_BADGE_BORDER_COLORS, EF_BADGE_DEFAULTS, EF_BADGE_TEXT_COLORS, EF_CHART_PALETTE, EF_DATATABLE_ACTIONS_DEFAULTS, EF_DATATABLE_COLUMN_DEFAULTS, EF_DATATABLE_DEFAULTS, EF_DATA_CARD_MOBILE_LAYOUT, EF_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfAboutDialogComponent, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBuildStampComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, EfChangePasswordComponent, EfChartComponent, EfCheckboxComponent, EfClearButtonComponent, EfColumnHeaderTemplateDirective, EfColumnTemplateDirective, EfCompactPipe, EfConfirmDialogComponent, EfCurrencyPipe, EfDataCardComponent, EfDatatableActionBarComponent, EfDatatableComponent, EfDatepickerAdvancedComponent, EfDatepickerComponent, EfDetailToolbarComponent, EfDialogComponent, EfEmailMetricsCardComponent, EfEmptyStateComponent, EfFabComponent, EfFieldsetComponent, EfFilterDrawerComponent, EfFilterPillComponent, EfFormGridComponent, EfInputNumberComponent, EfInputTextComponent, EfKpiCardComponent, EfLabelComponent, EfModuleRailComponent, EfModuleSideComponent, EfMultiSelectComponent, EfOrderBuilderComponent, EfOrderSummaryComponent, EfOverflowTooltipDirective, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfProfileMenuComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRadioComponent, EfRankListComponent, EfReadOnlyDirective, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfShortcutsDialogComponent, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfThemeToggleComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTooltipDirective, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
6094
6143
  export type { CatalogueProduct, CatalogueProductVariant, CategoryAssignment, CategoryGroup, CategoryItem, DatatableSearchEntity, DocumentConfig, EfAboutServer, EfBadgeColor, EfBadgeConfig, EfBadgeSize, EfBadgeVariant, EfButtonComptoirSeverity, EfButtonPrimeNGSeverity, EfButtonSeverity, EfChangeHistoryEntry, EfChangeHistoryFieldChange, EfChangePasswordSubmit, EfChartSeries, EfChartType, EfDataCardMobileLayout, EfDataCardRowAction, EfDatatableActions, EfDatatableColumn, EfDatatableColumnAlign, EfDatatableColumnType, EfDatatableConfig, EfDateFieldValue, EfDatePreset, EfDialogAction, EfDialogSeverity, EfDialogSize, EfFabPosition, EfKpiDeltaTone, EfKpiSparkline, EfPillItem, EfPresetItem, EfProfileMenuItem, EfRankRow, EfRowAction, EfSkeletonVariant, EfStatsRow, EfStatusColor, EfStatusReferenceItem, EfTabItem, EfTabsModule, EfTabsVariant, EfTimelineItem, EfTimelineState, EfToastRegionPosition, EfTotalsGrand, EfTotalsRow, HighlightSegment, OrderChangeInfo, OrderEntity, OrderLineItem, OrderProductsSummary, OrderSummaryItem, ProductCountGroup, ProductCountGroupLabel, ProductTypeaheadRow, ProductTypeaheadSelection, ProductWithCountGroup, SelectedFilter, ValidationResult };