ag-common 0.0.728 → 0.0.729
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/api/helpers/api.js +0 -6
- package/dist/api/helpers/dynamo.d.ts +1 -1
- package/dist/api/helpers/dynamo.js +11 -12
- package/dist/api/helpers/enforceDynamoProvisionCap.js +0 -1
- package/dist/api/helpers/openApiHelpers.js +1 -2
- package/dist/api/helpers/s3.d.ts +0 -1
- package/dist/api/helpers/s3.js +11 -11
- package/dist/api/helpers/ses.d.ts +1 -1
- package/dist/api/helpers/sts.js +2 -2
- package/dist/api/helpers/validateOpenApi.js +1 -4
- package/dist/api/helpers/validations.js +3 -5
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +0 -1
- package/dist/api/openapi-postfix.js +0 -3
- package/dist/api/openapi-prefix.js +0 -6
- package/dist/api/types/index.d.ts +1 -1
- package/dist/api/types/index.js +0 -15
- package/dist/common/helpers/array.d.ts +1 -1
- package/dist/common/helpers/array.js +3 -4
- package/dist/common/helpers/async.js +2 -3
- package/dist/common/helpers/binary.d.ts +3 -4
- package/dist/common/helpers/binary.js +4 -4
- package/dist/common/helpers/csv.js +1 -3
- package/dist/common/helpers/date.js +0 -1
- package/dist/common/helpers/func.js +1 -2
- package/dist/common/helpers/generator.js +1 -3
- package/dist/common/helpers/groupBy.js +3 -4
- package/dist/common/helpers/hashCode.js +0 -1
- package/dist/common/helpers/log.js +0 -2
- package/dist/common/helpers/math.js +6 -8
- package/dist/common/helpers/memo.js +1 -4
- package/dist/common/helpers/object.js +9 -14
- package/dist/common/helpers/random.js +3 -3
- package/dist/common/helpers/stream.js +3 -3
- package/dist/common/helpers/string/contains.js +3 -3
- package/dist/common/helpers/string/json.js +0 -1
- package/dist/common/helpers/string/object.js +1 -2
- package/dist/common/helpers/string/redact.js +3 -3
- package/dist/common/helpers/string/trim.js +2 -3
- package/dist/common/helpers/string/truncate.js +1 -2
- package/dist/common/helpers/string/url.js +3 -2
- package/dist/common/helpers/xml.js +0 -1
- package/dist/node/helpers/fetch.js +2 -2
- package/dist/node/helpers/fs.js +2 -3
- package/dist/ui/components/Accordion/index.js +17 -7
- package/dist/ui/components/BarChart/index.d.ts +1 -1
- package/dist/ui/components/BarChart/index.js +0 -1
- package/dist/ui/components/Button/index.d.ts +2 -3
- package/dist/ui/components/Button/index.js +1 -4
- package/dist/ui/components/Confirm/Dialog.js +1 -0
- package/dist/ui/components/Confirm/index.d.ts +1 -1
- package/dist/ui/components/Confirm/index.js +0 -1
- package/dist/ui/components/DarkMode/Base.d.ts +3 -4
- package/dist/ui/components/DarkMode/Base.js +18 -7
- package/dist/ui/components/DropdownList/Base.d.ts +2 -2
- package/dist/ui/components/DropdownList/Base.js +19 -10
- package/dist/ui/components/DropdownList/Dialog.d.ts +1 -1
- package/dist/ui/components/DropdownList/Dialog.js +2 -0
- package/dist/ui/components/DropdownList/types.d.ts +1 -1
- package/dist/ui/components/HorizontalScrollBar/index.js +18 -7
- package/dist/ui/components/Icon/index.d.ts +2 -2
- package/dist/ui/components/Image/index.js +17 -7
- package/dist/ui/components/InfiniteScroll/index.js +17 -8
- package/dist/ui/components/LineChart/index.d.ts +1 -1
- package/dist/ui/components/LineChart/index.js +0 -1
- package/dist/ui/components/Loader/index.js +17 -7
- package/dist/ui/components/Markdown/index.d.ts +2 -2
- package/dist/ui/components/MinSidebar/index.js +17 -7
- package/dist/ui/components/Modal/Dialog.js +1 -0
- package/dist/ui/components/Modal/Modal.d.ts +2 -2
- package/dist/ui/components/Modal/Modal.js +18 -7
- package/dist/ui/components/Modal/index.d.ts +1 -1
- package/dist/ui/components/Modal/index.js +0 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/body.d.ts +1 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/security.d.ts +1 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/index.d.ts +2 -2
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/call.d.ts +1 -1
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/req.d.ts +1 -1
- package/dist/ui/components/OpenApiCodeBlock/helpers/common.d.ts +4 -5
- package/dist/ui/components/OpenApiCodeBlock/helpers/common.js +0 -1
- package/dist/ui/components/OpenApiCodeBlock/helpers/joinJsx.d.ts +1 -1
- package/dist/ui/components/OpenApiCodeBlock/index.d.ts +1 -1
- package/dist/ui/components/OpenApiCodeBlock/index.js +0 -1
- package/dist/ui/components/OpenApiCodeBlock/types.d.ts +1 -1
- package/dist/ui/components/ProgressBar/index.js +17 -7
- package/dist/ui/components/Prompt/Modal.js +18 -7
- package/dist/ui/components/Prompt/index.d.ts +1 -1
- package/dist/ui/components/Prompt/index.js +0 -1
- package/dist/ui/components/RadioGroup/index.d.ts +2 -2
- package/dist/ui/components/RadioGroup/index.js +17 -8
- package/dist/ui/components/Search/AutoHideSearchBox.js +17 -7
- package/dist/ui/components/Search/Dialog.js +1 -0
- package/dist/ui/components/Search/Inline.js +17 -8
- package/dist/ui/components/Search/SearchBox.d.ts +1 -1
- package/dist/ui/components/Search/SearchBox.js +17 -7
- package/dist/ui/components/Search/index.d.ts +1 -1
- package/dist/ui/components/Search/index.js +0 -1
- package/dist/ui/components/Search/types.d.ts +2 -2
- package/dist/ui/components/Sidebar/index.js +17 -7
- package/dist/ui/components/TabBar/index.d.ts +2 -2
- package/dist/ui/components/TabBar/index.js +17 -7
- package/dist/ui/components/Table/index.d.ts +2 -2
- package/dist/ui/components/TextEdit/CheckboxEdit.js +17 -7
- package/dist/ui/components/TextEdit/ColourEdit.js +17 -7
- package/dist/ui/components/TextEdit/ListboxEdit.js +20 -18
- package/dist/ui/components/TextEdit/TextEdit.d.ts +2 -2
- package/dist/ui/components/TextEdit/TextEdit.js +20 -18
- package/dist/ui/components/TextEdit/common.d.ts +6 -7
- package/dist/ui/components/TextEdit/index.d.ts +1 -1
- package/dist/ui/components/TextEdit/index.js +0 -1
- package/dist/ui/components/TextEdit/types.d.ts +1 -0
- package/dist/ui/components/TextWithButton/index.js +17 -7
- package/dist/ui/components/Toast/base.js +18 -7
- package/dist/ui/components/Toast/index.d.ts +1 -1
- package/dist/ui/components/Toast/index.js +0 -1
- package/dist/ui/components/Toast/types.d.ts +1 -1
- package/dist/ui/components/TreeChart/base.js +17 -7
- package/dist/ui/components/TreeChart/index.d.ts +1 -1
- package/dist/ui/components/TreeChart/index.js +0 -1
- package/dist/ui/components/UserImage/index.js +17 -7
- package/dist/ui/helpers/axiosHelper.d.ts +1 -1
- package/dist/ui/helpers/axiosHelper.js +0 -2
- package/dist/ui/helpers/callOpenApi/direct.js +2 -7
- package/dist/ui/helpers/callOpenApi/helpers.js +1 -2
- package/dist/ui/helpers/callOpenApi/hook.d.ts +0 -1
- package/dist/ui/helpers/callOpenApi/index.d.ts +1 -1
- package/dist/ui/helpers/callOpenApi/index.js +0 -1
- package/dist/ui/helpers/cookie/get.js +3 -3
- package/dist/ui/helpers/cookie/raw.js +4 -4
- package/dist/ui/helpers/cookie/set.js +2 -2
- package/dist/ui/helpers/cookie/use.js +2 -2
- package/dist/ui/helpers/debounce.js +2 -3
- package/dist/ui/helpers/dom.js +0 -2
- package/dist/ui/helpers/extractAttributes.js +0 -1
- package/dist/ui/helpers/index.d.ts +2 -2
- package/dist/ui/helpers/index.js +0 -2
- package/dist/ui/helpers/plural.js +1 -2
- package/dist/ui/helpers/routes.d.ts +2 -2
- package/dist/ui/helpers/serviceWorker.js +1 -2
- package/dist/ui/helpers/useContextMenu.d.ts +1 -1
- package/dist/ui/helpers/useContextMenu.js +2 -3
- package/dist/ui/helpers/useElementAttribute.js +3 -2
- package/dist/ui/helpers/useGranularHook.js +1 -1
- package/dist/ui/helpers/useInterval.js +2 -2
- package/dist/ui/helpers/useIsInViewport.js +1 -2
- package/dist/ui/helpers/useLocalStorage.js +2 -2
- package/dist/ui/helpers/useLockBodyScroll.js +1 -2
- package/dist/ui/helpers/useOnClickOutside.d.ts +1 -1
- package/dist/ui/helpers/useOnClickOutside.js +3 -3
- package/dist/ui/helpers/useOnScroll.js +6 -7
- package/dist/ui/helpers/useOverloadPageSearch.js +2 -0
- package/dist/ui/helpers/useQueryString.js +1 -1
- package/dist/ui/helpers/useResize.js +2 -2
- package/dist/ui/helpers/useTimeout.js +1 -2
- package/dist/ui/helpers/useTooltip.d.ts +1 -0
- package/dist/ui/helpers/useTooltip.js +18 -7
- package/dist/ui/icons/index.d.ts +27 -28
- package/dist/ui/styles/common.d.ts +2 -2
- package/dist/ui/styles/standaloneStyles.d.ts +12 -13
- package/package.json +36 -33
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
2
|
import type { IRefTextEdit } from '../TextEdit/types';
|
|
3
3
|
export type TSearchModalRes<T> = {
|
|
4
4
|
foundItem: T;
|
|
@@ -40,7 +40,7 @@ export interface ISearchDialog<T> {
|
|
|
40
40
|
};
|
|
41
41
|
onSearchTextChange?: (v: string) => void;
|
|
42
42
|
onSelectItem?: (v: TSearchModalRes<T> | undefined) => void;
|
|
43
|
-
textBoxRef?: React.RefObject<IRefTextEdit>;
|
|
43
|
+
textBoxRef?: React.RefObject<IRefTextEdit | null>;
|
|
44
44
|
rowCountOpt?: {
|
|
45
45
|
/** if provided will change position of row count when some lines are hidden. default bottom */
|
|
46
46
|
display?: 'bottom' | 'top' | 'off';
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import type { JSX } from 'react';
|
|
3
3
|
export interface ITabBar {
|
|
4
4
|
onChangeIndex: (i: number) => void;
|
|
5
5
|
className?: string;
|
|
@@ -24,4 +24,4 @@ export interface ITabBar {
|
|
|
24
24
|
/** default 0 */
|
|
25
25
|
defaultSelectedIndex?: number;
|
|
26
26
|
}
|
|
27
|
-
export declare const TabBar: (p: ITabBar) =>
|
|
27
|
+
export declare const TabBar: (p: ITabBar) => JSX.Element;
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
2
|
export interface ITableItem {
|
|
3
3
|
content: JSX.Element;
|
|
4
4
|
groupTitle?: string;
|
|
@@ -8,4 +8,4 @@ export interface ITable {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
headerRow?: JSX.Element;
|
|
10
10
|
}
|
|
11
|
-
export declare const Table: ({ children, className, headerRow }: ITable) =>
|
|
11
|
+
export declare const Table: ({ children, className, headerRow }: ITable) => JSX.Element;
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
37
|
exports.ColourEdit = void 0;
|
|
28
38
|
const react_1 = __importStar(require("react"));
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
37
|
exports.ListboxEdit = void 0;
|
|
28
38
|
const react_1 = __importStar(require("react"));
|
|
@@ -30,27 +40,19 @@ const Save_1 = require("../../icons/Save");
|
|
|
30
40
|
const Undo_1 = require("../../icons/Undo");
|
|
31
41
|
const common_1 = require("../../styles/common");
|
|
32
42
|
const common_2 = require("./common");
|
|
33
|
-
const ListboxEdit = ({ defaultValue, onSubmit, values, canEdit = true,
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
|
-
renderLabel = (e) => e.toString(), }) => {
|
|
43
|
+
const ListboxEdit = ({ defaultValue, onSubmit, values, canEdit = true, renderLabel = (e) => e.toString(), }) => {
|
|
36
44
|
const [value, setValue] = (0, react_1.useState)(defaultValue);
|
|
37
45
|
(0, react_1.useEffect)(() => {
|
|
38
46
|
setValue(defaultValue);
|
|
39
47
|
}, [defaultValue]);
|
|
40
48
|
return (react_1.default.createElement(common_2.ValueBox, Object.assign({}, common_1.noDrag),
|
|
41
|
-
react_1.default.createElement("select", { size: 5,
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
|
-
value: value.toString(), onChange: (v) => {
|
|
49
|
+
react_1.default.createElement("select", { size: 5, value: value.toString(), onChange: (v) => {
|
|
44
50
|
const selected = values[v.target.selectedIndex];
|
|
45
51
|
if (!selected) {
|
|
46
52
|
return;
|
|
47
53
|
}
|
|
48
54
|
return canEdit ? setValue(selected) : onSubmit(selected);
|
|
49
|
-
} }, values.map((v) => (react_1.default.createElement("option", {
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
-
key: v.toString(),
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
-
value: v.toString() }, renderLabel(v))))),
|
|
55
|
+
} }, values.map((v) => (react_1.default.createElement("option", { key: v.toString(), value: v.toString() }, renderLabel(v))))),
|
|
54
56
|
canEdit && value !== defaultValue && (react_1.default.createElement(common_2.IconD, { style: common_2.iconLeft, onClick: () => value !== defaultValue && onSubmit(value) },
|
|
55
57
|
react_1.default.createElement(Save_1.Save, null))),
|
|
56
58
|
canEdit && value !== defaultValue && (react_1.default.createElement(common_2.IconD, { style: Object.assign(Object.assign({}, common_2.iconRight), { fill: '#134563' }), onClick: () => setValue(defaultValue) },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IRefTextEdit, ITextEdit } from './types';
|
|
3
3
|
export declare const ValueReadonly: import("@emotion/styled").StyledComponent<{
|
|
4
|
-
theme?: import("@emotion/react").Theme
|
|
5
|
-
as?: React.ElementType
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType;
|
|
6
6
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
7
|
export declare const TextEdit: React.ForwardRefExoticComponent<ITextEdit & React.RefAttributes<IRefTextEdit>>;
|
|
@@ -16,19 +16,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
29
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
40
|
exports.TextEdit = exports.ValueReadonly = void 0;
|
|
31
|
-
/* eslint-disable react/display-name */
|
|
32
41
|
const react_1 = require("@emotion/react");
|
|
33
42
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
34
43
|
const react_2 = __importStar(require("react"));
|
|
@@ -148,25 +157,18 @@ exports.TextEdit = (0, react_2.forwardRef)((p, ref) => {
|
|
|
148
157
|
} },
|
|
149
158
|
react_2.default.createElement(Pencil_1.Pencil, null))))));
|
|
150
159
|
}
|
|
151
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
152
160
|
const Comp = !singleLine ? ValueTextArea : ValueTextBox;
|
|
153
|
-
return (react_2.default.createElement(ValueBoxEdit, Object.assign({}, common_1.noDrag, { className: p.className, "data-editing": "true",
|
|
154
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
155
|
-
ref: ref, tabIndex: -1, "data-nogrow": noGrow }, (0, dom_1.filterDataProps)(p)), (_b = p.leftContent) !== null && _b !== void 0 ? _b : null,
|
|
161
|
+
return (react_2.default.createElement(ValueBoxEdit, Object.assign({}, common_1.noDrag, { className: p.className, "data-editing": "true", ref: ref, tabIndex: -1, "data-nogrow": noGrow }, (0, dom_1.filterDataProps)(p)), (_b = p.leftContent) !== null && _b !== void 0 ? _b : null,
|
|
156
162
|
react_2.default.createElement(Comp
|
|
157
163
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
158
164
|
, {
|
|
159
165
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
160
|
-
tabIndex: editing ? 0 : undefined, "data-editing": "true", "data-valuechange": valueChange.toString(),
|
|
161
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
162
|
-
ref: taref, "data-type": "text", value: value, onChange: (v) => {
|
|
166
|
+
tabIndex: editing ? 0 : undefined, "data-editing": "true", "data-valuechange": valueChange.toString(), ref: taref, "data-type": "text", value: value, onChange: (v) => {
|
|
163
167
|
setValue(v.currentTarget.value);
|
|
164
168
|
if (!allowUndo) {
|
|
165
169
|
p.onSubmit(v.currentTarget.value, false);
|
|
166
170
|
}
|
|
167
|
-
}, placeholder: p.placeholder, rows: singleLine ? 1 : undefined, maxLength: p.maxLength,
|
|
168
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
|
-
onKeyDown: (e) => {
|
|
171
|
+
}, placeholder: p.placeholder, rows: singleLine ? 1 : undefined, maxLength: p.maxLength, onKeyDown: (e) => {
|
|
170
172
|
var _a;
|
|
171
173
|
if (((_a = p.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(p, e)) === false) {
|
|
172
174
|
e.preventDefault();
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const ValueBox: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme
|
|
4
|
-
as?:
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
5
|
export declare const valueCss: import("@emotion/react").SerializedStyles;
|
|
7
6
|
export declare const ValueInputCB: import("@emotion/styled").StyledComponent<{
|
|
8
|
-
theme?: import("@emotion/react").Theme
|
|
9
|
-
as?:
|
|
7
|
+
theme?: import("@emotion/react").Theme;
|
|
8
|
+
as?: React.ElementType;
|
|
10
9
|
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
11
10
|
export declare const IconD: import("@emotion/styled").StyledComponent<{
|
|
12
|
-
theme?: import("@emotion/react").Theme
|
|
13
|
-
as?:
|
|
11
|
+
theme?: import("@emotion/react").Theme;
|
|
12
|
+
as?: React.ElementType;
|
|
14
13
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
14
|
export declare const iconRight: {
|
|
16
15
|
right: string;
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -122,6 +132,7 @@ const Toast = ({ toast, close, style, }) => {
|
|
|
122
132
|
icon = react_1.default.createElement(Tick_1.Tick, null);
|
|
123
133
|
break;
|
|
124
134
|
}
|
|
135
|
+
case undefined:
|
|
125
136
|
}
|
|
126
137
|
(0, react_1.useEffect)(() => {
|
|
127
138
|
if (!closeMs) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './base';
|
|
2
|
-
export * from './types';
|
|
2
|
+
export type * from './types';
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './base';
|
|
2
|
-
export * from './types';
|
|
2
|
+
export type * from './types';
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -8,7 +8,7 @@ export declare const axiosHelper: <TOut>({ verb, url, body, headers, timeout, re
|
|
|
8
8
|
headers?: {
|
|
9
9
|
[a: string]: string;
|
|
10
10
|
};
|
|
11
|
-
verb:
|
|
11
|
+
verb: "put" | "post" | "get" | "patch" | "delete";
|
|
12
12
|
url: string;
|
|
13
13
|
body?: unknown;
|
|
14
14
|
timeout?: number;
|
|
@@ -39,7 +39,6 @@ const axiosHelper = (_a) => __awaiter(void 0, [_a], void 0, function* ({ verb, u
|
|
|
39
39
|
return ret;
|
|
40
40
|
}
|
|
41
41
|
let noBody = false;
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
42
|
let axiosV = axios_1.default.post;
|
|
44
43
|
if (verb === 'put') {
|
|
45
44
|
axiosV = axios_1.default.put;
|
|
@@ -52,7 +51,6 @@ const axiosHelper = (_a) => __awaiter(void 0, [_a], void 0, function* ({ verb, u
|
|
|
52
51
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
53
52
|
}
|
|
54
53
|
else if (verb === 'delete') {
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
54
|
axiosV = axios_1.default.delete;
|
|
57
55
|
noBody = true;
|
|
58
56
|
}
|