ag-common 0.0.170 → 0.0.173

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.
@@ -89,7 +89,10 @@ const Modal = ({ open, setOpen, children, position = 'left', topPosition = 'bott
89
89
  children)));
90
90
  };
91
91
  exports.Modal = Modal;
92
- const ModalDropList = (p) => (react_1.default.createElement(exports.Modal, Object.assign({}, p, { className: p.className }), p.options.map((option, index) => (react_1.default.createElement(exports.ModalItem, { key: option, onClick: (e) => {
92
+ const ModalDropListStyled = (0, styled_components_1.default)(exports.Modal) `
93
+ flex-flow: column;
94
+ `;
95
+ const ModalDropList = (p) => (react_1.default.createElement(ModalDropListStyled, Object.assign({}, p, { className: p.className }), p.options.map((option, index) => (react_1.default.createElement(exports.ModalItem, { key: option, onClick: (e) => {
93
96
  var _a;
94
97
  e.stopPropagation();
95
98
  e.preventDefault();
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  import { TLang, TResource } from '../../common/helpers/i18n';
3
2
  export declare const useTranslation: <T extends {
4
3
  [a: string]: TResource;
5
- }>(texts: T, lang: TLang) => (lineText: keyof T) => string | JSX.Element | undefined;
4
+ }>(texts: T, lang: TLang) => (lineText: keyof T) => string;
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.useTranslation = void 0;
7
- const react_1 = __importDefault(require("react"));
8
4
  const useTranslation = (texts, lang) => {
9
5
  const ret = (lineText) => {
10
6
  var _a;
@@ -14,7 +10,10 @@ const useTranslation = (texts, lang) => {
14
10
  v1 = texts[lineText].en;
15
11
  }
16
12
  if (missing) {
17
- return react_1.default.createElement("div", { style: { backgroundColor: 'rgb(255,230,230)' } }, v1);
13
+ return '???';
14
+ }
15
+ if (v1 === undefined || v1 === null) {
16
+ return '???';
18
17
  }
19
18
  return v1;
20
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.170",
3
+ "version": "0.0.173",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",