@owp/core 2.1.5 → 2.1.6
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/Close-BvQGZ-9D.js +960 -0
- package/dist/Close-BvQGZ-9D.js.map +1 -0
- package/dist/contexts.js +4 -4
- package/dist/getStartPagePath-Dxtn_J32.js +21 -0
- package/dist/getStartPagePath-Dxtn_J32.js.map +1 -0
- package/dist/hooks.js +52 -52
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +4212 -4195
- package/dist/index.js.map +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpErrorStatusPage/OwpErrorStatusPage.d.ts +5 -0
- package/dist/types/components/OwpErrorStatusPage/index.d.ts +2 -0
- package/dist/types/hooks/useInitApp.d.ts +3 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/getStartPagePath.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/{usePageLockLoading-BGODEt_k.js → usePageLockLoading-BhgLOg3R.js} +2 -2
- package/dist/{usePageLockLoading-BGODEt_k.js.map → usePageLockLoading-BhgLOg3R.js.map} +1 -1
- package/dist/useShortcuts-BcLEOM-d.js +228 -0
- package/dist/useShortcuts-BcLEOM-d.js.map +1 -0
- package/dist/{useTreeGridExcelExport-Bfxx0cps.js → useTreeGridExcelExport-HRm8p-7o.js} +2 -2
- package/dist/{useTreeGridExcelExport-Bfxx0cps.js.map → useTreeGridExcelExport-HRm8p-7o.js.map} +1 -1
- package/dist/utils.js +11 -9
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/Close-DvFvpcJW.js +0 -981
- package/dist/Close-DvFvpcJW.js.map +0 -1
- package/dist/toUpper-D96_nWkI.js +0 -16
- package/dist/toUpper-D96_nWkI.js.map +0 -1
- package/dist/useShortcuts-BjtlXprQ.js +0 -236
- package/dist/useShortcuts-BjtlXprQ.js.map +0 -1
package/dist/{useTreeGridExcelExport-Bfxx0cps.js.map → useTreeGridExcelExport-HRm8p-7o.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTreeGridExcelExport-
|
|
1
|
+
{"version":3,"file":"useTreeGridExcelExport-HRm8p-7o.js","sources":["../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/function/debounce.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.mjs","../src/hooks/useThemeMediaQuery.ts","../src/hooks/useTreeGridExcelExport.ts"],"sourcesContent":["function debounce(func, debounceMs, { signal, edges } = {}) {\n let pendingThis = undefined;\n let pendingArgs = null;\n const leading = edges != null && edges.includes('leading');\n const trailing = edges == null || edges.includes('trailing');\n const invoke = () => {\n if (pendingArgs !== null) {\n func.apply(pendingThis, pendingArgs);\n pendingThis = undefined;\n pendingArgs = null;\n }\n };\n const onTimerEnd = () => {\n if (trailing) {\n invoke();\n }\n cancel();\n };\n let timeoutId = null;\n const schedule = () => {\n if (timeoutId != null) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = null;\n onTimerEnd();\n }, debounceMs);\n };\n const cancelTimer = () => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n const cancel = () => {\n cancelTimer();\n pendingThis = undefined;\n pendingArgs = null;\n };\n const flush = () => {\n invoke();\n };\n const debounced = function (...args) {\n if (signal?.aborted) {\n return;\n }\n pendingThis = this;\n pendingArgs = args;\n const isFirstCall = timeoutId == null;\n schedule();\n if (leading && isFirstCall) {\n invoke();\n }\n };\n debounced.schedule = schedule;\n debounced.cancel = cancel;\n debounced.flush = flush;\n signal?.addEventListener('abort', cancel, { once: true });\n return debounced;\n}\n\nexport { debounce };\n","import { debounce as debounce$1 } from '../../function/debounce.mjs';\n\nfunction debounce(func, debounceMs = 0, options = {}) {\n if (typeof options !== 'object') {\n options = {};\n }\n const { leading = false, trailing = true, maxWait } = options;\n const edges = Array(2);\n if (leading) {\n edges[0] = 'leading';\n }\n if (trailing) {\n edges[1] = 'trailing';\n }\n let result = undefined;\n let pendingAt = null;\n const _debounced = debounce$1(function (...args) {\n result = func.apply(this, args);\n pendingAt = null;\n }, debounceMs, { edges });\n const debounced = function (...args) {\n if (maxWait != null) {\n if (pendingAt === null) {\n pendingAt = Date.now();\n }\n if (Date.now() - pendingAt >= maxWait) {\n result = func.apply(this, args);\n pendingAt = Date.now();\n _debounced.cancel();\n _debounced.schedule();\n return result;\n }\n }\n _debounced.apply(this, args);\n return result;\n };\n const flush = () => {\n _debounced.flush();\n return result;\n };\n debounced.cancel = _debounced.cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport { debounce };\n","import { useTheme, type Theme } from '@mui/material/styles';\nimport { useEffect, useState } from 'react';\n\n/**\n * The useThemeMediaQuery function is a custom hook that returns a boolean indicating whether the current screen matches the specified media query.\n * It takes in a themeCallbackFunc as a parameter, which is a function that returns a string representing the media query to match.\n * It returns a boolean indicating whether the current screen matches the specified media query.\n */\nexport function useThemeMediaQuery(themeCallbackFunc: (theme: Theme) => string) {\n const theme = useTheme();\n\n const query = themeCallbackFunc(theme).replace('@media ', '');\n\n \n function getMatches(q: string) {\n return window.matchMedia(q).matches;\n }\n\n const [matches, setMatches] = useState(getMatches(query));\n\n useEffect(\n () => {\n const mediaQuery = window.matchMedia(query);\n\n \n setMatches(getMatches(query));\n\n \n const handler = (event: MediaQueryListEvent) => setMatches(event.matches);\n\n \n mediaQuery.addEventListener('change', handler);\n\n \n return () => mediaQuery.removeEventListener('change', handler);\n },\n [query], \n );\n\n return matches;\n}\n","import {\n ExportTreeGridExcelOptions,\n exportTreeGridExcel,\n} from '@/utils/treeGridExportExcelUtil';\nimport { getTreeGridById } from '@/utils/treeGridUtil';\nimport { useRef, useState } from 'react';\nimport { useOwpTranslation } from './useOwpTranslation';\n\nexport type UseTreeGridExcelExportOptions = Omit<ExportTreeGridExcelOptions, 't'> | string;\n\n/**\n * TreeGrid 엑셀 내보내기 훅\n * @param gridId TreeGrid 인스턴스 ID\n */\nexport const useTreeGridExcelExport = (gridId: string) => {\n const { t } = useOwpTranslation();\n const exportPendingRef = useRef(false);\n const [isExporting, setIsExporting] = useState(false);\n\n \n const exportByTreeGrid = async (options?: UseTreeGridExcelExportOptions) => {\n if (exportPendingRef.current) {\n return;\n }\n\n exportPendingRef.current = true;\n setIsExporting(true);\n\n const grid = getTreeGridById(gridId);\n\n try {\n if (typeof options === 'string') {\n return await exportTreeGridExcel(grid, { exportName: options, t });\n }\n\n return await exportTreeGridExcel(grid, {\n ...options,\n t,\n });\n } finally {\n exportPendingRef.current = false;\n setIsExporting(false);\n }\n };\n\n return { exportByTreeGrid, isExporting };\n};\n"],"names":["debounce","func","debounceMs","signal","edges","pendingThis","pendingArgs","leading","trailing","invoke","__name","onTimerEnd","cancel","timeoutId","schedule","cancelTimer","flush","debounced","args","isFirstCall","options","maxWait","result","pendingAt","_debounced","debounce$1","useThemeMediaQuery","themeCallbackFunc","theme","useTheme","query","getMatches","q","matches","setMatches","useState","useEffect","mediaQuery","handler","event","useTreeGridExcelExport","gridId","t","useOwpTranslation","exportPendingRef","useRef","isExporting","setIsExporting","grid","getTreeGridById","exportTreeGridExcel"],"mappings":";;;;;;AAAA,SAASA,EAASC,GAAMC,GAAY,EAAE,QAAAC,GAAQ,OAAAC,EAAK,IAAK,IAAI;AACxD,MAAIC,GACAC,IAAc;AAClB,QAAMC,IAAUH,KAAS,QAAQA,EAAM,SAAS,SAAS,GACnDI,IAAWJ,KAAS,QAAQA,EAAM,SAAS,UAAU,GACrDK,IAAS,gBAAAC,EAAA,MAAM;AACjB,IAAIJ,MAAgB,SAChBL,EAAK,MAAMI,GAAaC,CAAW,GACnCD,IAAc,QACdC,IAAc;AAAA,EAEtB,GANe,WAOTK,IAAa,gBAAAD,EAAA,MAAM;AACrB,IAAIF,KACAC,EAAM,GAEVG,EAAM;AAAA,EACV,GALmB;AAMnB,MAAIC,IAAY;AAChB,QAAMC,IA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/B,CAACC,GAAaC,CAAc,IAAIZ,EAAS,EAAK;AA4BpD,SAAO,EAAE,kBAzBgB,gBAAAzB,EAAA,OAAOU,MAA4C;AAC1E,QAAIwB,EAAiB;AACnB;AAGF,IAAAA,EAAiB,UAAU,IAC3BG,EAAe,EAAI;AAEnB,UAAMC,IAAOC,EAAgBR,CAAM;AAEnC,QAAI;AACF,aAAI,OAAOrB,KAAY,WACd,MAAM8B,EAAoBF,GAAM,EAAE,YAAY5B,GAAS,GAAAsB,GAAG,IAG5D,MAAMQ,EAAoBF,GAAM;AAAA,QACrC,GAAG5B;AAAA,QACH,GAAAsB;AAAA,MAAA,CACD;AAAA,IACH,UAAA;AACE,MAAAE,EAAiB,UAAU,IAC3BG,EAAe,EAAK;AAAA,IACtB;AAAA,EACF,GAvByB,qBAyBE,aAAAD,EAAA;AAC7B,GAhCsC;","x_google_ignoreList":[0,1]}
|
package/dist/utils.js
CHANGED
|
@@ -8,13 +8,14 @@ import { e as Ko, d as Qo, a as Wo, c as Zo, D as ea, b as ta } from "./storageK
|
|
|
8
8
|
import { i as xt, t as Ze } from "./treeGridUtil-CPNva4kL.js";
|
|
9
9
|
import { A as na, k as ia, E as oa, c as aa, h as ua, C as fa, e as ca, m as la, B as sa, y as da, x as ha, a as ga, b as va, D as _a, g as ya, j as Ea, l as pa, n as ma, p as Oa, z as wa, r as ba, I as Ra, G as Sa, J as Aa, H as Ta, v as Ia, w as Ca, q as Pa, u as Ba, d as Ma, K as xa, F as Da, f as La, s as Na, o as ka } from "./treeGridUtil-CPNva4kL.js";
|
|
10
10
|
import { c as yn, b as En } from "./isTypedArray-CCnDZ5HJ.js";
|
|
11
|
-
import { i as qn, t as Fn } from "./
|
|
11
|
+
import { i as qn, t as Fn } from "./getStartPagePath-Dxtn_J32.js";
|
|
12
|
+
import { g as Fa } from "./getStartPagePath-Dxtn_J32.js";
|
|
12
13
|
import { g as jn } from "./isString-Codtu20I.js";
|
|
13
14
|
import Dt from "dayjs";
|
|
14
|
-
import { a as
|
|
15
|
+
import { a as Ua, g as Ga } from "./language-DaxFvPOq.js";
|
|
15
16
|
import { t as Un } from "i18next";
|
|
16
17
|
import { enqueueSnackbar as Gn } from "notistack";
|
|
17
|
-
import { T as
|
|
18
|
+
import { T as Ha, a as za, b as Va, c as Xa } from "./treeGrid-DtKg-9uf.js";
|
|
18
19
|
function pn(u, c) {
|
|
19
20
|
const d = {}, o = Object.keys(u);
|
|
20
21
|
for (let f = 0; f < o.length; f++) {
|
|
@@ -4778,10 +4779,10 @@ export {
|
|
|
4778
4779
|
ea as DEFAULT_VALUE_FONT,
|
|
4779
4780
|
ta as DEFAULT_WRAP_CELL_ALIGNMENT,
|
|
4780
4781
|
Yo as OwpUtils,
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4782
|
+
Ha as TREEGRID_CELL_HIGHLIGHT_CLASS,
|
|
4783
|
+
za as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
4784
|
+
Va as TREEGRID_INPUT_CELL_COLOR,
|
|
4785
|
+
Xa as TREEGRID_WARNING_CELL_COLOR,
|
|
4785
4786
|
na as addRowById,
|
|
4786
4787
|
ia as addTreeGridRowById,
|
|
4787
4788
|
Ho as buildTreeGridEnumAttributesByCommonCodeList,
|
|
@@ -4799,17 +4800,18 @@ export {
|
|
|
4799
4800
|
Do as formatNumber,
|
|
4800
4801
|
To as generateBarcodeUrl,
|
|
4801
4802
|
qo as generateQrCodeUrl,
|
|
4802
|
-
|
|
4803
|
+
Ua as getApiLanguageCode,
|
|
4803
4804
|
sa as getChangedDataRowsById,
|
|
4804
4805
|
da as getDataRowsById,
|
|
4805
4806
|
Je as getDisplayValue,
|
|
4806
4807
|
Lo as getEstimatedTextCellWidth,
|
|
4807
4808
|
No as getFormDefaultValues,
|
|
4808
4809
|
ha as getGridById,
|
|
4809
|
-
|
|
4810
|
+
Ga as getI18nextLanguageCode,
|
|
4810
4811
|
ga as getIndexByLetters,
|
|
4811
4812
|
va as getLettersByIndex,
|
|
4812
4813
|
_a as getSelectedRowsById,
|
|
4814
|
+
Fa as getStartPagePath,
|
|
4813
4815
|
xo as getTodayYmd,
|
|
4814
4816
|
ya as getTreeGridById,
|
|
4815
4817
|
Ea as getTreeGridDataRowsById,
|