@orangelogic/design-system 5.0.0 → 5.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/library/chunks/{alert.2Esbser8.js → alert.DcLDhp3k.js} +2 -2
- package/library/chunks/{array-line-clamp.C0Vo0Zzg.js → array-line-clamp.DXOk4Q3x.js} +2 -2
- package/library/chunks/{asset-link-format.COPyGdND.js → asset-link-format.D6L-qc3X.js} +8 -8
- package/library/chunks/{asset-link-format.Ce_3Qz6_.js → asset-link-format.DqMFH-AV.js} +387 -382
- package/library/chunks/{audio.B0VfXBIx.js → audio.DhBjwOl_.js} +2 -2
- package/library/chunks/{bicolor-picker.DS9Uut25.js → bicolor-picker.COIlx1gv.js} +1 -1
- package/library/chunks/{block-width.ClbkbtKA.js → block-width.BOCYHUDs.js} +39 -39
- package/library/chunks/{border-input-group.B6fqiG6F.js → border-input-group.QyWhH0yj.js} +3 -3
- package/library/chunks/{breadcrumb.DkINVxcJ.js → breadcrumb.SMzaqsuX.js} +1 -1
- package/library/chunks/{button.DKkHqsUz.js → button.DHmArHfu.js} +2 -2
- package/library/chunks/{checkbox.BdSpQlwf.js → checkbox.CA7imbiT.js} +1 -1
- package/library/chunks/{color-picker.DZUudAAS.js → color-picker.BERL3UOq.js} +10 -10
- package/library/chunks/{color-swatch-group.CuMJc6m8.js → color-swatch-group.C0n7SaJl.js} +22 -22
- package/library/chunks/{color-swatch.DXAr2gBg.js → color-swatch.CTbZYqbp.js} +3 -3
- package/library/chunks/{config-manager.B6c9XW1s.js → config-manager.C2GBBqS5.js} +29 -29
- package/library/chunks/{configs-controller.TQDPq63n.js → configs-controller.BcOmixH6.js} +8 -8
- package/library/chunks/{confirm-popover.sZVNhFPh.js → confirm-popover.BiPCxJfb.js} +4 -4
- package/library/chunks/{copy-button.CqqKJEh3.js → copy-button.muB45Tao.js} +2 -2
- package/library/chunks/{corner-position-input-group.nTlFes0_.js → corner-position-input-group.BKESUGfi.js} +4 -4
- package/library/chunks/{cropper.BF32WRyP.js → cropper.D8Uu43xy.js} +1 -1
- package/library/chunks/date-calendar.CSrG_jgw.js +188 -0
- package/library/chunks/date.kywrEgxd.js +363 -0
- package/library/chunks/{details.DSgp6VAD.js → details.BQjEDJPA.js} +1 -1
- package/library/chunks/{dialog.D0oTJWFf.js → dialog.BY2wT_Yq.js} +3 -3
- package/library/chunks/{document-viewer.L77oYyOp.js → document-viewer.DviPbYQs.js} +14 -14
- package/library/chunks/{dot-pagination.C1C6NG8d.js → dot-pagination.Bc4kqtcF.js} +2 -2
- package/library/chunks/{drawer.BsKzYqKe.js → drawer.UPV3DrmP.js} +2 -2
- package/library/chunks/{dropdown.CKhoP9Cr.js → dropdown.D6MQirjI.js} +15 -6
- package/library/chunks/{dynamic-select.Cb3L0dIB.js → dynamic-select.CsuWTgdl.js} +5 -5
- package/library/chunks/{e-chart.DKFAToIc.js → e-chart.iJAWfcbZ.js} +2 -2
- package/library/chunks/{element-clamp.CGq-62gg.js → element-clamp.fo2t5tv8.js} +2 -2
- package/library/chunks/{file-on-demand.BjUW2Ydt.js → file-on-demand.CtYHSqZ8.js} +16 -16
- package/library/chunks/{folder-select.DJ5EEod3.js → folder-select.BHMjbJpa.js} +8 -8
- package/library/chunks/{format-time.QkJcKYrT.js → format-time.CJc4crvX.js} +1 -1
- package/library/chunks/{header.CowQINf-.js → header.BMzrFqrX.js} +2 -2
- package/library/chunks/{i18n.Bjg2ubA4.js → i18n.tAD84KB3.js} +39 -0
- package/library/chunks/{icon-button.qJd_az6T.js → icon-button.hZj_g6Bt.js} +2 -2
- package/library/chunks/{iframe.sl2wnUcC.js → iframe.DESEj5FX.js} +1 -1
- package/library/chunks/{image-comparer.BCD6kzLm.js → image-comparer.zps8IR5_.js} +1 -1
- package/library/chunks/{image.-lgb634-.js → image.CSmzcQJh.js} +2 -2
- package/library/chunks/{input.DZRed6yo.js → input.is3tnNFr.js} +18 -5
- package/library/chunks/{line-clamp.Dl3_JdHX.js → line-clamp.iGRr7-Xj.js} +47 -28
- package/library/chunks/{markdown.BzDRvv-f.js → markdown.BXDKzr2h.js} +2 -2
- package/library/chunks/{masonry.BxNeClR6.js → masonry.DANqZg1j.js} +3 -3
- package/library/chunks/{menu-item.au-gTg1F.js → menu-item.DL81yBgV.js} +3 -3
- package/library/chunks/{menu.BxBtGPsg.js → menu.CVJpMzSd.js} +2 -2
- package/library/chunks/{option.DWE0tark.js → option.y4dln0Vc.js} +1 -1
- package/library/chunks/{padding-input-group.D2Qx15Yj.js → padding-input-group.DxO3Jpy_.js} +1 -1
- package/library/chunks/{pagination.ByLuPMyE.js → pagination.BNxyfajb.js} +7 -7
- package/library/chunks/{popup.w4ZU3jI-.js → popup.CDY1A9dW.js} +2 -2
- package/library/chunks/{position-picker.X2hhfGx7.js → position-picker.DTyM69dy.js} +2 -2
- package/library/chunks/{progress-bar.CynVLLnY.js → progress-bar.DCx1bJbA.js} +1 -1
- package/library/chunks/{progress-ring.Bfdj3-uB.js → progress-ring.CLF04Ukk.js} +1 -1
- package/library/chunks/{radio-card.VEsyM8ue.js → radio-card.Z4lQJH5n.js} +2 -2
- package/library/chunks/{radio.DhPbmKbQ.js → radio.BmN7pFIX.js} +1 -1
- package/library/chunks/{range.ObEMbygm.js → range.9siIIf5L.js} +2 -2
- package/library/chunks/{rating.CNeNn996.js → rating.oryYIw6x.js} +1 -1
- package/library/chunks/{relative-time.BfE3UOhF.js → relative-time.U8veN742.js} +1 -1
- package/library/chunks/{select.BV0Necz7.js → select.Bd8WvUMZ.js} +113 -109
- package/library/chunks/{shadow-input-group.Xxuzm8Qe.js → shadow-input-group.CoOi3L__.js} +2 -2
- package/library/chunks/{share-option-list.DOaEypfQ.js → share-option-list.DM5dfW9M.js} +2 -2
- package/library/chunks/{sidebar.CiZOJ49X.js → sidebar.DfNm5C-n.js} +30 -20
- package/library/chunks/{size-input-group.wXuG0-RB.js → size-input-group.BdYSDpsy.js} +5 -5
- package/library/chunks/{spinner.Bv06U7NJ.js → spinner.DPl3rjQY.js} +1 -1
- package/library/chunks/{split-panel.Cag0lAvv.js → split-panel.D4Hn_Esh.js} +1 -1
- package/library/chunks/{src.-wSEUjRV.js → src.BGRU1qh5.js} +49 -49
- package/library/chunks/{src.Dia365C9.js → src.DwbXw2Wv.js} +23 -23
- package/library/chunks/{step.D93ReCO1.js → step.CmqaPVg_.js} +3 -3
- package/library/chunks/{stepper-wizard.CPZ2mSze.js → stepper-wizard.H45UqSLe.js} +2 -2
- package/library/chunks/{stepper.D0JB_GVh.js → stepper.CDWfFmPh.js} +1 -1
- package/library/chunks/{tab-group.dnnT9Mk6.js → tab-group.6FT_XQDH.js} +7 -7
- package/library/chunks/{tab.CYYAua8Y.js → tab.q5aFhnHA.js} +3 -3
- package/library/chunks/{tag.DQLauctm.js → tag.BSBIN-rz.js} +3 -3
- package/library/chunks/{tooltip.Cc02vm6M.js → tooltip.DurE2LL4.js} +17 -21
- package/library/chunks/{tree.BI7r-WnZ.js → tree.C0imvgIg.js} +4 -4
- package/library/chunks/{typeface.DTLrIP0B.js → typeface.DPVH5wzi.js} +3 -3
- package/library/chunks/{video.DWmHPbXO.js → video.CYO0jBx9.js} +6 -6
- package/library/components/alert.js +1 -1
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +1 -1
- package/library/components/atoms.js +50 -50
- package/library/components/audio.js +1 -1
- package/library/components/bicolor-picker.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +1 -1
- package/library/components/checkbox.js +1 -1
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/color-swatch.js +1 -1
- package/library/components/confirm-popover.js +1 -1
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +1 -1
- package/library/components/cropper.js +1 -1
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dot-pagination.js +1 -1
- package/library/components/drawer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +1 -1
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/folder-select.js +1 -1
- 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 +1 -1
- package/library/components/icon-button.js +1 -1
- package/library/components/iframe.js +1 -1
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +1 -1
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +1 -1
- package/library/components/masonry.js +1 -1
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +17 -17
- package/library/components/option.js +1 -1
- package/library/components/organisms.js +3 -3
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +1 -1
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +1 -1
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +1 -1
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/tab.js +1 -1
- package/library/components/tag.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +1 -1
- package/library/components/tree.js +1 -1
- package/library/components/typeface.js +1 -1
- package/library/components/types.js +21886 -19119
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -2
- package/library/packages/atoms/src/components/date-calendar/date-calendar.d.ts +62 -9
- package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +6 -0
- package/library/packages/atoms/src/components/input/input.d.ts +20 -1
- package/library/packages/atoms/src/components/line-clamp/line-clamp.d.ts +3 -0
- package/library/packages/atoms/src/components/radio/radio.d.ts +3 -0
- package/library/packages/atoms/src/components/select/select.d.ts +0 -4
- package/library/packages/atoms/src/components/tooltip/tooltip.d.ts +4 -1
- package/library/packages/events/src/cx-search-facet-date-change.d.ts +11 -0
- package/library/packages/events/src/cx-search-facet-focus-title.d.ts +10 -0
- package/library/packages/events/src/cx-search-facet-reset.d.ts +12 -0
- package/library/packages/events/src/cx-search-facet-select-all.d.ts +13 -0
- package/library/packages/events/src/cx-search-facet-show-more.d.ts +12 -0
- package/library/packages/events/src/cx-search-facet-toggle.d.ts +11 -0
- package/library/packages/events/src/cx-search-facets-apply.d.ts +17 -0
- package/library/packages/events/src/cx-search-facets-change-filters.d.ts +6 -0
- package/library/packages/events/src/cx-search-facets-clear-all.d.ts +10 -0
- package/library/packages/events/src/cx-search-facets-custom.d.ts +10 -0
- package/library/packages/events/src/cx-search-facets-facet-expand.d.ts +9 -0
- package/library/packages/events/src/cx-search-facets-node-expand.d.ts +11 -0
- package/library/packages/events/src/cx-search-facets-refresh.d.ts +6 -0
- package/library/packages/events/src/cx-search-facets-show-more.d.ts +8 -0
- package/library/packages/events/src/cx-search-facets-summary-expand.d.ts +9 -0
- package/library/packages/events/src/cx-search-facets-summary-remove.d.ts +12 -0
- package/library/packages/events/src/events.d.ts +16 -0
- package/library/packages/molecules/src/input-date-picker/input-date-picker.d.ts +116 -0
- package/library/packages/molecules/src/sidebar/sidebar.d.ts +1 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +7 -2
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/organisms/src/search-facets/components/search-facet/search-facet.d.ts +95 -0
- package/library/packages/organisms/src/search-facets/components/search-facet/search-facet.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-advanced-date/advanced-date-reading.d.ts +90 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-advanced-date/search-facet-advanced-date.d.ts +85 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-advanced-date/search-facet-advanced-date.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-color/search-facet-color.d.ts +47 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-color/search-facet-color.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-date/date-range-validation.d.ts +67 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-date/search-facet-date.d.ts +120 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-date/search-facet-date.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-similar/search-facet-similar.d.ts +44 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-similar/search-facet-similar.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-tree/search-facet-tree.d.ts +104 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-tree/search-facet-tree.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-tree/visible-nodes.d.ts +36 -0
- package/library/packages/organisms/src/search-facets/components/search-facets-summary/search-facets-summary.d.ts +67 -0
- package/library/packages/organisms/src/search-facets/components/search-facets-summary/search-facets-summary.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/search-facets.d.ts +198 -0
- package/library/packages/organisms/src/search-facets/search-facets.fixtures.d.ts +141 -0
- package/library/packages/organisms/src/search-facets/search-facets.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/state/date-drafts.d.ts +11 -0
- package/library/packages/organisms/src/search-facets/state/long-panel.d.ts +7 -0
- package/library/packages/organisms/src/search-facets/state/preview-summary.d.ts +17 -0
- package/library/packages/organisms/src/search-facets/state/preview-waiting-changes.d.ts +12 -0
- package/library/packages/organisms/src/search-facets/state/response-correlation.d.ts +9 -0
- package/library/packages/organisms/src/search-facets/state/waiting-changes.d.ts +179 -0
- package/library/packages/organisms/src/search-facets/types.d.ts +347 -0
- package/library/packages/types/src/asset-link-format.d.ts +6 -0
- package/library/packages/types/src/search-facets.d.ts +104 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +39 -0
- package/library/packages/utils/src/date/calendar-grid.d.ts +5 -6
- package/library/packages/utils/src/date/date.d.ts +7 -1
- package/library/react-web-component.d.ts +87 -5
- package/library/utils.js +10 -10
- package/package.json +1 -1
- package/library/chunks/date-calendar.B7e6WBzh.js +0 -78
- package/library/chunks/date.BL4L64Hx.js +0 -358
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
//#region ../../packages/utils/src/date/date.ts
|
|
2
|
-
var e = /^\d{4}-\d{2}-\d{2}$/;
|
|
3
|
-
function t(t) {
|
|
4
|
-
if (!e.test(t)) return !1;
|
|
5
|
-
let [n, r, i] = t.split("-").map(Number), a = new Date(n, r - 1, i);
|
|
6
|
-
return a.getFullYear() === n && a.getMonth() === r - 1 && a.getDate() === i;
|
|
7
|
-
}
|
|
8
|
-
function n(e, t, n) {
|
|
9
|
-
return [
|
|
10
|
-
String(e).padStart(4, "0"),
|
|
11
|
-
String(t).padStart(2, "0"),
|
|
12
|
-
String(n).padStart(2, "0")
|
|
13
|
-
].join("-");
|
|
14
|
-
}
|
|
15
|
-
function r(e) {
|
|
16
|
-
let [t, n, r] = e.split("-").map(Number);
|
|
17
|
-
return {
|
|
18
|
-
day: r,
|
|
19
|
-
month: n,
|
|
20
|
-
year: t
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function i(e) {
|
|
24
|
-
if (!t(e)) return;
|
|
25
|
-
let { day: n, month: i, year: a } = r(e);
|
|
26
|
-
return new Date(a, i - 1, n);
|
|
27
|
-
}
|
|
28
|
-
function a(e) {
|
|
29
|
-
let t = e.includes("/") ? "/" : "-";
|
|
30
|
-
return {
|
|
31
|
-
order: e.split(t),
|
|
32
|
-
separator: t
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function o(e) {
|
|
36
|
-
let { order: t, separator: n } = a(e), r = {
|
|
37
|
-
DD: "d",
|
|
38
|
-
MM: "m",
|
|
39
|
-
YYYY: "Y"
|
|
40
|
-
};
|
|
41
|
-
return t.map((e) => r[e]).join(`{${n}}`);
|
|
42
|
-
}
|
|
43
|
-
function s(e, t) {
|
|
44
|
-
if (!e) return "";
|
|
45
|
-
let [n, r, i] = e.split("-"), { order: o, separator: s } = a(t), c = {
|
|
46
|
-
DD: i,
|
|
47
|
-
MM: r,
|
|
48
|
-
YYYY: n
|
|
49
|
-
};
|
|
50
|
-
return o.map((e) => c[e]).join(s);
|
|
51
|
-
}
|
|
52
|
-
function c(e, t) {
|
|
53
|
-
let { order: n, separator: r } = a(t), i = e.split(r);
|
|
54
|
-
if (i.length !== 3) return "";
|
|
55
|
-
let o = {
|
|
56
|
-
DD: "",
|
|
57
|
-
MM: "",
|
|
58
|
-
YYYY: ""
|
|
59
|
-
};
|
|
60
|
-
n.forEach((e, t) => {
|
|
61
|
-
o[e] = i[t];
|
|
62
|
-
});
|
|
63
|
-
let { DD: s, MM: c, YYYY: l } = o;
|
|
64
|
-
return !s || !c || l.length < 4 ? "" : `${l}-${c.padStart(2, "0")}-${s.padStart(2, "0")}`;
|
|
65
|
-
}
|
|
66
|
-
function l() {
|
|
67
|
-
let e = /* @__PURE__ */ new Date();
|
|
68
|
-
return n(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
69
|
-
}
|
|
70
|
-
function u(e, t, n) {
|
|
71
|
-
let r = new Date(e, t - 1 + n, 1);
|
|
72
|
-
return {
|
|
73
|
-
month: r.getMonth() + 1,
|
|
74
|
-
year: r.getFullYear()
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function d(e, t) {
|
|
78
|
-
return new Date(e, t - 1, 1).toLocaleDateString("en-US", {
|
|
79
|
-
month: "long",
|
|
80
|
-
year: "numeric"
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
function f(e, t) {
|
|
84
|
-
return new Date(e, t - 1, 1).getDay();
|
|
85
|
-
}
|
|
86
|
-
var p = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
|
|
87
|
-
function m(e) {
|
|
88
|
-
let t = new Date(e);
|
|
89
|
-
return isNaN(t.getTime()) ? null : n(t.getFullYear(), t.getMonth() + 1, t.getDate());
|
|
90
|
-
}
|
|
91
|
-
function h(e) {
|
|
92
|
-
return e ? t(e) ? e : p.test(e) ? m(e) : (console.warn(`[normalizeToIsoDate] Unsupported date format: "${e}". Expected YYYY-MM-DD or ISO UTC datetime (e.g. 2026-06-05T00:00:00.000Z).`), null) : null;
|
|
93
|
-
}
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region ../../packages/utils/src/date/calendar-grid.ts
|
|
96
|
-
var g = class {
|
|
97
|
-
static generate(e) {
|
|
98
|
-
let { maxDate: r, minDate: i, selectedDate: a, todayDate: o, viewMonth: s, viewYear: c } = e, l = f(c, s), u = new Date(c, s - 1, 1 - l), d = [];
|
|
99
|
-
for (let e = 0; e < 35; e++) {
|
|
100
|
-
let c = new Date(u);
|
|
101
|
-
c.setDate(u.getDate() + e);
|
|
102
|
-
let l = c.getFullYear(), f = c.getMonth() + 1, p = c.getDate(), m = n(l, f, p), h = t(i) && m < i, g = t(r) && m > r;
|
|
103
|
-
d.push({
|
|
104
|
-
date: m,
|
|
105
|
-
day: p,
|
|
106
|
-
isDisabled: h || g,
|
|
107
|
-
isOutside: f !== s,
|
|
108
|
-
isSelected: t(a) && m === a,
|
|
109
|
-
isToday: m === o,
|
|
110
|
-
month: f,
|
|
111
|
-
year: l
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
return d;
|
|
115
|
-
}
|
|
116
|
-
}, _ = "00:00:00", v = "23:59:59", y = Array.from({ length: 24 }, (e, t) => {
|
|
117
|
-
let n = t < 12 ? "am" : "pm";
|
|
118
|
-
return {
|
|
119
|
-
label: `${t % 12 || 12}${n}`,
|
|
120
|
-
value: String(t).padStart(2, "0")
|
|
121
|
-
};
|
|
122
|
-
}), b = Array.from({ length: 60 }, (e, t) => String(t).padStart(2, "0")), x = {
|
|
123
|
-
last2Days: "last-2-days",
|
|
124
|
-
last30Days: "last-30-days",
|
|
125
|
-
last30Minutes: "last-30-minutes",
|
|
126
|
-
last3Days: "last-3-days",
|
|
127
|
-
lastDay: "last-day",
|
|
128
|
-
lastHalfYear: "last-half-year",
|
|
129
|
-
lastMonth: "last-month",
|
|
130
|
-
lastQuarter: "last-quarter",
|
|
131
|
-
lastWeek: "last-week",
|
|
132
|
-
lastYear: "last-year",
|
|
133
|
-
next30Days: "next-30-days",
|
|
134
|
-
thisHalfYear: "this-half-year",
|
|
135
|
-
thisMonth: "this-month",
|
|
136
|
-
thisQuarter: "this-quarter",
|
|
137
|
-
thisWeek: "this-week",
|
|
138
|
-
thisYear: "this-year",
|
|
139
|
-
today: "today"
|
|
140
|
-
}, S = [
|
|
141
|
-
x.last30Minutes,
|
|
142
|
-
x.today,
|
|
143
|
-
x.lastDay,
|
|
144
|
-
x.last2Days,
|
|
145
|
-
x.last3Days,
|
|
146
|
-
x.last30Days,
|
|
147
|
-
x.next30Days,
|
|
148
|
-
x.thisWeek,
|
|
149
|
-
x.lastWeek,
|
|
150
|
-
x.thisMonth,
|
|
151
|
-
x.lastMonth,
|
|
152
|
-
x.lastQuarter,
|
|
153
|
-
x.lastHalfYear,
|
|
154
|
-
x.thisQuarter,
|
|
155
|
-
x.thisHalfYear,
|
|
156
|
-
x.thisYear,
|
|
157
|
-
x.lastYear
|
|
158
|
-
], C = {
|
|
159
|
-
[x.last2Days]: "presetLast2Days",
|
|
160
|
-
[x.last3Days]: "presetLast3Days",
|
|
161
|
-
[x.last30Days]: "presetLast30Days",
|
|
162
|
-
[x.last30Minutes]: "presetLast30Minutes",
|
|
163
|
-
[x.lastDay]: "presetLastDay",
|
|
164
|
-
[x.lastHalfYear]: "presetLastHalfYear",
|
|
165
|
-
[x.lastMonth]: "presetLastMonth",
|
|
166
|
-
[x.lastQuarter]: "presetLastQuarter",
|
|
167
|
-
[x.lastWeek]: "presetLastWeek",
|
|
168
|
-
[x.lastYear]: "presetLastYear",
|
|
169
|
-
[x.next30Days]: "presetNext30Days",
|
|
170
|
-
[x.thisHalfYear]: "presetThisHalfYear",
|
|
171
|
-
[x.thisMonth]: "presetThisMonth",
|
|
172
|
-
[x.thisQuarter]: "presetThisQuarter",
|
|
173
|
-
[x.thisWeek]: "presetThisWeek",
|
|
174
|
-
[x.thisYear]: "presetThisYear",
|
|
175
|
-
[x.today]: "presetToday"
|
|
176
|
-
}, w = /* @__PURE__ */ function(e) {
|
|
177
|
-
return e.DdMmYyyy = "ddmmyyyy", e.MmDdYyyy = "mmddyyyy", e.YyyyMmDd = "yyyymmdd", e;
|
|
178
|
-
}({}), T = {
|
|
179
|
-
ddmmyyyy: "DD/MM/YYYY",
|
|
180
|
-
mmddyyyy: "MM/DD/YYYY",
|
|
181
|
-
yyyymmdd: "YYYY/MM/DD"
|
|
182
|
-
};
|
|
183
|
-
function E(e) {
|
|
184
|
-
return T[e] ?? e;
|
|
185
|
-
}
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region ../../packages/utils/src/date/date-range-preset.ts
|
|
188
|
-
function D(e) {
|
|
189
|
-
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
190
|
-
}
|
|
191
|
-
function O(e) {
|
|
192
|
-
return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}:${String(e.getSeconds()).padStart(2, "0")}`;
|
|
193
|
-
}
|
|
194
|
-
function k(e, t) {
|
|
195
|
-
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
|
|
196
|
-
}
|
|
197
|
-
function A(e) {
|
|
198
|
-
let t = e.getDay();
|
|
199
|
-
return k(e, t === 0 ? -6 : 1 - t);
|
|
200
|
-
}
|
|
201
|
-
function j(e) {
|
|
202
|
-
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
203
|
-
}
|
|
204
|
-
function M(e) {
|
|
205
|
-
return new Date(e.getFullYear(), e.getMonth() + 1, 0);
|
|
206
|
-
}
|
|
207
|
-
function N(e) {
|
|
208
|
-
let t = Math.floor(e.getMonth() / 3) * 3;
|
|
209
|
-
return new Date(e.getFullYear(), t, 1);
|
|
210
|
-
}
|
|
211
|
-
function P(e) {
|
|
212
|
-
let t = Math.floor(e.getMonth() / 3) * 3;
|
|
213
|
-
return new Date(e.getFullYear(), t + 3, 0);
|
|
214
|
-
}
|
|
215
|
-
function F(e) {
|
|
216
|
-
let t = e.getMonth() < 6 ? 0 : 6;
|
|
217
|
-
return new Date(e.getFullYear(), t, 1);
|
|
218
|
-
}
|
|
219
|
-
function I(e) {
|
|
220
|
-
let t = e.getMonth() < 6 ? 0 : 6;
|
|
221
|
-
return new Date(e.getFullYear(), t + 6, 0);
|
|
222
|
-
}
|
|
223
|
-
var L = class {
|
|
224
|
-
static getRange(e, t) {
|
|
225
|
-
let n = D(t);
|
|
226
|
-
switch (e) {
|
|
227
|
-
case x.last30Minutes: {
|
|
228
|
-
let e = /* @__PURE__ */ new Date(t.getTime() - 18e5);
|
|
229
|
-
return {
|
|
230
|
-
fromDate: D(e),
|
|
231
|
-
fromTime: O(e),
|
|
232
|
-
toDate: n,
|
|
233
|
-
toTime: O(t)
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
case x.today: return {
|
|
237
|
-
fromDate: n,
|
|
238
|
-
fromTime: _,
|
|
239
|
-
toDate: n,
|
|
240
|
-
toTime: v
|
|
241
|
-
};
|
|
242
|
-
case x.lastDay: {
|
|
243
|
-
let e = D(k(t, -1));
|
|
244
|
-
return {
|
|
245
|
-
fromDate: e,
|
|
246
|
-
fromTime: _,
|
|
247
|
-
toDate: e,
|
|
248
|
-
toTime: v
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
case x.last2Days: return {
|
|
252
|
-
fromDate: D(k(t, -1)),
|
|
253
|
-
fromTime: _,
|
|
254
|
-
toDate: n,
|
|
255
|
-
toTime: v
|
|
256
|
-
};
|
|
257
|
-
case x.last3Days: return {
|
|
258
|
-
fromDate: D(k(t, -2)),
|
|
259
|
-
fromTime: _,
|
|
260
|
-
toDate: n,
|
|
261
|
-
toTime: v
|
|
262
|
-
};
|
|
263
|
-
case x.last30Days: return {
|
|
264
|
-
fromDate: D(k(t, -29)),
|
|
265
|
-
fromTime: _,
|
|
266
|
-
toDate: n,
|
|
267
|
-
toTime: v
|
|
268
|
-
};
|
|
269
|
-
case x.next30Days: return {
|
|
270
|
-
fromDate: n,
|
|
271
|
-
fromTime: _,
|
|
272
|
-
toDate: D(k(t, 30)),
|
|
273
|
-
toTime: v
|
|
274
|
-
};
|
|
275
|
-
case x.thisWeek: {
|
|
276
|
-
let e = A(t);
|
|
277
|
-
return {
|
|
278
|
-
fromDate: D(e),
|
|
279
|
-
fromTime: _,
|
|
280
|
-
toDate: D(k(e, 6)),
|
|
281
|
-
toTime: v
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
case x.lastWeek: {
|
|
285
|
-
let e = k(A(t), -7);
|
|
286
|
-
return {
|
|
287
|
-
fromDate: D(e),
|
|
288
|
-
fromTime: _,
|
|
289
|
-
toDate: D(k(e, 6)),
|
|
290
|
-
toTime: v
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
case x.thisMonth: return {
|
|
294
|
-
fromDate: D(j(t)),
|
|
295
|
-
fromTime: _,
|
|
296
|
-
toDate: D(M(t)),
|
|
297
|
-
toTime: v
|
|
298
|
-
};
|
|
299
|
-
case x.lastMonth: {
|
|
300
|
-
let e = new Date(t.getFullYear(), t.getMonth() - 1, 1);
|
|
301
|
-
return {
|
|
302
|
-
fromDate: D(j(e)),
|
|
303
|
-
fromTime: _,
|
|
304
|
-
toDate: D(M(e)),
|
|
305
|
-
toTime: v
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
case x.thisQuarter: return {
|
|
309
|
-
fromDate: D(N(t)),
|
|
310
|
-
fromTime: _,
|
|
311
|
-
toDate: D(P(t)),
|
|
312
|
-
toTime: v
|
|
313
|
-
};
|
|
314
|
-
case x.lastQuarter: {
|
|
315
|
-
let e = new Date(t.getFullYear(), t.getMonth() - 3, 1);
|
|
316
|
-
return {
|
|
317
|
-
fromDate: D(N(e)),
|
|
318
|
-
fromTime: _,
|
|
319
|
-
toDate: D(P(e)),
|
|
320
|
-
toTime: v
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
case x.thisHalfYear: return {
|
|
324
|
-
fromDate: D(F(t)),
|
|
325
|
-
fromTime: _,
|
|
326
|
-
toDate: D(I(t)),
|
|
327
|
-
toTime: v
|
|
328
|
-
};
|
|
329
|
-
case x.lastHalfYear: {
|
|
330
|
-
let e = new Date(t.getFullYear(), t.getMonth() - 6, 1);
|
|
331
|
-
return {
|
|
332
|
-
fromDate: D(F(e)),
|
|
333
|
-
fromTime: _,
|
|
334
|
-
toDate: D(I(e)),
|
|
335
|
-
toTime: v
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
case x.thisYear: return {
|
|
339
|
-
fromDate: `${t.getFullYear()}-01-01`,
|
|
340
|
-
fromTime: _,
|
|
341
|
-
toDate: `${t.getFullYear()}-12-31`,
|
|
342
|
-
toTime: v
|
|
343
|
-
};
|
|
344
|
-
case x.lastYear: {
|
|
345
|
-
let e = t.getFullYear() - 1;
|
|
346
|
-
return {
|
|
347
|
-
fromDate: `${e}-01-01`,
|
|
348
|
-
fromTime: _,
|
|
349
|
-
toDate: `${e}-12-31`,
|
|
350
|
-
toTime: v
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
throw Error(`Unsupported date range preset: ${e}`);
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
//#endregion
|
|
358
|
-
export { n as S, t as _, w as a, c as b, C as c, u as d, s as f, l as g, f as h, v as i, E as l, o as m, S as n, y as o, d as p, _ as r, b as s, L as t, g as u, i as v, r as x, h as y };
|