@gravitee/ui-components 3.25.3-typescript-8a53edf → 3.25.3-typescript-e7256ca
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/package.json +3 -4
- package/src/atoms/gv-autocomplete.d.ts +104 -0
- package/src/atoms/gv-autocomplete.js +1 -461
- package/src/atoms/gv-button.d.ts +109 -0
- package/src/atoms/gv-button.js +1 -410
- package/src/atoms/gv-checkbox.d.ts +114 -0
- package/src/atoms/gv-checkbox.js +1 -187
- package/src/atoms/gv-date-picker-calendar.d.ts +190 -0
- package/src/atoms/gv-date-picker-calendar.js +1 -894
- package/src/atoms/gv-date-picker-cell.d.ts +80 -0
- package/src/atoms/gv-date-picker-cell.js +1 -190
- package/src/atoms/gv-date-picker.d.ts +194 -0
- package/src/atoms/gv-date-picker.js +1 -671
- package/src/atoms/gv-file-upload.d.ts +64 -0
- package/src/atoms/gv-file-upload.js +1 -367
- package/src/atoms/gv-icon.d.ts +26 -0
- package/src/atoms/gv-icon.js +1 -103
- package/src/atoms/gv-image.d.ts +45 -0
- package/src/atoms/gv-image.js +1 -144
- package/src/atoms/gv-input-message.d.ts +20 -0
- package/src/atoms/gv-input-message.js +1 -84
- package/src/atoms/gv-input.d.ts +246 -0
- package/src/atoms/gv-input.js +1 -561
- package/src/atoms/gv-link.d.ts +67 -0
- package/src/atoms/gv-link.js +1 -210
- package/src/atoms/gv-message.d.ts +23 -0
- package/src/atoms/gv-message.js +1 -128
- package/src/atoms/gv-metric.d.ts +32 -0
- package/src/atoms/gv-metric.js +1 -117
- package/src/atoms/gv-relative-time.d.ts +45 -0
- package/src/atoms/gv-relative-time.js +1 -156
- package/src/atoms/gv-select-native.d.ts +174 -0
- package/src/atoms/gv-select-native.js +1 -388
- package/src/atoms/gv-select.d.ts +71 -0
- package/src/atoms/gv-select.js +1 -437
- package/src/atoms/gv-spinner.d.ts +10 -0
- package/src/atoms/gv-spinner.js +1 -57
- package/src/atoms/gv-state.d.ts +50 -0
- package/src/atoms/gv-state.js +1 -130
- package/src/atoms/gv-switch.d.ts +60 -0
- package/src/atoms/gv-switch.js +1 -243
- package/src/atoms/gv-tag.d.ts +69 -0
- package/src/atoms/gv-tag.js +1 -168
- package/src/atoms/gv-text.d.ts +110 -0
- package/src/atoms/gv-text.js +1 -168
- package/src/charts/gv-chart-bar.d.ts +50 -0
- package/src/charts/gv-chart-bar.js +1 -103
- package/src/charts/gv-chart-gauge.d.ts +58 -0
- package/src/charts/gv-chart-gauge.js +1 -100
- package/src/charts/gv-chart-histogram.d.ts +48 -0
- package/src/charts/gv-chart-histogram.js +1 -83
- package/src/charts/gv-chart-line.d.ts +52 -0
- package/src/charts/gv-chart-line.js +1 -224
- package/src/charts/gv-chart-map.d.ts +50 -0
- package/src/charts/gv-chart-map.js +1 -112
- package/src/charts/gv-chart-pie.d.ts +50 -0
- package/src/charts/gv-chart-pie.js +1 -91
- package/src/index.d.ts +77 -0
- package/src/index.js +1 -77
- package/src/lib/cron-expression.d.ts +1 -0
- package/src/lib/cron-expression.js +1 -205
- package/src/lib/date.d.ts +1 -0
- package/src/lib/date.js +1 -44
- package/src/lib/events.d.ts +1 -0
- package/src/lib/events.js +1 -26
- package/src/lib/http-client-schema-form.d.ts +68 -0
- package/src/lib/http-client-schema-form.js +1 -67
- package/src/lib/http.d.ts +222 -0
- package/src/lib/http.js +1 -237
- package/src/lib/i18n.d.ts +30 -0
- package/src/lib/i18n.js +1 -103
- package/src/lib/item.d.ts +12 -0
- package/src/lib/item.js +1 -118
- package/src/lib/properties.d.ts +42 -0
- package/src/lib/properties.js +1 -189
- package/src/lib/schema-form.d.ts +5 -0
- package/src/lib/schema-form.js +1 -44
- package/src/lib/studio.d.ts +2 -0
- package/src/lib/studio.js +1 -141
- package/src/lib/style.d.ts +6 -0
- package/src/lib/style.js +1 -41
- package/src/lib/text-format.d.ts +6 -0
- package/src/lib/text-format.js +1 -69
- package/src/lib/theme.d.ts +4 -0
- package/src/lib/theme.js +1 -63
- package/src/lib/utils.d.ts +9 -0
- package/src/lib/utils.js +1 -111
- package/src/mixins/chart-element.d.ts +39 -0
- package/src/mixins/chart-element.js +1 -165
- package/src/mixins/input-element.d.ts +64 -0
- package/src/mixins/input-element.js +1 -144
- package/src/mixins/item-resource.d.ts +56 -0
- package/src/mixins/item-resource.js +1 -120
- package/src/mixins/keyboard-element.d.ts +25 -0
- package/src/mixins/keyboard-element.js +1 -69
- package/src/mixins/update-after-browser.d.ts +11 -0
- package/src/mixins/update-after-browser.js +1 -30
- package/src/mixins/with-resize-observer.d.ts +12 -0
- package/src/mixins/with-resize-observer.js +1 -68
- package/src/mixins/with-skeleton-attribute.d.ts +35 -0
- package/src/mixins/with-skeleton-attribute.js +1 -112
- package/src/molecules/gv-card-full.d.ts +78 -0
- package/src/molecules/gv-card-full.js +1 -218
- package/src/molecules/gv-card-list.d.ts +33 -0
- package/src/molecules/gv-card-list.js +1 -113
- package/src/molecules/gv-card.d.ts +65 -0
- package/src/molecules/gv-card.js +1 -133
- package/src/molecules/gv-category-list.d.ts +17 -0
- package/src/molecules/gv-category-list.js +1 -60
- package/src/molecules/gv-category.d.ts +64 -0
- package/src/molecules/gv-category.js +1 -170
- package/src/molecules/gv-code.d.ts +192 -0
- package/src/molecules/gv-code.js +1 -359
- package/src/molecules/gv-confirm.d.ts +60 -0
- package/src/molecules/gv-confirm.js +1 -188
- package/src/molecules/gv-cron-editor.d.ts +115 -0
- package/src/molecules/gv-cron-editor.js +1 -710
- package/src/molecules/gv-dropdown-menu.d.ts +28 -0
- package/src/molecules/gv-dropdown-menu.js +1 -116
- package/src/molecules/gv-expandable.d.ts +37 -0
- package/src/molecules/gv-expandable.js +1 -122
- package/src/molecules/gv-expression-language.d.ts +150 -0
- package/src/molecules/gv-expression-language.js +1 -270
- package/src/molecules/gv-identity-picture.d.ts +44 -0
- package/src/molecules/gv-identity-picture.js +1 -148
- package/src/molecules/gv-list.d.ts +123 -0
- package/src/molecules/gv-list.js +1 -227
- package/src/molecules/gv-metrics.d.ts +65 -0
- package/src/molecules/gv-metrics.js +1 -162
- package/src/molecules/gv-modal.d.ts +64 -0
- package/src/molecules/gv-modal.js +1 -213
- package/src/molecules/gv-nav.d.ts +41 -0
- package/src/molecules/gv-nav.js +1 -196
- package/src/molecules/gv-option.d.ts +65 -0
- package/src/molecules/gv-option.js +1 -242
- package/src/molecules/gv-plans.d.ts +73 -0
- package/src/molecules/gv-plans.js +1 -429
- package/src/molecules/gv-popover.d.ts +91 -0
- package/src/molecules/gv-popover.js +1 -351
- package/src/molecules/gv-promote.d.ts +108 -0
- package/src/molecules/gv-promote.js +1 -209
- package/src/molecules/gv-rating-list.d.ts +77 -0
- package/src/molecules/gv-rating-list.js +1 -365
- package/src/molecules/gv-rating.d.ts +55 -0
- package/src/molecules/gv-rating.js +1 -253
- package/src/molecules/gv-row-expandable.d.ts +8 -0
- package/src/molecules/gv-row-expandable.js +1 -45
- package/src/molecules/gv-row.d.ts +37 -0
- package/src/molecules/gv-row.js +1 -210
- package/src/molecules/gv-stats.d.ts +53 -0
- package/src/molecules/gv-stats.js +1 -121
- package/src/molecules/gv-stepper.d.ts +46 -0
- package/src/molecules/gv-stepper.js +1 -288
- package/src/molecules/gv-table.d.ts +159 -0
- package/src/molecules/gv-table.js +1 -685
- package/src/molecules/gv-tree.d.ts +44 -0
- package/src/molecules/gv-tree.js +1 -250
- package/src/organisms/gv-documentation.d.ts +52 -0
- package/src/organisms/gv-documentation.js +1 -215
- package/src/organisms/gv-header.d.ts +60 -0
- package/src/organisms/gv-header.js +1 -288
- package/src/organisms/gv-http-client.d.ts +57 -0
- package/src/organisms/gv-http-client.js +1 -275
- package/src/organisms/gv-menu.d.ts +74 -0
- package/src/organisms/gv-menu.js +1 -263
- package/src/organisms/gv-newsletter-subscription.d.ts +82 -0
- package/src/organisms/gv-newsletter-subscription.js +1 -271
- package/src/organisms/gv-pagination.d.ts +63 -0
- package/src/organisms/gv-pagination.js +1 -198
- package/src/organisms/gv-properties.d.ts +229 -0
- package/src/organisms/gv-properties.js +1 -920
- package/src/organisms/gv-resizable-views.d.ts +33 -0
- package/src/organisms/gv-resizable-views.js +1 -396
- package/src/organisms/gv-resources.d.ts +125 -0
- package/src/organisms/gv-resources.js +1 -535
- package/src/organisms/gv-schema-form-array.d.ts +55 -0
- package/src/organisms/gv-schema-form-array.js +1 -250
- package/src/organisms/gv-schema-form-control-object.d.ts +64 -0
- package/src/organisms/gv-schema-form-control-object.js +1 -154
- package/src/organisms/gv-schema-form-control.d.ts +90 -0
- package/src/organisms/gv-schema-form-control.js +1 -443
- package/src/organisms/gv-schema-form.d.ts +156 -0
- package/src/organisms/gv-schema-form.js +1 -751
- package/src/organisms/gv-tabs.d.ts +56 -0
- package/src/organisms/gv-tabs.js +1 -210
- package/src/organisms/gv-user-menu.d.ts +56 -0
- package/src/organisms/gv-user-menu.js +1 -314
- package/src/organisms/gv-vertical-menu.d.ts +28 -0
- package/src/organisms/gv-vertical-menu.js +1 -123
- package/src/policy-studio/gv-flow-step.d.ts +142 -0
- package/src/policy-studio/gv-flow-step.js +1 -464
- package/src/policy-studio/gv-flow.d.ts +89 -0
- package/src/policy-studio/gv-flow.js +1 -621
- package/src/policy-studio/gv-policy-studio-menu.d.ts +94 -0
- package/src/policy-studio/gv-policy-studio-menu.js +1 -750
- package/src/policy-studio/gv-policy-studio.d.ts +464 -0
- package/src/policy-studio/gv-policy-studio.js +1 -1842
- package/src/styles/empty.d.ts +1 -0
- package/src/styles/empty.js +1 -36
- package/src/styles/input.d.ts +1 -0
- package/src/styles/input.js +1 -263
- package/src/styles/link.d.ts +1 -0
- package/src/styles/link.js +1 -32
- package/src/styles/shapes.d.ts +2 -0
- package/src/styles/shapes.js +1 -17
- package/src/styles/skeleton.d.ts +1 -0
- package/src/styles/skeleton.js +1 -53
- package/src/styles/zoom.d.ts +1 -0
- package/src/styles/zoom.js +1 -40
- package/src/theme/gv-theme.d.ts +81 -0
- package/src/theme/gv-theme.js +1 -203
- package/wc/gv-autocomplete.d.ts +1 -0
- package/wc/gv-autocomplete.js +1 -1
- package/wc/gv-button.d.ts +1 -0
- package/wc/gv-button.js +1 -1
- package/wc/gv-card-full.d.ts +1 -0
- package/wc/gv-card-full.js +1 -1
- package/wc/gv-card-list.d.ts +1 -0
- package/wc/gv-card-list.js +1 -1
- package/wc/gv-card.d.ts +1 -0
- package/wc/gv-card.js +1 -1
- package/wc/gv-category-list.d.ts +1 -0
- package/wc/gv-category-list.js +1 -1
- package/wc/gv-category.d.ts +1 -0
- package/wc/gv-category.js +1 -1
- package/wc/gv-chart-bar.d.ts +1 -0
- package/wc/gv-chart-bar.js +1 -1
- package/wc/gv-chart-gauge.d.ts +1 -0
- package/wc/gv-chart-gauge.js +1 -1
- package/wc/gv-chart-histogram.d.ts +1 -0
- package/wc/gv-chart-histogram.js +1 -1
- package/wc/gv-chart-line.d.ts +1 -0
- package/wc/gv-chart-line.js +1 -1
- package/wc/gv-chart-map.d.ts +1 -0
- package/wc/gv-chart-map.js +1 -1
- package/wc/gv-chart-pie.d.ts +1 -0
- package/wc/gv-chart-pie.js +1 -1
- package/wc/gv-checkbox.d.ts +1 -0
- package/wc/gv-checkbox.js +1 -1
- package/wc/gv-code.d.ts +1 -0
- package/wc/gv-code.js +1 -1
- package/wc/gv-confirm.d.ts +1 -0
- package/wc/gv-confirm.js +1 -1
- package/wc/gv-cron-editor.d.ts +1 -0
- package/wc/gv-cron-editor.js +1 -1
- package/wc/gv-date-picker-calendar.d.ts +1 -0
- package/wc/gv-date-picker-calendar.js +1 -1
- package/wc/gv-date-picker-cell.d.ts +1 -0
- package/wc/gv-date-picker-cell.js +1 -1
- package/wc/gv-date-picker.d.ts +1 -0
- package/wc/gv-date-picker.js +1 -1
- package/wc/gv-documentation.d.ts +1 -0
- package/wc/gv-documentation.js +1 -1
- package/wc/gv-dropdown-menu.d.ts +1 -0
- package/wc/gv-dropdown-menu.js +1 -1
- package/wc/gv-expandable.d.ts +1 -0
- package/wc/gv-expandable.js +1 -1
- package/wc/gv-expression-language.d.ts +1 -0
- package/wc/gv-expression-language.js +1 -1
- package/wc/gv-file-upload.d.ts +1 -0
- package/wc/gv-file-upload.js +1 -1
- package/wc/gv-flow-step.d.ts +1 -0
- package/wc/gv-flow-step.js +1 -1
- package/wc/gv-flow.d.ts +1 -0
- package/wc/gv-flow.js +1 -1
- package/wc/gv-header.d.ts +1 -0
- package/wc/gv-header.js +1 -1
- package/wc/gv-http-client.d.ts +1 -0
- package/wc/gv-http-client.js +1 -1
- package/wc/gv-icon.d.ts +1 -0
- package/wc/gv-icon.js +1 -1
- package/wc/gv-identity-picture.d.ts +1 -0
- package/wc/gv-identity-picture.js +1 -1
- package/wc/gv-image.d.ts +1 -0
- package/wc/gv-image.js +1 -1
- package/wc/gv-input-message.d.ts +1 -0
- package/wc/gv-input-message.js +1 -1
- package/wc/gv-input.d.ts +1 -0
- package/wc/gv-input.js +1 -1
- package/wc/gv-link.d.ts +1 -0
- package/wc/gv-link.js +1 -1
- package/wc/gv-list.d.ts +1 -0
- package/wc/gv-list.js +1 -1
- package/wc/gv-menu.d.ts +1 -0
- package/wc/gv-menu.js +1 -1
- package/wc/gv-message.d.ts +1 -0
- package/wc/gv-message.js +1 -1
- package/wc/gv-metric.d.ts +1 -0
- package/wc/gv-metric.js +1 -1
- package/wc/gv-metrics.d.ts +1 -0
- package/wc/gv-metrics.js +1 -1
- package/wc/gv-modal.d.ts +1 -0
- package/wc/gv-modal.js +1 -1
- package/wc/gv-nav.d.ts +1 -0
- package/wc/gv-nav.js +1 -1
- package/wc/gv-newsletter-subscription.d.ts +1 -0
- package/wc/gv-newsletter-subscription.js +1 -1
- package/wc/gv-option.d.ts +1 -0
- package/wc/gv-option.js +1 -1
- package/wc/gv-pagination.d.ts +1 -0
- package/wc/gv-pagination.js +1 -1
- package/wc/gv-plans.d.ts +1 -0
- package/wc/gv-plans.js +1 -1
- package/wc/gv-policy-studio-menu.d.ts +1 -0
- package/wc/gv-policy-studio-menu.js +1 -1
- package/wc/gv-policy-studio.d.ts +1 -0
- package/wc/gv-policy-studio.js +1 -1
- package/wc/gv-popover.d.ts +1 -0
- package/wc/gv-popover.js +1 -1
- package/wc/gv-promote.d.ts +1 -0
- package/wc/gv-promote.js +1 -1
- package/wc/gv-properties.d.ts +1 -0
- package/wc/gv-properties.js +1 -1
- package/wc/gv-rating-list.d.ts +1 -0
- package/wc/gv-rating-list.js +1 -1
- package/wc/gv-rating.d.ts +1 -0
- package/wc/gv-rating.js +1 -1
- package/wc/gv-relative-time.d.ts +1 -0
- package/wc/gv-relative-time.js +1 -1
- package/wc/gv-resizable-views.d.ts +1 -0
- package/wc/gv-resizable-views.js +1 -1
- package/wc/gv-resources.d.ts +1 -0
- package/wc/gv-resources.js +1 -1
- package/wc/gv-row-expandable.d.ts +1 -0
- package/wc/gv-row-expandable.js +1 -1
- package/wc/gv-row.d.ts +1 -0
- package/wc/gv-row.js +1 -1
- package/wc/gv-schema-form-array.d.ts +1 -0
- package/wc/gv-schema-form-array.js +1 -1
- package/wc/gv-schema-form-control-object.d.ts +1 -0
- package/wc/gv-schema-form-control-object.js +1 -1
- package/wc/gv-schema-form-control.d.ts +1 -0
- package/wc/gv-schema-form-control.js +1 -1
- package/wc/gv-schema-form.d.ts +1 -0
- package/wc/gv-schema-form.js +1 -1
- package/wc/gv-select-native.d.ts +1 -0
- package/wc/gv-select-native.js +1 -1
- package/wc/gv-select.d.ts +1 -0
- package/wc/gv-select.js +1 -1
- package/wc/gv-spinner.d.ts +1 -0
- package/wc/gv-spinner.js +1 -1
- package/wc/gv-state.d.ts +1 -0
- package/wc/gv-state.js +1 -1
- package/wc/gv-stats.d.ts +1 -0
- package/wc/gv-stats.js +1 -1
- package/wc/gv-stepper.d.ts +1 -0
- package/wc/gv-stepper.js +1 -1
- package/wc/gv-switch.d.ts +1 -0
- package/wc/gv-switch.js +1 -1
- package/wc/gv-table.d.ts +1 -0
- package/wc/gv-table.js +1 -1
- package/wc/gv-tabs.d.ts +1 -0
- package/wc/gv-tabs.js +1 -1
- package/wc/gv-tag.d.ts +1 -0
- package/wc/gv-tag.js +1 -1
- package/wc/gv-text.d.ts +1 -0
- package/wc/gv-text.js +1 -1
- package/wc/gv-theme.d.ts +1 -0
- package/wc/gv-theme.js +1 -1
- package/wc/gv-tree.d.ts +1 -0
- package/wc/gv-tree.js +1 -1
- package/wc/gv-user-menu.d.ts +1 -0
- package/wc/gv-user-menu.js +1 -1
- package/wc/gv-vertical-menu.d.ts +1 -0
- package/wc/gv-vertical-menu.js +1 -1
- package/CHANGELOG.md +0 -1292
- package/LICENSE.txt +0 -202
- package/README.md +0 -195
- package/src/.eslintrc.js +0 -19
- package/src/theme/definition.json +0 -1762
|
@@ -1,464 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { LitElement, html, css } from 'lit';
|
|
17
|
-
import { withResizeObserver } from '../mixins/with-resize-observer';
|
|
18
|
-
import { classMap } from 'lit/directives/class-map';
|
|
19
|
-
import { dispatchCustomEvent } from '../lib/events';
|
|
20
|
-
import '../atoms/gv-image';
|
|
21
|
-
import '../molecules/gv-dropdown-menu';
|
|
22
|
-
import '../atoms/gv-switch';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Flow area component
|
|
26
|
-
*
|
|
27
|
-
* @fires gv-flow-step:duplicate - Duplicate event from actions
|
|
28
|
-
* @fires gv-flow-step:delete - Delete event from actions
|
|
29
|
-
* @fires gv-flow-step:edit - Edit event
|
|
30
|
-
* @fires gv-flow-step:copy - Copy event
|
|
31
|
-
* @fires gv-flow-step:move - Move event
|
|
32
|
-
*
|
|
33
|
-
* @attr {Object<{name, icon, configuration:{description, ...}}>} step - the flow step, configuration contains form conf for gv-schema-form component
|
|
34
|
-
* @attr {Boolean} editing - true, if edition in progress
|
|
35
|
-
* @attr {Boolean} dragging - true, if dragging in progress
|
|
36
|
-
* @attr {Boolean} hover - true, if area is hover
|
|
37
|
-
* @attr {String} title - title of area, default is "content.configuration.description" if exist
|
|
38
|
-
* @attr {Boolean} empty - true, if render empty state
|
|
39
|
-
* @attr {Boolean} confirm - true, if render confirm state
|
|
40
|
-
* @attr {Boolean} disabled - true for disabled
|
|
41
|
-
* @attr {Boolean} readonly - true if readonly
|
|
42
|
-
*/
|
|
43
|
-
export class GvFlowStep extends withResizeObserver(LitElement) {
|
|
44
|
-
static get properties() {
|
|
45
|
-
return {
|
|
46
|
-
id: { type: String, reflect: true },
|
|
47
|
-
group: { type: String, reflect: true },
|
|
48
|
-
parent: { type: String, reflect: true },
|
|
49
|
-
step: { type: Object },
|
|
50
|
-
policy: { type: Object },
|
|
51
|
-
editing: { type: Boolean, reflect: true },
|
|
52
|
-
dragging: { type: Boolean, reflect: true },
|
|
53
|
-
hover: { type: Boolean, reflect: true },
|
|
54
|
-
title: { type: String, reflect: true },
|
|
55
|
-
empty: { type: Boolean, reflect: true },
|
|
56
|
-
confirm: { type: Boolean, reflect: true },
|
|
57
|
-
disabled: { type: Boolean, reflect: true },
|
|
58
|
-
readonly: { type: Boolean, reflect: true },
|
|
59
|
-
_small: { type: Boolean, attribute: false },
|
|
60
|
-
_confirmDelete: { type: Boolean, reflect: true },
|
|
61
|
-
_confirmDuplicate: { type: Boolean, reflect: true },
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
constructor() {
|
|
66
|
-
super();
|
|
67
|
-
this.empty = true;
|
|
68
|
-
this.breakpoints = {
|
|
69
|
-
width: [100, 200],
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
onResize({ width }) {
|
|
74
|
-
this._small = width <= 200;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
_onDuplicate() {
|
|
78
|
-
this._confirmDuplicate = true;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
_onConfirmDuplicate() {
|
|
82
|
-
this._confirmDuplicate = false;
|
|
83
|
-
dispatchCustomEvent(this, 'duplicate', { step: this.step, policy: this.policy, target: this });
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
_onCancelDuplicate() {
|
|
87
|
-
this._confirmDuplicate = false;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
_onClick(e) {
|
|
91
|
-
if (!e.target.classList.contains('action') && !this.editing) {
|
|
92
|
-
e.preventDefault();
|
|
93
|
-
this._edit();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
_edit() {
|
|
98
|
-
if (this.policy && !this.disabled) {
|
|
99
|
-
dispatchCustomEvent(this, 'edit', { step: this.step, policy: this.policy, group: this.group });
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
_onMouseEnter() {
|
|
104
|
-
if (!this.disabled) {
|
|
105
|
-
this.hover = true;
|
|
106
|
-
if (!this.readonly) {
|
|
107
|
-
const dropdownMenu = this.shadowRoot.querySelector('gv-dropdown-menu');
|
|
108
|
-
dropdownMenu.setAttribute('open', true);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
_onMouseLeave() {
|
|
114
|
-
if (!this.disabled) {
|
|
115
|
-
this.hover = false;
|
|
116
|
-
if (!this.readonly) {
|
|
117
|
-
const dropdownMenu = this.shadowRoot.querySelector('gv-dropdown-menu');
|
|
118
|
-
dropdownMenu.removeAttribute('open');
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
_onDelete() {
|
|
124
|
-
this._confirmDelete = true;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
_onConfirmDelete() {
|
|
128
|
-
this._confirmDelete = false;
|
|
129
|
-
dispatchCustomEvent(this, 'delete', { step: this.step });
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
_onCancelDelete() {
|
|
133
|
-
this._confirmDelete = false;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
updated(properties) {
|
|
137
|
-
if (properties.has('dragging') && this.dragging === true) {
|
|
138
|
-
const dropdownMenu = this.shadowRoot.querySelector('gv-dropdown-menu');
|
|
139
|
-
dropdownMenu.removeAttribute('open');
|
|
140
|
-
}
|
|
141
|
-
if (properties.has('step') && this.step != null) {
|
|
142
|
-
this.empty = false;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
_onCancel() {
|
|
147
|
-
this.remove();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
_onCopy() {
|
|
151
|
-
dispatchCustomEvent(this, 'copy');
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
_onMove() {
|
|
155
|
-
dispatchCustomEvent(this, 'move');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
_onChangeState({ detail }) {
|
|
159
|
-
dispatchCustomEvent(this, 'change-state', { step: this.step, enabled: detail });
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
_renderDropdownMenu() {
|
|
163
|
-
if (this.disabled || this.readonly) {
|
|
164
|
-
return html``;
|
|
165
|
-
}
|
|
166
|
-
const enabled = this.step.enabled !== false;
|
|
167
|
-
return html`<gv-dropdown-menu right>
|
|
168
|
-
<gv-switch
|
|
169
|
-
slot="action"
|
|
170
|
-
class="action"
|
|
171
|
-
small
|
|
172
|
-
label="${enabled ? 'Enabled' : 'Disabled'}"
|
|
173
|
-
title="${enabled ? 'Disable policy ?' : 'Enable policy ?'}"
|
|
174
|
-
@gv-switch:input="${this._onChangeState}"
|
|
175
|
-
.value="${enabled}"
|
|
176
|
-
></gv-switch>
|
|
177
|
-
<gv-button slot="action" class="action" link small icon="general:duplicate" @gv-button:click="${this._onDuplicate}"
|
|
178
|
-
>Duplicate</gv-button
|
|
179
|
-
>
|
|
180
|
-
<gv-button slot="action" class="action" link small icon="home:trash" @gv-button:click="${this._onDelete}">Delete</gv-button>
|
|
181
|
-
</gv-dropdown-menu>`;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
resetConfirm() {
|
|
185
|
-
this.confirm = false;
|
|
186
|
-
this._confirmDelete = false;
|
|
187
|
-
this._confirmDuplicate = false;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
render() {
|
|
191
|
-
if (this.confirm) {
|
|
192
|
-
return html`<div class="drop-area drop-area-confirm">
|
|
193
|
-
<gv-button small @gv-button:click="${this._onCopy}">Copy</gv-button>
|
|
194
|
-
<gv-button small @gv-button:click="${this._onMove}">Move</gv-button>
|
|
195
|
-
<gv-button link small @gv-button:click="${this._onCancel}">Cancel</gv-button>
|
|
196
|
-
</div>`;
|
|
197
|
-
} else if (this._confirmDelete) {
|
|
198
|
-
return html`<div class="drop-area drop-area-confirm">
|
|
199
|
-
<gv-button small danger @gv-button:click="${this._onConfirmDelete}">Delete</gv-button>
|
|
200
|
-
<gv-button link small @gv-button:click="${this._onCancelDelete}">Cancel</gv-button>
|
|
201
|
-
</div>`;
|
|
202
|
-
} else if (this._confirmDuplicate) {
|
|
203
|
-
return html`<div class="drop-area drop-area-confirm">
|
|
204
|
-
<gv-button small @gv-button:click="${this._onConfirmDuplicate}">Duplicate</gv-button>
|
|
205
|
-
<gv-button link small @gv-button:click="${this._onCancelDuplicate}">Cancel</gv-button>
|
|
206
|
-
</div>`;
|
|
207
|
-
} else if (!this.empty) {
|
|
208
|
-
const name = this.step ? this.step.name : '';
|
|
209
|
-
const description = this.step && this.step.description ? this.step.description : '';
|
|
210
|
-
const hasConditionalSteps = this.step && !!this.step.condition;
|
|
211
|
-
const icon = this.step ? this.policy && this.policy.icon : null;
|
|
212
|
-
const enabled = this.step && this.step.enabled !== false;
|
|
213
|
-
const notFound = this.policy == null;
|
|
214
|
-
if (notFound) {
|
|
215
|
-
this.title = 'Warning: policy not found in plugins folder';
|
|
216
|
-
} else {
|
|
217
|
-
this.title = description;
|
|
218
|
-
}
|
|
219
|
-
const classes = {
|
|
220
|
-
'drop-area': true,
|
|
221
|
-
'is-assigned': name !== '',
|
|
222
|
-
'has-icon': icon != null,
|
|
223
|
-
disabled: !enabled,
|
|
224
|
-
'not-found': notFound,
|
|
225
|
-
};
|
|
226
|
-
return html`<div
|
|
227
|
-
class="${classMap(classes)}"
|
|
228
|
-
@click="${this._onClick}"
|
|
229
|
-
@mouseenter="${this._onMouseEnter}"
|
|
230
|
-
@mouseleave="${this._onMouseLeave}"
|
|
231
|
-
>
|
|
232
|
-
${this._renderDropdownMenu()}
|
|
233
|
-
<div class="content">
|
|
234
|
-
<div class="content-icon">
|
|
235
|
-
${hasConditionalSteps ? html`<gv-icon class="content-icon-conditional" shape="design:conditional"></gv-icon>` : html``}
|
|
236
|
-
${icon ? html`<gv-image src="${icon}"></gv-image>` : html``}
|
|
237
|
-
</div>
|
|
238
|
-
|
|
239
|
-
${icon == null && notFound ? html`<gv-icon class="not-found__icon" shape="finance:folder-error"></gv-icon>` : ''}
|
|
240
|
-
<div>
|
|
241
|
-
<div class="name">${name}</div>
|
|
242
|
-
<div class="description">${description}</div>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
</div> `;
|
|
246
|
-
} else {
|
|
247
|
-
return html`<div class="drop-area"></div>`;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
static get styles() {
|
|
252
|
-
return [
|
|
253
|
-
// language=CSS
|
|
254
|
-
css`
|
|
255
|
-
:host {
|
|
256
|
-
box-sizing: border-box;
|
|
257
|
-
margin: 0.2rem;
|
|
258
|
-
display: block;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
:host(:active) {
|
|
262
|
-
outline: none;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
:host([dragging]) {
|
|
266
|
-
opacity: 0.5;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
gv-dropdown-menu {
|
|
270
|
-
position: absolute;
|
|
271
|
-
right: 0;
|
|
272
|
-
display: flex;
|
|
273
|
-
flex-wrap: wrap;
|
|
274
|
-
justify-content: right;
|
|
275
|
-
top: -1px;
|
|
276
|
-
bottom: -1px;
|
|
277
|
-
z-index: 10;
|
|
278
|
-
--gv-dropdown-menu--bdw: 0 0 0 1px;
|
|
279
|
-
--gv-dropdown-menu--p: 0.1rem 0.3rem;
|
|
280
|
-
--gv-dropdown-menu--gg: 0;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
gv-switch {
|
|
284
|
-
margin: 0.2rem 0;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
:host([hover]) .drop-area {
|
|
288
|
-
transform: translateY(-4px);
|
|
289
|
-
box-shadow: 0 0 0 1px #5a7684, 0 1px 3px #5a7684;
|
|
290
|
-
border-color: transparent;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
:host([dragging]) .drop-area {
|
|
294
|
-
transform: translateY(-4px);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
:host([editing]) .drop-area {
|
|
298
|
-
border-color: #5a7684;
|
|
299
|
-
transform: translateY(-4px);
|
|
300
|
-
box-shadow: 0 0 0 1px #5a7684, 0 1px 3px #5a7684;
|
|
301
|
-
transition: all 0.2s;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
:host([w-lt-200]) gv-image {
|
|
305
|
-
position: absolute;
|
|
306
|
-
opacity: 0.1;
|
|
307
|
-
width: 100%;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
:host([w-lt-200]) .drop-area:hover gv-image {
|
|
311
|
-
opacity: 1;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
:host([w-lt-200]) .content-icon {
|
|
315
|
-
position: absolute;
|
|
316
|
-
width: 100%;
|
|
317
|
-
height: 100%;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
:host([w-lt-100]) .description {
|
|
321
|
-
display: none;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
:host([empty]) .drop-area {
|
|
325
|
-
position: relative;
|
|
326
|
-
background-color: transparent;
|
|
327
|
-
border: 2px dashed #bfbfbf;
|
|
328
|
-
font-size: 14px;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.description {
|
|
332
|
-
line-height: 14px;
|
|
333
|
-
font-size: 12px;
|
|
334
|
-
max-height: 42px;
|
|
335
|
-
overflow: hidden;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.drop-area {
|
|
339
|
-
position: relative;
|
|
340
|
-
border: 2px dashed #bfbfbf;
|
|
341
|
-
border-radius: 4px;
|
|
342
|
-
height: 80px;
|
|
343
|
-
min-width: 80px;
|
|
344
|
-
margin: 4px;
|
|
345
|
-
padding: 4px;
|
|
346
|
-
word-break: break-word;
|
|
347
|
-
display: flex;
|
|
348
|
-
align-items: center;
|
|
349
|
-
text-align: center;
|
|
350
|
-
justify-content: center;
|
|
351
|
-
flex-direction: column;
|
|
352
|
-
--gv-button--fz: 11px;
|
|
353
|
-
flex: 1;
|
|
354
|
-
transition: color 150ms ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
|
|
355
|
-
background-color: white;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.drop-area.disabled {
|
|
359
|
-
/*opacity: 0.7;*/
|
|
360
|
-
/*background-color: #BFBFBF; !* fallback color if gradients are not supported *!*/
|
|
361
|
-
/*border-color: white;*/
|
|
362
|
-
text-decoration: line-through;
|
|
363
|
-
font-style: italic;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.drop-area.not-found {
|
|
367
|
-
border-color: var(--gv-theme-color-warning-light, #ffb74d);
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.drop-area.has-icon {
|
|
371
|
-
padding-left: 0;
|
|
372
|
-
text-align: left;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.drop-area.has-icon .content {
|
|
376
|
-
justify-content: left;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.drop-area.is-assigned {
|
|
380
|
-
border-style: solid;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
:host([hover]) .drop-area.is-assigned:not(.not-found) {
|
|
384
|
-
cursor: grab;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
:host([hover]) .drop-area.is-assigned:not(.not-found):active {
|
|
388
|
-
cursor: grabbing;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
:host([readonly]) .drop-area.is-assigned:not(.not-found),
|
|
392
|
-
:host([readonly]) .drop-area.is-assigned:not(.not-found):active {
|
|
393
|
-
cursor: pointer;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.content {
|
|
397
|
-
display: flex;
|
|
398
|
-
align-items: center;
|
|
399
|
-
justify-content: center;
|
|
400
|
-
text-align: center;
|
|
401
|
-
width: 100%;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.content > div,
|
|
405
|
-
.content > mark {
|
|
406
|
-
width: 100%;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.content-icon {
|
|
410
|
-
flex: 0 1 0%;
|
|
411
|
-
display: flex;
|
|
412
|
-
margin: 0.2rem;
|
|
413
|
-
}
|
|
414
|
-
.content-icon-conditional {
|
|
415
|
-
position: absolute;
|
|
416
|
-
z-index: 10;
|
|
417
|
-
margin: 0.2rem;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
gv-image {
|
|
421
|
-
height: 80px;
|
|
422
|
-
width: 80px;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.not-found__icon {
|
|
426
|
-
--gv-icon--c: var(--gv-theme-color-warning-light, #ffb74d);
|
|
427
|
-
height: 60px;
|
|
428
|
-
width: 60px;
|
|
429
|
-
margin: 0.2rem;
|
|
430
|
-
justify-content: center;
|
|
431
|
-
align-items: center;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.drop-area-confirm {
|
|
435
|
-
flex-direction: row;
|
|
436
|
-
align-items: center;
|
|
437
|
-
justify-content: center;
|
|
438
|
-
background-color: white;
|
|
439
|
-
}
|
|
440
|
-
`,
|
|
441
|
-
];
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
export class PolicyDraggable {
|
|
446
|
-
static parse(str) {
|
|
447
|
-
const data = JSON.parse(str);
|
|
448
|
-
return new PolicyDraggable(data.policy, data.sourcePosition, data.sourceFlowKey, data.sourceFlowId, data.flowStep);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
constructor(policy, sourcePosition, sourceFlowKey, sourceFlowId, flowStep) {
|
|
452
|
-
this.policy = policy;
|
|
453
|
-
this.sourcePosition = sourcePosition;
|
|
454
|
-
this.sourceFlowKey = sourceFlowKey;
|
|
455
|
-
this.sourceFlowId = sourceFlowId;
|
|
456
|
-
this.flowStep = flowStep;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
toString() {
|
|
460
|
-
return JSON.stringify(this);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
window.customElements.define('gv-flow-step', GvFlowStep);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.PolicyDraggable=exports.GvFlowStep=void 0;const t=require("lit"),e=require("../mixins/with-resize-observer"),o=require("lit/directives/class-map"),i=require("../lib/events");require("../atoms/gv-image"),require("../molecules/gv-dropdown-menu"),require("../atoms/gv-switch");class n extends((0,e.withResizeObserver)(t.LitElement)){static get properties(){return{id:{type:String,reflect:!0},group:{type:String,reflect:!0},parent:{type:String,reflect:!0},step:{type:Object},policy:{type:Object},editing:{type:Boolean,reflect:!0},dragging:{type:Boolean,reflect:!0},hover:{type:Boolean,reflect:!0},title:{type:String,reflect:!0},empty:{type:Boolean,reflect:!0},confirm:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},_small:{type:Boolean,attribute:!1},_confirmDelete:{type:Boolean,reflect:!0},_confirmDuplicate:{type:Boolean,reflect:!0}}}constructor(){super(),this.empty=!0,this.breakpoints={width:[100,200]}}onResize({width:t}){this._small=t<=200}_onDuplicate(){this._confirmDuplicate=!0}_onConfirmDuplicate(){this._confirmDuplicate=!1,(0,i.dispatchCustomEvent)(this,"duplicate",{step:this.step,policy:this.policy,target:this})}_onCancelDuplicate(){this._confirmDuplicate=!1}_onClick(t){t.target.classList.contains("action")||this.editing||(t.preventDefault(),this._edit())}_edit(){this.policy&&!this.disabled&&(0,i.dispatchCustomEvent)(this,"edit",{step:this.step,policy:this.policy,group:this.group})}_onMouseEnter(){if(!this.disabled&&(this.hover=!0,!this.readonly)){this.shadowRoot.querySelector("gv-dropdown-menu").setAttribute("open",!0)}}_onMouseLeave(){if(!this.disabled&&(this.hover=!1,!this.readonly)){this.shadowRoot.querySelector("gv-dropdown-menu").removeAttribute("open")}}_onDelete(){this._confirmDelete=!0}_onConfirmDelete(){this._confirmDelete=!1,(0,i.dispatchCustomEvent)(this,"delete",{step:this.step})}_onCancelDelete(){this._confirmDelete=!1}updated(t){if(t.has("dragging")&&!0===this.dragging){this.shadowRoot.querySelector("gv-dropdown-menu").removeAttribute("open")}t.has("step")&&null!=this.step&&(this.empty=!1)}_onCancel(){this.remove()}_onCopy(){(0,i.dispatchCustomEvent)(this,"copy")}_onMove(){(0,i.dispatchCustomEvent)(this,"move")}_onChangeState({detail:t}){(0,i.dispatchCustomEvent)(this,"change-state",{step:this.step,enabled:t})}_renderDropdownMenu(){if(this.disabled||this.readonly)return t.html``;const e=!1!==this.step.enabled;return t.html`<gv-dropdown-menu right><gv-switch slot="action" class="action" small label="${e?"Enabled":"Disabled"}" title="${e?"Disable policy ?":"Enable policy ?"}" @gv-switch:input="${this._onChangeState}" .value="${e}"></gv-switch><gv-button slot="action" class="action" link small icon="general:duplicate" @gv-button:click="${this._onDuplicate}">Duplicate</gv-button><gv-button slot="action" class="action" link small icon="home:trash" @gv-button:click="${this._onDelete}">Delete</gv-button></gv-dropdown-menu>`}resetConfirm(){this.confirm=!1,this._confirmDelete=!1,this._confirmDuplicate=!1}render(){if(this.confirm)return t.html`<div class="drop-area drop-area-confirm"><gv-button small @gv-button:click="${this._onCopy}">Copy</gv-button><gv-button small @gv-button:click="${this._onMove}">Move</gv-button><gv-button link small @gv-button:click="${this._onCancel}">Cancel</gv-button></div>`;if(this._confirmDelete)return t.html`<div class="drop-area drop-area-confirm"><gv-button small danger @gv-button:click="${this._onConfirmDelete}">Delete</gv-button><gv-button link small @gv-button:click="${this._onCancelDelete}">Cancel</gv-button></div>`;if(this._confirmDuplicate)return t.html`<div class="drop-area drop-area-confirm"><gv-button small @gv-button:click="${this._onConfirmDuplicate}">Duplicate</gv-button><gv-button link small @gv-button:click="${this._onCancelDuplicate}">Cancel</gv-button></div>`;if(this.empty)return t.html`<div class="drop-area"></div>`;{const e=this.step?this.step.name:"",i=this.step&&this.step.description?this.step.description:"",n=this.step&&!!this.step.condition,s=this.step?this.policy&&this.policy.icon:null,r=this.step&&!1!==this.step.enabled,a=null==this.policy;this.title=a?"Warning: policy not found in plugins folder":i;const l={"drop-area":!0,"is-assigned":""!==e,"has-icon":null!=s,disabled:!r,"not-found":a};return t.html`<div class="${(0,o.classMap)(l)}" @click="${this._onClick}" @mouseenter="${this._onMouseEnter}" @mouseleave="${this._onMouseLeave}">${this._renderDropdownMenu()}<div class="content"><div class="content-icon">${n?t.html`<gv-icon class="content-icon-conditional" shape="design:conditional"></gv-icon>`:t.html``} ${s?t.html`<gv-image src="${s}"></gv-image>`:t.html``}</div>${null==s&&a?t.html`<gv-icon class="not-found__icon" shape="finance:folder-error"></gv-icon>`:""}<div><div class="name">${e}</div><div class="description">${i}</div></div></div></div>`}}static get styles(){return[t.css`:host{box-sizing:border-box;margin:.2rem;display:block}:host(:active){outline:0}:host([dragging]){opacity:.5}gv-dropdown-menu{position:absolute;right:0;display:flex;flex-wrap:wrap;justify-content:right;top:-1px;bottom:-1px;z-index:10;--gv-dropdown-menu--bdw:0 0 0 1px;--gv-dropdown-menu--p:0.1rem 0.3rem;--gv-dropdown-menu--gg:0}gv-switch{margin:.2rem 0}:host([hover]) .drop-area{transform:translateY(-4px);box-shadow:0 0 0 1px #5a7684,0 1px 3px #5a7684;border-color:transparent}:host([dragging]) .drop-area{transform:translateY(-4px)}:host([editing]) .drop-area{border-color:#5a7684;transform:translateY(-4px);box-shadow:0 0 0 1px #5a7684,0 1px 3px #5a7684;transition:all .2s}:host([w-lt-200]) gv-image{position:absolute;opacity:.1;width:100%}:host([w-lt-200]) .drop-area:hover gv-image{opacity:1}:host([w-lt-200]) .content-icon{position:absolute;width:100%;height:100%}:host([w-lt-100]) .description{display:none}:host([empty]) .drop-area{position:relative;background-color:transparent;border:2px dashed #bfbfbf;font-size:14px}.description{line-height:14px;font-size:12px;max-height:42px;overflow:hidden}.drop-area{position:relative;border:2px dashed #bfbfbf;border-radius:4px;height:80px;min-width:80px;margin:4px;padding:4px;word-break:break-word;display:flex;align-items:center;text-align:center;justify-content:center;flex-direction:column;--gv-button--fz:11px;flex:1;transition:color 150ms ease-in-out,transform .3s ease-in-out,box-shadow .3s ease-in-out,border .3s ease-in-out;background-color:#fff}.drop-area.disabled{text-decoration:line-through;font-style:italic}.drop-area.not-found{border-color:var(--gv-theme-color-warning-light,#ffb74d)}.drop-area.has-icon{padding-left:0;text-align:left}.drop-area.has-icon .content{justify-content:left}.drop-area.is-assigned{border-style:solid}:host([hover]) .drop-area.is-assigned:not(.not-found){cursor:grab}:host([hover]) .drop-area.is-assigned:not(.not-found):active{cursor:grabbing}:host([readonly]) .drop-area.is-assigned:not(.not-found),:host([readonly]) .drop-area.is-assigned:not(.not-found):active{cursor:pointer}.content{display:flex;align-items:center;justify-content:center;text-align:center;width:100%}.content>div,.content>mark{width:100%}.content-icon{flex:0 1 0%;display:flex;margin:.2rem}.content-icon-conditional{position:absolute;z-index:10;margin:.2rem}gv-image{height:80px;width:80px}.not-found__icon{--gv-icon--c:var(--gv-theme-color-warning-light, #ffb74d);height:60px;width:60px;margin:.2rem;justify-content:center;align-items:center}.drop-area-confirm{flex-direction:row;align-items:center;justify-content:center;background-color:#fff}`]}}exports.GvFlowStep=n;class s{static parse(t){const e=JSON.parse(t);return new s(e.policy,e.sourcePosition,e.sourceFlowKey,e.sourceFlowId,e.flowStep)}constructor(t,e,o,i,n){this.policy=t,this.sourcePosition=e,this.sourceFlowKey=o,this.sourceFlowId=i,this.flowStep=n}toString(){return JSON.stringify(this)}}exports.PolicyDraggable=s,window.customElements.define("gv-flow-step",n);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flow component
|
|
3
|
+
*
|
|
4
|
+
* @fires gv-flow:drop - Drop event
|
|
5
|
+
* @fires gv-flow:edit - Edit event
|
|
6
|
+
* @fires gv-flow:delete - Delete event
|
|
7
|
+
*
|
|
8
|
+
* @attr {Object} flow - the flow to display
|
|
9
|
+
* @attr {String} selectedStepId - the selected step id
|
|
10
|
+
* @attr {Object} targetedPolicy - true, if flow is targeted for drop action
|
|
11
|
+
* @attr {Boolean} has-policy-filter - true if policies have onRequest/onResponse properties
|
|
12
|
+
* @attr {String} flowsTitle - flows menu title
|
|
13
|
+
* @attr {Boolean} disabled - true for disabled
|
|
14
|
+
* @attr {Boolean} readonly - true if readonly
|
|
15
|
+
*/
|
|
16
|
+
export class GvFlow extends LitElement {
|
|
17
|
+
static get properties(): {
|
|
18
|
+
flow: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
};
|
|
21
|
+
plan: {
|
|
22
|
+
type: ObjectConstructor;
|
|
23
|
+
};
|
|
24
|
+
policies: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
};
|
|
27
|
+
selectedStepId: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
dragPolicy: {
|
|
31
|
+
type: ObjectConstructor;
|
|
32
|
+
};
|
|
33
|
+
dropPolicy: {
|
|
34
|
+
type: ObjectConstructor;
|
|
35
|
+
};
|
|
36
|
+
disabled: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
reflect: boolean;
|
|
39
|
+
};
|
|
40
|
+
hasPolicyFilter: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
attribute: string;
|
|
43
|
+
};
|
|
44
|
+
flowsTitle: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
attribute: string;
|
|
47
|
+
};
|
|
48
|
+
readonly: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
reflect: boolean;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
static get styles(): import("lit").CSSResult[];
|
|
54
|
+
flowsTitle: string;
|
|
55
|
+
_onMouseLeave(): void;
|
|
56
|
+
dragPolicy: any;
|
|
57
|
+
dropPolicy: any;
|
|
58
|
+
getCandidate(): Element | null;
|
|
59
|
+
getFlowSteps(): Element[];
|
|
60
|
+
getOrCreateCandidate(): Element;
|
|
61
|
+
removeCandidate(): void;
|
|
62
|
+
_canDropPolicy(flowKey: any, policy: any): boolean;
|
|
63
|
+
_onDragOver(flowKey: any, e: any): void;
|
|
64
|
+
_onDragEnd(): void;
|
|
65
|
+
_draggablePolicyImage: HTMLDivElement | null | undefined;
|
|
66
|
+
_onDragStart(sourceFlowKey: any, flowStep: any, sourcePosition: any, e: any): void;
|
|
67
|
+
get draggingArea(): Element | null;
|
|
68
|
+
_onDrop(flowKey: any, e: any): void;
|
|
69
|
+
getFlowStep(flowKey: any, position: any): any;
|
|
70
|
+
_onEditStep({ detail: { step, policy, group } }: {
|
|
71
|
+
detail: {
|
|
72
|
+
step: any;
|
|
73
|
+
policy: any;
|
|
74
|
+
group: any;
|
|
75
|
+
};
|
|
76
|
+
}): void;
|
|
77
|
+
_onDuplicateStep(flowKey: any, position: any): void;
|
|
78
|
+
_isEditable(step: any): any;
|
|
79
|
+
_onDeleteStep(flowKey: any, position: any, e: any): void;
|
|
80
|
+
_onChangeStepState(flowKey: any, position: any, { detail }: {
|
|
81
|
+
detail: any;
|
|
82
|
+
}): void;
|
|
83
|
+
_renderDropStep(group: any, step: any, position: any): import("lit-html").TemplateResult<1>;
|
|
84
|
+
onDragEnd(): void;
|
|
85
|
+
_getLabel(flowKey: any): "" | import("lit-html").TemplateResult<1> | "request" | "response";
|
|
86
|
+
get collectionName(): any;
|
|
87
|
+
findPolicy(policyId: any): any;
|
|
88
|
+
}
|
|
89
|
+
import { LitElement } from "lit-element/lit-element";
|