@hybridcore/ui 1.5.25 → 1.5.27

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.
@@ -1412,6 +1412,7 @@ Max: ${i}mb`);
1412
1412
  /* @__PURE__ */ d(
1413
1413
  Qr,
1414
1414
  {
1415
+ name: r,
1415
1416
  types: t,
1416
1417
  multiple: o,
1417
1418
  maxSize: i,
package/dist/main.d.ts CHANGED
@@ -986,6 +986,20 @@ declare interface TreeSelectProps {
986
986
 
987
987
  export declare const TreeViewFilter: FC<Props_11>;
988
988
 
989
+ export declare const Uploader: FC<UploaderProps>;
990
+
991
+ declare interface UploaderProps {
992
+ type?: "IMAGE" | "VIDEO" | "FILE" | "AUDIO" | "OTHER";
993
+ allowedExtensions?: string[];
994
+ urls?: string[];
995
+ inputName?: string;
996
+ multiple?: boolean;
997
+ maxSize?: number; // Max file size in mb
998
+ minSize?: number; // Min file size in mb
999
+ onChange?(urls: string[]): void;
1000
+ uploadAction(formData: FormData): Promise<string>;
1001
+ }
1002
+
989
1003
  export { }
990
1004
 
991
1005
 
package/dist/main.js CHANGED
@@ -18,7 +18,7 @@ import { InstanceVariableList as ue } from "./components/instance-variable-list/
18
18
  import { KeyProtectionMenu as fe } from "./components/key-protection/menu.js";
19
19
  import { LinearIndicator as le } from "./components/linear-indicator/index.js";
20
20
  import { Loading as ye } from "./components/loading/index.js";
21
- import { LocalizationProvider as De } from "@mui/x-date-pickers";
21
+ import { LocalizationProvider as xe } from "@mui/x-date-pickers";
22
22
  import { PhoneInput as ge } from "./components/phone-input/index.js";
23
23
  import { SearchInput as Te } from "./components/search-input/index.js";
24
24
  import { SecurityLevel as we } from "./components/data-security-selectors/security-level/index.js";
@@ -29,16 +29,17 @@ import { TemplatePropertyFilters as Fe } from "./components/template-property-fi
29
29
  import { Property as Ie } from "./components/template-property-filters/property.js";
30
30
  import { TreeSelect as je } from "./components/tree-select/index.js";
31
31
  import { TreeViewFilter as $e } from "./components/treeview-filter/index.js";
32
- import { S as Ee } from "./utils-Bq0ye5vf.js";
33
- import { i as ze } from "./index-DlnzUkwe.js";
34
- import { b as Ne } from "./helpers-DaCoWmi2.js";
35
- import { ThemeProvider as Ve, createTheme as _e } from "@mui/material";
32
+ import { Uploader as Ee } from "./components/uploader/index.js";
33
+ import { S as ze } from "./utils-Bq0ye5vf.js";
34
+ import { i as Ne } from "./index-DlnzUkwe.js";
35
+ import { b as Ve } from "./helpers-DaCoWmi2.js";
36
+ import { ThemeProvider as qe, createTheme as Ge } from "@mui/material";
36
37
  import { a as dt } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
37
38
  import I from "dayjs";
38
39
  import { h as U, j as z } from "./createTheme-DrgvKMA_.js";
39
40
  import { b as ut } from "./index-CNMnXD0q.js";
40
41
  var tt = { exports: {} };
41
- (function(l, D) {
42
+ (function(l, x) {
42
43
  (function(f, c) {
43
44
  l.exports = c();
44
45
  })(U, function() {
@@ -49,8 +50,8 @@ var tt = { exports: {} };
49
50
  if (n === void 0 && (n = null), n !== null) return this.add(7 * (n - this.week()), "day");
50
51
  var i = this.$locale().yearStart || 1;
51
52
  if (this.month() === 11 && this.date() > 25) {
52
- var a = s(this).startOf(c).add(1, c).date(i), x = s(this).endOf(f);
53
- if (a.isBefore(x)) return 1;
53
+ var a = s(this).startOf(c).add(1, c).date(i), D = s(this).endOf(f);
54
+ if (a.isBefore(D)) return 1;
54
55
  }
55
56
  var p = s(this).startOf(c).date(i).startOf(f).subtract(1, "millisecond"), H = this.diff(p, f, !0);
56
57
  return H < 0 ? s(this).startOf("week").week() : Math.ceil(H);
@@ -63,7 +64,7 @@ var tt = { exports: {} };
63
64
  var ct = tt.exports;
64
65
  const ft = /* @__PURE__ */ z(ct);
65
66
  var et = { exports: {} };
66
- (function(l, D) {
67
+ (function(l, x) {
67
68
  (function(f, c) {
68
69
  l.exports = c();
69
70
  })(U, function() {
@@ -73,7 +74,7 @@ var et = { exports: {} };
73
74
  return function(h) {
74
75
  this[r] = +h;
75
76
  };
76
- }, x = [/[+-]\d\d:?(\d\d)?|Z/, function(r) {
77
+ }, D = [/[+-]\d\d:?(\d\d)?|Z/, function(r) {
77
78
  (this.zone || (this.zone = {})).offset = function(h) {
78
79
  if (!h || h === "Z") return 0;
79
80
  var d = h.match(/([+-]|\d\d)/g), u = 60 * d[1] + (+d[2] || 0);
@@ -118,7 +119,7 @@ var et = { exports: {} };
118
119
  this.month = h % 12 || h;
119
120
  }], Y: [/[+-]?\d+/, a("year")], YY: [e, function(r) {
120
121
  this.year = i(r);
121
- }], YYYY: [/\d{4}/, a("year")], Z: x, ZZ: x };
122
+ }], YYYY: [/\d{4}/, a("year")], Z: D, ZZ: D };
122
123
  function F(r) {
123
124
  var h, d;
124
125
  h = r, d = n && n.formats;
@@ -186,7 +187,7 @@ var et = { exports: {} };
186
187
  var mt = et.exports;
187
188
  const lt = /* @__PURE__ */ z(mt);
188
189
  var rt = { exports: {} };
189
- (function(l, D) {
190
+ (function(l, x) {
190
191
  (function(f, c) {
191
192
  l.exports = c();
192
193
  })(U, function() {
@@ -195,8 +196,8 @@ var rt = { exports: {} };
195
196
  var s = t.prototype, o = s.format;
196
197
  e.en.formats = f, s.format = function(n) {
197
198
  n === void 0 && (n = "YYYY-MM-DDTHH:mm:ssZ");
198
- var i = this.$locale().formats, a = function(x, p) {
199
- return x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(H, Z, F) {
199
+ var i = this.$locale().formats, a = function(D, p) {
200
+ return D.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(H, Z, F) {
200
201
  var r = F && F.toUpperCase();
201
202
  return Z || p[F] || f[F] || p[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(h, d, u) {
202
203
  return d || u.slice(1);
@@ -211,24 +212,24 @@ var rt = { exports: {} };
211
212
  var pt = rt.exports;
212
213
  const yt = /* @__PURE__ */ z(pt);
213
214
  var st = { exports: {} };
214
- (function(l, D) {
215
+ (function(l, x) {
215
216
  (function(f, c) {
216
217
  l.exports = c();
217
218
  })(U, function() {
218
219
  return function(f, c, t) {
219
220
  c.prototype.isBetween = function(e, s, o, n) {
220
- var i = t(e), a = t(s), x = (n = n || "()")[0] === "(", p = n[1] === ")";
221
- return (x ? this.isAfter(i, o) : !this.isBefore(i, o)) && (p ? this.isBefore(a, o) : !this.isAfter(a, o)) || (x ? this.isBefore(i, o) : !this.isAfter(i, o)) && (p ? this.isAfter(a, o) : !this.isBefore(a, o));
221
+ var i = t(e), a = t(s), D = (n = n || "()")[0] === "(", p = n[1] === ")";
222
+ return (D ? this.isAfter(i, o) : !this.isBefore(i, o)) && (p ? this.isBefore(a, o) : !this.isAfter(a, o)) || (D ? this.isBefore(i, o) : !this.isAfter(i, o)) && (p ? this.isAfter(a, o) : !this.isBefore(a, o));
222
223
  };
223
224
  };
224
225
  });
225
226
  })(st);
226
227
  var Mt = st.exports;
227
- const Dt = /* @__PURE__ */ z(Mt);
228
+ const xt = /* @__PURE__ */ z(Mt);
228
229
  I.extend(lt);
229
230
  I.extend(yt);
230
- I.extend(Dt);
231
- const xt = ut(["Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale", "Or you forget to import the locale with `require('dayjs/locale/{localeUsed}')`", "fallback on English locale"]), gt = {
231
+ I.extend(xt);
232
+ const Dt = ut(["Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale", "Or you forget to import the locale with `require('dayjs/locale/{localeUsed}')`", "fallback on English locale"]), gt = {
232
233
  // Year
233
234
  YY: "year",
234
235
  YYYY: {
@@ -338,10 +339,10 @@ const xt = ut(["Your locale has not been found.", "Either the locale key is not
338
339
  keyboardDateTime: "L LT",
339
340
  keyboardDateTime12h: "L hh:mm A",
340
341
  keyboardDateTime24h: "L HH:mm"
341
- }, Tt = (l, D) => D ? (...f) => l(...f).locale(D) : l;
342
+ }, Tt = (l, x) => x ? (...f) => l(...f).locale(x) : l;
342
343
  class bt {
343
344
  constructor({
344
- locale: D,
345
+ locale: x,
345
346
  formats: f,
346
347
  instance: c
347
348
  } = {}) {
@@ -352,7 +353,7 @@ class bt {
352
353
  var t;
353
354
  const e = (t = this.rawDayJsInstance.Ls) != null ? t : I.Ls, s = this.locale || "en";
354
355
  let o = e[s];
355
- return o === void 0 && (xt(), o = e.en), o.formats;
356
+ return o === void 0 && (Dt(), o = e.en), o.formats;
356
357
  }, this.date = (t) => t === null ? null : this.dayjs(t), this.toJsDate = (t) => t.toDate(), this.parseISO = (t) => this.dayjs(t), this.toISO = (t) => t.toISOString(), this.parse = (t, e) => t === "" ? null : this.dayjs(t, e, this.locale, !0), this.getCurrentLocaleCode = () => this.locale || "en", this.is12HourCycleInCurrentLocale = () => /A|a/.test(this.getLocaleFormats().LT || ""), this.expandFormat = (t) => {
357
358
  const e = this.getLocaleFormats(), s = (o) => o.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (n, i, a) => i || a.slice(1));
358
359
  return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (o, n, i) => {
@@ -384,12 +385,12 @@ class bt {
384
385
  for (; i.isBefore(o); )
385
386
  n.push(i), i = i.add(1, "year");
386
387
  return n;
387
- }, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || I, this.dayjs = Tt(this.rawDayJsInstance, D), this.locale = D, this.formats = dt({}, Yt, f), I.extend(ft);
388
+ }, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || I, this.dayjs = Tt(this.rawDayJsInstance, x), this.locale = x, this.formats = dt({}, Yt, f), I.extend(ft);
388
389
  }
389
390
  }
390
391
  export {
391
392
  Ht as Access,
392
- Ne as AccessUtils,
393
+ Ve as AccessUtils,
393
394
  bt as AdapterDayjs,
394
395
  jt as Card,
395
396
  $t as CardAlternate,
@@ -406,12 +407,12 @@ export {
406
407
  ae as InstanceHierarchyTable,
407
408
  he as InstanceTable,
408
409
  ue as InstanceVariableList,
409
- Ee as KeyProductionUtils,
410
+ ze as KeyProductionUtils,
410
411
  fe as KeyProtectionMenu,
411
412
  le as LinearIndicator,
412
413
  ye as Loading,
413
- De as LocalizationProvider,
414
- ze as Map,
414
+ xe as LocalizationProvider,
415
+ Ne as Map,
415
416
  ge as PhoneInput,
416
417
  Ie as PropertyFilterInput,
417
418
  Te as SearchInput,
@@ -420,10 +421,11 @@ export {
420
421
  Ae as TemplateFilters,
421
422
  be as TemplateForm,
422
423
  Fe as TemplatePropertyFilters,
423
- Ve as ThemeProvider,
424
+ qe as ThemeProvider,
424
425
  je as TreeSelect,
425
426
  $e as TreeViewFilter,
427
+ Ee as Uploader,
426
428
  Bt as alert,
427
429
  It as confirm,
428
- _e as createTheme
430
+ Ge as createTheme
429
431
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.5.25",
4
+ "version": "1.5.27",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",