@provoly/dashboard 1.4.14 → 1.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-form/admin-abac-rules-form.component.mjs +7 -7
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules.component.mjs +3 -3
- package/esm2022/admin/components/admin-abac-rules/components/attribute-condition/attribute-condition.component.mjs +7 -7
- package/esm2022/admin/components/admin-abac-rules/components/composed-condition/composed-condition.component.mjs +10 -10
- package/esm2022/admin/components/admin-abac-rules/components/metadata-condition/metadata-condition.component.mjs +6 -6
- package/esm2022/admin/components/admin-abac-rules/components/select-attribute/select-attribute.component.mjs +3 -3
- package/esm2022/admin/components/admin-abac-rules/components/select-metadata/select-metadata.component.mjs +3 -3
- package/esm2022/admin/components/admin-classes/admin-classes-customize/admin-classes-customize.component.mjs +10 -10
- package/esm2022/admin/components/admin-classes/admin-classes-customize/symbol/admin-classes-customize-symbol.component.mjs +10 -15
- package/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +8 -8
- package/esm2022/admin/components/admin-classes/admin-classes-edit/admin-classes-edit.component.mjs +5 -5
- package/esm2022/admin/components/admin-classes/admin-classes-form/admin-classes-form.component.mjs +5 -5
- package/esm2022/admin/components/admin-classes/admin-classes-select/admin-classes-select.component.mjs +6 -6
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-edit/admin-attributes-edit.component.mjs +5 -5
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +3 -3
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-new/admin-attributes-new.component.mjs +5 -5
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-select/admin-attributes-select.component.mjs +6 -6
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-classes-view.component.mjs +3 -3
- package/esm2022/admin/components/admin-classes/admin-classes.component.mjs +5 -5
- package/esm2022/admin/components/admin-dataset/admin-dataset.component.mjs +6 -6
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +7 -7
- package/esm2022/admin/components/admin-environment/admin-environment-form/admin-environment-form.component.mjs +3 -3
- package/esm2022/admin/components/admin-environment/admin-environment-select/admin-environment-select.component.mjs +5 -5
- package/esm2022/admin/components/admin-environment/admin-environment-update/admin-environment-update.component.mjs +5 -5
- package/esm2022/admin/components/admin-environment/admin-environment.component.mjs +5 -5
- package/esm2022/admin/components/admin-fields/admin-fields-edit/admin-fields-edit.component.mjs +5 -5
- package/esm2022/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.mjs +3 -3
- package/esm2022/admin/components/admin-layout/admin-layout.component.mjs +3 -3
- package/esm2022/admin/components/admin-links/admin-links-new/admin-links-new.component.mjs +5 -5
- package/esm2022/admin/components/admin-links/admin-links.component.mjs +5 -5
- package/esm2022/admin/components/admin-menu/admin-menu.component.mjs +5 -5
- package/esm2022/admin/components/admin-metadata/admin-edit-metadata/admin-edit-metadata.component.mjs +5 -5
- package/esm2022/admin/components/admin-metadata/admin-select-metadata/admin-select-metadata.component.mjs +5 -5
- package/esm2022/admin/components/admin-metadata/shared/form-metadata/form-metadata.component.mjs +4 -5
- package/esm2022/admin/components/admin-metadata/shared/list-metadata/pry-list-metadata.component.mjs +5 -6
- package/esm2022/admin/components/admin-metadata-rules/admin-metadata-rules.component.mjs +5 -5
- package/esm2022/admin/components/admin-metadata-rules/admin-select-metadata-rules/admin-select-metadata-rules.component.mjs +5 -5
- package/esm2022/admin/components/admin-metadata-rules/shared/admin-form-metadata-rules/admin-form-metadata-rules.component.mjs +4 -5
- package/esm2022/admin/components/admin-metadata-user/admin-user-edit-metadata/admin-user-edit-metadata.component.mjs +5 -5
- package/esm2022/admin/components/admin-metadata-user/admin-user-select-metadata/admin-user-select-metadata.component.mjs +5 -5
- package/esm2022/admin/components/admin-predicates/admin-predicates-form/admin-predicates-form.component.mjs +5 -5
- package/esm2022/admin/components/admin-predicates/admin-predicates-select/admin-predicates-select.component.mjs +5 -5
- package/esm2022/admin/components/admin-predicates/admin-predicates-update/admin-predicates-update.component.mjs +5 -5
- package/esm2022/admin/components/admin-predicates/admin-predicates.component.mjs +5 -5
- package/esm2022/admin/components/admin-relation-types/admin-relation-types-modal/admin-relation-types-modal.component.mjs +4 -5
- package/esm2022/admin/components/admin-relation-types/admin-relation-types-select/admin-relation-types-select.component.mjs +5 -5
- package/esm2022/admin/components/admin-relation-types/admin-relation-types.component.mjs +6 -6
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +6 -6
- package/esm2022/admin/components/admin-user/admin-user.component.mjs +5 -5
- package/esm2022/admin/components/association/association.component.mjs +4 -5
- package/esm2022/components/card/card.component.mjs +5 -6
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +6 -6
- package/esm2022/components/scheme-picker/scheme-picker.component.mjs +7 -7
- package/esm2022/components/stepper/stepper.component.mjs +3 -4
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +5 -5
- package/esm2022/dataset/components/dataset-version-form/dataset-version-form.component.mjs +6 -7
- package/esm2022/filters/date/date-filter.component.mjs +5 -6
- package/esm2022/filters/list/list-filter.component.mjs +6 -7
- package/esm2022/filters/number/number-filter.component.mjs +5 -6
- package/esm2022/filters/text/text-filter.component.mjs +5 -6
- package/esm2022/lib/core/components/about/about.component.mjs +3 -3
- package/esm2022/lib/core/components/accordion/accordion-item/accordion-item.component.mjs +7 -7
- package/esm2022/lib/core/components/base-menu/base-menu.component.mjs +6 -6
- package/esm2022/lib/core/components/base-toolbox/base-toolbox.component.mjs +6 -6
- package/esm2022/lib/core/components/base-toolbox-action/base-toolbox-action.component.mjs +6 -7
- package/esm2022/lib/core/components/date-picker/date-picker.component.mjs +4 -4
- package/esm2022/lib/core/components/date-picker/time-picker/loop-scroll-column/loop-scroll-column.component.mjs +3 -4
- package/esm2022/lib/core/components/date-picker/time-picker/time-picker.component.mjs +6 -6
- package/esm2022/lib/core/components/edit-input/edit-input.component.mjs +7 -8
- package/esm2022/lib/core/components/icon/icon.component.mjs +3 -3
- package/esm2022/lib/core/components/modal/modal.component.mjs +5 -6
- package/esm2022/lib/core/components/nq-color-selector/nq-color-selector.component.mjs +5 -5
- package/esm2022/lib/core/components/overlay/dialog-confirm.component.mjs +3 -3
- package/esm2022/lib/core/components/range/range.component.mjs +5 -6
- package/esm2022/lib/core/components/select/select.component.mjs +3 -3
- package/esm2022/lib/core/components/select-image/select-image.component.mjs +5 -5
- package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +6 -6
- package/esm2022/lib/core/components/snackbar/snackbar/snackbar.component.mjs +3 -3
- package/esm2022/lib/core/components/status-modal/status-modal.component.mjs +5 -5
- package/esm2022/lib/core/components/tabs/tab-group.component.mjs +3 -3
- package/esm2022/lib/core/components/toggle/toggle.component.mjs +4 -4
- package/esm2022/lib/core/store/data-source/data-source.effects.mjs +9 -9
- package/esm2022/lib/core/store/search/search.effects.mjs +4 -2
- package/esm2022/lib/core/store/search/search.service.mjs +3 -7
- package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +3 -3
- package/esm2022/lib/dashboard/action-bus/service/bus.service.mjs +2 -2
- package/esm2022/lib/dashboard/components/context-menu/context-menu.component.mjs +8 -8
- package/esm2022/lib/dashboard/components/dashboard.component.mjs +12 -12
- package/esm2022/lib/dashboard/components/manifests/manifests.component.mjs +5 -5
- package/esm2022/lib/dashboard/components/metadata/metadata.component.mjs +5 -6
- package/esm2022/lib/dashboard/components/vizualize-raw/vizualize-raw.component.mjs +3 -3
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-selector.component.mjs +6 -6
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +10 -10
- package/esm2022/lib/dashboard/components/widgets/widget-filler/widget-filler.component.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/widget-placement/widget-placement.utils.mjs +2 -2
- package/esm2022/lib/dashboard/filter/components/filter-group/filter-group.component.mjs +7 -7
- package/esm2022/lib/dashboard/resultset-utils.mjs +7 -8
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +4 -4
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +13 -24
- package/esm2022/lib/dashboard/tooltip/components/default/default.tooltip.component.mjs +3 -3
- package/esm2022/notification/components/notification/content/notification-content.component.mjs +3 -3
- package/esm2022/notification/components/notification/notification.component.mjs +5 -5
- package/esm2022/pipeline/components/pipeline-details/pipeline-details.component.mjs +7 -7
- package/esm2022/pipeline/components/pipeline-editor/graph-serializer.utils.mjs +2 -2
- package/esm2022/pipeline/components/pipeline-editor/pipeline-editor.component.mjs +5 -5
- package/esm2022/pipeline/components/pipeline-list/pipeline-list.component.mjs +9 -9
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +6 -6
- package/esm2022/presentation/components/presentation.component.mjs +6 -6
- package/esm2022/presentation/components/title-presentation/title-presentation.component.mjs +5 -5
- package/esm2022/restitution/components/restitution/restitution.component.mjs +3 -3
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +9 -9
- package/esm2022/restitution/components/restitution-list-item/restitution-list-item.component.mjs +3 -3
- package/esm2022/search/components/choose-widget/choose-widget.component.mjs +5 -5
- package/esm2022/search/components/edit-named-query/edit-named-query.component.mjs +9 -9
- package/esm2022/search/search-fulltext/search-fulltext/search-fulltext.component.mjs +3 -3
- package/esm2022/search/search-home/search-home.component.mjs +3 -3
- package/esm2022/search/search-mono-class/components/search-composed/search-composed.component.mjs +3 -3
- package/esm2022/search/search-mono-class/components/search-condition/search-condition.component.mjs +3 -3
- package/esm2022/search/search-mono-class/components/search-mono-class/search-mono-class.component.mjs +8 -8
- package/esm2022/search/search-mono-class/components/search-order/search-order.component.mjs +6 -6
- package/esm2022/search/search-mono-class/components/search-select-attribute/search-select-attribute.component.mjs +3 -3
- package/esm2022/search/search-multi-class/components/multi-class-condition/multi-class-condition.component.mjs +7 -7
- package/esm2022/search/search-multi-class/components/multi-class-field-selection/multi-class-field-selection.component.mjs +6 -6
- package/esm2022/search/search-multi-class/components/search-multi-class/search-multi-class.component.mjs +7 -7
- package/esm2022/search/search-tools/search-tools.component.mjs +13 -13
- package/esm2022/toolbox/components/named-query/named-query.component.mjs +5 -5
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +10 -10
- package/esm2022/toolbox/components/select-grid-layout/select-grid-layout.component.mjs +8 -8
- package/esm2022/toolbox/shared/presentation-form/presentation-form.component.mjs +5 -6
- package/esm2022/tooltips/attribute/attribute-tooltip.component.mjs +3 -3
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +4 -4
- package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +2 -2
- package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +12 -12
- package/esm2022/widgets/widget-detail/component/widget-detail.component.mjs +13 -7
- package/esm2022/widgets/widget-graph/component/widget-graph.component.mjs +7 -7
- package/esm2022/widgets/widget-iframe/component/widget-iframe.component.mjs +7 -7
- package/esm2022/widgets/widget-iframe/messaging/iframe-messaging.service.mjs +2 -2
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +10 -10
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +2 -2
- package/esm2022/widgets/widget-table/component/widget-table.component.mjs +2 -2
- package/esm2022/widgets/widget-table/expand-value/expand-value.component.mjs +4 -5
- package/esm2022/widgets/widget-template/component/widget-template.component.mjs +7 -7
- package/esm2022/widgets/widget-tile/component/widget-tile.component.mjs +10 -10
- package/esm2022/widgets/widget-vega/component/widget-vega.component.mjs +9 -9
- package/fesm2022/provoly-dashboard-admin.mjs +171 -175
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-card.mjs +4 -5
- package/fesm2022/provoly-dashboard-components-card.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +4 -4
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-scheme-picker.mjs +6 -6
- package/fesm2022/provoly-dashboard-components-scheme-picker.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-stepper.mjs +2 -3
- package/fesm2022/provoly-dashboard-components-stepper.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +14 -14
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-date.mjs +4 -5
- package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-list.mjs +4 -5
- package/fesm2022/provoly-dashboard-filters-list.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-number.mjs +4 -5
- package/fesm2022/provoly-dashboard-filters-number.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-text.mjs +4 -5
- package/fesm2022/provoly-dashboard-filters-text.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-notification.mjs +4 -4
- package/fesm2022/provoly-dashboard-notification.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline.mjs +21 -21
- package/fesm2022/provoly-dashboard-pipeline.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +14 -14
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +6 -6
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-search.mjs +35 -35
- package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +25 -25
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs +2 -2
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +3 -3
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs +10 -10
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs +11 -5
- package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs +5 -5
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-iframe.mjs +8 -8
- package/fesm2022/provoly-dashboard-widgets-widget-iframe.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +9 -9
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +6 -6
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-template.mjs +7 -7
- package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs +11 -11
- package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +7 -7
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +204 -219
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i5 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Injectable, forwardRef, Component, NgModule } from '@angular/core';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
7
7
|
import { BehaviorSubject, map } from 'rxjs';
|
|
8
8
|
import * as i2 from '@provoly/dashboard';
|
|
9
9
|
import { VegaColorType, PryI18nModule, PrySelectModule, PryIconModule } from '@provoly/dashboard';
|
|
10
10
|
import { vega } from 'vega-embed';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i4 from '@provoly/dashboard/components/color-picker';
|
|
12
12
|
import { PryColorPickerModule } from '@provoly/dashboard/components/color-picker';
|
|
13
13
|
|
|
14
14
|
class PrySchemeService {
|
|
@@ -126,13 +126,13 @@ class PrySchemePickerComponent {
|
|
|
126
126
|
this.writeValue(newScheme.join(','));
|
|
127
127
|
}
|
|
128
128
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PrySchemePickerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PrySchemeService }, { token: i2.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
129
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
129
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PrySchemePickerComponent, selector: "pry-scheme-picker", providers: [
|
|
130
130
|
{
|
|
131
131
|
provide: NG_VALUE_ACCESSOR,
|
|
132
132
|
useExisting: forwardRef(() => PrySchemePickerComponent),
|
|
133
133
|
multi: true
|
|
134
134
|
}
|
|
135
|
-
], ngImport: i0, template: "<div class=\"m-color-scheme\">\n <label class=\"a-label\" for=\"scheme\">{{ '@pry.widget.colorScheme' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"scheme$ | async\"\n [items]=\"schemes$ | async\"\n id=\"scheme\"\n bindValue=\"id\"\n bindLabel=\"label\"\n ></pry-select>\n</div>\n\n<div class=\"m-color-scheme__display\">\n
|
|
135
|
+
], ngImport: i0, template: "<div class=\"m-color-scheme\">\n <label class=\"a-label\" for=\"scheme\">{{ '@pry.widget.colorScheme' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"scheme$ | async\"\n [items]=\"schemes$ | async\"\n id=\"scheme\"\n bindValue=\"id\"\n bindLabel=\"label\"\n ></pry-select>\n</div>\n\n<div class=\"m-color-scheme__display\">\n @for (colorScheme of schemeColors$ | async; track colorScheme; let i = $index) {\n <div class=\"m-color-scheme__display__item\">\n <pry-color-picker [ngModel]=\"colorScheme\" (ngModelChange)=\"modifyColorScheme($event, i)\"></pry-color-picker>\n <button\n (click)=\"removeColorFromScheme(i)\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.widget.removeColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.removeColor' | i18n }}</span>\n <pry-icon iconSvg=\"trash\"></pry-icon>\n </button>\n </div>\n }\n <button\n (click)=\"addColorToScheme()\"\n class=\"a-btn a-btn--primary a-btn--icon-only\"\n title=\"{{ '@pry.widget.addColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.addColor' | i18n }}</span>\n <pry-icon iconSvg=\"add\"></pry-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "component", type: i4.PryColorPickerComponent, selector: "pry-color-picker" }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }] }); }
|
|
136
136
|
}
|
|
137
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PrySchemePickerComponent, decorators: [{
|
|
138
138
|
type: Component,
|
|
@@ -142,7 +142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
142
142
|
useExisting: forwardRef(() => PrySchemePickerComponent),
|
|
143
143
|
multi: true
|
|
144
144
|
}
|
|
145
|
-
], template: "<div class=\"m-color-scheme\">\n <label class=\"a-label\" for=\"scheme\">{{ '@pry.widget.colorScheme' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"scheme$ | async\"\n [items]=\"schemes$ | async\"\n id=\"scheme\"\n bindValue=\"id\"\n bindLabel=\"label\"\n ></pry-select>\n</div>\n\n<div class=\"m-color-scheme__display\">\n
|
|
145
|
+
], template: "<div class=\"m-color-scheme\">\n <label class=\"a-label\" for=\"scheme\">{{ '@pry.widget.colorScheme' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"scheme$ | async\"\n [items]=\"schemes$ | async\"\n id=\"scheme\"\n bindValue=\"id\"\n bindLabel=\"label\"\n ></pry-select>\n</div>\n\n<div class=\"m-color-scheme__display\">\n @for (colorScheme of schemeColors$ | async; track colorScheme; let i = $index) {\n <div class=\"m-color-scheme__display__item\">\n <pry-color-picker [ngModel]=\"colorScheme\" (ngModelChange)=\"modifyColorScheme($event, i)\"></pry-color-picker>\n <button\n (click)=\"removeColorFromScheme(i)\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.widget.removeColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.removeColor' | i18n }}</span>\n <pry-icon iconSvg=\"trash\"></pry-icon>\n </button>\n </div>\n }\n <button\n (click)=\"addColorToScheme()\"\n class=\"a-btn a-btn--primary a-btn--icon-only\"\n title=\"{{ '@pry.widget.addColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.addColor' | i18n }}</span>\n <pry-icon iconSvg=\"add\"></pry-icon>\n </button>\n</div>\n" }]
|
|
146
146
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: PrySchemeService }, { type: i2.PryI18nService }] });
|
|
147
147
|
|
|
148
148
|
const PRY_SCHEMEPICKER_COMPONENTS = [PrySchemePickerComponent];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-components-scheme-picker.mjs","sources":["../../../../projects/provoly/dashboard/components/scheme-picker/scheme.service.ts","../../../../projects/provoly/dashboard/components/scheme-picker/scheme-picker.component.ts","../../../../projects/provoly/dashboard/components/scheme-picker/scheme-picker.component.html","../../../../projects/provoly/dashboard/components/scheme-picker/scheme-picker.module.ts","../../../../projects/provoly/dashboard/components/scheme-picker/provoly-dashboard-components-scheme-picker.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\nimport {VegaColorType} from '@provoly/dashboard';\nimport {vega} from 'vega-embed';\n\n@Injectable({ providedIn: 'root' })\nexport class PrySchemeService {\n schemeIds$ = new BehaviorSubject<string[]>([]);\n\n constructor() {\n vega.scheme('KO/W/OK', ['#C04D3F', '#FD9843', '#9ABE29']);\n vega.scheme('Provoly', ['#113B6E', '#4E92E4', '#40B688', '#7BCCAD', '#FFC971', '#FD9843', '#EC547A']);\n this.schemeIds$.next(Object.values(VegaColorType));\n }\n\n getSchemeColors(scheme: string): string[] {\n if (!scheme) {\n return this.getSchemeColors(this.getDefaultScheme());\n }\n if (scheme.indexOf('#') === 0) {\n return scheme.split(',').map((color) => (color.indexOf('#') === 0 ? color : `#${color}`));\n }\n return vega.scheme(scheme) as string[];\n }\n\n getDefaultScheme() {\n return this.schemeIds$.getValue()[0];\n }\n\n randomColor() {\n return (\n '#' +\n Math.floor(Math.random() * 16777215)\n .toString(16)\n .padStart(6, '0')\n .toUpperCase()\n );\n }\n\n assertScheme(scheme: string) {\n if (!!scheme) {\n if (scheme.indexOf('#') === 0) {\n vega.scheme(scheme, scheme.split(','));\n this.schemeIds$.next([...new Set([...this.schemeIds$.getValue(), scheme])]);\n }\n }\n }\n}\n","import { AfterViewInit, ChangeDetectorRef, Component, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { PrySchemeService } from './scheme.service';\nimport { BehaviorSubject, map, Observable } from 'rxjs';\nimport { PryI18nService } from '@provoly/dashboard';\n\n@Component({\n selector: 'pry-scheme-picker',\n templateUrl: './scheme-picker.component.html',\n\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PrySchemePickerComponent),\n multi: true\n }\n ]\n})\nexport class PrySchemePickerComponent implements ControlValueAccessor, AfterViewInit {\n onChange: any = () => {};\n onTouch: any = () => {};\n scheme$ = new BehaviorSubject<string>('Provoly');\n schemes$: Observable<{ id: string; label: string }[]>;\n inhibate = true;\n disabled = false;\n schemeColors$: Observable<string[]>;\n\n constructor(\n private _cd: ChangeDetectorRef,\n private schemeService: PrySchemeService,\n private i18nService: PryI18nService\n ) {\n this.schemes$ = this.schemeService.schemeIds$.pipe(\n map((schemes) => {\n let customNumber = 1;\n return schemes.map((scheme, idx) => ({\n id: scheme,\n label:\n scheme.indexOf('#') === 0 ? this.i18nService.instant('@pry.widget.custom', { id: customNumber++ }) : scheme\n }));\n })\n );\n this.schemeColors$ = this.scheme$.pipe(map((scheme) => this.schemeService.getSchemeColors(scheme)));\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n // Define what should happen in this component, if something changes outside\n writeValue(scheme: string) {\n if (this.scheme$.getValue() !== scheme && !this.inhibate) {\n this.scheme$.next(scheme);\n this.onChange(this.scheme$.getValue());\n this.onTouch();\n this._cd.markForCheck();\n this.schemeService.assertScheme(this.scheme$.getValue());\n this.temporaryDisable();\n }\n }\n\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._cd.markForCheck();\n }\n\n temporaryDisable() {\n this.inhibate = true;\n setTimeout(() => {\n this.inhibate = false;\n }, 100);\n }\n\n ngAfterViewInit(): void {\n this.temporaryDisable();\n }\n\n changeColorScheme($event: any) {\n if ($event === '#') {\n this.writeValue(this.schemeService.getSchemeColors(this.schemeService.getDefaultScheme()).join(','));\n } else {\n this.writeValue($event);\n }\n }\n\n modifyColorScheme($event: string, index: number) {\n if (!this.inhibate) {\n const newScheme = [...this.schemeService.getSchemeColors(this.scheme$.getValue())];\n newScheme[index] = $event;\n this.writeValue(newScheme.join(','));\n }\n }\n\n addColorToScheme() {\n this.writeValue(\n [this.schemeService.getSchemeColors(this.scheme$.getValue()), this.schemeService.randomColor()].join(',')\n );\n }\n\n removeColorFromScheme(index: number) {\n const newScheme = [...this.schemeService.getSchemeColors(this.scheme$.getValue())];\n newScheme.splice(index, 1);\n this.writeValue(newScheme.join(','));\n }\n}\n","<div class=\"m-color-scheme\">\n <label class=\"a-label\" for=\"scheme\">{{ '@pry.widget.colorScheme' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"scheme$ | async\"\n [items]=\"schemes$ | async\"\n id=\"scheme\"\n bindValue=\"id\"\n bindLabel=\"label\"\n ></pry-select>\n</div>\n\n<div class=\"m-color-scheme__display\">\n <div class=\"m-color-scheme__display__item\" *ngFor=\"let colorScheme of schemeColors$ | async; let i = index\">\n <pry-color-picker [ngModel]=\"colorScheme\" (ngModelChange)=\"modifyColorScheme($event, i)\"></pry-color-picker>\n <button\n (click)=\"removeColorFromScheme(i)\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.widget.removeColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.removeColor' | i18n }}</span>\n <pry-icon iconSvg=\"trash\"></pry-icon>\n </button>\n </div>\n <button\n (click)=\"addColorToScheme()\"\n class=\"a-btn a-btn--primary a-btn--icon-only\"\n title=\"{{ '@pry.widget.addColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.addColor' | i18n }}</span>\n <pry-icon iconSvg=\"add\"></pry-icon>\n </button>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { PrySchemePickerComponent } from './scheme-picker.component';\nimport { PryI18nModule, PryIconModule, PrySelectModule } from '@provoly/dashboard';\nimport { PryColorPickerModule } from '@provoly/dashboard/components/color-picker';\n\nconst PRY_SCHEMEPICKER_COMPONENTS = [PrySchemePickerComponent];\n\n@NgModule({\n imports: [CommonModule, FormsModule, PryI18nModule, PrySelectModule, PryColorPickerModule, PryIconModule],\n declarations: [...PRY_SCHEMEPICKER_COMPONENTS],\n exports: [...PRY_SCHEMEPICKER_COMPONENTS]\n})\nexport class PrySchemePickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.PrySchemeService"],"mappings":";;;;;;;;;;;;;MAMa,gBAAgB,CAAA;AAG3B,IAAA,WAAA,GAAA;AAFA,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,eAAe,CAAW,EAAE,CAAC,CAAC;AAG7C,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAC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E,CAAC,GAAG,2BAA2B,CAAC;AAC1C,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-components-scheme-picker.mjs","sources":["../../../../projects/provoly/dashboard/components/scheme-picker/scheme.service.ts","../../../../projects/provoly/dashboard/components/scheme-picker/scheme-picker.component.ts","../../../../projects/provoly/dashboard/components/scheme-picker/scheme-picker.component.html","../../../../projects/provoly/dashboard/components/scheme-picker/scheme-picker.module.ts","../../../../projects/provoly/dashboard/components/scheme-picker/provoly-dashboard-components-scheme-picker.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\nimport {VegaColorType} from '@provoly/dashboard';\nimport {vega} from 'vega-embed';\n\n@Injectable({ providedIn: 'root' })\nexport class PrySchemeService {\n schemeIds$ = new BehaviorSubject<string[]>([]);\n\n constructor() {\n vega.scheme('KO/W/OK', ['#C04D3F', '#FD9843', '#9ABE29']);\n vega.scheme('Provoly', ['#113B6E', '#4E92E4', '#40B688', '#7BCCAD', '#FFC971', '#FD9843', '#EC547A']);\n this.schemeIds$.next(Object.values(VegaColorType));\n }\n\n getSchemeColors(scheme: string): string[] {\n if (!scheme) {\n return this.getSchemeColors(this.getDefaultScheme());\n }\n if (scheme.indexOf('#') === 0) {\n return scheme.split(',').map((color) => (color.indexOf('#') === 0 ? color : `#${color}`));\n }\n return vega.scheme(scheme) as string[];\n }\n\n getDefaultScheme() {\n return this.schemeIds$.getValue()[0];\n }\n\n randomColor() {\n return (\n '#' +\n Math.floor(Math.random() * 16777215)\n .toString(16)\n .padStart(6, '0')\n .toUpperCase()\n );\n }\n\n assertScheme(scheme: string) {\n if (!!scheme) {\n if (scheme.indexOf('#') === 0) {\n vega.scheme(scheme, scheme.split(','));\n this.schemeIds$.next([...new Set([...this.schemeIds$.getValue(), scheme])]);\n }\n }\n }\n}\n","import { AfterViewInit, ChangeDetectorRef, Component, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { PrySchemeService } from './scheme.service';\nimport { BehaviorSubject, map, Observable } from 'rxjs';\nimport { PryI18nService } from '@provoly/dashboard';\n\n@Component({\n selector: 'pry-scheme-picker',\n templateUrl: './scheme-picker.component.html',\n\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PrySchemePickerComponent),\n multi: true\n }\n ]\n})\nexport class PrySchemePickerComponent implements ControlValueAccessor, AfterViewInit {\n onChange: any = () => {};\n onTouch: any = () => {};\n scheme$ = new BehaviorSubject<string>('Provoly');\n schemes$: Observable<{ id: string; label: string }[]>;\n inhibate = true;\n disabled = false;\n schemeColors$: Observable<string[]>;\n\n constructor(\n private _cd: ChangeDetectorRef,\n private schemeService: PrySchemeService,\n private i18nService: PryI18nService\n ) {\n this.schemes$ = this.schemeService.schemeIds$.pipe(\n map((schemes) => {\n let customNumber = 1;\n return schemes.map((scheme, idx) => ({\n id: scheme,\n label:\n scheme.indexOf('#') === 0 ? this.i18nService.instant('@pry.widget.custom', { id: customNumber++ }) : scheme\n }));\n })\n );\n this.schemeColors$ = this.scheme$.pipe(map((scheme) => this.schemeService.getSchemeColors(scheme)));\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n // Define what should happen in this component, if something changes outside\n writeValue(scheme: string) {\n if (this.scheme$.getValue() !== scheme && !this.inhibate) {\n this.scheme$.next(scheme);\n this.onChange(this.scheme$.getValue());\n this.onTouch();\n this._cd.markForCheck();\n this.schemeService.assertScheme(this.scheme$.getValue());\n this.temporaryDisable();\n }\n }\n\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._cd.markForCheck();\n }\n\n temporaryDisable() {\n this.inhibate = true;\n setTimeout(() => {\n this.inhibate = false;\n }, 100);\n }\n\n ngAfterViewInit(): void {\n this.temporaryDisable();\n }\n\n changeColorScheme($event: any) {\n if ($event === '#') {\n this.writeValue(this.schemeService.getSchemeColors(this.schemeService.getDefaultScheme()).join(','));\n } else {\n this.writeValue($event);\n }\n }\n\n modifyColorScheme($event: string, index: number) {\n if (!this.inhibate) {\n const newScheme = [...this.schemeService.getSchemeColors(this.scheme$.getValue())];\n newScheme[index] = $event;\n this.writeValue(newScheme.join(','));\n }\n }\n\n addColorToScheme() {\n this.writeValue(\n [this.schemeService.getSchemeColors(this.scheme$.getValue()), this.schemeService.randomColor()].join(',')\n );\n }\n\n removeColorFromScheme(index: number) {\n const newScheme = [...this.schemeService.getSchemeColors(this.scheme$.getValue())];\n newScheme.splice(index, 1);\n this.writeValue(newScheme.join(','));\n }\n}\n","<div class=\"m-color-scheme\">\n <label class=\"a-label\" for=\"scheme\">{{ '@pry.widget.colorScheme' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"scheme$ | async\"\n [items]=\"schemes$ | async\"\n id=\"scheme\"\n bindValue=\"id\"\n bindLabel=\"label\"\n ></pry-select>\n</div>\n\n<div class=\"m-color-scheme__display\">\n @for (colorScheme of schemeColors$ | async; track colorScheme; let i = $index) {\n <div class=\"m-color-scheme__display__item\">\n <pry-color-picker [ngModel]=\"colorScheme\" (ngModelChange)=\"modifyColorScheme($event, i)\"></pry-color-picker>\n <button\n (click)=\"removeColorFromScheme(i)\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.widget.removeColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.removeColor' | i18n }}</span>\n <pry-icon iconSvg=\"trash\"></pry-icon>\n </button>\n </div>\n }\n <button\n (click)=\"addColorToScheme()\"\n class=\"a-btn a-btn--primary a-btn--icon-only\"\n title=\"{{ '@pry.widget.addColor' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.widget.addColor' | i18n }}</span>\n <pry-icon iconSvg=\"add\"></pry-icon>\n </button>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { PrySchemePickerComponent } from './scheme-picker.component';\nimport { PryI18nModule, PryIconModule, PrySelectModule } from '@provoly/dashboard';\nimport { PryColorPickerModule } from '@provoly/dashboard/components/color-picker';\n\nconst PRY_SCHEMEPICKER_COMPONENTS = [PrySchemePickerComponent];\n\n@NgModule({\n imports: [CommonModule, FormsModule, PryI18nModule, PrySelectModule, PryColorPickerModule, PryIconModule],\n declarations: [...PRY_SCHEMEPICKER_COMPONENTS],\n exports: [...PRY_SCHEMEPICKER_COMPONENTS]\n})\nexport class PrySchemePickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.PrySchemeService"],"mappings":";;;;;;;;;;;;;MAMa,gBAAgB,CAAA;AAG3B,IAAA,WAAA,GAAA;AAFA,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,eAAe,CAAW,EAAE,CAAC,CAAC;AAG7C,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AACtG,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;KACpD;AAED,IAAA,eAAe,CAAC,MAAc,EAAA;QAC5B,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;SACtD;QACD,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;AAC7B,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,MAAM,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,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAPG,YAAA,EAAA,CAAA,wBAAwB,CAGjD,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,aAHrE,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAOhD,qBAAqB,EAAA,OAAA,EAAA,CAJtB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAI7F,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,CAAC;AACzG,oBAAA,YAAY,EAAE,CAAC,GAAG,2BAA2B,CAAC;AAC9C,oBAAA,OAAO,EAAE,CAAC,GAAG,2BAA2B,CAAC;AAC1C,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
3
|
import { Directive, Component, ContentChild, HostBinding, Input, EventEmitter, ViewContainerRef, ContentChildren, ViewChildren, Output, NgModule } from '@angular/core';
|
|
@@ -137,11 +136,11 @@ class PryStepperComponent {
|
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
138
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
140
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryStepperComponent, selector: "pry-stepper", inputs: { isConsultMode: "isConsultMode" }, outputs: { lastStepCompleted: "lastStepCompleted", activeIndexChange: "activeIndexChange" }, queries: [{ propertyName: "steps", predicate: PryStepComponent }], viewQueries: [{ propertyName: "stepViewRef", predicate: ["vc"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"o-pry-stepper\">\n <div class=\"o-pry-stepper__header\">\n @for (step of steps; track step; let i = $index) {\n <div\n class=\"m-stepper-item-wrapper\"\n [class.has-step-line]=\"i !== steps.length - 1\"\n >\n <div class=\"m-stepper-item\" (click)=\"goTo(i)\" [class.-pointer]=\"step.status !== 'pending'\">\n <div\n class=\"m-stepper-item__count\"\n [class.-complete]=\"step.status === 'completed'\"\n [class.-active]=\"step.status === 'in progress'\"\n >\n <span>{{ i + 1 }}</span>\n </div>\n <ng-container #vc>{{ step.title }}</ng-container>\n </div>\n @if (i !== steps.length - 1) {\n <div class=\"m-stepper-line\">\n <div\n class=\"m-stepper-line__percent\"\n [class.-complete]=\"step.status === 'completed' && i < activeIndex\"\n [class.-active]=\"step.status === 'in progress'\"\n ></div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"o-pry-stepper__content\">\n <ng-content select=\"pry-step\"></ng-content>\n </div>\n</div>\n" }); }
|
|
141
140
|
}
|
|
142
141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryStepperComponent, decorators: [{
|
|
143
142
|
type: Component,
|
|
144
|
-
args: [{ selector: 'pry-stepper', template: "<div class=\"o-pry-stepper\">\n <div class=\"o-pry-stepper__header\">\n <div\n
|
|
143
|
+
args: [{ selector: 'pry-stepper', template: "<div class=\"o-pry-stepper\">\n <div class=\"o-pry-stepper__header\">\n @for (step of steps; track step; let i = $index) {\n <div\n class=\"m-stepper-item-wrapper\"\n [class.has-step-line]=\"i !== steps.length - 1\"\n >\n <div class=\"m-stepper-item\" (click)=\"goTo(i)\" [class.-pointer]=\"step.status !== 'pending'\">\n <div\n class=\"m-stepper-item__count\"\n [class.-complete]=\"step.status === 'completed'\"\n [class.-active]=\"step.status === 'in progress'\"\n >\n <span>{{ i + 1 }}</span>\n </div>\n <ng-container #vc>{{ step.title }}</ng-container>\n </div>\n @if (i !== steps.length - 1) {\n <div class=\"m-stepper-line\">\n <div\n class=\"m-stepper-line__percent\"\n [class.-complete]=\"step.status === 'completed' && i < activeIndex\"\n [class.-active]=\"step.status === 'in progress'\"\n ></div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"o-pry-stepper__content\">\n <ng-content select=\"pry-step\"></ng-content>\n </div>\n</div>\n" }]
|
|
145
144
|
}], propDecorators: { steps: [{
|
|
146
145
|
type: ContentChildren,
|
|
147
146
|
args: [PryStepComponent]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-components-stepper.mjs","sources":["../../../../projects/provoly/dashboard/components/stepper/step-title.directive.ts","../../../../projects/provoly/dashboard/components/stepper/step/step.component.ts","../../../../projects/provoly/dashboard/components/stepper/step/step.component.html","../../../../projects/provoly/dashboard/components/stepper/stepper.component.ts","../../../../projects/provoly/dashboard/components/stepper/stepper.component.html","../../../../projects/provoly/dashboard/components/stepper/stepper.module.ts","../../../../projects/provoly/dashboard/components/stepper/provoly-dashboard-components-stepper.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({ selector: '[stepTitle]' })\nexport class PryStepTitleDirective {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n","import { Component, ContentChild, HostBinding, Input, TemplateRef } from '@angular/core';\nimport { PryStepTitleDirective } from '../step-title.directive';\n\n@Component({\n selector: 'pry-step',\n templateUrl: './step.component.html'\n})\nexport class PryStepComponent {\n @ContentChild(PryStepTitleDirective) stepTitleElement: PryStepTitleDirective | undefined;\n\n @HostBinding('class.active-step')\n isActive = false;\n\n stepIndex: number = 1;\n status: string = '';\n title: string = '';\n\n @Input() setActiveState(step: this) {\n this.isActive = step === this;\n }\n\n getTitleTemplateRef(): TemplateRef<any> {\n // @ts-ignore\n return this.stepTitleElement ? this.stepTitleElement.templateRef : null;\n }\n\n hasTemplateRef(): boolean {\n return Boolean(this.stepTitleElement);\n }\n}\n","<ng-content></ng-content>\n","import {\n AfterContentInit,\n AfterViewInit,\n Component,\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n ViewChildren,\n ViewContainerRef\n} from '@angular/core';\nimport { PryStepComponent } from './step/step.component';\n\nexport enum Status {\n PENDING = 'pending',\n IN_PROGRESS = 'in progress',\n COMPLETED = 'completed'\n}\n\n@Component({\n selector: 'pry-stepper',\n templateUrl: './stepper.component.html'\n})\nexport class PryStepperComponent implements AfterContentInit, AfterViewInit {\n activeIndex: number = 0;\n // @ts-ignore\n @ContentChildren(PryStepComponent) public steps: QueryList<PryStepComponent>;\n // @ts-ignore\n @ViewChildren('vc', { read: ViewContainerRef }) stepViewRef: Array<ViewContainerRef>;\n @Input() isConsultMode: boolean = false;\n @Output() lastStepCompleted: EventEmitter<void> = new EventEmitter<void>();\n @Output() activeIndexChange: EventEmitter<number> = new EventEmitter<number>();\n\n get stepperSteps(): PryStepComponent[] {\n return this.steps.toArray();\n }\n\n ngAfterContentInit() {\n this.steps.forEach((step, index) => {\n step.stepIndex = index;\n if (this.isConsultMode) {\n step.status = index === this.activeIndex ? Status.IN_PROGRESS : Status.COMPLETED;\n } else {\n step.status = index === this.activeIndex ? Status.IN_PROGRESS : Status.PENDING;\n }\n if (index === this.activeIndex) {\n step.setActiveState(step);\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.stepViewRef.forEach((vcr, index) => {\n const step = this.steps.toArray()[index];\n if (step.hasTemplateRef()) {\n vcr.createEmbeddedView(step.getTitleTemplateRef());\n vcr.get(0)?.detectChanges();\n }\n });\n }\n\n updateActiveStep(index: number) {\n this.activeIndex = index;\n this.steps.forEach((step) => (step.isActive = false));\n this.stepperSteps[index].setActiveState(this.stepperSteps[index]);\n this.activeIndexChange.emit(index);\n }\n\n completeLastStep() {\n this.stepperSteps[this.activeIndex].status = Status.COMPLETED;\n this.lastStepCompleted.emit();\n }\n\n undoLastComplete() {\n this.stepperSteps[this.activeIndex].status = Status.IN_PROGRESS;\n }\n\n switchStatusNext(index: number): void {\n this.stepperSteps[this.activeIndex - 1].status = Status.COMPLETED;\n this.stepperSteps[index].status = Status.IN_PROGRESS;\n }\n\n switchStatusPrev(index: number) {\n this.stepperSteps[this.activeIndex + 1].status = Status.PENDING;\n this.stepperSteps[index].status = Status.IN_PROGRESS;\n }\n\n next() {\n if (this.activeIndex === this.steps.length - 1 && this.stepperSteps[this.activeIndex].status !== Status.COMPLETED) {\n this.completeLastStep();\n }\n\n if (this.activeIndex < this.steps.length - 1) {\n this.updateActiveStep(this.activeIndex + 1);\n this.switchStatusNext(this.activeIndex);\n }\n }\n\n prev() {\n if (this.activeIndex === this.steps.length - 1 && this.stepperSteps[this.activeIndex].status === Status.COMPLETED) {\n this.undoLastComplete();\n return;\n }\n if (this.activeIndex > 0) {\n this.updateActiveStep(this.activeIndex - 1);\n this.switchStatusPrev(this.activeIndex);\n }\n }\n\n goTo(index: number) {\n if (\n this.stepperSteps[index].status === Status.COMPLETED ||\n this.stepperSteps[index].status === Status.IN_PROGRESS\n ) {\n this.stepperSteps[this.activeIndex].status = Status.COMPLETED;\n this.updateActiveStep(index);\n this.updateActiveStep(this.activeIndex);\n this.stepperSteps[index].status = Status.IN_PROGRESS;\n }\n }\n}\n","<div class=\"o-pry-stepper\">\n <div class=\"o-pry-stepper__header\">\n <div\n class=\"m-stepper-item-wrapper\"\n [class.has-step-line]=\"i !== steps.length - 1\"\n *ngFor=\"let step of steps; index as i\"\n >\n <div class=\"m-stepper-item\" (click)=\"goTo(i)\" [class.-pointer]=\"step.status !== 'pending'\">\n <div\n class=\"m-stepper-item__count\"\n [class.-complete]=\"step.status === 'completed'\"\n [class.-active]=\"step.status === 'in progress'\"\n >\n <span>{{ i + 1 }}</span>\n </div>\n <ng-container #vc>{{ step.title }}</ng-container>\n </div>\n <div class=\"m-stepper-line\" *ngIf=\"i !== steps.length - 1\">\n <div\n class=\"m-stepper-line__percent\"\n [class.-complete]=\"step.status === 'completed' && i < activeIndex\"\n [class.-active]=\"step.status === 'in progress'\"\n ></div>\n </div>\n </div>\n </div>\n <div class=\"o-pry-stepper__content\">\n <ng-content select=\"pry-step\"></ng-content>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PryStepTitleDirective } from './step-title.directive';\nimport { PryStepComponent } from './step/step.component';\nimport { PryStepperComponent } from './stepper.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [PryStepperComponent, PryStepComponent, PryStepTitleDirective],\n exports: [PryStepperComponent, PryStepComponent, PryStepTitleDirective]\n})\nexport class PryStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAGa,qBAAqB,CAAA;AAChC,IAAA,WAAA,CAAmB,WAA6B,EAAA;QAA7B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAkB;KAAI;8GADzC,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAArB,qBAAqB,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,SAAS;mBAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;;;MCKzB,gBAAgB,CAAA;AAJ7B,IAAA,WAAA,GAAA;QAQE,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QAEjB,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;QACtB,IAAM,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A,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAJjB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIX,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC;AAC5E,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC;AACxE,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-components-stepper.mjs","sources":["../../../../projects/provoly/dashboard/components/stepper/step-title.directive.ts","../../../../projects/provoly/dashboard/components/stepper/step/step.component.ts","../../../../projects/provoly/dashboard/components/stepper/step/step.component.html","../../../../projects/provoly/dashboard/components/stepper/stepper.component.ts","../../../../projects/provoly/dashboard/components/stepper/stepper.component.html","../../../../projects/provoly/dashboard/components/stepper/stepper.module.ts","../../../../projects/provoly/dashboard/components/stepper/provoly-dashboard-components-stepper.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({ selector: '[stepTitle]' })\nexport class PryStepTitleDirective {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n","import { Component, ContentChild, HostBinding, Input, TemplateRef } from '@angular/core';\nimport { PryStepTitleDirective } from '../step-title.directive';\n\n@Component({\n selector: 'pry-step',\n templateUrl: './step.component.html'\n})\nexport class PryStepComponent {\n @ContentChild(PryStepTitleDirective) stepTitleElement: PryStepTitleDirective | undefined;\n\n @HostBinding('class.active-step')\n isActive = false;\n\n stepIndex: number = 1;\n status: string = '';\n title: string = '';\n\n @Input() setActiveState(step: this) {\n this.isActive = step === this;\n }\n\n getTitleTemplateRef(): TemplateRef<any> {\n // @ts-ignore\n return this.stepTitleElement ? this.stepTitleElement.templateRef : null;\n }\n\n hasTemplateRef(): boolean {\n return Boolean(this.stepTitleElement);\n }\n}\n","<ng-content></ng-content>\n","import {\n AfterContentInit,\n AfterViewInit,\n Component,\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n ViewChildren,\n ViewContainerRef\n} from '@angular/core';\nimport { PryStepComponent } from './step/step.component';\n\nexport enum Status {\n PENDING = 'pending',\n IN_PROGRESS = 'in progress',\n COMPLETED = 'completed'\n}\n\n@Component({\n selector: 'pry-stepper',\n templateUrl: './stepper.component.html'\n})\nexport class PryStepperComponent implements AfterContentInit, AfterViewInit {\n activeIndex: number = 0;\n // @ts-ignore\n @ContentChildren(PryStepComponent) public steps: QueryList<PryStepComponent>;\n // @ts-ignore\n @ViewChildren('vc', { read: ViewContainerRef }) stepViewRef: Array<ViewContainerRef>;\n @Input() isConsultMode: boolean = false;\n @Output() lastStepCompleted: EventEmitter<void> = new EventEmitter<void>();\n @Output() activeIndexChange: EventEmitter<number> = new EventEmitter<number>();\n\n get stepperSteps(): PryStepComponent[] {\n return this.steps.toArray();\n }\n\n ngAfterContentInit() {\n this.steps.forEach((step, index) => {\n step.stepIndex = index;\n if (this.isConsultMode) {\n step.status = index === this.activeIndex ? Status.IN_PROGRESS : Status.COMPLETED;\n } else {\n step.status = index === this.activeIndex ? Status.IN_PROGRESS : Status.PENDING;\n }\n if (index === this.activeIndex) {\n step.setActiveState(step);\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.stepViewRef.forEach((vcr, index) => {\n const step = this.steps.toArray()[index];\n if (step.hasTemplateRef()) {\n vcr.createEmbeddedView(step.getTitleTemplateRef());\n vcr.get(0)?.detectChanges();\n }\n });\n }\n\n updateActiveStep(index: number) {\n this.activeIndex = index;\n this.steps.forEach((step) => (step.isActive = false));\n this.stepperSteps[index].setActiveState(this.stepperSteps[index]);\n this.activeIndexChange.emit(index);\n }\n\n completeLastStep() {\n this.stepperSteps[this.activeIndex].status = Status.COMPLETED;\n this.lastStepCompleted.emit();\n }\n\n undoLastComplete() {\n this.stepperSteps[this.activeIndex].status = Status.IN_PROGRESS;\n }\n\n switchStatusNext(index: number): void {\n this.stepperSteps[this.activeIndex - 1].status = Status.COMPLETED;\n this.stepperSteps[index].status = Status.IN_PROGRESS;\n }\n\n switchStatusPrev(index: number) {\n this.stepperSteps[this.activeIndex + 1].status = Status.PENDING;\n this.stepperSteps[index].status = Status.IN_PROGRESS;\n }\n\n next() {\n if (this.activeIndex === this.steps.length - 1 && this.stepperSteps[this.activeIndex].status !== Status.COMPLETED) {\n this.completeLastStep();\n }\n\n if (this.activeIndex < this.steps.length - 1) {\n this.updateActiveStep(this.activeIndex + 1);\n this.switchStatusNext(this.activeIndex);\n }\n }\n\n prev() {\n if (this.activeIndex === this.steps.length - 1 && this.stepperSteps[this.activeIndex].status === Status.COMPLETED) {\n this.undoLastComplete();\n return;\n }\n if (this.activeIndex > 0) {\n this.updateActiveStep(this.activeIndex - 1);\n this.switchStatusPrev(this.activeIndex);\n }\n }\n\n goTo(index: number) {\n if (\n this.stepperSteps[index].status === Status.COMPLETED ||\n this.stepperSteps[index].status === Status.IN_PROGRESS\n ) {\n this.stepperSteps[this.activeIndex].status = Status.COMPLETED;\n this.updateActiveStep(index);\n this.updateActiveStep(this.activeIndex);\n this.stepperSteps[index].status = Status.IN_PROGRESS;\n }\n }\n}\n","<div class=\"o-pry-stepper\">\n <div class=\"o-pry-stepper__header\">\n @for (step of steps; track step; let i = $index) {\n <div\n class=\"m-stepper-item-wrapper\"\n [class.has-step-line]=\"i !== steps.length - 1\"\n >\n <div class=\"m-stepper-item\" (click)=\"goTo(i)\" [class.-pointer]=\"step.status !== 'pending'\">\n <div\n class=\"m-stepper-item__count\"\n [class.-complete]=\"step.status === 'completed'\"\n [class.-active]=\"step.status === 'in progress'\"\n >\n <span>{{ i + 1 }}</span>\n </div>\n <ng-container #vc>{{ step.title }}</ng-container>\n </div>\n @if (i !== steps.length - 1) {\n <div class=\"m-stepper-line\">\n <div\n class=\"m-stepper-line__percent\"\n [class.-complete]=\"step.status === 'completed' && i < activeIndex\"\n [class.-active]=\"step.status === 'in progress'\"\n ></div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"o-pry-stepper__content\">\n <ng-content select=\"pry-step\"></ng-content>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PryStepTitleDirective } from './step-title.directive';\nimport { PryStepComponent } from './step/step.component';\nimport { PryStepperComponent } from './stepper.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [PryStepperComponent, PryStepComponent, PryStepTitleDirective],\n exports: [PryStepperComponent, PryStepComponent, PryStepTitleDirective]\n})\nexport class PryStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAGa,qBAAqB,CAAA;AAChC,IAAA,WAAA,CAAmB,WAA6B,EAAA;QAA7B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAkB;KAAI;8GADzC,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAArB,qBAAqB,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,SAAS;mBAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;;;MCKzB,gBAAgB,CAAA;AAJ7B,IAAA,WAAA,GAAA;QAQE,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QAEjB,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;QACtB,IAAM,CAAA,MAAA,GAAW,EAAE,CAAC;QACpB,IAAK,CAAA,KAAA,GAAW,EAA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AAmB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC;AACxE,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i4 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { EventEmitter, Component, Input, Output, Optional, Inject, ViewEncapsulation, NgModule } from '@angular/core';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
6
|
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as i2 from '@provoly/dashboard';
|
|
7
|
+
import * as i2$1 from '@provoly/dashboard';
|
|
8
8
|
import { DateUtils, DataSourceActions, SubscriptionnerDirective, ViewMode, DashboardSelectors, DashboardActions, DataSourceSelectors, SearchActions, PryStatusModalComponent, PRY_ACCESS_TOKEN, ClassActions, FieldActions, ConfigActions, PryIconModule, PryCoreModule, PryOverlayModule, PryI18nModule, PryDashboardModule, PrySelectModule, PrySinceDateModule } from '@provoly/dashboard';
|
|
9
9
|
import { of, map } from 'rxjs';
|
|
10
10
|
import { tap } from 'rxjs/operators';
|
|
11
11
|
import * as i1 from '@ngrx/store';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i3 from '@provoly/dashboard/components/text-editor';
|
|
13
13
|
import { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';
|
|
14
14
|
|
|
15
15
|
class PryDatasetVersionFormComponent {
|
|
@@ -61,11 +61,11 @@ class PryDatasetVersionFormComponent {
|
|
|
61
61
|
this.formValidated.emit();
|
|
62
62
|
}
|
|
63
63
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetVersionFormComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: { version: "version" }, outputs: { formValidated: "formValidated" }, ngImport: i0, template: "<form class=\"o-dataset-version-form u-display-flex -column\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"productionDate\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n formControlName=\"productionDate\"\n id=\"productionDate\"\n [attr.aria-invalid]=\"productionDate?.invalid\"\n
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: { version: "version" }, outputs: { formValidated: "formValidated" }, ngImport: i0, template: "<form class=\"o-dataset-version-form u-display-flex -column\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"productionDate\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n formControlName=\"productionDate\"\n id=\"productionDate\"\n [attr.aria-invalid]=\"productionDate?.invalid\"\n />\n @if (productionDate?.invalid) {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n @if (productionDate?.errors?.['required']) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n } @else if (productionDate?.errors?.['dateValidator']) {\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"text\"\n formControlName=\"producer\"\n id=\"producer\"\n [attr.aria-invalid]=\"producer?.invalid\"\n />\n @if (producer?.invalid) {\n <label id=\"producer-error\" for=\"producer\" class=\"a-label a-label--help -error\">\n @if (producer?.errors?.['required'] ?? false) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor formControlName=\"additionalInformation\"></pry-text-editor>\n </div>\n <button class=\"a-btn a-btn--primary u-self-end\" type=\"submit\" [disabled]=\"form.invalid\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n</form>\n", dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.PryTextEditorComponent, selector: "pry-text-editor", inputs: ["tabView"] }, { kind: "pipe", type: i2$1.I18nPipe, name: "i18n" }] }); }
|
|
65
65
|
}
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetVersionFormComponent, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
|
-
args: [{ selector: 'pry-dataset-version-form', template: "<form class=\"o-dataset-version-form u-display-flex -column\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"productionDate\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n formControlName=\"productionDate\"\n id=\"productionDate\"\n [attr.aria-invalid]=\"productionDate?.invalid\"\n
|
|
68
|
+
args: [{ selector: 'pry-dataset-version-form', template: "<form class=\"o-dataset-version-form u-display-flex -column\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"productionDate\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n formControlName=\"productionDate\"\n id=\"productionDate\"\n [attr.aria-invalid]=\"productionDate?.invalid\"\n />\n @if (productionDate?.invalid) {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n @if (productionDate?.errors?.['required']) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n } @else if (productionDate?.errors?.['dateValidator']) {\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"text\"\n formControlName=\"producer\"\n id=\"producer\"\n [attr.aria-invalid]=\"producer?.invalid\"\n />\n @if (producer?.invalid) {\n <label id=\"producer-error\" for=\"producer\" class=\"a-label a-label--help -error\">\n @if (producer?.errors?.['required'] ?? false) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor formControlName=\"additionalInformation\"></pry-text-editor>\n </div>\n <button class=\"a-btn a-btn--primary u-self-end\" type=\"submit\" [disabled]=\"form.invalid\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n</form>\n" }]
|
|
69
69
|
}], ctorParameters: () => [{ type: i1.Store }], propDecorators: { version: [{
|
|
70
70
|
type: Input
|
|
71
71
|
}], formValidated: [{
|
|
@@ -229,18 +229,18 @@ class PryDatasetDetailComponent extends SubscriptionnerDirective {
|
|
|
229
229
|
this.store.dispatch(DataSourceActions.dataset.confirmDeleteVersion({ version }));
|
|
230
230
|
$event?.stopPropagation();
|
|
231
231
|
}
|
|
232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetDetailComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }, { token: i2.PryDialogService }, { token: i2.PryTitleService }, { token: i2.PryI18nService }, { token: i2.WidgetFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: { dataset: "dataset" }, outputs: { goToCatalog: "goToCatalog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h1 class=\"a-h1\">{{ (currentDataset$ | async)?.name }}</h1>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (dataset.activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (dataset.activeVersion.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ dataset.activeVersion.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n dataset.activeVersion.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.tags' | i18n }}</span>\n <div class=\"u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\"> {{ category.name }}</span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon\n *ngIf=\"(currentDataset$ | async)?.activeVersion?.id === version.id\"\n iconSvg=\"check\"\n class=\"check\"\n ></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (version.id === (currentDataset$ | async)?.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : '@pry.dataset.version.state.' + version.state\n ) | i18n\n }}\n <div\n *ngIf=\"version.state !== 'DELETING'\"\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"\n '@pry.dataset.tooltip.' +\n getVersionTooltipContent(version, (currentDataset$ | async)?.activeVersion?.id) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n \"\n >\n <ng-container\n *ngIf=\"(canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\"\n >\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n \"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i2.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i2.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"], outputs: ["clickedTabIdx"] }, { kind: "component", type: i2.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i2.DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: ["version"], outputs: ["formValidated"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: i4.MdToHtmlPipe, name: "mdToHtml" }, { kind: "pipe", type: i2.SinceDatePipe, name: "sinceDate" }] }); }
|
|
232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetDetailComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }, { token: i2$1.PryDialogService }, { token: i2$1.PryTitleService }, { token: i2$1.PryI18nService }, { token: i2$1.WidgetFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
233
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: { dataset: "dataset" }, outputs: { goToCatalog: "goToCatalog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h1 class=\"a-h1\">{{ (currentDataset$ | async)?.name }}</h1>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (dataset.activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (dataset.activeVersion.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ dataset.activeVersion.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n dataset.activeVersion.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.tags' | i18n }}</span>\n <div class=\"u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\"> {{ category.name }}</span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (version of datasetVersions$ | async; track version) {\n <tr\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n @if ((currentDataset$ | async)?.activeVersion?.id === version.id) {\n <pry-icon\n iconSvg=\"check\"\n class=\"check\"\n ></pry-icon>\n }\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (version.id === (currentDataset$ | async)?.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : '@pry.dataset.version.state.' + version.state\n ) | i18n\n }}\n @if (version.state !== 'DELETING') {\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"\n '@pry.dataset.tooltip.' +\n getVersionTooltipContent(version, (currentDataset$ | async)?.activeVersion?.id) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n }\n </td>\n <td>\n @if (\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n ) {\n @if ((canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')) {\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n @if (version.state === 'ACTIVE' || version.state === 'INACTIVE') {\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n }\n </ng-container>\n }\n }\n </td>\n <td>\n @if (version.hasWarnings || version.state === 'ERROR') {\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n }\n </td>\n <td>\n @if (\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n ) {\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i2$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i2$1.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i2$1.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"], outputs: ["clickedTabIdx"] }, { kind: "component", type: i2$1.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i2$1.DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: ["version"], outputs: ["formValidated"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DatePipe, name: "date" }, { kind: "pipe", type: i2$1.I18nPipe, name: "i18n" }, { kind: "pipe", type: i3.MdToHtmlPipe, name: "mdToHtml" }, { kind: "pipe", type: i2$1.SinceDatePipe, name: "sinceDate" }] }); }
|
|
234
234
|
}
|
|
235
235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetDetailComponent, decorators: [{
|
|
236
236
|
type: Component,
|
|
237
|
-
args: [{ selector: 'pry-dataset-detail', template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h1 class=\"a-h1\">{{ (currentDataset$ | async)?.name }}</h1>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (dataset.activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (dataset.activeVersion.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ dataset.activeVersion.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n dataset.activeVersion.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.tags' | i18n }}</span>\n <div class=\"u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\"> {{ category.name }}</span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon\n *ngIf=\"(currentDataset$ | async)?.activeVersion?.id === version.id\"\n iconSvg=\"check\"\n class=\"check\"\n ></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (version.id === (currentDataset$ | async)?.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : '@pry.dataset.version.state.' + version.state\n ) | i18n\n }}\n <div\n *ngIf=\"version.state !== 'DELETING'\"\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"\n '@pry.dataset.tooltip.' +\n getVersionTooltipContent(version, (currentDataset$ | async)?.activeVersion?.id) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n \"\n >\n <ng-container\n *ngIf=\"(canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\"\n >\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n \"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n" }]
|
|
238
|
-
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.PryBaseAccess, decorators: [{
|
|
237
|
+
args: [{ selector: 'pry-dataset-detail', template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h1 class=\"a-h1\">{{ (currentDataset$ | async)?.name }}</h1>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (dataset.activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (dataset.activeVersion.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ dataset.activeVersion.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n dataset.activeVersion.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.tags' | i18n }}</span>\n <div class=\"u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\"> {{ category.name }}</span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (version of datasetVersions$ | async; track version) {\n <tr\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n @if ((currentDataset$ | async)?.activeVersion?.id === version.id) {\n <pry-icon\n iconSvg=\"check\"\n class=\"check\"\n ></pry-icon>\n }\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (version.id === (currentDataset$ | async)?.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : '@pry.dataset.version.state.' + version.state\n ) | i18n\n }}\n @if (version.state !== 'DELETING') {\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"\n '@pry.dataset.tooltip.' +\n getVersionTooltipContent(version, (currentDataset$ | async)?.activeVersion?.id) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n }\n </td>\n <td>\n @if (\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n ) {\n @if ((canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')) {\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n @if (version.state === 'ACTIVE' || version.state === 'INACTIVE') {\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n }\n </ng-container>\n }\n }\n </td>\n <td>\n @if (version.hasWarnings || version.state === 'ERROR') {\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n }\n </td>\n <td>\n @if (\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n ) {\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n</ng-template>\n" }]
|
|
238
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2$1.PryBaseAccess, decorators: [{
|
|
239
239
|
type: Optional
|
|
240
240
|
}, {
|
|
241
241
|
type: Inject,
|
|
242
242
|
args: [PRY_ACCESS_TOKEN]
|
|
243
|
-
}] }, { type: i2.PryDialogService }, { type: i2.PryTitleService }, { type: i2.PryI18nService }, { type: i2.WidgetFactoryService }], propDecorators: { dataset: [{
|
|
243
|
+
}] }, { type: i2$1.PryDialogService }, { type: i2$1.PryTitleService }, { type: i2$1.PryI18nService }, { type: i2$1.WidgetFactoryService }], propDecorators: { dataset: [{
|
|
244
244
|
type: Input
|
|
245
245
|
}], goToCatalog: [{
|
|
246
246
|
type: Output
|
|
@@ -269,7 +269,7 @@ class PryDatasetComponent {
|
|
|
269
269
|
this.selectedMode = ViewMode.CONSULT;
|
|
270
270
|
}
|
|
271
271
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
272
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryDatasetComponent, selector: "pry-dataset", ngImport: i0, template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-dataset-layout u-display-flex -column\">\n @switch (selectedMode) {\n @case (ViewMode.CATALOG) {\n <h1 class=\"a-h1 u-self-start\">{{ '@pry.dataset.title' | i18n }}</h1>\n <pry-datasource-list (consultedDataset)=\"consult($event)\"></pry-datasource-list>\n }\n @case (ViewMode.CONSULT) {\n @if (selectedDataset) {\n <pry-dataset-detail\n [dataset]=\"selectedDataset\"\n (goToCatalog)=\"selectedMode = ViewMode.CATALOG\"\n ></pry-dataset-detail>\n }\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: i2.PryDatasourceListComponent, selector: "pry-datasource-list", inputs: ["mode", "selectedDatasources"], outputs: ["consultedDataset", "datasourceSelected", "searchOrCategoryChanged"] }, { kind: "component", type: PryDatasetCssComponent, selector: "pry-dataset-css" }, { kind: "component", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: ["dataset"], outputs: ["goToCatalog"] }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }] }); }
|
|
272
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryDatasetComponent, selector: "pry-dataset", ngImport: i0, template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-dataset-layout u-display-flex -column\">\n @switch (selectedMode) {\n @case (ViewMode.CATALOG) {\n <h1 class=\"a-h1 u-self-start\">{{ '@pry.dataset.title' | i18n }}</h1>\n <pry-datasource-list (consultedDataset)=\"consult($event)\"></pry-datasource-list>\n }\n @case (ViewMode.CONSULT) {\n @if (selectedDataset) {\n <pry-dataset-detail\n [dataset]=\"selectedDataset\"\n (goToCatalog)=\"selectedMode = ViewMode.CATALOG\"\n ></pry-dataset-detail>\n }\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: i2$1.PryDatasourceListComponent, selector: "pry-datasource-list", inputs: ["mode", "selectedDatasources"], outputs: ["consultedDataset", "datasourceSelected", "searchOrCategoryChanged"] }, { kind: "component", type: PryDatasetCssComponent, selector: "pry-dataset-css" }, { kind: "component", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: ["dataset"], outputs: ["goToCatalog"] }, { kind: "pipe", type: i2$1.I18nPipe, name: "i18n" }] }); }
|
|
273
273
|
}
|
|
274
274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetComponent, decorators: [{
|
|
275
275
|
type: Component,
|
|
@@ -452,7 +452,7 @@ class PryDatasetModule {
|
|
|
452
452
|
this.pryTranslateService.addLangObject('fr', 'dataset', frTranslations);
|
|
453
453
|
this.pryTranslateService.addLangObject('en', 'dataset', enTranslations);
|
|
454
454
|
}
|
|
455
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetModule, deps: [{ token: i2.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetModule, deps: [{ token: i2$1.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
456
456
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: PryDatasetModule, declarations: [PryDatasetComponent,
|
|
457
457
|
PryDatasetCssComponent,
|
|
458
458
|
PryDatasetDetailComponent,
|
|
@@ -503,7 +503,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
503
503
|
],
|
|
504
504
|
exports: [PryDatasetComponent, PryDatasetCssComponent, PryDatasetDetailComponent]
|
|
505
505
|
}]
|
|
506
|
-
}], ctorParameters: () => [{ type: i2.PryI18nService }] });
|
|
506
|
+
}], ctorParameters: () => [{ type: i2$1.PryI18nService }] });
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
509
|
* Generated bundle index. Do not edit.
|