@orchidui/core 0.4.0 → 0.5.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/dist/Calendar.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as m } from "./OcComplexCalendar-x-_kg9Yk.js";
1
+ import { _ as m } from "./OcComplexCalendar-DXl0ecZ-.js";
2
2
  import { ref as s, openBlock as d, createBlock as c, unref as e, withCtx as l, createVNode as r } from "vue";
3
3
  import n from "dayjs";
4
4
  import { c as p, _ as f, D as b } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
@@ -0,0 +1,29 @@
1
+ const r = (t = [], i = []) => {
2
+ const c = {
3
+ fixed: {},
4
+ active: {}
5
+ };
6
+ return t.forEach((e) => {
7
+ c.fixed[e.key] = e.isActive;
8
+ }), i.forEach((e) => {
9
+ c.active[e.key] = e.isActive;
10
+ }), JSON.stringify(c);
11
+ }, n = (t, i, c) => {
12
+ const e = t ? JSON.parse(t) : null;
13
+ return e ? [...Object.keys(e.fixed), ...Object.keys(e.active)].length !== i.length ? (localStorage.removeItem(c), { fixed: null, active: null }) : {
14
+ fixed: Object.keys(e.fixed).map((o) => ({
15
+ ...i.find((a) => a.key === o) || {},
16
+ isActive: e.fixed[o]
17
+ })),
18
+ active: Object.keys(e.active).map((o) => ({
19
+ ...i.find((a) => a.key === o) || {},
20
+ isActive: e.active[o]
21
+ }))
22
+ } : { fixed: null, active: null };
23
+ }, s = (t, i) => localStorage.setItem(t, i), l = (t) => localStorage.getItem(t);
24
+ export {
25
+ n as formatHeadersFromLocalStorage,
26
+ r as formatHeadersToLocalStorage,
27
+ l as getFromLocalStorage,
28
+ s as setInLocalStorage
29
+ };
@@ -6,7 +6,7 @@ import { _ as $ } from "./OcIcon-CJgBICxh.js";
6
6
  import { _ as T } from "./OcInput-tcRxG3Y2.js";
7
7
  import "libphonenumber-js";
8
8
  /* empty css */
9
- import { _ as L } from "./OcComplexCalendar-x-_kg9Yk.js";
9
+ import { _ as L } from "./OcComplexCalendar-DXl0ecZ-.js";
10
10
  /* empty css */
11
11
  import "./Cropper.js";
12
12
  import "vue-draggable-next";
package/dist/Draggable.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { _ as K } from "./OcDraggable-BjhGJmpM.js";
2
- import { ref as x, openBlock as r, createBlock as h, unref as a, withCtx as n, createElementBlock as y, Fragment as $, renderList as C, normalizeClass as s, createElementVNode as o, createCommentVNode as b, renderSlot as u, toDisplayString as p, createVNode as f } from "vue";
2
+ import { ref as x, openBlock as d, createBlock as h, unref as a, withCtx as n, createElementBlock as y, Fragment as $, renderList as C, normalizeClass as s, createElementVNode as o, createCommentVNode as b, renderSlot as u, toDisplayString as p, createVNode as f } from "vue";
3
3
  import "dayjs";
4
4
  import { T as M, D as S } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
5
- import { _ as g } from "./OcIcon-CJgBICxh.js";
5
+ import { _ as m } from "./OcIcon-CJgBICxh.js";
6
6
  /* empty css */
7
7
  import "libphonenumber-js";
8
8
  /* empty css */
@@ -10,7 +10,8 @@ import "v-calendar";
10
10
  /* empty css */
11
11
  import "./Cropper.js";
12
12
  import "@popperjs/core";
13
- const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify-evenly w-full" }, N = { class: "flex w-full" }, U = { class: "ml-4 flex w-full" }, E = { class: "flex items-center flex-wrap w-full" }, O = ["href"], T = { class: "min-w-[120px]" }, W = { class: "truncate w-[200px]" }, j = { class: "flex items-center ml-4" }, z = { class: "flex w-full" }, Z = {
13
+ import "vue-draggable-next";
14
+ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify-evenly w-full" }, N = { class: "flex w-full" }, U = { class: "ml-4 flex w-full" }, E = { class: "flex items-center flex-wrap w-full" }, O = ["href"], T = { class: "min-w-[120px]" }, W = { class: "truncate w-[200px]" }, j = { class: "flex items-center ml-4" }, z = { class: "flex w-full" }, _ = {
14
15
  __name: "OcDraggableList",
