@educarehq/solaris-ui 0.2.0 → 0.3.0
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/esm2022/index.js +40 -1
- package/esm2022/index.js.map +1 -1
- package/esm2022/lib/components/actions/button/index.js +3 -0
- package/esm2022/lib/components/actions/button/index.js.map +1 -0
- package/esm2022/lib/components/data-display/badge/index.js +3 -0
- package/esm2022/lib/components/data-display/badge/index.js.map +1 -0
- package/esm2022/lib/components/data-display/divider/component/divider.component.js +46 -0
- package/esm2022/lib/components/data-display/divider/component/divider.component.js.map +1 -0
- package/esm2022/lib/components/data-display/divider/index.js +2 -0
- package/esm2022/lib/components/data-display/divider/index.js.map +1 -0
- package/esm2022/lib/components/data-display/divider/model/divider.types.js +1 -0
- package/esm2022/lib/components/data-display/divider/model/divider.types.js.map +1 -0
- package/esm2022/lib/components/feedback/toast/component/toast.component.js +268 -0
- package/esm2022/lib/components/feedback/toast/component/toast.component.js.map +1 -0
- package/esm2022/lib/components/feedback/toast/container/toast-container.component.js +24 -0
- package/esm2022/lib/components/feedback/toast/container/toast-container.component.js.map +1 -0
- package/esm2022/lib/components/feedback/toast/model/toast.types.js +1 -0
- package/esm2022/lib/components/feedback/toast/model/toast.types.js.map +1 -0
- package/esm2022/lib/components/feedback/toast/provider/provide-solaris-toast.js +17 -0
- package/esm2022/lib/components/feedback/toast/provider/provide-solaris-toast.js.map +1 -0
- package/esm2022/lib/components/feedback/toast/service/toast.service.js +219 -0
- package/esm2022/lib/components/feedback/toast/service/toast.service.js.map +1 -0
- package/esm2022/lib/components/feedback/toast/token/toast.tokens.js +13 -0
- package/esm2022/lib/components/feedback/toast/token/toast.tokens.js.map +1 -0
- package/esm2022/lib/components/forms/email-field/component/email-field.component.js +5 -4
- package/esm2022/lib/components/forms/email-field/component/email-field.component.js.map +1 -1
- package/esm2022/lib/components/forms/form-field/component/form-field.component.js +50 -2
- package/esm2022/lib/components/forms/form-field/component/form-field.component.js.map +1 -1
- package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js.map +1 -1
- package/esm2022/lib/components/forms/form-field/index.js.map +1 -1
- package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js +11 -28
- package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js.map +1 -1
- package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js.map +1 -1
- package/esm2022/lib/components/forms/option/component/option.component.js +2 -2
- package/esm2022/lib/components/forms/option/component/option.component.js.map +1 -1
- package/esm2022/lib/components/forms/password-field/component/password-field.component.js +2 -2
- package/esm2022/lib/components/forms/password-field/component/password-field.component.js.map +1 -1
- package/esm2022/lib/components/forms/radio/component/radio.component.js +2 -2
- package/esm2022/lib/components/forms/select/component/select.component.js +4 -8
- package/esm2022/lib/components/forms/select/component/select.component.js.map +1 -1
- package/esm2022/lib/components/icon/component/solaris-icon.component.js +2 -2
- package/esm2022/lib/components/icon/component/solaris-icon.component.js.map +1 -1
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu-group.component.js +27 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu-group.component.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu-item.component.js +96 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu-item.component.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu-label.component.js +22 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu-label.component.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu.component.js +105 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-menu.component.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-submenu-trigger.component.js +95 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-submenu-trigger.component.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-submenu.component.js +631 -0
- package/esm2022/lib/components/interaction/dropdown-menu/component/dropdown-submenu.component.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/directives/dropdown-menu-trigger.directive.js +365 -0
- package/esm2022/lib/components/interaction/dropdown-menu/directives/dropdown-menu-trigger.directive.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/index.js +8 -0
- package/esm2022/lib/components/interaction/dropdown-menu/index.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/model/dropdown-menu-navigation.js +3 -0
- package/esm2022/lib/components/interaction/dropdown-menu/model/dropdown-menu-navigation.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/model/dropdown-menu.types.js +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/model/dropdown-menu.types.js.map +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/model/dropdown-submenu.types.js +1 -0
- package/esm2022/lib/components/interaction/dropdown-menu/model/dropdown-submenu.types.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js +2 -2
- package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js.map +1 -1
- package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js +28 -20
- package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js.map +1 -1
- package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js.map +1 -1
- package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js.map +1 -1
- package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js.map +1 -1
- package/esm2022/lib/components/navigation/editable-tabs/component/editable-tabs.component.js +323 -0
- package/esm2022/lib/components/navigation/editable-tabs/component/editable-tabs.component.js.map +1 -0
- package/esm2022/lib/components/navigation/editable-tabs/editable-tab/editable-tab.component.js +34 -0
- package/esm2022/lib/components/navigation/editable-tabs/editable-tab/editable-tab.component.js.map +1 -0
- package/esm2022/lib/components/navigation/editable-tabs/model/editable-tabs.types.js +1 -0
- package/esm2022/lib/components/navigation/editable-tabs/model/editable-tabs.types.js.map +1 -0
- package/esm2022/lib/components/navigation/segmented-control/component/segmented-control.component.js +242 -0
- package/esm2022/lib/components/navigation/segmented-control/component/segmented-control.component.js.map +1 -0
- package/esm2022/lib/components/navigation/segmented-control/item/segmented-item.component.js +197 -0
- package/esm2022/lib/components/navigation/segmented-control/item/segmented-item.component.js.map +1 -0
- package/esm2022/lib/components/navigation/segmented-control/model/segmented-control.types.js +1 -0
- package/esm2022/lib/components/navigation/segmented-control/model/segmented-control.types.js.map +1 -0
- package/esm2022/lib/components/navigation/segmented-control/token/segmented-control.tokens.js +3 -0
- package/esm2022/lib/components/navigation/segmented-control/token/segmented-control.tokens.js.map +1 -0
- package/esm2022/lib/components/navigation/stepper/actions/stepper-actions.component.js +15 -0
- package/esm2022/lib/components/navigation/stepper/actions/stepper-actions.component.js.map +1 -0
- package/esm2022/lib/components/navigation/stepper/component/stepper.component.js +99 -0
- package/esm2022/lib/components/navigation/stepper/component/stepper.component.js.map +1 -0
- package/esm2022/lib/components/navigation/stepper/content/stepper-content.component.js +13 -0
- package/esm2022/lib/components/navigation/stepper/content/stepper-content.component.js.map +1 -0
- package/esm2022/lib/components/navigation/stepper/model/stepper.types.js +1 -0
- package/esm2022/lib/components/navigation/stepper/model/stepper.types.js.map +1 -0
- package/esm2022/lib/components/navigation/stepper/step/step.component.js +91 -0
- package/esm2022/lib/components/navigation/stepper/step/step.component.js.map +1 -0
- package/esm2022/lib/components/navigation/stepper/token/stepper.tokens.js +3 -0
- package/esm2022/lib/components/navigation/stepper/token/stepper.tokens.js.map +1 -0
- package/esm2022/lib/components/navigation/tabs/component/tabs.component.js +169 -0
- package/esm2022/lib/components/navigation/tabs/component/tabs.component.js.map +1 -0
- package/esm2022/lib/components/navigation/tabs/index.js +5 -0
- package/esm2022/lib/components/navigation/tabs/index.js.map +1 -0
- package/esm2022/lib/components/navigation/tabs/model/tabs.types.js +1 -0
- package/esm2022/lib/components/navigation/tabs/model/tabs.types.js.map +1 -0
- package/esm2022/lib/components/navigation/tabs/tab/tab.component.js +195 -0
- package/esm2022/lib/components/navigation/tabs/tab/tab.component.js.map +1 -0
- package/esm2022/lib/components/navigation/tabs/tab-panel/tab-panel.component.js +55 -0
- package/esm2022/lib/components/navigation/tabs/tab-panel/tab-panel.component.js.map +1 -0
- package/esm2022/lib/components/navigation/tabs/token/tabs.tokens.js +3 -0
- package/esm2022/lib/components/navigation/tabs/token/tabs.tokens.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/component/dialog.component.js +49 -0
- package/esm2022/lib/components/overlay/dialog/component/dialog.component.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/components/dialog-actions.component.js +37 -0
- package/esm2022/lib/components/overlay/dialog/components/dialog-actions.component.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/components/dialog-content.component.js +13 -0
- package/esm2022/lib/components/overlay/dialog/components/dialog-content.component.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/components/dialog-header.component.js +32 -0
- package/esm2022/lib/components/overlay/dialog/components/dialog-header.component.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/container/dialog-container.component.js +142 -0
- package/esm2022/lib/components/overlay/dialog/container/dialog-container.component.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/flow/dialog-flow.component.js +56 -0
- package/esm2022/lib/components/overlay/dialog/flow/dialog-flow.component.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/flow/dialog-step.component.js +20 -0
- package/esm2022/lib/components/overlay/dialog/flow/dialog-step.component.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/model/dialog.types.js +1 -0
- package/esm2022/lib/components/overlay/dialog/model/dialog.types.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/provider/provide-solaris-dialog.js +13 -0
- package/esm2022/lib/components/overlay/dialog/provider/provide-solaris-dialog.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/service/dialog-ref.js +23 -0
- package/esm2022/lib/components/overlay/dialog/service/dialog-ref.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/service/dialog.service.js +111 -0
- package/esm2022/lib/components/overlay/dialog/service/dialog.service.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/token/dialog-data.token.js +4 -0
- package/esm2022/lib/components/overlay/dialog/token/dialog-data.token.js.map +1 -0
- package/esm2022/lib/components/overlay/dialog/token/dialog.tokens.js +15 -0
- package/esm2022/lib/components/overlay/dialog/token/dialog.tokens.js.map +1 -0
- package/esm2022/lib/services/icon/icons/groups/actions.js +242 -0
- package/esm2022/lib/services/icon/icons/groups/actions.js.map +1 -0
- package/esm2022/lib/services/icon/icons/groups/data.js +129 -0
- package/esm2022/lib/services/icon/icons/groups/data.js.map +1 -0
- package/esm2022/lib/services/icon/icons/groups/layout.js +50 -0
- package/esm2022/lib/services/icon/icons/groups/layout.js.map +1 -0
- package/esm2022/lib/services/icon/icons/groups/navigation.js +354 -0
- package/esm2022/lib/services/icon/icons/groups/navigation.js.map +1 -0
- package/esm2022/lib/services/icon/icons/groups/status.js +70 -0
- package/esm2022/lib/services/icon/icons/groups/status.js.map +1 -0
- package/esm2022/lib/services/icon/icons/groups/theme.js +49 -0
- package/esm2022/lib/services/icon/icons/groups/theme.js.map +1 -0
- package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js +12 -204
- package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js.map +1 -1
- package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js.map +1 -1
- package/esm2022/lib/services/icon/model/solaris-icon.types.js.map +1 -1
- package/esm2022/lib/services/translation/model/solaris-translate-defaults.js +56 -0
- package/esm2022/lib/services/translation/model/solaris-translate-defaults.js.map +1 -1
- package/index.d.ts +92 -1
- package/lib/components/actions/button/index.d.ts +3 -0
- package/lib/components/data-display/badge/index.d.ts +3 -0
- package/lib/components/data-display/divider/component/divider.component.d.ts +17 -0
- package/lib/components/data-display/divider/index.d.ts +2 -0
- package/lib/components/data-display/divider/model/divider.types.d.ts +5 -0
- package/lib/components/feedback/toast/component/toast.component.d.ts +62 -0
- package/lib/components/feedback/toast/container/toast-container.component.d.ts +10 -0
- package/lib/components/feedback/toast/model/toast.types.d.ts +106 -0
- package/lib/components/feedback/toast/provider/provide-solaris-toast.d.ts +3 -0
- package/lib/components/feedback/toast/service/toast.service.d.ts +36 -0
- package/lib/components/feedback/toast/token/toast.tokens.d.ts +5 -0
- package/lib/components/forms/email-field/component/email-field.component.d.ts +2 -1
- package/lib/components/forms/form-field/component/form-field.component.d.ts +6 -0
- package/lib/components/forms/multi-select/component/multi-select.component.d.ts +4 -7
- package/lib/components/forms/select/component/select.component.d.ts +2 -2
- package/lib/components/interaction/dropdown-menu/component/dropdown-menu-group.component.d.ts +10 -0
- package/lib/components/interaction/dropdown-menu/component/dropdown-menu-item.component.d.ts +28 -0
- package/lib/components/interaction/dropdown-menu/component/dropdown-menu-label.component.d.ts +7 -0
- package/lib/components/interaction/dropdown-menu/component/dropdown-menu.component.d.ts +21 -0
- package/lib/components/interaction/dropdown-menu/component/dropdown-submenu-trigger.component.d.ts +21 -0
- package/lib/components/interaction/dropdown-menu/component/dropdown-submenu.component.d.ts +68 -0
- package/lib/components/interaction/dropdown-menu/directives/dropdown-menu-trigger.directive.d.ts +61 -0
- package/lib/components/interaction/dropdown-menu/index.d.ts +9 -0
- package/lib/components/interaction/dropdown-menu/model/dropdown-menu-navigation.d.ts +8 -0
- package/lib/components/interaction/dropdown-menu/model/dropdown-menu.types.d.ts +11 -0
- package/lib/components/interaction/dropdown-menu/model/dropdown-submenu.types.d.ts +2 -0
- package/lib/components/navigation/editable-tabs/component/editable-tabs.component.d.ts +69 -0
- package/lib/components/navigation/editable-tabs/editable-tab/editable-tab.component.d.ts +20 -0
- package/lib/components/navigation/editable-tabs/model/editable-tabs.types.d.ts +60 -0
- package/lib/components/navigation/segmented-control/component/segmented-control.component.d.ts +64 -0
- package/lib/components/navigation/segmented-control/item/segmented-item.component.d.ts +35 -0
- package/lib/components/navigation/segmented-control/model/segmented-control.types.d.ts +12 -0
- package/lib/components/navigation/segmented-control/token/segmented-control.tokens.d.ts +22 -0
- package/lib/components/navigation/stepper/actions/stepper-actions.component.d.ts +7 -0
- package/lib/components/navigation/stepper/component/stepper.component.d.ts +36 -0
- package/lib/components/navigation/stepper/content/stepper-content.component.d.ts +5 -0
- package/lib/components/navigation/stepper/model/stepper.types.d.ts +15 -0
- package/lib/components/navigation/stepper/step/step.component.d.ts +27 -0
- package/lib/components/navigation/stepper/token/stepper.tokens.d.ts +13 -0
- package/lib/components/navigation/tabs/component/tabs.component.d.ts +47 -0
- package/lib/components/navigation/tabs/index.d.ts +6 -0
- package/lib/components/navigation/tabs/model/tabs.types.d.ts +17 -0
- package/lib/components/navigation/tabs/tab/tab.component.d.ts +38 -0
- package/lib/components/navigation/tabs/tab-panel/tab-panel.component.d.ts +15 -0
- package/lib/components/navigation/tabs/token/tabs.tokens.d.ts +19 -0
- package/lib/components/overlay/dialog/component/dialog.component.d.ts +29 -0
- package/lib/components/overlay/dialog/components/dialog-actions.component.d.ts +12 -0
- package/lib/components/overlay/dialog/components/dialog-content.component.d.ts +5 -0
- package/lib/components/overlay/dialog/components/dialog-header.component.d.ts +19 -0
- package/lib/components/overlay/dialog/container/dialog-container.component.d.ts +32 -0
- package/lib/components/overlay/dialog/flow/dialog-flow.component.d.ts +19 -0
- package/lib/components/overlay/dialog/flow/dialog-step.component.d.ts +7 -0
- package/lib/components/overlay/dialog/model/dialog.types.d.ts +87 -0
- package/lib/components/overlay/dialog/provider/provide-solaris-dialog.d.ts +3 -0
- package/lib/components/overlay/dialog/service/dialog-ref.d.ts +11 -0
- package/lib/components/overlay/dialog/service/dialog.service.d.ts +20 -0
- package/lib/components/overlay/dialog/token/dialog-data.token.d.ts +4 -0
- package/lib/components/overlay/dialog/token/dialog.tokens.d.ts +4 -0
- package/lib/services/icon/icons/groups/actions.d.ts +2 -0
- package/lib/services/icon/icons/groups/data.d.ts +2 -0
- package/lib/services/icon/icons/groups/layout.d.ts +2 -0
- package/lib/services/icon/icons/groups/navigation.d.ts +2 -0
- package/lib/services/icon/icons/groups/status.d.ts +2 -0
- package/lib/services/icon/icons/groups/theme.d.ts +2 -0
- package/lib/services/icon/model/solaris-icon-definition.interface.d.ts +10 -1
- package/lib/services/icon/model/solaris-icon.types.d.ts +1 -1
- package/package.json +1 -1
- package/styles/_dropdown-menu.scss +72 -0
- package/styles/_popover.scss +24 -19
- package/styles/_toast.scss +9 -0
- package/styles/_tooltip.scss +3 -3
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { Component, input, output, model, computed, signal, viewChildren, inject, ChangeDetectionStrategy, NgZone, effect, } from '@angular/core';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
3
|
+
import { SolarisTranslateService } from '../../../../services/translation';
|
|
4
|
+
import { SolarisTabPanelComponent, SolarisTabsComponent, SolarisTabComponent, } from '../../tabs';
|
|
5
|
+
import { SolarisDropdownMenuTriggerDirective, SolarisDropdownMenuItemComponent, SolarisDropdownMenuComponent, } from '../../../interaction/dropdown-menu';
|
|
6
|
+
import { SolarisDividerComponent } from '../../../data-display/divider';
|
|
7
|
+
import { SolarisIconComponent } from '../../../icon';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export class SolarisEditableTabsComponent {
|
|
10
|
+
translateService = inject(SolarisTranslateService, {
|
|
11
|
+
optional: true,
|
|
12
|
+
});
|
|
13
|
+
ngZone = inject(NgZone);
|
|
14
|
+
value = model(undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
15
|
+
defaultValue = input(undefined, ...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
16
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
17
|
+
appearance = input('underline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
18
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
19
|
+
density = input('comfortable', ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
20
|
+
activationMode = input('automatic', ...(ngDevMode ? [{ debugName: "activationMode" }] : /* istanbul ignore next */ []));
|
|
21
|
+
contentTransition = input('slide', ...(ngDevMode ? [{ debugName: "contentTransition" }] : /* istanbul ignore next */ []));
|
|
22
|
+
tabs = input.required(...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
|
|
23
|
+
editable = input(true, ...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
24
|
+
renamable = input(true, ...(ngDevMode ? [{ debugName: "renamable" }] : /* istanbul ignore next */ []));
|
|
25
|
+
removable = input(true, ...(ngDevMode ? [{ debugName: "removable" }] : /* istanbul ignore next */ []));
|
|
26
|
+
movable = input(true, ...(ngDevMode ? [{ debugName: "movable" }] : /* istanbul ignore next */ []));
|
|
27
|
+
defaultable = input(true, ...(ngDevMode ? [{ debugName: "defaultable" }] : /* istanbul ignore next */ []));
|
|
28
|
+
showActions = input('focus-hover', ...(ngDevMode ? [{ debugName: "showActions" }] : /* istanbul ignore next */ []));
|
|
29
|
+
renameOnBlur = input('confirm', ...(ngDevMode ? [{ debugName: "renameOnBlur" }] : /* istanbul ignore next */ []));
|
|
30
|
+
minTabs = input(1, ...(ngDevMode ? [{ debugName: "minTabs" }] : /* istanbul ignore next */ []));
|
|
31
|
+
allowEmpty = input(false, ...(ngDevMode ? [{ debugName: "allowEmpty" }] : /* istanbul ignore next */ []));
|
|
32
|
+
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
33
|
+
ariaLabelKey = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
|
|
34
|
+
tabContentMap = input(undefined, ...(ngDevMode ? [{ debugName: "tabContentMap" }] : /* istanbul ignore next */ []));
|
|
35
|
+
valueChange = output();
|
|
36
|
+
tabRenameRequested = output();
|
|
37
|
+
tabRename = output();
|
|
38
|
+
tabRemoveRequested = output();
|
|
39
|
+
tabRemove = output();
|
|
40
|
+
tabMoveRequested = output();
|
|
41
|
+
tabMove = output();
|
|
42
|
+
defaultTabChange = output();
|
|
43
|
+
tabAction = output();
|
|
44
|
+
menuComponents = viewChildren(SolarisDropdownMenuComponent, ...(ngDevMode ? [{ debugName: "menuComponents" }] : /* istanbul ignore next */ []));
|
|
45
|
+
tabMenuRefs = computed(() => {
|
|
46
|
+
this.tabs();
|
|
47
|
+
return this.menuComponents();
|
|
48
|
+
}, ...(ngDevMode ? [{ debugName: "tabMenuRefs" }] : /* istanbul ignore next */ []));
|
|
49
|
+
activeMenuIndex = signal(null, ...(ngDevMode ? [{ debugName: "activeMenuIndex" }] : /* istanbul ignore next */ []));
|
|
50
|
+
renamingTabId = signal(null, ...(ngDevMode ? [{ debugName: "renamingTabId" }] : /* istanbul ignore next */ []));
|
|
51
|
+
renameValue = signal('', ...(ngDevMode ? [{ debugName: "renameValue" }] : /* istanbul ignore next */ []));
|
|
52
|
+
defaultTabValue = signal(undefined, ...(ngDevMode ? [{ debugName: "defaultTabValue" }] : /* istanbul ignore next */ []));
|
|
53
|
+
resolvedAriaLabel = computed(() => {
|
|
54
|
+
if (this.ariaLabel())
|
|
55
|
+
return this.ariaLabel();
|
|
56
|
+
const key = this.ariaLabelKey();
|
|
57
|
+
if (key && this.translateService) {
|
|
58
|
+
return this.translateService.translate(key);
|
|
59
|
+
}
|
|
60
|
+
return key ?? 'Editable tabs';
|
|
61
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
62
|
+
constructor() {
|
|
63
|
+
effect(() => {
|
|
64
|
+
const defaultValue = this.defaultValue();
|
|
65
|
+
const currentValue = this.value();
|
|
66
|
+
if (currentValue === undefined && defaultValue !== undefined) {
|
|
67
|
+
this.value.set(defaultValue);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
onValueChange(newValue) {
|
|
72
|
+
this.value.set(newValue);
|
|
73
|
+
this.valueChange.emit(newValue);
|
|
74
|
+
}
|
|
75
|
+
hasActions(tab) {
|
|
76
|
+
if (!this.editable())
|
|
77
|
+
return false;
|
|
78
|
+
if (tab.disabled)
|
|
79
|
+
return false;
|
|
80
|
+
return (this.canRename(tab) ||
|
|
81
|
+
this.canSetDefault(tab) ||
|
|
82
|
+
this.canMoveLeft(tab) ||
|
|
83
|
+
this.canMoveRight(tab) ||
|
|
84
|
+
this.canRemove(tab) ||
|
|
85
|
+
(tab.customActions?.length ?? 0) > 0);
|
|
86
|
+
}
|
|
87
|
+
canRename(tab) {
|
|
88
|
+
if (!this.renamable())
|
|
89
|
+
return false;
|
|
90
|
+
if (tab.locked && tab.renamable !== true)
|
|
91
|
+
return false;
|
|
92
|
+
return tab.renamable !== false;
|
|
93
|
+
}
|
|
94
|
+
canRemove(tab) {
|
|
95
|
+
if (!this.removable())
|
|
96
|
+
return false;
|
|
97
|
+
if (tab.locked && tab.removable !== true)
|
|
98
|
+
return false;
|
|
99
|
+
if (tab.removable === false)
|
|
100
|
+
return false;
|
|
101
|
+
if (tab.disabled)
|
|
102
|
+
return false;
|
|
103
|
+
return !(!this.allowEmpty() && this.tabs().length <= this.minTabs());
|
|
104
|
+
}
|
|
105
|
+
canMoveLeft(tab) {
|
|
106
|
+
if (!this.movable())
|
|
107
|
+
return false;
|
|
108
|
+
if (tab.locked && tab.movable !== true)
|
|
109
|
+
return false;
|
|
110
|
+
if (tab.movable === false)
|
|
111
|
+
return false;
|
|
112
|
+
if (tab.disabled)
|
|
113
|
+
return false;
|
|
114
|
+
const idx = this.tabs().indexOf(tab);
|
|
115
|
+
if (idx <= 0)
|
|
116
|
+
return false;
|
|
117
|
+
for (let i = idx - 1; i >= 0; i--) {
|
|
118
|
+
if (!this.tabs()[i].locked)
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
canMoveRight(tab) {
|
|
124
|
+
if (!this.movable())
|
|
125
|
+
return false;
|
|
126
|
+
if (tab.locked && tab.movable !== true)
|
|
127
|
+
return false;
|
|
128
|
+
if (tab.movable === false)
|
|
129
|
+
return false;
|
|
130
|
+
if (tab.disabled)
|
|
131
|
+
return false;
|
|
132
|
+
const idx = this.tabs().indexOf(tab);
|
|
133
|
+
if (idx < 0 || idx >= this.tabs().length - 1)
|
|
134
|
+
return false;
|
|
135
|
+
for (let i = idx + 1; i < this.tabs().length; i++) {
|
|
136
|
+
if (!this.tabs()[i].locked)
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
canSetDefault(tab) {
|
|
142
|
+
if (!this.defaultable())
|
|
143
|
+
return false;
|
|
144
|
+
if (tab.locked && tab.defaultable !== true)
|
|
145
|
+
return false;
|
|
146
|
+
if (tab.defaultable === false)
|
|
147
|
+
return false;
|
|
148
|
+
return !tab.disabled;
|
|
149
|
+
}
|
|
150
|
+
startRename(tab) {
|
|
151
|
+
this.activeMenuIndex.set(null);
|
|
152
|
+
this.renamingTabId.set(tab.value);
|
|
153
|
+
this.renameValue.set(tab.label ?? '');
|
|
154
|
+
this.ngZone.runOutsideAngular(() => {
|
|
155
|
+
setTimeout(() => {
|
|
156
|
+
// SECURITY_EXCEPTION: document.querySelector required to find rename input. SSR-safe via guard.
|
|
157
|
+
const input = document.querySelector(`.solaris-editable-tabs__rename-input`);
|
|
158
|
+
if (input) {
|
|
159
|
+
input.focus();
|
|
160
|
+
input.select();
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
commitRename(tab) {
|
|
166
|
+
const previousLabel = tab.label ?? '';
|
|
167
|
+
const nextLabel = this.renameValue().trim();
|
|
168
|
+
if (nextLabel === '') {
|
|
169
|
+
this.renamingTabId.set(null);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (nextLabel === previousLabel) {
|
|
173
|
+
this.renamingTabId.set(null);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const event = {
|
|
177
|
+
value: tab.value,
|
|
178
|
+
previousLabel,
|
|
179
|
+
nextLabel,
|
|
180
|
+
source: 'inline',
|
|
181
|
+
};
|
|
182
|
+
this.tabRenameRequested.emit(event);
|
|
183
|
+
this.tabRename.emit(event);
|
|
184
|
+
this.renamingTabId.set(null);
|
|
185
|
+
}
|
|
186
|
+
cancelRename() {
|
|
187
|
+
this.renamingTabId.set(null);
|
|
188
|
+
}
|
|
189
|
+
onRenameKeydown(event, tab) {
|
|
190
|
+
event.stopPropagation();
|
|
191
|
+
if (event.key === 'Enter') {
|
|
192
|
+
event.preventDefault();
|
|
193
|
+
this.commitRename(tab);
|
|
194
|
+
}
|
|
195
|
+
else if (event.key === 'Escape') {
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
this.cancelRename();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
onRenameBlur(tab) {
|
|
201
|
+
if (this.renameOnBlur() === 'confirm') {
|
|
202
|
+
this.commitRename(tab);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.cancelRename();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
confirmRemove(tab, index) {
|
|
209
|
+
this.activeMenuIndex.set(null);
|
|
210
|
+
if (!this.canRemove(tab))
|
|
211
|
+
return;
|
|
212
|
+
const wasActive = this.value() === tab.value;
|
|
213
|
+
const event = {
|
|
214
|
+
value: tab.value,
|
|
215
|
+
index,
|
|
216
|
+
wasActive,
|
|
217
|
+
};
|
|
218
|
+
this.tabRemoveRequested.emit(event);
|
|
219
|
+
this.tabRemove.emit(event);
|
|
220
|
+
}
|
|
221
|
+
moveLabel(direction) {
|
|
222
|
+
if (this.orientation() === 'vertical') {
|
|
223
|
+
const key = direction === 'left'
|
|
224
|
+
? 'solaris.editableTabs.moveUp'
|
|
225
|
+
: 'solaris.editableTabs.moveDown';
|
|
226
|
+
return (this.resolveText(key) ??
|
|
227
|
+
(direction === 'left' ? 'Move up' : 'Move down'));
|
|
228
|
+
}
|
|
229
|
+
const key = direction === 'left'
|
|
230
|
+
? 'solaris.editableTabs.moveLeft'
|
|
231
|
+
: 'solaris.editableTabs.moveRight';
|
|
232
|
+
return (this.resolveText(key) ??
|
|
233
|
+
(direction === 'left' ? 'Move left' : 'Move right'));
|
|
234
|
+
}
|
|
235
|
+
moveIcon(direction) {
|
|
236
|
+
if (this.orientation() === 'vertical') {
|
|
237
|
+
return direction === 'left' ? 'chevron-up' : 'chevron-down';
|
|
238
|
+
}
|
|
239
|
+
return direction === 'left' ? 'chevron-left' : 'chevron-right';
|
|
240
|
+
}
|
|
241
|
+
moveTab(tab, index, direction) {
|
|
242
|
+
this.activeMenuIndex.set(null);
|
|
243
|
+
const isPrev = direction === 'left' || direction === 'up';
|
|
244
|
+
const nextIndex = isPrev ? index - 1 : index + 1;
|
|
245
|
+
if (nextIndex < 0 || nextIndex >= this.tabs().length)
|
|
246
|
+
return;
|
|
247
|
+
if (!this.canMoveLeft(tab) && isPrev)
|
|
248
|
+
return;
|
|
249
|
+
if (!this.canMoveRight(tab) && !isPrev)
|
|
250
|
+
return;
|
|
251
|
+
const event = {
|
|
252
|
+
value: tab.value,
|
|
253
|
+
previousIndex: index,
|
|
254
|
+
nextIndex,
|
|
255
|
+
direction,
|
|
256
|
+
};
|
|
257
|
+
this.tabMoveRequested.emit(event);
|
|
258
|
+
this.tabMove.emit(event);
|
|
259
|
+
}
|
|
260
|
+
setAsDefault(tab) {
|
|
261
|
+
this.activeMenuIndex.set(null);
|
|
262
|
+
const previousDefaultValue = this.defaultTabValue();
|
|
263
|
+
this.defaultTabValue.set(tab.value);
|
|
264
|
+
const event = {
|
|
265
|
+
value: tab.value,
|
|
266
|
+
previousDefaultValue: previousDefaultValue !== undefined
|
|
267
|
+
? previousDefaultValue
|
|
268
|
+
: undefined,
|
|
269
|
+
};
|
|
270
|
+
this.defaultTabChange.emit(event);
|
|
271
|
+
}
|
|
272
|
+
handleCustomAction(tab, action) {
|
|
273
|
+
this.activeMenuIndex.set(null);
|
|
274
|
+
const event = {
|
|
275
|
+
tabValue: tab.value,
|
|
276
|
+
actionId: action.id,
|
|
277
|
+
action,
|
|
278
|
+
};
|
|
279
|
+
this.tabAction.emit(event);
|
|
280
|
+
}
|
|
281
|
+
isRenaming(tab) {
|
|
282
|
+
return this.renamingTabId() === tab.value;
|
|
283
|
+
}
|
|
284
|
+
getContentTemplate(tab) {
|
|
285
|
+
const contentMap = this.tabContentMap();
|
|
286
|
+
if (contentMap) {
|
|
287
|
+
const key = String(tab.value);
|
|
288
|
+
return contentMap[key] ?? null;
|
|
289
|
+
}
|
|
290
|
+
return tab.content ?? null;
|
|
291
|
+
}
|
|
292
|
+
resolveText(key) {
|
|
293
|
+
if (this.translateService) {
|
|
294
|
+
const result = this.translateService.translate(key);
|
|
295
|
+
return result !== key ? result : undefined;
|
|
296
|
+
}
|
|
297
|
+
return undefined;
|
|
298
|
+
}
|
|
299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisEditableTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
300
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisEditableTabsComponent, isStandalone: true, selector: "solaris-editable-tabs", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, activationMode: { classPropertyName: "activationMode", publicName: "activationMode", isSignal: true, isRequired: false, transformFunction: null }, contentTransition: { classPropertyName: "contentTransition", publicName: "contentTransition", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: true, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, renamable: { classPropertyName: "renamable", publicName: "renamable", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, movable: { classPropertyName: "movable", publicName: "movable", isSignal: true, isRequired: false, transformFunction: null }, defaultable: { classPropertyName: "defaultable", publicName: "defaultable", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, renameOnBlur: { classPropertyName: "renameOnBlur", publicName: "renameOnBlur", isSignal: true, isRequired: false, transformFunction: null }, minTabs: { classPropertyName: "minTabs", publicName: "minTabs", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelKey: { classPropertyName: "ariaLabelKey", publicName: "ariaLabelKey", isSignal: true, isRequired: false, transformFunction: null }, tabContentMap: { classPropertyName: "tabContentMap", publicName: "tabContentMap", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChange: "valueChange", tabRenameRequested: "tabRenameRequested", tabRename: "tabRename", tabRemoveRequested: "tabRemoveRequested", tabRemove: "tabRemove", tabMoveRequested: "tabMoveRequested", tabMove: "tabMove", defaultTabChange: "defaultTabChange", tabAction: "tabAction" }, host: { properties: { "attr.data-orientation": "orientation()", "attr.data-appearance": "appearance()", "attr.data-size": "size()", "attr.data-density": "density()", "attr.data-show-actions": "showActions()" }, classAttribute: "solaris-editable-tabs" }, viewQueries: [{ propertyName: "menuComponents", predicate: SolarisDropdownMenuComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"solaris-editable-tabs__wrapper\">\n <solaris-tabs\n [value]=\"$any(value())\"\n (valueChange)=\"onValueChange($event)\"\n [defaultValue]=\"$any(defaultValue())\"\n [orientation]=\"orientation()\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [density]=\"density()\"\n [activationMode]=\"activationMode()\"\n [contentTransition]=\"contentTransition()\"\n [ariaLabel]=\"resolvedAriaLabel()\"\n class=\"solaris-editable-tabs__inner\"\n >\n @for (tab of tabs(); track tab.value; let i = $index) {\n <solaris-tab\n [value]=\"$any(tab.value)\"\n [label]=\"isRenaming(tab) ? undefined : tab.label\"\n [labelKey]=\"isRenaming(tab) ? undefined : tab.labelKey\"\n [icon]=\"tab.icon\"\n [badge]=\"tab.badge\"\n [disabled]=\"tab.disabled ?? false\"\n [attr.data-editable]=\"editable() ? '' : null\"\n [attr.data-has-icon]=\"tab.icon ? '' : null\"\n [attr.data-menu-open]=\"activeMenuIndex() === i ? '' : null\"\n >\n @if (isRenaming(tab)) {\n <span class=\"solaris-editable-tabs__rename-wrapper\">\n <input\n #renameInput\n class=\"solaris-editable-tabs__rename-input\"\n [value]=\"renameValue()\"\n (input)=\"renameValue.set($any($event).target.value)\"\n (keydown)=\"onRenameKeydown($event, tab)\"\n (blur)=\"onRenameBlur(tab)\"\n [attr.aria-label]=\"\n resolveText('solaris.editableTabs.confirmRename') ??\n 'Confirm rename'\n \"\n />\n </span>\n } @else if (hasActions(tab)) {\n <span\n class=\"solaris-editable-tabs__action-area\"\n [class.solaris-editable-tabs__action-area--visible]=\"\n showActions() === 'always'\n \"\n [class.solaris-editable-tabs__action-area--replaces-icon]=\"\n !!tab.icon\n \"\n >\n <button\n class=\"solaris-editable-tabs__action-trigger\"\n solaris-dropdown-menu-trigger\n [solarisDropdownMenuTriggerFor]=\"tabMenuRefs()[i]\"\n [solarisDropdownMenuPlacement]=\"'bottom'\"\n [solarisDropdownMenuAlign]=\"'start'\"\n [solarisDropdownMenuOffset]=\"4\"\n [solarisDropdownMenuRestoreFocus]=\"true\"\n [solarisDropdownMenuOpen]=\"activeMenuIndex() === i\"\n (menuOpened)=\"activeMenuIndex.set(i)\"\n (menuClosed)=\"activeMenuIndex.set(null)\"\n [attr.aria-label]=\"\n resolveText('solaris.editableTabs.tabActions') ?? 'Tab actions'\n \"\n tabindex=\"0\"\n type=\"button\"\n >\n <solaris-icon name=\"ellipses\" [decorative]=\"true\" />\n </button>\n </span>\n }\n </solaris-tab>\n }\n\n @for (tab of tabs(); track tab.value) {\n <solaris-tab-panel [value]=\"$any(tab.value)\" [lazy]=\"true\">\n @if (getContentTemplate(tab); as tmpl) {\n <ng-container [ngTemplateOutlet]=\"tmpl\" />\n }\n </solaris-tab-panel>\n }\n </solaris-tabs>\n</div>\n\n@for (tab of tabs(); track tab.value; let i = $index) {\n <solaris-dropdown-menu>\n @if (canRename(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"resolveText('solaris.editableTabs.rename') ?? 'Rename'\"\n icon=\"edit\"\n (itemSelected)=\"startRename(tab)\"\n />\n }\n @if (canSetDefault(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"\n resolveText('solaris.editableTabs.setAsDefault') ?? 'Set as default'\n \"\n icon=\"check\"\n (itemSelected)=\"setAsDefault(tab)\"\n />\n }\n @if (canMoveLeft(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"moveLabel('left')\"\n [icon]=\"moveIcon('left')\"\n (itemSelected)=\"\n moveTab(tab, i, orientation() === 'vertical' ? 'up' : 'left')\n \"\n />\n }\n @if (canMoveRight(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"moveLabel('right')\"\n [icon]=\"moveIcon('right')\"\n (itemSelected)=\"\n moveTab(tab, i, orientation() === 'vertical' ? 'down' : 'right')\n \"\n />\n }\n @if (tab.customActions?.length) {\n @for (action of tab.customActions; track action.id) {\n @if (!action.disabled) {\n <solaris-dropdown-menu-item\n [label]=\"action.label ?? ''\"\n [labelKey]=\"action.labelKey\"\n [icon]=\"action.icon\"\n [color]=\"action.color ?? 'neutral'\"\n (itemSelected)=\"handleCustomAction(tab, action)\"\n />\n }\n }\n }\n @if (canRemove(tab)) {\n <solaris-divider />\n <solaris-dropdown-menu-item\n [label]=\"resolveText('solaris.editableTabs.remove') ?? 'Remove'\"\n icon=\"x\"\n color=\"danger\"\n (itemSelected)=\"confirmRemove(tab, i)\"\n />\n }\n </solaris-dropdown-menu>\n}\n", styles: [":host{--solaris-editable-tabs-action-size: var(--solaris-spacing-5);--solaris-editable-tabs-action-radius: var(--solaris-radius-sm);--solaris-editable-tabs-action-color: var(--solaris-text-muted);--solaris-editable-tabs-action-hover-color: var(--solaris-text-default);--solaris-editable-tabs-action-hover-background: var( --solaris-surface-subtle );--solaris-editable-tabs-rename-input-min-width: var(--solaris-spacing-20);--solaris-editable-tabs-rename-input-padding: var(--solaris-spacing-1);--solaris-editable-tabs-rename-input-radius: var(--solaris-radius-sm);--solaris-editable-tabs-rename-input-font-size: inherit;--solaris-editable-tabs-rename-input-border-color: var( --solaris-primary-base );--solaris-editable-tabs-rename-input-background: var(--solaris-surface-base);display:block;width:100%}.solaris-editable-tabs__wrapper{position:relative;width:100%}.solaris-editable-tabs__action-area{display:inline-flex;align-items:center;justify-content:center;opacity:0;transition:opacity var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}.solaris-editable-tabs__action-area--visible{opacity:1}:host([data-show-actions=always]) .solaris-editable-tabs__action-area{opacity:1}:host ::ng-deep solaris-tab[data-editable]:hover .solaris-editable-tabs__action-area{opacity:1}:host ::ng-deep solaris-tab[data-editable]:focus-within .solaris-editable-tabs__action-area{opacity:1}:host ::ng-deep .solaris-editable-tabs__action-area--replaces-icon{display:none;order:-1}:host ::ng-deep .solaris-editable-tabs__action-area--replaces-icon .solaris-editable-tabs__action-trigger{width:var(--solaris-tab-icon-size);height:var(--solaris-tab-icon-size)}:host ::ng-deep solaris-tab[data-has-icon]:hover .solaris-editable-tabs__action-area--replaces-icon,:host ::ng-deep solaris-tab[data-has-icon]:focus-within .solaris-editable-tabs__action-area--replaces-icon{display:inline-flex}:host ::ng-deep solaris-tab[data-has-icon]:hover .solaris-tab__icon,:host ::ng-deep solaris-tab[data-has-icon]:focus-within .solaris-tab__icon{display:none}:host ::ng-deep solaris-tab[data-has-icon][data-menu-open] .solaris-editable-tabs__action-area--replaces-icon{display:inline-flex}:host ::ng-deep solaris-tab[data-has-icon][data-menu-open] .solaris-tab__icon{display:none}:host([data-show-actions=always]) ::ng-deep .solaris-editable-tabs__action-area--replaces-icon{display:inline-flex}:host([data-show-actions=always]) ::ng-deep solaris-tab[data-has-icon] .solaris-tab__icon{display:none}.solaris-editable-tabs__action-trigger{display:inline-flex;align-items:center;justify-content:center;width:var(--solaris-editable-tabs-action-size);height:var(--solaris-editable-tabs-action-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--solaris-editable-tabs-action-color);border-radius:var(--solaris-editable-tabs-action-radius);transition:color var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard),background var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard);line-height:0}.solaris-editable-tabs__action-trigger:hover,.solaris-editable-tabs__action-trigger:focus-visible{color:var(--solaris-editable-tabs-action-hover-color);background:var(--solaris-editable-tabs-action-hover-background)}.solaris-editable-tabs__action-trigger:focus-visible{outline:var(--solaris-border-width-md) solid var(--solaris-primary-base);outline-offset:var(--solaris-border-width-sm)}.solaris-editable-tabs__rename-wrapper{display:inline-flex;align-items:center}.solaris-editable-tabs__rename-input{min-width:var(--solaris-editable-tabs-rename-input-min-width);padding:var(--solaris-editable-tabs-rename-input-padding);border:var(--solaris-border-width-sm) solid var(--solaris-editable-tabs-rename-input-border-color);border-radius:var(--solaris-editable-tabs-rename-input-radius);background:var(--solaris-editable-tabs-rename-input-background);font:var(--solaris-font-weight-regular) var(--solaris-editable-tabs-rename-input-font-size)/1.2 var(--solaris-font-family-sans);color:inherit;outline:none;box-sizing:border-box}.solaris-editable-tabs__rename-input:focus{box-shadow:0 0 0 var(--solaris-border-width-sm) var(--solaris-primary-base-alpha)}@media(prefers-reduced-motion:reduce){.solaris-editable-tabs__action-area,.solaris-editable-tabs__action-trigger{transition:none}}:host-context([data-reduced-motion=true]) .solaris-editable-tabs__action-area{transition:none}:host-context([data-reduced-motion=true]) .solaris-editable-tabs__action-trigger{transition:none}\n"], dependencies: [{ kind: "component", type: SolarisTabsComponent, selector: "solaris-tabs", inputs: ["value", "defaultValue", "orientation", "appearance", "size", "density", "activationMode", "contentTransition", "fullWidth", "fitContent", "scrollable", "showIndicator", "disabled", "ariaLabel", "ariaLabelKey"], outputs: ["valueChange", "tabChange", "tabClick"] }, { kind: "component", type: SolarisTabComponent, selector: "solaris-tab", inputs: ["disabled", "value", "iconDecorative", "icon", "label", "labelKey", "ariaLabel", "badgeLabel", "ariaLabelKey", "badgeLabelKey", "badge"] }, { kind: "component", type: SolarisTabPanelComponent, selector: "solaris-tab-panel", inputs: ["value", "lazy"] }, { kind: "component", type: SolarisIconComponent, selector: "solaris-icon", inputs: ["name", "ariaLabel", "decorative"] }, { kind: "component", type: SolarisDropdownMenuComponent, selector: "solaris-dropdown-menu", inputs: ["size", "density"] }, { kind: "component", type: SolarisDropdownMenuItemComponent, selector: "solaris-dropdown-menu-item", inputs: ["color", "type", "closeOnSelect", "descriptionKey", "description", "checked", "labelKey", "shortcut", "label", "icon", "iconDecorative", "value", "disabled"], outputs: ["itemSelected"] }, { kind: "directive", type: SolarisDropdownMenuTriggerDirective, selector: "[solaris-dropdown-menu-trigger]", inputs: ["solarisDropdownMenuTriggerFor", "solarisDropdownMenuOpen", "solarisDropdownMenuDisabled", "solarisDropdownMenuPlacement", "solarisDropdownMenuAlign", "solarisDropdownMenuOffset", "solarisDropdownMenuAppearance", "solarisDropdownMenuRadius", "solarisDropdownMenuCloseOnSelect", "solarisDropdownMenuCloseOnEscape", "solarisDropdownMenuCloseOnOutsideClick", "solarisDropdownMenuMatchTriggerWidth", "solarisDropdownMenuMinWidth", "solarisDropdownMenuMaxWidth", "solarisDropdownMenuRestoreFocus", "solarisDropdownMenuScrollStrategy"], outputs: ["menuOpened", "menuClosed", "openChange"] }, { kind: "component", type: SolarisDividerComponent, selector: "solaris-divider", inputs: ["orientation", "appearance", "spacing", "inset", "decorative", "width", "height"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
301
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisEditableTabsComponent, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{ selector: 'solaris-editable-tabs', standalone: true, imports: [
|
|
305
|
+
SolarisTabsComponent,
|
|
306
|
+
SolarisTabComponent,
|
|
307
|
+
SolarisTabPanelComponent,
|
|
308
|
+
SolarisIconComponent,
|
|
309
|
+
SolarisDropdownMenuComponent,
|
|
310
|
+
SolarisDropdownMenuItemComponent,
|
|
311
|
+
SolarisDropdownMenuTriggerDirective,
|
|
312
|
+
SolarisDividerComponent,
|
|
313
|
+
NgTemplateOutlet,
|
|
314
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
315
|
+
class: 'solaris-editable-tabs',
|
|
316
|
+
'[attr.data-orientation]': 'orientation()',
|
|
317
|
+
'[attr.data-appearance]': 'appearance()',
|
|
318
|
+
'[attr.data-size]': 'size()',
|
|
319
|
+
'[attr.data-density]': 'density()',
|
|
320
|
+
'[attr.data-show-actions]': 'showActions()',
|
|
321
|
+
}, template: "<div class=\"solaris-editable-tabs__wrapper\">\n <solaris-tabs\n [value]=\"$any(value())\"\n (valueChange)=\"onValueChange($event)\"\n [defaultValue]=\"$any(defaultValue())\"\n [orientation]=\"orientation()\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [density]=\"density()\"\n [activationMode]=\"activationMode()\"\n [contentTransition]=\"contentTransition()\"\n [ariaLabel]=\"resolvedAriaLabel()\"\n class=\"solaris-editable-tabs__inner\"\n >\n @for (tab of tabs(); track tab.value; let i = $index) {\n <solaris-tab\n [value]=\"$any(tab.value)\"\n [label]=\"isRenaming(tab) ? undefined : tab.label\"\n [labelKey]=\"isRenaming(tab) ? undefined : tab.labelKey\"\n [icon]=\"tab.icon\"\n [badge]=\"tab.badge\"\n [disabled]=\"tab.disabled ?? false\"\n [attr.data-editable]=\"editable() ? '' : null\"\n [attr.data-has-icon]=\"tab.icon ? '' : null\"\n [attr.data-menu-open]=\"activeMenuIndex() === i ? '' : null\"\n >\n @if (isRenaming(tab)) {\n <span class=\"solaris-editable-tabs__rename-wrapper\">\n <input\n #renameInput\n class=\"solaris-editable-tabs__rename-input\"\n [value]=\"renameValue()\"\n (input)=\"renameValue.set($any($event).target.value)\"\n (keydown)=\"onRenameKeydown($event, tab)\"\n (blur)=\"onRenameBlur(tab)\"\n [attr.aria-label]=\"\n resolveText('solaris.editableTabs.confirmRename') ??\n 'Confirm rename'\n \"\n />\n </span>\n } @else if (hasActions(tab)) {\n <span\n class=\"solaris-editable-tabs__action-area\"\n [class.solaris-editable-tabs__action-area--visible]=\"\n showActions() === 'always'\n \"\n [class.solaris-editable-tabs__action-area--replaces-icon]=\"\n !!tab.icon\n \"\n >\n <button\n class=\"solaris-editable-tabs__action-trigger\"\n solaris-dropdown-menu-trigger\n [solarisDropdownMenuTriggerFor]=\"tabMenuRefs()[i]\"\n [solarisDropdownMenuPlacement]=\"'bottom'\"\n [solarisDropdownMenuAlign]=\"'start'\"\n [solarisDropdownMenuOffset]=\"4\"\n [solarisDropdownMenuRestoreFocus]=\"true\"\n [solarisDropdownMenuOpen]=\"activeMenuIndex() === i\"\n (menuOpened)=\"activeMenuIndex.set(i)\"\n (menuClosed)=\"activeMenuIndex.set(null)\"\n [attr.aria-label]=\"\n resolveText('solaris.editableTabs.tabActions') ?? 'Tab actions'\n \"\n tabindex=\"0\"\n type=\"button\"\n >\n <solaris-icon name=\"ellipses\" [decorative]=\"true\" />\n </button>\n </span>\n }\n </solaris-tab>\n }\n\n @for (tab of tabs(); track tab.value) {\n <solaris-tab-panel [value]=\"$any(tab.value)\" [lazy]=\"true\">\n @if (getContentTemplate(tab); as tmpl) {\n <ng-container [ngTemplateOutlet]=\"tmpl\" />\n }\n </solaris-tab-panel>\n }\n </solaris-tabs>\n</div>\n\n@for (tab of tabs(); track tab.value; let i = $index) {\n <solaris-dropdown-menu>\n @if (canRename(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"resolveText('solaris.editableTabs.rename') ?? 'Rename'\"\n icon=\"edit\"\n (itemSelected)=\"startRename(tab)\"\n />\n }\n @if (canSetDefault(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"\n resolveText('solaris.editableTabs.setAsDefault') ?? 'Set as default'\n \"\n icon=\"check\"\n (itemSelected)=\"setAsDefault(tab)\"\n />\n }\n @if (canMoveLeft(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"moveLabel('left')\"\n [icon]=\"moveIcon('left')\"\n (itemSelected)=\"\n moveTab(tab, i, orientation() === 'vertical' ? 'up' : 'left')\n \"\n />\n }\n @if (canMoveRight(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"moveLabel('right')\"\n [icon]=\"moveIcon('right')\"\n (itemSelected)=\"\n moveTab(tab, i, orientation() === 'vertical' ? 'down' : 'right')\n \"\n />\n }\n @if (tab.customActions?.length) {\n @for (action of tab.customActions; track action.id) {\n @if (!action.disabled) {\n <solaris-dropdown-menu-item\n [label]=\"action.label ?? ''\"\n [labelKey]=\"action.labelKey\"\n [icon]=\"action.icon\"\n [color]=\"action.color ?? 'neutral'\"\n (itemSelected)=\"handleCustomAction(tab, action)\"\n />\n }\n }\n }\n @if (canRemove(tab)) {\n <solaris-divider />\n <solaris-dropdown-menu-item\n [label]=\"resolveText('solaris.editableTabs.remove') ?? 'Remove'\"\n icon=\"x\"\n color=\"danger\"\n (itemSelected)=\"confirmRemove(tab, i)\"\n />\n }\n </solaris-dropdown-menu>\n}\n", styles: [":host{--solaris-editable-tabs-action-size: var(--solaris-spacing-5);--solaris-editable-tabs-action-radius: var(--solaris-radius-sm);--solaris-editable-tabs-action-color: var(--solaris-text-muted);--solaris-editable-tabs-action-hover-color: var(--solaris-text-default);--solaris-editable-tabs-action-hover-background: var( --solaris-surface-subtle );--solaris-editable-tabs-rename-input-min-width: var(--solaris-spacing-20);--solaris-editable-tabs-rename-input-padding: var(--solaris-spacing-1);--solaris-editable-tabs-rename-input-radius: var(--solaris-radius-sm);--solaris-editable-tabs-rename-input-font-size: inherit;--solaris-editable-tabs-rename-input-border-color: var( --solaris-primary-base );--solaris-editable-tabs-rename-input-background: var(--solaris-surface-base);display:block;width:100%}.solaris-editable-tabs__wrapper{position:relative;width:100%}.solaris-editable-tabs__action-area{display:inline-flex;align-items:center;justify-content:center;opacity:0;transition:opacity var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}.solaris-editable-tabs__action-area--visible{opacity:1}:host([data-show-actions=always]) .solaris-editable-tabs__action-area{opacity:1}:host ::ng-deep solaris-tab[data-editable]:hover .solaris-editable-tabs__action-area{opacity:1}:host ::ng-deep solaris-tab[data-editable]:focus-within .solaris-editable-tabs__action-area{opacity:1}:host ::ng-deep .solaris-editable-tabs__action-area--replaces-icon{display:none;order:-1}:host ::ng-deep .solaris-editable-tabs__action-area--replaces-icon .solaris-editable-tabs__action-trigger{width:var(--solaris-tab-icon-size);height:var(--solaris-tab-icon-size)}:host ::ng-deep solaris-tab[data-has-icon]:hover .solaris-editable-tabs__action-area--replaces-icon,:host ::ng-deep solaris-tab[data-has-icon]:focus-within .solaris-editable-tabs__action-area--replaces-icon{display:inline-flex}:host ::ng-deep solaris-tab[data-has-icon]:hover .solaris-tab__icon,:host ::ng-deep solaris-tab[data-has-icon]:focus-within .solaris-tab__icon{display:none}:host ::ng-deep solaris-tab[data-has-icon][data-menu-open] .solaris-editable-tabs__action-area--replaces-icon{display:inline-flex}:host ::ng-deep solaris-tab[data-has-icon][data-menu-open] .solaris-tab__icon{display:none}:host([data-show-actions=always]) ::ng-deep .solaris-editable-tabs__action-area--replaces-icon{display:inline-flex}:host([data-show-actions=always]) ::ng-deep solaris-tab[data-has-icon] .solaris-tab__icon{display:none}.solaris-editable-tabs__action-trigger{display:inline-flex;align-items:center;justify-content:center;width:var(--solaris-editable-tabs-action-size);height:var(--solaris-editable-tabs-action-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--solaris-editable-tabs-action-color);border-radius:var(--solaris-editable-tabs-action-radius);transition:color var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard),background var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard);line-height:0}.solaris-editable-tabs__action-trigger:hover,.solaris-editable-tabs__action-trigger:focus-visible{color:var(--solaris-editable-tabs-action-hover-color);background:var(--solaris-editable-tabs-action-hover-background)}.solaris-editable-tabs__action-trigger:focus-visible{outline:var(--solaris-border-width-md) solid var(--solaris-primary-base);outline-offset:var(--solaris-border-width-sm)}.solaris-editable-tabs__rename-wrapper{display:inline-flex;align-items:center}.solaris-editable-tabs__rename-input{min-width:var(--solaris-editable-tabs-rename-input-min-width);padding:var(--solaris-editable-tabs-rename-input-padding);border:var(--solaris-border-width-sm) solid var(--solaris-editable-tabs-rename-input-border-color);border-radius:var(--solaris-editable-tabs-rename-input-radius);background:var(--solaris-editable-tabs-rename-input-background);font:var(--solaris-font-weight-regular) var(--solaris-editable-tabs-rename-input-font-size)/1.2 var(--solaris-font-family-sans);color:inherit;outline:none;box-sizing:border-box}.solaris-editable-tabs__rename-input:focus{box-shadow:0 0 0 var(--solaris-border-width-sm) var(--solaris-primary-base-alpha)}@media(prefers-reduced-motion:reduce){.solaris-editable-tabs__action-area,.solaris-editable-tabs__action-trigger{transition:none}}:host-context([data-reduced-motion=true]) .solaris-editable-tabs__action-area{transition:none}:host-context([data-reduced-motion=true]) .solaris-editable-tabs__action-trigger{transition:none}\n"] }]
|
|
322
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], activationMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "activationMode", required: false }] }], contentTransition: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentTransition", required: false }] }], tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: true }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], renamable: [{ type: i0.Input, args: [{ isSignal: true, alias: "renamable", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], movable: [{ type: i0.Input, args: [{ isSignal: true, alias: "movable", required: false }] }], defaultable: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultable", required: false }] }], showActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showActions", required: false }] }], renameOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "renameOnBlur", required: false }] }], minTabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "minTabs", required: false }] }], allowEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmpty", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }], tabContentMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabContentMap", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], tabRenameRequested: [{ type: i0.Output, args: ["tabRenameRequested"] }], tabRename: [{ type: i0.Output, args: ["tabRename"] }], tabRemoveRequested: [{ type: i0.Output, args: ["tabRemoveRequested"] }], tabRemove: [{ type: i0.Output, args: ["tabRemove"] }], tabMoveRequested: [{ type: i0.Output, args: ["tabMoveRequested"] }], tabMove: [{ type: i0.Output, args: ["tabMove"] }], defaultTabChange: [{ type: i0.Output, args: ["defaultTabChange"] }], tabAction: [{ type: i0.Output, args: ["tabAction"] }], menuComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SolarisDropdownMenuComponent), { isSignal: true }] }] } });
|
|
323
|
+
//# sourceMappingURL=editable-tabs.component.js.map
|
package/esm2022/lib/components/navigation/editable-tabs/component/editable-tabs.component.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editable-tabs.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/navigation/editable-tabs/component/editable-tabs.component.ts","../../../../../../../../../packages/angular/src/lib/components/navigation/editable-tabs/component/editable-tabs.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,MAAM,EACN,uBAAuB,EAEvB,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,4BAA4B,GAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OA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QACjC,CAAC;QACD,OAAO,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC;IAC7B,CAAC;IAES,WAAW,CAAC,GAAW;QAC/B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACpD,OAAO,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7C,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;wGAvUU,4BAA4B;4FAA5B,4BAA4B,m7GA6CA,4BAA4B,gECxHrE,gjKAiJA,i+ID5FI,oBAAoB,yUACpB,mBAAmB,2MACnB,wBAAwB,yFACxB,oBAAoB,sGACpB,4BAA4B,+FAC5B,gCAAgC,0QAChC,mCAAmC,6pBACnC,uBAAuB,wJACvB,gBAAgB;;4FAcP,4BAA4B;kBA1BxC,SAAS;+BACE,uBAAuB,cACrB,IAAI,WACP;wBACP,oBAAoB;wBACpB,mBAAmB;wBACnB,wBAAwB;wBACxB,oBAAoB;wBACpB,4BAA4B;wBAC5B,gCAAgC;wBAChC,mCAAmC;wBACnC,uBAAuB;wBACvB,gBAAgB;qBACjB,mBAGgB,uBAAuB,CAAC,MAAM,QACzC;wBACJ,KAAK,EAAE,uBAAuB;wBAC9B,yBAAyB,EAAE,eAAe;wBAC1C,wBAAwB,EAAE,cAAc;wBACxC,kBAAkB,EAAE,QAAQ;wBAC5B,qBAAqB,EAAE,WAAW;wBAClC,0BAA0B,EAAE,eAAe;qBAC5C;2vFA+CsC,4BAA4B","sourcesContent":["import {\n Component,\n input,\n output,\n model,\n computed,\n signal,\n viewChildren,\n inject,\n ChangeDetectionStrategy,\n TemplateRef,\n NgZone,\n effect,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\nimport { SolarisTranslateService } from '../../../../services/translation';\nimport {\n SolarisTabPanelComponent,\n SolarisTabsComponent,\n SolarisTabComponent,\n} from '../../tabs';\nimport {\n SolarisDropdownMenuTriggerDirective,\n SolarisDropdownMenuItemComponent,\n SolarisDropdownMenuComponent,\n} from '../../../interaction/dropdown-menu';\nimport { SolarisDividerComponent } from '../../../data-display/divider';\nimport { SolarisIconComponent } from '../../../icon';\n\nimport type {\n SolarisEditableTabData,\n SolarisEditableTabAction,\n SolarisEditableTabRenameEvent,\n SolarisEditableTabRemoveEvent,\n SolarisEditableTabMoveEvent,\n SolarisEditableTabDefaultChangeEvent,\n SolarisEditableTabActionEvent,\n SolarisEditableTabMoveDirection,\n SolarisEditableTabsOrientation,\n SolarisEditableTabsAppearance,\n SolarisEditableTabsSize,\n SolarisEditableTabsDensity,\n SolarisEditableTabsActivationMode,\n SolarisEditableTabsContentTransition,\n SolarisEditableTabsShowActions,\n SolarisEditableTabsRenameOnBlur,\n} from '../model/editable-tabs.types';\n\n@Component({\n selector: 'solaris-editable-tabs',\n standalone: true,\n imports: [\n SolarisTabsComponent,\n SolarisTabComponent,\n SolarisTabPanelComponent,\n SolarisIconComponent,\n SolarisDropdownMenuComponent,\n SolarisDropdownMenuItemComponent,\n SolarisDropdownMenuTriggerDirective,\n SolarisDividerComponent,\n NgTemplateOutlet,\n ],\n templateUrl: './editable-tabs.component.html',\n styleUrls: ['./editable-tabs.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'solaris-editable-tabs',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-appearance]': 'appearance()',\n '[attr.data-size]': 'size()',\n '[attr.data-density]': 'density()',\n '[attr.data-show-actions]': 'showActions()',\n },\n})\nexport class SolarisEditableTabsComponent {\n private readonly translateService = inject(SolarisTranslateService, {\n optional: true,\n });\n private readonly ngZone = inject(NgZone);\n\n readonly value = model<unknown>(undefined);\n readonly defaultValue = input<unknown>(undefined);\n readonly orientation = input<SolarisEditableTabsOrientation>('horizontal');\n readonly appearance = input<SolarisEditableTabsAppearance>('underline');\n readonly size = input<SolarisEditableTabsSize>('md');\n readonly density = input<SolarisEditableTabsDensity>('comfortable');\n readonly activationMode =\n input<SolarisEditableTabsActivationMode>('automatic');\n readonly contentTransition =\n input<SolarisEditableTabsContentTransition>('slide');\n\n readonly tabs = input.required<SolarisEditableTabData[]>();\n\n readonly editable = input<boolean>(true);\n readonly renamable = input<boolean>(true);\n readonly removable = input<boolean>(true);\n readonly movable = input<boolean>(true);\n readonly defaultable = input<boolean>(true);\n readonly showActions = input<SolarisEditableTabsShowActions>('focus-hover');\n readonly renameOnBlur = input<SolarisEditableTabsRenameOnBlur>('confirm');\n readonly minTabs = input<number>(1);\n readonly allowEmpty = input<boolean>(false);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelKey = input<string | undefined>(undefined);\n\n readonly tabContentMap = input<Record<string, TemplateRef<void>> | undefined>(\n undefined,\n );\n\n readonly valueChange = output<unknown>();\n readonly tabRenameRequested = output<SolarisEditableTabRenameEvent>();\n readonly tabRename = output<SolarisEditableTabRenameEvent>();\n readonly tabRemoveRequested = output<SolarisEditableTabRemoveEvent>();\n readonly tabRemove = output<SolarisEditableTabRemoveEvent>();\n readonly tabMoveRequested = output<SolarisEditableTabMoveEvent>();\n readonly tabMove = output<SolarisEditableTabMoveEvent>();\n readonly defaultTabChange = output<SolarisEditableTabDefaultChangeEvent>();\n readonly tabAction = output<SolarisEditableTabActionEvent>();\n\n readonly menuComponents = viewChildren(SolarisDropdownMenuComponent);\n readonly tabMenuRefs = computed(() => {\n this.tabs();\n return this.menuComponents();\n });\n\n protected readonly activeMenuIndex = signal<number | null>(null);\n protected readonly renamingTabId = signal<unknown | null>(null);\n protected readonly renameValue = signal<string>('');\n protected readonly defaultTabValue = signal<unknown>(undefined);\n\n protected readonly resolvedAriaLabel = computed(() => {\n if (this.ariaLabel()) return this.ariaLabel();\n const key = this.ariaLabelKey();\n if (key && this.translateService) {\n return this.translateService.translate(key);\n }\n return key ?? 'Editable tabs';\n });\n\n constructor() {\n effect(() => {\n const defaultValue = this.defaultValue();\n const currentValue = this.value();\n if (currentValue === undefined && defaultValue !== undefined) {\n this.value.set(defaultValue);\n }\n });\n }\n\n protected onValueChange(newValue: unknown): void {\n this.value.set(newValue);\n this.valueChange.emit(newValue);\n }\n\n protected hasActions(tab: SolarisEditableTabData): boolean {\n if (!this.editable()) return false;\n if (tab.disabled) return false;\n return (\n this.canRename(tab) ||\n this.canSetDefault(tab) ||\n this.canMoveLeft(tab) ||\n this.canMoveRight(tab) ||\n this.canRemove(tab) ||\n (tab.customActions?.length ?? 0) > 0\n );\n }\n\n protected canRename(tab: SolarisEditableTabData): boolean {\n if (!this.renamable()) return false;\n if (tab.locked && tab.renamable !== true) return false;\n return tab.renamable !== false;\n }\n\n protected canRemove(tab: SolarisEditableTabData): boolean {\n if (!this.removable()) return false;\n if (tab.locked && tab.removable !== true) return false;\n if (tab.removable === false) return false;\n if (tab.disabled) return false;\n return !(!this.allowEmpty() && this.tabs().length <= this.minTabs());\n }\n\n protected canMoveLeft(tab: SolarisEditableTabData): boolean {\n if (!this.movable()) return false;\n if (tab.locked && tab.movable !== true) return false;\n if (tab.movable === false) return false;\n if (tab.disabled) return false;\n const idx = this.tabs().indexOf(tab);\n if (idx <= 0) return false;\n for (let i = idx - 1; i >= 0; i--) {\n if (!this.tabs()[i].locked) return true;\n }\n return false;\n }\n\n protected canMoveRight(tab: SolarisEditableTabData): boolean {\n if (!this.movable()) return false;\n if (tab.locked && tab.movable !== true) return false;\n if (tab.movable === false) return false;\n if (tab.disabled) return false;\n const idx = this.tabs().indexOf(tab);\n if (idx < 0 || idx >= this.tabs().length - 1) return false;\n for (let i = idx + 1; i < this.tabs().length; i++) {\n if (!this.tabs()[i].locked) return true;\n }\n return false;\n }\n\n protected canSetDefault(tab: SolarisEditableTabData): boolean {\n if (!this.defaultable()) return false;\n if (tab.locked && tab.defaultable !== true) return false;\n if (tab.defaultable === false) return false;\n return !tab.disabled;\n }\n\n protected startRename(tab: SolarisEditableTabData): void {\n this.activeMenuIndex.set(null);\n this.renamingTabId.set(tab.value);\n this.renameValue.set(tab.label ?? '');\n this.ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n // SECURITY_EXCEPTION: document.querySelector required to find rename input. SSR-safe via guard.\n const input = document.querySelector(\n `.solaris-editable-tabs__rename-input`,\n ) as HTMLInputElement | null;\n if (input) {\n input.focus();\n input.select();\n }\n });\n });\n }\n\n protected commitRename(tab: SolarisEditableTabData): void {\n const previousLabel = tab.label ?? '';\n const nextLabel = this.renameValue().trim();\n\n if (nextLabel === '') {\n this.renamingTabId.set(null);\n return;\n }\n\n if (nextLabel === previousLabel) {\n this.renamingTabId.set(null);\n return;\n }\n\n const event: SolarisEditableTabRenameEvent = {\n value: tab.value,\n previousLabel,\n nextLabel,\n source: 'inline',\n };\n\n this.tabRenameRequested.emit(event);\n this.tabRename.emit(event);\n this.renamingTabId.set(null);\n }\n\n protected cancelRename(): void {\n this.renamingTabId.set(null);\n }\n\n protected onRenameKeydown(\n event: KeyboardEvent,\n tab: SolarisEditableTabData,\n ): void {\n event.stopPropagation();\n if (event.key === 'Enter') {\n event.preventDefault();\n this.commitRename(tab);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.cancelRename();\n }\n }\n\n protected onRenameBlur(tab: SolarisEditableTabData): void {\n if (this.renameOnBlur() === 'confirm') {\n this.commitRename(tab);\n } else {\n this.cancelRename();\n }\n }\n\n protected confirmRemove(tab: SolarisEditableTabData, index: number): void {\n this.activeMenuIndex.set(null);\n if (!this.canRemove(tab)) return;\n\n const wasActive = this.value() === tab.value;\n\n const event: SolarisEditableTabRemoveEvent = {\n value: tab.value,\n index,\n wasActive,\n };\n\n this.tabRemoveRequested.emit(event);\n this.tabRemove.emit(event);\n }\n\n protected moveLabel(direction: 'left' | 'right'): string {\n if (this.orientation() === 'vertical') {\n const key =\n direction === 'left'\n ? 'solaris.editableTabs.moveUp'\n : 'solaris.editableTabs.moveDown';\n return (\n this.resolveText(key) ??\n (direction === 'left' ? 'Move up' : 'Move down')\n );\n }\n const key =\n direction === 'left'\n ? 'solaris.editableTabs.moveLeft'\n : 'solaris.editableTabs.moveRight';\n return (\n this.resolveText(key) ??\n (direction === 'left' ? 'Move left' : 'Move right')\n );\n }\n\n protected moveIcon(direction: 'left' | 'right'): string {\n if (this.orientation() === 'vertical') {\n return direction === 'left' ? 'chevron-up' : 'chevron-down';\n }\n return direction === 'left' ? 'chevron-left' : 'chevron-right';\n }\n\n protected moveTab(\n tab: SolarisEditableTabData,\n index: number,\n direction: SolarisEditableTabMoveDirection,\n ): void {\n this.activeMenuIndex.set(null);\n const isPrev = direction === 'left' || direction === 'up';\n const nextIndex = isPrev ? index - 1 : index + 1;\n if (nextIndex < 0 || nextIndex >= this.tabs().length) return;\n if (!this.canMoveLeft(tab) && isPrev) return;\n if (!this.canMoveRight(tab) && !isPrev) return;\n\n const event: SolarisEditableTabMoveEvent = {\n value: tab.value,\n previousIndex: index,\n nextIndex,\n direction,\n };\n\n this.tabMoveRequested.emit(event);\n this.tabMove.emit(event);\n }\n\n protected setAsDefault(tab: SolarisEditableTabData): void {\n this.activeMenuIndex.set(null);\n const previousDefaultValue = this.defaultTabValue();\n this.defaultTabValue.set(tab.value);\n\n const event: SolarisEditableTabDefaultChangeEvent = {\n value: tab.value,\n previousDefaultValue:\n previousDefaultValue !== undefined\n ? (previousDefaultValue as unknown)\n : undefined,\n };\n\n this.defaultTabChange.emit(event);\n }\n\n protected handleCustomAction(\n tab: SolarisEditableTabData,\n action: SolarisEditableTabAction,\n ): void {\n this.activeMenuIndex.set(null);\n const event: SolarisEditableTabActionEvent = {\n tabValue: tab.value,\n actionId: action.id,\n action,\n };\n this.tabAction.emit(event);\n }\n\n protected isRenaming(tab: SolarisEditableTabData): boolean {\n return this.renamingTabId() === tab.value;\n }\n\n protected getContentTemplate(\n tab: SolarisEditableTabData,\n ): TemplateRef<void> | null {\n const contentMap = this.tabContentMap();\n if (contentMap) {\n const key = String(tab.value);\n return contentMap[key] ?? null;\n }\n return tab.content ?? null;\n }\n\n protected resolveText(key: string): string | undefined {\n if (this.translateService) {\n const result = this.translateService.translate(key);\n return result !== key ? result : undefined;\n }\n return undefined;\n }\n}\n","<div class=\"solaris-editable-tabs__wrapper\">\n <solaris-tabs\n [value]=\"$any(value())\"\n (valueChange)=\"onValueChange($event)\"\n [defaultValue]=\"$any(defaultValue())\"\n [orientation]=\"orientation()\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [density]=\"density()\"\n [activationMode]=\"activationMode()\"\n [contentTransition]=\"contentTransition()\"\n [ariaLabel]=\"resolvedAriaLabel()\"\n class=\"solaris-editable-tabs__inner\"\n >\n @for (tab of tabs(); track tab.value; let i = $index) {\n <solaris-tab\n [value]=\"$any(tab.value)\"\n [label]=\"isRenaming(tab) ? undefined : tab.label\"\n [labelKey]=\"isRenaming(tab) ? undefined : tab.labelKey\"\n [icon]=\"tab.icon\"\n [badge]=\"tab.badge\"\n [disabled]=\"tab.disabled ?? false\"\n [attr.data-editable]=\"editable() ? '' : null\"\n [attr.data-has-icon]=\"tab.icon ? '' : null\"\n [attr.data-menu-open]=\"activeMenuIndex() === i ? '' : null\"\n >\n @if (isRenaming(tab)) {\n <span class=\"solaris-editable-tabs__rename-wrapper\">\n <input\n #renameInput\n class=\"solaris-editable-tabs__rename-input\"\n [value]=\"renameValue()\"\n (input)=\"renameValue.set($any($event).target.value)\"\n (keydown)=\"onRenameKeydown($event, tab)\"\n (blur)=\"onRenameBlur(tab)\"\n [attr.aria-label]=\"\n resolveText('solaris.editableTabs.confirmRename') ??\n 'Confirm rename'\n \"\n />\n </span>\n } @else if (hasActions(tab)) {\n <span\n class=\"solaris-editable-tabs__action-area\"\n [class.solaris-editable-tabs__action-area--visible]=\"\n showActions() === 'always'\n \"\n [class.solaris-editable-tabs__action-area--replaces-icon]=\"\n !!tab.icon\n \"\n >\n <button\n class=\"solaris-editable-tabs__action-trigger\"\n solaris-dropdown-menu-trigger\n [solarisDropdownMenuTriggerFor]=\"tabMenuRefs()[i]\"\n [solarisDropdownMenuPlacement]=\"'bottom'\"\n [solarisDropdownMenuAlign]=\"'start'\"\n [solarisDropdownMenuOffset]=\"4\"\n [solarisDropdownMenuRestoreFocus]=\"true\"\n [solarisDropdownMenuOpen]=\"activeMenuIndex() === i\"\n (menuOpened)=\"activeMenuIndex.set(i)\"\n (menuClosed)=\"activeMenuIndex.set(null)\"\n [attr.aria-label]=\"\n resolveText('solaris.editableTabs.tabActions') ?? 'Tab actions'\n \"\n tabindex=\"0\"\n type=\"button\"\n >\n <solaris-icon name=\"ellipses\" [decorative]=\"true\" />\n </button>\n </span>\n }\n </solaris-tab>\n }\n\n @for (tab of tabs(); track tab.value) {\n <solaris-tab-panel [value]=\"$any(tab.value)\" [lazy]=\"true\">\n @if (getContentTemplate(tab); as tmpl) {\n <ng-container [ngTemplateOutlet]=\"tmpl\" />\n }\n </solaris-tab-panel>\n }\n </solaris-tabs>\n</div>\n\n@for (tab of tabs(); track tab.value; let i = $index) {\n <solaris-dropdown-menu>\n @if (canRename(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"resolveText('solaris.editableTabs.rename') ?? 'Rename'\"\n icon=\"edit\"\n (itemSelected)=\"startRename(tab)\"\n />\n }\n @if (canSetDefault(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"\n resolveText('solaris.editableTabs.setAsDefault') ?? 'Set as default'\n \"\n icon=\"check\"\n (itemSelected)=\"setAsDefault(tab)\"\n />\n }\n @if (canMoveLeft(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"moveLabel('left')\"\n [icon]=\"moveIcon('left')\"\n (itemSelected)=\"\n moveTab(tab, i, orientation() === 'vertical' ? 'up' : 'left')\n \"\n />\n }\n @if (canMoveRight(tab)) {\n <solaris-dropdown-menu-item\n [label]=\"moveLabel('right')\"\n [icon]=\"moveIcon('right')\"\n (itemSelected)=\"\n moveTab(tab, i, orientation() === 'vertical' ? 'down' : 'right')\n \"\n />\n }\n @if (tab.customActions?.length) {\n @for (action of tab.customActions; track action.id) {\n @if (!action.disabled) {\n <solaris-dropdown-menu-item\n [label]=\"action.label ?? ''\"\n [labelKey]=\"action.labelKey\"\n [icon]=\"action.icon\"\n [color]=\"action.color ?? 'neutral'\"\n (itemSelected)=\"handleCustomAction(tab, action)\"\n />\n }\n }\n }\n @if (canRemove(tab)) {\n <solaris-divider />\n <solaris-dropdown-menu-item\n [label]=\"resolveText('solaris.editableTabs.remove') ?? 'Remove'\"\n icon=\"x\"\n color=\"danger\"\n (itemSelected)=\"confirmRemove(tab, i)\"\n />\n }\n </solaris-dropdown-menu>\n}\n"]}
|
package/esm2022/lib/components/navigation/editable-tabs/editable-tab/editable-tab.component.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component, input, ChangeDetectionStrategy, TemplateRef, contentChild, } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class SolarisEditableTabComponent {
|
|
4
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
5
|
+
locked = input(false, ...(ngDevMode ? [{ debugName: "locked" }] : /* istanbul ignore next */ []));
|
|
6
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
7
|
+
icon = input(undefined, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
8
|
+
label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
9
|
+
labelKey = input(undefined, ...(ngDevMode ? [{ debugName: "labelKey" }] : /* istanbul ignore next */ []));
|
|
10
|
+
movable = input(undefined, ...(ngDevMode ? [{ debugName: "movable" }] : /* istanbul ignore next */ []));
|
|
11
|
+
removable = input(undefined, ...(ngDevMode ? [{ debugName: "removable" }] : /* istanbul ignore next */ []));
|
|
12
|
+
renamable = input(undefined, ...(ngDevMode ? [{ debugName: "renamable" }] : /* istanbul ignore next */ []));
|
|
13
|
+
defaultable = input(undefined, ...(ngDevMode ? [{ debugName: "defaultable" }] : /* istanbul ignore next */ []));
|
|
14
|
+
badge = input(undefined, ...(ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []));
|
|
15
|
+
customActions = input(undefined, ...(ngDevMode ? [{ debugName: "customActions" }] : /* istanbul ignore next */ []));
|
|
16
|
+
content = contentChild(TemplateRef, ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisEditableTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: SolarisEditableTabComponent, isStandalone: true, selector: "solaris-editable-tab", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, locked: { classPropertyName: "locked", publicName: "locked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, movable: { classPropertyName: "movable", publicName: "movable", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, renamable: { classPropertyName: "renamable", publicName: "renamable", isSignal: true, isRequired: false, transformFunction: null }, defaultable: { classPropertyName: "defaultable", publicName: "defaultable", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-value": "value()", "attr.data-locked": "locked() ? \"\" : null" }, classAttribute: "solaris-editable-tab" }, queries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisEditableTabComponent, decorators: [{
|
|
21
|
+
type: Component,
|
|
22
|
+
args: [{
|
|
23
|
+
selector: 'solaris-editable-tab',
|
|
24
|
+
standalone: true,
|
|
25
|
+
template: '',
|
|
26
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
+
host: {
|
|
28
|
+
class: 'solaris-editable-tab',
|
|
29
|
+
'[attr.data-value]': 'value()',
|
|
30
|
+
'[attr.data-locked]': 'locked() ? "" : null',
|
|
31
|
+
},
|
|
32
|
+
}]
|
|
33
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], locked: [{ type: i0.Input, args: [{ isSignal: true, alias: "locked", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], movable: [{ type: i0.Input, args: [{ isSignal: true, alias: "movable", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], renamable: [{ type: i0.Input, args: [{ isSignal: true, alias: "renamable", required: false }] }], defaultable: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultable", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], customActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "customActions", required: false }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
34
|
+
//# sourceMappingURL=editable-tab.component.js.map
|
package/esm2022/lib/components/navigation/editable-tabs/editable-tab/editable-tab.component.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editable-tab.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/navigation/editable-tabs/editable-tab/editable-tab.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,uBAAuB,EACvB,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;;AAevB,MAAM,OAAO,2BAA2B;IAC7B,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAW,CAAC;IAClC,MAAM,GAAG,KAAK,CAAU,KAAK,6EAAC,CAAC;IAC/B,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC,CAAC;IACjC,IAAI,GAAG,KAAK,CAAqB,SAAS,2EAAC,CAAC;IAC5C,KAAK,GAAG,KAAK,CAAqB,SAAS,4EAAC,CAAC;IAC7C,QAAQ,GAAG,KAAK,CAAqB,SAAS,+EAAC,CAAC;IAChD,OAAO,GAAG,KAAK,CAAsB,SAAS,8EAAC,CAAC;IAChD,SAAS,GAAG,KAAK,CAAsB,SAAS,gFAAC,CAAC;IAClD,SAAS,GAAG,KAAK,CAAsB,SAAS,gFAAC,CAAC;IAClD,WAAW,GAAG,KAAK,CAAsB,SAAS,kFAAC,CAAC;IACpD,KAAK,GAAG,KAAK,CAA8B,SAAS,4EAAC,CAAC;IACtD,aAAa,GAAG,KAAK,CAC5B,SAAS,oFACV,CAAC;IAEO,OAAO,GAAG,YAAY,CAAC,WAAW,8EAAC,CAAC;wGAhBlC,2BAA2B;4FAA3B,2BAA2B,wwDAgBN,WAAW,gEAxBjC,EAAE;;4FAQD,2BAA2B;kBAXvC,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;oBAChC,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACJ,KAAK,EAAE,sBAAsB;wBAC7B,mBAAmB,EAAE,SAAS;wBAC9B,oBAAoB,EAAE,sBAAsB;qBAC7C;iBACF;+sCAiBiC,WAAW","sourcesContent":["import {\n Component,\n input,\n ChangeDetectionStrategy,\n TemplateRef,\n contentChild,\n} from '@angular/core';\n\nimport type { SolarisEditableTabAction } from '../model/editable-tabs.types';\n\n@Component({\n selector: 'solaris-editable-tab',\n standalone: true,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'solaris-editable-tab',\n '[attr.data-value]': 'value()',\n '[attr.data-locked]': 'locked() ? \"\" : null',\n },\n})\nexport class SolarisEditableTabComponent {\n readonly value = input.required<unknown>();\n readonly locked = input<boolean>(false);\n readonly disabled = input<boolean>(false);\n readonly icon = input<string | undefined>(undefined);\n readonly label = input<string | undefined>(undefined);\n readonly labelKey = input<string | undefined>(undefined);\n readonly movable = input<boolean | undefined>(undefined);\n readonly removable = input<boolean | undefined>(undefined);\n readonly renamable = input<boolean | undefined>(undefined);\n readonly defaultable = input<boolean | undefined>(undefined);\n readonly badge = input<string | number | undefined>(undefined);\n readonly customActions = input<SolarisEditableTabAction[] | undefined>(\n undefined,\n );\n\n readonly content = contentChild(TemplateRef);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=editable-tabs.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editable-tabs.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/navigation/editable-tabs/model/editable-tabs.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TemplateRef } from '@angular/core';\n\nimport type {\n SolarisTabsOrientation,\n SolarisTabsAppearance,\n SolarisTabsSize,\n SolarisTabsDensity,\n SolarisTabsActivationMode,\n SolarisTabsContentTransition,\n} from '../../tabs';\n\nexport type SolarisEditableTabsOrientation = SolarisTabsOrientation;\nexport type SolarisEditableTabsAppearance = SolarisTabsAppearance;\nexport type SolarisEditableTabsSize = SolarisTabsSize;\nexport type SolarisEditableTabsDensity = SolarisTabsDensity;\nexport type SolarisEditableTabsActivationMode = SolarisTabsActivationMode;\nexport type SolarisEditableTabsContentTransition = SolarisTabsContentTransition;\n\nexport type SolarisEditableTabsShowActions = 'hover' | 'always' | 'focus-hover';\nexport type SolarisEditableTabsRenameOnBlur = 'confirm' | 'cancel';\nexport type SolarisEditableTabMoveDirection = 'left' | 'right' | 'up' | 'down';\n\nexport interface SolarisEditableTabData<TValue = unknown> {\n value: TValue;\n label?: string;\n labelKey?: string;\n icon?: string;\n badge?: string | number;\n disabled?: boolean;\n locked?: boolean;\n renamable?: boolean;\n removable?: boolean;\n movable?: boolean;\n defaultable?: boolean;\n customActions?: SolarisEditableTabAction[];\n content?: TemplateRef<void>;\n}\n\nexport interface SolarisEditableTabAction {\n id: string;\n label?: string;\n labelKey?: string;\n icon?: string;\n color?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';\n disabled?: boolean;\n}\n\nexport interface SolarisEditableTabRenameEvent<TValue = unknown> {\n value: TValue;\n previousLabel: string;\n nextLabel: string;\n source: 'inline' | 'api';\n}\n\nexport interface SolarisEditableTabRemoveEvent<TValue = unknown> {\n value: TValue;\n index: number;\n wasActive: boolean;\n}\n\nexport interface SolarisEditableTabMoveEvent<TValue = unknown> {\n value: TValue;\n previousIndex: number;\n nextIndex: number;\n direction: SolarisEditableTabMoveDirection;\n}\n\nexport interface SolarisEditableTabDefaultChangeEvent<TValue = unknown> {\n value: TValue;\n previousDefaultValue?: TValue;\n}\n\nexport interface SolarisEditableTabActionEvent<TValue = unknown> {\n tabValue: TValue;\n actionId: string;\n action: SolarisEditableTabAction;\n}\n"]}
|