@cuby-ui/core 0.0.325 → 0.0.328
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/components/index.d.ts +1 -0
- package/components/tab/index.d.ts +1 -0
- package/components/tab/tab.component.d.ts +15 -0
- package/components/tabs/index.d.ts +2 -3
- package/components/tabs/services/index.d.ts +1 -0
- package/components/tabs/services/tabs.service.d.ts +14 -0
- package/components/tabs/tabs.component.d.ts +12 -13
- package/components/tabs/tabs.options.d.ts +21 -0
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/components/tab/index.mjs +2 -0
- package/esm2022/components/tab/tab.component.mjs +36 -0
- package/esm2022/components/tabs/index.mjs +3 -4
- package/esm2022/components/tabs/services/index.mjs +2 -0
- package/esm2022/components/tabs/services/tabs.service.mjs +27 -0
- package/esm2022/components/tabs/tabs.component.mjs +32 -37
- package/esm2022/components/tabs/tabs.options.mjs +5 -0
- package/esm2022/widgets/index.mjs +3 -1
- package/esm2022/widgets/select-modal/components/index.mjs +3 -0
- package/esm2022/widgets/select-modal/components/select-modal-folder/index.mjs +2 -0
- package/esm2022/widgets/select-modal/components/select-modal-folder/select-modal-folder.component.mjs +21 -0
- package/esm2022/widgets/select-modal/components/select-modal-search/index.mjs +2 -0
- package/esm2022/widgets/select-modal/components/select-modal-search/select-modal-search.component.mjs +22 -0
- package/esm2022/widgets/select-modal/index.mjs +4 -0
- package/esm2022/widgets/select-modal/select-modal.component.mjs +35 -0
- package/esm2022/widgets/select-modal/select-modal.interfaces.mjs +2 -0
- package/esm2022/widgets/select-modal/select-modal.service.mjs +23 -0
- package/esm2022/widgets/storage-list/components/index.mjs +2 -0
- package/esm2022/widgets/storage-list/components/storage-list-item/index.mjs +2 -0
- package/esm2022/widgets/storage-list/components/storage-list-item/storage-list-item.component.mjs +70 -0
- package/esm2022/widgets/storage-list/index.mjs +3 -0
- package/esm2022/widgets/storage-list/storage-list.component.mjs +17 -0
- package/esm2022/widgets/storage-list/storage-list.options.mjs +3 -0
- package/fesm2022/cuby-ui-core.mjs +234 -63
- package/fesm2022/cuby-ui-core.mjs.map +1 -1
- package/package.json +4 -4
- package/widgets/index.d.ts +2 -0
- package/widgets/select-modal/components/index.d.ts +2 -0
- package/widgets/select-modal/components/select-modal-folder/index.d.ts +1 -0
- package/widgets/select-modal/components/select-modal-folder/select-modal-folder.component.d.ts +10 -0
- package/widgets/select-modal/components/select-modal-search/index.d.ts +1 -0
- package/widgets/select-modal/components/select-modal-search/select-modal-search.component.d.ts +7 -0
- package/widgets/select-modal/index.d.ts +3 -0
- package/widgets/select-modal/select-modal.component.d.ts +13 -0
- package/widgets/select-modal/select-modal.interfaces.d.ts +15 -0
- package/widgets/select-modal/select-modal.service.d.ts +13 -0
- package/widgets/storage-list/components/index.d.ts +1 -0
- package/widgets/storage-list/components/storage-list-item/index.d.ts +1 -0
- package/widgets/storage-list/components/storage-list-item/storage-list-item.component.d.ts +24 -0
- package/widgets/storage-list/index.d.ts +2 -0
- package/widgets/storage-list/storage-list.component.d.ts +10 -0
- package/widgets/storage-list/storage-list.options.d.ts +16 -0
- package/components/tabs/tab/index.d.ts +0 -1
- package/components/tabs/tab/tab.component.d.ts +0 -8
- package/components/tabs/tabs.module.d.ts +0 -8
- package/esm2022/components/tabs/tab/index.mjs +0 -2
- package/esm2022/components/tabs/tab/tab.component.mjs +0 -21
- package/esm2022/components/tabs/tabs.module.mjs +0 -18
package/esm2022/widgets/storage-list/components/storage-list-item/storage-list-item.component.mjs
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, effect, forwardRef, inject, input, signal, untracked } from '@angular/core';
|
|
3
|
+
import { CuiLetDirective } from '@cuby-ui/cdk';
|
|
4
|
+
import { finalize } from 'rxjs';
|
|
5
|
+
import { CuiSvgModule } from '../../../../components/svg';
|
|
6
|
+
import { CuiStorageListComponent } from '../..';
|
|
7
|
+
import { CUI_STORAGE_LIST_SERVICE_TOKEN } from '../../storage-list.options';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../../../../components/svg/svg.component";
|
|
10
|
+
export class CuiStorageListItemComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.storageListService = inject(CUI_STORAGE_LIST_SERVICE_TOKEN);
|
|
13
|
+
this.isLoadingChildren = false;
|
|
14
|
+
this.isLoadingElements = false;
|
|
15
|
+
this.storageChildren = signal([]);
|
|
16
|
+
this.storageElements = signal([]);
|
|
17
|
+
this.areContentOpened = signal(false);
|
|
18
|
+
this.openCloseButtonIcon = computed(() => this.areContentOpened() ? 'cuiIconChevronDown' : 'cuiIconChevronRight');
|
|
19
|
+
this.hasContent = computed(() => this.storage().children.length || this.storageChildren().length || this.storageElements().length);
|
|
20
|
+
this.storage = input.required();
|
|
21
|
+
this.elementSlot = input();
|
|
22
|
+
this.itemSlot = input();
|
|
23
|
+
this.initStorageChildrenEffect();
|
|
24
|
+
this.initStorageElementsEffect();
|
|
25
|
+
}
|
|
26
|
+
onToggleChildren(event) {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
this.areContentOpened.update((prevAreChildrenOpened) => !prevAreChildrenOpened);
|
|
29
|
+
}
|
|
30
|
+
initStorageChildrenEffect() {
|
|
31
|
+
effect(() => {
|
|
32
|
+
const storage = this.storage();
|
|
33
|
+
this.areContentOpened();
|
|
34
|
+
untracked(this.setChildren.bind(this, storage));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
initStorageElementsEffect() {
|
|
38
|
+
effect(() => {
|
|
39
|
+
const storage = this.storage();
|
|
40
|
+
untracked(this.setElements.bind(this, storage));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
setChildren(storage) {
|
|
44
|
+
if (this.isLoadingChildren || !this.areContentOpened() || this.storageChildren().length) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.isLoadingChildren = true;
|
|
48
|
+
this.storageListService
|
|
49
|
+
.getChildren?.(storage, this.storageChildren())
|
|
50
|
+
.pipe(finalize(() => (this.isLoadingChildren = false)))
|
|
51
|
+
.subscribe((response) => this.storageChildren.set(response));
|
|
52
|
+
}
|
|
53
|
+
setElements(storage) {
|
|
54
|
+
if (this.isLoadingElements || this.storageElements().length) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.isLoadingElements = true;
|
|
58
|
+
this.storageListService
|
|
59
|
+
.getElements?.(storage, this.storageElements())
|
|
60
|
+
.pipe(finalize(() => (this.isLoadingElements = false)))
|
|
61
|
+
.subscribe((response) => this.storageElements.set(response));
|
|
62
|
+
}
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiStorageListItemComponent, isStandalone: true, selector: "li[cuiStorageListItem]", inputs: { storage: { classPropertyName: "storage", publicName: "storage", isSignal: true, isRequired: true, transformFunction: null }, elementSlot: { classPropertyName: "elementSlot", publicName: "elementSlot", isSignal: true, isRequired: false, transformFunction: null }, itemSlot: { classPropertyName: "itemSlot", publicName: "itemSlot", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *cuiLet=\"storage() as storage\">\n <div class=\"wrapper\">\n <ng-template #openCloseButton>\n @if (hasContent()) {\n <button\n type=\"button\"\n class=\"button\"\n (click)=\"onToggleChildren($event)\"\n >\n <cui-svg\n [icon]=\"openCloseButtonIcon()\"\n color=\"var(--cui-base-500)\"\n />\n </button>\n }\n </ng-template>\n\n @if (itemSlot(); as item) {\n <ng-container\n *ngTemplateOutlet=\"\n item;\n context: {\n $implicit: storage,\n openCloseButton,\n areContentOpened: areContentOpened(),\n hasContent: hasContent()\n }\n \"\n />\n }\n\n <div\n class=\"content\"\n [class.content_hidden]=\"!areContentOpened()\"\n >\n <div class=\"lists\">\n @if (storageChildren().length) {\n <cui-storage-list\n [storages]=\"storageChildren()\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n />\n }\n @if (storageElements().length && elementSlot()) {\n <ul class=\"list\">\n @for (element of storageElements(); track element.id) {\n <li class=\"item\">\n <ng-container\n *ngTemplateOutlet=\"\n elementSlot()!;\n context: { $implicit: element, storage: storage }\n \"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".button{padding:2px;display:flex;border-radius:4px}@media (hover: hover){.button:hover{background:var(--cui-base-200)}}.button :active{background:var(--cui-base-200)}.icon{padding:2px}.wrapper{display:flex;flex-direction:column;gap:8px}.content{padding-left:20px}.content_hidden{display:none}.lists{display:flex;flex-direction:column;gap:8px;position:relative}.lists>*{z-index:1}.lists:has(>:nth-child(2)):before{content:\"\";position:absolute;top:0;bottom:0;left:8px;width:1px;background:var(--cui-base-200)}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => CuiLetDirective), selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "ngmodule", type: i0.forwardRef(() => CuiSvgModule) }, { kind: "component", type: i0.forwardRef(() => i1.CuiSvgComponent), selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => CuiStorageListComponent), selector: "cui-storage-list", inputs: ["storages", "elementSlot", "itemSlot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListItemComponent, decorators: [{
|
|
67
|
+
type: Component,
|
|
68
|
+
args: [{ selector: 'li[cuiStorageListItem]', imports: [CuiLetDirective, CuiSvgModule, NgTemplateOutlet, forwardRef(() => CuiStorageListComponent)], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *cuiLet=\"storage() as storage\">\n <div class=\"wrapper\">\n <ng-template #openCloseButton>\n @if (hasContent()) {\n <button\n type=\"button\"\n class=\"button\"\n (click)=\"onToggleChildren($event)\"\n >\n <cui-svg\n [icon]=\"openCloseButtonIcon()\"\n color=\"var(--cui-base-500)\"\n />\n </button>\n }\n </ng-template>\n\n @if (itemSlot(); as item) {\n <ng-container\n *ngTemplateOutlet=\"\n item;\n context: {\n $implicit: storage,\n openCloseButton,\n areContentOpened: areContentOpened(),\n hasContent: hasContent()\n }\n \"\n />\n }\n\n <div\n class=\"content\"\n [class.content_hidden]=\"!areContentOpened()\"\n >\n <div class=\"lists\">\n @if (storageChildren().length) {\n <cui-storage-list\n [storages]=\"storageChildren()\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n />\n }\n @if (storageElements().length && elementSlot()) {\n <ul class=\"list\">\n @for (element of storageElements(); track element.id) {\n <li class=\"item\">\n <ng-container\n *ngTemplateOutlet=\"\n elementSlot()!;\n context: { $implicit: element, storage: storage }\n \"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".button{padding:2px;display:flex;border-radius:4px}@media (hover: hover){.button:hover{background:var(--cui-base-200)}}.button :active{background:var(--cui-base-200)}.icon{padding:2px}.wrapper{display:flex;flex-direction:column;gap:8px}.content{padding-left:20px}.content_hidden{display:none}.lists{display:flex;flex-direction:column;gap:8px;position:relative}.lists>*{z-index:1}.lists:has(>:nth-child(2)):before{content:\"\";position:absolute;top:0;bottom:0;left:8px;width:1px;background:var(--cui-base-200)}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"] }]
|
|
69
|
+
}], ctorParameters: () => [] });
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1saXN0LWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29yZS93aWRnZXRzL3N0b3JhZ2UtbGlzdC9jb21wb25lbnRzL3N0b3JhZ2UtbGlzdC1pdGVtL3N0b3JhZ2UtbGlzdC1pdGVtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvd2lkZ2V0cy9zdG9yYWdlLWxpc3QvY29tcG9uZW50cy9zdG9yYWdlLWxpc3QtaXRlbS9zdG9yYWdlLWxpc3QtaXRlbS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUVuRCxPQUFPLEVBQ0gsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxRQUFRLEVBQ1IsTUFBTSxFQUNOLFVBQVUsRUFDVixNQUFNLEVBQ04sS0FBSyxFQUNMLE1BQU0sRUFDTixTQUFTLEVBQ1osTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUUvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBRWhDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsdUJBQXVCLEVBQ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bG9zZUJ1dHRvbj5cbiAgICAgICAgICAgIEBpZiAoaGFzQ29udGVudCgpKSB7XG4gICAgICAgICAgICAgICAgPGJ1dHRvblxuICAgICAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJidXR0b25cIlxuICAgICAgICAgICAgICAgICAgICAoY2xpY2spPVwib25Ub2dnbGVDaGlsZHJlbigkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIDxjdWktc3ZnXG4gICAgICAgICAgICAgICAgICAgICAgICBbaWNvbl09XCJvcGVuQ2xvc2VCdXR0b25JY29uKClcIlxuICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJ2YXIoLS1jdWktYmFzZS01MDApXCJcbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgPC9uZy10ZW1wbGF0ZT5cblxuICAgICAgICBAaWYgKGl0ZW1TbG90KCk7IGFzIGl0ZW0pIHtcbiAgICAgICAgICAgIDxuZy1jb250YWluZXJcbiAgICAgICAgICAgICAgICAqbmdUZW1wbGF0ZU91dGxldD1cIlxuICAgICAgICAgICAgICAgICAgICBpdGVtO1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkaW1wbGljaXQ6IHN0b3JhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcGVuQ2xvc2VCdXR0b24sXG4gICAgICAgICAgICAgICAgICAgICAgICBhcmVDb250ZW50T3BlbmVkOiBhcmVDb250ZW50T3BlbmVkKCksXG4gICAgICAgICAgICAgICAgICAgICAgICBoYXNDb250ZW50OiBoYXNDb250ZW50KClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFwiXG4gICAgICAgICAgICAvPlxuICAgICAgICB9XG5cbiAgICAgICAgPGRpdlxuICAgICAgICAgICAgY2xhc3M9XCJjb250ZW50XCJcbiAgICAgICAgICAgIFtjbGFzcy5jb250ZW50X2hpZGRlbl09XCIhYXJlQ29udGVudE9wZW5lZCgpXCJcbiAgICAgICAgPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImxpc3RzXCI+XG4gICAgICAgICAgICAgICAgQGlmIChzdG9yYWdlQ2hpbGRyZW4oKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgPGN1aS1zdG9yYWdlLWxpc3RcbiAgICAgICAgICAgICAgICAgICAgICAgIFtzdG9yYWdlc109XCJzdG9yYWdlQ2hpbGRyZW4oKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbZWxlbWVudFNsb3RdPVwiZWxlbWVudFNsb3QoKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbaXRlbVNsb3RdPVwiaXRlbVNsb3QoKVwiXG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIEBpZiAoc3RvcmFnZUVsZW1lbnRzKCkubGVuZ3RoICYmIGVsZW1lbnRTbG90KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgPHVsIGNsYXNzPVwibGlzdFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgQGZvciAoZWxlbWVudCBvZiBzdG9yYWdlRWxlbWVudHMoKTsgdHJhY2sgZWxlbWVudC5pZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsaSBjbGFzcz1cIml0ZW1cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nVGVtcGxhdGVPdXRsZXQ9XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50U2xvdCgpITtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0OiB7ICRpbXBsaWNpdDogZWxlbWVudCwgc3RvcmFnZTogc3RvcmFnZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIDwvdWw+XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuPC9uZy1jb250YWluZXI+XG4iXX0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CuiStorageListComponent } from './storage-list.component';
|
|
2
|
+
export * from './storage-list.options';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvc3RvcmFnZS1saXN0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ25FLGNBQWMsd0JBQXdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBDdWlTdG9yYWdlTGlzdENvbXBvbmVudCB9IGZyb20gJy4vc3RvcmFnZS1saXN0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL3N0b3JhZ2UtbGlzdC5vcHRpb25zJztcbiJdfQ==
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
|
+
import { CuiStorageListItemComponent } from './components';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class CuiStorageListComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.storages = input.required();
|
|
7
|
+
this.elementSlot = input();
|
|
8
|
+
this.itemSlot = input();
|
|
9
|
+
}
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiStorageListComponent, isStandalone: true, selector: "cui-storage-list", inputs: { storages: { classPropertyName: "storages", publicName: "storages", isSignal: true, isRequired: true, transformFunction: null }, elementSlot: { classPropertyName: "elementSlot", publicName: "elementSlot", isSignal: true, isRequired: false, transformFunction: null }, itemSlot: { classPropertyName: "itemSlot", publicName: "itemSlot", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ul class=\"list\">\n @for (storage of storages(); track storage.id) {\n <li\n cuiStorageListItem\n [storage]=\"storage\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n class=\"item\"\n ></li>\n }\n</ul>\n", styles: [":host{display:block}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative;z-index:0}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"], dependencies: [{ kind: "component", type: CuiStorageListItemComponent, selector: "li[cuiStorageListItem]", inputs: ["storage", "elementSlot", "itemSlot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListComponent, decorators: [{
|
|
14
|
+
type: Component,
|
|
15
|
+
args: [{ selector: 'cui-storage-list', imports: [CuiStorageListItemComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"list\">\n @for (storage of storages(); track storage.id) {\n <li\n cuiStorageListItem\n [storage]=\"storage\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n class=\"item\"\n ></li>\n }\n</ul>\n", styles: [":host{display:block}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative;z-index:0}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"] }]
|
|
16
|
+
}] });
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvd2lkZ2V0cy9zdG9yYWdlLWxpc3Qvc3RvcmFnZS1saXN0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvd2lkZ2V0cy9zdG9yYWdlLWxpc3Qvc3RvcmFnZS1saXN0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTFFLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLGNBQWMsQ0FBQzs7QUFXM0QsTUFBTSxPQUFPLHVCQUF1QjtJQVJwQztRQVNvQixhQUFRLEdBQUcsS0FBSyxDQUFDLFFBQVEsRUFBbUIsQ0FBQztRQUM3QyxnQkFBVyxHQUFHLEtBQUssRUFBd0IsQ0FBQztRQUM1QyxhQUFRLEdBQUcsS0FBSyxFQUF3QixDQUFDO0tBQzVEOytHQUpZLHVCQUF1QjttR0FBdkIsdUJBQXVCLG1lQ2RwQywyU0FXQSwrU0RIYywyQkFBMkI7OzRGQU01Qix1QkFBdUI7a0JBUm5DLFNBQVM7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iAgICBwdWJsaWMgcmVhZG9ubHkgaXRlbVNsb3QgPSBpbnB1dDxUZW1wbGF0ZVJlZjx1bmtub3duPj4oKTtcbn1cbiIsIjx1bCBjbGFzcz1cImxpc3RcIj5cbiAgICBAZm9yIChzdG9yYWdlIG9mIHN0b3JhZ2VzKCk7IHRyYWNrIHN0b3JhZ2UuaWQpIHtcbiAgICAgICAgPGxpXG4gICAgICAgICAgICBjdWlTdG9yYWdlTGlzdEl0ZW1cbiAgICAgICAgICAgIFtzdG9yYWdlXT1cInN0b3JhZ2VcIlxuICAgICAgICAgICAgW2VsZW1lbnRTbG90XT1cImVsZW1lbnRTbG90KClcIlxuICAgICAgICAgICAgW2l0ZW1TbG90XT1cIml0ZW1TbG90KClcIlxuICAgICAgICAgICAgY2xhc3M9XCJpdGVtXCJcbiAgICAgICAgPjwvbGk+XG4gICAgfVxuPC91bD5cbiJdfQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export const CUI_STORAGE_LIST_SERVICE_TOKEN = new InjectionToken('STORAGE_LIST_SERVICE_TOKEN');
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1saXN0Lm9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvc3RvcmFnZS1saXN0L3N0b3JhZ2UtbGlzdC5vcHRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHL0MsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQUcsSUFBSSxjQUFjLENBQXdCLDRCQUE0QixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tl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component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ElementRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, TemplateRef, ContentChildren, HostListener, Self, INJECTOR, forwardRef, ViewContainerRef, booleanAttribute, computed, Pipe, APP_INITIALIZER, viewChild, afterRender, output, makeEnvironmentProviders
|
|
2
|
+
import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ElementRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, TemplateRef, ContentChildren, HostListener, Self, INJECTOR, forwardRef, ViewContainerRef, booleanAttribute, computed, untracked, Pipe, APP_INITIALIZER, viewChild, afterRender, output, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet, NgFor, UpperCasePipe, NgClass, Location } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@cuby-ui/cdk';
|
|
6
|
-
import { CUI_WINDOW, cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilterPipe, CuiLetDirective, CuiPopoverService, cuiProvide, CUI_ANIMATION_FRAME, cuiZonefree, EMPTY_CLIENT_RECT, cuiInjectElement, CUI_LOCAL_STORAGE, CUI_IS_WEBKIT, CuiItemDirective, CuiActiveZone, CuiFocusTrapDirective, cuiGetElementObscures, CUI_IS_MOBILE, CuiHoveredService, cuiPure, cuiPointToClientRect, cuiClamp, cuiPx, cuiIfMap, cuiIsPresent, cuiTypedFromEvent, cuiZonefreeScheduler, cuiZoneOptimized, cuiIsNativeFocused, CuiClickOutsideDirective, CuiTargetDirective, cuiGetClosestFocusable, CuiTime, CuiDimensionsObserverDirective,
|
|
6
|
+
import { CUI_WINDOW, cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilterPipe, CuiLetDirective, CuiPopoverService, cuiProvide, CUI_ANIMATION_FRAME, cuiZonefree, EMPTY_CLIENT_RECT, cuiInjectElement, CUI_LOCAL_STORAGE, CUI_IS_WEBKIT, CuiItemDirective, CuiActiveZone, CuiFocusTrapDirective, cuiGetElementObscures, CUI_IS_MOBILE, CuiHoveredService, cuiPure, cuiPointToClientRect, cuiClamp, cuiPx, cuiIfMap, cuiIsPresent, cuiTypedFromEvent, cuiZonefreeScheduler, cuiZoneOptimized, cuiIsNativeFocused, CuiClickOutsideDirective, CuiTargetDirective, cuiGetClosestFocusable, CuiTime, CuiDimensionsObserverDirective, CuiIdService, CuiAutoResizingDirective, CuiElementDirective, CuiDragPointerDirective, CuiDragDropDirective, CuiDragListDirective, CuiHandleScrollDirective, FilesUploader, takeCaptureFromVideo } from '@cuby-ui/cdk';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
8
|
import { cuiIsIcon, CUI_ICONS } from '@cuby-ui/icons';
|
|
9
9
|
import { BehaviorSubject, takeUntil, Observable, merge, distinctUntilChanged, startWith, map, finalize, switchMap, tap, catchError, throwError, of, from, filter, timer, Subject, delay, repeat, takeWhile, fromEvent, debounce, skip, take, forkJoin, throttleTime, concatMap, toArray, debounceTime, pairwise } from 'rxjs';
|
|
@@ -4070,84 +4070,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
4070
4070
|
}, template: "<div class=\"content\">\n <ng-content />\n</div>\n", styles: [":host{--maxWidth: 1320px;--horizontalPadding: 24px;--verticalPadding: 0;position:relative;display:block;min-height:100vh}:host .content{padding:var(--verticalPadding) var(--horizontalPadding);margin:0 auto;max-width:var(--maxWidth)}\n"] }]
|
|
4071
4071
|
}] });
|
|
4072
4072
|
|
|
4073
|
-
const
|
|
4074
|
-
class
|
|
4073
|
+
const CUI_TABS_SERVICE_TOKEN = new InjectionToken('CUI_TABS_SERVICE');
|
|
4074
|
+
class CuiAbstractTabsService {
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4077
|
+
class CuiTabDirective {
|
|
4075
4078
|
constructor() {
|
|
4076
|
-
this.
|
|
4079
|
+
this.tabsService = inject(CUI_TABS_SERVICE_TOKEN);
|
|
4080
|
+
this.tabId = inject(CuiIdService).generate();
|
|
4081
|
+
this.buttonSlot = input.required();
|
|
4082
|
+
this.contentSlot = input.required();
|
|
4083
|
+
this.data = input();
|
|
4084
|
+
this.initTabEffect();
|
|
4085
|
+
}
|
|
4086
|
+
initTabEffect() {
|
|
4087
|
+
effect((onCleanup) => {
|
|
4088
|
+
this.addTab(this.buttonSlot(), this.contentSlot());
|
|
4089
|
+
onCleanup(this.removeTab.bind(this));
|
|
4090
|
+
}, { allowSignalWrites: true });
|
|
4077
4091
|
}
|
|
4078
|
-
|
|
4079
|
-
this.
|
|
4092
|
+
addTab(button, content) {
|
|
4093
|
+
this.tabsService.addTab({ id: this.tabId, button, content, data: untracked(this.data) });
|
|
4080
4094
|
}
|
|
4081
|
-
|
|
4082
|
-
|
|
4095
|
+
removeTab() {
|
|
4096
|
+
this.tabsService.removeTab(this.tabId);
|
|
4097
|
+
}
|
|
4098
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4099
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: CuiTabDirective, isStandalone: true, selector: "cui-tab, [cuiTab]", inputs: { buttonSlot: { classPropertyName: "buttonSlot", publicName: "buttonSlot", isSignal: true, isRequired: true, transformFunction: null }, contentSlot: { classPropertyName: "contentSlot", publicName: "contentSlot", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
4083
4100
|
}
|
|
4084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4085
|
-
type:
|
|
4086
|
-
args: [{
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabDirective, decorators: [{
|
|
4102
|
+
type: Directive,
|
|
4103
|
+
args: [{
|
|
4104
|
+
selector: 'cui-tab, [cuiTab]',
|
|
4105
|
+
standalone: true,
|
|
4106
|
+
}]
|
|
4107
|
+
}], ctorParameters: () => [] });
|
|
4091
4108
|
|
|
4092
|
-
class
|
|
4109
|
+
class CuiTabsServiceImpl extends CuiAbstractTabsService {
|
|
4093
4110
|
constructor() {
|
|
4094
|
-
|
|
4095
|
-
this.
|
|
4096
|
-
this.
|
|
4097
|
-
this.
|
|
4111
|
+
super(...arguments);
|
|
4112
|
+
this.tabsSignal = signal([]);
|
|
4113
|
+
this.activeTabSignal = computed(() => signal(this.tabsSignal()[0]));
|
|
4114
|
+
this.tabs = this.tabsSignal.asReadonly();
|
|
4115
|
+
this.activeTab = computed(() => this.activeTabSignal()());
|
|
4098
4116
|
}
|
|
4099
|
-
|
|
4100
|
-
|
|
4117
|
+
set(tab) {
|
|
4118
|
+
this.activeTabSignal().set(tab);
|
|
4101
4119
|
}
|
|
4102
|
-
|
|
4103
|
-
|
|
4120
|
+
addTab(tab) {
|
|
4121
|
+
this.tabsSignal.update((prev) => [...prev, tab]);
|
|
4104
4122
|
}
|
|
4105
|
-
|
|
4106
|
-
this.
|
|
4123
|
+
removeTab(tabId) {
|
|
4124
|
+
this.tabsSignal.update((prev) => prev.filter((tab) => tab.id !== tabId));
|
|
4107
4125
|
}
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4127
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsServiceImpl }); }
|
|
4128
|
+
}
|
|
4129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsServiceImpl, decorators: [{
|
|
4130
|
+
type: Injectable
|
|
4131
|
+
}] });
|
|
4132
|
+
|
|
4133
|
+
class CuiTabsComponent {
|
|
4134
|
+
constructor() {
|
|
4135
|
+
this.tabsService = inject(CUI_TABS_SERVICE_TOKEN);
|
|
4136
|
+
this.tabs = this.tabsService.tabs;
|
|
4137
|
+
this.activeTab = this.tabsService.activeTab;
|
|
4138
|
+
this.headerSlot = input();
|
|
4139
|
+
this.selectedIndex = input(0);
|
|
4140
|
+
this.initSelectedTabEffect();
|
|
4141
|
+
}
|
|
4142
|
+
onSelectTab(event, tab) {
|
|
4143
|
+
if (event.defaultPrevented) {
|
|
4112
4144
|
return;
|
|
4113
4145
|
}
|
|
4114
|
-
this.
|
|
4115
|
-
this.activeItemIndex = index;
|
|
4146
|
+
this.tabsService.set(tab);
|
|
4116
4147
|
}
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
const
|
|
4120
|
-
|
|
4121
|
-
|
|
4148
|
+
initSelectedTabEffect() {
|
|
4149
|
+
effect(() => {
|
|
4150
|
+
const index = this.selectedIndex();
|
|
4151
|
+
const length = this.tabs().length;
|
|
4152
|
+
if (index === undefined) {
|
|
4153
|
+
return;
|
|
4154
|
+
}
|
|
4155
|
+
if (!length) {
|
|
4156
|
+
throw new Error('No tab selected');
|
|
4157
|
+
}
|
|
4158
|
+
if (index < 0 || index >= length) {
|
|
4159
|
+
throw new Error('Invalid tab index');
|
|
4160
|
+
}
|
|
4161
|
+
this.tabsService.set(this.tabs()[index]);
|
|
4162
|
+
}, { allowSignalWrites: true });
|
|
4122
4163
|
}
|
|
4123
4164
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4124
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiTabsComponent, isStandalone: true, selector: "cui-tabs", inputs: { headerSlot: { classPropertyName: "headerSlot", publicName: "headerSlot", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: CUI_TABS_SERVICE_TOKEN, useClass: CuiTabsServiceImpl }], ngImport: i0, template: "@if (headerSlot(); as header) {\n <ng-container\n [ngTemplateOutlet]=\"header\"\n [ngTemplateOutletContext]=\"{ $implicit: buttons }\"\n />\n} @else {\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"buttons\" />\n </header>\n}\n\n<ng-template #buttons>\n @for (tab of tabs(); track tab.id) {\n <button\n type=\"button\"\n class=\"button\"\n (click)=\"onSelectTab($event, tab)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tab.button\"\n [ngTemplateOutletContext]=\"{ $implicit: tab.data, isActive: tab.id === activeTab()?.id }\"\n />\n </button>\n }\n</ng-template>\n\n@if (activeTab()?.content; as content) {\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"{ $implicit: activeTab()?.data }\"\n />\n}\n", styles: [":host{display:flex;flex-direction:column}.header{display:flex}.button{display:contents}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4125
4166
|
}
|
|
4126
4167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsComponent, decorators: [{
|
|
4127
4168
|
type: Component,
|
|
4128
|
-
args: [{ selector: 'cui-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-
|
|
4129
|
-
}],
|
|
4130
|
-
type: Input
|
|
4131
|
-
}], activeItemIndexChange: [{
|
|
4132
|
-
type: Output
|
|
4133
|
-
}], onActivate: [{
|
|
4134
|
-
type: HostListener,
|
|
4135
|
-
args: [CUI_TAB_ACTIVATE, ['$event']]
|
|
4136
|
-
}] } });
|
|
4137
|
-
|
|
4138
|
-
class CuiTabsModule {
|
|
4139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4140
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsModule, declarations: [CuiTabsComponent, CuiTabComponent], exports: [CuiTabsComponent, CuiTabComponent] }); }
|
|
4141
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsModule }); }
|
|
4142
|
-
}
|
|
4143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiTabsModule, decorators: [{
|
|
4144
|
-
type: NgModule,
|
|
4145
|
-
args: [{
|
|
4146
|
-
imports: [],
|
|
4147
|
-
declarations: [CuiTabsComponent, CuiTabComponent],
|
|
4148
|
-
exports: [CuiTabsComponent, CuiTabComponent]
|
|
4149
|
-
}]
|
|
4150
|
-
}] });
|
|
4169
|
+
args: [{ selector: 'cui-tabs', imports: [NgTemplateOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: CUI_TABS_SERVICE_TOKEN, useClass: CuiTabsServiceImpl }], template: "@if (headerSlot(); as header) {\n <ng-container\n [ngTemplateOutlet]=\"header\"\n [ngTemplateOutletContext]=\"{ $implicit: buttons }\"\n />\n} @else {\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"buttons\" />\n </header>\n}\n\n<ng-template #buttons>\n @for (tab of tabs(); track tab.id) {\n <button\n type=\"button\"\n class=\"button\"\n (click)=\"onSelectTab($event, tab)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tab.button\"\n [ngTemplateOutletContext]=\"{ $implicit: tab.data, isActive: tab.id === activeTab()?.id }\"\n />\n </button>\n }\n</ng-template>\n\n@if (activeTab()?.content; as content) {\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"{ $implicit: activeTab()?.data }\"\n />\n}\n", styles: [":host{display:flex;flex-direction:column}.header{display:flex}.button{display:contents}\n"] }]
|
|
4170
|
+
}], ctorParameters: () => [] });
|
|
4151
4171
|
|
|
4152
4172
|
class CuiTextareaComponent {
|
|
4153
4173
|
constructor() {
|
|
@@ -9993,9 +10013,160 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9993
10013
|
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiSelectedCategoryService], template: "<div\n class=\"wrapper\"\n *transloco=\"let t\"\n>\n <div\n #scrollContent\n class=\"content content_scrollable\"\n >\n <div class=\"category\">\n <cui-form-field>\n <label\n cuiLabel\n [for]=\"categoryId\"\n [isRequired]=\"true\"\n >\n {{ t('SELECT_CATEGORY') }}\n </label>\n <cui-categories\n [buttonId]=\"categoryId\"\n [treeStructType]=\"TYPE\"\n >\n <div class=\"select\">\n <span [style.color]=\"labelColor()\">\n {{ selectTitle() }}\n </span>\n\n <cui-svg icon=\"cuiIconChevronDown\" />\n </div>\n </cui-categories>\n </cui-form-field>\n </div>\n\n @let criterionData = criterion();\n @let editorConfigData = editorConfig();\n\n @if (editorConfigData && criterionData) {\n <cui-criterion-info-form\n [config]=\"editorConfigData\"\n [baseResourceUrl]=\"editorResourceUrl()\"\n [title]=\"criterionData.storageElement.title\"\n [framerId]=\"criterionData.storageElement.framerCriterionId\"\n class=\"utility\"\n (isFormValidChanged)=\"onFormValidationChanged($event)\"\n (formChanged)=\"onFormChanged($event, criterionData.id)\"\n />\n }\n </div>\n</div>\n", styles: [".wrapper{display:flex;flex-direction:column;height:100%}.content{height:calc(100vh - 109px)}.content_scrollable{overflow:auto}.category{padding-top:16px;padding-right:23px;padding-left:23px}.select{padding:7px 13px;font-weight:400;font-size:14px;line-height:20px;display:flex;justify-content:space-between;height:36px;border-radius:8px;border:1px solid var(--cui-base-200);color:var(--cui-base-900);background:var(--cui-input)}.utility{--editor-height: none}\n"] }]
|
|
9994
10014
|
}], ctorParameters: () => [] });
|
|
9995
10015
|
|
|
10016
|
+
class CuiSelectModalFolderComponent {
|
|
10017
|
+
constructor() {
|
|
10018
|
+
this.icon = computed(() => (this.isOpen() ? 'cuiIconFolderOpen' : 'cuiIconFolder'));
|
|
10019
|
+
this.title = input.required();
|
|
10020
|
+
this.buttonSlot = input.required();
|
|
10021
|
+
this.isOpen = input(false);
|
|
10022
|
+
}
|
|
10023
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalFolderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10024
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: CuiSelectModalFolderComponent, isStandalone: true, selector: "cui-select-modal-folder", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, buttonSlot: { classPropertyName: "buttonSlot", publicName: "buttonSlot", isSignal: true, isRequired: true, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<cui-card-wrapper class=\"wrapper\">\n <ng-container [ngTemplateOutlet]=\"buttonSlot()\" />\n\n <cui-svg\n [icon]=\"icon()\"\n class=\"icon\"\n />\n\n <span class=\"title\">{{ title() }}</span>\n</cui-card-wrapper>\n", styles: [":host{--border-color: var(--cui-base-200);--padding-horizontal: 8px;--padding-vertical: 8px}:host .wrapper{--border: var(--border-color);padding:var(--padding-vertical) var(--padding-horizontal)}.title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon{padding:2px}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "component", type: CuiCardWrapperComponent, selector: "cui-card-wrapper, [cuiCardWrapper]", inputs: ["withBorder"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10025
|
+
}
|
|
10026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalFolderComponent, decorators: [{
|
|
10027
|
+
type: Component,
|
|
10028
|
+
args: [{ selector: 'cui-select-modal-folder', imports: [CuiSvgModule, CuiCardWrapperComponent, NgTemplateOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-card-wrapper class=\"wrapper\">\n <ng-container [ngTemplateOutlet]=\"buttonSlot()\" />\n\n <cui-svg\n [icon]=\"icon()\"\n class=\"icon\"\n />\n\n <span class=\"title\">{{ title() }}</span>\n</cui-card-wrapper>\n", styles: [":host{--border-color: var(--cui-base-200);--padding-horizontal: 8px;--padding-vertical: 8px}:host .wrapper{--border: var(--border-color);padding:var(--padding-vertical) var(--padding-horizontal)}.title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon{padding:2px}\n"] }]
|
|
10029
|
+
}] });
|
|
10030
|
+
|
|
10031
|
+
class CuiSelectModalSearchComponent {
|
|
10032
|
+
constructor() {
|
|
10033
|
+
this.searchControl = new FormControl('');
|
|
10034
|
+
}
|
|
10035
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10036
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CuiSelectModalSearchComponent, isStandalone: true, selector: "cui-select-modal-search", ngImport: i0, template: "<cui-input-text\n cuiTextFieldPlaceholder=\"Search...\"\n cuiTextFieldIconLeft=\"cuiIconSearch\"\n [formControl]=\"searchControl\"\n class=\"search\"\n/>\n<button\n class=\"filters\"\n type=\"button\"\n cuiIconButton\n icon=\"cuiIconFiltersLines\"\n></button>\n", styles: [":host{padding-right:15px;display:flex;align-items:center;gap:4px}.search{width:100%}.filters{padding:4px;width:auto;height:auto}\n"], dependencies: [{ kind: "ngmodule", type: CuiInputModule }, { kind: "component", type: CuiInputTextComponent, selector: "cui-input-text" }, { kind: "directive", type: CuiTextFieldIconLeftDirective, selector: "[cuiTextFieldIconLeft]", inputs: ["cuiTextFieldIconLeft"] }, { kind: "directive", type: CuiTextFieldPlaceholderDirective, selector: "[cuiTextFieldPlaceholder]", inputs: ["cuiTextFieldPlaceholder"] }, { kind: "ngmodule", type: CuiIconButtonModule }, { kind: "component", type: CuiIconButtonComponent, selector: "button[cuiIconButton][icon], a[cuiIconButton][icon]", inputs: ["icon", "color", "hoverColor"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10037
|
+
}
|
|
10038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalSearchComponent, decorators: [{
|
|
10039
|
+
type: Component,
|
|
10040
|
+
args: [{ selector: 'cui-select-modal-search', imports: [CuiInputModule, CuiIconButtonModule, ReactiveFormsModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-input-text\n cuiTextFieldPlaceholder=\"Search...\"\n cuiTextFieldIconLeft=\"cuiIconSearch\"\n [formControl]=\"searchControl\"\n class=\"search\"\n/>\n<button\n class=\"filters\"\n type=\"button\"\n cuiIconButton\n icon=\"cuiIconFiltersLines\"\n></button>\n", styles: [":host{padding-right:15px;display:flex;align-items:center;gap:4px}.search{width:100%}.filters{padding:4px;width:auto;height:auto}\n"] }]
|
|
10041
|
+
}] });
|
|
10042
|
+
|
|
10043
|
+
class CuiSelectModalComponent {
|
|
10044
|
+
constructor() {
|
|
10045
|
+
this.context = inject(CUI_DIALOG_CONTEXT);
|
|
10046
|
+
this.data = this.context.data;
|
|
10047
|
+
this.heading = this.data.heading;
|
|
10048
|
+
this.leftData = this.data.leftData;
|
|
10049
|
+
this.rightData = this.data.rightData;
|
|
10050
|
+
}
|
|
10051
|
+
onCancel() {
|
|
10052
|
+
this.context.completeWith();
|
|
10053
|
+
}
|
|
10054
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10055
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiSelectModalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<ng-container *transloco=\"let t\">\n <div class=\"content\">\n <header\n class=\"header\"\n cuiDialogHeader\n [heading]=\"heading\"\n (closed)=\"onCancel()\"\n ></header>\n <div class=\"wrapper\">\n <div class=\"left-block\">\n @if (leftData) {\n <ng-container\n [ngComponentOutlet]=\"leftData.component\"\n [ngComponentOutletInputs]=\"leftData.inputs\"\n />\n }\n </div>\n <div class=\"right-block\">\n @if (rightData) {\n <ng-container\n [ngComponentOutlet]=\"rightData.component\"\n [ngComponentOutletInputs]=\"rightData.inputs\"\n />\n }\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".header{padding-right:16px;padding-left:16px}.content{display:flex;flex-direction:column;height:calc(100vh - 180px)}.wrapper{display:flex;flex-direction:row;flex-grow:1;border-top:1px solid var(--cui-base-200);width:100%;min-height:400px;overflow-y:hidden}.left-block{padding-left:16px;padding-top:19px;flex-shrink:0;display:flex;flex-direction:column;gap:16px;width:50%;border-right:1px solid var(--cui-base-200)}.right-block{position:relative;width:50%;overflow:hidden}.right-block__head{padding:16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--cui-base-200)}.right-block__title{font-weight:500;font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.right-block__subtitle{font-weight:400;font-size:14px;line-height:20px;margin-bottom:16px;text-transform:uppercase;color:var(--cui-base-500)}\n"], dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiDialogModule }, { kind: "component", type: CuiDialogHeaderComponent, selector: "header[cuiDialogHeader][heading]", inputs: ["heading", "headingContext", "subheading"], outputs: ["closed"] }, { kind: "ngmodule", type: CuiIconButtonModule }, { kind: "ngmodule", type: CuiInputModule }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10056
|
+
}
|
|
10057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalComponent, decorators: [{
|
|
10058
|
+
type: Component,
|
|
10059
|
+
args: [{ imports: [
|
|
10060
|
+
CuiButtonModule,
|
|
10061
|
+
CuiDialogModule,
|
|
10062
|
+
CuiIconButtonModule,
|
|
10063
|
+
CuiInputModule,
|
|
10064
|
+
NgComponentOutlet,
|
|
10065
|
+
TranslocoDirective
|
|
10066
|
+
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\n <div class=\"content\">\n <header\n class=\"header\"\n cuiDialogHeader\n [heading]=\"heading\"\n (closed)=\"onCancel()\"\n ></header>\n <div class=\"wrapper\">\n <div class=\"left-block\">\n @if (leftData) {\n <ng-container\n [ngComponentOutlet]=\"leftData.component\"\n [ngComponentOutletInputs]=\"leftData.inputs\"\n />\n }\n </div>\n <div class=\"right-block\">\n @if (rightData) {\n <ng-container\n [ngComponentOutlet]=\"rightData.component\"\n [ngComponentOutletInputs]=\"rightData.inputs\"\n />\n }\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".header{padding-right:16px;padding-left:16px}.content{display:flex;flex-direction:column;height:calc(100vh - 180px)}.wrapper{display:flex;flex-direction:row;flex-grow:1;border-top:1px solid var(--cui-base-200);width:100%;min-height:400px;overflow-y:hidden}.left-block{padding-left:16px;padding-top:19px;flex-shrink:0;display:flex;flex-direction:column;gap:16px;width:50%;border-right:1px solid var(--cui-base-200)}.right-block{position:relative;width:50%;overflow:hidden}.right-block__head{padding:16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--cui-base-200)}.right-block__title{font-weight:500;font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.right-block__subtitle{font-weight:400;font-size:14px;line-height:20px;margin-bottom:16px;text-transform:uppercase;color:var(--cui-base-500)}\n"] }]
|
|
10067
|
+
}] });
|
|
10068
|
+
|
|
10069
|
+
class CuiSelectModalService {
|
|
10070
|
+
constructor() {
|
|
10071
|
+
this.selectedElementSignal = signal(null);
|
|
10072
|
+
this.selectedElement = this.selectedElementSignal.asReadonly();
|
|
10073
|
+
}
|
|
10074
|
+
getSelectedData() {
|
|
10075
|
+
return this.selectedElementSignal.asReadonly();
|
|
10076
|
+
}
|
|
10077
|
+
set(element) {
|
|
10078
|
+
this.selectedElementSignal.set(element);
|
|
10079
|
+
}
|
|
10080
|
+
delete() {
|
|
10081
|
+
this.selectedElementSignal.set(null);
|
|
10082
|
+
}
|
|
10083
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10084
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalService }); }
|
|
10085
|
+
}
|
|
10086
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSelectModalService, decorators: [{
|
|
10087
|
+
type: Injectable
|
|
10088
|
+
}] });
|
|
10089
|
+
|
|
10090
|
+
const CUI_STORAGE_LIST_SERVICE_TOKEN = new InjectionToken('STORAGE_LIST_SERVICE_TOKEN');
|
|
10091
|
+
|
|
10092
|
+
class CuiStorageListItemComponent {
|
|
10093
|
+
constructor() {
|
|
10094
|
+
this.storageListService = inject(CUI_STORAGE_LIST_SERVICE_TOKEN);
|
|
10095
|
+
this.isLoadingChildren = false;
|
|
10096
|
+
this.isLoadingElements = false;
|
|
10097
|
+
this.storageChildren = signal([]);
|
|
10098
|
+
this.storageElements = signal([]);
|
|
10099
|
+
this.areContentOpened = signal(false);
|
|
10100
|
+
this.openCloseButtonIcon = computed(() => this.areContentOpened() ? 'cuiIconChevronDown' : 'cuiIconChevronRight');
|
|
10101
|
+
this.hasContent = computed(() => this.storage().children.length || this.storageChildren().length || this.storageElements().length);
|
|
10102
|
+
this.storage = input.required();
|
|
10103
|
+
this.elementSlot = input();
|
|
10104
|
+
this.itemSlot = input();
|
|
10105
|
+
this.initStorageChildrenEffect();
|
|
10106
|
+
this.initStorageElementsEffect();
|
|
10107
|
+
}
|
|
10108
|
+
onToggleChildren(event) {
|
|
10109
|
+
event.preventDefault();
|
|
10110
|
+
this.areContentOpened.update((prevAreChildrenOpened) => !prevAreChildrenOpened);
|
|
10111
|
+
}
|
|
10112
|
+
initStorageChildrenEffect() {
|
|
10113
|
+
effect(() => {
|
|
10114
|
+
const storage = this.storage();
|
|
10115
|
+
this.areContentOpened();
|
|
10116
|
+
untracked(this.setChildren.bind(this, storage));
|
|
10117
|
+
});
|
|
10118
|
+
}
|
|
10119
|
+
initStorageElementsEffect() {
|
|
10120
|
+
effect(() => {
|
|
10121
|
+
const storage = this.storage();
|
|
10122
|
+
untracked(this.setElements.bind(this, storage));
|
|
10123
|
+
});
|
|
10124
|
+
}
|
|
10125
|
+
setChildren(storage) {
|
|
10126
|
+
if (this.isLoadingChildren || !this.areContentOpened() || this.storageChildren().length) {
|
|
10127
|
+
return;
|
|
10128
|
+
}
|
|
10129
|
+
this.isLoadingChildren = true;
|
|
10130
|
+
this.storageListService
|
|
10131
|
+
.getChildren?.(storage, this.storageChildren())
|
|
10132
|
+
.pipe(finalize(() => (this.isLoadingChildren = false)))
|
|
10133
|
+
.subscribe((response) => this.storageChildren.set(response));
|
|
10134
|
+
}
|
|
10135
|
+
setElements(storage) {
|
|
10136
|
+
if (this.isLoadingElements || this.storageElements().length) {
|
|
10137
|
+
return;
|
|
10138
|
+
}
|
|
10139
|
+
this.isLoadingElements = true;
|
|
10140
|
+
this.storageListService
|
|
10141
|
+
.getElements?.(storage, this.storageElements())
|
|
10142
|
+
.pipe(finalize(() => (this.isLoadingElements = false)))
|
|
10143
|
+
.subscribe((response) => this.storageElements.set(response));
|
|
10144
|
+
}
|
|
10145
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10146
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiStorageListItemComponent, isStandalone: true, selector: "li[cuiStorageListItem]", inputs: { storage: { classPropertyName: "storage", publicName: "storage", isSignal: true, isRequired: true, transformFunction: null }, elementSlot: { classPropertyName: "elementSlot", publicName: "elementSlot", isSignal: true, isRequired: false, transformFunction: null }, itemSlot: { classPropertyName: "itemSlot", publicName: "itemSlot", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *cuiLet=\"storage() as storage\">\n <div class=\"wrapper\">\n <ng-template #openCloseButton>\n @if (hasContent()) {\n <button\n type=\"button\"\n class=\"button\"\n (click)=\"onToggleChildren($event)\"\n >\n <cui-svg\n [icon]=\"openCloseButtonIcon()\"\n color=\"var(--cui-base-500)\"\n />\n </button>\n }\n </ng-template>\n\n @if (itemSlot(); as item) {\n <ng-container\n *ngTemplateOutlet=\"\n item;\n context: {\n $implicit: storage,\n openCloseButton,\n areContentOpened: areContentOpened(),\n hasContent: hasContent()\n }\n \"\n />\n }\n\n <div\n class=\"content\"\n [class.content_hidden]=\"!areContentOpened()\"\n >\n <div class=\"lists\">\n @if (storageChildren().length) {\n <cui-storage-list\n [storages]=\"storageChildren()\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n />\n }\n @if (storageElements().length && elementSlot()) {\n <ul class=\"list\">\n @for (element of storageElements(); track element.id) {\n <li class=\"item\">\n <ng-container\n *ngTemplateOutlet=\"\n elementSlot()!;\n context: { $implicit: element, storage: storage }\n \"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".button{padding:2px;display:flex;border-radius:4px}@media (hover: hover){.button:hover{background:var(--cui-base-200)}}.button :active{background:var(--cui-base-200)}.icon{padding:2px}.wrapper{display:flex;flex-direction:column;gap:8px}.content{padding-left:20px}.content_hidden{display:none}.lists{display:flex;flex-direction:column;gap:8px;position:relative}.lists>*{z-index:1}.lists:has(>:nth-child(2)):before{content:\"\";position:absolute;top:0;bottom:0;left:8px;width:1px;background:var(--cui-base-200)}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => CuiLetDirective), selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "ngmodule", type: i0.forwardRef(() => CuiSvgModule) }, { kind: "component", type: i0.forwardRef(() => CuiSvgComponent), selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => CuiStorageListComponent), selector: "cui-storage-list", inputs: ["storages", "elementSlot", "itemSlot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10147
|
+
}
|
|
10148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListItemComponent, decorators: [{
|
|
10149
|
+
type: Component,
|
|
10150
|
+
args: [{ selector: 'li[cuiStorageListItem]', imports: [CuiLetDirective, CuiSvgModule, NgTemplateOutlet, forwardRef(() => CuiStorageListComponent)], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *cuiLet=\"storage() as storage\">\n <div class=\"wrapper\">\n <ng-template #openCloseButton>\n @if (hasContent()) {\n <button\n type=\"button\"\n class=\"button\"\n (click)=\"onToggleChildren($event)\"\n >\n <cui-svg\n [icon]=\"openCloseButtonIcon()\"\n color=\"var(--cui-base-500)\"\n />\n </button>\n }\n </ng-template>\n\n @if (itemSlot(); as item) {\n <ng-container\n *ngTemplateOutlet=\"\n item;\n context: {\n $implicit: storage,\n openCloseButton,\n areContentOpened: areContentOpened(),\n hasContent: hasContent()\n }\n \"\n />\n }\n\n <div\n class=\"content\"\n [class.content_hidden]=\"!areContentOpened()\"\n >\n <div class=\"lists\">\n @if (storageChildren().length) {\n <cui-storage-list\n [storages]=\"storageChildren()\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n />\n }\n @if (storageElements().length && elementSlot()) {\n <ul class=\"list\">\n @for (element of storageElements(); track element.id) {\n <li class=\"item\">\n <ng-container\n *ngTemplateOutlet=\"\n elementSlot()!;\n context: { $implicit: element, storage: storage }\n \"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".button{padding:2px;display:flex;border-radius:4px}@media (hover: hover){.button:hover{background:var(--cui-base-200)}}.button :active{background:var(--cui-base-200)}.icon{padding:2px}.wrapper{display:flex;flex-direction:column;gap:8px}.content{padding-left:20px}.content_hidden{display:none}.lists{display:flex;flex-direction:column;gap:8px;position:relative}.lists>*{z-index:1}.lists:has(>:nth-child(2)):before{content:\"\";position:absolute;top:0;bottom:0;left:8px;width:1px;background:var(--cui-base-200)}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"] }]
|
|
10151
|
+
}], ctorParameters: () => [] });
|
|
10152
|
+
|
|
10153
|
+
class CuiStorageListComponent {
|
|
10154
|
+
constructor() {
|
|
10155
|
+
this.storages = input.required();
|
|
10156
|
+
this.elementSlot = input();
|
|
10157
|
+
this.itemSlot = input();
|
|
10158
|
+
}
|
|
10159
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10160
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiStorageListComponent, isStandalone: true, selector: "cui-storage-list", inputs: { storages: { classPropertyName: "storages", publicName: "storages", isSignal: true, isRequired: true, transformFunction: null }, elementSlot: { classPropertyName: "elementSlot", publicName: "elementSlot", isSignal: true, isRequired: false, transformFunction: null }, itemSlot: { classPropertyName: "itemSlot", publicName: "itemSlot", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ul class=\"list\">\n @for (storage of storages(); track storage.id) {\n <li\n cuiStorageListItem\n [storage]=\"storage\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n class=\"item\"\n ></li>\n }\n</ul>\n", styles: [":host{display:block}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative;z-index:0}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"], dependencies: [{ kind: "component", type: CuiStorageListItemComponent, selector: "li[cuiStorageListItem]", inputs: ["storage", "elementSlot", "itemSlot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10161
|
+
}
|
|
10162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiStorageListComponent, decorators: [{
|
|
10163
|
+
type: Component,
|
|
10164
|
+
args: [{ selector: 'cui-storage-list', imports: [CuiStorageListItemComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"list\">\n @for (storage of storages(); track storage.id) {\n <li\n cuiStorageListItem\n [storage]=\"storage\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n class=\"item\"\n ></li>\n }\n</ul>\n", styles: [":host{display:block}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative;z-index:0}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"] }]
|
|
10165
|
+
}] });
|
|
10166
|
+
|
|
9996
10167
|
/**
|
|
9997
10168
|
* Generated bundle index. Do not edit.
|
|
9998
10169
|
*/
|
|
9999
10170
|
|
|
10000
|
-
export { AngularOutsideLoaderService, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR,
|
|
10171
|
+
export { AngularOutsideLoaderService, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_STORAGE_LIST_SERVICE_TOKEN, CUI_TABS_SERVICE_TOKEN, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiAuthBase, CuiAuthService, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiCriterionInfoComponent, CuiCriterionModalCreateComponent, CuiCriterionReadonlyInfoComponent, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorTranslations, CuiEmptyStateComponent, CuiFileUploaderStatus, CuiFormFieldComponent, CuiFormFieldModule, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiInstructionInfoComponent, CuiInstructionModalCreateComponent, CuiInstructionReadonlyInfoComponent, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLinkMarker, CuiListTool, CuiLoaderComponent, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiReadonlyCriterionModalComponent, CuiReadonlyInstructionModalComponent, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModalComponent, CuiSelectModalFolderComponent, CuiSelectModalSearchComponent, CuiSelectModalService, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiStorageListComponent, CuiSvgComponent, CuiSvgModule, CuiTabDirective, CuiTabsComponent, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiUtilityModalComponent, CuiVideoTool, CuiVisualViewportService, UTILITY_MODAL_SERVICE_TOKEN, cuiAuthInterceptor, cuiCreateDefaultValidators, cuiErrorHandlerInterceptor, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiProvideEditor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor, provideCuiAuth };
|
|
10001
10172
|
//# sourceMappingURL=cuby-ui-core.mjs.map
|