@hybridcore/ui 1.4.17 → 1.4.18

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/main.d.ts CHANGED
@@ -2,6 +2,7 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
2
2
  import { BoxProps } from '@mui/material';
3
3
  import { Collection } from 'ol';
4
4
  import { Coordinate } from 'ol/coordinate';
5
+ import { createTheme } from '@mui/material';
5
6
  import { Dayjs } from 'dayjs';
6
7
  import { default as default_2 } from 'react';
7
8
  import { default as default_3 } from 'ol/layer/Layer';
@@ -23,6 +24,8 @@ import { Size } from 'ol/size';
23
24
  import { SxProps } from '@mui/material';
24
25
  import { SxProps as SxProps_2 } from '@mui/material/styles';
25
26
  import { Theme } from '@mui/material/styles';
27
+ import { ThemeOptions } from '@mui/material';
28
+ import { ThemeProvider } from '@mui/material';
26
29
  import { View } from 'ol';
27
30
 
28
31
  export declare function Access<T extends string>({ pagePath, feature, appRoles, fallback, loading, children, }: Props<T>): string | number | true | Iterable<ReactNode> | JSX_2.Element | null;
@@ -144,6 +147,8 @@ declare interface ContainerProps {
144
147
 
145
148
  export declare const ContextMenu: React.FC<Props_3>;
146
149
 
150
+ export { createTheme }
151
+
147
152
  declare interface DataType extends ItemProps {
148
153
  idKey?: string;
149
154
  children?: DataType[];
@@ -837,6 +842,10 @@ K extends
837
842
 
838
843
  export declare const TemplatePropertyFilters: FC<Props_10>;
839
844
 
845
+ export { ThemeOptions }
846
+
847
+ export { ThemeProvider }
848
+
840
849
  export declare const TreeSelect: FC<TreeSelectProps>;
841
850
 
842
851
  declare interface TreeSelectProps {
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Access as Ht } from "./components/access/index.js";
2
2
  import { alert as Ft, confirm as Ct } from "./components/confirm/index.js";
3
3
  import { Card as jt } from "./components/card/index.js";
4
- import { CollapsibleCard as Pt } from "./components/collapsible-card/index.js";
4
+ import { CollapsibleCard as $t } from "./components/collapsible-card/index.js";
5
5
  import { ConditionalWrapper as Et } from "./components/conditional-wrapper/index.js";
6
6
  import { Container as zt } from "./components/container/index.js";
7
7
  import { ContextMenu as Nt } from "./components/context-menu/index.js";
@@ -20,11 +20,12 @@ import { SearchInput as le } from "./components/search-input/index.js";
20
20
  import { SecurityLevel as ye } from "./components/data-security-selectors/security-level/index.js";
21
21
  import { TemplateForm as De } from "./components/template-form/index.js";
22
22
  import { TemplatePropertyFilters as xe } from "./components/template-property-filters/index.js";
23
- import { TreeSelect as Le } from "./components/tree-select/index.js";
24
- import { TreeViewFilter as Te } from "./components/treeview-filter/index.js";
23
+ import { TreeSelect as Te } from "./components/tree-select/index.js";
24
+ import { TreeViewFilter as we } from "./components/treeview-filter/index.js";
25
25
  import { S as ve } from "./utils-Bq0ye5vf.js";
26
26
  import { i as Se } from "./index-DlnzUkwe.js";
27
27
  import { h as be } from "./helpers-B4UL9NMD.js";
28
+ import { ThemeProvider as Be, createTheme as Fe } from "@mui/material";
28
29
  import { _ as dt } from "./objectWithoutPropertiesLoose-BK36oJDi.js";
29
30
  import C from "dayjs";
30
31
  import { c as U, g as z } from "./createStyled-BzvgQjjR.js";
@@ -114,56 +115,56 @@ var et = { exports: {} };
114
115
  function B(r) {
115
116
  var h, d;
116
117
  h = r, d = n && n.formats;
117
- for (var u = (r = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, T, M) {
118
+ for (var u = (r = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, w, M) {
118
119
  var y = M && M.toUpperCase();
119
- return T || d[M] || f[M] || d[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, v, A) {
120
+ return w || d[M] || f[M] || d[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, v, A) {
120
121
  return v || A.slice(1);
121
122
  });
122
123
  })).match(c), x = u.length, Y = 0; Y < x; Y += 1) {
123
- var I = u[Y], O = Z[I], L = O && O[0], w = O && O[1];
124
- u[Y] = w ? { regex: L, parser: w } : I.replace(/^\[|\]$/g, "");
124
+ var I = u[Y], O = Z[I], T = O && O[0], L = O && O[1];
125
+ u[Y] = L ? { regex: T, parser: L } : I.replace(/^\[|\]$/g, "");
125
126
  }
126
127
  return function(S) {
127
- for (var T = {}, M = 0, y = 0; M < x; M += 1) {
128
+ for (var w = {}, M = 0, y = 0; M < x; M += 1) {
128
129
  var k = u[M];
129
130
  if (typeof k == "string") y += k.length;
130
131
  else {
131
132
  var v = k.regex, A = k.parser, j = S.slice(y), F = v.exec(j)[0];
132
- A.call(T, F), S = S.replace(F, "");
133
+ A.call(w, F), S = S.replace(F, "");
133
134
  }
134
135
  }
135
136
  return function(b) {
136
- var $ = b.afternoon;
137
- if ($ !== void 0) {
137
+ var P = b.afternoon;
138
+ if (P !== void 0) {
138
139
  var m = b.hours;
139
- $ ? m < 12 && (b.hours += 12) : m === 12 && (b.hours = 0), delete b.afternoon;
140
+ P ? m < 12 && (b.hours += 12) : m === 12 && (b.hours = 0), delete b.afternoon;
140
141
  }
141
- }(T), T;
142
+ }(w), w;
142
143
  };
143
144
  }
144
145
  return function(r, h, d) {
145
146
  d.p.customParseFormat = !0, r && r.parseTwoDigitYear && (i = r.parseTwoDigitYear);
146
147
  var u = h.prototype, x = u.parse;
147
148
  u.parse = function(Y) {
148
- var I = Y.date, O = Y.utc, L = Y.args;
149
+ var I = Y.date, O = Y.utc, T = Y.args;
149
150
  this.$u = O;
150
- var w = L[1];
151
- if (typeof w == "string") {
152
- var S = L[2] === !0, T = L[3] === !0, M = S || T, y = L[2];
153
- T && (y = L[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(j, F, b, $) {
151
+ var L = T[1];
152
+ if (typeof L == "string") {
153
+ var S = T[2] === !0, w = T[3] === !0, M = S || w, y = T[2];
154
+ w && (y = T[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(j, F, b, P) {
154
155
  try {
155
156
  if (["x", "X"].indexOf(F) > -1) return new Date((F === "X" ? 1e3 : 1) * j);
156
- var m = B(F)(j), N = m.year, P = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), _ = nt || (N || P ? 1 : J.getDate()), V = N || J.getFullYear(), W = 0;
157
- N && !P || (W = P > 0 ? P - 1 : J.getMonth());
157
+ var m = B(F)(j), N = m.year, $ = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), _ = nt || (N || $ ? 1 : J.getDate()), V = N || J.getFullYear(), W = 0;
158
+ N && !$ || (W = $ > 0 ? $ - 1 : J.getMonth());
158
159
  var E, q = ot || 0, G = at || 0, K = it || 0, Q = ht || 0;
159
- return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E = $(E).week(X).toDate()), E);
160
+ return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E = P(E).week(X).toDate()), E);
160
161
  } catch {
161
162
  return /* @__PURE__ */ new Date("");
162
163
  }
163
- }(I, w, O, d), this.init(), y && y !== !0 && (this.$L = this.locale(y).$L), M && I != this.format(w) && (this.$d = /* @__PURE__ */ new Date("")), n = {};
164
- } else if (w instanceof Array) for (var k = w.length, v = 1; v <= k; v += 1) {
165
- L[1] = w[v - 1];
166
- var A = d.apply(this, L);
164
+ }(I, L, O, d), this.init(), y && y !== !0 && (this.$L = this.locale(y).$L), M && I != this.format(L) && (this.$d = /* @__PURE__ */ new Date("")), n = {};
165
+ } else if (L instanceof Array) for (var k = L.length, v = 1; v <= k; v += 1) {
166
+ T[1] = L[v - 1];
167
+ var A = d.apply(this, T);
167
168
  if (A.isValid()) {
168
169
  this.$d = A.$d, this.$L = A.$L, this.init();
169
170
  break;
@@ -330,7 +331,7 @@ const gt = ut(["Your locale has not been found.", "Either the locale key is not
330
331
  keyboardDateTime: "L LT",
331
332
  keyboardDateTime12h: "L hh:mm A",
332
333
  keyboardDateTime24h: "L HH:mm"
333
- }, Lt = (l, D) => D ? (...f) => l(...f).locale(D) : l;
334
+ }, Tt = (l, D) => D ? (...f) => l(...f).locale(D) : l;
334
335
  class St {
335
336
  constructor({
336
337
  locale: D,
@@ -376,7 +377,7 @@ class St {
376
377
  for (; i.isBefore(o); )
377
378
  n.push(i), i = i.add(1, "year");
378
379
  return n;
379
- }, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || C, this.dayjs = Lt(this.rawDayJsInstance, D), this.locale = D, this.formats = dt({}, Yt, f), C.extend(ft);
380
+ }, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || C, this.dayjs = Tt(this.rawDayJsInstance, D), this.locale = D, this.formats = dt({}, Yt, f), C.extend(ft);
380
381
  }
381
382
  }
382
383
  export {
@@ -384,7 +385,7 @@ export {
384
385
  be as AccessUtils,
385
386
  St as AdapterDayjs,
386
387
  jt as Card,
387
- Pt as CollapsibleCard,
388
+ $t as CollapsibleCard,
388
389
  Et as ConditionalWrapper,
389
390
  zt as Container,
390
391
  Nt as ContextMenu,
@@ -405,8 +406,10 @@ export {
405
406
  ye as SecurityLevel,
406
407
  De as TemplateForm,
407
408
  xe as TemplatePropertyFilters,
408
- Le as TreeSelect,
409
- Te as TreeViewFilter,
409
+ Be as ThemeProvider,
410
+ Te as TreeSelect,
411
+ we as TreeViewFilter,
410
412
  Ft as alert,
411
- Ct as confirm
413
+ Ct as confirm,
414
+ Fe as createTheme
412
415
  };
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.4.17",
4
+ "version": "1.4.18",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",