@dovetail-v2/refine 0.0.21 → 0.0.22

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.
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "./index-21a94e67.js";
1
+ import { j as jsxRuntimeExports } from "./index-4e04c7fb.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "i18next";
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
6
6
  };
7
7
  import i18n from "i18next";
8
8
  import * as React from "react";
9
- import React__default, { createContext, useContext, useState, useRef, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle, Suspense, useLayoutEffect, memo, PureComponent, createElement } from "react";
9
+ import React__default, { createContext, useContext, useState, useRef, useEffect, useMemo, createElement, useCallback, forwardRef, useImperativeHandle, Suspense, useLayoutEffect, memo, PureComponent } from "react";
10
10
  import { ResourceContext, matchResourceFromRoute, useResource, useForm as useForm$1, pickNotDeprecated, useWarnAboutChange, useDelete, useNavigation, useBreadcrumb, useList, useParsed, useGo, useDeleteMany, useUpdate, useShow, useMenu, useDataProvider, useTable, Refine } from "@refinedev/core";
11
11
  import { parse, stringify } from "qs";
12
12
  import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
@@ -303,6 +303,20 @@ function useTranslation(ns) {
303
303
  }
304
304
  });
305
305
  }
306
+ function I18nextProvider(_ref) {
307
+ let {
308
+ i18n: i18n2,
309
+ defaultNS,
310
+ children
311
+ } = _ref;
312
+ const value = useMemo(() => ({
313
+ i18n: i18n2,
314
+ defaultNS
315
+ }), [i18n2, defaultNS]);
316
+ return createElement(I18nContext.Provider, {
317
+ value
318
+ }, children);
319
+ }
306
320
  const copy$1 = "Copy";
307
321
  const reset_arguments$1 = "Reset";
308
322
  const view_changes$1 = "Show Diff";
@@ -9858,7 +9872,7 @@ const ErrorMsgStyle = "eh2qjnl";
9858
9872
  const ErrorWrapperStyle = "e19q2bnp";
9859
9873
  const YamlEditorStyle = "y16u5v3w";
9860
9874
  const MonacoYamlEditor$2 = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
9861
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-4436e990.js"));
9875
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-a37a0ec8.js"));
9862
9876
  const YamlEditorComponent = forwardRef(
9863
9877
  function YamlEditorComponent2(props, ref) {
9864
9878
  const {
@@ -18774,7 +18788,7 @@ const Dovetail = (props) => {
18774
18788
  }
18775
18789
  return _content;
18776
18790
  }, [Layout2, notCustomResources, props.children, urlPrefix]);
18777
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18791
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(I18nextProvider, { i18n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18778
18792
  Refine,
18779
18793
  {
18780
18794
  dataProvider: {
@@ -18803,7 +18817,7 @@ const Dovetail = (props) => {
18803
18817
  }),
18804
18818
  children: content
18805
18819
  }
18806
- ) }) }) }) });
18820
+ ) }) }) }) }) });
18807
18821
  };
