@orangelogic/design-system 2.60.0 → 2.61.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/apps/cortex/src/types.d.ts +2 -0
- package/library/chunks/_baseRest.ClTMQtN1.js +67 -0
- package/library/chunks/{_baseUniq.BUihBa8c.js → _baseUniq.Df-fLIBx.js} +53 -56
- package/library/chunks/{amazon_s3.DeaMdPPn.js → amazon_s3.BEMtqafk.js} +1 -1
- package/library/chunks/animate.El-MpOws.js +37 -0
- package/library/chunks/animation-registry.HmpwNuGH.js +34 -0
- package/library/chunks/{animation.B7d72NVK.js → animation.DfUHRQry.js} +10 -8
- package/library/chunks/array.DCtvHiLS.js +81 -0
- package/library/chunks/asset.CG_yXtWK.js +288 -0
- package/library/chunks/{browser.Va59Ix3P.js → browser.BHOCIF_A.js} +18 -16
- package/library/chunks/{button.CtCSNRB3.js → button.P71VJ5xh.js} +75 -74
- package/library/chunks/{button.styles.C8AIO8fd.js → button.styles.Dl5IQLHU.js} +1 -1
- package/library/chunks/{capitalize.CNStXZBq.js → capitalize.WSkCXkNE.js} +1 -1
- package/library/chunks/{chatbot.sm4Rph1v.js → chatbot.BmpIu59L.js} +2 -2
- package/library/chunks/{class-map.CoZTSvbM.js → class-map.BiVq-cVR.js} +1 -1
- package/library/chunks/{color-swatch-group.qJevXs50.js → color-swatch-group.DlLmydlB.js} +116 -127
- package/library/chunks/color-swatch.Bpb_hW2H.js +407 -0
- package/library/chunks/color.vLD2sNTs.js +164 -0
- package/library/chunks/{component.styles.CI-v8BZa.js → component.styles.DMSLciL5.js} +1 -1
- package/library/chunks/{confirm-popover.D2TF1x6K.js → confirm-popover.C1uA36JR.js} +15 -13
- package/library/chunks/{content-builder.WranV3P4.js → content-builder.Bf7kqzDI.js} +1 -1
- package/library/chunks/converters.DkDtLstb.js +11 -0
- package/library/chunks/{cropper.aA0v16xS.js → cropper.BraEEykE.js} +5004 -5024
- package/library/chunks/custom-element.L4WJXn1j.js +14 -0
- package/library/chunks/debounce.DaHuiSGU.js +15 -0
- package/library/chunks/{default-value.CIKAvD5l.js → default-value.COZopaet.js} +1 -1
- package/library/chunks/{dialog.B1TORO6S.js → dialog.C_75RVVz.js} +52 -49
- package/library/chunks/{directive-helpers.DBHob-_L.js → directive-helpers.Dm4rc594.js} +1 -1
- package/library/chunks/dom.CZrJ64Dm.js +92 -0
- package/library/chunks/{dot-pagination.8f2oX_ge.js → dot-pagination.CoCIJsHC.js} +24 -22
- package/library/chunks/{endpoints.BgyupJys.js → endpoints.B7lcoc1N.js} +1 -3
- package/library/chunks/{file-on-demand.Cwgabdyw.js → file-on-demand.B2jNilAj.js} +1829 -1544
- package/library/chunks/{folder-select.DiWCwR-T.js → folder-select.CSEQxIXF.js} +380 -255
- package/library/chunks/{form-control.styles.NE2Q-quE.js → form-control.styles.CUGhvlfT.js} +1 -1
- package/library/chunks/{form.B8u0ywni.js → form.CO12-VK0.js} +1 -1
- package/library/chunks/{guard.BDP4A85K.js → guard.D4axKaMo.js} +1 -1
- package/library/chunks/{header.B_FD8uLt.js → header.Bd3G0-oA.js} +11 -9
- package/library/chunks/{hub-connection.CxfaT11o.js → hub-connection.BxT2b7Nq.js} +4 -3
- package/library/chunks/{i18n.BP2FRO1v.js → i18n.DrzK7TPf.js} +54 -7
- package/library/chunks/identity.ByMq8VxU.js +6 -0
- package/library/chunks/{if-defined.MfEgpxEN.js → if-defined.BRoBj_Rp.js} +1 -1
- package/library/chunks/{iframe.DZm7FiCl.js → iframe.UCj6Ze2A.js} +18 -16
- package/library/chunks/{image.Ycf8RudS.js → image.DZCRhE3G.js} +82 -79
- package/library/chunks/image.mbpyiQpQ.js +82 -0
- package/library/chunks/index.S0wy3rzm.js +373 -0
- package/library/chunks/isObjectLike.D3cpZO39.js +81 -0
- package/library/chunks/{isSymbol.L0C2ND_U.js → isSymbol.huJ_Cvxt.js} +1 -1
- package/library/chunks/lib-cortex-element.CVMmyPMC.js +146 -0
- package/library/chunks/{list-editor.COkw5JKG.js → list-editor.CrLntuM7.js} +75 -79
- package/library/chunks/{custom-element.vnXBMQxc.js → lit-element.jLBm65_O.js} +123 -277
- package/library/chunks/{live.LdB9xEhp.js → live.SCz6M8Gs.js} +2 -2
- package/library/chunks/{mailchimp.BjbPJfd-.js → mailchimp.Bs6uJVsf.js} +1 -1
- package/library/chunks/{modal.BqNLxgs1.js → modal.U1QltQKe.js} +25 -19
- package/library/chunks/{option.D9KJhzHs.js → option.D1u5-cTt.js} +21 -19
- package/library/chunks/{orangelogic.BgbQXkBv.js → orangelogic.TdFfoPUN.js} +1 -1
- package/library/chunks/{overlayscrollbars.aFuRG5Rs.js → overlayscrollbars.XhGWx9Zk.js} +1 -1
- package/library/chunks/{pagination.C2FN4fmO.js → pagination.BI3LONVU.js} +17 -15
- package/library/chunks/{ref.BaCjlzLO.js → ref.bzeTdX0K.js} +2 -2
- package/library/chunks/{repeat.CauKaXyy.js → repeat.DbF2p5ae.js} +2 -2
- package/library/chunks/responsive.CA6dcNiM.js +17 -0
- package/library/chunks/{scroll.DwPiX2Ox.js → scroll.xtO5yojm.js} +3 -2
- package/library/chunks/{slot.DJLm4Dig.js → slot.j5oheLJC.js} +12 -4
- package/library/chunks/{state.Cw55xXlb.js → state.CSDxrqLd.js} +1 -1
- package/library/chunks/{static.BjNkqt7_.js → static.UA3G1Deq.js} +1 -1
- package/library/chunks/string.Cp_XNbnV.js +160 -0
- package/library/chunks/{style-map.CZovMmo_.js → style-map.llVFPd__.js} +1 -1
- package/library/chunks/{tab-group.5fLnWflv.js → tab-group.DxSlcWK0.js} +20 -18
- package/library/chunks/{table.BAr8KKc6.js → table.CY-iMTWV.js} +457 -505
- package/library/chunks/template.CsJd8Pb_.js +20 -0
- package/library/chunks/time.D_uFZqqe.js +118 -0
- package/library/chunks/{toString.CL_lYXbK.js → toString.CRT5zqEU.js} +3 -3
- package/library/chunks/toast.BXNbwZV8.js +25 -0
- package/library/chunks/{tree.CUfvIDyA.js → tree.CNbrP8cY.js} +33 -36
- package/library/chunks/{typography.BFpl0WMA.js → typography.oDzoLbZS.js} +16 -14
- package/library/chunks/{unsafe-html.DyO9_Rsq.js → unsafe-html.Dff7-rCx.js} +1 -1
- package/library/chunks/url.LjsR2sB5.js +15 -0
- package/library/chunks/user-agent.D9aPuOyL.js +4 -0
- package/library/chunks/watch.q1sEjPWL.js +501 -0
- package/library/components/alert.js +38 -35
- package/library/components/animated-image.js +25 -23
- package/library/components/animation.js +7 -5
- package/library/components/array-line-clamp.d.ts +3 -0
- package/library/components/array-line-clamp.js +195 -0
- package/library/components/asset-link-format.js +223 -212
- package/library/components/atoms.js +164 -162
- package/library/components/avatar.js +28 -26
- package/library/components/badge.js +10 -8
- package/library/components/bicolor-picker.js +21 -19
- package/library/components/border-input-group.js +11 -9
- package/library/components/breadcrumb-item.js +14 -12
- package/library/components/breadcrumb.js +24 -22
- package/library/components/button-group.js +26 -24
- package/library/components/button.js +14 -13
- package/library/components/card.js +28 -19
- package/library/components/checkbox.js +29 -23
- package/library/components/color-picker.js +19 -17
- package/library/components/color-swatch-group.js +20 -17
- package/library/components/color-swatch.js +16 -13
- package/library/components/confirm-popover.js +11 -9
- package/library/components/copy-button.js +15 -13
- package/library/components/corner-position-input-group.js +13 -11
- package/library/components/cortex-element.d.ts +3 -0
- package/library/components/cortex-element.js +5 -0
- package/library/components/cropper.js +7 -5
- package/library/components/details.js +23 -20
- package/library/components/dialog.js +19 -16
- package/library/components/divider.js +13 -11
- package/library/components/dot-pagination.js +11 -9
- package/library/components/dot-status.js +10 -8
- package/library/components/drawer.js +63 -51
- package/library/components/dropdown.js +29 -26
- package/library/components/dynamic-select.js +12 -10
- package/library/components/element-clamp.js +28 -25
- package/library/components/file-on-demand.js +21 -20
- package/library/components/folder-select.js +12 -10
- package/library/components/format-bytes.js +11 -10
- package/library/components/format-date.js +11 -9
- package/library/components/format-number.js +16 -15
- package/library/components/format-time.js +118 -9
- package/library/components/grid-item.js +48 -46
- package/library/components/grid.js +31 -29
- package/library/components/header.js +10 -9
- package/library/components/hub-connection.js +6 -5
- package/library/components/icon-button.js +20 -18
- package/library/components/icon.js +17 -15
- package/library/components/iframe.js +10 -8
- package/library/components/image-comparer.js +27 -25
- package/library/components/image.js +14 -11
- package/library/components/include.js +26 -24
- package/library/components/input-group.js +15 -13
- package/library/components/input.js +23 -21
- package/library/components/line-clamp.js +12 -10
- package/library/components/list-editor.js +17 -15
- package/library/components/markdown.js +80 -78
- package/library/components/masonry.js +46 -44
- package/library/components/menu-item.js +151 -136
- package/library/components/menu-label.js +15 -13
- package/library/components/menu-section.js +18 -16
- package/library/components/menu.js +10 -8
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +12 -10
- package/library/components/option.js +10 -8
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +30 -28
- package/library/components/pagination.js +14 -12
- package/library/components/popup.js +3296 -9
- package/library/components/position-picker.js +12 -10
- package/library/components/progress-bar.js +13 -11
- package/library/components/progress-ring.js +15 -13
- package/library/components/qr-code.js +54 -52
- package/library/components/radio-button.js +19 -17
- package/library/components/radio-card.js +14 -12
- package/library/components/radio-group.js +20 -18
- package/library/components/radio.js +15 -13
- package/library/components/range.js +25 -23
- package/library/components/rating.js +17 -15
- package/library/components/relative-time.js +16 -14
- package/library/components/resize-observer.js +21 -19
- package/library/components/select.js +1442 -25
- package/library/components/shadow-input-group.js +19 -17
- package/library/components/share-option-list.js +20 -18
- package/library/components/sidebar.js +14 -12
- package/library/components/size-input-group.js +35 -33
- package/library/components/skeleton.js +12 -10
- package/library/components/space.js +12 -10
- package/library/components/spinner.js +17 -15
- package/library/components/split-panel.js +15 -13
- package/library/components/step.js +18 -16
- package/library/components/stepper-wizard.js +11 -9
- package/library/components/stepper.js +13 -11
- package/library/components/switch.js +21 -19
- package/library/components/tab-group.js +15 -13
- package/library/components/tab-panel.js +20 -18
- package/library/components/tab.js +18 -16
- package/library/components/table.js +69 -67
- package/library/components/tag.js +11 -9
- package/library/components/textarea.js +20 -18
- package/library/components/timecode.js +98 -8
- package/library/components/tooltip.js +24 -21
- package/library/components/tree-item.js +14 -11
- package/library/components/tree.js +12 -10
- package/library/components/typeface.js +13 -11
- package/library/components/types.js +15487 -15444
- package/library/components/typography.js +6 -4
- package/library/components/video.js +13 -11
- package/library/components/visually-hidden.js +15 -13
- package/library/events.d.ts +1 -0
- package/library/events.js +1 -0
- package/library/package.json +11 -2
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.d.ts +45 -0
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -0
- package/library/packages/atoms/src/components/drawer/drawer.d.ts +7 -1
- package/library/packages/atoms/src/components/include/include.d.ts +1 -0
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
- package/library/packages/atoms/src/components/tree/tree.d.ts +0 -4
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-file-on-demand-load-more.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-pin.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-unpin.d.ts +8 -0
- package/library/packages/events/src/cx-folder-select-search-term-change.d.ts +8 -0
- package/library/packages/events/src/cx-share-option-list-item-selected.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +6 -2
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
- package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
- package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +8 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +6 -1
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +3 -7
- package/library/packages/organisms/src/content-builder/styleController.d.ts +8 -8
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +80 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.styles.d.ts +2 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +44 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +11 -18
- package/library/packages/organisms/src/file-on-demand/file-on-demand.utils.d.ts +6 -0
- package/library/packages/services/src/api/folder/folder.d.ts +4 -8
- package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
- package/library/packages/types/src/file-on-demand.d.ts +4 -0
- package/library/packages/types/src/folder-select.d.ts +9 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +40 -2
- package/library/packages/utils/src/drag-scroll/drag-scroll.d.ts +22 -0
- package/library/packages/utils/src/drag-scroll/index.d.ts +1 -0
- package/library/packages/utils/src/font/font.d.ts +26 -0
- package/library/packages/utils/src/font/index.d.ts +1 -0
- package/library/packages/utils/src/history-manager/history-manager.d.ts +13 -0
- package/library/packages/utils/src/history-manager/index.d.ts +1 -0
- package/library/packages/utils/src/index.d.ts +45 -0
- package/library/packages/utils/src/template/index.d.ts +1 -0
- package/library/packages/utils/src/template/template.d.ts +3 -0
- package/library/react-web-component.d.ts +418 -360
- package/library/utils.d.ts +1 -0
- package/library/utils.js +180 -0
- package/package.json +11 -2
- package/library/chunks/animation-registry.DavRkTTr.js +0 -69
- package/library/chunks/asset.Ba-CxnNM.js +0 -309
- package/library/chunks/color-swatch.DUe3iLLo.js +0 -558
- package/library/chunks/dom.C0OFx7ND.js +0 -78
- package/library/chunks/format-time.BW6-ZWCX.js +0 -226
- package/library/chunks/isObjectLike.z36Fu426.js +0 -34
- package/library/chunks/popup._w5T7x8f.js +0 -3307
- package/library/chunks/select.DfO4de04.js +0 -1441
- package/library/chunks/string.BCk3SmdZ.js +0 -144
- package/library/chunks/timecode.D7XTiQ_3.js +0 -105
- package/library/chunks/watch.BCJD77bD.js +0 -547
- package/library/packages/events/src/cx-load-more.d.ts +0 -8
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { i as D, n as d, C as g, x as S, c as M } from "./custom-element.vnXBMQxc.js";
|
|
2
|
-
import { c as w } from "./component.styles.CI-v8BZa.js";
|
|
3
|
-
import { L as N } from "./i18n.BP2FRO1v.js";
|
|
4
|
-
import { w as m } from "./watch.BCJD77bD.js";
|
|
5
|
-
import { f as b } from "./number.CjNxU7Xs.js";
|
|
6
|
-
import { r as H } from "./state.Cw55xXlb.js";
|
|
7
|
-
var p = /* @__PURE__ */ ((t) => (t.Millisecond = "ms", t.Second = "s", t))(p || {}), e = /* @__PURE__ */ ((t) => (t.Day = "d", t.DayHour = "d-h", t.DayHourMinute = "d-h-m", t.DayHourMinuteSecond = "d-h-m-s", t.Hour = "h", t.HourMinute = "h-m", t.HourMinuteSecond = "h-m-s", t.Minute = "m", t.MinuteSecond = "m-s", t.Second = "s", t))(e || {}), a = /* @__PURE__ */ ((t) => (t.Digital = "digital", t.Long = "long", t.Narrow = "narrow", t.Short = "short", t))(a || {}), y = /* @__PURE__ */ ((t) => (t.English = "en", t))(y || {});
|
|
8
|
-
const _ = [
|
|
9
|
-
{
|
|
10
|
-
key: "days",
|
|
11
|
-
longPlural: "days",
|
|
12
|
-
longSingular: "day",
|
|
13
|
-
narrow: "d",
|
|
14
|
-
short: "day"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
key: "hours",
|
|
18
|
-
longPlural: "hours",
|
|
19
|
-
longSingular: "hour",
|
|
20
|
-
narrow: "h",
|
|
21
|
-
short: "hr"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
key: "minutes",
|
|
25
|
-
longPlural: "minutes",
|
|
26
|
-
longSingular: "minute",
|
|
27
|
-
narrow: "m",
|
|
28
|
-
short: "min"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
key: "seconds",
|
|
32
|
-
longPlural: "seconds",
|
|
33
|
-
longSingular: "second",
|
|
34
|
-
narrow: "s",
|
|
35
|
-
short: "sec"
|
|
36
|
-
}
|
|
37
|
-
], P = 1e3, B = 60 * 1e3;
|
|
38
|
-
function v(t, o, n = y.English) {
|
|
39
|
-
const i = Intl.DurationFormat;
|
|
40
|
-
if (typeof i != "function")
|
|
41
|
-
throw new Error("Intl.DurationFormat is not supported");
|
|
42
|
-
return new i(n, { style: o }).format(t);
|
|
43
|
-
}
|
|
44
|
-
function F(t, o) {
|
|
45
|
-
const n = Math.floor(t / 1e3), i = Math.floor(n / 60), r = Math.floor(i / 60), s = Math.floor(r / 24), c = r % 24, h = i % 60, f = n % 60;
|
|
46
|
-
switch (o) {
|
|
47
|
-
case e.Day:
|
|
48
|
-
return { days: s };
|
|
49
|
-
case e.DayHour:
|
|
50
|
-
return { days: s, hours: c };
|
|
51
|
-
case e.DayHourMinute:
|
|
52
|
-
return { days: s, hours: c, minutes: h };
|
|
53
|
-
case e.DayHourMinuteSecond:
|
|
54
|
-
return { days: s, hours: c, minutes: h, seconds: f };
|
|
55
|
-
case e.Hour:
|
|
56
|
-
return { hours: r };
|
|
57
|
-
case e.HourMinute:
|
|
58
|
-
return { hours: r, minutes: h };
|
|
59
|
-
case e.HourMinuteSecond:
|
|
60
|
-
return { hours: r, minutes: h, seconds: f };
|
|
61
|
-
case e.Minute:
|
|
62
|
-
return { minutes: i };
|
|
63
|
-
case e.MinuteSecond:
|
|
64
|
-
return { minutes: i, seconds: f };
|
|
65
|
-
case e.Second:
|
|
66
|
-
return { seconds: n };
|
|
67
|
-
default:
|
|
68
|
-
return { days: s, hours: c, minutes: h };
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function I(t) {
|
|
72
|
-
return Object.fromEntries(
|
|
73
|
-
Object.entries(t).filter(([, o]) => o !== 0)
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
function L(t, o) {
|
|
77
|
-
const n = [];
|
|
78
|
-
let i = 0;
|
|
79
|
-
for (const r of _) {
|
|
80
|
-
const s = t[r.key];
|
|
81
|
-
s !== void 0 && (n.push(
|
|
82
|
-
O(s, r, o, i)
|
|
83
|
-
), i += 1);
|
|
84
|
-
}
|
|
85
|
-
if (n.length === 0)
|
|
86
|
-
return "0";
|
|
87
|
-
switch (o) {
|
|
88
|
-
case a.Digital:
|
|
89
|
-
return n.join(":");
|
|
90
|
-
case a.Long:
|
|
91
|
-
case a.Short:
|
|
92
|
-
return n.join(", ");
|
|
93
|
-
case a.Narrow:
|
|
94
|
-
default:
|
|
95
|
-
return n.join(" ");
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function O(t, o, n, i) {
|
|
99
|
-
const r = n === a.Digital ? i === 0 ? String(t) : String(t).padStart(2, "0") : b(t);
|
|
100
|
-
switch (n) {
|
|
101
|
-
case a.Digital:
|
|
102
|
-
return r;
|
|
103
|
-
case a.Long:
|
|
104
|
-
return `${r} ${t === 1 ? o.longSingular : o.longPlural}`;
|
|
105
|
-
case a.Short:
|
|
106
|
-
return `${r} ${o.short}`;
|
|
107
|
-
case a.Narrow:
|
|
108
|
-
default:
|
|
109
|
-
return `${r}${o.narrow}`;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
const T = D`
|
|
113
|
-
:host {
|
|
114
|
-
display: contents;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.format-time {
|
|
118
|
-
color: var(--cx-format-time-color, inherit);
|
|
119
|
-
font-size: var(--cx-format-time-font-size, inherit);
|
|
120
|
-
font-weight: var(--cx-format-time-font-weight, inherit);
|
|
121
|
-
}
|
|
122
|
-
`;
|
|
123
|
-
var E = Object.defineProperty, A = Object.getOwnPropertyDescriptor, l = (t, o, n, i) => {
|
|
124
|
-
for (var r = i > 1 ? void 0 : i ? A(o, n) : o, s = t.length - 1, c; s >= 0; s--)
|
|
125
|
-
(c = t[s]) && (r = (i ? c(o, n, r) : c(r)) || r);
|
|
126
|
-
return i && r && E(o, n, r), r;
|
|
127
|
-
};
|
|
128
|
-
function x(t) {
|
|
129
|
-
if (t === null || t === "")
|
|
130
|
-
return null;
|
|
131
|
-
const o = Number(t);
|
|
132
|
-
return Number.isFinite(o) ? o : null;
|
|
133
|
-
}
|
|
134
|
-
function C(t) {
|
|
135
|
-
return t == null ? null : String(t);
|
|
136
|
-
}
|
|
137
|
-
const U = e.DayHourMinute, $ = a.Long, j = /* @__PURE__ */ new Set([
|
|
138
|
-
e.Day,
|
|
139
|
-
e.DayHour,
|
|
140
|
-
e.DayHourMinute,
|
|
141
|
-
e.DayHourMinuteSecond,
|
|
142
|
-
e.Hour,
|
|
143
|
-
e.HourMinute,
|
|
144
|
-
e.HourMinuteSecond,
|
|
145
|
-
e.Minute,
|
|
146
|
-
e.MinuteSecond,
|
|
147
|
-
e.Second
|
|
148
|
-
]), z = /* @__PURE__ */ new Set([
|
|
149
|
-
a.Long,
|
|
150
|
-
a.Short,
|
|
151
|
-
a.Narrow,
|
|
152
|
-
a.Digital
|
|
153
|
-
]);
|
|
154
|
-
let u = class extends g {
|
|
155
|
-
constructor() {
|
|
156
|
-
super(...arguments), this.localize = new N(this), this.duration = null, this.placeholder = "", this.unitsFormat = e.DayHourMinute, this.locale = y.English, this.displayStyle = a.Long, this.inputUnit = p.Millisecond, this.formattedDuration = "0";
|
|
157
|
-
}
|
|
158
|
-
updateFormattedDuration() {
|
|
159
|
-
const t = this.normalizeDurationToMilliseconds();
|
|
160
|
-
if (t == null || t === 0 || !Number.isFinite(t)) {
|
|
161
|
-
this.formattedDuration = "0";
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
const o = j.has(this.unitsFormat) ? this.unitsFormat : U, n = z.has(this.displayStyle) ? this.displayStyle : $, i = F(t, o);
|
|
165
|
-
try {
|
|
166
|
-
this.formattedDuration = v(i, n, this.locale) || "0";
|
|
167
|
-
} catch {
|
|
168
|
-
const r = I(i);
|
|
169
|
-
this.formattedDuration = L(r, n);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
normalizeDurationToMilliseconds() {
|
|
173
|
-
return this.duration === null || this.duration === void 0 ? null : Number.isFinite(this.duration) ? this.inputUnit === p.Second ? this.duration * P : this.duration : Number.NaN;
|
|
174
|
-
}
|
|
175
|
-
render() {
|
|
176
|
-
const t = this.placeholder || this.localize.term("ongoing");
|
|
177
|
-
return this.duration == null || Number.isNaN(this.duration) ? S`<span part="base" class="format-time">${t}</span>` : S`<span part="base" class="format-time">${this.formattedDuration}</span>`;
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
u.styles = [w, T];
|
|
181
|
-
u.dependencies = {};
|
|
182
|
-
l([
|
|
183
|
-
d({
|
|
184
|
-
converter: {
|
|
185
|
-
fromAttribute: x,
|
|
186
|
-
toAttribute: C
|
|
187
|
-
},
|
|
188
|
-
reflect: !0
|
|
189
|
-
})
|
|
190
|
-
], u.prototype, "duration", 2);
|
|
191
|
-
l([
|
|
192
|
-
d({ type: String })
|
|
193
|
-
], u.prototype, "placeholder", 2);
|
|
194
|
-
l([
|
|
195
|
-
d({ attribute: "units-format", reflect: !0, type: String })
|
|
196
|
-
], u.prototype, "unitsFormat", 2);
|
|
197
|
-
l([
|
|
198
|
-
d({ type: String })
|
|
199
|
-
], u.prototype, "locale", 2);
|
|
200
|
-
l([
|
|
201
|
-
d({ attribute: "display-style", reflect: !0, type: String })
|
|
202
|
-
], u.prototype, "displayStyle", 2);
|
|
203
|
-
l([
|
|
204
|
-
d({ attribute: "input-unit", type: String })
|
|
205
|
-
], u.prototype, "inputUnit", 2);
|
|
206
|
-
l([
|
|
207
|
-
H()
|
|
208
|
-
], u.prototype, "formattedDuration", 2);
|
|
209
|
-
l([
|
|
210
|
-
m("displayStyle", { waitUntilFirstUpdate: !0 }),
|
|
211
|
-
m("unitsFormat", { waitUntilFirstUpdate: !0 }),
|
|
212
|
-
m("inputUnit", { waitUntilFirstUpdate: !0 }),
|
|
213
|
-
m("locale", { waitUntilFirstUpdate: !0 }),
|
|
214
|
-
m("duration")
|
|
215
|
-
], u.prototype, "updateFormattedDuration", 1);
|
|
216
|
-
u = l([
|
|
217
|
-
M("cx-format-time")
|
|
218
|
-
], u);
|
|
219
|
-
export {
|
|
220
|
-
u as C,
|
|
221
|
-
a as D,
|
|
222
|
-
B as M,
|
|
223
|
-
e as U,
|
|
224
|
-
x as f,
|
|
225
|
-
C as t
|
|
226
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var f = typeof global == "object" && global && global.Object === Object && global, l = typeof self == "object" && self && self.Object === Object && self, g = f || l || Function("return this")(), n = g.Symbol, a = Object.prototype, s = a.hasOwnProperty, j = a.toString, e = n ? n.toStringTag : void 0;
|
|
2
|
-
function u(t) {
|
|
3
|
-
var r = s.call(t, e), i = t[e];
|
|
4
|
-
try {
|
|
5
|
-
t[e] = void 0;
|
|
6
|
-
var c = !0;
|
|
7
|
-
} catch {
|
|
8
|
-
}
|
|
9
|
-
var b = j.call(t);
|
|
10
|
-
return c && (r ? t[e] = i : delete t[e]), b;
|
|
11
|
-
}
|
|
12
|
-
var y = Object.prototype, O = y.toString;
|
|
13
|
-
function d(t) {
|
|
14
|
-
return O.call(t);
|
|
15
|
-
}
|
|
16
|
-
var S = "[object Null]", T = "[object Undefined]", o = n ? n.toStringTag : void 0;
|
|
17
|
-
function v(t) {
|
|
18
|
-
return t == null ? t === void 0 ? T : S : o && o in Object(t) ? u(t) : d(t);
|
|
19
|
-
}
|
|
20
|
-
function h(t) {
|
|
21
|
-
var r = typeof t;
|
|
22
|
-
return t != null && (r == "object" || r == "function");
|
|
23
|
-
}
|
|
24
|
-
function m(t) {
|
|
25
|
-
return t != null && typeof t == "object";
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
n as S,
|
|
29
|
-
h as a,
|
|
30
|
-
v as b,
|
|
31
|
-
f,
|
|
32
|
-
m as i,
|
|
33
|
-
g as r
|
|
34
|
-
};
|