@cuby-ui/core 0.0.611 → 0.0.614

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.
Files changed (27) hide show
  1. package/editor/components/editor-tool/editor-tool.component.d.ts +4 -0
  2. package/editor/constants/file-uploader.constants.d.ts +1 -0
  3. package/editor/interfaces/file-uploader-error.d.ts +3 -0
  4. package/editor/interfaces/index.d.ts +1 -0
  5. package/editor/tools/video.tool.d.ts +1 -0
  6. package/editor/utils/file-uploader.d.ts +8 -3
  7. package/esm2022/editor/components/editor-tool/editor-tool.component.mjs +17 -3
  8. package/esm2022/editor/constants/file-uploader.constants.mjs +2 -0
  9. package/esm2022/editor/interfaces/file-uploader-error.mjs +5 -0
  10. package/esm2022/editor/interfaces/index.mjs +2 -1
  11. package/esm2022/editor/tools/attaches.tool.mjs +12 -3
  12. package/esm2022/editor/tools/image.tool.mjs +18 -6
  13. package/esm2022/editor/tools/video.tool.mjs +20 -14
  14. package/esm2022/editor/utils/file-uploader.mjs +26 -13
  15. package/esm2022/i18n/en.json +3 -0
  16. package/esm2022/i18n/ru.json +3 -0
  17. package/esm2022/widgets/ui/criterion-info/criterion-info.component.mjs +2 -2
  18. package/esm2022/widgets/ui/instruction-info/instruction-info.component.mjs +2 -2
  19. package/fesm2022/{cuby-ui-core-en-Csg2E9Uc.mjs → cuby-ui-core-en-D8yTJpcc.mjs} +6 -2
  20. package/fesm2022/cuby-ui-core-en-D8yTJpcc.mjs.map +1 -0
  21. package/fesm2022/{cuby-ui-core-ru-xEXR-11C.mjs → cuby-ui-core-ru-DyDGwpgM.mjs} +6 -2
  22. package/fesm2022/cuby-ui-core-ru-DyDGwpgM.mjs.map +1 -0
  23. package/fesm2022/cuby-ui-core.mjs +587 -535
  24. package/fesm2022/cuby-ui-core.mjs.map +1 -1
  25. package/package.json +8 -4
  26. package/fesm2022/cuby-ui-core-en-Csg2E9Uc.mjs.map +0 -1
  27. package/fesm2022/cuby-ui-core-ru-xEXR-11C.mjs.map +0 -1
@@ -5980,6 +5980,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5980
5980
  }]
5981
5981
  }] });
5982
5982
 
5983
+ var CuiFileUploaderError;
5984
+ (function (CuiFileUploaderError) {
5985
+ CuiFileUploaderError["FileSizeExceeded"] = "fileSizeExceeded";
5986
+ })(CuiFileUploaderError || (CuiFileUploaderError = {}));
5987
+
5983
5988
  const COMBINED_TEXT_BLOCK_PART = 'combined-text-block-part';
5984
5989
  const COMBINED_TEXT_BLOCK = 'combined-text-block';
5985
5990
  const COMBINED_TEXT_BLOCK_NAME = 'paragraph';