18808
18822
  class ResourceModel {
18809
18823
  constructor(_rawYaml, _globalStore) {
@@ -19321,13 +19335,13 @@ class RelationPlugin {
19321
19335
  }
19322
19336
  const relationPlugin = new RelationPlugin();
19323
19337
  const ProviderPlugins = [relationPlugin, modelPlugin];
19324
- const DovetailRefineI18n = i18n;
19338
+ const dovetailRefineI18n = i18n;
19325
19339
  export {
19326
19340
  DeleteButton as $,
19327
19341
  AgeColumnRenderer as A,
19328
19342
  Breadcrumb as B,
19329
19343
  CommonSorter as C,
19330
- DovetailRefineI18n as D,
19344
+ DurationColumnRenderer as D,
19331
19345
  WorkloadDropdown as E,
19332
19346
  CreateButton as F,
19333
19347
  ImageNames as G,
@@ -19419,10 +19433,10 @@ export {
19419
19433
  NameSpaceColumnRenderer as b,
19420
19434
  ProviderPlugins as b0,
19421
19435
  WorkloadRestartsColumnRenderer as c,
19422
- NodeNameColumnRenderer as d,
19423
- RestartCountColumnRenderer as e,
19424
- CompletionsCountColumnRenderer as f,
19425
- DurationColumnRenderer as g,
19436
+ dovetailRefineI18n as d,
19437
+ NodeNameColumnRenderer as e,
19438
+ RestartCountColumnRenderer as f,
19439
+ CompletionsCountColumnRenderer as g,
19426
19440
  ServiceTypeColumnRenderer as h,
19427
19441
  IngressDefaultBackendColumnRenderer as i,
19428
19442
  jsxRuntimeExports as j,
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aq, A, ax, B, az, aa, k, C, f, aM, a3, y, aO, F, T, aX, X, aA, ay, a_, a6, $, ah, aZ, aJ, D, ak, g, am, aY, ae, av, aL, aN, aF, a1, G, i, aP, I, ad, aB, aR, a5, Y, K, a0, ai, al, M, aG, ap, N, p, b, v, as, aQ, aw, d, aD, x, z, au, aV, aU, P, a4, b0, aK, an, a2, R, O, L, ao, H, aW, J, U, e, aE, aC, ag, a7, Z, ac, h, a9, ab, af, a8, S, aj, a$, aH, at, aT, E, W, aS, Q, V, c, aI, _, q, w, t, s, r, a, m, l, n, o, ar, u } from "./index-21a94e67.js";
1
+ import { aq, A, ax, B, az, aa, k, C, g, aM, a3, y, aO, F, T, aX, X, aA, ay, a_, a6, $, ah, aZ, aJ, ak, D, am, aY, ae, av, aL, aN, aF, a1, G, i, aP, I, ad, aB, aR, a5, Y, K, a0, ai, al, M, aG, ap, N, p, b, v, as, aQ, aw, e, aD, x, z, au, aV, aU, P, a4, b0, aK, an, a2, R, O, L, ao, H, aW, J, U, f, aE, aC, ag, a7, Z, ac, h, a9, ab, af, a8, S, aj, a$, aH, at, aT, E, W, aS, Q, V, c, aI, _, q, d, w, t, s, r, a, m, l, n, o, ar, u } from "./index-4e04c7fb.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "js-yaml";
@@ -23,7 +23,7 @@ export {
23
23
  aa as ClusterIpField,
24
24
  k as ColumnKeys,
25
25
  C as CommonSorter,
26
- f as CompletionsCountColumnRenderer,
26
+ g as CompletionsCountColumnRenderer,
27
27
  aM as ComponentContext,
28
28
  a3 as ConditionsField,
29
29
  y as ConditionsTable,
@@ -40,9 +40,8 @@ export {
40
40
  ah as DeleteManyButton,
41
41
  aZ as DeploymentModel,
42
42
  aJ as Dovetail,
43
- D as DovetailRefineI18n,
44
43
  ak as DrawerShow,
45
- g as DurationColumnRenderer,
44
+ D as DurationColumnRenderer,
46
45
  am as EditButton,
47
46
  aY as EventModel,
48
47
  ae as EventsTableTabField,
@@ -74,7 +73,7 @@ export {
74
73
  as as NamespacesFilter,
75
74
  aQ as NetworkPolicyModel,
76
75
  aw as NetworkPolicyRulesTable,
77
- d as NodeNameColumnRenderer,
76
+ e as NodeNameColumnRenderer,
78
77
  aD as POD_INIT_VALUE,
79
78
  x as PageShow,
80
79
  z as PodContainersTable,
@@ -95,7 +94,7 @@ export {
95
94
  aW as ResourceModel,
96
95
  J as ResourceShow,
97
96
  U as ResourceUsageBar,
98
- e as RestartCountColumnRenderer,
97
+ f as RestartCountColumnRenderer,
99
98
  aE as SERVICE_INIT_VALUE,
100
99
  aC as STATEFULSET_INIT_VALUE,
101
100
  ag as SchemaStrategy,
@@ -122,6 +121,7 @@ export {
122
121
  aI as WorkloadState,
123
122
  _ as YamlEditorComponent,
124
123
  q as dnsSubDomainRules,
124
+ d as dovetailRefineI18n,
125
125
  w as namespaceRules,
126
126
  t as rfc1035LabelRules,
127
127
  s as rfc1123LabelRules,
@@ -309,6 +309,20 @@ var __publicField = (obj, key, value) => {
309
309
  }
310
310
  });
311
311
  }
312
+ function I18nextProvider(_ref) {
313
+ let {
314
+ i18n: i18n2,
315
+ defaultNS,
316
+ children
317
+ } = _ref;
318
+ const value = React.useMemo(() => ({
319
+ i18n: i18n2,
320
+ defaultNS
321
+ }), [i18n2, defaultNS]);
322
+ return React.createElement(I18nContext.Provider, {
323
+ value
324
+ }, children);
325
+ }
312
326
  const copy$1 = "Copy";
313
327
  const reset_arguments$1 = "Reset";
314
328
  const view_changes$1 = "Show Diff";
@@ -18780,7 +18794,7 @@ var __publicField = (obj, key, value) => {
18780
18794
  }
18781
18795
  return _content;
18782
18796
  }, [Layout2, notCustomResources, props.children, urlPrefix]);
18783
- return /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: lodashEs.keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18797
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(I18nextProvider, { i18n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: lodashEs.keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18784
18798
  core.Refine,
18785
18799
  {
18786
18800
  dataProvider: {
@@ -18809,7 +18823,7 @@ var __publicField = (obj, key, value) => {
18809
18823
  }),
18810
18824
  children: content
18811
18825
  }
18812
- ) }) }) }) });
18826
+ ) }) }) }) }) });
18813
18827
  };
