@orangelogic/design-system 4.2.0 → 4.3.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/library/chunks/{_baseXor.DixEm6JQ.js → _baseXor.BCxbgizO.js} +2 -2
- package/library/chunks/{asset-link-format.CVwjA_yf.js → asset-link-format.C5Ue4EGP.js} +37 -36
- package/library/chunks/{button.D1YIxtv-.js → button.DbAUlIXG.js} +3 -3
- package/library/chunks/button.styles.D3GdfF7I.js +5 -0
- package/library/chunks/{color-swatch-group.BPXiMxjh.js → color-swatch-group.B10yWbVM.js} +3279 -2903
- package/library/chunks/color.CIHdfM_a.js +187 -0
- package/library/chunks/{confirm-popover.CJXyEa5A.js → confirm-popover.Cd4HM5-B.js} +4 -4
- package/library/chunks/content-builder.CBBdfVOl.js +55 -0
- package/library/chunks/{dialog.BbQ4Du0M.js → dialog.CXphbq8N.js} +2 -2
- package/library/chunks/{document-viewer.DtBW-p7z.js → document-viewer.B_ESlazf.js} +10 -9
- package/library/chunks/{dom.DL-cNKsj.js → dom.D0lSUoEI.js} +1 -1
- package/library/chunks/{dot-pagination.CJRAtM51.js → dot-pagination.CzT-MZmt.js} +1 -1
- package/library/chunks/{folder-select.BAPsI-gg.js → folder-select.BWeanVkA.js} +5 -5
- package/library/chunks/form-control.styles.CHC7Q08Q.js +5 -0
- package/library/chunks/{form.DN2v7-DH.js → form.LpappO1d.js} +1 -1
- package/library/chunks/{header.BioJzPlg.js → header.Dy57RuQW.js} +132 -90
- package/library/chunks/{i18n.rtxrs1c1.js → i18n.Q5_2aVLU.js} +93 -12
- package/library/chunks/{icon-button.CbUddcgI.js → icon-button.BjAbCuH8.js} +1 -1
- package/library/chunks/{iframe.y7iCAVZP.js → iframe.CdktjPCB.js} +1 -1
- package/library/chunks/{image.A2hE1WoV.js → image.CCo__54F.js} +322 -222
- package/library/chunks/index.DiZGZkHv.js +1126 -0
- package/library/chunks/{input.D1FFprPl.js → input.ftEf4GS6.js} +3 -3
- package/library/chunks/{markdown.Dd_GFJK8.js → markdown.RljldBNb.js} +3 -3
- package/library/chunks/{menu-item.CbqZ66to.js → menu-item.BNs1Ji48.js} +1 -1
- package/library/chunks/{option.CkhHTlpl.js → option.C8IEnv5Q.js} +1 -1
- package/library/chunks/{pagination.BlQRt932.js → pagination.Bke9vgl4.js} +6 -6
- package/library/chunks/{position-picker.DjnhxIKF.js → position-picker.qkbJlboF.js} +12 -0
- package/library/chunks/responsive.BmBJSzC4.js +17 -0
- package/library/chunks/{string.Demn8Xmk.js → string.CfI2ejyR.js} +3 -3
- package/library/chunks/{tab-group.CQfcMVEw.js → tab-group.DZ32f41G.js} +312 -310
- package/library/chunks/toast.D3AW3RWv.js +94 -0
- package/library/chunks/transformation.Dm-pK2ft.js +352 -0
- package/library/chunks/{tree.B7IKBX3n.js → tree.Umn7TAkc.js} +1 -1
- package/library/chunks/{types.MwUT4xFk.js → types.BW36Gr9c.js} +77051 -54471
- package/library/chunks/typography.BLYdTF0n.js +102 -0
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +6 -6
- package/library/components/atoms.js +161 -159
- package/library/components/audio.js +3 -3
- package/library/components/bicolor-picker.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/box.d.ts +3 -0
- package/library/components/box.js +22 -0
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +4 -4
- package/library/components/card.js +7 -7
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +36 -32
- package/library/components/color-swatch-group.js +8 -7
- package/library/components/color-swatch.js +246 -22
- package/library/components/confirm-popover.js +5 -5
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +19 -19
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +95 -92
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +12 -12
- package/library/components/folder-select.js +5 -5
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +6 -3
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +4 -3
- package/library/components/input-group.js +1 -1
- package/library/components/input.js +4 -4
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +4 -4
- package/library/components/masonry.js +70 -56
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +4 -4
- package/library/components/mutation-observer.js +25 -23
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +7 -7
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +2 -2
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +2 -2
- package/library/components/range.js +3 -3
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +5 -5
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +6 -6
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +16 -16
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +3 -3
- package/library/components/types.js +496 -487
- package/library/components/typography.js +3 -2
- package/library/components/video.js +4231 -4210
- package/library/css/ol-base.css +1 -0
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/box/box.d.ts +26 -0
- package/library/packages/atoms/src/components/box/box.styles.d.ts +7 -0
- package/library/packages/atoms/src/components/button/button.d.ts +4 -0
- package/library/packages/atoms/src/components/card/card.d.ts +1 -0
- package/library/packages/atoms/src/components/color-picker/color-picker.d.ts +11 -0
- package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +1 -0
- package/library/packages/atoms/src/components/details/details.d.ts +6 -1
- package/library/packages/atoms/src/components/header/header.d.ts +38 -2
- package/library/packages/atoms/src/components/image/image.d.ts +14 -0
- package/library/packages/atoms/src/components/mutation-observer/mutation-observer.d.ts +1 -1
- package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -0
- package/library/packages/atoms/src/components/tab/tab.d.ts +17 -0
- package/library/packages/atoms/src/components/typography/typography.d.ts +31 -0
- package/library/packages/atoms/src/components/video/video.d.ts +18 -0
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-color-swatch-picker-columns-change.d.ts +15 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +10 -1
- package/library/packages/molecules/src/color-swatch/color-swatch.d.ts +35 -1
- package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +30 -1
- package/library/packages/molecules/src/details-group/details-group.d.ts +105 -3
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
- package/library/packages/molecules/src/font-picker/font-picker.d.ts +3 -0
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
- package/library/packages/molecules/src/index.d.ts +0 -1
- package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +37 -45
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +210 -10
- package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +85 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +22 -6
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +24 -8
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +70 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -22
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/button.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +11 -1
- package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +19 -1
- package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs/column.d.ts +13 -3
- package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit-advanced.d.ts +19 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +15 -1
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +5 -1
- package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +155 -13
- package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +60 -0
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +27 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +122 -2
- package/library/packages/organisms/src/content-builder/content-builder.sections.utils.d.ts +78 -0
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +33 -2
- package/library/packages/organisms/src/content-builder/plugins/font-kit-advanced.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/plugins/header.d.ts +7 -1
- package/library/packages/organisms/src/content-builder/plugins/index.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +21 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/extensions/index.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/rte-configs.d.ts +14 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-fragment-component.d.ts +22 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-host-mounting.d.ts +15 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-canvas-patches.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-plugin.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/plugins/toolbar.d.ts +10 -1
- package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +9 -5
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +1 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +170 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.styles.d.ts +9 -0
- package/library/packages/organisms/src/list-editor/list-editor.d.ts +181 -6
- package/library/packages/tools/src/tiptap/extensions/metafield/index.d.ts +12 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
- package/library/packages/types/src/asset-link-format.d.ts +0 -1
- package/library/packages/types/src/button.d.ts +1 -1
- package/library/packages/types/src/color-swatch-group.d.ts +56 -0
- package/library/packages/types/src/color-swatch.d.ts +22 -0
- package/library/packages/types/src/column.d.ts +13 -0
- package/library/packages/types/src/content-builder.d.ts +69 -4
- package/library/packages/types/src/details-group.d.ts +80 -0
- package/library/packages/types/src/font-kit-advanced.d.ts +28 -0
- package/library/packages/types/src/font-kit.d.ts +19 -0
- package/library/packages/types/src/font-picker.d.ts +2 -0
- package/library/packages/types/src/gallery-item.d.ts +3 -1
- package/library/packages/types/src/gallery.d.ts +2 -1
- package/library/packages/types/src/index.d.ts +1 -0
- package/library/packages/types/src/masonry.d.ts +1 -0
- package/library/packages/types/src/position-picker.d.ts +6 -0
- package/library/packages/types/src/sb-button.d.ts +7 -0
- package/library/packages/types/src/search-box.d.ts +4 -0
- package/library/packages/utils/src/color/color.d.ts +27 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +85 -0
- package/library/packages/utils/src/font/font.d.ts +12 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +11 -3
- package/library/react-web-component.d.ts +510 -156
- package/library/utils.js +415 -395
- package/package.json +1 -1
- package/library/chunks/button.styles.BWgHrfLD.js +0 -5
- package/library/chunks/color-swatch.DdsUysbF.js +0 -223
- package/library/chunks/color.LzSGBy7o.js +0 -164
- package/library/chunks/form-control.styles.CaGWmeAS.js +0 -5
- package/library/chunks/index.BO_sT6SH.js +0 -20123
- package/library/chunks/toast.BOkYwUIj.js +0 -109
- package/library/chunks/transformation.B8m0Nbao.js +0 -384
- package/library/chunks/typography.T72DuoCa.js +0 -52
- package/library/packages/molecules/src/search-box/search-box.d.ts +0 -114
- package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -15
- /package/library/packages/{molecules/src/search-box/search-box.styles.d.ts → organisms/src/content-builder-viewer/content-builder-viewer.styles.d.ts} +0 -0
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { D as f } from "./transformation.B8m0Nbao.js";
|
|
2
|
-
function h(n, e) {
|
|
3
|
-
return n.filter((r, t) => t !== e);
|
|
4
|
-
}
|
|
5
|
-
function y(n, e) {
|
|
6
|
-
return n.filter((r, t) => !e.includes(t));
|
|
7
|
-
}
|
|
8
|
-
function A(n, e, r) {
|
|
9
|
-
return [...n.slice(0, e), r, ...n.slice(e)];
|
|
10
|
-
}
|
|
11
|
-
function b(n, e, r) {
|
|
12
|
-
return [...n.slice(0, e), ...r, ...n.slice(e)];
|
|
13
|
-
}
|
|
14
|
-
function v(n, e, r) {
|
|
15
|
-
return n.findIndex((t) => t[e] === r);
|
|
16
|
-
}
|
|
17
|
-
function T(n, e, r) {
|
|
18
|
-
const t = [...n], s = h(t, e);
|
|
19
|
-
let o = r;
|
|
20
|
-
return o >= n.length - 1 && (o = o + 1), A(s, o, n[e]);
|
|
21
|
-
}
|
|
22
|
-
function F(n, e, r) {
|
|
23
|
-
const t = [...n], s = y(t, e), o = r !== 0 ? e.reduce(
|
|
24
|
-
(i, a) => r > a ? i - 1 : i,
|
|
25
|
-
r
|
|
26
|
-
) : r;
|
|
27
|
-
return b(
|
|
28
|
-
s,
|
|
29
|
-
o,
|
|
30
|
-
e.map((i) => n[i])
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function M(n, e) {
|
|
34
|
-
return n.reduce(
|
|
35
|
-
(r, t) => {
|
|
36
|
-
const s = t[e];
|
|
37
|
-
return r[s] ??= [], r[s].push(t), r;
|
|
38
|
-
},
|
|
39
|
-
{}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
function S(n, e, r) {
|
|
43
|
-
if (!n.length)
|
|
44
|
-
return [e];
|
|
45
|
-
const t = r.findIndex(
|
|
46
|
-
(u) => u.id === e
|
|
47
|
-
), s = n[n.length - 1], o = r.findIndex(
|
|
48
|
-
(u) => u.id === s
|
|
49
|
-
);
|
|
50
|
-
if (t < 0 || o < 0)
|
|
51
|
-
return [e];
|
|
52
|
-
const c = r.reduce(
|
|
53
|
-
(u, l, x) => (u[l.id] = x, u),
|
|
54
|
-
{}
|
|
55
|
-
), i = t > o, a = i ? o : t, w = i ? t : o, d = r.slice(a, w + 1).filter((u) => !(!u || n.includes(u.id))).map((u) => u.id), g = i ? d : [...d].reverse(), p = n.includes(e) ? n.slice(0, n.indexOf(e) + 1) : [...n, ...g];
|
|
56
|
-
return p.sort((u, l) => c[u] - c[l]), p;
|
|
57
|
-
}
|
|
58
|
-
function D(n, e, r, t, s, o) {
|
|
59
|
-
const c = r + 1;
|
|
60
|
-
if (n.length < 2)
|
|
61
|
-
throw new Error("Values array must contain at least 2 elements");
|
|
62
|
-
if (r < 0 || c >= n.length)
|
|
63
|
-
throw new Error("Invalid index or not enough values to adjust");
|
|
64
|
-
if (t < 0)
|
|
65
|
-
throw new Error("Minimum value must be non-negative");
|
|
66
|
-
let i = s + e;
|
|
67
|
-
i < t && (e = t - s, i = t);
|
|
68
|
-
let a = o - e;
|
|
69
|
-
a < t && (e = o - t, i = s + e, a = t), n[r] = parseFloat(i.toFixed(2)), n[c] = parseFloat(a.toFixed(2));
|
|
70
|
-
}
|
|
71
|
-
function V(n, e = [350, 696, 1024]) {
|
|
72
|
-
const r = getComputedStyle(n), t = [
|
|
73
|
-
Number.parseFloat(r.getPropertyValue("--breakpoint-mobile").trim()),
|
|
74
|
-
Number.parseFloat(r.getPropertyValue("--breakpoint-tablet").trim()),
|
|
75
|
-
1 / 0
|
|
76
|
-
];
|
|
77
|
-
return Number.isNaN(t[0]) ? t[0] = e[0] : t[0]++, Number.isNaN(t[1]) ? t[1] = e[1] : t[1]++, t;
|
|
78
|
-
}
|
|
79
|
-
function j(n) {
|
|
80
|
-
const e = window.innerWidth;
|
|
81
|
-
return e > n[1] ? f.Desktop : e > n[0] && e <= n[1] ? f.Tablet : f.Mobile;
|
|
82
|
-
}
|
|
83
|
-
const m = (n, e) => {
|
|
84
|
-
try {
|
|
85
|
-
window.Matrix3?.ShowNotification && window.Matrix3.ShowNotification(
|
|
86
|
-
n,
|
|
87
|
-
e ? {
|
|
88
|
-
notificationType: e.notificationType
|
|
89
|
-
} : void 0
|
|
90
|
-
);
|
|
91
|
-
} catch {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
export {
|
|
96
|
-
F as a,
|
|
97
|
-
V as b,
|
|
98
|
-
j as c,
|
|
99
|
-
h as d,
|
|
100
|
-
A as e,
|
|
101
|
-
v as f,
|
|
102
|
-
M as g,
|
|
103
|
-
T as h,
|
|
104
|
-
b as i,
|
|
105
|
-
D as j,
|
|
106
|
-
S as m,
|
|
107
|
-
y as r,
|
|
108
|
-
m as t
|
|
109
|
-
};
|
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { c as k } from "./capitalize.CIBKBL10.js";
|
|
2
|
-
import { C as $, T as R, U as M } from "./asset-link-format.ClaYu_v8.js";
|
|
3
|
-
import { P as v } from "./position-picker.DjnhxIKF.js";
|
|
4
|
-
const y = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
|
|
5
|
-
function ae(e, i, n, u = y) {
|
|
6
|
-
const c = new URL(u + "/" + e);
|
|
7
|
-
return Array.isArray(n) ? n.forEach((a) => {
|
|
8
|
-
a[1] && c.searchParams.append(a[0], a[1]);
|
|
9
|
-
}) : n && Object.keys(n).forEach((a) => {
|
|
10
|
-
n[a] && c.searchParams.append(a, n[a]);
|
|
11
|
-
}), fetch(c, i);
|
|
12
|
-
}
|
|
13
|
-
const oe = "space-default";
|
|
14
|
-
var L = /* @__PURE__ */ ((e) => (e.Desktop = "desktop", e.Mobile = "mobile", e.Tablet = "tablet", e))(L || {});
|
|
15
|
-
const w = {
|
|
16
|
-
canvasWidth: "",
|
|
17
|
-
height: "",
|
|
18
|
-
id: "desktop",
|
|
19
|
-
maxWidth: "",
|
|
20
|
-
name: k(
|
|
21
|
-
"desktop"
|
|
22
|
-
/* Desktop */
|
|
23
|
-
)
|
|
24
|
-
}, F = {
|
|
25
|
-
canvasWidth: "770px",
|
|
26
|
-
height: "",
|
|
27
|
-
id: "tablet",
|
|
28
|
-
maxWidth: "1280px",
|
|
29
|
-
name: k(
|
|
30
|
-
"tablet"
|
|
31
|
-
/* Tablet */
|
|
32
|
-
)
|
|
33
|
-
}, W = {
|
|
34
|
-
canvasWidth: "320px",
|
|
35
|
-
height: "",
|
|
36
|
-
id: "mobile",
|
|
37
|
-
maxWidth: "480px",
|
|
38
|
-
name: k(
|
|
39
|
-
"mobile"
|
|
40
|
-
/* Mobile */
|
|
41
|
-
)
|
|
42
|
-
}, re = [w, F, W];
|
|
43
|
-
var B = /* @__PURE__ */ ((e) => (e.All = "ALL", e.CanDelete = "CanDelete", e.CanDownload = "CanDownload", e.CanFind = "CanFind", e.CanManageRights = "CanManageRights", e.CanMove = "CanMove", e.CanRead = "CanRead", e.CanReadAll = "CanReadAll", e.CanReadAndWrite = "CanReadAndWrite", e.CanReadLarge = "CanReadLarge", e.CanReadMedium = "CanReadMedium", e.CanReadOriginal = "CanReadOriginal", e.CanShare = "CanShare", e.CanUpload = "CanUpload", e.CanWrite = "CanWrite", e.None = "NONE", e))(B || {}), D = /* @__PURE__ */ ((e) => (e.All = "all", e.Audio = "audio", e.Image = "image", e.Other = "other", e.Video = "video", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.Content = "content", e.Template = "template", e))(U || {}), G = /* @__PURE__ */ ((e) => (e.Administrator = "Administrator", e.Designer = "Designer", e.Editor = "Editor", e))(G || {}), O = /* @__PURE__ */ ((e) => (e.Accordion = "BlockAccordion", e.Analytics = "BlockAnalytics", e.Audio = "BlockAudio", e.Button = "BlockButton", e.Carousel = "BlockCarousel", e.ColorSwatches = "BlockColorSwatches", e.Column = "BlockCell", e.ColumnGroup = "BlockColumns", e.DamView = "BlockDamView", e.Divider = "BlockDivider", e.DocumentViewer = "BlockDocumentViewer", e.FontKit = "BlockFontKit", e.Gallery = "BlockGallery", e.Header = "BlockHeader", e.Image = "BlockImage", e.RichText = "BlockRichText", e.SearchBox = "BlockSearchBox", e.TabGroup = "BlockTabs", e.Text = "BlockText", e.Timeline = "BlockTimeline", e.Video = "BlockVideo", e))(O || {});
|
|
44
|
-
const se = Object.values(O).filter(
|
|
45
|
-
(e) => e !== "BlockCell"
|
|
46
|
-
/* Column */
|
|
47
|
-
);
|
|
48
|
-
var K = /* @__PURE__ */ ((e) => (e.Carousel = "carousel", e.Gallery = "gallery", e))(K || {}), j = /* @__PURE__ */ ((e) => (e.Templates = "TEMPLATES", e.TranslatableAttributes = "TRANSLATABLE_ATTRIBUTES", e.TranslatableTexts = "TRANSLATABLE_TEXTS", e))(j || {});
|
|
49
|
-
const _ = "/AssetLink/", V = {
|
|
50
|
-
[v.BottomCenter]: $.South,
|
|
51
|
-
[v.BottomLeft]: $.Southwest,
|
|
52
|
-
[v.BottomRight]: $.Southeast,
|
|
53
|
-
[v.CenterCenter]: $.Center,
|
|
54
|
-
[v.CenterLeft]: $.West,
|
|
55
|
-
[v.CenterRight]: $.East,
|
|
56
|
-
[v.TopCenter]: $.North,
|
|
57
|
-
[v.TopLeft]: $.Northwest,
|
|
58
|
-
[v.TopRight]: $.Northeast
|
|
59
|
-
}, g = "/t/", X = [400, 800, 1200, 1600, 2400], z = 0.15;
|
|
60
|
-
function H({
|
|
61
|
-
asset: e,
|
|
62
|
-
baseUrl: i,
|
|
63
|
-
extension: n,
|
|
64
|
-
options: u,
|
|
65
|
-
parameters: c,
|
|
66
|
-
transformations: a,
|
|
67
|
-
useSession: f = ""
|
|
68
|
-
}) {
|
|
69
|
-
if (i == null)
|
|
70
|
-
return "";
|
|
71
|
-
let r = i;
|
|
72
|
-
const h = a?.findLast(
|
|
73
|
-
(l) => l.key === R.Quality
|
|
74
|
-
);
|
|
75
|
-
if (h && (a = [
|
|
76
|
-
...a?.filter(
|
|
77
|
-
(l) => l.key !== R.Quality
|
|
78
|
-
) || [],
|
|
79
|
-
h
|
|
80
|
-
]), a) {
|
|
81
|
-
const l = [];
|
|
82
|
-
for (let t = 0; t < a.length; t++) {
|
|
83
|
-
const d = a[t];
|
|
84
|
-
if (d.key === R.Rotate) {
|
|
85
|
-
let o = d.value.rotation ?? 0;
|
|
86
|
-
for (; a[t + 1]?.key === R.Rotate; )
|
|
87
|
-
t++, o += a[t].value.rotation ?? 0;
|
|
88
|
-
o !== 0 && l.push({ key: R.Rotate, value: { rotation: o } });
|
|
89
|
-
} else
|
|
90
|
-
l.push(d);
|
|
91
|
-
}
|
|
92
|
-
a = l;
|
|
93
|
-
}
|
|
94
|
-
a && a.length > 0 && (r += "/t/"), a?.forEach(({ key: l, value: t }) => {
|
|
95
|
-
if (l === R.Resize) {
|
|
96
|
-
if (t.unit === M.AspectRatio && t.ratioWidth && t.ratioHeight) {
|
|
97
|
-
r += `re_ar_${t.ratioWidth}:${t.ratioHeight}/`;
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
const d = [
|
|
101
|
-
...[
|
|
102
|
-
{
|
|
103
|
-
key: "re_w_",
|
|
104
|
-
value: Math.round(t.width ?? 0)
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
key: "re_h_",
|
|
108
|
-
value: Math.round(t.height ?? 0)
|
|
109
|
-
}
|
|
110
|
-
].filter((o) => o.value !== void 0).map((o) => ({
|
|
111
|
-
key: o.key,
|
|
112
|
-
value: Math.round(Number(o.value))
|
|
113
|
-
})),
|
|
114
|
-
{
|
|
115
|
-
key: "re_rm_",
|
|
116
|
-
value: "stretch"
|
|
117
|
-
}
|
|
118
|
-
];
|
|
119
|
-
d.forEach(({ key: o, value: m }, A) => {
|
|
120
|
-
r += `${o}${m}${A < d.length - 1 ? "," : ""}`;
|
|
121
|
-
}), r += "/";
|
|
122
|
-
}
|
|
123
|
-
if (l === R.Crop) {
|
|
124
|
-
const d = t.unit === M.AspectRatio && !!t.ratioWidth && !!t.ratioHeight, o = !t.disabledSize && !d, m = o && (t.x !== void 0 || t.y !== void 0), A = [
|
|
125
|
-
...[
|
|
126
|
-
{
|
|
127
|
-
key: "c_",
|
|
128
|
-
value: t.mode
|
|
129
|
-
},
|
|
130
|
-
...d ? [
|
|
131
|
-
{
|
|
132
|
-
key: "ar_",
|
|
133
|
-
value: `${t.ratioWidth}:${t.ratioHeight}`
|
|
134
|
-
}
|
|
135
|
-
] : [],
|
|
136
|
-
...o ? [
|
|
137
|
-
{
|
|
138
|
-
key: "c_w_",
|
|
139
|
-
value: Math.round(t.width ?? 0)
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
key: "c_h_",
|
|
143
|
-
value: Math.round(t.height ?? 0)
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
key: "c_x_",
|
|
147
|
-
value: Math.round(t.x ?? 0) === 0 && u?.omitZeroXY ? void 0 : Math.round(t.x ?? 0)
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
key: "c_y_",
|
|
151
|
-
value: Math.round(t.y ?? 0) === 0 && u?.omitZeroXY ? void 0 : Math.round(t.y ?? 0)
|
|
152
|
-
}
|
|
153
|
-
] : [],
|
|
154
|
-
...!m && t.focusMode && t.focusMode !== "manual" ? [
|
|
155
|
-
{
|
|
156
|
-
key: t.isFocusModeAuto ? "acm_" : "c_g_",
|
|
157
|
-
value: t.focusMode
|
|
158
|
-
}
|
|
159
|
-
] : [],
|
|
160
|
-
...!m && t.focusMode === "manual" && t.position ? [
|
|
161
|
-
{
|
|
162
|
-
key: "c_g_",
|
|
163
|
-
value: V[t.position]
|
|
164
|
-
}
|
|
165
|
-
] : []
|
|
166
|
-
].filter((C) => C.value !== void 0 && C.value !== null).map((C) => ({
|
|
167
|
-
key: C.key,
|
|
168
|
-
value: C.value
|
|
169
|
-
})),
|
|
170
|
-
...d ? [] : [
|
|
171
|
-
{
|
|
172
|
-
key: "c_whu_",
|
|
173
|
-
value: "pixel"
|
|
174
|
-
}
|
|
175
|
-
]
|
|
176
|
-
];
|
|
177
|
-
A.forEach(({ key: C, value: b }, x) => {
|
|
178
|
-
const p = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(C);
|
|
179
|
-
r += `${C}${p ? Math.round(Number(b)) : b}${x < A.length - 1 ? "," : ""}`;
|
|
180
|
-
}), r += "/";
|
|
181
|
-
}
|
|
182
|
-
if (l === R.Rotate && ([
|
|
183
|
-
{
|
|
184
|
-
key: "r_a_",
|
|
185
|
-
value: t.rotation
|
|
186
|
-
}
|
|
187
|
-
].filter((o) => o.value !== void 0).map((o) => ({
|
|
188
|
-
key: o.key,
|
|
189
|
-
value: Math.round(Number(o.value))
|
|
190
|
-
})).forEach(({ key: o, value: m }) => {
|
|
191
|
-
r += `${o}${m}`;
|
|
192
|
-
}), r += "/"), l === R.Quality) {
|
|
193
|
-
const d = [
|
|
194
|
-
{
|
|
195
|
-
key: "q_level_",
|
|
196
|
-
value: t.quality
|
|
197
|
-
}
|
|
198
|
-
].filter((o) => o.value !== void 0).map((o) => ({
|
|
199
|
-
key: o.key,
|
|
200
|
-
value: Math.round(Number(o.value))
|
|
201
|
-
}));
|
|
202
|
-
d.forEach(({ key: o, value: m }, A) => {
|
|
203
|
-
r += `${o}${m}${A < d.length - 1 ? "," : ""}`;
|
|
204
|
-
}), r += "/";
|
|
205
|
-
}
|
|
206
|
-
if (l === R.Metadata) {
|
|
207
|
-
const d = [
|
|
208
|
-
{
|
|
209
|
-
key: "fl_keep_metadata",
|
|
210
|
-
value: t.keepMetadata
|
|
211
|
-
}
|
|
212
|
-
].filter((o) => o.value !== void 0).map((o) => ({ key: o.key, value: o.value }));
|
|
213
|
-
d.forEach(({ key: o }, m) => {
|
|
214
|
-
r += `${o}${m < d.length - 1 ? "," : ""}`;
|
|
215
|
-
}), r += "/";
|
|
216
|
-
}
|
|
217
|
-
}), n && (r += `${e?.identifier ?? crypto.randomUUID()}${n}`);
|
|
218
|
-
const s = [];
|
|
219
|
-
return c && c.length > 0 && c.forEach(({ key: l, value: t }) => {
|
|
220
|
-
s.push(
|
|
221
|
-
`${encodeURIComponent(l.trim())}=${encodeURIComponent(t.trim())}`
|
|
222
|
-
);
|
|
223
|
-
}), i && f && s.push(`UseSession=${encodeURIComponent(f)}`), s.length > 0 && (r += `?${s.join("&")}`), r.endsWith("/") && (r = r.slice(0, -1)), r;
|
|
224
|
-
}
|
|
225
|
-
const E = ".auto";
|
|
226
|
-
function ce(e, i, n = {}) {
|
|
227
|
-
const u = n.format === T && S(n.extension), c = !!n.autoFormat && !u;
|
|
228
|
-
if (!e || !i?.length && !c)
|
|
229
|
-
return e;
|
|
230
|
-
const a = i?.length ? H({ baseUrl: "", transformations: i }).replace(/\/t\//g, "") : "";
|
|
231
|
-
if (!a && !c)
|
|
232
|
-
return e;
|
|
233
|
-
const f = e.indexOf(_);
|
|
234
|
-
if (f < 0)
|
|
235
|
-
return a ? `${e}${g}${a}` : e;
|
|
236
|
-
const r = e.slice(0, f + _.length), h = e.slice(f + _.length);
|
|
237
|
-
if (!h)
|
|
238
|
-
return e;
|
|
239
|
-
const s = h.indexOf(g), l = s >= 0, t = h.indexOf("/"), d = l ? s : t, o = d >= 0 ? h.slice(0, d) : h, m = l ? h.slice(s + g.length) : t >= 0 ? h.slice(t + 1) : "", A = m.slice(m.lastIndexOf("/") + 1), C = A ? `${A.replace(/\.[^.]+$/, "")}${E}` : `${o.replace(/\.[^.]+$/, "")}${E}`, x = [a, c ? C : l ? "" : A].filter(
|
|
240
|
-
Boolean
|
|
241
|
-
);
|
|
242
|
-
return x.length === 0 ? e : `${r}${o}${g}${x.join("/")}`;
|
|
243
|
-
}
|
|
244
|
-
function Y(e) {
|
|
245
|
-
return `re_w_${Math.round(e)}`;
|
|
246
|
-
}
|
|
247
|
-
function q(e, i) {
|
|
248
|
-
if (!e || !Number.isFinite(i) || i <= 0)
|
|
249
|
-
return e;
|
|
250
|
-
const n = e.indexOf(_);
|
|
251
|
-
if (n < 0)
|
|
252
|
-
return e;
|
|
253
|
-
const u = Y(i), c = e.slice(0, n + _.length), a = e.slice(n + _.length), f = a.indexOf(g);
|
|
254
|
-
if (f >= 0) {
|
|
255
|
-
const h = a.slice(0, f), s = a.slice(
|
|
256
|
-
f + g.length
|
|
257
|
-
);
|
|
258
|
-
return `${c}${h}${g}${u}/${s}`;
|
|
259
|
-
}
|
|
260
|
-
const r = a.indexOf("/");
|
|
261
|
-
if (r >= 0) {
|
|
262
|
-
const h = a.slice(0, r), s = a.slice(r);
|
|
263
|
-
return `${c}${h}${g}${u}${s}`;
|
|
264
|
-
}
|
|
265
|
-
return `${c}${a}${g}${u}`;
|
|
266
|
-
}
|
|
267
|
-
function le(e) {
|
|
268
|
-
const i = e.indexOf(_);
|
|
269
|
-
return i < 0 ? !1 : e.slice(i + _.length).includes(g);
|
|
270
|
-
}
|
|
271
|
-
function Q(e) {
|
|
272
|
-
const i = e.indexOf(_);
|
|
273
|
-
if (i < 0)
|
|
274
|
-
return !1;
|
|
275
|
-
const n = e.slice(i + _.length), u = n.indexOf(g);
|
|
276
|
-
return u < 0 ? !1 : n.slice(u + g.length).includes("/");
|
|
277
|
-
}
|
|
278
|
-
const T = "TRX", N = "TR1", Z = /* @__PURE__ */ new Set([
|
|
279
|
-
"avif",
|
|
280
|
-
"bmp",
|
|
281
|
-
"gif",
|
|
282
|
-
"ico",
|
|
283
|
-
"jpeg",
|
|
284
|
-
"jpg",
|
|
285
|
-
"png",
|
|
286
|
-
"svg",
|
|
287
|
-
"webp"
|
|
288
|
-
]);
|
|
289
|
-
function I(e) {
|
|
290
|
-
if (!e)
|
|
291
|
-
return "";
|
|
292
|
-
const i = e.trim().toLowerCase();
|
|
293
|
-
return i.startsWith(".") ? i.slice(1) : i;
|
|
294
|
-
}
|
|
295
|
-
function S(e) {
|
|
296
|
-
return I(e) === "gif";
|
|
297
|
-
}
|
|
298
|
-
const J = 1e3 * 1024 * 1024, P = {
|
|
299
|
-
b: 1,
|
|
300
|
-
byte: 1,
|
|
301
|
-
bytes: 1,
|
|
302
|
-
gb: 1024 ** 3,
|
|
303
|
-
kb: 1024,
|
|
304
|
-
mb: 1024 ** 2,
|
|
305
|
-
tb: 1024 ** 4
|
|
306
|
-
};
|
|
307
|
-
function ee(e) {
|
|
308
|
-
if (typeof e == "number")
|
|
309
|
-
return Number.isFinite(e) && e >= 0 ? e : void 0;
|
|
310
|
-
if (!e)
|
|
311
|
-
return;
|
|
312
|
-
const i = /^\s*([\d.,]+)\s*([a-z]*)\s*$/i.exec(e);
|
|
313
|
-
if (!i)
|
|
314
|
-
return;
|
|
315
|
-
const n = Number(i[1].replace(/,/g, ""));
|
|
316
|
-
if (!Number.isFinite(n) || n < 0)
|
|
317
|
-
return;
|
|
318
|
-
const u = i[2].toLowerCase();
|
|
319
|
-
if (!u)
|
|
320
|
-
return n;
|
|
321
|
-
const c = P[u];
|
|
322
|
-
return c === void 0 ? void 0 : n * c;
|
|
323
|
-
}
|
|
324
|
-
function de(e, i) {
|
|
325
|
-
if (e)
|
|
326
|
-
return;
|
|
327
|
-
const n = typeof i == "number" ? i : Number(i ?? "");
|
|
328
|
-
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
329
|
-
}
|
|
330
|
-
function ue(e, i) {
|
|
331
|
-
if (!Z.has(I(e)))
|
|
332
|
-
return N;
|
|
333
|
-
const n = ee(i);
|
|
334
|
-
return n !== void 0 && n > J ? N : T;
|
|
335
|
-
}
|
|
336
|
-
function he(e, i = {}) {
|
|
337
|
-
if (!e.includes(_) || Q(e) || i.format === T && S(i.extension))
|
|
338
|
-
return "";
|
|
339
|
-
const { maxWidth: n, widths: u = X } = i, c = [...u].filter((s) => Number.isFinite(s) && s > 0).sort((s, l) => s - l);
|
|
340
|
-
if (c.length === 0)
|
|
341
|
-
return "";
|
|
342
|
-
let a = c;
|
|
343
|
-
if (n !== void 0 && Number.isFinite(n) && n > 0) {
|
|
344
|
-
const s = c.filter((l) => l <= n);
|
|
345
|
-
a = s.length > 0 ? s : [c[0]];
|
|
346
|
-
}
|
|
347
|
-
const f = n !== void 0 && Number.isFinite(n) && n > 0, h = (f ? a.filter(
|
|
348
|
-
(s) => n > s * (1 + z)
|
|
349
|
-
) : a).map(
|
|
350
|
-
(s) => `${q(e, s)} ${s}w`
|
|
351
|
-
);
|
|
352
|
-
return f && h.push(`${e} ${n}w`), h.join(", ");
|
|
353
|
-
}
|
|
354
|
-
function fe(e, i = 100) {
|
|
355
|
-
return !Number.isFinite(e) || e <= 0 ? "" : `${Math.ceil(e / i) * i}px`;
|
|
356
|
-
}
|
|
357
|
-
export {
|
|
358
|
-
D as A,
|
|
359
|
-
O as B,
|
|
360
|
-
L as D,
|
|
361
|
-
U as E,
|
|
362
|
-
T as O,
|
|
363
|
-
B as P,
|
|
364
|
-
oe as S,
|
|
365
|
-
G as T,
|
|
366
|
-
ce as a,
|
|
367
|
-
he as b,
|
|
368
|
-
de as c,
|
|
369
|
-
H as d,
|
|
370
|
-
K as e,
|
|
371
|
-
ae as f,
|
|
372
|
-
fe as g,
|
|
373
|
-
j as h,
|
|
374
|
-
se as i,
|
|
375
|
-
re as j,
|
|
376
|
-
N as k,
|
|
377
|
-
X as l,
|
|
378
|
-
E as m,
|
|
379
|
-
q as n,
|
|
380
|
-
le as o,
|
|
381
|
-
J as p,
|
|
382
|
-
ee as q,
|
|
383
|
-
ue as r
|
|
384
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { n as f, C as v } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
|
-
import { c } from "./component.styles.CAS3c9pM.js";
|
|
3
|
-
import { c as d } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { i as x, x as i } from "./lit-element.jLBm65_O.js";
|
|
5
|
-
var t = /* @__PURE__ */ ((e) => (e.Body1 = "body1", e.Body2 = "body2", e.Body3 = "body3", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.Small = "small", e))(t || {});
|
|
6
|
-
const m = x`:host{--color:inherit;line-height:var(--cx-line-height-large);display:block}:host::part(base){-webkit-font-smoothing:antialiased}.heading,.body,.small{color:var(--color);font-weight:var(--font-weight,var(--cx-font-weight));font-family:var(--font-family,var(--cx-font-sans));font-style:var(--font-style,normal);letter-spacing:var(--letter-spacing,var(--cx-letter-spacing-normal));margin-block:0}.heading-1{font-size:var(--font-size,var(--cx-font-size-3x-large));font-weight:var(--font-weight,var(--cx-font-weight-semibold));line-height:var(--line-height,var(--cx-line-height-3x-large))}.heading-2{font-size:var(--font-size,var(--cx-font-size-2x-large));font-weight:var(--font-weight,var(--cx-font-weight-semibold));line-height:var(--line-height,var(--cx-line-height-3x-large))}.heading-3{font-size:var(--font-size,var(--cx-font-size-x-large));font-weight:var(--font-weight,var(--cx-font-weight-semibold));line-height:var(--line-height,var(--cx-line-height-2x-large))}.heading-4{font-size:var(--font-size,var(--cx-font-size-large));font-weight:var(--font-weight,var(--cx-font-weight-semibold));line-height:var(--line-height,var(--cx-line-height-x-large))}.heading-5{font-size:var(--font-size,var(--cx-font-size-medium));font-weight:var(--font-weight,var(--cx-font-weight-semibold));line-height:var(--line-height,var(--cx-line-height-large))}.heading-6{font-size:var(--font-size,var(--cx-font-size-small));font-weight:var(--font-weight,var(--cx-font-weight-semibold));line-height:var(--line-height,var(--cx-line-height-medium))}.body-1{font-size:var(--font-size,var(--cx-font-size-medium-large));font-weight:var(--font-weight,var(--cx-font-weight-regular));line-height:var(--line-height,var(--cx-line-height-x-large))}.body-2{font-size:var(--font-size,var(--cx-font-size-medium));font-weight:var(--font-weight,var(--cx-font-weight-regular));line-height:var(--line-height,var(--cx-line-height-large))}.body-3{font-size:var(--font-size,var(--cx-font-size-small));font-weight:var(--font-weight,var(--cx-font-weight-regular));line-height:var(--line-height,var(--cx-line-height-medium))}.small{font-size:var(--font-size,var(--cx-font-size-x-small));font-weight:var(--font-weight,var(--cx-font-weight-regular));line-height:var(--line-height,var(--cx-line-height-small))}`;
|
|
7
|
-
var b = Object.defineProperty, w = Object.getOwnPropertyDescriptor, g = (e, r, o, n) => {
|
|
8
|
-
for (var a = n > 1 ? void 0 : n ? w(r, o) : r, l = e.length - 1, h; l >= 0; l--)
|
|
9
|
-
(h = e[l]) && (a = (n ? h(r, o, a) : h(a)) || a);
|
|
10
|
-
return n && a && b(r, o, a), a;
|
|
11
|
-
};
|
|
12
|
-
let s = class extends v {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments), this.variant = t.Body1;
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
switch (this.variant) {
|
|
18
|
-
case t.Body1:
|
|
19
|
-
return i`<p part="base" class="body body-1"><slot></slot></p>`;
|
|
20
|
-
case t.Body2:
|
|
21
|
-
return i`<p part="base" class="body body-2"><slot></slot></p>`;
|
|
22
|
-
case t.Body3:
|
|
23
|
-
return i`<p part="base" class="body body-3"><slot></slot></p>`;
|
|
24
|
-
case t.Small:
|
|
25
|
-
return i`<small part="base" class="small"><slot></slot></small>`;
|
|
26
|
-
case t.H1:
|
|
27
|
-
return i`<h1 part="base" class="heading heading-1"><slot></slot></h1>`;
|
|
28
|
-
case t.H2:
|
|
29
|
-
return i`<h2 part="base" class="heading heading-2"><slot></slot></h2>`;
|
|
30
|
-
case t.H3:
|
|
31
|
-
return i`<h3 part="base" class="heading heading-3"><slot></slot></h3>`;
|
|
32
|
-
case t.H4:
|
|
33
|
-
return i`<h4 part="base" class="heading heading-4"><slot></slot></h4>`;
|
|
34
|
-
case t.H5:
|
|
35
|
-
return i`<h5 part="base" class="heading heading-5"><slot></slot></h5>`;
|
|
36
|
-
case t.H6:
|
|
37
|
-
return i`<h6 part="base" class="heading heading-6"><slot></slot></h6>`;
|
|
38
|
-
}
|
|
39
|
-
return i`<p part="base" class="body body-2"><slot></slot></p>`;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
s.styles = [c, m];
|
|
43
|
-
g([
|
|
44
|
-
f({ type: String })
|
|
45
|
-
], s.prototype, "variant", 2);
|
|
46
|
-
s = g([
|
|
47
|
-
d("cx-typography")
|
|
48
|
-
], s);
|
|
49
|
-
export {
|
|
50
|
-
s as C,
|
|
51
|
-
t as T
|
|
52
|
-
};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
2
|
-
import { default as CxDynamicSelect } from '../dynamic-select/dynamic-select.ts';
|
|
3
|
-
import { DeviceType } from '../../../types/src/content-builder';
|
|
4
|
-
import { SearchBoxSize, SearchBoxWidthType } from '../../../types/src/search-box';
|
|
5
|
-
import { CSSResultGroup } from 'lit';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @summary A search box component that provides a user interface for entering search queries.
|
|
9
|
-
*
|
|
10
|
-
* @cssproperty [--padding-left=var(--cx-spacing-x-small)] - Padding for text in input field.
|
|
11
|
-
* @cssproperty [--background-color=transparent] - pair of colors for light and dark theme
|
|
12
|
-
* @cssproperty [--border-color=light-dark(
|
|
13
|
-
var(--cx-color-neutral-0),
|
|
14
|
-
var(--cx-color-neutral-1000)
|
|
15
|
-
)] - pair of colors for light and dark theme
|
|
16
|
-
* @cssproperty [--color=light-dark(
|
|
17
|
-
var(--cx-color-neutral-1000),
|
|
18
|
-
var(--cx-color-neutral-0)
|
|
19
|
-
)] - pair of colors for light and dark theme
|
|
20
|
-
* @cssproperty [--search-box-custom-height=32px] - Input height when size is 'custom'.
|
|
21
|
-
* @cssproperty [--search-box-custom-padding=4px 8px 4px 8px] - Input padding when size is 'custom'.
|
|
22
|
-
* @cssproperty [--search-box-custom-font-size=var(--cx-font-size-medium)] - Input font size when size is 'custom'.
|
|
23
|
-
* @cssproperty [--search-box-custom-font-family] - Input font family when size is 'custom'.
|
|
24
|
-
* @cssproperty [--search-box-custom-font-style] - Input font style when size is 'custom'.
|
|
25
|
-
* @cssproperty [--search-box-custom-font-weight] - Input font weight when size is 'custom'.
|
|
26
|
-
*
|
|
27
|
-
* @event cx-input - Emitted when the control receives input.
|
|
28
|
-
* @event cx-change - Emitted when an alteration to the control's value is committed by the user.
|
|
29
|
-
* @event {{ value: string }} cx-search - Emitted when user hits Enter key or clicks search button (if enabled).
|
|
30
|
-
*
|
|
31
|
-
* @csspart input - The input field for entering search queries.
|
|
32
|
-
* @csspart icon - The icon displayed in the search box, typically a magnifying glass.
|
|
33
|
-
*
|
|
34
|
-
* @typedef SearchBoxSize - 'custom' | 'large' | 'medium' | 'small'
|
|
35
|
-
*/
|
|
36
|
-
export default class CxSearchBox extends CortexElement {
|
|
37
|
-
static readonly styles: CSSResultGroup;
|
|
38
|
-
static readonly dependencies: {
|
|
39
|
-
'cx-dynamic-select': typeof CxDynamicSelect;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Reference to form element
|
|
43
|
-
*/
|
|
44
|
-
form: HTMLFormElement;
|
|
45
|
-
/**
|
|
46
|
-
* Reference to internal input element
|
|
47
|
-
*/
|
|
48
|
-
dynamicSelect: CxDynamicSelect;
|
|
49
|
-
/**
|
|
50
|
-
* Search input's size.
|
|
51
|
-
*/
|
|
52
|
-
size: SearchBoxSize;
|
|
53
|
-
/**
|
|
54
|
-
* Placeholder for input
|
|
55
|
-
*/
|
|
56
|
-
placeholder: string;
|
|
57
|
-
/**
|
|
58
|
-
* Whether the icon can be clicked to trigger search
|
|
59
|
-
*/
|
|
60
|
-
canSearchByIcon: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Value of the search box.
|
|
63
|
-
*/
|
|
64
|
-
value: string;
|
|
65
|
-
/**
|
|
66
|
-
* Latest text the user typed mirrored to search-term and used to decide
|
|
67
|
-
* whether to render the suggestions dropdown.
|
|
68
|
-
*/
|
|
69
|
-
searchTerm: string;
|
|
70
|
-
/**
|
|
71
|
-
* The width type of the search box.
|
|
72
|
-
*/
|
|
73
|
-
widthType: SearchBoxWidthType;
|
|
74
|
-
/**
|
|
75
|
-
* Device type
|
|
76
|
-
* Don't use this prop since it is controlled by window resize event
|
|
77
|
-
* Used for :host([width-type='adaptive'][device-type='mobile']) selector
|
|
78
|
-
*/
|
|
79
|
-
deviceType: DeviceType;
|
|
80
|
-
/**
|
|
81
|
-
* Label for the search box
|
|
82
|
-
*/
|
|
83
|
-
label: string;
|
|
84
|
-
/**
|
|
85
|
-
* Breakpoints for responsive design
|
|
86
|
-
*/
|
|
87
|
-
breakpoints: [number, number, number];
|
|
88
|
-
constructor();
|
|
89
|
-
runFirstUpdated(): void;
|
|
90
|
-
runConnectedCallback(): void;
|
|
91
|
-
disconnectedCallback(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Emit cx-search with current input value
|
|
94
|
-
*/
|
|
95
|
-
private emitSearch;
|
|
96
|
-
private fetchAutocompleteItems;
|
|
97
|
-
private getSearchItems;
|
|
98
|
-
private setInputDisplayValue;
|
|
99
|
-
private removeCurrentOption;
|
|
100
|
-
private setOptionCurrent;
|
|
101
|
-
private setOptionSelected;
|
|
102
|
-
private handleEnter;
|
|
103
|
-
private handleSubmit;
|
|
104
|
-
private handleInput;
|
|
105
|
-
private handleClear;
|
|
106
|
-
private handleClick;
|
|
107
|
-
private handleWindowResize;
|
|
108
|
-
render(): import('lit').TemplateResult<1>;
|
|
109
|
-
}
|
|
110
|
-
declare global {
|
|
111
|
-
interface HTMLElementTagNameMap {
|
|
112
|
-
'cx-search-box': CxSearchBox;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Editor } from 'grapesjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Hosts the editable wrapper inside the canvas document's content container
|
|
5
|
-
* instead of the frame body.
|
|
6
|
-
*
|
|
7
|
-
* The canvas document is a real page render, and it does not always carry the
|
|
8
|
-
* container: the same running editor can be pointed at a page with no block
|
|
9
|
-
* content (a DAM/workspace page) and later back at one that has it. While the
|
|
10
|
-
* container is absent the wrapper is kept detached and every canvas click is
|
|
11
|
-
* left to the page itself - GrapesJS's select handler prevents the default
|
|
12
|
-
* action, which would break the links and buttons of a page it does not own.
|
|
13
|
-
*/
|
|
14
|
-
declare const WrapperContainerPlugin: (selector: string) => (editor: Editor) => void;
|
|
15
|
-
export default WrapperContainerPlugin;
|