15
16
  props: {
16
17
  modelValue: Array,
@@ -41,17 +42,17 @@ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
41
42
  detectMove: null
42
43
  },
43
44
  setup(i, { emit: w }) {
44
- const D = w, l = x([]), v = x([]), V = (t, d) => {
45
- D("update:modelValue", t, d);
45
+ const D = w, l = x([]), v = x([]), V = (t, r) => {
46
+ D("update:modelValue", t, r);
46
47
  };
47
- return (t, d) => (r(), h(a(K), {
48
+ return (t, r) => (d(), h(a(K), {
48
49
  "model-value": i.modelValue,
49
50
  class: "grid gap-3",
50
- "onUpdate:modelValue": d[0] || (d[0] = (c, e) => V(c, e)),
51
- onDetectMove: d[1] || (d[1] = (c) => t.$emit("detectMove", c))
51
+ "onUpdate:modelValue": r[0] || (r[0] = (c, e) => V(c, e)),
52
+ onDetectMove: r[1] || (r[1] = (c) => t.$emit("detectMove", c))
52
53
  }, {
53
54
  default: n(({ list: c }) => [
54
- (r(!0), y($, null, C(c, (e, k) => (r(), y("div", {
55
+ (d(!0), y($, null, C(c, (e, k) => (d(), y("div", {
55
56
  key: e.id,
56
57
  class: s([
57
58
  "group text-oc-text-500 p-4 flex flex-col w-full rounded border border-gray-200 cursor-pointer",
@@ -60,22 +61,22 @@ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
60
61
  onMouseleave: () => {
61
62
  v.value[e.id] = !1, l.value[e.id] = !1;
62
63
  },
63
- onMouseover: (m) => l.value[e.id] = !0,
64
- onClick: (m) => t.$emit("click:element", e)
64
+ onMouseover: (g) => l.value[e.id] = !0,
65
+ onClick: (g) => t.$emit("click:element", e)
65
66
  }, [
66
67
  o("div", L, [
67
68
  o("div", N, [
68
69
  o("div", {
69
70
  class: s(["px-2 flex items-center", !i.isDisabled && !e.isDisable ? "drag-el cursor-move" : ""])
70
71
  }, [
71
- !i.isDisabled && !e.isDisable ? (r(), h(a(g), {
72
+ !i.isDisabled && !e.isDisable ? (d(), h(a(m), {
72
73
  key: 0,
73
74
  name: "draggable",
74
75
  class: s(
75
76
  e[i.iconKey] ? i.isChildren && !l.value[e.id] ? "hidden" : "hidden group-hover:block" : i.isChildren && !l.value[e.id] ? "opacity-0" : "opacity-0 group-hover:opacity-100 "
76
77
  )
77
78
  }, null, 8, ["class"])) : b("", !0),
78
- e[i.iconKey] ? (r(), h(a(g), {
79
+ e[i.iconKey] ? (d(), h(a(m), {
79
80
  key: 1,
80
81
  name: e[i.iconKey],
81
82
  class: s(
@@ -90,7 +91,7 @@ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
90
91
  class: s(["truncate", i.titleWidth])
91
92
  }, p(e.title), 3)
92
93
  ]),
93
- i.isLink && e[i.linkKey] && e.type === "link" ? (r(), y("a", {
94
+ i.isLink && e[i.linkKey] && e.type === "link" ? (d(), y("a", {
94
95
  key: 0,
95
96
  href: e[i.linkKey],
96
97
  target: "_blank",
@@ -106,7 +107,7 @@ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
106
107
  o("div", T, p(e[i.linkKey]), 1)
107
108
  ]),
108
109
  default: n(() => [
109
- f(a(g), {
110
+ f(a(m), {
110
111
  width: "12",
111
112
  height: "12",
112
113
  class: "mr-2",
@@ -125,7 +126,7 @@ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
125
126
  u(t.$slots, "action", { item: e }, () => [
126
127
  f(a(S), {
127
128
  modelValue: v.value[e.id],
128
- "onUpdate:modelValue": (m) => v.value[e.id] = m,
129
+ "onUpdate:modelValue": (g) => v.value[e.id] = g,
129
130
  placement: "bottom-end",
130
131
  class: s([
131
132
  "cursor-pointer",
@@ -142,7 +143,7 @@ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
142
143
  o("div", {
143
144
  class: s(["hover:bg-oc-gray-100 p-1 rounded", v.value[e.id] ? "bg-oc-gray-100" : ""])
144
145
  }, [
145
- f(a(g), { name: "dots-vertical" })
146
+ f(a(m), { name: "dots-vertical" })
146
147
  ], 2)
147
148
  ]),
148
149
  _: 2
@@ -164,5 +165,5 @@ const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
164
165
  };
165
166
  export {
166
167
  K as Draggable,
167
- Z as DraggableList
168
+ _ as DraggableList
168
169
  };
@@ -1,4 +1,4 @@
1
- import { _ as a } from "../../DatePicker-D3w435Ml.js";
1
+ import { _ as a } from "../../DatePicker-BLK16hYl.js";
2
2
  export {
3
3
  a as DatePicker
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as o } from "../../OcMultipleUploadFile-B8Wl9Fuq.js";
1
+ import { _ as o } from "../../OcMultipleUploadFile-BAmQHshA.js";
2
2
  export {
3
3
  o as MultipleUploadFile
4
4
  };
@@ -13,14 +13,14 @@ import { _ as G } from "../OcGroupOptions-ChGJvTXl.js";
13
13
  import { T as F } from "../OcToggle-C0wTjM_Y.js";
14
14
  import { _ as A } from "../OcLinkInput-C2ixk-gk.js";
15
15
  import { _ as L } from "../OcTextArea-BpV1Bnj_.js";
16
- import { _ as N } from "../DatePicker-D3w435Ml.js";
16
+ import { _ as N } from "../DatePicker-BLK16hYl.js";
17
17
  import { default as q } from "../OcTimePopup-zQFKCZLk.js";
18
18
  import { _ as w } from "../OcTimePicker-B61MCi0D.js";
19
19
  import { S as z } from "../OcSlider-Bsi-ckbP.js";
20
20
  import { _ as H } from "../OcSectionItem-BFgxO3se.js";
21
21
  import { _ as K } from "../OcSelectOptions-BQlG_EUA.js";
22
22
  import { _ as V } from "../OcSingleFileUpload-B8-e1H5t.js";
23
- import { _ as X } from "../OcMultipleUploadFile-B8Wl9Fuq.js";
23
+ import { _ as X } from "../OcMultipleUploadFile-BAmQHshA.js";
24
24
  import { _ as Z } from "../OcNumberInput.vue_vue_type_script_setup_true_lang-C4EXUIUe.js";
25
25
  export {
26
26
  e as BaseInput,
@@ -1,4 +1,4 @@
1
- import { _ as e } from "../OcFormBuilder-CRXWtt8I.js";
1
+ import { _ as e } from "../OcFormBuilder-BUpEpDsU.js";
2
2
  export {
3
3
  e as FormBuilder
4
4
  };
@@ -12,7 +12,7 @@ import { _ as W } from "./OcOption-DK2FBGq7.js";
12
12
  import { T as X } from "./OcToggle-C0wTjM_Y.js";
13
13
  import { _ as Y } from "./OcLinkInput-C2ixk-gk.js";
14
14
  import { _ as Z } from "./OcTextArea-BpV1Bnj_.js";
15
- import { _ as ee } from "./DatePicker-D3w435Ml.js";
15
+ import { _ as ee } from "./DatePicker-BLK16hYl.js";
16
16
  import { _ as ae } from "./OcTimePicker-B61MCi0D.js";
17
17
  import { S as te } from "./OcSlider-Bsi-ckbP.js";
18
18
  import { _ as se } from "./OcSectionItem-BFgxO3se.js";
@@ -12,6 +12,7 @@ import { ModalCropper as Q } from "./Cropper.js";
12
12
  import { _ as W } from "./OcDraggable-BjhGJmpM.js";
13
13
  import { _ as X } from "./OcConfirmationModal-BfCrRV9r.js";
14
14
  import "@popperjs/core";
15
+ import "vue-draggable-next";
15
16
  const Y = { class: "relative min-h-[100px]" }, Z = {
16
17
  key: 0,
17
18
  class: "absolute"
@@ -219,7 +220,7 @@ const Y = { class: "relative min-h-[100px]" }, Z = {
219
220
  }, Ie = {
220
221
  key: 2,
221
222
  class: "mt-3 flex items-center justify-center"
222
- }, ze = {
223
+ }, je = {
223
224
  __name: "OcMultipleUploadFile",
224
225
  props: {
225
226
  modelValue: {
@@ -442,5 +443,5 @@ const Y = { class: "relative min-h-[100px]" }, Z = {
442
443
  }
443
444
  };
444
445
  export {
445
- ze as _
446
+ je as _
446
447
  };