@unofficialbox/box-open-elements 0.1.0
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/LICENSE +21 -0
- package/README.md +125 -0
- package/dist/components/actions/button-group.d.ts +22 -0
- package/dist/components/actions/button-group.js +255 -0
- package/dist/components/actions/button.d.ts +16 -0
- package/dist/components/actions/button.js +190 -0
- package/dist/components/actions/icon-button.d.ts +20 -0
- package/dist/components/actions/icon-button.js +187 -0
- package/dist/components/actions/link-button.d.ts +14 -0
- package/dist/components/actions/link-button.js +137 -0
- package/dist/components/actions/menu-item.d.ts +17 -0
- package/dist/components/actions/menu-item.js +137 -0
- package/dist/components/actions/menu.d.ts +22 -0
- package/dist/components/actions/menu.js +178 -0
- package/dist/components/actions/segmented-control.d.ts +27 -0
- package/dist/components/actions/segmented-control.js +273 -0
- package/dist/components/collections/card.d.ts +13 -0
- package/dist/components/collections/card.js +110 -0
- package/dist/components/collections/carousel.d.ts +40 -0
- package/dist/components/collections/carousel.js +406 -0
- package/dist/components/collections/datalist-item.d.ts +32 -0
- package/dist/components/collections/datalist-item.js +196 -0
- package/dist/components/collections/draggable-list.d.ts +33 -0
- package/dist/components/collections/draggable-list.js +306 -0
- package/dist/components/collections/grid-view.d.ts +38 -0
- package/dist/components/collections/grid-view.js +321 -0
- package/dist/components/collections/pagination.d.ts +19 -0
- package/dist/components/collections/pagination.js +147 -0
- package/dist/components/collections/tree-grid.d.ts +47 -0
- package/dist/components/collections/tree-grid.js +593 -0
- package/dist/components/collections/tree.d.ts +37 -0
- package/dist/components/collections/tree.js +526 -0
- package/dist/components/feedback/alert.d.ts +27 -0
- package/dist/components/feedback/alert.js +263 -0
- package/dist/components/feedback/badge.d.ts +12 -0
- package/dist/components/feedback/badge.js +99 -0
- package/dist/components/feedback/chip.d.ts +33 -0
- package/dist/components/feedback/chip.js +261 -0
- package/dist/components/feedback/empty-state.d.ts +19 -0
- package/dist/components/feedback/empty-state.js +137 -0
- package/dist/components/feedback/error-mask.d.ts +25 -0
- package/dist/components/feedback/error-mask.js +199 -0
- package/dist/components/feedback/help-text.d.ts +22 -0
- package/dist/components/feedback/help-text.js +176 -0
- package/dist/components/feedback/nudge.d.ts +32 -0
- package/dist/components/feedback/nudge.js +299 -0
- package/dist/components/feedback/progress-bar.d.ts +18 -0
- package/dist/components/feedback/progress-bar.js +128 -0
- package/dist/components/feedback/progress-ring.d.ts +21 -0
- package/dist/components/feedback/progress-ring.js +155 -0
- package/dist/components/feedback/progress-steps.d.ts +25 -0
- package/dist/components/feedback/progress-steps.js +276 -0
- package/dist/components/feedback/skeleton.d.ts +14 -0
- package/dist/components/feedback/skeleton.js +95 -0
- package/dist/components/feedback/spinner.d.ts +10 -0
- package/dist/components/feedback/spinner.js +80 -0
- package/dist/components/feedback/toast.d.ts +26 -0
- package/dist/components/feedback/toast.js +205 -0
- package/dist/components/files/drop-zone.d.ts +19 -0
- package/dist/components/files/drop-zone.js +169 -0
- package/dist/components/forms/calendar.d.ts +47 -0
- package/dist/components/forms/calendar.js +499 -0
- package/dist/components/forms/category-selector.d.ts +35 -0
- package/dist/components/forms/category-selector.js +269 -0
- package/dist/components/forms/checkbox-group.d.ts +31 -0
- package/dist/components/forms/checkbox-group.js +267 -0
- package/dist/components/forms/checkbox.d.ts +28 -0
- package/dist/components/forms/checkbox.js +250 -0
- package/dist/components/forms/color-picker.d.ts +34 -0
- package/dist/components/forms/color-picker.js +314 -0
- package/dist/components/forms/combobox.d.ts +37 -0
- package/dist/components/forms/combobox.js +234 -0
- package/dist/components/forms/date-field.d.ts +27 -0
- package/dist/components/forms/date-field.js +187 -0
- package/dist/components/forms/dropdown.d.ts +38 -0
- package/dist/components/forms/dropdown.js +405 -0
- package/dist/components/forms/dual-listbox.d.ts +44 -0
- package/dist/components/forms/dual-listbox.js +484 -0
- package/dist/components/forms/fieldset.d.ts +32 -0
- package/dist/components/forms/fieldset.js +168 -0
- package/dist/components/forms/multi-select.d.ts +30 -0
- package/dist/components/forms/multi-select.js +264 -0
- package/dist/components/forms/number-input.d.ts +32 -0
- package/dist/components/forms/number-input.js +245 -0
- package/dist/components/forms/pill-cloud.d.ts +35 -0
- package/dist/components/forms/pill-cloud.js +230 -0
- package/dist/components/forms/pill-selector-dropdown.d.ts +55 -0
- package/dist/components/forms/pill-selector-dropdown.js +499 -0
- package/dist/components/forms/radio-group.d.ts +32 -0
- package/dist/components/forms/radio-group.js +285 -0
- package/dist/components/forms/range-slider.d.ts +36 -0
- package/dist/components/forms/range-slider.js +294 -0
- package/dist/components/forms/rating.d.ts +31 -0
- package/dist/components/forms/rating.js +302 -0
- package/dist/components/forms/rich-text-input.d.ts +32 -0
- package/dist/components/forms/rich-text-input.js +403 -0
- package/dist/components/forms/search-field.d.ts +27 -0
- package/dist/components/forms/search-field.js +293 -0
- package/dist/components/forms/select.d.ts +30 -0
- package/dist/components/forms/select.js +198 -0
- package/dist/components/forms/slider.d.ts +31 -0
- package/dist/components/forms/slider.js +221 -0
- package/dist/components/forms/spin-button.d.ts +33 -0
- package/dist/components/forms/spin-button.js +352 -0
- package/dist/components/forms/switch.d.ts +32 -0
- package/dist/components/forms/switch.js +302 -0
- package/dist/components/forms/tag-input.d.ts +46 -0
- package/dist/components/forms/tag-input.js +420 -0
- package/dist/components/forms/text-area.d.ts +26 -0
- package/dist/components/forms/text-area.js +188 -0
- package/dist/components/forms/text-field.d.ts +24 -0
- package/dist/components/forms/text-field.js +151 -0
- package/dist/components/forms/time-field.d.ts +29 -0
- package/dist/components/forms/time-field.js +203 -0
- package/dist/components/identity/avatar.d.ts +21 -0
- package/dist/components/identity/avatar.js +191 -0
- package/dist/components/identity/contact-datalist-item.d.ts +31 -0
- package/dist/components/identity/contact-datalist-item.js +235 -0
- package/dist/components/identity/persona.d.ts +28 -0
- package/dist/components/identity/persona.js +272 -0
- package/dist/components/layout/app-shell.d.ts +26 -0
- package/dist/components/layout/app-shell.js +258 -0
- package/dist/components/layout/divider.d.ts +12 -0
- package/dist/components/layout/divider.js +119 -0
- package/dist/components/layout/nav-sidebar.d.ts +23 -0
- package/dist/components/layout/nav-sidebar.js +167 -0
- package/dist/components/layout/section.d.ts +20 -0
- package/dist/components/layout/section.js +143 -0
- package/dist/components/layout/sidebar-toggle-button.d.ts +26 -0
- package/dist/components/layout/sidebar-toggle-button.js +137 -0
- package/dist/components/layout/split-view.d.ts +19 -0
- package/dist/components/layout/split-view.js +157 -0
- package/dist/components/navigation/accordion.d.ts +25 -0
- package/dist/components/navigation/accordion.js +253 -0
- package/dist/components/navigation/tabs.d.ts +27 -0
- package/dist/components/navigation/tabs.js +289 -0
- package/dist/components/overlays/dialog.d.ts +26 -0
- package/dist/components/overlays/dialog.js +267 -0
- package/dist/components/overlays/drawer.d.ts +32 -0
- package/dist/components/overlays/drawer.js +323 -0
- package/dist/components/overlays/popover.d.ts +35 -0
- package/dist/components/overlays/popover.js +317 -0
- package/dist/components/overlays/tooltip.d.ts +26 -0
- package/dist/components/overlays/tooltip.js +204 -0
- package/dist/components/visuals/illustration.d.ts +26 -0
- package/dist/components/visuals/illustration.js +319 -0
- package/dist/core/controller.d.ts +11 -0
- package/dist/core/controller.js +23 -0
- package/dist/core/element.d.ts +22 -0
- package/dist/core/element.js +28 -0
- package/dist/core/event-emitter.d.ts +9 -0
- package/dist/core/event-emitter.js +33 -0
- package/dist/core/form-associated.d.ts +63 -0
- package/dist/core/form-associated.js +218 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +4 -0
- package/dist/core/json-schema.d.ts +1 -0
- package/dist/core/json-schema.js +1 -0
- package/dist/foundations/a11y/focus.d.ts +17 -0
- package/dist/foundations/a11y/focus.js +94 -0
- package/dist/foundations/a11y/heading.d.ts +26 -0
- package/dist/foundations/a11y/heading.js +40 -0
- package/dist/foundations/a11y/index.d.ts +5 -0
- package/dist/foundations/a11y/index.js +3 -0
- package/dist/foundations/a11y/keyboard.d.ts +28 -0
- package/dist/foundations/a11y/keyboard.js +77 -0
- package/dist/foundations/geometry/index.d.ts +1 -0
- package/dist/foundations/geometry/index.js +1 -0
- package/dist/foundations/geometry/tokens.d.ts +123 -0
- package/dist/foundations/geometry/tokens.js +154 -0
- package/dist/foundations/icons/box-iconography.d.ts +479 -0
- package/dist/foundations/icons/box-iconography.generated.d.ts +2370 -0
- package/dist/foundations/icons/box-iconography.generated.js +4010 -0
- package/dist/foundations/icons/box-iconography.js +39 -0
- package/dist/foundations/icons/index.d.ts +1 -0
- package/dist/foundations/icons/index.js +1 -0
- package/dist/foundations/motion/index.d.ts +2 -0
- package/dist/foundations/motion/index.js +1 -0
- package/dist/foundations/motion/tokens.d.ts +39 -0
- package/dist/foundations/motion/tokens.js +43 -0
- package/dist/foundations/tokens/box-dark.d.ts +11 -0
- package/dist/foundations/tokens/box-dark.js +46 -0
- package/dist/foundations/tokens/box-defaults.d.ts +5 -0
- package/dist/foundations/tokens/box-defaults.js +52 -0
- package/dist/foundations/tokens/index.d.ts +5 -0
- package/dist/foundations/tokens/index.js +4 -0
- package/dist/foundations/tokens/interaction.d.ts +28 -0
- package/dist/foundations/tokens/interaction.js +72 -0
- package/dist/foundations/tokens/registry.d.ts +14 -0
- package/dist/foundations/tokens/registry.js +92 -0
- package/dist/foundations/tokens/types.d.ts +16 -0
- package/dist/foundations/tokens/types.js +1 -0
- package/dist/foundations/typography/index.d.ts +2 -0
- package/dist/foundations/typography/index.js +1 -0
- package/dist/foundations/typography/tokens.d.ts +76 -0
- package/dist/foundations/typography/tokens.js +27 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +98 -0
- package/dist/patterns/content-explorer/actions/controller.d.ts +12 -0
- package/dist/patterns/content-explorer/actions/controller.js +36 -0
- package/dist/patterns/content-explorer/actions/index.d.ts +2 -0
- package/dist/patterns/content-explorer/actions/index.js +1 -0
- package/dist/patterns/content-explorer/actions/types.d.ts +13 -0
- package/dist/patterns/content-explorer/actions/types.js +1 -0
- package/dist/patterns/content-explorer/adapters/action-menu.d.ts +24 -0
- package/dist/patterns/content-explorer/adapters/action-menu.js +312 -0
- package/dist/patterns/content-explorer/adapters/breadcrumbs.d.ts +15 -0
- package/dist/patterns/content-explorer/adapters/breadcrumbs.js +161 -0
- package/dist/patterns/content-explorer/adapters/item-summary.d.ts +11 -0
- package/dist/patterns/content-explorer/adapters/item-summary.js +72 -0
- package/dist/patterns/content-explorer/adapters/items.d.ts +4 -0
- package/dist/patterns/content-explorer/adapters/items.js +12 -0
- package/dist/patterns/content-explorer/adapters/list.d.ts +28 -0
- package/dist/patterns/content-explorer/adapters/list.js +527 -0
- package/dist/patterns/content-explorer/adapters/table.d.ts +23 -0
- package/dist/patterns/content-explorer/adapters/table.js +467 -0
- package/dist/patterns/content-explorer/adapters/toolbar.d.ts +19 -0
- package/dist/patterns/content-explorer/adapters/toolbar.js +234 -0
- package/dist/patterns/content-explorer/box-transport.d.ts +44 -0
- package/dist/patterns/content-explorer/box-transport.js +229 -0
- package/dist/patterns/content-explorer/collection/controller.d.ts +17 -0
- package/dist/patterns/content-explorer/collection/controller.js +67 -0
- package/dist/patterns/content-explorer/collection/index.d.ts +2 -0
- package/dist/patterns/content-explorer/collection/index.js +1 -0
- package/dist/patterns/content-explorer/collection/types.d.ts +20 -0
- package/dist/patterns/content-explorer/collection/types.js +1 -0
- package/dist/patterns/content-explorer/content-explorer.d.ts +85 -0
- package/dist/patterns/content-explorer/content-explorer.js +745 -0
- package/dist/patterns/content-explorer/contracts.d.ts +32 -0
- package/dist/patterns/content-explorer/contracts.js +114 -0
- package/dist/patterns/content-explorer/controller.d.ts +34 -0
- package/dist/patterns/content-explorer/controller.js +399 -0
- package/dist/patterns/content-explorer/host-bindings.d.ts +50 -0
- package/dist/patterns/content-explorer/host-bindings.js +76 -0
- package/dist/patterns/content-explorer/index.d.ts +18 -0
- package/dist/patterns/content-explorer/index.js +24 -0
- package/dist/patterns/content-explorer/navigation/controller.d.ts +10 -0
- package/dist/patterns/content-explorer/navigation/controller.js +48 -0
- package/dist/patterns/content-explorer/navigation/index.d.ts +2 -0
- package/dist/patterns/content-explorer/navigation/index.js +1 -0
- package/dist/patterns/content-explorer/navigation/types.d.ts +20 -0
- package/dist/patterns/content-explorer/navigation/types.js +1 -0
- package/dist/patterns/content-explorer/schemas.d.ts +6 -0
- package/dist/patterns/content-explorer/schemas.js +120 -0
- package/dist/patterns/content-explorer/selection/controller.d.ts +12 -0
- package/dist/patterns/content-explorer/selection/controller.js +54 -0
- package/dist/patterns/content-explorer/selection/index.d.ts +2 -0
- package/dist/patterns/content-explorer/selection/index.js +1 -0
- package/dist/patterns/content-explorer/selection/types.d.ts +14 -0
- package/dist/patterns/content-explorer/selection/types.js +1 -0
- package/dist/patterns/content-explorer/types.d.ts +209 -0
- package/dist/patterns/content-explorer/types.js +10 -0
- package/dist/patterns/file-request/file-request-builder.d.ts +36 -0
- package/dist/patterns/file-request/file-request-builder.js +344 -0
- package/dist/patterns/file-request/index.d.ts +1 -0
- package/dist/patterns/file-request/index.js +1 -0
- package/dist/patterns/governance/governance-panel.d.ts +40 -0
- package/dist/patterns/governance/governance-panel.js +351 -0
- package/dist/patterns/governance/index.d.ts +1 -0
- package/dist/patterns/governance/index.js +1 -0
- package/dist/patterns/insights/bar-chart.d.ts +43 -0
- package/dist/patterns/insights/bar-chart.js +462 -0
- package/dist/patterns/insights/chart-panel.d.ts +43 -0
- package/dist/patterns/insights/chart-panel.js +436 -0
- package/dist/patterns/insights/donut-chart.d.ts +43 -0
- package/dist/patterns/insights/donut-chart.js +535 -0
- package/dist/patterns/insights/index.d.ts +5 -0
- package/dist/patterns/insights/index.js +5 -0
- package/dist/patterns/insights/line-chart.d.ts +46 -0
- package/dist/patterns/insights/line-chart.js +511 -0
- package/dist/patterns/insights/metric-card.d.ts +36 -0
- package/dist/patterns/insights/metric-card.js +278 -0
- package/dist/patterns/item/bulk-action-bar.d.ts +35 -0
- package/dist/patterns/item/bulk-action-bar.js +325 -0
- package/dist/patterns/item/index.d.ts +4 -0
- package/dist/patterns/item/index.js +4 -0
- package/dist/patterns/item/item-details-panel.d.ts +61 -0
- package/dist/patterns/item/item-details-panel.js +429 -0
- package/dist/patterns/item/item-form.d.ts +54 -0
- package/dist/patterns/item/item-form.js +485 -0
- package/dist/patterns/item/preview-header.d.ts +46 -0
- package/dist/patterns/item/preview-header.js +323 -0
- package/dist/patterns/metadata/contracts.d.ts +75 -0
- package/dist/patterns/metadata/contracts.js +91 -0
- package/dist/patterns/metadata/index.d.ts +4 -0
- package/dist/patterns/metadata/index.js +4 -0
- package/dist/patterns/metadata/metadata-filter-builder.d.ts +43 -0
- package/dist/patterns/metadata/metadata-filter-builder.js +362 -0
- package/dist/patterns/metadata/metadata-inspector.d.ts +31 -0
- package/dist/patterns/metadata/metadata-inspector.js +245 -0
- package/dist/patterns/metadata/schemas.d.ts +5 -0
- package/dist/patterns/metadata/schemas.js +66 -0
- package/dist/patterns/preview/annotation-inspector.d.ts +44 -0
- package/dist/patterns/preview/annotation-inspector.js +380 -0
- package/dist/patterns/preview/annotation-thread.d.ts +37 -0
- package/dist/patterns/preview/annotation-thread.js +338 -0
- package/dist/patterns/preview/annotation-toolbar.d.ts +42 -0
- package/dist/patterns/preview/annotation-toolbar.js +393 -0
- package/dist/patterns/preview/content-preview-adapter.d.ts +13 -0
- package/dist/patterns/preview/content-preview-adapter.js +30 -0
- package/dist/patterns/preview/index.d.ts +6 -0
- package/dist/patterns/preview/index.js +6 -0
- package/dist/patterns/preview/preview-element.d.ts +41 -0
- package/dist/patterns/preview/preview-element.js +429 -0
- package/dist/patterns/preview/provider-adapter.d.ts +36 -0
- package/dist/patterns/preview/provider-adapter.js +29 -0
- package/dist/patterns/search/filter-bar.d.ts +50 -0
- package/dist/patterns/search/filter-bar.js +379 -0
- package/dist/patterns/search/index.d.ts +3 -0
- package/dist/patterns/search/index.js +3 -0
- package/dist/patterns/search/saved-view-picker.d.ts +25 -0
- package/dist/patterns/search/saved-view-picker.js +239 -0
- package/dist/patterns/search/search-results-header.d.ts +34 -0
- package/dist/patterns/search/search-results-header.js +288 -0
- package/dist/patterns/share/access-stats.d.ts +19 -0
- package/dist/patterns/share/access-stats.js +204 -0
- package/dist/patterns/share/collaborator-avatars.d.ts +22 -0
- package/dist/patterns/share/collaborator-avatars.js +214 -0
- package/dist/patterns/share/contracts.d.ts +65 -0
- package/dist/patterns/share/contracts.js +75 -0
- package/dist/patterns/share/index.d.ts +14 -0
- package/dist/patterns/share/index.js +14 -0
- package/dist/patterns/share/invite-collaborators-contracts.d.ts +38 -0
- package/dist/patterns/share/invite-collaborators-contracts.js +1 -0
- package/dist/patterns/share/invite-collaborators-controller.d.ts +40 -0
- package/dist/patterns/share/invite-collaborators-controller.js +86 -0
- package/dist/patterns/share/invite-collaborators-modal.d.ts +46 -0
- package/dist/patterns/share/invite-collaborators-modal.js +465 -0
- package/dist/patterns/share/permission-matrix.d.ts +37 -0
- package/dist/patterns/share/permission-matrix.js +360 -0
- package/dist/patterns/share/presence-contracts.d.ts +26 -0
- package/dist/patterns/share/presence-contracts.js +1 -0
- package/dist/patterns/share/presence-controller.d.ts +31 -0
- package/dist/patterns/share/presence-controller.js +47 -0
- package/dist/patterns/share/presence.d.ts +32 -0
- package/dist/patterns/share/presence.js +255 -0
- package/dist/patterns/share/schemas.d.ts +4 -0
- package/dist/patterns/share/schemas.js +41 -0
- package/dist/patterns/share/share-panel.d.ts +75 -0
- package/dist/patterns/share/share-panel.js +565 -0
- package/dist/patterns/share/unified-share-controller.d.ts +52 -0
- package/dist/patterns/share/unified-share-controller.js +97 -0
- package/dist/patterns/share/unified-share-modal.d.ts +50 -0
- package/dist/patterns/share/unified-share-modal.js +646 -0
- package/dist/patterns/task/index.d.ts +2 -0
- package/dist/patterns/task/index.js +2 -0
- package/dist/patterns/task/review-queue-item.d.ts +45 -0
- package/dist/patterns/task/review-queue-item.js +403 -0
- package/dist/patterns/task/task-assignment-panel.d.ts +50 -0
- package/dist/patterns/task/task-assignment-panel.js +450 -0
- package/package.json +151 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { BaseElement } from "../../core/index.js";
|
|
2
|
+
import { boePanel } from "../../foundations/geometry/index.js";
|
|
3
|
+
import { boeBrandInteractiveStyles, boeNeutralInteractiveStyles, } from "../../foundations/tokens/index.js";
|
|
4
|
+
const DEFAULT_TAG_NAME = "box-preview-header";
|
|
5
|
+
const escapeHtml = (value) => value
|
|
6
|
+
.replaceAll("&", "&")
|
|
7
|
+
.replaceAll("<", "<")
|
|
8
|
+
.replaceAll(">", ">")
|
|
9
|
+
.replaceAll('"', """)
|
|
10
|
+
.replaceAll("'", "'");
|
|
11
|
+
const escapeSelectorValue = (value) => value.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
|
|
12
|
+
const elementStyles = `
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
color: inherit;
|
|
16
|
+
font: inherit;
|
|
17
|
+
--_obp-surface: var(--boe-token-surface-surface, #ffffff);
|
|
18
|
+
--_obp-surface-muted: var(--boe-token-surface-surface-secondary, #fbfbfb);
|
|
19
|
+
--_obp-border: color-mix(in srgb, var(--boe-token-stroke-stroke, #e8e8e8) 82%, transparent);
|
|
20
|
+
--_obp-border-subtle: color-mix(in srgb, var(--boe-token-stroke-stroke, #e8e8e8) 64%, transparent);
|
|
21
|
+
--_obp-text-muted: var(--boe-token-text-text-secondary, #6f6f6f);
|
|
22
|
+
--_obp-brand: var(--boe-token-surface-surface-brand, #0061d5);
|
|
23
|
+
--_obp-brand-soft: color-mix(in srgb, var(--_obp-brand) 12%, var(--boe-token-surface-surface, #ffffff) 88%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[part="header"] {
|
|
27
|
+
display: grid;
|
|
28
|
+
gap: ${boePanel.gap};
|
|
29
|
+
padding: ${boePanel.padding};
|
|
30
|
+
border: 1px solid var(--_obp-border);
|
|
31
|
+
border-radius: ${boePanel.radius};
|
|
32
|
+
background: var(--_obp-surface-muted);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[part="breadcrumbs"] {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 0.5rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[part="breadcrumb"] {
|
|
43
|
+
border: none;
|
|
44
|
+
padding: 0;
|
|
45
|
+
background: none;
|
|
46
|
+
color: var(--_obp-text-muted);
|
|
47
|
+
font: inherit;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[part="separator"] {
|
|
52
|
+
color: color-mix(in srgb, var(--_obp-text-muted) 62%, transparent);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[part="main"] {
|
|
56
|
+
display: grid;
|
|
57
|
+
gap: ${boePanel.gap};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[part="title-row"] {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: ${boePanel.gap};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[part="title"] {
|
|
68
|
+
margin: 0;
|
|
69
|
+
font: inherit;
|
|
70
|
+
font-size: 1.15rem;
|
|
71
|
+
font-weight: 700;
|
|
72
|
+
line-height: 1.15;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[part="status"] {
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
padding: 0.42rem 0.7rem;
|
|
78
|
+
border-radius: 999px;
|
|
79
|
+
background: var(--_obp-brand-soft);
|
|
80
|
+
color: var(--_obp-brand);
|
|
81
|
+
font-size: 0.82rem;
|
|
82
|
+
font-weight: 700;
|
|
83
|
+
letter-spacing: 0.05em;
|
|
84
|
+
text-transform: uppercase;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[part="message"] {
|
|
88
|
+
color: var(--_obp-text-muted);
|
|
89
|
+
line-height: 1.6;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[part="actions"] {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-wrap: wrap;
|
|
95
|
+
gap: ${boePanel.gap};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[part="action"] {
|
|
99
|
+
border: 1px solid var(--_obp-border-subtle);
|
|
100
|
+
border-radius: 999px;
|
|
101
|
+
padding: 0.4rem 0.7rem;
|
|
102
|
+
background: var(--_obp-surface);
|
|
103
|
+
color: inherit;
|
|
104
|
+
font: inherit;
|
|
105
|
+
font-weight: 700;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
${boeNeutralInteractiveStyles('[part="action"]')}
|
|
110
|
+
${boeNeutralInteractiveStyles('[part="breadcrumb"]')}
|
|
111
|
+
${boeBrandInteractiveStyles('[part="action"][data-tone="primary"]')}
|
|
112
|
+
|
|
113
|
+
[part="action"][data-tone="primary"] {
|
|
114
|
+
background: var(--_obp-brand);
|
|
115
|
+
color: var(--boe-token-text-text-on-brand, #ffffff);
|
|
116
|
+
border-color: var(--_obp-brand);
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
export class BoxPreviewHeaderElement extends BaseElement {
|
|
120
|
+
static get observedAttributes() {
|
|
121
|
+
return ["actions", "breadcrumbs", "message", "status", "heading"];
|
|
122
|
+
}
|
|
123
|
+
breadcrumbsEl;
|
|
124
|
+
titleEl;
|
|
125
|
+
statusEl;
|
|
126
|
+
messageEl;
|
|
127
|
+
actionsEl;
|
|
128
|
+
breadcrumbsSignature = "";
|
|
129
|
+
actionsSignature = "";
|
|
130
|
+
get actions() {
|
|
131
|
+
return this.parseJsonAttribute("actions", []);
|
|
132
|
+
}
|
|
133
|
+
set actions(value) {
|
|
134
|
+
this.setAttribute("actions", JSON.stringify(value));
|
|
135
|
+
}
|
|
136
|
+
get breadcrumbs() {
|
|
137
|
+
return this.parseJsonAttribute("breadcrumbs", []);
|
|
138
|
+
}
|
|
139
|
+
set breadcrumbs(value) {
|
|
140
|
+
this.setAttribute("breadcrumbs", JSON.stringify(value));
|
|
141
|
+
}
|
|
142
|
+
get message() {
|
|
143
|
+
return this.getAttribute("message") ?? "";
|
|
144
|
+
}
|
|
145
|
+
set message(value) {
|
|
146
|
+
this.setAttribute("message", value);
|
|
147
|
+
}
|
|
148
|
+
get status() {
|
|
149
|
+
return this.getAttribute("status") ?? "";
|
|
150
|
+
}
|
|
151
|
+
set status(value) {
|
|
152
|
+
this.setAttribute("status", value);
|
|
153
|
+
}
|
|
154
|
+
get heading() {
|
|
155
|
+
return this.getAttribute("heading") ?? "";
|
|
156
|
+
}
|
|
157
|
+
set heading(value) {
|
|
158
|
+
this.setAttribute("heading", value);
|
|
159
|
+
}
|
|
160
|
+
connectedCallback() {
|
|
161
|
+
super.connectedCallback();
|
|
162
|
+
}
|
|
163
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
164
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
165
|
+
}
|
|
166
|
+
parseJsonAttribute(name, fallback) {
|
|
167
|
+
const raw = this.getAttribute(name);
|
|
168
|
+
if (!raw) {
|
|
169
|
+
return fallback;
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
return JSON.parse(raw);
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
return fallback;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
emitAction(actionId) {
|
|
179
|
+
this.dispatchEvent(new CustomEvent("action", {
|
|
180
|
+
bubbles: true,
|
|
181
|
+
composed: true,
|
|
182
|
+
detail: { action: actionId },
|
|
183
|
+
}));
|
|
184
|
+
}
|
|
185
|
+
emitBreadcrumbSelected(id) {
|
|
186
|
+
this.dispatchEvent(new CustomEvent("breadcrumb-selected", {
|
|
187
|
+
bubbles: true,
|
|
188
|
+
composed: true,
|
|
189
|
+
detail: { id },
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
breadcrumbsKey() {
|
|
193
|
+
return JSON.stringify(this.breadcrumbs.map(crumb => crumb.id));
|
|
194
|
+
}
|
|
195
|
+
actionsKey() {
|
|
196
|
+
return JSON.stringify(this.actions.map(action => action.id));
|
|
197
|
+
}
|
|
198
|
+
rebuildBreadcrumbs() {
|
|
199
|
+
this.breadcrumbsEl.innerHTML = this.breadcrumbs
|
|
200
|
+
.map(crumb => `
|
|
201
|
+
<button type="button" part="breadcrumb" data-crumb-id="${escapeHtml(crumb.id)}">
|
|
202
|
+
${escapeHtml(crumb.label)}
|
|
203
|
+
</button>
|
|
204
|
+
`)
|
|
205
|
+
.join('<span part="separator">/</span>');
|
|
206
|
+
}
|
|
207
|
+
patchBreadcrumbLabels() {
|
|
208
|
+
this.breadcrumbs.forEach(crumb => {
|
|
209
|
+
const button = this.breadcrumbsEl.querySelector(`[data-crumb-id="${escapeSelectorValue(crumb.id)}"]`);
|
|
210
|
+
if (button) {
|
|
211
|
+
button.textContent = crumb.label;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
rebuildActions() {
|
|
216
|
+
this.actionsEl.innerHTML = this.actions
|
|
217
|
+
.map(action => `
|
|
218
|
+
<button
|
|
219
|
+
type="button"
|
|
220
|
+
part="action"
|
|
221
|
+
data-action-id="${escapeHtml(action.id)}"
|
|
222
|
+
data-tone="${escapeHtml(action.tone ?? "neutral")}"
|
|
223
|
+
>
|
|
224
|
+
${escapeHtml(action.label)}
|
|
225
|
+
</button>
|
|
226
|
+
`)
|
|
227
|
+
.join("");
|
|
228
|
+
}
|
|
229
|
+
patchActionLabels() {
|
|
230
|
+
this.actions.forEach(action => {
|
|
231
|
+
const button = this.actionsEl.querySelector(`[data-action-id="${escapeSelectorValue(action.id)}"]`);
|
|
232
|
+
if (!button) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
button.textContent = action.label;
|
|
236
|
+
button.dataset.tone = action.tone ?? "neutral";
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
renderTemplate() {
|
|
240
|
+
if (!this.shadowRoot) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
this.shadowRoot.innerHTML = `
|
|
244
|
+
<style>${elementStyles}</style>
|
|
245
|
+
<section part="header">
|
|
246
|
+
<nav part="breadcrumbs" aria-label="Preview breadcrumbs" hidden></nav>
|
|
247
|
+
<div part="main">
|
|
248
|
+
<div part="title-row">
|
|
249
|
+
<h2 part="title"></h2>
|
|
250
|
+
<div part="status" hidden></div>
|
|
251
|
+
</div>
|
|
252
|
+
<div part="message" hidden></div>
|
|
253
|
+
</div>
|
|
254
|
+
<div part="actions" hidden></div>
|
|
255
|
+
</section>
|
|
256
|
+
`;
|
|
257
|
+
this.breadcrumbsEl = this.shadowRoot.querySelector('[part="breadcrumbs"]');
|
|
258
|
+
this.titleEl = this.shadowRoot.querySelector('[part="title"]');
|
|
259
|
+
this.statusEl = this.shadowRoot.querySelector('[part="status"]');
|
|
260
|
+
this.messageEl = this.shadowRoot.querySelector('[part="message"]');
|
|
261
|
+
this.actionsEl = this.shadowRoot.querySelector('[part="actions"]');
|
|
262
|
+
}
|
|
263
|
+
setupListeners() {
|
|
264
|
+
this.actionsEl.addEventListener("click", event => {
|
|
265
|
+
const button = event.target.closest('[part="action"]');
|
|
266
|
+
if (!button || !this.actionsEl.contains(button)) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const actionId = button.dataset.actionId ?? "";
|
|
270
|
+
if (actionId) {
|
|
271
|
+
this.emitAction(actionId);
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
this.breadcrumbsEl.addEventListener("click", event => {
|
|
275
|
+
const button = event.target.closest('[part="breadcrumb"]');
|
|
276
|
+
if (!button || !this.breadcrumbsEl.contains(button)) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const id = button.dataset.crumbId ?? "";
|
|
280
|
+
if (id) {
|
|
281
|
+
this.emitBreadcrumbSelected(id);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
update() {
|
|
286
|
+
if (!this.titleEl || !this.actionsEl) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
this.titleEl.textContent = this.heading;
|
|
290
|
+
this.statusEl.hidden = !this.status;
|
|
291
|
+
this.statusEl.textContent = this.status;
|
|
292
|
+
this.messageEl.hidden = !this.message;
|
|
293
|
+
this.messageEl.textContent = this.message;
|
|
294
|
+
const breadcrumbs = this.breadcrumbs;
|
|
295
|
+
this.breadcrumbsEl.hidden = breadcrumbs.length === 0;
|
|
296
|
+
const nextBreadcrumbs = this.breadcrumbsKey();
|
|
297
|
+
if (nextBreadcrumbs !== this.breadcrumbsSignature || this.breadcrumbsEl.childElementCount === 0) {
|
|
298
|
+
this.breadcrumbsSignature = nextBreadcrumbs;
|
|
299
|
+
this.rebuildBreadcrumbs();
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
this.patchBreadcrumbLabels();
|
|
303
|
+
}
|
|
304
|
+
const actions = this.actions;
|
|
305
|
+
this.actionsEl.hidden = actions.length === 0;
|
|
306
|
+
const nextActions = this.actionsKey();
|
|
307
|
+
if (nextActions !== this.actionsSignature || this.actionsEl.childElementCount === 0) {
|
|
308
|
+
this.actionsSignature = nextActions;
|
|
309
|
+
this.rebuildActions();
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
this.patchActionLabels();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
export const defineBoxPreviewHeaderElement = (tagName = DEFAULT_TAG_NAME) => {
|
|
317
|
+
const existingElement = customElements.get(tagName);
|
|
318
|
+
if (existingElement) {
|
|
319
|
+
return existingElement;
|
|
320
|
+
}
|
|
321
|
+
customElements.define(tagName, BoxPreviewHeaderElement);
|
|
322
|
+
return BoxPreviewHeaderElement;
|
|
323
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface MetadataFetchLike {
|
|
2
|
+
(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
3
|
+
}
|
|
4
|
+
export type MetadataFieldType = "string" | "enum" | "float" | "integer" | "date" | "bool" | "multiSelect";
|
|
5
|
+
export interface MetadataFieldDefinition {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
type: MetadataFieldType;
|
|
9
|
+
description?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
options?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface MetadataTemplateDefinition {
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
scope: string;
|
|
17
|
+
fields: MetadataFieldDefinition[];
|
|
18
|
+
}
|
|
19
|
+
export interface MetadataInstance {
|
|
20
|
+
id?: string;
|
|
21
|
+
scope: string;
|
|
22
|
+
templateKey: string;
|
|
23
|
+
values: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
export interface MetadataRequestContext {
|
|
26
|
+
locale?: string;
|
|
27
|
+
requestId?: string;
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
}
|
|
30
|
+
export interface MetadataQueryInput {
|
|
31
|
+
templateKey: string;
|
|
32
|
+
scope?: string;
|
|
33
|
+
filters: Record<string, unknown>;
|
|
34
|
+
limit?: number;
|
|
35
|
+
offset?: number;
|
|
36
|
+
context?: MetadataRequestContext;
|
|
37
|
+
}
|
|
38
|
+
export interface MetadataPage<TItem> {
|
|
39
|
+
entries: TItem[];
|
|
40
|
+
limit: number;
|
|
41
|
+
offset: number;
|
|
42
|
+
totalCount: number | null;
|
|
43
|
+
}
|
|
44
|
+
export interface MetadataDataSource<TItem = unknown> {
|
|
45
|
+
listTemplates(context?: MetadataRequestContext): Promise<MetadataTemplateDefinition[]>;
|
|
46
|
+
listInstances(input: {
|
|
47
|
+
itemId: string;
|
|
48
|
+
itemType: "file" | "folder";
|
|
49
|
+
context?: MetadataRequestContext;
|
|
50
|
+
}): Promise<MetadataInstance[]>;
|
|
51
|
+
updateInstance(input: {
|
|
52
|
+
itemId: string;
|
|
53
|
+
itemType: "file" | "folder";
|
|
54
|
+
instance: MetadataInstance;
|
|
55
|
+
context?: MetadataRequestContext;
|
|
56
|
+
}): Promise<MetadataInstance>;
|
|
57
|
+
query(input: MetadataQueryInput): Promise<MetadataPage<TItem>>;
|
|
58
|
+
}
|
|
59
|
+
export interface MetadataHttpDataSourceOptions<TItem = unknown> {
|
|
60
|
+
baseUrl?: string;
|
|
61
|
+
fetch?: MetadataFetchLike;
|
|
62
|
+
headers?: Record<string, string>;
|
|
63
|
+
buildListTemplatesUrl?: () => string;
|
|
64
|
+
buildListInstancesUrl?: (input: {
|
|
65
|
+
itemId: string;
|
|
66
|
+
itemType: "file" | "folder";
|
|
67
|
+
}) => string;
|
|
68
|
+
buildUpdateInstanceUrl?: (input: {
|
|
69
|
+
itemId: string;
|
|
70
|
+
itemType: "file" | "folder";
|
|
71
|
+
instance: MetadataInstance;
|
|
72
|
+
}) => string;
|
|
73
|
+
buildQueryUrl?: () => string;
|
|
74
|
+
}
|
|
75
|
+
export declare const createHttpMetadataDataSource: <TItem = unknown>(options?: MetadataHttpDataSourceOptions<TItem>) => MetadataDataSource<TItem>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const resolveFetch = (providedFetch) => {
|
|
2
|
+
if (providedFetch) {
|
|
3
|
+
return providedFetch;
|
|
4
|
+
}
|
|
5
|
+
if (typeof globalThis.fetch !== "function") {
|
|
6
|
+
throw new Error("A fetch implementation is required to use the metadata HTTP data source.");
|
|
7
|
+
}
|
|
8
|
+
return globalThis.fetch.bind(globalThis);
|
|
9
|
+
};
|
|
10
|
+
const getErrorMessage = async (response) => {
|
|
11
|
+
try {
|
|
12
|
+
const payload = (await response.json());
|
|
13
|
+
if (payload.message) {
|
|
14
|
+
return payload.code ? `${payload.code}: ${payload.message}` : payload.message;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// ignore parse issues and fall back to status text
|
|
19
|
+
}
|
|
20
|
+
return `Metadata request failed with status ${response.status}`;
|
|
21
|
+
};
|
|
22
|
+
export const createHttpMetadataDataSource = (options = {}) => {
|
|
23
|
+
const fetchImpl = resolveFetch(options.fetch);
|
|
24
|
+
const baseUrl = (options.baseUrl ?? "/api/metadata").replace(/\/$/, "");
|
|
25
|
+
const withContextHeaders = (context) => ({
|
|
26
|
+
accept: "application/json",
|
|
27
|
+
...(context?.locale ? { "accept-language": context.locale } : {}),
|
|
28
|
+
...(context?.requestId ? { "x-request-id": context.requestId } : {}),
|
|
29
|
+
...options.headers,
|
|
30
|
+
});
|
|
31
|
+
const readJson = async (response) => {
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
throw new Error(await getErrorMessage(response));
|
|
34
|
+
}
|
|
35
|
+
return (await response.json());
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
async listTemplates(context) {
|
|
39
|
+
const url = options.buildListTemplatesUrl?.() ?? `${baseUrl}/templates`;
|
|
40
|
+
const response = await fetchImpl(url, {
|
|
41
|
+
method: "GET",
|
|
42
|
+
headers: withContextHeaders(context),
|
|
43
|
+
signal: context?.signal,
|
|
44
|
+
});
|
|
45
|
+
return readJson(response);
|
|
46
|
+
},
|
|
47
|
+
async listInstances(input) {
|
|
48
|
+
const url = options.buildListInstancesUrl?.(input) ??
|
|
49
|
+
`${baseUrl}/items/${encodeURIComponent(input.itemType)}/${encodeURIComponent(input.itemId)}/instances`;
|
|
50
|
+
const response = await fetchImpl(url, {
|
|
51
|
+
method: "GET",
|
|
52
|
+
headers: withContextHeaders(input.context),
|
|
53
|
+
signal: input.context?.signal,
|
|
54
|
+
});
|
|
55
|
+
return readJson(response);
|
|
56
|
+
},
|
|
57
|
+
async updateInstance(input) {
|
|
58
|
+
const url = options.buildUpdateInstanceUrl?.(input) ??
|
|
59
|
+
`${baseUrl}/items/${encodeURIComponent(input.itemType)}/${encodeURIComponent(input.itemId)}/instances/${encodeURIComponent(input.instance.templateKey)}`;
|
|
60
|
+
const response = await fetchImpl(url, {
|
|
61
|
+
method: "PUT",
|
|
62
|
+
headers: {
|
|
63
|
+
...withContextHeaders(input.context),
|
|
64
|
+
"content-type": "application/json",
|
|
65
|
+
},
|
|
66
|
+
body: JSON.stringify(input.instance),
|
|
67
|
+
signal: input.context?.signal,
|
|
68
|
+
});
|
|
69
|
+
return readJson(response);
|
|
70
|
+
},
|
|
71
|
+
async query(input) {
|
|
72
|
+
const url = options.buildQueryUrl?.() ?? `${baseUrl}/query`;
|
|
73
|
+
const response = await fetchImpl(url, {
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: {
|
|
76
|
+
...withContextHeaders(input.context),
|
|
77
|
+
"content-type": "application/json",
|
|
78
|
+
},
|
|
79
|
+
body: JSON.stringify({
|
|
80
|
+
templateKey: input.templateKey,
|
|
81
|
+
scope: input.scope,
|
|
82
|
+
filters: input.filters,
|
|
83
|
+
limit: input.limit,
|
|
84
|
+
offset: input.offset,
|
|
85
|
+
}),
|
|
86
|
+
signal: input.context?.signal,
|
|
87
|
+
});
|
|
88
|
+
return readJson(response);
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BaseElement } from "../../core/index.js";
|
|
2
|
+
type MetadataFilterField = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
type MetadataFilterRule = {
|
|
7
|
+
field: string;
|
|
8
|
+
operator: string;
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
11
|
+
export declare class BoxMetadataFilterBuilderElement extends BaseElement {
|
|
12
|
+
static get observedAttributes(): string[];
|
|
13
|
+
private rulesInternal;
|
|
14
|
+
private syncingFromUi;
|
|
15
|
+
private labelEl;
|
|
16
|
+
private rulesEl;
|
|
17
|
+
private structureSignature;
|
|
18
|
+
get fields(): MetadataFilterField[];
|
|
19
|
+
set fields(value: MetadataFilterField[]);
|
|
20
|
+
get label(): string;
|
|
21
|
+
set label(value: string);
|
|
22
|
+
get rules(): MetadataFilterRule[];
|
|
23
|
+
set rules(value: MetadataFilterRule[]);
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
26
|
+
private parseJsonAttribute;
|
|
27
|
+
private syncRulesFromAttributes;
|
|
28
|
+
private emitValueChanged;
|
|
29
|
+
private writeRulesAttribute;
|
|
30
|
+
private updateRule;
|
|
31
|
+
private addRule;
|
|
32
|
+
private removeRule;
|
|
33
|
+
private renderFieldOptions;
|
|
34
|
+
private renderOperatorOptions;
|
|
35
|
+
private renderRulesMarkup;
|
|
36
|
+
private structureKey;
|
|
37
|
+
private patchRuleControls;
|
|
38
|
+
protected renderTemplate(): void;
|
|
39
|
+
protected setupListeners(): void;
|
|
40
|
+
protected update(): void;
|
|
41
|
+
}
|
|
42
|
+
export declare const defineBoxMetadataFilterBuilderElement: (tagName?: string) => typeof BoxMetadataFilterBuilderElement;
|
|
43
|
+
export {};
|