@cuby-ui/core 0.0.446 → 0.0.448
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/alert-hint/alert-hint.component.d.ts +11 -0
- package/components/alert-hint/error-status.d.ts +1 -0
- package/components/alert-hint/index.d.ts +2 -0
- package/components/card-wrapper/card-wrapper.component.d.ts +2 -1
- package/components/content-header/content-header.component.d.ts +8 -0
- package/components/content-header/index.d.ts +1 -0
- package/components/index.d.ts +5 -0
- package/components/inserted/index.d.ts +1 -0
- package/components/inserted/inserted.component.d.ts +5 -0
- package/components/options-button/index.d.ts +1 -0
- package/components/options-button/options-button.component.d.ts +8 -0
- package/components/sidebar/sidebar-header/sidebar-header.component.d.ts +1 -1
- package/components/sidebar/sidebar-navigation-item/sidebar-navigation-item.component.d.ts +1 -1
- package/editor/utils/open-file-in-browser.d.ts +1 -1
- package/editor/utils/set-loading.d.ts +1 -1
- package/esm2022/components/alert-hint/alert-hint.component.mjs +28 -0
- package/esm2022/components/alert-hint/error-status.mjs +2 -0
- package/esm2022/components/alert-hint/index.mjs +2 -0
- package/esm2022/components/card-wrapper/card-wrapper.component.mjs +6 -4
- package/esm2022/components/content-header/content-header.component.mjs +19 -0
- package/esm2022/components/content-header/index.mjs +2 -0
- package/esm2022/components/index.mjs +6 -1
- package/esm2022/components/inserted/index.mjs +2 -0
- package/esm2022/components/inserted/inserted.component.mjs +15 -0
- package/esm2022/components/options-button/index.mjs +2 -0
- package/esm2022/components/options-button/options-button.component.mjs +20 -0
- package/esm2022/editor/editor.component.mjs +1 -1
- package/esm2022/editor/index.mjs +1 -1
- package/esm2022/editor/utils/open-file-in-browser.mjs +1 -1
- package/esm2022/editor/utils/set-loading.mjs +3 -3
- package/esm2022/index.mjs +1 -2
- package/esm2022/widgets/ui/inserted/index.mjs +2 -0
- package/esm2022/widgets/ui/inserted/inserted.component.mjs +17 -0
- package/esm2022/widgets/ui/modal-header/index.mjs +2 -0
- package/esm2022/widgets/ui/modal-header/modal-header.component.mjs +31 -0
- package/fesm2022/cuby-ui-core.mjs +6174 -8834
- package/fesm2022/cuby-ui-core.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/package.json +4 -4
- package/styles/direcive/flex-container.scss +3 -0
- package/widgets/ui/inserted/index.d.ts +1 -0
- package/widgets/ui/inserted/inserted.component.d.ts +5 -0
- package/widgets/ui/modal-header/index.d.ts +1 -0
- package/widgets/ui/modal-header/modal-header.component.d.ts +12 -0
- package/esm2022/widgets/categories/categories.component.mjs +0 -76
- package/esm2022/widgets/categories/components/categories-list/categories-list.component.mjs +0 -17
- package/esm2022/widgets/categories/components/categories-list/index.mjs +0 -2
- package/esm2022/widgets/categories/components/category-form/category-form.component.mjs +0 -79
- package/esm2022/widgets/categories/components/category-form/index.mjs +0 -2
- package/esm2022/widgets/categories/components/category-item/category-item.component.mjs +0 -125
- package/esm2022/widgets/categories/components/category-item/index.mjs +0 -2
- package/esm2022/widgets/categories/components/create-category-item/create-category-item.component.mjs +0 -25
- package/esm2022/widgets/categories/components/create-category-item/index.mjs +0 -2
- package/esm2022/widgets/categories/components/index.mjs +0 -3
- package/esm2022/widgets/categories/index.mjs +0 -3
- package/esm2022/widgets/categories/services/index.mjs +0 -2
- package/esm2022/widgets/categories/services/selected-category.service.mjs +0 -38
- package/esm2022/widgets/checklist-block/checklist-block.component.mjs +0 -75
- package/esm2022/widgets/checklist-block/checklist-block.options.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list/checklist-block-list.component.mjs +0 -85
- package/esm2022/widgets/checklist-block/components/checklist-block-list/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-card/checklist-block-list-item-action-card.component.mjs +0 -133
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-card/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/checklist-block-list-item-action-with-verification.component.mjs +0 -45
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/checklist-block-list-item-action-without-verification.component.mjs +0 -35
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.component.mjs +0 -152
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.options.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-container/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.component.mjs +0 -282
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.options.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.component.mjs +0 -117
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.options.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/checklist-block-title-control/checklist-block-title-control.component.mjs +0 -39
- package/esm2022/widgets/checklist-block/components/checklist-block-title-control/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/components/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/index.mjs +0 -2
- package/esm2022/widgets/checklist-block/services/checklist-block.service.mjs +0 -50
- package/esm2022/widgets/checklist-block/services/index.mjs +0 -2
- package/esm2022/widgets/criterion-info/criterion-info.component.mjs +0 -137
- package/esm2022/widgets/criterion-info/index.mjs +0 -2
- package/esm2022/widgets/criterion-info-form/criterion-info-form.component.mjs +0 -147
- package/esm2022/widgets/criterion-info-form/criterion-info-form.options.mjs +0 -2
- package/esm2022/widgets/criterion-info-form/index.mjs +0 -2
- package/esm2022/widgets/criterion-readonly-info/criterion-readonly-info.component.mjs +0 -72
- package/esm2022/widgets/criterion-readonly-info/index.mjs +0 -2
- package/esm2022/widgets/delete-modal/delete-modal.component.mjs +0 -39
- package/esm2022/widgets/delete-modal/delete-modal.options.mjs +0 -2
- package/esm2022/widgets/delete-modal/index.mjs +0 -2
- package/esm2022/widgets/framer-preview/framer-preview.component.mjs +0 -77
- package/esm2022/widgets/framer-preview/framer-preview.options.mjs +0 -2
- package/esm2022/widgets/framer-preview/index.mjs +0 -2
- package/esm2022/widgets/general-control-error-hint/general-control-error-hint.component.mjs +0 -21
- package/esm2022/widgets/general-control-error-hint/index.mjs +0 -2
- package/esm2022/widgets/index.mjs +0 -15
- package/esm2022/widgets/instruction-info/index.mjs +0 -2
- package/esm2022/widgets/instruction-info/instruction-info.component.mjs +0 -147
- package/esm2022/widgets/instruction-info-form/index.mjs +0 -2
- package/esm2022/widgets/instruction-info-form/instruction-info-form.component.mjs +0 -153
- package/esm2022/widgets/instruction-info-form/instruction-info-form.options.mjs +0 -2
- package/esm2022/widgets/instruction-readonly-info/index.mjs +0 -2
- package/esm2022/widgets/instruction-readonly-info/instruction-readonly-info.component.mjs +0 -72
- package/esm2022/widgets/loader/index.mjs +0 -2
- package/esm2022/widgets/loader/loader.component.mjs +0 -36
- package/esm2022/widgets/select-modal/components/index.mjs +0 -3
- package/esm2022/widgets/select-modal/components/select-modal-folder/index.mjs +0 -2
- package/esm2022/widgets/select-modal/components/select-modal-folder/select-modal-folder.component.mjs +0 -21
- package/esm2022/widgets/select-modal/components/select-modal-search/index.mjs +0 -2
- package/esm2022/widgets/select-modal/components/select-modal-search/select-modal-search.component.mjs +0 -32
- package/esm2022/widgets/select-modal/index.mjs +0 -4
- package/esm2022/widgets/select-modal/select-modal.component.mjs +0 -35
- package/esm2022/widgets/select-modal/select-modal.interfaces.mjs +0 -2
- package/esm2022/widgets/select-modal/select-modal.service.mjs +0 -23
- package/esm2022/widgets/storage-list/components/index.mjs +0 -2
- package/esm2022/widgets/storage-list/components/storage-list-item/index.mjs +0 -2
- package/esm2022/widgets/storage-list/components/storage-list-item/storage-list-item.component.mjs +0 -87
- package/esm2022/widgets/storage-list/index.mjs +0 -3
- package/esm2022/widgets/storage-list/storage-list.component.mjs +0 -17
- package/esm2022/widgets/storage-list/storage-list.options.mjs +0 -3
- package/esm2022/widgets/user-action-context-menu/activity-item/activity-item.component.mjs +0 -61
- package/esm2022/widgets/user-action-context-menu/activity-item/index.mjs +0 -2
- package/esm2022/widgets/user-action-context-menu/company-item/company-item.component.mjs +0 -68
- package/esm2022/widgets/user-action-context-menu/company-item/index.mjs +0 -2
- package/esm2022/widgets/user-action-context-menu/constants/index.mjs +0 -2
- package/esm2022/widgets/user-action-context-menu/constants/translations.mjs +0 -5
- package/esm2022/widgets/user-action-context-menu/i18n/en.json +0 -12
- package/esm2022/widgets/user-action-context-menu/i18n/ru.json +0 -12
- package/esm2022/widgets/user-action-context-menu/index.mjs +0 -5
- package/esm2022/widgets/user-action-context-menu/services/activity-base.service.mjs +0 -32
- package/esm2022/widgets/user-action-context-menu/services/activity.service.mjs +0 -35
- package/esm2022/widgets/user-action-context-menu/services/index.mjs +0 -3
- package/esm2022/widgets/user-action-context-menu/user-action-context-menu.component.mjs +0 -83
- package/esm2022/widgets/user-action-context-menu/user-action-context.option.mjs +0 -3
- package/esm2022/widgets/utility-modal/components/criterion-modal-create/criterion-modal-create.component.mjs +0 -41
- package/esm2022/widgets/utility-modal/components/criterion-modal-create/index.mjs +0 -2
- package/esm2022/widgets/utility-modal/components/index.mjs +0 -5
- package/esm2022/widgets/utility-modal/components/instruction-modal-create/index.mjs +0 -2
- package/esm2022/widgets/utility-modal/components/instruction-modal-create/instruction-modal-create.component.mjs +0 -41
- package/esm2022/widgets/utility-modal/components/readonly-criterion-modal/index.mjs +0 -2
- package/esm2022/widgets/utility-modal/components/readonly-criterion-modal/readonly-criterion-modal.component.mjs +0 -40
- package/esm2022/widgets/utility-modal/components/readonly-instruction-modal/index.mjs +0 -2
- package/esm2022/widgets/utility-modal/components/readonly-instruction-modal/readonly-instruction-modal.component.mjs +0 -40
- package/esm2022/widgets/utility-modal/components/readonly-utility-modal/index.mjs +0 -2
- package/esm2022/widgets/utility-modal/components/readonly-utility-modal/readonly-utility-modal.component.mjs +0 -43
- package/esm2022/widgets/utility-modal/components/utility-modal-create/index.mjs +0 -2
- package/esm2022/widgets/utility-modal/components/utility-modal-create/utility-modal-create.component.mjs +0 -55
- package/esm2022/widgets/utility-modal/index.mjs +0 -4
- package/esm2022/widgets/utility-modal/utility-modal.component.mjs +0 -22
- package/esm2022/widgets/utility-modal/utility-modal.options.mjs +0 -3
- package/esm2022/widgets/utility-readonly-thumbnail/index.mjs +0 -2
- package/esm2022/widgets/utility-readonly-thumbnail/utility-readonly-thumbnail.component.mjs +0 -15
- package/esm2022/widgets/utility-thumbnail/index.mjs +0 -2
- package/esm2022/widgets/utility-thumbnail/utility-thumbnail.component.mjs +0 -94
- package/fesm2022/cuby-ui-core-en-D0un3--2.mjs +0 -25
- package/fesm2022/cuby-ui-core-en-D0un3--2.mjs.map +0 -1
- package/fesm2022/cuby-ui-core-ru-CMm--FpA.mjs +0 -25
- package/fesm2022/cuby-ui-core-ru-CMm--FpA.mjs.map +0 -1
- package/widgets/categories/categories.component.d.ts +0 -25
- package/widgets/categories/components/categories-list/categories-list.component.d.ts +0 -8
- package/widgets/categories/components/categories-list/index.d.ts +0 -1
- package/widgets/categories/components/category-form/category-form.component.d.ts +0 -28
- package/widgets/categories/components/category-form/index.d.ts +0 -1
- package/widgets/categories/components/category-item/category-item.component.d.ts +0 -42
- package/widgets/categories/components/category-item/index.d.ts +0 -1
- package/widgets/categories/components/create-category-item/create-category-item.component.d.ts +0 -10
- package/widgets/categories/components/create-category-item/index.d.ts +0 -1
- package/widgets/categories/components/index.d.ts +0 -2
- package/widgets/categories/index.d.ts +0 -2
- package/widgets/categories/services/index.d.ts +0 -1
- package/widgets/categories/services/selected-category.service.d.ts +0 -18
- package/widgets/checklist-block/checklist-block.component.d.ts +0 -21
- package/widgets/checklist-block/checklist-block.options.d.ts +0 -12
- package/widgets/checklist-block/components/checklist-block-list/checklist-block-list.component.d.ts +0 -27
- package/widgets/checklist-block/components/checklist-block-list/index.d.ts +0 -1
- package/widgets/checklist-block/components/checklist-block-list-item-action-card/checklist-block-list-item-action-card.component.d.ts +0 -30
- package/widgets/checklist-block/components/checklist-block-list-item-action-card/index.d.ts +0 -1
- package/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/checklist-block-list-item-action-with-verification.component.d.ts +0 -11
- package/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/index.d.ts +0 -1
- package/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/checklist-block-list-item-action-without-verification.component.d.ts +0 -10
- package/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/index.d.ts +0 -1
- package/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.component.d.ts +0 -41
- package/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.options.d.ts +0 -5
- package/widgets/checklist-block/components/checklist-block-list-item-container/index.d.ts +0 -1
- package/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.component.d.ts +0 -51
- package/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.options.d.ts +0 -14
- package/widgets/checklist-block/components/checklist-block-list-item-evaluation/index.d.ts +0 -2
- package/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.component.d.ts +0 -33
- package/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.options.d.ts +0 -4
- package/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/index.d.ts +0 -1
- package/widgets/checklist-block/components/checklist-block-title-control/checklist-block-title-control.component.d.ts +0 -8
- package/widgets/checklist-block/components/checklist-block-title-control/index.d.ts +0 -1
- package/widgets/checklist-block/components/index.d.ts +0 -1
- package/widgets/checklist-block/index.d.ts +0 -1
- package/widgets/checklist-block/services/checklist-block.service.d.ts +0 -19
- package/widgets/checklist-block/services/index.d.ts +0 -1
- package/widgets/criterion-info/criterion-info.component.d.ts +0 -43
- package/widgets/criterion-info/index.d.ts +0 -1
- package/widgets/criterion-info-form/criterion-info-form.component.d.ts +0 -39
- package/widgets/criterion-info-form/criterion-info-form.options.d.ts +0 -7
- package/widgets/criterion-info-form/index.d.ts +0 -2
- package/widgets/criterion-readonly-info/criterion-readonly-info.component.d.ts +0 -26
- package/widgets/criterion-readonly-info/index.d.ts +0 -1
- package/widgets/delete-modal/delete-modal.component.d.ts +0 -13
- package/widgets/delete-modal/delete-modal.options.d.ts +0 -7
- package/widgets/delete-modal/index.d.ts +0 -2
- package/widgets/framer-preview/framer-preview.component.d.ts +0 -26
- package/widgets/framer-preview/framer-preview.options.d.ts +0 -5
- package/widgets/framer-preview/index.d.ts +0 -2
- package/widgets/general-control-error-hint/general-control-error-hint.component.d.ts +0 -9
- package/widgets/general-control-error-hint/index.d.ts +0 -1
- package/widgets/index.d.ts +0 -14
- package/widgets/instruction-info/index.d.ts +0 -1
- package/widgets/instruction-info/instruction-info.component.d.ts +0 -45
- package/widgets/instruction-info-form/index.d.ts +0 -2
- package/widgets/instruction-info-form/instruction-info-form.component.d.ts +0 -43
- package/widgets/instruction-info-form/instruction-info-form.options.d.ts +0 -9
- package/widgets/instruction-readonly-info/index.d.ts +0 -1
- package/widgets/instruction-readonly-info/instruction-readonly-info.component.d.ts +0 -26
- package/widgets/loader/index.d.ts +0 -1
- package/widgets/loader/loader.component.d.ts +0 -20
- package/widgets/select-modal/components/index.d.ts +0 -2
- package/widgets/select-modal/components/select-modal-folder/index.d.ts +0 -1
- package/widgets/select-modal/components/select-modal-folder/select-modal-folder.component.d.ts +0 -10
- package/widgets/select-modal/components/select-modal-search/index.d.ts +0 -1
- package/widgets/select-modal/components/select-modal-search/select-modal-search.component.d.ts +0 -12
- package/widgets/select-modal/index.d.ts +0 -3
- package/widgets/select-modal/select-modal.component.d.ts +0 -13
- package/widgets/select-modal/select-modal.interfaces.d.ts +0 -15
- package/widgets/select-modal/select-modal.service.d.ts +0 -13
- package/widgets/storage-list/components/index.d.ts +0 -1
- package/widgets/storage-list/components/storage-list-item/index.d.ts +0 -1
- package/widgets/storage-list/components/storage-list-item/storage-list-item.component.d.ts +0 -24
- package/widgets/storage-list/index.d.ts +0 -2
- package/widgets/storage-list/storage-list.component.d.ts +0 -10
- package/widgets/storage-list/storage-list.options.d.ts +0 -16
- package/widgets/user-action-context-menu/activity-item/activity-item.component.d.ts +0 -17
- package/widgets/user-action-context-menu/activity-item/index.d.ts +0 -1
- package/widgets/user-action-context-menu/company-item/company-item.component.d.ts +0 -22
- package/widgets/user-action-context-menu/company-item/index.d.ts +0 -1
- package/widgets/user-action-context-menu/constants/index.d.ts +0 -1
- package/widgets/user-action-context-menu/constants/translations.d.ts +0 -2
- package/widgets/user-action-context-menu/index.d.ts +0 -4
- package/widgets/user-action-context-menu/services/activity-base.service.d.ts +0 -14
- package/widgets/user-action-context-menu/services/activity.service.d.ts +0 -14
- package/widgets/user-action-context-menu/services/index.d.ts +0 -2
- package/widgets/user-action-context-menu/user-action-context-menu.component.d.ts +0 -29
- package/widgets/user-action-context-menu/user-action-context.option.d.ts +0 -15
- package/widgets/utility-modal/components/criterion-modal-create/criterion-modal-create.component.d.ts +0 -18
- package/widgets/utility-modal/components/criterion-modal-create/index.d.ts +0 -1
- package/widgets/utility-modal/components/index.d.ts +0 -4
- package/widgets/utility-modal/components/instruction-modal-create/index.d.ts +0 -1
- package/widgets/utility-modal/components/instruction-modal-create/instruction-modal-create.component.d.ts +0 -18
- package/widgets/utility-modal/components/readonly-criterion-modal/index.d.ts +0 -1
- package/widgets/utility-modal/components/readonly-criterion-modal/readonly-criterion-modal.component.d.ts +0 -16
- package/widgets/utility-modal/components/readonly-instruction-modal/index.d.ts +0 -1
- package/widgets/utility-modal/components/readonly-instruction-modal/readonly-instruction-modal.component.d.ts +0 -16
- package/widgets/utility-modal/components/readonly-utility-modal/index.d.ts +0 -1
- package/widgets/utility-modal/components/readonly-utility-modal/readonly-utility-modal.component.d.ts +0 -18
- package/widgets/utility-modal/components/utility-modal-create/index.d.ts +0 -1
- package/widgets/utility-modal/components/utility-modal-create/utility-modal-create.component.d.ts +0 -25
- package/widgets/utility-modal/index.d.ts +0 -3
- package/widgets/utility-modal/utility-modal.component.d.ts +0 -10
- package/widgets/utility-modal/utility-modal.options.d.ts +0 -12
- package/widgets/utility-readonly-thumbnail/index.d.ts +0 -1
- package/widgets/utility-readonly-thumbnail/utility-readonly-thumbnail.component.d.ts +0 -8
- package/widgets/utility-thumbnail/index.d.ts +0 -1
- package/widgets/utility-thumbnail/utility-thumbnail.component.d.ts +0 -21
package/esm2022/widgets/storage-list/components/storage-list-item/storage-list-item.component.mjs
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, computed, effect, forwardRef, inject, input, signal, untracked } from '@angular/core';
|
|
3
|
-
import { CuiLetDirective } from '@cuby-ui/cdk';
|
|
4
|
-
import { finalize } from 'rxjs';
|
|
5
|
-
import { CuiSvgModule } from '../../../../components/svg';
|
|
6
|
-
import { CuiStorageListComponent } from '../..';
|
|
7
|
-
import { CUI_STORAGE_LIST_SERVICE_TOKEN } from '../../storage-list.options';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../../../../components/svg/svg.component";
|
|
10
|
-
export class CuiStorageListItemComponent {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.storageListService = inject(CUI_STORAGE_LIST_SERVICE_TOKEN);
|
|
13
|
-
this.isLoadingChildren = false;
|
|
14
|
-
this.isLoadingElements = false;
|
|
15
|
-
this.storageChildren = signal([]);
|
|
16
|
-
this.storageElements = signal([]);
|
|
17
|
-
this.areContentOpened = signal(false);
|
|
18
|
-
this.openCloseButtonIcon = computed(() => this.areContentOpened() ? 'cuiIconChevronDown' : 'cuiIconChevronRight');
|
|
19
|
-
this.hasContent = computed(() => this.storage().children.length || this.storageChildren().length || this.storageElements().length);
|
|
20
|
-
this.storage = input.required();
|
|
21
|
-
this.elementSlot = input();
|
|
22
|
-
this.itemSlot = input();
|
|
23
|
-
this.initStorageChildrenEffect();
|
|
24
|
-
this.initStorageElementsEffect();
|
|
25
|
-
}
|
|
26
|
-
onToggleChildren(event) {
|
|
27
|
-
event.preventDefault();
|
|
28
|
-
this.areContentOpened.update((prevAreChildrenOpened) => !prevAreChildrenOpened);
|
|
29
|
-
}
|
|
30
|
-
initStorageChildrenEffect() {
|
|
31
|
-
effect(() => {
|
|
32
|
-
const storage = this.storage();
|
|
33
|
-
this.areContentOpened();
|
|
34
|
-
untracked(this.setChildren.bind(this, storage));
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
initStorageElementsEffect() {
|
|
38
|
-
effect(() => {
|
|
39
|
-
const storage = this.storage();
|
|
40
|
-
untracked(this.setElements.bind(this, storage));
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
setChildren(storage) {
|
|
44
|
-
const storageChildren = storage.children;
|
|
45
|
-
if (!storageChildren.length) {
|
|
46
|
-
this.storageChildren.set([]);
|
|
47
|
-
}
|
|
48
|
-
if (this.isLoadingChildren || !this.areContentOpened()) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (typeof storageChildren[0] !== 'string') {
|
|
52
|
-
this.storageChildren.set(storageChildren);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
this.isLoadingChildren = true;
|
|
56
|
-
this.storageListService
|
|
57
|
-
.getChildren?.(storage, this.storageChildren())
|
|
58
|
-
.pipe(finalize(() => (this.isLoadingChildren = false)))
|
|
59
|
-
.subscribe((response) => this.storageChildren.set(response));
|
|
60
|
-
}
|
|
61
|
-
setElements(storage) {
|
|
62
|
-
const storageElements = storage.elements;
|
|
63
|
-
if (this.isLoadingElements) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (!storageElements?.length) {
|
|
67
|
-
this.storageElements.set([]);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (this.storageElements.length) {
|
|
71
|
-
this.storageElements.set(storageElements);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
this.isLoadingElements = true;
|
|
75
|
-
this.storageListService
|
|
76
|
-
.getElements?.(storage, this.storageElements())
|
|
77
|
-
.pipe(finalize(() => (this.isLoadingElements = false)))
|
|
78
|
-
.subscribe((response) => this.storageElements.set(response));
|
|
79
|
-
}
|
|
80
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
81
|
-
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(() => i1.CuiSvgComponent), selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => CuiStorageListComponent), selector: "cui-storage-list", inputs: ["storages", "elementSlot", "itemSlot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
82
|
-
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListItemComponent, decorators: [{
|
|
84
|
-
type: Component,
|
|
85
|
-
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"] }]
|
|
86
|
-
}], ctorParameters: () => [] });
|
|
87
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1saXN0LWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29yZS93aWRnZXRzL3N0b3JhZ2UtbGlzdC9jb21wb25lbnRzL3N0b3JhZ2UtbGlzdC1pdGVtL3N0b3JhZ2UtbGlzdC1pdGVtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvd2lkZ2V0cy9zdG9yYWdlLWxpc3QvY29tcG9uZW50cy9zdG9yYWdlLWxpc3QtaXRlbS9zdG9yYWdlLWxpc3QtaXRlbS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUVuRCxPQUFPLEVBQ0gsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxRQUFRLEVBQ1IsTUFBTSxFQUNOLFVBQVUsRUFDVixNQUFNLEVBQ04sS0FBSyxFQUNMLE1BQU0sRUFDTixTQUFTLEVBQ1osTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUUvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBRWhDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsd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pc0xvYWRpbmdFbGVtZW50cyA9IGZhbHNlKSkpXG4gICAgICAgICAgICAuc3Vic2NyaWJlKChyZXNwb25zZSkgPT4gdGhpcy5zdG9yYWdlRWxlbWVudHMuc2V0KHJlc3BvbnNlKSk7XG4gICAgfVxufVxuIiwiPG5nLWNvbnRhaW5lciAqY3VpTGV0PVwic3RvcmFnZSgpIGFzIHN0b3JhZ2VcIj5cbiAgICA8ZGl2IGNsYXNzPVwid3JhcHBlclwiPlxuICAgICAgICA8bmctdGVtcGxhdGUgI29wZW5DbG9zZUJ1dHRvbj5cbiAgICAgICAgICAgIEBpZiAoaGFzQ29udGVudCgpKSB7XG4gICAgICAgICAgICAgICAgPGJ1dHRvblxuICAgICAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJidXR0b25cIlxuICAgICAgICAgICAgICAgICAgICAoY2xpY2spPVwib25Ub2dnbGVDaGlsZHJlbigkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIDxjdWktc3ZnXG4gICAgICAgICAgICAgICAgICAgICAgICBbaWNvbl09XCJvcGVuQ2xvc2VCdXR0b25JY29uKClcIlxuICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJ2YXIoLS1jdWktYmFzZS01MDApXCJcbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgPC9uZy10ZW1wbGF0ZT5cblxuICAgICAgICBAaWYgKGl0ZW1TbG90KCk7IGFzIGl0ZW0pIHtcbiAgICAgICAgICAgIDxuZy1jb250YWluZXJcbiAgICAgICAgICAgICAgICAqbmdUZW1wbGF0ZU91dGxldD1cIlxuICAgICAgICAgICAgICAgICAgICBpdGVtO1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkaW1wbGljaXQ6IHN0b3JhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcGVuQ2xvc2VCdXR0b24sXG4gICAgICAgICAgICAgICAgICAgICAgICBhcmVDb250ZW50T3BlbmVkOiBhcmVDb250ZW50T3BlbmVkKCksXG4gICAgICAgICAgICAgICAgICAgICAgICBoYXNDb250ZW50OiBoYXNDb250ZW50KClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFwiXG4gICAgICAgICAgICAvPlxuICAgICAgICB9XG5cbiAgICAgICAgPGRpdlxuICAgICAgICAgICAgY2xhc3M9XCJjb250ZW50XCJcbiAgICAgICAgICAgIFtjbGFzcy5jb250ZW50X2hpZGRlbl09XCIhYXJlQ29udGVudE9wZW5lZCgpXCJcbiAgICAgICAgPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImxpc3RzXCI+XG4gICAgICAgICAgICAgICAgQGlmIChzdG9yYWdlQ2hpbGRyZW4oKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgPGN1aS1zdG9yYWdlLWxpc3RcbiAgICAgICAgICAgICAgICAgICAgICAgIFtzdG9yYWdlc109XCJzdG9yYWdlQ2hpbGRyZW4oKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbZWxlbWVudFNsb3RdPVwiZWxlbWVudFNsb3QoKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbaXRlbVNsb3RdPVwiaXRlbVNsb3QoKVwiXG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIEBpZiAoc3RvcmFnZUVsZW1lbnRzKCkubGVuZ3RoICYmIGVsZW1lbnRTbG90KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgPHVsIGNsYXNzPVwibGlzdFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgQGZvciAoZWxlbWVudCBvZiBzdG9yYWdlRWxlbWVudHMoKTsgdHJhY2sgZWxlbWVudC5pZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsaSBjbGFzcz1cIml0ZW1cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nVGVtcGxhdGVPdXRsZXQ9XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50U2xvdCgpITtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0OiB7ICRpbXBsaWNpdDogZWxlbWVudCwgc3RvcmFnZTogc3RvcmFnZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIDwvdWw+XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuPC9uZy1jb250YWluZXI+XG4iXX0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { CuiStorageListComponent } from './storage-list.component';
|
|
2
|
-
export * from './storage-list.options';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvc3RvcmFnZS1saXN0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ25FLGNBQWMsd0JBQXdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBDdWlTdG9yYWdlTGlzdENvbXBvbmVudCB9IGZyb20gJy4vc3RvcmFnZS1saXN0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL3N0b3JhZ2UtbGlzdC5vcHRpb25zJztcbiJdfQ==
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
|
-
import { CuiStorageListItemComponent } from './components';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class CuiStorageListComponent {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.storages = input.required();
|
|
7
|
-
this.elementSlot = input();
|
|
8
|
-
this.itemSlot = input();
|
|
9
|
-
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
-
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 }); }
|
|
12
|
-
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiStorageListComponent, decorators: [{
|
|
14
|
-
type: Component,
|
|
15
|
-
args: [{ selector: 'cui-storage-list', imports: [CuiStorageListItemComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"list\">\n @for (storage of storages(); track storage.id) {\n <li\n cuiStorageListItem\n [storage]=\"storage\"\n [elementSlot]=\"elementSlot()\"\n [itemSlot]=\"itemSlot()\"\n class=\"item\"\n ></li>\n }\n</ul>\n", styles: [":host{display:block}.list{display:flex;flex-direction:column;gap:8px}.item{position:relative;z-index:0}.item:not(:last-child):before{content:\"\";position:absolute;top:0;left:8px;bottom:-8px;z-index:-1;width:1px;background:var(--cui-base-200)}\n"] }]
|
|
16
|
-
}] });
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvd2lkZ2V0cy9zdG9yYWdlLWxpc3Qvc3RvcmFnZS1saXN0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvd2lkZ2V0cy9zdG9yYWdlLWxpc3Qvc3RvcmFnZS1saXN0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTFFLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLGNBQWMsQ0FBQzs7QUFXM0QsT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W9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2hcbn0pXG5leHBvcnQgY2xhc3MgQ3VpU3RvcmFnZUxpc3RDb21wb25lbnQ8VD4ge1xuICAgIHB1YmxpYyByZWFkb25seSBzdG9yYWdlcyA9IGlucHV0LnJlcXVpcmVkPEN1aVN0b3JhZ2U8VD5bXT4oKTtcbiAgICBwdWJsaWMgcmVhZG9ubHkgZWxlbWVudFNsb3QgPSBpbnB1dDxUZW1wbGF0ZVJlZjx1bmtub3duPj4oKTtcbiAgICBwdWJsaWMgcmVhZG9ubHkgaXRlbVNsb3QgPSBpbnB1dDxUZW1wbGF0ZVJlZjx1bmtub3duPj4oKTtcbn1cbiIsIjx1bCBjbGFzcz1cImxpc3RcIj5cbiAgICBAZm9yIChzdG9yYWdlIG9mIHN0b3JhZ2VzKCk7IHRyYWNrIHN0b3JhZ2UuaWQpIHtcbiAgICAgICAgPGxpXG4gICAgICAgICAgICBjdWlTdG9yYWdlTGlzdEl0ZW1cbiAgICAgICAgICAgIFtzdG9yYWdlXT1cInN0b3JhZ2VcIlxuICAgICAgICAgICAgW2VsZW1lbnRTbG90XT1cImVsZW1lbnRTbG90KClcIlxuICAgICAgICAgICAgW2l0ZW1TbG90XT1cIml0ZW1TbG90KClcIlxuICAgICAgICAgICAgY2xhc3M9XCJpdGVtXCJcbiAgICAgICAgPjwvbGk+XG4gICAgfVxuPC91bD5cbiJdfQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export const CUI_STORAGE_LIST_SERVICE_TOKEN = new InjectionToken('STORAGE_LIST_SERVICE_TOKEN');
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1saXN0Lm9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3d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mV4cG9ydCBpbnRlcmZhY2UgQ3VpU3RvcmFnZTxUID0gQ3VpU3RvcmFnZUJhc2U+IGV4dGVuZHMgQ3VpU3RvcmFnZUJhc2Uge1xuICAgIHJlYWRvbmx5IGVsZW1lbnRzPzogVFtdO1xuICAgIHJlYWRvbmx5IGNoaWxkcmVuOiBDdWlTdG9yYWdlPFQ+W10gfCBzdHJpbmdbXTtcbn1cbiJdfQ==
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, DestroyRef, inject, input } from '@angular/core';
|
|
2
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
|
-
import { CuiLetterBoxComponent } from '../../../components/letter-box/letter-box.component';
|
|
4
|
-
import { CuiSvgModule } from '../../../components/svg/svg.module';
|
|
5
|
-
import { CuiAuthService } from '../../../providers';
|
|
6
|
-
import { CUI_ACTIVITY_SERVICE_TOKEN } from '../user-action-context.option';
|
|
7
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
8
|
-
import { CuiTooltipDirective } from '../../../directives';
|
|
9
|
-
import { Router } from "@angular/router";
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "../../../components/svg/svg.component";
|
|
12
|
-
export class CuiActivityItemComponent {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.transloco = inject(TranslocoService);
|
|
15
|
-
this.router = inject(Router);
|
|
16
|
-
this.destroy = inject(DestroyRef);
|
|
17
|
-
this.cuiAuthService = inject(CuiAuthService);
|
|
18
|
-
this.cuiActivityService = inject(CUI_ACTIVITY_SERVICE_TOKEN);
|
|
19
|
-
this.isSelected = computed(() => this.cuiActivityService.checkIsCurrentActivity(this.activity().activityId));
|
|
20
|
-
this.letterBackgroundColor = computed(() => {
|
|
21
|
-
const licenseType = this.activity().type;
|
|
22
|
-
return licenseType === "MANUFACTURE" /* CuiUserCompanyActivityType.Manufacture */
|
|
23
|
-
? 'var(--cui-orange-500)'
|
|
24
|
-
: 'var(--cui-light-blue-500)';
|
|
25
|
-
});
|
|
26
|
-
this.activity = input.required();
|
|
27
|
-
this.companyId = input.required();
|
|
28
|
-
this.typeCompany = computed(() => {
|
|
29
|
-
return this.transloco.translate(this.activity().type);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
onGoToActivity() {
|
|
33
|
-
if (this.isSelected()) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
this.cuiAuthService
|
|
37
|
-
.exchangeToken({
|
|
38
|
-
type: "EXCHANGE_CONTEXT_ACTIVITY" /* CuiTokenExchangeType.Activity */,
|
|
39
|
-
activityId: this.activity().activityId,
|
|
40
|
-
companyId: this.companyId()
|
|
41
|
-
})
|
|
42
|
-
.pipe(takeUntilDestroyed(this.destroy))
|
|
43
|
-
.subscribe(() => {
|
|
44
|
-
const type = this.activity().type;
|
|
45
|
-
const activityMap = {
|
|
46
|
-
["DEVELOPER" /* CuiUserCompanyActivityType.Developer */]: "cuby-project" /* CuiApiUrl.Project */,
|
|
47
|
-
["MANUFACTURE" /* CuiUserCompanyActivityType.Manufacture */]: "cuby-manufacturing" /* CuiApiUrl.Manufacturing */
|
|
48
|
-
};
|
|
49
|
-
this.router.navigate([activityMap[type]]);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiActivityItemComponent, isStandalone: true, selector: "cui-activity-item", inputs: { activity: { classPropertyName: "activity", publicName: "activity", isSignal: true, isRequired: true, transformFunction: null }, companyId: { classPropertyName: "companyId", publicName: "companyId", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.selected": "isSelected()" } }, ngImport: i0, template: "<div\n class=\"wrapper\"\n (click)=\"onGoToActivity()\"\n [cuiTooltip]=\"activity().description\"\n>\n <button\n type=\"button\"\n class=\"activity-button\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\">{{ activity().description }}</span>\n <span class=\"sub-title\">{{ typeCompany() }}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.wrapper{display:flex;justify-content:space-between}.activity-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.text,.title{display:flex;flex-direction:column;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-400)}\n"], dependencies: [{ kind: "component", type: CuiLetterBoxComponent, selector: "cui-letter-box", inputs: ["letter", "backgroundColor", "size", "shape"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: i1.CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: CuiTooltipDirective, selector: "[cuiTooltip]:not(ng-container):not(ng-template)", inputs: ["cuiTooltipContext", "cuiTooltipAppearance", "cuiTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
54
|
-
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, decorators: [{
|
|
56
|
-
type: Component,
|
|
57
|
-
args: [{ selector: 'cui-activity-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, CuiTooltipDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
58
|
-
'[class.selected]': 'isSelected()'
|
|
59
|
-
}, template: "<div\n class=\"wrapper\"\n (click)=\"onGoToActivity()\"\n [cuiTooltip]=\"activity().description\"\n>\n <button\n type=\"button\"\n class=\"activity-button\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\">{{ activity().description }}</span>\n <span class=\"sub-title\">{{ typeCompany() }}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.wrapper{display:flex;justify-content:space-between}.activity-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.text,.title{display:flex;flex-direction:column;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-400)}\n"] }]
|
|
60
|
-
}] });
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aXZpdHktaXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L2FjdGl2aXR5LWl0ZW0vYWN0aXZpdHktaXRlbS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L2FjdGl2aXR5LWl0ZW0vYWN0aXZpdHktaXRlbS5jb21wb25l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gICAgICAgPGN1aS1zdmdcbiAgICAgICAgICAgICAgICBbaWNvbl09XCInY3VpSWNvbkNoZWNrJ1wiXG4gICAgICAgICAgICAgICAgY29sb3I9XCJ2YXIoLS1jdWktaW5mbylcIlxuICAgICAgICAgICAgLz5cbiAgICAgICAgPC9kaXY+XG4gICAgfVxuPC9kaXY+XG4iXX0=
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './activity-item.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L2FjdGl2aXR5LWl0ZW0vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywyQkFBMkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vYWN0aXZpdHktaXRlbS5jb21wb25lbnQnO1xuIl19
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Component, computed, DestroyRef, inject, input } from '@angular/core';
|
|
2
|
-
import { CuiLetterBoxComponent, CuiSvgModule } from '../../../components';
|
|
3
|
-
import { CUI_ACTIVITY_SERVICE_TOKEN } from '../user-action-context.option';
|
|
4
|
-
import { CuiAuthService } from '../../../providers';
|
|
5
|
-
import { TranslocoPipe } from '@jsverse/transloco';
|
|
6
|
-
import { CuiTooltip } from '../../../directives';
|
|
7
|
-
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
8
|
-
import { Router } from "@angular/router";
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
import * as i1 from "../../../components/svg/svg.component";
|
|
11
|
-
import * as i2 from "../../../directives/tooltip/tooltip.directive";
|
|
12
|
-
export class CompanyItemComponent {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.router = inject(Router);
|
|
15
|
-
this.cuiAuthService = inject(CuiAuthService);
|
|
16
|
-
this.cuiActivityCompanyService = inject(CUI_ACTIVITY_SERVICE_TOKEN);
|
|
17
|
-
this.COMPANY = 'company';
|
|
18
|
-
this.destroy = inject(DestroyRef);
|
|
19
|
-
this.isSelected = computed(() => this.cuiActivityCompanyService.checkIsCurrentCompany(this.company().companyId));
|
|
20
|
-
this.urlCompanyTemplate = computed(() => {
|
|
21
|
-
const origin = window.location.origin;
|
|
22
|
-
const userBasePath = '/cuby-platform/user/works';
|
|
23
|
-
const adminBasePath = '/cuby-platform/admin/companies/edit';
|
|
24
|
-
return {
|
|
25
|
-
userLink: `${origin}${userBasePath}/${this.COMPANY}/{id}/company-structure`,
|
|
26
|
-
adminLink: `${origin}${adminBasePath}/{id}`
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
this.company = input.required();
|
|
30
|
-
this.selected = input(false);
|
|
31
|
-
}
|
|
32
|
-
getRoles() {
|
|
33
|
-
const token = this.cuiAuthService.getAccessTokenData();
|
|
34
|
-
return token.realm_access.roles;
|
|
35
|
-
}
|
|
36
|
-
checkIsAdmin() {
|
|
37
|
-
const roles = this.getRoles();
|
|
38
|
-
return roles.includes("ADMIN" /* CuiTokenRole.Admin */);
|
|
39
|
-
}
|
|
40
|
-
onGoToCompany() {
|
|
41
|
-
if (this.isSelected()) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const { adminLink, userLink } = this.urlCompanyTemplate();
|
|
45
|
-
const linkTemplate = this.checkIsAdmin() ? adminLink : userLink;
|
|
46
|
-
const url = linkTemplate.replace('{id}', this.company().companyId);
|
|
47
|
-
this.wentWorkspace("EXCHANGE_CONTEXT_COMPANY" /* CuiTokenExchangeType.Company */, this.company().companyId).subscribe(() => {
|
|
48
|
-
this.router.navigateByUrl(url);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
wentWorkspace(type, companyId) {
|
|
52
|
-
return this.cuiAuthService
|
|
53
|
-
.exchangeToken({
|
|
54
|
-
type,
|
|
55
|
-
companyId
|
|
56
|
-
})
|
|
57
|
-
.pipe(takeUntilDestroyed(this.destroy));
|
|
58
|
-
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
60
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CompanyItemComponent, isStandalone: true, selector: "cui-company-item", inputs: { company: { classPropertyName: "company", publicName: "company", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.selected": "isSelected()" } }, ngImport: i0, template: "<div\n class=\"title-company\"\n (click)=\"onGoToCompany()\"\n [cuiTooltip]=\"company().name\"\n>\n <button\n type=\"button\"\n class=\"company-button\"\n >\n <cui-letter-box\n [letter]=\"company().name[0]\"\n [backgroundColor]=\"'var(--cui-orange-500)'\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\">{{ company().name }}</span>\n <span class=\"sub-title\">{{ 'COMPANY' | transloco }}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.title-company{display:flex;justify-content:space-between}.title-company:hover{width:100%;border-radius:8px;background-color:var(--cui-badge-light-blue-bg)}.company-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.title{display:flex;flex-direction:column;font-weight:500;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-900);align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-400)}.text{display:flex;flex-direction:column;align-items:flex-start}\n"], dependencies: [{ kind: "component", type: CuiLetterBoxComponent, selector: "cui-letter-box", inputs: ["letter", "backgroundColor", "size", "shape"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: i1.CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }, { kind: "directive", type: i2.CuiTooltipDirective, selector: "[cuiTooltip]:not(ng-container):not(ng-template)", inputs: ["cuiTooltipContext", "cuiTooltipAppearance", "cuiTooltip"] }] }); }
|
|
61
|
-
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, decorators: [{
|
|
63
|
-
type: Component,
|
|
64
|
-
args: [{ selector: 'cui-company-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, TranslocoPipe, CuiTooltip], host: {
|
|
65
|
-
'[class.selected]': 'isSelected()'
|
|
66
|
-
}, template: "<div\n class=\"title-company\"\n (click)=\"onGoToCompany()\"\n [cuiTooltip]=\"company().name\"\n>\n <button\n type=\"button\"\n class=\"company-button\"\n >\n <cui-letter-box\n [letter]=\"company().name[0]\"\n [backgroundColor]=\"'var(--cui-orange-500)'\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\">{{ company().name }}</span>\n <span class=\"sub-title\">{{ 'COMPANY' | transloco }}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.title-company{display:flex;justify-content:space-between}.title-company:hover{width:100%;border-radius:8px;background-color:var(--cui-badge-light-blue-bg)}.company-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.title{display:flex;flex-direction:column;font-weight:500;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-900);align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-400)}.text{display:flex;flex-direction:column;align-items:flex-start}\n"] }]
|
|
67
|
-
}] });
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGFueS1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvd2lkZ2V0cy91c2VyLWFjdGlvbi1jb250ZXh0LW1lbnUvY29tcGFueS1pdGVtL2NvbXBhbnktaXRlbS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L2NvbXBhbnktaXRlbS9jb21wYW55LWl0ZW0uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFL0UsT0FBTyxFQUFFLHFCQUFxQixFQUFFLFlBQVksRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzFFLE9BQU8sRUFBRSwwQkFBMEIsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBRTNFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVwRCxPQUFPLEVB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Lm5hdmlnYXRlQnlVcmwodXJsKTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSB3ZW50V29ya3NwYWNlKHR5cGU6IEN1aVRva2VuRXhjaGFuZ2VUeXBlLCBjb21wYW55SWQ6IHN0cmluZyk6IE9ic2VydmFibGU8Q3VpVG9rZW5SZXNwb25zZT4ge1xuICAgICAgICByZXR1cm4gdGhpcy5jdWlBdXRoU2VydmljZVxuICAgICAgICAgICAgLmV4Y2hhbmdlVG9rZW4oe1xuICAgICAgICAgICAgICAgIHR5cGUsXG4gICAgICAgICAgICAgICAgY29tcGFueUlkXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLnBpcGUodGFrZVVudGlsRGVzdHJveWVkKHRoaXMuZGVzdHJveSkpO1xuICAgIH1cbn1cbiIsIjxkaXZcbiAgICBjbGFzcz1cInRpdGxlLWNvbXBhbnlcIlxuICAgIChjbGljayk9XCJvbkdvVG9Db21wYW55KClcIlxuICAgIFtjdWlUb29sdGlwXT1cImNvbXBhbnkoKS5uYW1lXCJcbj5cbiAgICA8YnV0dG9uXG4gICAgICAgIHR5cGU9XCJidXR0b25cIlxuICAgICAgICBjbGFzcz1cImNvbXBhbnktYnV0dG9uXCJcbiAgICA+XG4gICAgICAgIDxjdWktbGV0dGVyLWJveFxuICAgICAgICAgICAgW2xldHRlcl09XCJjb21wYW55KCkubmFtZVswXVwiXG4gICAgICAgICAgICBbYmFja2dyb3VuZENvbG9yXT1cIid2YXIoLS1jdWktb3JhbmdlLTUwMCknXCJcbiAgICAgICAgICAgIHNpemU9XCJtZFwiXG4gICAgICAgIC8+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJ0ZXh0XCI+XG4gICAgICAgICAgICA8c3BhbiBjbGFzcz1cInRpdGxlXCI+e3sgY29tcGFueSgpLm5hbWUgfX08L3NwYW4+XG4gICAgICAgICAgICA8c3BhbiBjbGFzcz1cInN1Yi10aXRsZVwiPnt7ICdDT01QQU5ZJyB8IHRyYW5zbG9jbyB9fTwvc3Bhbj5cbiAgICAgICAgPC9kaXY+XG4gICAgPC9idXR0b24+XG5cbiAgICBAaWYgKGlzU2VsZWN0ZWQoKSkge1xuICAgICAgICA8ZGl2IGNsYXNzPVwiaWNvbi13cmFwcGVyXCI+XG4gICAgICAgICAgICA8Y3VpLXN2Z1xuICAgICAgICAgICAgICAgIFtpY29uXT1cIidjdWlJY29uQ2hlY2snXCJcbiAgICAgICAgICAgICAgICBjb2xvcj1cInZhcigtLWN1aS1pbmZvKVwiXG4gICAgICAgICAgICAvPlxuICAgICAgICA8L2Rpdj5cbiAgICB9XG48L2Rpdj5cbiJdfQ==
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './company-item.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L2NvbXBhbnktaXRlbS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDBCQUEwQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jb21wYW55LWl0ZW0uY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './translations';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L2NvbnN0YW50cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdCQUFnQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi90cmFuc2xhdGlvbnMnO1xuIl19
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const CuiActivityContextMenuTranslations = {
|
|
2
|
-
en: import('../i18n/en.json'),
|
|
3
|
-
ru: import('../i18n/ru.json')
|
|
4
|
-
};
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29yZS93aWRnZXRzL3VzZXItYWN0aW9uLWNvbnRleHQtbWVudS9jb25zdGFudHMvdHJhbnNsYXRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sQ0FBQyxNQUFNLGtDQUFrQyxHQUF5QztJQUNwRixFQUFFLEVBQUUsTUFBTSxDQUFDLGlCQUFpQixDQUFDO0lBQzdCLEVBQUUsRUFBRSxNQUFNLENBQUMsaUJBQWlCLENBQUM7Q0FDdkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRyYW5zbGF0aW9uIH0gZnJvbSAnQGpzdmVyc2UvdHJhbnNsb2NvJztcblxuZXhwb3J0IGNvbnN0IEN1aUFjdGl2aXR5Q29udGV4dE1lbnVUcmFuc2xhdGlvbnM6IFJlY29yZDxzdHJpbmcsIFByb21pc2U8VHJhbnNsYXRpb24+PiA9IHtcbiAgICBlbjogaW1wb3J0KCcuLi9pMThuL2VuLmpzb24nKSxcbiAgICBydTogaW1wb3J0KCcuLi9pMThuL3J1Lmpzb24nKVxufSBhcyBjb25zdDtcbiJdfQ==
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"CUBY_PLATFORM": "Cuby platform",
|
|
3
|
-
"SWITCH_THEME": "Switch theme",
|
|
4
|
-
"LOG_OUT": "Log out",
|
|
5
|
-
"LANGUAGE": "Language",
|
|
6
|
-
"YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY": "You have no activity in this company.",
|
|
7
|
-
"YOU_DONT_HAVE_COMPANY": "You have no available companies.",
|
|
8
|
-
"COMPANY": "Company",
|
|
9
|
-
"MANUFACTURE": "Manufacture",
|
|
10
|
-
"DELIVERY": "Delivery",
|
|
11
|
-
"DEVELOPER": "Developer"
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"CUBY_PLATFORM": "Платформа Cuby",
|
|
3
|
-
"SWITCH_THEME": "Сменить тему",
|
|
4
|
-
"LOG_OUT": "Выйти",
|
|
5
|
-
"LANGUAGE": "Язык",
|
|
6
|
-
"YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY": "У вас нет активности в этой компании.",
|
|
7
|
-
"YOU_DONT_HAVE_COMPANY": "У вас нет доступных компаний.",
|
|
8
|
-
"COMPANY": "Компания",
|
|
9
|
-
"MANUFACTURE": "Производство",
|
|
10
|
-
"DELIVERY": "Доставка",
|
|
11
|
-
"DEVELOPER": "Разработка"
|
|
12
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from './services';
|
|
2
|
-
export * from './user-action-context.option';
|
|
3
|
-
export * from './constants';
|
|
4
|
-
export { CuiUserActionContextMenuComponent } from './user-action-context-menu.component';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxhQUFhLENBQUM7QUFDNUIsT0FBTyxFQUFFLGlDQUFpQyxFQUFFLE1BQU0sc0NBQXNDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NlcnZpY2VzJztcbmV4cG9ydCAqIGZyb20gJy4vdXNlci1hY3Rpb24tY29udGV4dC5vcHRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9jb25zdGFudHMnO1xuZXhwb3J0IHsgQ3VpVXNlckFjdGlvbkNvbnRleHRNZW51Q29tcG9uZW50IH0gZnJvbSAnLi91c2VyLWFjdGlvbi1jb250ZXh0LW1lbnUuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable, signal } from '@angular/core';
|
|
2
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
|
-
import { UserCompanyApiService } from '@cuby-ui/api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class CuiActivityBaseService {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.userCompanyApiService = inject(UserCompanyApiService);
|
|
8
|
-
this.companiesSignal = signal([]);
|
|
9
|
-
this.companies = this.companiesSignal.asReadonly();
|
|
10
|
-
}
|
|
11
|
-
initActivityData() {
|
|
12
|
-
this.userCompanyApiService
|
|
13
|
-
.getMyCompanies()
|
|
14
|
-
.pipe(takeUntilDestroyed())
|
|
15
|
-
.subscribe((response) => this.companiesSignal.set(response));
|
|
16
|
-
}
|
|
17
|
-
checkIsCurrentActivity(activityId) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
checkIsCurrentCompany(companyId) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityBaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
24
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityBaseService, providedIn: 'root' }); }
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityBaseService, decorators: [{
|
|
27
|
-
type: Injectable,
|
|
28
|
-
args: [{
|
|
29
|
-
providedIn: 'root'
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aXZpdHktYmFzZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29yZS93aWRnZXRzL3VzZXItYWN0aW9uLWNvbnRleHQtbWVudS9zZXJ2aWNlcy9hY3Rpdml0eS1iYXNlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFXLE1BQU0sRUFBRSxVQUFVLEVBQVUsTUFBTSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzNFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBR2hFLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGNBQWMsQ0FBQzs7QUFPckQsTUFBTSxPQUFPLHNCQUFzQjtJQUhuQztRQUlxQiwwQkFBcUIsR0FBRyxNQUFNLENBQUMscUJBQXFCLENBQUMsQ0FBQztRQUV0RCxvQkFBZSxHQUFHLE1BQU0sQ0FBbUIsRUFBRSxDQUFDLENBQUM7UUFFaEQsY0FBUyxHQUFHLElBQUksQ0FBQyxlQUFlLENBQUMsVUFBVSxFQUFFLENBQUM7S0FnQmpFO0lBZFUsZ0JBQWdCO1FBQ25CLElBQUksQ0FBQyxxQkFBcUI7YUFDckIsY0F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GFibGUoe1xuICAgIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBDdWlBY3Rpdml0eUJhc2VTZXJ2aWNlIGltcGxlbWVudHMgQ3VpQWN0aXZpdHlTZXJ2aWNlIHtcbiAgICBwcml2YXRlIHJlYWRvbmx5IHVzZXJDb21wYW55QXBpU2VydmljZSA9IGluamVjdChVc2VyQ29tcGFueUFwaVNlcnZpY2UpO1xuXG4gICAgcHJpdmF0ZSByZWFkb25seSBjb21wYW5pZXNTaWduYWwgPSBzaWduYWw8Q3VpVXNlckNvbXBhbnlbXT4oW10pO1xuXG4gICAgcHVibGljIHJlYWRvbmx5IGNvbXBhbmllcyA9IHRoaXMuY29tcGFuaWVzU2lnbmFsLmFzUmVhZG9ubHkoKTtcblxuICAgIHB1YmxpYyBpbml0QWN0aXZpdHlEYXRhKCk6IHZvaWQge1xuICAgICAgICB0aGlzLnVzZXJDb21wYW55QXBpU2VydmljZVxuICAgICAgICAgICAgLmdldE15Q29tcGFuaWVzKClcbiAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbERlc3Ryb3llZCgpKVxuICAgICAgICAgICAgLnN1YnNjcmliZSgocmVzcG9uc2UpID0+IHRoaXMuY29tcGFuaWVzU2lnbmFsLnNldChyZXNwb25zZSkpO1xuICAgIH1cblxuICAgIHB1YmxpYyBjaGVja0lzQ3VycmVudEFjdGl2aXR5KGFjdGl2aXR5SWQ6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgcHVibGljIGNoZWNrSXNDdXJyZW50Q29tcGFueShjb21wYW55SWQ6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufVxuIl19
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { CuiAuthService } from '../../../providers';
|
|
3
|
-
import { CuiActivityBaseService } from './activity-base.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class CuiActivityImplService extends CuiActivityBaseService {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.cuiAuthService = inject(CuiAuthService);
|
|
9
|
-
this.authData = this.cuiAuthService.getAccessTokenData();
|
|
10
|
-
this.currentActivityId = this.authData.employee_session?.activityId;
|
|
11
|
-
this.currentCompanyId = this.authData.employee_session?.companyId;
|
|
12
|
-
this.isCheckActivity = false;
|
|
13
|
-
}
|
|
14
|
-
checkIsCurrentActivity(activityId) {
|
|
15
|
-
if (this.currentActivityId === activityId) {
|
|
16
|
-
this.isCheckActivity = true;
|
|
17
|
-
}
|
|
18
|
-
return this.currentActivityId === activityId;
|
|
19
|
-
}
|
|
20
|
-
checkIsCurrentCompany(companyId) {
|
|
21
|
-
if (this.isCheckActivity) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
return this.currentCompanyId === companyId;
|
|
25
|
-
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
27
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, providedIn: 'any' }); }
|
|
28
|
-
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, decorators: [{
|
|
30
|
-
type: Injectable,
|
|
31
|
-
args: [{
|
|
32
|
-
providedIn: 'any'
|
|
33
|
-
}]
|
|
34
|
-
}] });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aXZpdHkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy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lFeGNoYW5nZVRva2VuU2Vzc2lvbj4oKTtcbiAgICBwcml2YXRlIHJlYWRvbmx5IGN1cnJlbnRBY3Rpdml0eUlkID0gdGhpcy5hdXRoRGF0YS5lbXBsb3llZV9zZXNzaW9uPy5hY3Rpdml0eUlkO1xuICAgIHByaXZhdGUgcmVhZG9ubHkgY3VycmVudENvbXBhbnlJZCA9IHRoaXMuYXV0aERhdGEuZW1wbG95ZWVfc2Vzc2lvbj8uY29tcGFueUlkO1xuICAgIHByaXZhdGUgaXNDaGVja0FjdGl2aXR5ID0gZmFsc2U7XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgY2hlY2tJc0N1cnJlbnRBY3Rpdml0eShhY3Rpdml0eUlkOiBzdHJpbmcpOiBib29sZWFuIHtcbiAgICAgICAgaWYodGhpcy5jdXJyZW50QWN0aXZpdHlJZCA9PT0gYWN0aXZpdHlJZCkge1xuICAgICAgICAgICAgdGhpcy5pc0NoZWNrQWN0aXZpdHkgPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXMuY3VycmVudEFjdGl2aXR5SWQgPT09IGFjdGl2aXR5SWQ7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIGNoZWNrSXNDdXJyZW50Q29tcGFueShjb21wYW55SWQ6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgICAgICBpZih0aGlzLmlzQ2hlY2tBY3Rpdml0eSl7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5jdXJyZW50Q29tcGFueUlkID09PSBjb21wYW55SWQ7XG4gICAgfVxufVxuIl19
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { CuiActivityImplService } from './activity.service';
|
|
2
|
-
export { CuiActivityBaseService } from './activity-base.service';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3dpZGdldHMvdXNlci1hY3Rpb24tY29udGV4dC1tZW51L3NlcnZpY2VzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQzVELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgQ3VpQWN0aXZpdHlJbXBsU2VydmljZSB9IGZyb20gJy4vYWN0aXZpdHkuc2VydmljZSc7XG5leHBvcnQgeyBDdWlBY3Rpdml0eUJhc2VTZXJ2aWNlIH0gZnJvbSAnLi9hY3Rpdml0eS1iYXNlLnNlcnZpY2UnO1xuIl19
|