oolib 2.179.0 → 2.181.0
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/components/PDFInput/utils/PDFEmbed.js +5 -4
- package/dist/stories/v2/components/Tags/TagDisplay.stories.js +2 -1
- package/dist/stories/v2/components/Tags/TagLink.stories.js +1 -1
- package/dist/stories/v2/components/Tags/utils/tagArgTypes.js +11 -0
- package/dist/v2/components/Tags/Comps/Tag/index.d.ts +2 -1
- package/dist/v2/components/Tags/Comps/Tag/index.js +2 -1
- package/dist/v2/components/Tags/Comps/TagClear/index.d.ts +1 -0
- package/dist/v2/components/Tags/Comps/TagClear/index.js +2 -2
- package/package.json +1 -1
|
@@ -23,15 +23,16 @@ var PDFEmbedClass = /** @class */ (function () {
|
|
|
23
23
|
};
|
|
24
24
|
PDFEmbedClass.prototype.previewFile = function (divId, viewerConfig, fileInfo) {
|
|
25
25
|
var _this = this;
|
|
26
|
-
var _a;
|
|
27
26
|
var config = {
|
|
28
27
|
/* Pass your registered client id */
|
|
29
28
|
clientId: window.location.href.includes('localhost')
|
|
30
29
|
? 'd12aa56c7f9a4b57af2cd65bb4250760' /** creds created for localhost on https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html# */
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
: this.theme.adobeKey
|
|
31
|
+
// process.env.REACT_APP_ENV === 'prod'
|
|
32
|
+
// ? process.env[`REACT_APP_ADOBE_EMBED_API_KEY__${this.theme?.getTenant()}`]
|
|
33
|
+
// : process.env.REACT_APP_ADOBE_EMBED_API_KEY //staging & dev
|
|
34
34
|
};
|
|
35
|
+
console.log({ config: config });
|
|
35
36
|
if (divId) {
|
|
36
37
|
/* Optional only for Light Box embed mode */
|
|
37
38
|
/* Pass the div id in which PDF should be rendered */
|
|
@@ -21,7 +21,7 @@ var GenTag_1 = require("./utils/GenTag");
|
|
|
21
21
|
var tagArgTypes_1 = require("./utils/tagArgTypes");
|
|
22
22
|
exports.default = {
|
|
23
23
|
title: "Oolib V 2.0/Components/Tags/Tag Link",
|
|
24
|
-
argTypes: __assign({}, (0, tagArgTypes_1.commonArgTypes)({ exclude: { icon: true } })),
|
|
24
|
+
argTypes: __assign({}, (0, tagArgTypes_1.commonArgTypes)({ exclude: { icon: true, badgeColor: true, } })),
|
|
25
25
|
args: __assign({}, (0, tagArgTypes_1.commonTagArgTypes)("Tag Link")),
|
|
26
26
|
};
|
|
27
27
|
var Tag_Link = function (args) {
|
|
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.commonArgTypes = exports.commonTagArgTypes = void 0;
|
|
15
|
+
var __1 = require("../../../../..");
|
|
15
16
|
var icons_1 = require("../../../../../icons");
|
|
16
17
|
var commonTagArgTypes = function (display) {
|
|
17
18
|
return {
|
|
@@ -91,6 +92,16 @@ var commonArgTypes = function (_a) {
|
|
|
91
92
|
defaultValue: { summary: "none" },
|
|
92
93
|
type: { summary: "string" },
|
|
93
94
|
}
|
|
95
|
+
},
|
|
96
|
+
badgeColor: {
|
|
97
|
+
name: "Badge Color",
|
|
98
|
+
description: "Select an color from the available set.",
|
|
99
|
+
options: __1.colors2,
|
|
100
|
+
control: { type: "select" },
|
|
101
|
+
table: {
|
|
102
|
+
defaultValue: { summary: "none" },
|
|
103
|
+
type: { summary: "string" },
|
|
104
|
+
}
|
|
94
105
|
}
|
|
95
106
|
};
|
|
96
107
|
// Filter out excluded types
|
|
@@ -10,5 +10,6 @@ export interface TagInterface {
|
|
|
10
10
|
variant?: "clear" | "link" | "default";
|
|
11
11
|
typo?: any;
|
|
12
12
|
style?: any;
|
|
13
|
+
badgeColor?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare const Tag: ({ id, fill, size, display, icon, weight, onClick, variant, typo, style }: TagInterface) => React.JSX.Element;
|
|
15
|
+
export declare const Tag: ({ id, fill, size, display, icon, weight, onClick, variant, typo, badgeColor, style }: TagInterface) => React.JSX.Element;
|
|
@@ -12,11 +12,12 @@ var styled_components_1 = require("styled-components");
|
|
|
12
12
|
var themes_1 = require("../../../../themes");
|
|
13
13
|
var grey40 = themes_1.colors.grey40;
|
|
14
14
|
var Tag = function (_a) {
|
|
15
|
-
var id = _a.id, _b = _a.fill, fill = _b === void 0 ? "solid" : _b, _c = _a.size, size = _c === void 0 ? "S" : _c, display = _a.display, icon = _a.icon, weight = _a.weight, onClick = _a.onClick, variant = _a.variant, typo = _a.typo, style = _a.style;
|
|
15
|
+
var id = _a.id, _b = _a.fill, fill = _b === void 0 ? "solid" : _b, _c = _a.size, size = _c === void 0 ? "S" : _c, display = _a.display, icon = _a.icon, weight = _a.weight, onClick = _a.onClick, variant = _a.variant, typo = _a.typo, badgeColor = _a.badgeColor, style = _a.style;
|
|
16
16
|
var Icon = icons_1.icons[icon];
|
|
17
17
|
var theme = (0, styled_components_1.useTheme)();
|
|
18
18
|
var Typo = typo || styled_2.Styled_UI_CAPTION_DF;
|
|
19
19
|
return (react_1.default.createElement(styled_1.StyledTag, { id: id, fill: fill, size: size, icon: icon, onClick: onClick, variant: variant, colors: theme === null || theme === void 0 ? void 0 : theme.colors, style: style },
|
|
20
|
+
badgeColor && react_1.default.createElement("div", { style: { background: badgeColor, width: "1rem", height: "1rem", borderRadius: "50%", marginRight: "0.2rem" } }),
|
|
20
21
|
react_1.default.createElement(Typo, { weight: weight },
|
|
21
22
|
" ",
|
|
22
23
|
display,
|
|
@@ -7,7 +7,7 @@ exports.TagClear = void 0;
|
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var Tag_1 = require("../Tag");
|
|
9
9
|
var TagClear = function (_a) {
|
|
10
|
-
var id = _a.id, display = _a.display, size = _a.size, onClick = _a.onClick, fill = _a.fill, weight = _a.weight;
|
|
11
|
-
return (react_1.default.createElement(Tag_1.Tag, { id: id, display: display, icon: "X", size: size, onClick: onClick, variant: "clear", fill: fill, weight: weight }));
|
|
10
|
+
var id = _a.id, display = _a.display, size = _a.size, onClick = _a.onClick, fill = _a.fill, weight = _a.weight, badgeColor = _a.badgeColor;
|
|
11
|
+
return (react_1.default.createElement(Tag_1.Tag, { id: id, display: display, icon: "X", size: size, onClick: onClick, variant: "clear", fill: fill, weight: weight, badgeColor: badgeColor }));
|
|
12
12
|
};
|
|
13
13
|
exports.TagClear = TagClear;
|