@epam/ai-dial-ui-kit 0.15.0-dev.3 → 0.15.0-dev.5
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/JsonEditor-D2jSlRFi.cjs +1 -0
- package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-BzEbdj7R.cjs} +1 -1
- package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C9-ZMRVi.cjs} +1 -1
- package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
- package/dist/components/New/Calendar/Calendar.js +229 -212
- package/dist/components-manifest.json +25 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +202 -200
- package/dist/editor-_174x-qy.cjs +1 -0
- package/dist/editors.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/lazy-DM-7dL0Y.cjs +1 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +14 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/utils/__tests__/timezone.spec.d.ts +1 -0
- package/dist/src/utils/timezone.d.ts +24 -0
- package/dist/utils/timezone.js +19 -0
- package/package.json +1 -1
- package/dist/JsonEditor-qv1Z0dLX.cjs +0 -1
- package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +0 -1
- package/dist/lazy-tfN4sKhq.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),u=require("./editor-_174x-qy.cjs"),d=require("@monaco-editor/react");function f(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const m=f(d),b=({value:e,onChange:o,onValidateJSON:t,options:a,currentTheme:n,themesConfig:i=u.EDITOR_THEMES_CONFIG})=>{function s(r){r?.editor?.defineTheme(n,i[n]),r.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}const{Editor:l}=m;return c.jsx(l,{beforeMount:s,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:t,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...a??{}}})};exports.DialJsonEditor=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@uiw/react-md-editor"),m=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@uiw/react-md-editor"),m=require("./lazy-DM-7dL0Y.cjs"),u=require("./merge-classes-Dipy1Ih1.cjs"),x=({value:t,onChange:s,height:o=300,preview:i="edit",theme:a=m.EditorThemes.dark,className:n,placeholder:r})=>{const d=r!==void 0&&!t;return e.jsxs("div",{"data-color-mode":a,className:u.mergeClasses("relative",n),children:[e.jsx(c,{value:t,onChange:l=>s?.(l||""),height:o,preview:i}),d&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:r})]})};exports.DialMarkdownEditor=x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-DM-7dL0Y.cjs"),k=require("./merge-classes-Dipy1Ih1.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const b=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:x,strikethrough:g,table:h,unorderedListCommand:C}=b;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(g,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(x,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(h,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=b;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m})=>{const I=j.useMemo(()=>M(),[]),x=j.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:g=>i?.(g||""),height:r,preview:u,commands:I,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react");require("./editor-_174x-qy.cjs");const E=require("./lazy-DM-7dL0Y.cjs");require("@monaco-editor/react");const m=require("./Switch-CUKClcEz.cjs"),N=require("./MarkdownEditor-BzEbdj7R.cjs"),b=({value:o,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=E.EditorThemes.dark,onValidateJSON:x,preview:j="edit"})=>{const w=n.useId(),[t,C]=n.useState(!1),[f,p]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-D2jSlRFi.cjs")).then(s=>{p(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),S=n.useCallback(s=>{x?.(s)},[x]),r=!!d;return e.jsx("div",{className:"size-full flex flex-col",children:e.jsx("div",{className:"flex flex-col gap-8",children:e.jsxs("div",{children:[(i||a||r)&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i&&e.jsx(m.DialLabel,{label:i}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[a,r&&e.jsx("label",{className:"flex items-center gap-2 cursor-pointer",children:e.jsx(m.DialSwitch,{isOn:t,label:d,switchId:w,onChange:s=>C(s)})})]})]}),r&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:o,onChange:h,onValidateJSON:S,currentTheme:u})}):e.jsx(N.DialMarkdownEditor,{value:o,onChange:h,height:c,preview:j,theme:u})]})})})};exports.DialMarkdownEditorContainer=b;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useId as g, useState as x, useEffect as J, useCallback as u } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { EditorThemes as
|
|
3
|
+
import "../../constants/editor.js";
|
|
4
|
+
import { EditorThemes as S } from "../../types/editor.js";
|
|
5
|
+
import "@monaco-editor/react";
|
|
6
|
+
import { DialSwitch as b } from "../Switch/Switch.js";
|
|
5
7
|
import { DialMarkdownEditor as v } from "./MarkdownEditor.js";
|
|
6
8
|
import { DialLabel as y } from "../Label/Label.js";
|
|
7
|
-
const
|
|
9
|
+
const $ = ({
|
|
8
10
|
value: s,
|
|
9
11
|
onChangeValue: l,
|
|
10
|
-
label:
|
|
12
|
+
label: t,
|
|
11
13
|
headerContent: d,
|
|
12
14
|
switcherLabel: a,
|
|
13
15
|
height: c = 300,
|
|
14
|
-
theme: m =
|
|
16
|
+
theme: m = S.dark,
|
|
15
17
|
onValidateJSON: f,
|
|
16
18
|
preview: C = "edit"
|
|
17
19
|
}) => {
|
|
18
|
-
const N = g(), [
|
|
20
|
+
const N = g(), [i, w] = x(!1), [p, D] = x(null);
|
|
19
21
|
J(() => {
|
|
20
|
-
|
|
22
|
+
i && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
21
23
|
D(() => o.DialJsonEditor);
|
|
22
24
|
});
|
|
23
|
-
}, [
|
|
25
|
+
}, [i]);
|
|
24
26
|
const h = u(
|
|
25
27
|
(o) => {
|
|
26
28
|
l?.(o);
|
|
@@ -31,16 +33,16 @@ const z = ({
|
|
|
31
33
|
f?.(o);
|
|
32
34
|
},
|
|
33
35
|
[f]
|
|
34
|
-
),
|
|
36
|
+
), n = !!a;
|
|
35
37
|
return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
+
(t || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
39
|
+
t && /* @__PURE__ */ e(y, { label: t }),
|
|
38
40
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
39
41
|
d,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
43
|
+
b,
|
|
42
44
|
{
|
|
43
|
-
isOn:
|
|
45
|
+
isOn: i,
|
|
44
46
|
label: a,
|
|
45
47
|
switchId: N,
|
|
46
48
|
onChange: (o) => w(o)
|
|
@@ -48,7 +50,7 @@ const z = ({
|
|
|
48
50
|
) })
|
|
49
51
|
] })
|
|
50
52
|
] }),
|
|
51
|
-
|
|
53
|
+
n && i ? /* @__PURE__ */ e(
|
|
52
54
|
"div",
|
|
53
55
|
{
|
|
54
56
|
className: "border border-primary rounded",
|
|
@@ -76,5 +78,5 @@ const z = ({
|
|
|
76
78
|
] }) }) });
|
|
77
79
|
};
|
|
78
80
|
export {
|
|
79
|
-
|
|
81
|
+
$ as DialMarkdownEditorContainer
|
|
80
82
|
};
|