18814
18828
  class ResourceModel {
18815
18829
  constructor(_rawYaml, _globalStore) {
@@ -19327,7 +19341,7 @@ var __publicField = (obj, key, value) => {
19327
19341
  }
19328
19342
  const relationPlugin = new RelationPlugin();
19329
19343
  const ProviderPlugins = [relationPlugin, modelPlugin];
19330
- const DovetailRefineI18n = i18n;
19344
+ const dovetailRefineI18n = i18n;
19331
19345
  const MonacoYamlDiffEditor = (props) => {
19332
19346
  const ref = React.useRef(null);
19333
19347
  const { origin, modified, id, height } = props;
@@ -19393,7 +19407,6 @@ var __publicField = (obj, key, value) => {
19393
19407
  exports2.DeleteManyButton = DeleteManyButton;
19394
19408
  exports2.DeploymentModel = DeploymentModel;
19395
19409
  exports2.Dovetail = Dovetail;
19396
- exports2.DovetailRefineI18n = DovetailRefineI18n;
19397
19410
  exports2.DrawerShow = DrawerShow;
19398
19411
  exports2.DurationColumnRenderer = DurationColumnRenderer;
19399
19412
  exports2.EditButton = EditButton;
@@ -19475,6 +19488,7 @@ var __publicField = (obj, key, value) => {
19475
19488
  exports2.WorkloadState = WorkloadState;
19476
19489
  exports2.YamlEditorComponent = YamlEditorComponent;
19477
19490
  exports2.dnsSubDomainRules = dnsSubDomainRules;
19491
+ exports2.dovetailRefineI18n = dovetailRefineI18n;
19478
19492
  exports2.namespaceRules = namespaceRules;
19479
19493
  exports2.rfc1035LabelRules = rfc1035LabelRules;
19480
19494
  exports2.rfc1123LabelRules = rfc1123LabelRules;
@@ -1,9 +1,8 @@
1
1
  import { History } from 'history';
2
2
  import { GlobalStore } from 'k8s-api-provider';
3
3
  import React from 'react';
4
- import './i18n';
5
- import './styles.css';
6
4
  import { ResourceConfig } from './types';
5
+ import './styles.css';
7
6
  type Props = {
8
7
  resourcesConfig: ResourceConfig[];
9
8
  useHashUrl?: boolean;
@@ -1,4 +1,4 @@
1
- export declare const DovetailRefineI18n: import("i18next").i18n;
1
+ export declare const dovetailRefineI18n: import("i18next").i18n;
2
2
  export * from './providers';
3
3
  export * from './hooks';
4
4
  export * from './components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",