codenotch-react 1.0.21 → 1.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.
package/dist/index.d.ts CHANGED
@@ -31,5 +31,4 @@ export declare function useCodenotch(): ICodenotchApi;
31
31
  */
32
32
  export declare function useCodenotchApp(props?: ICodenotchEnv): ICodenotchApi;
33
33
  export { CODENOTCH_ENV };
34
- export { Auml, IAumlProps } from './auml/Auml';
35
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACjE,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACrE,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;CACjF;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC;AAE9D,QAAA,MAAM,a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,CA8D5C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,aAAa,CAmBpE;AAGD,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Auml = exports.CODENOTCH_ENV = void 0;
3
+ exports.CODENOTCH_ENV = void 0;
4
4
  exports.useCodenotch = useCodenotch;
5
5
  exports.useCodenotchApp = useCodenotchApp;
6
6
  const CODENOTCH_ENV = {};
@@ -88,6 +88,3 @@ function useCodenotchApp(props) {
88
88
  }
89
89
  return useCodenotch();
90
90
  }
91
- // Export des composants React
92
- var Auml_1 = require("./auml/Auml");
93
- Object.defineProperty(exports, "Auml", { enumerable: true, get: function () { return Auml_1.Auml; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codenotch-react",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Codenotch SA",
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export interface IAumlProps {
3
- auml: string;
4
- }
5
- export declare class Auml extends React.Component<IAumlProps> {
6
- render(): React.JSX.Element | null;
7
- }
8
- //# sourceMappingURL=Auml.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Auml.d.ts","sourceRoot":"","sources":["../../src/auml/Auml.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;IAGjD,MAAM;CAkCT"}
package/dist/auml/Auml.js DELETED
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Auml = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const __1 = require("..");
9
- class Auml extends react_1.default.Component {
10
- render() {
11
- let codenotchEnvironment = __1.CODENOTCH_ENV;
12
- try {
13
- if (`${this.props.auml ?? ''}`.trim() === '') {
14
- return null;
15
- }
16
- // Try to load SpaRender only when the component is rendered
17
- let SpaRender;
18
- try {
19
- SpaRender = require('@echino/echino.ui.framework').SpaRender;
20
- }
21
- catch (e) {
22
- // Package not available, return an informational message
23
- return react_1.default.createElement("div", { style: { background: '#343434', color: '#fbb040', fontSize: 12, padding: 20, borderRadius: 5 } }, "Package '@echino/echino.ui.framework' not available");
24
- }
25
- return react_1.default.createElement(SpaRender, { appDescription: this.props.auml, languages: codenotchEnvironment.languages ?? [], serviceName: codenotchEnvironment.serviceName ?? 'DEV', tenant: {
26
- name: codenotchEnvironment.tenantName ?? 'DEV',
27
- clusterUrl: codenotchEnvironment.clusterUrl ?? undefined,
28
- displayName: codenotchEnvironment.tenantDisplayName ?? undefined,
29
- } });
30
- }
31
- catch (e) {
32
- return react_1.default.createElement("div", { style: { background: '#343434', color: '#fc8181', fontSize: 12, padding: 20, borderRadius: 5 } }, e?.message ?? 'Unknown error');
33
- }
34
- }
35
- }
36
- exports.Auml = Auml;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { ICodenotchEnv } from './index';
3
- export interface CodenotchProviderProps extends ICodenotchEnv {
4
- children: React.ReactNode;
5
- }
6
- /**
7
- * Composant Provider React pour Codenotch
8
- * Configure automatiquement l'environnement Codenotch pour tous les composants enfants
9
- */
10
- export declare const CodenotchProvider: React.FC<CodenotchProviderProps>;
11
- export interface CodenotchStatusProps {
12
- className?: string;
13
- }
14
- /**
15
- * Composant d'affichage du statut de connexion Codenotch
16
- */
17
- export declare const CodenotchStatus: React.FC<CodenotchStatusProps>;
18
- //# sourceMappingURL=components.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwB9D,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAW1D,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CodenotchStatus = exports.CodenotchProvider = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- /**
9
- * Composant Provider React pour Codenotch
10
- * Configure automatiquement l'environnement Codenotch pour tous les composants enfants
11
- */
12
- const CodenotchProvider = ({ children, clusterUrl, serviceName, tenantName, accessToken, ...props }) => {
13
- // Configuration de l'environnement Codenotch au montage du composant
14
- react_1.default.useEffect(() => {
15
- // Logique d'initialisation automatique de Codenotch
16
- console.log('Codenotch Provider initialized with:', {
17
- clusterUrl,
18
- serviceName,
19
- tenantName,
20
- hasAccessToken: !!accessToken
21
- });
22
- }, [clusterUrl, serviceName, tenantName, accessToken]);
23
- return (react_1.default.createElement("div", { className: "codenotch-provider", "data-codenotch-initialized": "true" }, children));
24
- };
25
- exports.CodenotchProvider = CodenotchProvider;
26
- /**
27
- * Composant d'affichage du statut de connexion Codenotch
28
- */
29
- const CodenotchStatus = ({ className }) => {
30
- const [status, setStatus] = react_1.default.useState('disconnected');
31
- return (react_1.default.createElement("div", { className: `codenotch-status codenotch-status--${status} ${className || ''}` },
32
- react_1.default.createElement("span", { className: "codenotch-status__indicator" }),
33
- react_1.default.createElement("span", { className: "codenotch-status__text" },
34
- "Codenotch: ",
35
- status)));
36
- };
37
- exports.CodenotchStatus = CodenotchStatus;