@@ -7018,6 +7023,9 @@ class EditorToolComponent {
7018
7023
  constructor() {
7019
7024
  this.window = inject(CUI_WINDOW);
7020
7025
  this.document = inject(DOCUMENT);
7026
+ this.errorNotificationService = inject(CUI_ERROR_NOTIFICATION_SERVICE);
7027
+ this.translocoService = inject(TranslocoService);
7028
+ this.fileSizePipe = new FileSizePipe();
7021
7029
  this.readOnly = false;
7022
7030
  this.isLoading = false;
7023
7031
  this.fileSelected = new EventEmitter();
@@ -7030,6 +7038,11 @@ class EditorToolComponent {
7030
7038
  onSelectFile() {
7031
7039
  this.fileSelected.emit();
7032
7040
  }
7041
+ onFileSizeExceeded(event) {
7042
+ this.errorNotificationService.showError(this.translocoService.translate('CUI_EDITOR.FILE_SIZE_EXCEEDED', {
7043
+ size: this.fileSizePipe.transform(event.detail)
7044
+ }));
7045
+ }
7033
7046
  onTitleChange(event) {
7034
7047
  const target = event.currentTarget;
7035
7048
  if (target.innerHTML === '<br>') {
@@ -7054,13 +7067,16 @@ class EditorToolComponent {
7054
7067
  setTimeout(() => this.captionChanged.emit(target.textContent));
7055
7068
  }
7056
7069
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7057
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorToolComponent, selector: "ng-component", inputs: { api: "api", preview: "preview", caption: "caption", buttonContent: "buttonContent", readOnly: "readOnly", isLoading: "isLoading" }, outputs: { fileSelected: "fileSelected", captionChanged: "captionChanged" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7070
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorToolComponent, selector: "ng-component", inputs: { api: "api", preview: "preview", caption: "caption", buttonContent: "buttonContent", readOnly: "readOnly", isLoading: "isLoading" }, outputs: { fileSelected: "fileSelected", captionChanged: "captionChanged" }, host: { listeners: { "fileSizeExceeded": "onFileSizeExceeded($event)" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7058
7071
  }
7059
7072
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorToolComponent, decorators: [{
7060
7073
  type: Component,
7061
7074
  args: [{
7062
7075
  template: '',
7063
- changeDetection: ChangeDetectionStrategy.OnPush
7076
+ changeDetection: ChangeDetectionStrategy.OnPush,
7077
+ host: {
7078
+ '(fileSizeExceeded)': 'onFileSizeExceeded($event)'
7079
+ }
7064
7080
  }]
7065
7081
  }], propDecorators: { api: [{
7066
7082
  type: Input,
@@ -7263,6 +7279,8 @@ async function openFileInBrowser(file) {
7263
7279
  window.open(googleViewerUrl, '_blank');
7264
7280
  }
7265
7281
 
7282
+ const DEFAULT_MAX_FILE_SIZE = 2 * 1024 ** 3;
7283
+
7266
7284
  var CuiFileUploaderStatus;
7267
7285
  (function (CuiFileUploaderStatus) {
7268
7286
  CuiFileUploaderStatus["Loading"] = "loading";
@@ -7271,6 +7289,7 @@ var CuiFileUploaderStatus;
7271
7289
  class CuiFileUploader {
7272
7290
  constructor(config, onUpload, onError) {
7273
7291
  this.REQUEST_METHOD = 'POST';
7292
+ this.cuiIdService = new CuiIdService();
7274
7293
  this.selectFile = ({ fileSelected }) => {
7275
7294
  const input = document.createElement('input');
7276
7295
  const types = this.config?.types || '*';
@@ -7285,7 +7304,7 @@ class CuiFileUploader {
7285
7304
  };
7286
7305
  input.click();
7287
7306
  };
7288
- this.config = config;
7307
+ this.config = { ...config, maxFileSize: config.maxFileSize ?? DEFAULT_MAX_FILE_SIZE };
7289
7308
  this.onUpload = onUpload;
7290
7309
  this.onError = onError;
7291
7310
  }
@@ -7296,28 +7315,37 @@ class CuiFileUploader {
7296
7315
  }
7297
7316
  fileSelected(file);
7298
7317
  }
7318
+ checkCanUploadFile(file) {
7319
+ if (file.size > this.config.maxFileSize) {
7320
+ this.onError(CuiFileUploaderError.FileSizeExceeded, this.config.maxFileSize);
7321
+ return false;
7322
+ }
7323
+ return !!this.config.endpoint;
7324
+ }
7299
7325
  uploadFile(file) {
7300
- const formData = new FormData();
7301
- const formField = this.config.field || 'file';
7302
- formData.append(formField, file);
7303
- if (!this.config.endpoint) {
7304
- return;
7326
+ if (!this.checkCanUploadFile(file)) {
7327
+ return false;
7305
7328
  }
7329
+ this.sendFile(file);
7330
+ return true;
7331
+ }
7332
+ uploadByUrl(url) {
7333
+ this.onUpload({ id: this.cuiIdService.generate(), success: 1, file: { url } });
7334
+ }
7335
+ sendFile(file) {
7336
+ const formData = new FormData();
7337
+ formData.append(this.config.field || 'file', file);
7306
7338
  this.config.load(CuiFileUploaderStatus.Loading);
7307
- const upload = fetch(this.config.endpoint, {
7339
+ fetch(this.config.endpoint, {
7308
7340
  headers: this.config.additionalRequestHeaders,
7309
7341
  method: this.REQUEST_METHOD,
7310
7342
  body: formData
7311
- });
7312
- upload
7343
+ })
7313
7344
  .then((response) => response.json())
7314
7345
  .then((response) => this.onUpload(this.convertToFileSuccessResponse(response), file))
7315
7346
  .catch(() => this.onError())
7316
7347
  .finally(() => this.config.load(CuiFileUploaderStatus.Completed));
7317
7348
  }
7318
- uploadByUrl(url) {
7319
- this.onUpload({ id: crypto.randomUUID(), success: 1, file: { url } });
7320
- }
7321
7349
  convertToFileSuccessResponse(response) {
7322
7350
  return { id: response.id, success: 1, file: { url: response.downloadUrl } };
7323
7351
  }
@@ -7723,10 +7751,12 @@ class CuiImageTool {
7723
7751
  this.onSelectFile = () => {
7724
7752
  return this.uploader.selectFile({
7725
7753
  fileSelected: (file) => {
7726
- const url = URL.createObjectURL(file);
7727
- this.imageTool.preview = url;
7728
- this.imageTool.isLoading = true;
7754
+ if (!this.uploader.checkCanUploadFile(file)) {
7755
+ return;
7756
+ }
7729
7757
  this.selectedFile = file;
7758
+ this.imageTool.isLoading = true;
7759
+ this.imageTool.preview = URL.createObjectURL(file);
7730
7760
  this.uploader.uploadFile(file);
7731
7761
  }
7732
7762
  });
@@ -7736,6 +7766,7 @@ class CuiImageTool {
7736
7766
  this.api = api;
7737
7767
  this.readOnly = readOnly;
7738
7768
  this.config = {
7769
+ maxFileSize: config?.maxFileSize,
7739
7770
  load: config?.load ?? (() => { }),
7740
7771
  field: config?.field ?? 'image',
7741
7772
  types: config?.types ?? 'image/*',
@@ -7753,16 +7784,20 @@ class CuiImageTool {
7753
7784
  file: this.pasteByFile.bind(this)
7754
7785
  };
7755
7786
  const key = event.type;
7756
- this.imageTool.isLoading = true;
7757
7787
  actions[key](event);
7758
7788
  }
7759
7789
  pasteByFile(event) {
7760
7790
  const file = event.detail.file;
7791
+ if (!this.uploader.checkCanUploadFile(file)) {
7792
+ return;
7793
+ }
7761
7794
  this.selectedFile = file;
7795
+ this.imageTool.isLoading = true;
7762
7796
  this.uploader.uploadFile(file);
7763
7797
  }
7764
7798
  pasteByTag(event) {
7765
7799
  const file = event.detail.data.src;
7800
+ this.imageTool.isLoading = true;
7766
7801
  this.selectedFile = file;
7767
7802
  this.uploader.uploadByUrl(file);
7768
7803
  }
@@ -7820,7 +7855,11 @@ class CuiImageTool {
7820
7855
  this.imageTool.image = url;
7821
7856
  this.imageTool.isLoading = false;
7822
7857
  }
7823
- uploadingFailed() {
7858
+ uploadingFailed(error, maxFileSize) {
7859
+ if (error === CuiFileUploaderError.FileSizeExceeded) {
7860
+ this.imageTool.dispatchEvent(new CustomEvent(error, { detail: maxFileSize }));
7861
+ return;
7862
+ }
7824
7863
  this.imageTool.image = '';
7825
7864
  this.imageTool.isLoading = false;
7826
7865
  }
@@ -7855,14 +7894,8 @@ class CuiVideoTool {
7855
7894
  constructor(options) {
7856
7895
  this.selectedFile = null;
7857
7896
  this.onSelectFile = () => {
7858
- return this.uploader.selectFile({
7859
- fileSelected: (file) => {
7860
- const url = URL.createObjectURL(file);
7861
- this.getCaptureFromVideo(url);
7862
- this.videoTool.isLoading = true;
7863
- this.selectedFile = file;
7864
- this.uploader.uploadFile(file);
7865
- }
7897
+ this.uploader.selectFile({
7898
+ fileSelected: (file) => this.uploadFile(file)
7866
7899
  });
7867
7900
  };
7868
7901
  const { api, readOnly, config, data, block } = options;
@@ -7870,6 +7903,7 @@ class CuiVideoTool {
7870
7903
  this.api = api;
7871
7904
  this.readOnly = readOnly;
7872
7905
  this.config = {
7906
+ maxFileSize: config?.maxFileSize,
7873
7907
  load: config?.load ?? (() => { }),
7874
7908
  field: config?.field ?? 'video',
7875
7909
  types: config?.types ?? 'video/*',
@@ -7884,10 +7918,7 @@ class CuiVideoTool {
7884
7918
  if (event.type !== 'file') {
7885
7919
  return;
7886
7920
  }
7887
- const file = event.detail.file;
7888
- this.videoTool.isLoading = true;
7889
- this.selectedFile = file;
7890
- this.uploader.uploadFile(file);
7921
+ this.uploadFile(event.detail.file);
7891
7922
  }
7892
7923
  appendCallback() {
7893
7924
  this.onSelectFile();
@@ -7922,6 +7953,15 @@ class CuiVideoTool {
7922
7953
  this.videoTool.video = file.url;
7923
7954
  }
7924
7955
  }
7956
+ uploadFile(file) {
7957
+ if (!this.uploader.checkCanUploadFile(file)) {
7958
+ return;
7959
+ }
7960
+ this.selectedFile = file;
7961
+ this.videoTool.isLoading = true;
7962
+ this.getCaptureFromVideo(URL.createObjectURL(file));
7963
+ this.uploader.uploadFile(file);
7964
+ }
7925
7965
  onUpload(response) {
7926
7966
  if (!response.success || !response.file || !this.selectedFile) {
7927
7967
  this.uploadingFailed();
@@ -7932,7 +7972,11 @@ class CuiVideoTool {
7932
7972
  this.videoTool.video = url;
7933
7973
  this.videoTool.isLoading = false;
7934
7974
  }
7935
- uploadingFailed() {
7975
+ uploadingFailed(error, maxFileSize) {
7976
+ if (error === CuiFileUploaderError.FileSizeExceeded) {
7977
+ this.videoTool.dispatchEvent(new CustomEvent(error, { detail: maxFileSize }));
7978
+ return;
7979
+ }
7936
7980
  this.videoTool.video = '';
7937
7981
  this.videoTool.isLoading = false;
7938
7982
  }
@@ -7983,8 +8027,11 @@ class CuiAttachesTool {
7983
8027
  this.selectFile = () => {
7984
8028
  return this.uploader.selectFile({
7985
8029
  fileSelected: (file) => {
7986
- this.attachesTool.isLoading = true;
8030
+ if (!this.uploader.checkCanUploadFile(file)) {
8031
+ return;
8032
+ }
7987
8033
  this.selectedFile = file;
8034
+ this.attachesTool.isLoading = true;
7988
8035
  this.uploader.uploadFile(file);
7989
8036
  }
7990
8037
  });
@@ -7997,6 +8044,7 @@ class CuiAttachesTool {
7997
8044
  this.api = api;
7998
8045
  this.readOnly = readOnly;
7999
8046
  this.config = {
8047
+ maxFileSize: config?.maxFileSize,
8000
8048
  field: config?.field ?? 'file',
8001
8049
  types: config?.types ?? '*',
8002
8050
  endpoint: config?.endpoint ?? '',
@@ -8053,7 +8101,11 @@ class CuiAttachesTool {
8053
8101
  };
8054
8102
  this.attachesTool.isLoading = false;
8055
8103
  }
8056
- uploadingFailed() {
8104
+ uploadingFailed(error, maxFileSize) {
8105
+ if (error === CuiFileUploaderError.FileSizeExceeded) {
8106
+ this.attachesTool.dispatchEvent(new CustomEvent(error, { detail: maxFileSize }));
8107
+ return;
8108
+ }
8057
8109
  this.attachesTool.file = undefined;
8058
8110
  this.attachesTool.isLoading = false;
8059
8111
  }
@@ -12041,86 +12093,136 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
12041
12093
 
12042
12094
  const UTILITY_MODAL_SERVICE_TOKEN = new InjectionToken('UTILITY_MODAL_SERVICE_TOKEN');
12043
12095
 
12044
- class CuiUtilityModalCreateComponent {
12096
+ class CuiCriterionInfoComponent {
12045
12097
  constructor() {
12046
- this.window = inject(CUI_WINDOW);
12047
- this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12048
- this.utilityModalService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12049
- this.prevUtility = this.cuiDialogContext.data.utility;
12050
- this.editorResourceUrl = this.cuiDialogContext.data.editorResourceUrl;
12051
- this.tools = this.cuiDialogContext.data.tools;
12052
- this.header = this.cuiDialogContext.data.header;
12053
- this._utility = computed(() => signal(this.initialUtility()));
12098
+ this.destroyRef = inject(DestroyRef);
12099
+ this.translocoService = inject(TranslocoService);
12100
+ this.cuiIdService = inject(CuiIdService);
12101
+ this.cuiCategoriesModalService = inject(CuiSelectedCategoryService);
12102
+ this.treeStructNavigatorApiService = inject(CuiTreeStructNavigatorApiService);
12103
+ this.criterionApiService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12104
+ this.TYPE = "INSTRUCTION_STORAGE" /* TreeStructType.Instruction */;
12105
+ this.skipCategoryChange = false;
12106
+ this.categoryId = this.cuiIdService.generate();
12107
+ this.category = this.cuiCategoriesModalService.category;
12054
12108
  this.isFormValid = signal(false);
12055
- this.utility = computed(() => this._utility()());
12056
- this.initialUtility = input.required();
12109
+ this.prevCategoryId = signal(null);
12110
+ this.editorConfig = signal(null);
12111
+ this.labelColor = computed(() => this.category()?.title ? 'var(--cui-base-900)' : 'var(--cui-base-400)');
12112
+ this.selectTitle = computed(() => this.category()?.title || this.translocoService.translate('SELECT') + '...');
12113
+ this.element = viewChild('scrollContent');
12114
+ this.criterion = model();
12115
+ this.config = input.required();
12116
+ this.validationChanged = output();
12117
+ this.criterionCreated = output();
12118
+ this.initConfigEffect();
12119
+ this.initCategoryEffect();
12057
12120
  }
12058
12121
  ngOnInit() {
12059
- this.initWindowUnloadEvent();
12122
+ this.initCategory();
12060
12123
  }
12061
- ngOnDestroy() {
12062
- this.window.onbeforeunload = null;
12124
+ onFormChanged(values, criterionId) {
12125
+ const actions = {
12126
+ title: (title) => this.changeTitle(title, criterionId),
12127
+ description: (description) => this.changeDescription(description, criterionId)
12128
+ };
12129
+ forkJoin(Object.keys(values).map((key) => actions[key](values[key] || '')))
12130
+ .pipe(takeUntilDestroyed(this.destroyRef))
12131
+ .subscribe();
12063
12132
  }
12064
- onSave() {
12065
- this.cuiDialogContext.completeWith(this.initialUtility() ? { prevId: this.prevUtility.id, ...this.utility() } : this.utility());
12133
+ onFormValidationChanged(isValid) {
12134
+ this.isFormValid.set(isValid);
12135
+ this.validationChanged.emit(isValid);
12066
12136
  }
12067
- onCancel() {
12068
- this.destroyUtility();
12069
- const returnedValue = this.initialUtility() ? this.utility() : null;
12070
- this.cuiDialogContext.completeWith(returnedValue);
12137
+ initCategoryEffect() {
12138
+ effect(() => {
12139
+ const category = this.category();
12140
+ const storageObjectCriterion = untracked(this.criterion);
12141
+ if (!category || this.skipCategoryChange) {
12142
+ this.skipCategoryChange = false;
12143
+ return;
12144
+ }
12145
+ if (storageObjectCriterion) {
12146
+ this.changeCategory(category.id, storageObjectCriterion.id);
12147
+ return;
12148
+ }
12149
+ this.createCriterion(category.id);
12150
+ });
12071
12151
  }
12072
- initWindowUnloadEvent() {
12073
- this.window.onbeforeunload = () => this.destroyUtility();
12152
+ initConfigEffect() {
12153
+ effect(() => {
12154
+ const element = this.element()?.nativeElement;
12155
+ if (!element) {
12156
+ return;
12157
+ }
12158
+ this.editorConfig.set({ ...this.config(), element });
12159
+ });
12074
12160
  }
12075
- destroyUtility() {
12076
- const utility = this.utility();
12077
- if (!utility || this.initialUtility()) {
12161
+ initCategory() {
12162
+ const storageObjectId = this.criterion()?.id;
12163
+ if (!storageObjectId) {
12078
12164
  return;
12079
12165
  }
12080
- this.utilityModalService.deleteUtility(utility).subscribe();
12081
- }
12082
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityModalCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12083
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiUtilityModalCreateComponent, isStandalone: true, selector: "cui-utility-modal-create", inputs: { initialUtility: { classPropertyName: "initialUtility", publicName: "initialUtility", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"wrapper\"\n *transloco=\"let t\"\n>\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <div class=\"header__content\">\n <cui-loader\n type=\"stated\"\n color=\"var(--cui-base-500)\"\n />\n\n <div class=\"actions\">\n @if (!initialUtility()) {\n <button\n type=\"button\"\n cuiButton\n appearance=\"secondary\"\n (click)=\"onCancel()\"\n >\n {{ t('CANCEL') }}\n </button>\n }\n\n <button\n type=\"button\"\n cuiButton\n [disabled]=\"!isFormValid()\"\n appearance=\"action-violet\"\n (click)=\"onSave()\"\n >\n {{ t('DONE') }}\n </button>\n </div>\n </div>\n </header>\n\n <ng-content />\n</div>\n", styles: [".header{display:flex;flex-direction:row;gap:0;align-items:center;justify-content:space-between;padding:16px 24px}.header__content{display:flex;flex-direction:row;gap:8px}.actions{display:flex;flex-direction:row;gap:16px}\n"], dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "theme", "size"] }, { kind: "component", type: CuiLoaderComponent, selector: "cui-loader", inputs: ["type", "position", "size", "color"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12084
- }
12085
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityModalCreateComponent, decorators: [{
12086
- type: Component,
12087
- args: [{ selector: 'cui-utility-modal-create', imports: [CuiButtonModule, CuiLoaderComponent, CuiSvgModule, NgTemplateOutlet, TranslocoDirective], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"wrapper\"\n *transloco=\"let t\"\n>\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <div class=\"header__content\">\n <cui-loader\n type=\"stated\"\n color=\"var(--cui-base-500)\"\n />\n\n <div class=\"actions\">\n @if (!initialUtility()) {\n <button\n type=\"button\"\n cuiButton\n appearance=\"secondary\"\n (click)=\"onCancel()\"\n >\n {{ t('CANCEL') }}\n </button>\n }\n\n <button\n type=\"button\"\n cuiButton\n [disabled]=\"!isFormValid()\"\n appearance=\"action-violet\"\n (click)=\"onSave()\"\n >\n {{ t('DONE') }}\n </button>\n </div>\n </div>\n </header>\n\n <ng-content />\n</div>\n", styles: [".header{display:flex;flex-direction:row;gap:0;align-items:center;justify-content:space-between;padding:16px 24px}.header__content{display:flex;flex-direction:row;gap:8px}.actions{display:flex;flex-direction:row;gap:16px}\n"] }]
12088
- }] });
12089
-
12090
- class CuiCriterionModalCreateComponent {
12091
- constructor() {
12092
- this.destroyRef = inject(DestroyRef);
12093
- this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12094
- this.criterionApiService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12095
- this.isCreated = false;
12096
- this.editorResourceUrl = this.cuiDialogContext.data.editorResourceUrl;
12097
- this.tools = this.cuiDialogContext.data.tools;
12098
- this.header = this.cuiDialogContext.data.header;
12099
- this._criterion = computed(() => signal(this.initialUtility()));
12100
- this.isFormValid = signal(false);
12101
- this.criterion = computed(() => this._criterion()());
12102
- this.initialUtility = input.required();
12103
- this.config = input.required();
12166
+ this.treeStructNavigatorApiService
12167
+ .getCategory(storageObjectId, "CRITERION_STORAGE" /* TreeStructType.Criteria */, this.config().requestOptions)
12168
+ .pipe(takeUntilDestroyed(this.destroyRef))
12169
+ .subscribe((category) => {
12170
+ this.skipCategoryChange = true;
12171
+ this.prevCategoryId.set(category.id);
12172
+ this.cuiCategoriesModalService.setCurrentCategory(category);
12173
+ });
12104
12174
  }
12105
- onCriterionCreated(storageNodeId) {
12106
- if (this.isCreated || this.initialUtility()) {
12175
+ changeCategory(categoryId, targetId) {
12176
+ const prevCategoryId = untracked(this.prevCategoryId);
12177
+ if (!prevCategoryId) {
12107
12178
  return;
12108
12179
  }
12109
- this.criterionApiService
12110
- .createUtility(storageNodeId)
12111
- .pipe(takeUntilDestroyed(this.destroyRef))
12112
- .subscribe((criterion) => {
12113
- this.isCreated = true;
12114
- this._criterion().set(criterion);
12115
- });
12180
+ this.subscription?.unsubscribe();
12181
+ this.subscription = this.treeStructNavigatorApiService
12182
+ .moveElement({
12183
+ type: "MOVING_TARGET_TREE_STRUCT" /* MovingType.TARGET_TREE_STRUCT */,
12184
+ movableItemId: targetId,
12185
+ treeStructTargetItemId: categoryId,
12186
+ treeStructMovableItemId: prevCategoryId
12187
+ }, this.config().requestOptions)
12188
+ .subscribe(() => this.prevCategoryId.set(categoryId));
12116
12189
  }
12117
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionModalCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12118
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiCriterionModalCreateComponent, isStandalone: true, selector: "ng-component", inputs: { initialUtility: { classPropertyName: "initialUtility", publicName: "initialUtility", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<cui-utility-modal-create [initialUtility]=\"criterion()\">\n <cui-criterion-info\n [criterion]=\"criterion()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (criterionCreated)=\"onCriterionCreated($event)\"\n />\n</cui-utility-modal-create>\n", dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiCriterionInfoComponent, selector: "cui-criterion-info", inputs: ["criterion", "config"], outputs: ["criterionChange", "validationChanged", "criterionCreated"] }, { kind: "component", type: CuiUtilityModalCreateComponent, selector: "cui-utility-modal-create", inputs: ["initialUtility"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12190
+ createCriterion(categoryId) {
12191
+ this.criterionCreated.emit(categoryId);
12192
+ this.prevCategoryId.set(categoryId);
12193
+ }
12194
+ changeTitle(value, criterionId) {
12195
+ return this.criterionApiService.changeTitle(criterionId, value, this.config().requestOptions).pipe(finalize(() => this.criterion.update((prev) => ({
12196
+ ...prev,
12197
+ storageElement: { ...prev.storageElement, title: value }
12198
+ }))));
12199
+ }
12200
+ changeDescription(value, criterionId) {
12201
+ if (!this.criterionApiService.changeDescription) {
12202
+ throw new Error('Change description not implemented');
12203
+ }
12204
+ return this.criterionApiService.changeDescription(criterionId, value, this.config().requestOptions).pipe(finalize(() => this.criterion.update((prev) => ({
12205
+ ...prev,
12206
+ storageElement: { ...prev.storageElement, shortDescription: value }
12207
+ }))));
12208
+ }
12209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12210
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiCriterionInfoComponent, isStandalone: true, selector: "cui-criterion-info", inputs: { criterion: { classPropertyName: "criterion", publicName: "criterion", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { criterion: "criterionChange", validationChanged: "validationChanged", criterionCreated: "criterionCreated" }, providers: [CuiSelectedCategoryService], viewQueries: [{ propertyName: "element", first: true, predicate: ["scrollContent"], descendants: true, isSignal: true }], ngImport: i0, 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 [title]=\"criterionData.storageElement.title\"\n [description]=\"criterionData.storageElement.shortDescription\"\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"], dependencies: [{ kind: "ngmodule", type: CuiBadgeModule }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiCategoriesComponent, selector: "cui-categories", inputs: ["treeStructType", "buttonId", "disabled", "context"] }, { kind: "ngmodule", type: CuiDialogModule }, { kind: "ngmodule", type: CuiFormFieldModule }, { kind: "component", type: CuiFormFieldComponent, selector: "cui-form-field" }, { kind: "component", type: CuiCriterionInfoFormComponent, selector: "cui-criterion-info-form", inputs: ["title", "description", "framerId", "config"], outputs: ["formChanged", "isFormValidChanged"] }, { kind: "ngmodule", type: CuiLabelModule }, { kind: "component", type: CuiLabelComponent, selector: "label[cuiLabel]", inputs: ["isRequired"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12119
12211
  }
12120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionModalCreateComponent, decorators: [{
12212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionInfoComponent, decorators: [{
12121
12213
  type: Component,
12122
- args: [{ imports: [CuiButtonModule, CuiSvgModule, CuiCriterionInfoComponent, CuiUtilityModalCreateComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-utility-modal-create [initialUtility]=\"criterion()\">\n <cui-criterion-info\n [criterion]=\"criterion()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (criterionCreated)=\"onCriterionCreated($event)\"\n />\n</cui-utility-modal-create>\n" }]
12123
- }] });
12214
+ args: [{ selector: 'cui-criterion-info', imports: [
12215
+ CuiBadgeModule,
12216
+ CuiButtonModule,
12217
+ CuiCategoriesComponent,
12218
+ CuiDialogModule,
12219
+ CuiFormFieldModule,
12220
+ CuiCriterionInfoFormComponent,
12221
+ CuiLabelModule,
12222
+ CuiSvgModule,
12223
+ TranslocoModule
12224
+ ], 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 [title]=\"criterionData.storageElement.title\"\n [description]=\"criterionData.storageElement.shortDescription\"\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"] }]
12225
+ }], ctorParameters: () => [] });
12124
12226
 
12125
12227
  class CuiInstructionInfoFormComponent {
12126
12228
  get controls() {
@@ -12393,173 +12495,430 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
12393
12495
  ], 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 instructionData = instruction();\n @let editorConfigData = editorConfig();\n\n @if (editorConfigData && instructionData) {\n <cui-instruction-info-form\n [config]=\"editorConfigData\"\n [title]=\"instructionData.storageElement.title\"\n [description]=\"instructionData.storageElement.shortDescription\"\n [framerId]=\"instructionData.storageElement.framerInstructionId\"\n class=\"utility\"\n (isFormValidChanged)=\"onFormValidationChanged($event)\"\n (formChanged)=\"onFormChanged($event, instructionData.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"] }]
12394
12496
  }], ctorParameters: () => [] });
12395
12497
 
12396
- class CuiInstructionModalCreateComponent {
12498
+ class CuiSelectModalFolderComponent {
12397
12499
  constructor() {
12398
- this.destroyRef = inject(DestroyRef);
12399
- this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12400
- this.instructionApiService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12401
- this.isCreated = false;
12402
- this.tools = this.cuiDialogContext.data.tools;
12403
- this.header = this.cuiDialogContext.data.header;
12404
- this._instruction = computed(() => signal(this.initialUtility()));
12405
- this.isFormValid = signal(false);
12406
- this.instruction = computed(() => this._instruction()());
12407
- this.initialUtility = input.required();
12408
- this.config = input.required();
12500
+ this.icon = computed(() => (this.isOpen() ? 'cuiIconFolderOpen' : 'cuiIconFolder'));
12501
+ this.title = input.required();
12502
+ this.buttonSlot = input.required();
12503
+ this.isOpen = input(false);
12409
12504
  }
12410
- onInstructionCreated(storageNodeId) {
12411
- if (this.isCreated || this.initialUtility()) {
12412
- return;
12413
- }
12414
- this.instructionApiService
12415
- .createUtility(storageNodeId)
12416
- .pipe(takeUntilDestroyed(this.destroyRef))
12417
- .subscribe((instruction) => {
12418
- this.isCreated = true;
12419
- this._instruction().set(instruction);
12420
- });
12505
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalFolderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12506
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", 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", "isSelected"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12507
+ }
12508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalFolderComponent, decorators: [{
12509
+ type: Component,
12510
+ 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"] }]
12511
+ }] });
12512
+
12513
+ class CuiSelectModalSearchComponent {
12514
+ constructor() {
12515
+ this.destroyRef = inject(DestroyRef);
12516
+ this.searchControl = input(new FormControl(''));
12517
+ this.controlDelay = input(700);
12518
+ this.searchStringChanged = output();
12421
12519
  }
12422
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiInstructionModalCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12423
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiInstructionModalCreateComponent, isStandalone: true, selector: "ng-component", inputs: { initialUtility: { classPropertyName: "initialUtility", publicName: "initialUtility", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<cui-utility-modal-create [initialUtility]=\"instruction()\">\n <cui-instruction-info\n [instruction]=\"instruction()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (instructionCreated)=\"onInstructionCreated($event)\"\n />\n</cui-utility-modal-create>\n", dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiUtilityModalCreateComponent, selector: "cui-utility-modal-create", inputs: ["initialUtility"] }, { kind: "component", type: CuiInstructionInfoComponent, selector: "cui-instruction-info", inputs: ["instruction", "config"], outputs: ["instructionChange", "validationChanged", "instructionCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12520
+ ngOnInit() {
12521
+ this.searchControl()
12522
+ .valueChanges.pipe(debounceTime(this.controlDelay()), takeUntilDestroyed(this.destroyRef))
12523
+ .subscribe((value) => this.searchStringChanged.emit(value));
12524
+ }
12525
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12526
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiSelectModalSearchComponent, isStandalone: true, selector: "cui-select-modal-search", inputs: { searchControl: { classPropertyName: "searchControl", publicName: "searchControl", isSignal: true, isRequired: false, transformFunction: null }, controlDelay: { classPropertyName: "controlDelay", publicName: "controlDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchStringChanged: "searchStringChanged" }, 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 }); }
12424
12527
  }
12425
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiInstructionModalCreateComponent, decorators: [{
12528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalSearchComponent, decorators: [{
12426
12529
  type: Component,
12427
- args: [{ imports: [CuiButtonModule, CuiSvgModule, CuiUtilityModalCreateComponent, CuiInstructionInfoComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-utility-modal-create [initialUtility]=\"instruction()\">\n <cui-instruction-info\n [instruction]=\"instruction()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (instructionCreated)=\"onInstructionCreated($event)\"\n />\n</cui-utility-modal-create>\n" }]
12530
+ 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"] }]
12428
12531
  }] });
12429
12532
 
12430
- class CuiUtilityReadonlyThumbnailComponent {
12533
+ class CuiSelectModalComponent {
12431
12534
  constructor() {
12432
- this.thumbnailUrl = input.required();
12433
- this.isVideo = input(false);
12535
+ this.context = inject(CUI_DIALOG_CONTEXT);
12536
+ this.data = this.context.data;
12537
+ this.heading = this.data.heading;
12538
+ this.leftData = this.data.leftData;
12539
+ this.rightData = this.data.rightData;
12434
12540
  }
12435
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityReadonlyThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12436
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiUtilityReadonlyThumbnailComponent, isStandalone: true, selector: "cui-utility-readonly-thumbnail", inputs: { thumbnailUrl: { classPropertyName: "thumbnailUrl", publicName: "thumbnailUrl", isSignal: true, isRequired: true, transformFunction: null }, isVideo: { classPropertyName: "isVideo", publicName: "isVideo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let url = thumbnailUrl();\n\n@if (url?.src; as src) {\n @if (isVideo()) {\n <video\n class=\"thumbnail\"\n [src]=\"src\"\n controls\n ></video>\n } @else {\n <img\n class=\"thumbnail\"\n [src]=\"src\"\n [alt]=\"url?.name\"\n />\n }\n}\n", styles: [".thumbnail{width:100%;max-height:271px;object-fit:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12541
+ onCancel() {
12542
+ this.context.completeWith();
12543
+ }
12544
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12545
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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 }); }
12437
12546
  }
12438
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityReadonlyThumbnailComponent, decorators: [{
12547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalComponent, decorators: [{
12439
12548
  type: Component,
12440
- args: [{ selector: 'cui-utility-readonly-thumbnail', imports: [], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let url = thumbnailUrl();\n\n@if (url?.src; as src) {\n @if (isVideo()) {\n <video\n class=\"thumbnail\"\n [src]=\"src\"\n controls\n ></video>\n } @else {\n <img\n class=\"thumbnail\"\n [src]=\"src\"\n [alt]=\"url?.name\"\n />\n }\n}\n", styles: [".thumbnail{width:100%;max-height:271px;object-fit:contain}\n"] }]
12549
+ args: [{ imports: [
12550
+ CuiButtonModule,
12551
+ CuiDialogModule,
12552
+ CuiIconButtonModule,
12553
+ CuiInputModule,
12554
+ NgComponentOutlet,
12555
+ TranslocoDirective
12556
+ ], 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"] }]
12441
12557
  }] });
12442
12558
 
12443
- class CuiCriterionReadonlyInfoComponent {
12559
+ class CuiSelectModalService {
12444
12560
  constructor() {
12445
- this.hostElement = inject(ElementRef).nativeElement;
12446
- this.frameApiService = inject(CuiFrameApiService);
12447
- this.resourceApiService = inject(CuiResourceApiService);
12448
- this.isVideo = false;
12449
- this.jText = signal(null);
12450
- this.resource = signal(null);
12451
- this.thumbnailUrl = computed(() => {
12452
- const resource = this.resource();
12453
- if (!resource?.fileId) {
12454
- return of(null);
12455
- }
12456
- return this.resourceApiService.get(resource.fileId, this.config().requestOptions).pipe(map((url) => {
12457
- return {
12458
- src: URL.createObjectURL(url),
12459
- name: resource.name || resource.type
12460
- };
12461
- }));
12462
- });
12463
- this.isDescriptionEmpty = computed(() => !this.jText()?.notEmpty);
12464
- this.framerId = input.required();
12465
- this.config = input.required();
12466
- this.initConfigEffect();
12467
- this.initFramerIdEffect();
12561
+ this.selectedElementSignal = signal(null);
12562
+ this.selectedElement = this.selectedElementSignal.asReadonly();
12468
12563
  }
12469
- initConfigEffect() {
12564
+ getSelectedData() {
12565
+ return this.selectedElementSignal.asReadonly();
12566
+ }
12567
+ set(element) {
12568
+ this.selectedElementSignal.set(element);
12569
+ }
12570
+ delete() {
12571
+ this.selectedElementSignal.set(null);
12572
+ }
12573
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
12574
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalService }); }
12575
+ }
12576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalService, decorators: [{
12577
+ type: Injectable
12578
+ }] });
12579
+
12580
+ const CUI_STORAGE_LIST_SERVICE_TOKEN = new InjectionToken('STORAGE_LIST_SERVICE_TOKEN');
12581
+
12582
+ class CuiStorageListItemComponent {
12583
+ constructor() {
12584
+ this.storageListService = inject(CUI_STORAGE_LIST_SERVICE_TOKEN);
12585
+ this.isLoadingChildren = false;
12586
+ this.isLoadingElements = false;
12587
+ this.storageChildren = signal([]);
12588
+ this.storageElements = signal([]);
12589
+ this.areContentOpened = signal(false);
12590
+ this.openCloseButtonIcon = computed(() => this.areContentOpened() ? 'cuiIconChevronDown' : 'cuiIconChevronRight');
12591
+ this.hasContent = computed(() => this.storage().children.length || this.storageChildren().length || this.storageElements().length);
12592
+ this.storage = input.required();
12593
+ this.elementSlot = input();
12594
+ this.itemSlot = input();
12595
+ this.initStorageChildrenEffect();
12596
+ this.initStorageElementsEffect();
12597
+ }
12598
+ onToggleChildren(event) {
12599
+ event.preventDefault();
12600
+ this.areContentOpened.update((prevAreChildrenOpened) => !prevAreChildrenOpened);
12601
+ }
12602
+ initStorageChildrenEffect() {
12470
12603
  effect(() => {
12471
- this.editorConfig = { readOnly: true, element: this.hostElement, ...this.config() };
12604
+ const storage = this.storage();
12605
+ this.areContentOpened();
12606
+ untracked(this.setChildren.bind(this, storage));
12472
12607
  });
12473
12608
  }
12474
- initFramerIdEffect() {
12609
+ initStorageElementsEffect() {
12475
12610
  effect(() => {
12476
- const framerId = this.framerId();
12477
- if (!framerId) {
12478
- return;
12479
- }
12480
- this.subscription?.unsubscribe();
12481
- this.initFrameFragments();
12611
+ const storage = this.storage();
12612
+ untracked(this.setElements.bind(this, storage));
12482
12613
  });
12483
12614
  }
12484
- initFrameFragments() {
12485
- const frameId = this.framerId();
12486
- this.jText.set(null);
12487
- this.resource.set(null);
12488
- if (!frameId) {
12615
+ setChildren(storage) {
12616
+ const storageChildren = storage.children;
12617
+ if (!storageChildren.length) {
12618
+ this.storageChildren.set([]);
12619
+ }
12620
+ if (this.isLoadingChildren || !this.areContentOpened()) {
12489
12621
  return;
12490
12622
  }
12491
- const fragmentActions = {
12492
- ["J_TEXT" /* FragmentType.jText */]: (fragment) => {
12493
- this.jText.set(fragment);
12494
- },
12495
- ["RESOURCE_FILE" /* FragmentType.resourceFile */]: (fragment) => {
12496
- this.resource.set(fragment);
12497
- }
12498
- };
12499
- this.subscription = this.frameApiService.getFrame(frameId, this.config().requestOptions).subscribe((frame) => {
12500
- frame.fragments.forEach((fragment) => fragmentActions[fragment.type](fragment));
12501
- });
12623
+ if (typeof storageChildren[0] !== 'string') {
12624
+ this.storageChildren.set(storageChildren);
12625
+ return;
12626
+ }
12627
+ this.isLoadingChildren = true;
12628
+ this.storageListService
12629
+ .getChildren?.(storage, this.storageChildren())
12630
+ .pipe(finalize(() => (this.isLoadingChildren = false)))
12631
+ .subscribe((response) => this.storageChildren.set(response));
12502
12632
  }
12503
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionReadonlyInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12504
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiCriterionReadonlyInfoComponent, isStandalone: true, selector: "cui-criterion-readonly-info", inputs: { framerId: { classPropertyName: "framerId", publicName: "framerId", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n @if (jText()) {\n @if (!isDescriptionEmpty()) {\n @if (thumbnailUrl() | async; as thumbnailUrl) {\n <cui-utility-readonly-thumbnail\n [thumbnailUrl]=\"thumbnailUrl\"\n [isVideo]=\"isVideo\"\n />\n }\n\n @if (jText()?.id; as id) {\n <div class=\"wrapper\">\n <cui-editor\n class=\"editor\"\n [editorApiId]=\"id\"\n [config]=\"editorConfig\"\n />\n </div>\n }\n } @else {\n <cui-empty-state [subtitle]=\"t('NO_DESCRIPTION_WAS_PROVIDED')\" />\n }\n }\n</ng-container>\n", styles: [":host{padding-top:16px;padding-right:16px;padding-left:16px;display:flex;flex-direction:column;gap:12px;height:100%;overflow:auto}.wrapper{padding:12px}.editor{display:block;height:100%;overflow:auto}\n"], dependencies: [{ kind: "component", type: CuiEditorComponent, selector: "cui-editor", inputs: ["editorApiId", "config", "requestSize"], outputs: ["editorEmpty", "editorReady"] }, { kind: "component", type: CuiEmptyStateComponent, selector: "cui-empty-state, [cuiEmptyState]", inputs: ["title", "subtitle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CuiUtilityReadonlyThumbnailComponent, selector: "cui-utility-readonly-thumbnail", inputs: ["thumbnailUrl", "isVideo"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12633
+ setElements(storage) {
12634
+ const storageElements = storage.elements;
12635
+ if (this.isLoadingElements) {
12636
+ return;
12637
+ }
12638
+ if (!storageElements?.length) {
12639
+ this.storageElements.set([]);
12640
+ return;
12641
+ }
12642
+ if (this.storageElements().length) {
12643
+ this.storageElements.set(storageElements);
12644
+ return;
12645
+ }
12646
+ this.isLoadingElements = true;
12647
+ this.storageListService
12648
+ .getElements?.(storage, this.storageElements())
12649
+ .pipe(finalize(() => (this.isLoadingElements = false)))
12650
+ .subscribe((response) => this.storageElements.set(response));
12651
+ }
12652
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12653
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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;border-left:1px solid 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 }); }
12505
12654
  }
12506
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionReadonlyInfoComponent, decorators: [{
12655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListItemComponent, decorators: [{
12507
12656
  type: Component,
12508
- args: [{ selector: 'cui-criterion-readonly-info', imports: [CuiEditorComponent, CuiEmptyStateComponent, AsyncPipe, TranslocoDirective, CuiUtilityReadonlyThumbnailComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\n @if (jText()) {\n @if (!isDescriptionEmpty()) {\n @if (thumbnailUrl() | async; as thumbnailUrl) {\n <cui-utility-readonly-thumbnail\n [thumbnailUrl]=\"thumbnailUrl\"\n [isVideo]=\"isVideo\"\n />\n }\n\n @if (jText()?.id; as id) {\n <div class=\"wrapper\">\n <cui-editor\n class=\"editor\"\n [editorApiId]=\"id\"\n [config]=\"editorConfig\"\n />\n </div>\n }\n } @else {\n <cui-empty-state [subtitle]=\"t('NO_DESCRIPTION_WAS_PROVIDED')\" />\n }\n }\n</ng-container>\n", styles: [":host{padding-top:16px;padding-right:16px;padding-left:16px;display:flex;flex-direction:column;gap:12px;height:100%;overflow:auto}.wrapper{padding:12px}.editor{display:block;height:100%;overflow:auto}\n"] }]
12657
+ 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;border-left:1px solid 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"] }]
12509
12658
  }], ctorParameters: () => [] });
12510
12659
 
12511
- class CuiReadonlyUtilityModalComponent {
12660
+ class CuiStorageListComponent {
12512
12661
  constructor() {
12513
- this.destroyRef = inject(DestroyRef);
12514
- this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12515
- this.utilityModalService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12516
- this.editorResourceUrl = this.cuiDialogContext.data.editorResourceUrl;
12517
- this.tools = this.cuiDialogContext.data.tools;
12518
- this.header = this.cuiDialogContext.data.header;
12519
- this.isLoading = signal(false);
12520
- this.utility = input.required();
12521
- this.utilityUnbinded = output();
12522
- }
12523
- onClose() {
12524
- this.cuiDialogContext.completeWith();
12525
- }
12526
- onUnbind() {
12527
- this.isLoading.set(true);
12528
- this.utilityModalService
12529
- .unbindUtility(this.utility().id)
12530
- .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.isLoading.set(false)))
12531
- .subscribe((utility) => {
12532
- this.utilityUnbinded.emit(utility);
12533
- });
12662
+ this.storages = input.required();
12663
+ this.elementSlot = input();
12664
+ this.itemSlot = input();
12534
12665
  }
12535
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiReadonlyUtilityModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12536
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiReadonlyUtilityModalComponent, isStandalone: true, selector: "cui-readonly-utility-modal", inputs: { utility: { classPropertyName: "utility", publicName: "utility", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { utilityUnbinded: "utilityUnbinded" }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <cui-badge\n color=\"violet\"\n class=\"badge\"\n >\n <cui-svg\n cuiBadgeIcon\n class=\"icon\"\n icon=\"cuiIconVariant\"\n />\n {{ t('INSERTED') }}\n </cui-badge>\n\n <button\n type=\"button\"\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n class=\"button\"\n (click)=\"onClose()\"\n ></button>\n </header>\n\n <ng-content />\n\n <div class=\"actions\">\n <button\n type=\"button\"\n #button\n cuiButton\n size=\"sm\"\n icon=\"cuiIconLinkBroken\"\n appearance=\"action-violet\"\n [isLoaderShown]=\"isLoading()\"\n (click)=\"onUnbind()\"\n >\n {{ t('UNBIND') }}\n </button>\n </div>\n</ng-container>\n", styles: [".header{display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:flex-start;padding:16px 24px}.header__title{font-weight:500;font-size:16px;line-height:24px}.button{margin-left:auto}.actions{padding:16px;border-top:1px solid var(--cui-base-200)}.badge{display:flex;flex-direction:row;gap:4px;align-items:center;justify-content:flex-start;font-weight:500;font-size:14px;line-height:20px}\n"], dependencies: [{ kind: "ngmodule", type: CuiBadgeModule }, { kind: "component", type: CuiBadgeComponent, selector: "cui-badge", inputs: ["color", "size", "variant"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "theme", "size"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12667
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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 }); }
12537
12668
  }
12538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiReadonlyUtilityModalComponent, decorators: [{
12669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListComponent, decorators: [{
12539
12670
  type: Component,
12540
- args: [{ selector: 'cui-readonly-utility-modal', imports: [CuiBadgeModule, CuiButtonModule, CuiSvgModule, NgTemplateOutlet, TranslocoDirective], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <cui-badge\n color=\"violet\"\n class=\"badge\"\n >\n <cui-svg\n cuiBadgeIcon\n class=\"icon\"\n icon=\"cuiIconVariant\"\n />\n {{ t('INSERTED') }}\n </cui-badge>\n\n <button\n type=\"button\"\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n class=\"button\"\n (click)=\"onClose()\"\n ></button>\n </header>\n\n <ng-content />\n\n <div class=\"actions\">\n <button\n type=\"button\"\n #button\n cuiButton\n size=\"sm\"\n icon=\"cuiIconLinkBroken\"\n appearance=\"action-violet\"\n [isLoaderShown]=\"isLoading()\"\n (click)=\"onUnbind()\"\n >\n {{ t('UNBIND') }}\n </button>\n </div>\n</ng-container>\n", styles: [".header{display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:flex-start;padding:16px 24px}.header__title{font-weight:500;font-size:16px;line-height:24px}.button{margin-left:auto}.actions{padding:16px;border-top:1px solid var(--cui-base-200)}.badge{display:flex;flex-direction:row;gap:4px;align-items:center;justify-content:flex-start;font-weight:500;font-size:14px;line-height:20px}\n"] }]
12671
+ 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"] }]
12541
12672
  }] });
12542
12673
 
12543
- class CuiReadonlyCriterionModalComponent {
12674
+ class CuiUtilityModalCreateComponent {
12544
12675
  constructor() {
12676
+ this.window = inject(CUI_WINDOW);
12545
12677
  this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12546
- this.cuiRenderDynamicComponentsService = inject(CuiRenderDynamicComponentsService);
12678
+ this.utilityModalService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12679
+ this.prevUtility = this.cuiDialogContext.data.utility;
12680
+ this.editorResourceUrl = this.cuiDialogContext.data.editorResourceUrl;
12547
12681
  this.tools = this.cuiDialogContext.data.tools;
12548
12682
  this.header = this.cuiDialogContext.data.header;
12549
- this.isLoading = signal(false);
12550
- this.config = computed(() => ({
12551
- tools: this.tools(),
12552
- requestOptions: this.context(),
12553
- element: this.element()?.nativeElement
12554
- }));
12555
- this.framerId = computed(() => this.criterion().storageElement.framerCriterionId);
12556
- this.element = viewChild('scrollContainer');
12557
- this.criterion = input.required();
12558
- this.context = input.required();
12683
+ this._utility = computed(() => signal(this.initialUtility()));
12684
+ this.isFormValid = signal(false);
12685
+ this.utility = computed(() => this._utility()());
12686
+ this.initialUtility = input.required();
12559
12687
  }
12560
- onUnbind(criterion) {
12561
- this.cuiRenderDynamicComponentsService.closeAll();
12562
- this.cuiRenderDynamicComponentsService.open({
12688
+ ngOnInit() {
12689
+ this.initWindowUnloadEvent();
12690
+ }
12691
+ ngOnDestroy() {
12692
+ this.window.onbeforeunload = null;
12693
+ }
12694
+ onSave() {
12695
+ this.cuiDialogContext.completeWith(this.initialUtility() ? { prevId: this.prevUtility.id, ...this.utility() } : this.utility());
12696
+ }
12697
+ onCancel() {
12698
+ this.destroyUtility();
12699
+ const returnedValue = this.initialUtility() ? this.utility() : null;
12700
+ this.cuiDialogContext.completeWith(returnedValue);
12701
+ }
12702
+ initWindowUnloadEvent() {
12703
+ this.window.onbeforeunload = () => this.destroyUtility();
12704
+ }
12705
+ destroyUtility() {
12706
+ const utility = this.utility();
12707
+ if (!utility || this.initialUtility()) {
12708
+ return;
12709
+ }
12710
+ this.utilityModalService.deleteUtility(utility).subscribe();
12711
+ }
12712
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityModalCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12713
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiUtilityModalCreateComponent, isStandalone: true, selector: "cui-utility-modal-create", inputs: { initialUtility: { classPropertyName: "initialUtility", publicName: "initialUtility", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"wrapper\"\n *transloco=\"let t\"\n>\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <div class=\"header__content\">\n <cui-loader\n type=\"stated\"\n color=\"var(--cui-base-500)\"\n />\n\n <div class=\"actions\">\n @if (!initialUtility()) {\n <button\n type=\"button\"\n cuiButton\n appearance=\"secondary\"\n (click)=\"onCancel()\"\n >\n {{ t('CANCEL') }}\n </button>\n }\n\n <button\n type=\"button\"\n cuiButton\n [disabled]=\"!isFormValid()\"\n appearance=\"action-violet\"\n (click)=\"onSave()\"\n >\n {{ t('DONE') }}\n </button>\n </div>\n </div>\n </header>\n\n <ng-content />\n</div>\n", styles: [".header{display:flex;flex-direction:row;gap:0;align-items:center;justify-content:space-between;padding:16px 24px}.header__content{display:flex;flex-direction:row;gap:8px}.actions{display:flex;flex-direction:row;gap:16px}\n"], dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "theme", "size"] }, { kind: "component", type: CuiLoaderComponent, selector: "cui-loader", inputs: ["type", "position", "size", "color"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12714
+ }
12715
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityModalCreateComponent, decorators: [{
12716
+ type: Component,
12717
+ args: [{ selector: 'cui-utility-modal-create', imports: [CuiButtonModule, CuiLoaderComponent, CuiSvgModule, NgTemplateOutlet, TranslocoDirective], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"wrapper\"\n *transloco=\"let t\"\n>\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <div class=\"header__content\">\n <cui-loader\n type=\"stated\"\n color=\"var(--cui-base-500)\"\n />\n\n <div class=\"actions\">\n @if (!initialUtility()) {\n <button\n type=\"button\"\n cuiButton\n appearance=\"secondary\"\n (click)=\"onCancel()\"\n >\n {{ t('CANCEL') }}\n </button>\n }\n\n <button\n type=\"button\"\n cuiButton\n [disabled]=\"!isFormValid()\"\n appearance=\"action-violet\"\n (click)=\"onSave()\"\n >\n {{ t('DONE') }}\n </button>\n </div>\n </div>\n </header>\n\n <ng-content />\n</div>\n", styles: [".header{display:flex;flex-direction:row;gap:0;align-items:center;justify-content:space-between;padding:16px 24px}.header__content{display:flex;flex-direction:row;gap:8px}.actions{display:flex;flex-direction:row;gap:16px}\n"] }]
12718
+ }] });
12719
+
12720
+ class CuiCriterionModalCreateComponent {
12721
+ constructor() {
12722
+ this.destroyRef = inject(DestroyRef);
12723
+ this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12724
+ this.criterionApiService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12725
+ this.isCreated = false;
12726
+ this.editorResourceUrl = this.cuiDialogContext.data.editorResourceUrl;
12727
+ this.tools = this.cuiDialogContext.data.tools;
12728
+ this.header = this.cuiDialogContext.data.header;
12729
+ this._criterion = computed(() => signal(this.initialUtility()));
12730
+ this.isFormValid = signal(false);
12731
+ this.criterion = computed(() => this._criterion()());
12732
+ this.initialUtility = input.required();
12733
+ this.config = input.required();
12734
+ }
12735
+ onCriterionCreated(storageNodeId) {
12736
+ if (this.isCreated || this.initialUtility()) {
12737
+ return;
12738
+ }
12739
+ this.criterionApiService
12740
+ .createUtility(storageNodeId)
12741
+ .pipe(takeUntilDestroyed(this.destroyRef))
12742
+ .subscribe((criterion) => {
12743
+ this.isCreated = true;
12744
+ this._criterion().set(criterion);
12745
+ });
12746
+ }
12747
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionModalCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12748
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiCriterionModalCreateComponent, isStandalone: true, selector: "ng-component", inputs: { initialUtility: { classPropertyName: "initialUtility", publicName: "initialUtility", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<cui-utility-modal-create [initialUtility]=\"criterion()\">\n <cui-criterion-info\n [criterion]=\"criterion()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (criterionCreated)=\"onCriterionCreated($event)\"\n />\n</cui-utility-modal-create>\n", dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiCriterionInfoComponent, selector: "cui-criterion-info", inputs: ["criterion", "config"], outputs: ["criterionChange", "validationChanged", "criterionCreated"] }, { kind: "component", type: CuiUtilityModalCreateComponent, selector: "cui-utility-modal-create", inputs: ["initialUtility"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12749
+ }
12750
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionModalCreateComponent, decorators: [{
12751
+ type: Component,
12752
+ args: [{ imports: [CuiButtonModule, CuiSvgModule, CuiCriterionInfoComponent, CuiUtilityModalCreateComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-utility-modal-create [initialUtility]=\"criterion()\">\n <cui-criterion-info\n [criterion]=\"criterion()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (criterionCreated)=\"onCriterionCreated($event)\"\n />\n</cui-utility-modal-create>\n" }]
12753
+ }] });
12754
+
12755
+ class CuiInstructionModalCreateComponent {
12756
+ constructor() {
12757
+ this.destroyRef = inject(DestroyRef);
12758
+ this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12759
+ this.instructionApiService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12760
+ this.isCreated = false;
12761
+ this.tools = this.cuiDialogContext.data.tools;
12762
+ this.header = this.cuiDialogContext.data.header;
12763
+ this._instruction = computed(() => signal(this.initialUtility()));
12764
+ this.isFormValid = signal(false);
12765
+ this.instruction = computed(() => this._instruction()());
12766
+ this.initialUtility = input.required();
12767
+ this.config = input.required();
12768
+ }
12769
+ onInstructionCreated(storageNodeId) {
12770
+ if (this.isCreated || this.initialUtility()) {
12771
+ return;
12772
+ }
12773
+ this.instructionApiService
12774
+ .createUtility(storageNodeId)
12775
+ .pipe(takeUntilDestroyed(this.destroyRef))
12776
+ .subscribe((instruction) => {
12777
+ this.isCreated = true;
12778
+ this._instruction().set(instruction);
12779
+ });
12780
+ }
12781
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiInstructionModalCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12782
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiInstructionModalCreateComponent, isStandalone: true, selector: "ng-component", inputs: { initialUtility: { classPropertyName: "initialUtility", publicName: "initialUtility", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<cui-utility-modal-create [initialUtility]=\"instruction()\">\n <cui-instruction-info\n [instruction]=\"instruction()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (instructionCreated)=\"onInstructionCreated($event)\"\n />\n</cui-utility-modal-create>\n", dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiUtilityModalCreateComponent, selector: "cui-utility-modal-create", inputs: ["initialUtility"] }, { kind: "component", type: CuiInstructionInfoComponent, selector: "cui-instruction-info", inputs: ["instruction", "config"], outputs: ["instructionChange", "validationChanged", "instructionCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12783
+ }
12784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiInstructionModalCreateComponent, decorators: [{
12785
+ type: Component,
12786
+ args: [{ imports: [CuiButtonModule, CuiSvgModule, CuiUtilityModalCreateComponent, CuiInstructionInfoComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-utility-modal-create [initialUtility]=\"instruction()\">\n <cui-instruction-info\n [instruction]=\"instruction()\"\n [config]=\"config()\"\n (validationChanged)=\"isFormValid.set($event)\"\n (instructionCreated)=\"onInstructionCreated($event)\"\n />\n</cui-utility-modal-create>\n" }]
12787
+ }] });
12788
+
12789
+ class CuiUtilityReadonlyThumbnailComponent {
12790
+ constructor() {
12791
+ this.thumbnailUrl = input.required();
12792
+ this.isVideo = input(false);
12793
+ }
12794
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityReadonlyThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12795
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiUtilityReadonlyThumbnailComponent, isStandalone: true, selector: "cui-utility-readonly-thumbnail", inputs: { thumbnailUrl: { classPropertyName: "thumbnailUrl", publicName: "thumbnailUrl", isSignal: true, isRequired: true, transformFunction: null }, isVideo: { classPropertyName: "isVideo", publicName: "isVideo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let url = thumbnailUrl();\n\n@if (url?.src; as src) {\n @if (isVideo()) {\n <video\n class=\"thumbnail\"\n [src]=\"src\"\n controls\n ></video>\n } @else {\n <img\n class=\"thumbnail\"\n [src]=\"src\"\n [alt]=\"url?.name\"\n />\n }\n}\n", styles: [".thumbnail{width:100%;max-height:271px;object-fit:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12796
+ }
12797
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUtilityReadonlyThumbnailComponent, decorators: [{
12798
+ type: Component,
12799
+ args: [{ selector: 'cui-utility-readonly-thumbnail', imports: [], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let url = thumbnailUrl();\n\n@if (url?.src; as src) {\n @if (isVideo()) {\n <video\n class=\"thumbnail\"\n [src]=\"src\"\n controls\n ></video>\n } @else {\n <img\n class=\"thumbnail\"\n [src]=\"src\"\n [alt]=\"url?.name\"\n />\n }\n}\n", styles: [".thumbnail{width:100%;max-height:271px;object-fit:contain}\n"] }]
12800
+ }] });
12801
+
12802
+ class CuiCriterionReadonlyInfoComponent {
12803
+ constructor() {
12804
+ this.hostElement = inject(ElementRef).nativeElement;
12805
+ this.frameApiService = inject(CuiFrameApiService);
12806
+ this.resourceApiService = inject(CuiResourceApiService);
12807
+ this.isVideo = false;
12808
+ this.jText = signal(null);
12809
+ this.resource = signal(null);
12810
+ this.thumbnailUrl = computed(() => {
12811
+ const resource = this.resource();
12812
+ if (!resource?.fileId) {
12813
+ return of(null);
12814
+ }
12815
+ return this.resourceApiService.get(resource.fileId, this.config().requestOptions).pipe(map((url) => {
12816
+ return {
12817
+ src: URL.createObjectURL(url),
12818
+ name: resource.name || resource.type
12819
+ };
12820
+ }));
12821
+ });
12822
+ this.isDescriptionEmpty = computed(() => !this.jText()?.notEmpty);
12823
+ this.framerId = input.required();
12824
+ this.config = input.required();
12825
+ this.initConfigEffect();
12826
+ this.initFramerIdEffect();
12827
+ }
12828
+ initConfigEffect() {
12829
+ effect(() => {
12830
+ this.editorConfig = { readOnly: true, element: this.hostElement, ...this.config() };
12831
+ });
12832
+ }
12833
+ initFramerIdEffect() {
12834
+ effect(() => {
12835
+ const framerId = this.framerId();
12836
+ if (!framerId) {
12837
+ return;
12838
+ }
12839
+ this.subscription?.unsubscribe();
12840
+ this.initFrameFragments();
12841
+ });
12842
+ }
12843
+ initFrameFragments() {
12844
+ const frameId = this.framerId();
12845
+ this.jText.set(null);
12846
+ this.resource.set(null);
12847
+ if (!frameId) {
12848
+ return;
12849
+ }
12850
+ const fragmentActions = {
12851
+ ["J_TEXT" /* FragmentType.jText */]: (fragment) => {
12852
+ this.jText.set(fragment);
12853
+ },
12854
+ ["RESOURCE_FILE" /* FragmentType.resourceFile */]: (fragment) => {
12855
+ this.resource.set(fragment);
12856
+ }
12857
+ };
12858
+ this.subscription = this.frameApiService.getFrame(frameId, this.config().requestOptions).subscribe((frame) => {
12859
+ frame.fragments.forEach((fragment) => fragmentActions[fragment.type](fragment));
12860
+ });
12861
+ }
12862
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionReadonlyInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12863
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiCriterionReadonlyInfoComponent, isStandalone: true, selector: "cui-criterion-readonly-info", inputs: { framerId: { classPropertyName: "framerId", publicName: "framerId", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n @if (jText()) {\n @if (!isDescriptionEmpty()) {\n @if (thumbnailUrl() | async; as thumbnailUrl) {\n <cui-utility-readonly-thumbnail\n [thumbnailUrl]=\"thumbnailUrl\"\n [isVideo]=\"isVideo\"\n />\n }\n\n @if (jText()?.id; as id) {\n <div class=\"wrapper\">\n <cui-editor\n class=\"editor\"\n [editorApiId]=\"id\"\n [config]=\"editorConfig\"\n />\n </div>\n }\n } @else {\n <cui-empty-state [subtitle]=\"t('NO_DESCRIPTION_WAS_PROVIDED')\" />\n }\n }\n</ng-container>\n", styles: [":host{padding-top:16px;padding-right:16px;padding-left:16px;display:flex;flex-direction:column;gap:12px;height:100%;overflow:auto}.wrapper{padding:12px}.editor{display:block;height:100%;overflow:auto}\n"], dependencies: [{ kind: "component", type: CuiEditorComponent, selector: "cui-editor", inputs: ["editorApiId", "config", "requestSize"], outputs: ["editorEmpty", "editorReady"] }, { kind: "component", type: CuiEmptyStateComponent, selector: "cui-empty-state, [cuiEmptyState]", inputs: ["title", "subtitle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CuiUtilityReadonlyThumbnailComponent, selector: "cui-utility-readonly-thumbnail", inputs: ["thumbnailUrl", "isVideo"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12864
+ }
12865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionReadonlyInfoComponent, decorators: [{
12866
+ type: Component,
12867
+ args: [{ selector: 'cui-criterion-readonly-info', imports: [CuiEditorComponent, CuiEmptyStateComponent, AsyncPipe, TranslocoDirective, CuiUtilityReadonlyThumbnailComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\n @if (jText()) {\n @if (!isDescriptionEmpty()) {\n @if (thumbnailUrl() | async; as thumbnailUrl) {\n <cui-utility-readonly-thumbnail\n [thumbnailUrl]=\"thumbnailUrl\"\n [isVideo]=\"isVideo\"\n />\n }\n\n @if (jText()?.id; as id) {\n <div class=\"wrapper\">\n <cui-editor\n class=\"editor\"\n [editorApiId]=\"id\"\n [config]=\"editorConfig\"\n />\n </div>\n }\n } @else {\n <cui-empty-state [subtitle]=\"t('NO_DESCRIPTION_WAS_PROVIDED')\" />\n }\n }\n</ng-container>\n", styles: [":host{padding-top:16px;padding-right:16px;padding-left:16px;display:flex;flex-direction:column;gap:12px;height:100%;overflow:auto}.wrapper{padding:12px}.editor{display:block;height:100%;overflow:auto}\n"] }]
12868
+ }], ctorParameters: () => [] });
12869
+
12870
+ class CuiReadonlyUtilityModalComponent {
12871
+ constructor() {
12872
+ this.destroyRef = inject(DestroyRef);
12873
+ this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12874
+ this.utilityModalService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12875
+ this.editorResourceUrl = this.cuiDialogContext.data.editorResourceUrl;
12876
+ this.tools = this.cuiDialogContext.data.tools;
12877
+ this.header = this.cuiDialogContext.data.header;
12878
+ this.isLoading = signal(false);
12879
+ this.utility = input.required();
12880
+ this.utilityUnbinded = output();
12881
+ }
12882
+ onClose() {
12883
+ this.cuiDialogContext.completeWith();
12884
+ }
12885
+ onUnbind() {
12886
+ this.isLoading.set(true);
12887
+ this.utilityModalService
12888
+ .unbindUtility(this.utility().id)
12889
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.isLoading.set(false)))
12890
+ .subscribe((utility) => {
12891
+ this.utilityUnbinded.emit(utility);
12892
+ });
12893
+ }
12894
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiReadonlyUtilityModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12895
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiReadonlyUtilityModalComponent, isStandalone: true, selector: "cui-readonly-utility-modal", inputs: { utility: { classPropertyName: "utility", publicName: "utility", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { utilityUnbinded: "utilityUnbinded" }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <cui-badge\n color=\"violet\"\n class=\"badge\"\n >\n <cui-svg\n cuiBadgeIcon\n class=\"icon\"\n icon=\"cuiIconVariant\"\n />\n {{ t('INSERTED') }}\n </cui-badge>\n\n <button\n type=\"button\"\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n class=\"button\"\n (click)=\"onClose()\"\n ></button>\n </header>\n\n <ng-content />\n\n <div class=\"actions\">\n <button\n type=\"button\"\n #button\n cuiButton\n size=\"sm\"\n icon=\"cuiIconLinkBroken\"\n appearance=\"action-violet\"\n [isLoaderShown]=\"isLoading()\"\n (click)=\"onUnbind()\"\n >\n {{ t('UNBIND') }}\n </button>\n </div>\n</ng-container>\n", styles: [".header{display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:flex-start;padding:16px 24px}.header__title{font-weight:500;font-size:16px;line-height:24px}.button{margin-left:auto}.actions{padding:16px;border-top:1px solid var(--cui-base-200)}.badge{display:flex;flex-direction:row;gap:4px;align-items:center;justify-content:flex-start;font-weight:500;font-size:14px;line-height:20px}\n"], dependencies: [{ kind: "ngmodule", type: CuiBadgeModule }, { kind: "component", type: CuiBadgeComponent, selector: "cui-badge", inputs: ["color", "size", "variant"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "theme", "size"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12896
+ }
12897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiReadonlyUtilityModalComponent, decorators: [{
12898
+ type: Component,
12899
+ args: [{ selector: 'cui-readonly-utility-modal', imports: [CuiBadgeModule, CuiButtonModule, CuiSvgModule, NgTemplateOutlet, TranslocoDirective], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\n <header class=\"header\">\n <ng-container [ngTemplateOutlet]=\"header\" />\n\n <cui-badge\n color=\"violet\"\n class=\"badge\"\n >\n <cui-svg\n cuiBadgeIcon\n class=\"icon\"\n icon=\"cuiIconVariant\"\n />\n {{ t('INSERTED') }}\n </cui-badge>\n\n <button\n type=\"button\"\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n class=\"button\"\n (click)=\"onClose()\"\n ></button>\n </header>\n\n <ng-content />\n\n <div class=\"actions\">\n <button\n type=\"button\"\n #button\n cuiButton\n size=\"sm\"\n icon=\"cuiIconLinkBroken\"\n appearance=\"action-violet\"\n [isLoaderShown]=\"isLoading()\"\n (click)=\"onUnbind()\"\n >\n {{ t('UNBIND') }}\n </button>\n </div>\n</ng-container>\n", styles: [".header{display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:flex-start;padding:16px 24px}.header__title{font-weight:500;font-size:16px;line-height:24px}.button{margin-left:auto}.actions{padding:16px;border-top:1px solid var(--cui-base-200)}.badge{display:flex;flex-direction:row;gap:4px;align-items:center;justify-content:flex-start;font-weight:500;font-size:14px;line-height:20px}\n"] }]
12900
+ }] });
12901
+
12902
+ class CuiReadonlyCriterionModalComponent {
12903
+ constructor() {
12904
+ this.cuiDialogContext = inject(CUI_DIALOG_CONTEXT);
12905
+ this.cuiRenderDynamicComponentsService = inject(CuiRenderDynamicComponentsService);
12906
+ this.tools = this.cuiDialogContext.data.tools;
12907
+ this.header = this.cuiDialogContext.data.header;
12908
+ this.isLoading = signal(false);
12909
+ this.config = computed(() => ({
12910
+ tools: this.tools(),
12911
+ requestOptions: this.context(),
12912
+ element: this.element()?.nativeElement
12913
+ }));
12914
+ this.framerId = computed(() => this.criterion().storageElement.framerCriterionId);
12915
+ this.element = viewChild('scrollContainer');
12916
+ this.criterion = input.required();
12917
+ this.context = input.required();
12918
+ }
12919
+ onUnbind(criterion) {
12920
+ this.cuiRenderDynamicComponentsService.closeAll();
12921
+ this.cuiRenderDynamicComponentsService.open({
12563
12922
  component: CuiCriterionModalCreateComponent,
12564
12923
  inputs: { criterion }
12565
12924
  });
@@ -12705,313 +13064,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
12705
13064
  args: [{ selector: 'cui-utility-modal', imports: [CuiRenderDynamicComponentsComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiRenderDynamicComponentsService], template: "<cui-render-dynamic-components />\n", styles: [".host{display:block;height:calc(100vh - 40px)}\n"] }]
12706
13065
  }], ctorParameters: () => [] });
12707
13066
 
12708
- class CuiCriterionInfoComponent {
12709
- constructor() {
12710
- this.destroyRef = inject(DestroyRef);
12711
- this.translocoService = inject(TranslocoService);
12712
- this.cuiIdService = inject(CuiIdService);
12713
- this.cuiCategoriesModalService = inject(CuiSelectedCategoryService);
12714
- this.treeStructNavigatorApiService = inject(CuiTreeStructNavigatorApiService);
12715
- this.criterionApiService = inject(UTILITY_MODAL_SERVICE_TOKEN);
12716
- this.TYPE = "INSTRUCTION_STORAGE" /* TreeStructType.Instruction */;
12717
- this.skipCategoryChange = false;
12718
- this.categoryId = this.cuiIdService.generate();
12719
- this.category = this.cuiCategoriesModalService.category;
12720
- this.isFormValid = signal(false);
12721
- this.prevCategoryId = signal(null);
12722
- this.editorConfig = signal(null);
12723
- this.labelColor = computed(() => this.category()?.title ? 'var(--cui-base-900)' : 'var(--cui-base-400)');
12724
- this.selectTitle = computed(() => this.category()?.title || this.translocoService.translate('SELECT') + '...');
12725
- this.element = viewChild('scrollContent');
12726
- this.criterion = model();
12727
- this.config = input.required();
12728
- this.validationChanged = output();
12729
- this.criterionCreated = output();
12730
- this.initConfigEffect();
12731
- this.initCategoryEffect();
12732
- }
12733
- ngOnInit() {
12734
- this.initCategory();
12735
- }
12736
- onFormChanged(values, criterionId) {
12737
- const actions = {
12738
- title: (title) => this.changeTitle(title, criterionId),
12739
- description: (description) => this.changeDescription(description, criterionId)
12740
- };
12741
- forkJoin(Object.keys(values).map((key) => actions[key](values[key] || '')))
12742
- .pipe(takeUntilDestroyed(this.destroyRef))
12743
- .subscribe();
12744
- }
12745
- onFormValidationChanged(isValid) {
12746
- this.isFormValid.set(isValid);
12747
- this.validationChanged.emit(isValid);
12748
- }
12749
- initCategoryEffect() {
12750
- effect(() => {
12751
- const category = this.category();
12752
- const storageObjectCriterion = untracked(this.criterion);
12753
- if (!category || this.skipCategoryChange) {
12754
- this.skipCategoryChange = false;
12755
- return;
12756
- }
12757
- if (storageObjectCriterion) {
12758
- this.changeCategory(category.id, storageObjectCriterion.id);
12759
- return;
12760
- }
12761
- this.createCriterion(category.id);
12762
- });
12763
- }
12764
- initConfigEffect() {
12765
- effect(() => {
12766
- const element = this.element()?.nativeElement;
12767
- if (!element) {
12768
- return;
12769
- }
12770
- this.editorConfig.set({ ...this.config(), element });
12771
- });
12772
- }
12773
- initCategory() {
12774
- const storageObjectId = this.criterion()?.id;
12775
- if (!storageObjectId) {
12776
- return;
12777
- }
12778
- this.treeStructNavigatorApiService
12779
- .getCategory(storageObjectId, "CRITERION_STORAGE" /* TreeStructType.Criteria */, this.config().requestOptions)
12780
- .pipe(takeUntilDestroyed(this.destroyRef))
12781
- .subscribe((category) => {
12782
- this.skipCategoryChange = true;
12783
- this.prevCategoryId.set(category.id);
12784
- this.cuiCategoriesModalService.setCurrentCategory(category);
12785
- });
12786
- }
12787
- changeCategory(categoryId, targetId) {
12788
- const prevCategoryId = untracked(this.prevCategoryId);
12789
- if (!prevCategoryId) {
12790
- return;
12791
- }
12792
- this.subscription?.unsubscribe();
12793
- this.subscription = this.treeStructNavigatorApiService
12794
- .moveElement({
12795
- type: "MOVING_TARGET_TREE_STRUCT" /* MovingType.TARGET_TREE_STRUCT */,
12796
- movableItemId: targetId,
12797
- treeStructTargetItemId: categoryId,
12798
- treeStructMovableItemId: prevCategoryId
12799
- }, this.config().requestOptions)
12800
- .subscribe(() => this.prevCategoryId.set(categoryId));
12801
- }
12802
- createCriterion(categoryId) {
12803
- this.criterionCreated.emit(categoryId);
12804
- this.prevCategoryId.set(categoryId);
12805
- }
12806
- changeTitle(value, criterionId) {
12807
- return this.criterionApiService.changeTitle(criterionId, value, this.config().requestOptions).pipe(finalize(() => this.criterion.update((prev) => ({
12808
- ...prev,
12809
- storageElement: { ...prev.storageElement, title: value }
12810
- }))));
12811
- }
12812
- changeDescription(value, criterionId) {
12813
- if (!this.criterionApiService.changeDescription) {
12814
- throw new Error('Change description not implemented');
12815
- }
12816
- return this.criterionApiService.changeDescription(criterionId, value, this.config().requestOptions).pipe(finalize(() => this.criterion.update((prev) => ({
12817
- ...prev,
12818
- storageElement: { ...prev.storageElement, shortDescription: value }
12819
- }))));
12820
- }
12821
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12822
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiCriterionInfoComponent, isStandalone: true, selector: "cui-criterion-info", inputs: { criterion: { classPropertyName: "criterion", publicName: "criterion", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { criterion: "criterionChange", validationChanged: "validationChanged", criterionCreated: "criterionCreated" }, providers: [CuiSelectedCategoryService], viewQueries: [{ propertyName: "element", first: true, predicate: ["scrollContent"], descendants: true, isSignal: true }], ngImport: i0, 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 [title]=\"criterionData.storageElement.title\"\n [description]=\"criterionData.storageElement.shortDescription\"\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"], dependencies: [{ kind: "ngmodule", type: CuiBadgeModule }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiCategoriesComponent, selector: "cui-categories", inputs: ["treeStructType", "buttonId", "disabled", "context"] }, { kind: "ngmodule", type: CuiDialogModule }, { kind: "ngmodule", type: CuiFormFieldModule }, { kind: "component", type: CuiFormFieldComponent, selector: "cui-form-field" }, { kind: "component", type: CuiCriterionInfoFormComponent, selector: "cui-criterion-info-form", inputs: ["title", "description", "framerId", "config"], outputs: ["formChanged", "isFormValidChanged"] }, { kind: "ngmodule", type: CuiLabelModule }, { kind: "component", type: CuiLabelComponent, selector: "label[cuiLabel]", inputs: ["isRequired"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12823
- }
12824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiCriterionInfoComponent, decorators: [{
12825
- type: Component,
12826
- args: [{ selector: 'cui-criterion-info', imports: [
12827
- CuiBadgeModule,
12828
- CuiButtonModule,
12829
- CuiCategoriesComponent,
12830
- CuiDialogModule,
12831
- CuiFormFieldModule,
12832
- CuiCriterionInfoFormComponent,
12833
- CuiLabelModule,
12834
- CuiSvgModule,
12835
- TranslocoModule
12836
- ], 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 [title]=\"criterionData.storageElement.title\"\n [description]=\"criterionData.storageElement.shortDescription\"\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"] }]
12837
- }], ctorParameters: () => [] });
12838
-
12839
- class CuiSelectModalFolderComponent {
12840
- constructor() {
12841
- this.icon = computed(() => (this.isOpen() ? 'cuiIconFolderOpen' : 'cuiIconFolder'));
12842
- this.title = input.required();
12843
- this.buttonSlot = input.required();
12844
- this.isOpen = input(false);
12845
- }
12846
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalFolderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12847
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", 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", "isSelected"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12848
- }
12849
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalFolderComponent, decorators: [{
12850
- type: Component,
12851
- 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"] }]
12852
- }] });
12853
-
12854
- class CuiSelectModalSearchComponent {
12855
- constructor() {
12856
- this.destroyRef = inject(DestroyRef);
12857
- this.searchControl = input(new FormControl(''));
12858
- this.controlDelay = input(700);
12859
- this.searchStringChanged = output();
12860
- }
12861
- ngOnInit() {
12862
- this.searchControl()
12863
- .valueChanges.pipe(debounceTime(this.controlDelay()), takeUntilDestroyed(this.destroyRef))
12864
- .subscribe((value) => this.searchStringChanged.emit(value));
12865
- }
12866
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12867
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CuiSelectModalSearchComponent, isStandalone: true, selector: "cui-select-modal-search", inputs: { searchControl: { classPropertyName: "searchControl", publicName: "searchControl", isSignal: true, isRequired: false, transformFunction: null }, controlDelay: { classPropertyName: "controlDelay", publicName: "controlDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchStringChanged: "searchStringChanged" }, 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 }); }
12868
- }
12869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalSearchComponent, decorators: [{
12870
- type: Component,
12871
- 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"] }]
12872
- }] });
12873
-
12874
- class CuiSelectModalComponent {
12875
- constructor() {
12876
- this.context = inject(CUI_DIALOG_CONTEXT);
12877
- this.data = this.context.data;
12878
- this.heading = this.data.heading;
12879
- this.leftData = this.data.leftData;
12880
- this.rightData = this.data.rightData;
12881
- }
12882
- onCancel() {
12883
- this.context.completeWith();
12884
- }
12885
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12886
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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 }); }
12887
- }
12888
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalComponent, decorators: [{
12889
- type: Component,
12890
- args: [{ imports: [
12891
- CuiButtonModule,
12892
- CuiDialogModule,
12893
- CuiIconButtonModule,
12894
- CuiInputModule,
12895
- NgComponentOutlet,
12896
- TranslocoDirective
12897
- ], 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"] }]
12898
- }] });
12899
-
12900
- class CuiSelectModalService {
12901
- constructor() {
12902
- this.selectedElementSignal = signal(null);
12903
- this.selectedElement = this.selectedElementSignal.asReadonly();
12904
- }
12905
- getSelectedData() {
12906
- return this.selectedElementSignal.asReadonly();
12907
- }
12908
- set(element) {
12909
- this.selectedElementSignal.set(element);
12910
- }
12911
- delete() {
12912
- this.selectedElementSignal.set(null);
12913
- }
12914
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
12915
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalService }); }
12916
- }
12917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiSelectModalService, decorators: [{
12918
- type: Injectable
12919
- }] });
12920
-
12921
- const CUI_STORAGE_LIST_SERVICE_TOKEN = new InjectionToken('STORAGE_LIST_SERVICE_TOKEN');
12922
-
12923
- class CuiStorageListItemComponent {
12924
- constructor() {
12925
- this.storageListService = inject(CUI_STORAGE_LIST_SERVICE_TOKEN);
12926
- this.isLoadingChildren = false;
12927
- this.isLoadingElements = false;
12928
- this.storageChildren = signal([]);
12929
- this.storageElements = signal([]);
12930
- this.areContentOpened = signal(false);
12931
- this.openCloseButtonIcon = computed(() => this.areContentOpened() ? 'cuiIconChevronDown' : 'cuiIconChevronRight');
12932
- this.hasContent = computed(() => this.storage().children.length || this.storageChildren().length || this.storageElements().length);
12933
- this.storage = input.required();
12934
- this.elementSlot = input();
12935
- this.itemSlot = input();
12936
- this.initStorageChildrenEffect();
12937
- this.initStorageElementsEffect();
12938
- }
12939
- onToggleChildren(event) {
12940
- event.preventDefault();
12941
- this.areContentOpened.update((prevAreChildrenOpened) => !prevAreChildrenOpened);
12942
- }
12943
- initStorageChildrenEffect() {
12944
- effect(() => {
12945
- const storage = this.storage();
12946
- this.areContentOpened();
12947
- untracked(this.setChildren.bind(this, storage));
12948
- });
12949
- }
12950
- initStorageElementsEffect() {
12951
- effect(() => {
12952
- const storage = this.storage();
12953
- untracked(this.setElements.bind(this, storage));
12954
- });
12955
- }
12956
- setChildren(storage) {
12957
- const storageChildren = storage.children;
12958
- if (!storageChildren.length) {
12959
- this.storageChildren.set([]);
12960
- }
12961
- if (this.isLoadingChildren || !this.areContentOpened()) {
12962
- return;
12963
- }
12964
- if (typeof storageChildren[0] !== 'string') {
12965
- this.storageChildren.set(storageChildren);
12966
- return;
12967
- }
12968
- this.isLoadingChildren = true;
12969
- this.storageListService
12970
- .getChildren?.(storage, this.storageChildren())
12971
- .pipe(finalize(() => (this.isLoadingChildren = false)))
12972
- .subscribe((response) => this.storageChildren.set(response));
12973
- }
12974
- setElements(storage) {
12975
- const storageElements = storage.elements;
12976
- if (this.isLoadingElements) {
12977
- return;
12978
- }
12979
- if (!storageElements?.length) {
12980
- this.storageElements.set([]);
12981
- return;
12982
- }
12983
- if (this.storageElements().length) {
12984
- this.storageElements.set(storageElements);
12985
- return;
12986
- }
12987
- this.isLoadingElements = true;
12988
- this.storageListService
12989
- .getElements?.(storage, this.storageElements())
12990
- .pipe(finalize(() => (this.isLoadingElements = false)))
12991
- .subscribe((response) => this.storageElements.set(response));
12992
- }
12993
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12994
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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;border-left:1px solid 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 }); }
12995
- }
12996
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListItemComponent, decorators: [{
12997
- type: Component,
12998
- 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;border-left:1px solid 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"] }]
12999
- }], ctorParameters: () => [] });
13000
-
13001
- class CuiStorageListComponent {
13002
- constructor() {
13003
- this.storages = input.required();
13004
- this.elementSlot = input();
13005
- this.itemSlot = input();
13006
- }
13007
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13008
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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 }); }
13009
- }
13010
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListComponent, decorators: [{
13011
- type: Component,
13012
- 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"] }]
13013
- }] });
13014
-
13015
13067
  class CuiActivityBaseService {
13016
13068
  constructor() {
13017
13069
  this.userCompanyApiService = inject(UserCompanyApiService);
@@ -14714,13 +14766,13 @@ function handleError(handler, useDefaultError = true) {
14714
14766
  }
14715
14767
 
14716
14768
  const CuiTranslations = {
14717
- en: import('./cuby-ui-core-en-Csg2E9Uc.mjs'),
14718
- ru: import('./cuby-ui-core-ru-xEXR-11C.mjs')
14769
+ en: import('./cuby-ui-core-en-D8yTJpcc.mjs'),
14770
+ ru: import('./cuby-ui-core-ru-DyDGwpgM.mjs')
14719
14771
  };
14720
14772
 
14721
14773
  /**
14722
14774
  * Generated bundle index. Do not edit.
14723
14775
  */
14724
14776
 
14725
- export { AlertHintComponent, AngularOutsideLoaderService, AssigneeRoleItemComponent, AssigneeRolesTabsComponent, ButtonChangeThemeComponent, CUI_ACTIVITY_SERVICE_TOKEN, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BADGE_DEFAULT_OPTIONS, CUI_BADGE_OPTIONS, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_CATEGORIES_TREE_DATA_SOURCE_SERVICE_TOKEN, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_FILTER_BAR_DEFAULT_TRANSLATIONS, 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_RESOURCE_STATE_SERVICE_TOKEN, CUI_ROOT_SELECTOR, CUI_SEGMENTED_WINDOW_CONTEXT, CUI_STORAGE_LIST_SERVICE_TOKEN, CUI_SUBJECT_MODAL_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, CUI_USED_ELEMENTS_SERVICE_TOKEN, CUI_UTILITY_SERVICE_TOKEN, ContentHeaderComponent, CuiAbstractTabsComponent, CuiAccessor, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiActivityBaseService, CuiActivityImplService, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiAuthBase, CuiAuthService, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiBrowserLoginStrategyService, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCategoriesTreeComponent, CuiCategoriesTreeListComponent, CuiCategoryTreeItemComponent, CuiCategoryTreeStateService, CuiCheckListBlockListItemActionCardComponent, CuiCheckListBlockListItemActionWithVerificationComponent, CuiCheckListBlockListItemActionWithoutVerificationComponent, CuiCheckListBlockListItemEvaluationComponent, CuiCheckListBlockListItemEvaluationCriteriaComponent, CuiCheckListBlockService, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiChecklistBlockListComponent, CuiChecklistBlockListItemContainerComponent, CuiChecklistBlockTitleControlComponent, CuiCircleLoaderComponent, CuiCollapsiblePanelComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiCriterionInfoComponent, CuiCriterionInfoFormComponent, CuiCriterionModalCreateComponent, CuiCriterionReadonlyInfoComponent, CuiDateRangeCalendarComponent, CuiDateRangeCalendarModule, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDriver, CuiDriverDirective, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorTranslations, CuiEmptyStateComponent, CuiErrorResolverFactory, CuiFileIconComponent, CuiFileUploader, CuiFileUploaderStatus, CuiFilterBarComponent, CuiFilterBarModule, CuiFormFieldComponent, CuiFormFieldModule, CuiFramerPreviewComponent, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiGlobalErrorHandler, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiHybridStorageService, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiInstructionInfoComponent, CuiInstructionInfoFormComponent, CuiInstructionModalCreateComponent, CuiInstructionReadonlyInfoComponent, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLibTranslations, CuiLinearLoaderComponent, CuiLinkMarker, CuiListTool, CuiLoaderComponent, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionAccessor, CuiPositionService, CuiPulseLoaderComponent, CuiRadioComponent, CuiRadioModule, CuiReadonlyCriterionModalComponent, CuiReadonlyInstructionModalComponent, CuiReadonlyUtilityModalComponent, CuiRectAccessor, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSegmentedWindowHeaderDirective, CuiSegmentedWindowIconDirective, CuiSegmentedWindowsContainerComponent, CuiSegmentedWindowsService, CuiSelectComponent, CuiSelectModalComponent, CuiSelectModalFolderComponent, CuiSelectModalSearchComponent, CuiSelectModalService, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiSkeleton, CuiStatedLoaderComponent, CuiStorageListComponent, CuiSvgComponent, CuiSvgModule, CuiTabDirective, CuiTabsComponent, CuiTabsServiceImpl, CuiTemplateSelectComponent, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiTimePipe, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiTranslations, CuiTreeComponent, CuiUserActionContextMenuComponent, CuiUtilityModalComponent, CuiUtilityModalCreateComponent, CuiUtilityReadonlyThumbnailComponent, CuiUtilityThumbnailComponent, CuiVehicle, CuiVideoTool, CuiVisualViewportService, FileSizePipe, InsertedComponent, ModalDividedSectionComponent, ModalHeaderComponent, ModalHeaderInsertedButtonsComponent, ModalInfoTabComponent, ModalOperationPartComponent, ModalResourcesTabComponent, OptionsButtonComponent, RenderDynamicModalComponent, ResourceStateBaseService, ResourcesBlockComponent, ResourcesBlockPartComponent, ResourcesBlockTabsComponent$1 as ResourcesBlockTabsComponent, ResourcesOptionsComponent, SubjectModalBaseService, UTILITY_MODAL_SERVICE_TOKEN, UsedElementsBaseService, UtilityBaseService, UtilityInfoReadonlyComponent, createEditorTools, cuiAsDriver, cuiAsPositionAccessor, cuiAsRectAccessor, cuiAsVehicle, cuiAuthErrorInterceptor, cuiAuthInterceptor, cuiCheckAuthFailureEvent, cuiCheckFixedPosition, cuiCreateDefaultValidators, cuiErrorHandlerInterceptor, cuiFallbackAccessor, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiPositionAccessorFor, cuiProvideAccessor, cuiProvideEditor, cuiRectAccessorFor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor, handleError, openFileInBrowser, presetConfigToken, provideCuiAuth, provideCuiErrorHandler, provideCuiSegmentedWindows, provideCuiTabs, setLoading, sseStreamReaderInterceptor };
14777
+ export { AlertHintComponent, AngularOutsideLoaderService, AssigneeRoleItemComponent, AssigneeRolesTabsComponent, ButtonChangeThemeComponent, CUI_ACTIVITY_SERVICE_TOKEN, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BADGE_DEFAULT_OPTIONS, CUI_BADGE_OPTIONS, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_CATEGORIES_TREE_DATA_SOURCE_SERVICE_TOKEN, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_FILTER_BAR_DEFAULT_TRANSLATIONS, 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_RESOURCE_STATE_SERVICE_TOKEN, CUI_ROOT_SELECTOR, CUI_SEGMENTED_WINDOW_CONTEXT, CUI_STORAGE_LIST_SERVICE_TOKEN, CUI_SUBJECT_MODAL_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, CUI_USED_ELEMENTS_SERVICE_TOKEN, CUI_UTILITY_SERVICE_TOKEN, ContentHeaderComponent, CuiAbstractTabsComponent, CuiAccessor, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiActivityBaseService, CuiActivityImplService, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiAuthBase, CuiAuthService, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiBrowserLoginStrategyService, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCategoriesTreeComponent, CuiCategoriesTreeListComponent, CuiCategoryTreeItemComponent, CuiCategoryTreeStateService, CuiCheckListBlockListItemActionCardComponent, CuiCheckListBlockListItemActionWithVerificationComponent, CuiCheckListBlockListItemActionWithoutVerificationComponent, CuiCheckListBlockListItemEvaluationComponent, CuiCheckListBlockListItemEvaluationCriteriaComponent, CuiCheckListBlockService, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiChecklistBlockListComponent, CuiChecklistBlockListItemContainerComponent, CuiChecklistBlockTitleControlComponent, CuiCircleLoaderComponent, CuiCollapsiblePanelComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiCriterionInfoComponent, CuiCriterionInfoFormComponent, CuiCriterionModalCreateComponent, CuiCriterionReadonlyInfoComponent, CuiDateRangeCalendarComponent, CuiDateRangeCalendarModule, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDriver, CuiDriverDirective, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorTranslations, CuiEmptyStateComponent, CuiErrorResolverFactory, CuiFileIconComponent, CuiFileUploader, CuiFileUploaderError, CuiFileUploaderStatus, CuiFilterBarComponent, CuiFilterBarModule, CuiFormFieldComponent, CuiFormFieldModule, CuiFramerPreviewComponent, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiGlobalErrorHandler, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiHybridStorageService, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiInstructionInfoComponent, CuiInstructionInfoFormComponent, CuiInstructionModalCreateComponent, CuiInstructionReadonlyInfoComponent, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLibTranslations, CuiLinearLoaderComponent, CuiLinkMarker, CuiListTool, CuiLoaderComponent, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionAccessor, CuiPositionService, CuiPulseLoaderComponent, CuiRadioComponent, CuiRadioModule, CuiReadonlyCriterionModalComponent, CuiReadonlyInstructionModalComponent, CuiReadonlyUtilityModalComponent, CuiRectAccessor, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSegmentedWindowHeaderDirective, CuiSegmentedWindowIconDirective, CuiSegmentedWindowsContainerComponent, CuiSegmentedWindowsService, CuiSelectComponent, CuiSelectModalComponent, CuiSelectModalFolderComponent, CuiSelectModalSearchComponent, CuiSelectModalService, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiSkeleton, CuiStatedLoaderComponent, CuiStorageListComponent, CuiSvgComponent, CuiSvgModule, CuiTabDirective, CuiTabsComponent, CuiTabsServiceImpl, CuiTemplateSelectComponent, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiTimePipe, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiTranslations, CuiTreeComponent, CuiUserActionContextMenuComponent, CuiUtilityModalComponent, CuiUtilityModalCreateComponent, CuiUtilityReadonlyThumbnailComponent, CuiUtilityThumbnailComponent, CuiVehicle, CuiVideoTool, CuiVisualViewportService, FileSizePipe, InsertedComponent, ModalDividedSectionComponent, ModalHeaderComponent, ModalHeaderInsertedButtonsComponent, ModalInfoTabComponent, ModalOperationPartComponent, ModalResourcesTabComponent, OptionsButtonComponent, RenderDynamicModalComponent, ResourceStateBaseService, ResourcesBlockComponent, ResourcesBlockPartComponent, ResourcesBlockTabsComponent$1 as ResourcesBlockTabsComponent, ResourcesOptionsComponent, SubjectModalBaseService, UTILITY_MODAL_SERVICE_TOKEN, UsedElementsBaseService, UtilityBaseService, UtilityInfoReadonlyComponent, createEditorTools, cuiAsDriver, cuiAsPositionAccessor, cuiAsRectAccessor, cuiAsVehicle, cuiAuthErrorInterceptor, cuiAuthInterceptor, cuiCheckAuthFailureEvent, cuiCheckFixedPosition, cuiCreateDefaultValidators, cuiErrorHandlerInterceptor, cuiFallbackAccessor, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiPositionAccessorFor, cuiProvideAccessor, cuiProvideEditor, cuiRectAccessorFor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor, handleError, openFileInBrowser, presetConfigToken, provideCuiAuth, provideCuiErrorHandler, provideCuiSegmentedWindows, provideCuiTabs, setLoading, sseStreamReaderInterceptor };
14726
14778
  //# sourceMappingURL=cuby-ui-core.mjs.map