@owp/core 1.9.2 → 1.9.3
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/dist/{QuickPanel-BG1SOf3X.js → QuickPanel-TFVo9YhU.js} +2 -2
- package/dist/{QuickPanel-BG1SOf3X.js.map → QuickPanel-TFVo9YhU.js.map} +1 -1
- package/dist/{index-CCWKYjQT.js → index-CkGE8ksF.js} +43 -28
- package/dist/{index-CCWKYjQT.js.map → index-CkGE8ksF.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpPicker/DatePickerInput.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
2
|
var o = (d, n) => b(d, "name", { value: n, configurable: !0 });
|
|
3
|
-
import { u as D, a as k, s as T, b as v, j as e, c as r, f as p, O as f, d as C, t as I } from "./index-
|
|
3
|
+
import { u as D, a as k, s as T, b as v, j as e, c as r, f as p, O as f, d as C, t as I } from "./index-CkGE8ksF.js";
|
|
4
4
|
import u from "@mui/material/Divider";
|
|
5
5
|
import y from "@mui/material/List";
|
|
6
6
|
import c from "@mui/material/ListItem";
|
|
@@ -100,4 +100,4 @@ o(V, "QuickPanel");
|
|
|
100
100
|
export {
|
|
101
101
|
V as default
|
|
102
102
|
};
|
|
103
|
-
//# sourceMappingURL=QuickPanel-
|
|
103
|
+
//# sourceMappingURL=QuickPanel-TFVo9YhU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickPanel-
|
|
1
|
+
{"version":3,"file":"QuickPanel-TFVo9YhU.js","sources":["../src/components/layouts/shared-components/quickPanel/QuickPanel.tsx"],"sourcesContent":["import { OwpScrollbars } from '@/components/OwpScrollbars';\nimport { OwpSvgIcon } from '@/components/OwpSvgIcon';\nimport { useAppDispatch, useAppSelector } from '@/store/hooks';\nimport Divider from '@mui/material/Divider';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';\nimport ListItemText from '@mui/material/ListItemText';\nimport ListSubheader from '@mui/material/ListSubheader';\nimport { styled } from '@mui/material/styles';\nimport SwipeableDrawer from '@mui/material/SwipeableDrawer';\nimport Switch from '@mui/material/Switch';\nimport Typography from '@mui/material/Typography';\nimport { format } from 'date-fns/format';\nimport { useState } from 'react';\nimport { selectQuickPanelData, selectQuickPanelOpen, toggleQuickPanel } from './quickPanelSlice';\n\nconst StyledSwipeableDrawer = styled(SwipeableDrawer)(() => ({\n '& .MuiDrawer-paper': {\n width: 280,\n },\n}));\n\n/**\n * The quick panel.\n */\nfunction QuickPanel() {\n const dispatch = useAppDispatch();\n const data = useAppSelector(selectQuickPanelData);\n const open = useAppSelector(selectQuickPanelOpen);\n\n const [checked, setChecked] = useState<string[]>(['notifications']);\n\n const handleToggle = (value: string) => () => {\n const currentIndex = checked.indexOf(value);\n const newChecked = [...checked];\n\n if (currentIndex === -1) {\n newChecked.push(value);\n } else {\n newChecked.splice(currentIndex, 1);\n }\n\n setChecked(newChecked);\n };\n\n return (\n <StyledSwipeableDrawer\n open={open as boolean}\n anchor=\"right\"\n onOpen={() => {}}\n onClose={() => dispatch(toggleQuickPanel())}\n disableSwipeToOpen\n >\n <OwpScrollbars>\n <ListSubheader component=\"div\">Today</ListSubheader>\n\n <div className=\"mb-0 px-24 py-16\">\n <Typography className=\"mb-12 text-5xl\" color=\"text.secondary\">\n {format(new Date(), 'eeee')}\n </Typography>\n <div className=\"flex\">\n <Typography className=\"text-5xl leading-none\" color=\"text.secondary\">\n {format(new Date(), 'dd')}\n </Typography>\n <Typography className=\"text-15 leading-none\" color=\"text.secondary\">\n th\n </Typography>\n <Typography className=\"text-5xl leading-none\" color=\"text.secondary\">\n {format(new Date(), 'MMMM')}\n </Typography>\n </div>\n </div>\n <Divider />\n <List>\n <ListSubheader component=\"div\">Events</ListSubheader>\n {data &&\n (data as any).events.map((event: any) => (\n <ListItem key={event.id}>\n <ListItemText primary={event.title} secondary={event.detail} />\n </ListItem>\n ))}\n </List>\n <Divider />\n <List>\n <ListSubheader component=\"div\">Notes</ListSubheader>\n {data &&\n (data as any).notes.map((note: any) => (\n <ListItem key={note.id}>\n <ListItemText primary={note.title} secondary={note.detail} />\n </ListItem>\n ))}\n </List>\n <Divider />\n <List>\n <ListSubheader component=\"div\">Quick Settings</ListSubheader>\n <ListItem>\n <ListItemIcon className=\"min-w-36\">\n <OwpSvgIcon>material-outline:notifications</OwpSvgIcon>\n </ListItemIcon>\n <ListItemText primary=\"Notifications\" />\n <ListItemSecondaryAction>\n <Switch\n color=\"primary\"\n onChange={handleToggle('notifications')}\n checked={checked.indexOf('notifications') !== -1}\n />\n </ListItemSecondaryAction>\n </ListItem>\n <ListItem>\n <ListItemIcon className=\"min-w-36\">\n <OwpSvgIcon>material-outline:cloud</OwpSvgIcon>\n </ListItemIcon>\n <ListItemText primary=\"Cloud Sync\" />\n <ListItemSecondaryAction>\n <Switch\n color=\"secondary\"\n onChange={handleToggle('cloudSync')}\n checked={checked.indexOf('cloudSync') !== -1}\n />\n </ListItemSecondaryAction>\n </ListItem>\n <ListItem>\n <ListItemIcon className=\"min-w-36\">\n <OwpSvgIcon>material-outline:brightness_high</OwpSvgIcon>\n </ListItemIcon>\n <ListItemText primary=\"Retro Thrusters\" />\n <ListItemSecondaryAction>\n <Switch\n color=\"primary\"\n onChange={handleToggle('retroThrusters')}\n checked={checked.indexOf('retroThrusters') !== -1}\n />\n </ListItemSecondaryAction>\n </ListItem>\n </List>\n </OwpScrollbars>\n </StyledSwipeableDrawer>\n );\n}\n\nexport default QuickPanel;\n"],"names":["StyledSwipeableDrawer","styled","SwipeableDrawer","QuickPanel","dispatch","useAppDispatch","data","useAppSelector","selectQuickPanelData","open","selectQuickPanelOpen","checked","setChecked","useState","handleToggle","__name","value","currentIndex","newChecked","jsx","toggleQuickPanel","OwpScrollbars","ListSubheader","jsxs","Typography","format","Divider","List","event","ListItem","ListItemText","note","ListItemIcon","OwpSvgIcon","ListItemSecondaryAction","Switch"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAMA,IAAwBC,EAAOC,CAAe,EAAE,OAAO;AAAA,EAC3D,sBAAsB;AAAA,IACpB,OAAO;AAAA,EAAA;AAEX,EAAE;AAKF,SAASC,IAAa;AACpB,QAAMC,IAAWC,EAAA,GACXC,IAAOC,EAAeC,CAAoB,GAC1CC,IAAOF,EAAeG,CAAoB,GAE1C,CAACC,GAASC,CAAU,IAAIC,EAAmB,CAAC,eAAe,CAAC,GAE5DC,IAAe,gBAAAC,EAAA,CAACC,MAAkB,MAAM;AAC5C,UAAMC,IAAeN,EAAQ,QAAQK,CAAK,GACpCE,IAAa,CAAC,GAAGP,CAAO;AAE9B,IAAIM,MAAiB,KACnBC,EAAW,KAAKF,CAAK,IAErBE,EAAW,OAAOD,GAAc,CAAC,GAGnCL,EAAWM,CAAU;AAAA,EACvB,GAXqB;AAarB,SACE,gBAAAC;AAAA,IAACnB;AAAA,IAAA;AAAA,MACC,MAAAS;AAAA,MACA,QAAO;AAAA,MACP,QAAQ,gBAAAM,EAAA,MAAM;AAAA,MAAC,GAAP;AAAA,MACR,SAAS,gBAAAA,EAAA,MAAMX,EAASgB,GAAkB,GAAjC;AAAA,MACT,oBAAkB;AAAA,MAElB,4BAACC,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAF,EAACG,GAAA,EAAc,WAAU,OAAM,UAAA,SAAK;AAAA,QAEpC,gBAAAC,EAAC,OAAA,EAAI,WAAU,oBACb,UAAA;AAAA,UAAA,gBAAAJ,EAACK,GAAA,EAAW,WAAU,kBAAiB,OAAM,kBAC1C,YAAO,oBAAI,QAAQ,MAAM,EAAA,CAC5B;AAAA,UACA,gBAAAD,EAAC,OAAA,EAAI,WAAU,QACb,UAAA;AAAA,YAAA,gBAAAJ,EAACK,GAAA,EAAW,WAAU,yBA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./QuickPanel-
|
|
39205
|
+
() => import("./QuickPanel-TFVo9YhU.js")
|
|
39206
39206
|
);
|
|
39207
39207
|
function $te() {
|
|
39208
39208
|
return /* @__PURE__ */ O(Vc, { children: /* @__PURE__ */ O(Hte, {}) });
|
|
@@ -39787,7 +39787,7 @@ a(pne, "NavbarWrapperLayout3");
|
|
|
39787
39787
|
const mne = sf([zd])(
|
|
39788
39788
|
Tt(pne)
|
|
39789
39789
|
), gne = yb(
|
|
39790
|
-
() => import("./QuickPanel-
|
|
39790
|
+
() => import("./QuickPanel-TFVo9YhU.js")
|
|
39791
39791
|
);
|
|
39792
39792
|
function vne() {
|
|
39793
39793
|
return /* @__PURE__ */ O(Vc, { children: /* @__PURE__ */ O(gne, {}) });
|
|
@@ -73110,19 +73110,27 @@ const Fm = /* @__PURE__ */ a(({ children: e }) => {
|
|
|
73110
73110
|
showTimeSelectOnly: i,
|
|
73111
73111
|
disabledClearButton: o,
|
|
73112
73112
|
reset: s,
|
|
73113
|
-
|
|
73114
|
-
|
|
73115
|
-
|
|
73116
|
-
|
|
73113
|
+
onInputAreaClick: l,
|
|
73114
|
+
onIconClick: c,
|
|
73115
|
+
onClick: u,
|
|
73116
|
+
...d
|
|
73117
|
+
}, f) => {
|
|
73118
|
+
var v;
|
|
73119
|
+
const p = r || i, h = /* @__PURE__ */ a((b) => {
|
|
73120
|
+
l == null || l(), u == null || u(b);
|
|
73121
|
+
}, "handleInputClick"), g = /* @__PURE__ */ a((b) => {
|
|
73122
|
+
b.stopPropagation(), c == null || c(), u == null || u(b);
|
|
73123
|
+
}, "handleIconClick");
|
|
73117
73124
|
return /* @__PURE__ */ O(
|
|
73118
73125
|
jo,
|
|
73119
73126
|
{
|
|
73120
|
-
inputRef:
|
|
73127
|
+
inputRef: f,
|
|
73121
73128
|
variant: "standard",
|
|
73122
|
-
...
|
|
73123
|
-
|
|
73129
|
+
...d,
|
|
73130
|
+
onClick: h,
|
|
73131
|
+
value: e ? n ? typeof e == "string" ? e.split(" - ").map((b) => Wn(b).isValid() ? Wn(b).format(t) : "").join(" ~ ") : "" : i && typeof e == "string" ? e : Wn(e).format(t) : "",
|
|
73124
73132
|
slotProps: {
|
|
73125
|
-
...
|
|
73133
|
+
...d.slotProps,
|
|
73126
73134
|
input: {
|
|
73127
73135
|
readOnly: !0,
|
|
73128
73136
|
endAdornment: /* @__PURE__ */ be(h3, { position: "end", children: [
|
|
@@ -73131,8 +73139,8 @@ const Fm = /* @__PURE__ */ a(({ children: e }) => {
|
|
|
73131
73139
|
{
|
|
73132
73140
|
className: "m-0 p-0",
|
|
73133
73141
|
size: "small",
|
|
73134
|
-
onClick: /* @__PURE__ */ a((
|
|
73135
|
-
|
|
73142
|
+
onClick: /* @__PURE__ */ a((b) => {
|
|
73143
|
+
b.stopPropagation(), s == null || s();
|
|
73136
73144
|
}, "onClick"),
|
|
73137
73145
|
children: /* @__PURE__ */ O(IM, { fontSize: "small" })
|
|
73138
73146
|
}
|
|
@@ -73142,12 +73150,13 @@ const Fm = /* @__PURE__ */ a(({ children: e }) => {
|
|
|
73142
73150
|
{
|
|
73143
73151
|
className: "m-0 p-0",
|
|
73144
73152
|
size: "small",
|
|
73145
|
-
"aria-label":
|
|
73153
|
+
"aria-label": p ? "time-picker-trigger" : "date-picker-trigger",
|
|
73154
|
+
onClick: g,
|
|
73146
73155
|
children: i ? /* @__PURE__ */ O(gve, { fontSize: "small" }) : /* @__PURE__ */ O(vve, { fontSize: "small" })
|
|
73147
73156
|
}
|
|
73148
73157
|
)
|
|
73149
73158
|
] }),
|
|
73150
|
-
...(
|
|
73159
|
+
...(v = d.slotProps) == null ? void 0 : v.input
|
|
73151
73160
|
}
|
|
73152
73161
|
}
|
|
73153
73162
|
}
|
|
@@ -73175,23 +73184,27 @@ const $xe = /* @__PURE__ */ a(({
|
|
|
73175
73184
|
disabledFutureDates: v,
|
|
73176
73185
|
...b
|
|
73177
73186
|
}) => {
|
|
73178
|
-
const { t: y } = Mn("owp"), x = Qe(() => c ? qF : u ? Ll : f ? dh : p || d ? `${Dd} ${dh}` : Dd, [c, u, p, d, f]),
|
|
73187
|
+
const { t: y } = Mn("owp"), [x, w] = We("bottom-start"), S = Qe(() => c ? qF : u ? Ll : f ? dh : p || d ? `${Dd} ${dh}` : Dd, [c, u, p, d, f]), T = Qe(() => {
|
|
73179
73188
|
if (!i) return null;
|
|
73180
73189
|
if (f && typeof i == "string") {
|
|
73181
|
-
const [
|
|
73182
|
-
if (Number.isNaN(
|
|
73190
|
+
const [_ = "", R = ""] = i.split(":"), F = Number(_), D = Number(R);
|
|
73191
|
+
if (Number.isNaN(F) || Number.isNaN(D))
|
|
73183
73192
|
return null;
|
|
73184
|
-
const
|
|
73185
|
-
return
|
|
73193
|
+
const N = /* @__PURE__ */ new Date();
|
|
73194
|
+
return N.setHours(F, D, 0, 0), N;
|
|
73186
73195
|
}
|
|
73187
73196
|
return new Date(i);
|
|
73188
|
-
}, [f, i]),
|
|
73189
|
-
s == null || s(
|
|
73190
|
-
}, "handleSelect")
|
|
73197
|
+
}, [f, i]), A = /* @__PURE__ */ a((_) => {
|
|
73198
|
+
s == null || s(_ ? Wn(_).format(S) : void 0);
|
|
73199
|
+
}, "handleSelect"), C = /* @__PURE__ */ a(() => {
|
|
73200
|
+
f && w("bottom-start");
|
|
73201
|
+
}, "handleInputAreaClick"), E = /* @__PURE__ */ a(() => {
|
|
73202
|
+
f && w("bottom-end");
|
|
73203
|
+
}, "handleIconClick");
|
|
73191
73204
|
return /* @__PURE__ */ O(
|
|
73192
73205
|
Im,
|
|
73193
73206
|
{
|
|
73194
|
-
popperPlacement: "bottom-start",
|
|
73207
|
+
popperPlacement: f ? x : "bottom-start",
|
|
73195
73208
|
popperContainer: Fm,
|
|
73196
73209
|
className: Ce(l && "w-full"),
|
|
73197
73210
|
wrapperClassName: Ce(l && "w-full", b == null ? void 0 : b.wrapperClassName),
|
|
@@ -73202,8 +73215,8 @@ const $xe = /* @__PURE__ */ a(({
|
|
|
73202
73215
|
showTimeSelectOnly: f,
|
|
73203
73216
|
showTimeInput: p,
|
|
73204
73217
|
showPopperArrow: !1,
|
|
73205
|
-
selected:
|
|
73206
|
-
onChange:
|
|
73218
|
+
selected: T,
|
|
73219
|
+
onChange: A,
|
|
73207
73220
|
dateFormat: f ? o ? "aa hh:mm" : dh : "Pp",
|
|
73208
73221
|
timeFormat: f ? o ? "aa hh:mm" : dh : void 0,
|
|
73209
73222
|
customInput: /* @__PURE__ */ O(
|
|
@@ -73225,9 +73238,11 @@ const $xe = /* @__PURE__ */ a(({
|
|
|
73225
73238
|
reset: /* @__PURE__ */ a(() => s == null ? void 0 : s(""), "reset"),
|
|
73226
73239
|
fullWidth: l,
|
|
73227
73240
|
disabledClearButton: g,
|
|
73228
|
-
valueFormatter:
|
|
73241
|
+
valueFormatter: S,
|
|
73229
73242
|
showTimeSelect: d,
|
|
73230
|
-
showTimeSelectOnly: f
|
|
73243
|
+
showTimeSelectOnly: f,
|
|
73244
|
+
onInputAreaClick: C,
|
|
73245
|
+
onIconClick: E
|
|
73231
73246
|
}
|
|
73232
73247
|
),
|
|
73233
73248
|
timeCaption: f ? `${y("Common.시간", { defaultValue: "시간" })}: ` : void 0,
|
|
@@ -77451,4 +77466,4 @@ export {
|
|
|
77451
77466
|
vye as y,
|
|
77452
77467
|
bye as z
|
|
77453
77468
|
};
|
|
77454
|
-
//# sourceMappingURL=index-
|
|
77469
|
+
//# sourceMappingURL=index-CkGE8ksF.js.map
|