blixify-ui-web 0.2.68 → 0.2.70
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/lib/components/action/radioList/index.d.ts +19 -0
- package/lib/components/action/radioList/index.d.ts.map +1 -0
- package/lib/components/action/radioList/index.js +68 -0
- package/lib/components/action/radioList/index.js.map +1 -0
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +25 -14
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +1 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/design/bannerAction/index.d.ts +1 -0
- package/lib/components/design/bannerAction/index.d.ts.map +1 -1
- package/lib/components/design/bannerAction/index.js +3 -3
- package/lib/components/design/bannerAction/index.js.map +1 -1
- package/lib/components/display/tag/index.d.ts +11 -1
- package/lib/components/display/tag/index.d.ts.map +1 -1
- package/lib/components/display/tag/index.js +95 -19
- package/lib/components/display/tag/index.js.map +1 -1
- package/lib/components/display/tag/utils.d.ts +55 -0
- package/lib/components/display/tag/utils.d.ts.map +1 -0
- package/lib/components/display/tag/utils.js +58 -0
- package/lib/components/display/tag/utils.js.map +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +3 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/select/index.js +1 -1
- package/lib/components/input/select/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { Component, ReactElement } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
export interface RadioListItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
content?: string | ReactElement;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
list: RadioListItem[];
|
|
10
|
+
selectedId: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
onSelect: (id: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare class RadioList extends Component<Props> {
|
|
15
|
+
handleOnChange: (id: string) => void;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/radioList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;CACjC;AAED,UAAU,KAAK;IACb,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,qBAAa,SAAU,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC7C,cAAc,OAAQ,MAAM,UAE1B;IAEF,MAAM;CAgCP"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.RadioList = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var RadioList = /** @class */ (function (_super) {
|
|
45
|
+
__extends(RadioList, _super);
|
|
46
|
+
function RadioList() {
|
|
47
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
_this.handleOnChange = function (id) {
|
|
49
|
+
_this.props.onSelect(id);
|
|
50
|
+
};
|
|
51
|
+
return _this;
|
|
52
|
+
}
|
|
53
|
+
RadioList.prototype.render = function () {
|
|
54
|
+
var _this = this;
|
|
55
|
+
return (react_1.default.createElement("div", { className: "divide-y divide-gray-200" }, this.props.list.map(function (eachItem, index) {
|
|
56
|
+
var _a;
|
|
57
|
+
return (react_1.default.createElement("div", { key: eachItem.id + index, className: "relative flex items-start pb-4 pt-3.5" },
|
|
58
|
+
react_1.default.createElement("div", { className: "min-w-0 flex-1 text-sm leading-6" },
|
|
59
|
+
react_1.default.createElement("label", { htmlFor: eachItem.id, className: "font-medium text-gray-900" }, eachItem.label),
|
|
60
|
+
react_1.default.createElement("div", { className: "text-gray-500" }, eachItem.content)),
|
|
61
|
+
react_1.default.createElement("div", { className: "ml-3 flex h-6 items-center" },
|
|
62
|
+
react_1.default.createElement("input", { id: eachItem.id, checked: eachItem.id === _this.props.selectedId, name: (_a = _this.props.name) !== null && _a !== void 0 ? _a : "radioList", type: "radio", className: "h-4 w-4 border-gray-300 text-primary-600 focus:ring-primary-600", onChange: function () { return _this.props.onSelect(eachItem.id); } }))));
|
|
63
|
+
})));
|
|
64
|
+
};
|
|
65
|
+
return RadioList;
|
|
66
|
+
}(react_1.Component));
|
|
67
|
+
exports.RadioList = RadioList;
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/action/radioList/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,8BAA4B;AAe5B;IAA+B,6BAAgB;IAA/C;;QACE,oBAAc,GAAG,UAAC,EAAU;YAC1B,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC,CAAC;;IAkCJ,CAAC;IAhCC,0BAAM,GAAN;QAAA,iBA+BC;QA9BC,OAAO,CACL,uCAAK,SAAS,EAAC,0BAA0B,IACtC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,QAAuB,EAAE,KAAa;;YAAK,OAAA,CAC/D,uCACE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAG,KAAK,EACxB,SAAS,EAAC,uCAAuC;gBAEjD,uCAAK,SAAS,EAAC,kCAAkC;oBAC/C,yCACE,OAAO,EAAE,QAAQ,CAAC,EAAE,EACpB,SAAS,EAAC,2BAA2B,IAEpC,QAAQ,CAAC,KAAK,CACT;oBACR,uCAAK,SAAS,EAAC,eAAe,IAAE,QAAQ,CAAC,OAAO,CAAO,CACnD;gBACN,uCAAK,SAAS,EAAC,4BAA4B;oBACzC,yCACE,EAAE,EAAE,QAAQ,CAAC,EAAE,EACf,OAAO,EAAE,QAAQ,CAAC,EAAE,KAAK,KAAI,CAAC,KAAK,CAAC,UAAU,EAC9C,IAAI,EAAE,MAAA,KAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,WAAW,EACpC,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,iEAAiE,EAC3E,QAAQ,EAAE,cAAM,OAAA,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAhC,CAAgC,GAChD,CACE,CACF,CACP,CAAA;SAAA,CAAC,CACE,CACP,CAAC;IACJ,CAAC;IACH,gBAAC;AAAD,CAAC,AArCD,CAA+B,iBAAS,GAqCvC;AArCY,8BAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAQN,MAAM,OAAO,CAAC;AAwDf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAO1B,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAQN,MAAM,OAAO,CAAC;AAwDf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAO1B,eAAO,MAAM,YAAY,mFAkmKvB,CAAC"}
|
|
@@ -3056,8 +3056,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3056
3056
|
else
|
|
3057
3057
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
3058
3058
|
};
|
|
3059
|
+
var renderBareReadComp = function () {
|
|
3060
|
+
var _a, _b, _c, _d;
|
|
3061
|
+
if ((_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareReadComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData)) {
|
|
3062
|
+
return (react_1.default.createElement("div", { className: "w-full" }, (_d = (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareReadComponent) === null || _d === void 0 ? void 0 : _d.call(_c, selectedData)));
|
|
3063
|
+
}
|
|
3064
|
+
else
|
|
3065
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
3066
|
+
};
|
|
3059
3067
|
var renderContent = function () {
|
|
3060
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z
|
|
3068
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
3061
3069
|
var viewType = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.viewId) !== null && _b !== void 0 ? _b : "general";
|
|
3062
3070
|
var isBottom = ((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareUpdateActionBottom) ? true : false;
|
|
3063
3071
|
var tabs = [
|
|
@@ -3148,9 +3156,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3148
3156
|
react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
|
|
3149
3157
|
!isBottom && renderActionButtons(props.type))),
|
|
3150
3158
|
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id, tabs); }, darkMode: (_j = props.organise) === null || _j === void 0 ? void 0 : _j.darkMode })),
|
|
3151
|
-
|
|
3159
|
+
((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareReadComponentPos) === "top" &&
|
|
3160
|
+
renderBareReadComp(),
|
|
3161
|
+
!((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponentHide) &&
|
|
3152
3162
|
renderTabContent(tabs, props.type, viewType),
|
|
3153
|
-
((_m =
|
|
3163
|
+
((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentPos) !== "top" &&
|
|
3164
|
+
renderBareReadComp(),
|
|
3154
3165
|
isBottom && renderActionButtons(props.type, true)))));
|
|
3155
3166
|
case "update":
|
|
3156
3167
|
pages.push({
|
|
@@ -3159,7 +3170,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3159
3170
|
current: true,
|
|
3160
3171
|
});
|
|
3161
3172
|
var filterModel_1 = [];
|
|
3162
|
-
var disabledOnEnter_1 = (
|
|
3173
|
+
var disabledOnEnter_1 = (_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.disabledOnEnter) !== null && _p !== void 0 ? _p : false;
|
|
3163
3174
|
props.model.map(function (eachModel) {
|
|
3164
3175
|
var _a;
|
|
3165
3176
|
var present = false;
|
|
@@ -3192,7 +3203,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3192
3203
|
}, cond: {
|
|
3193
3204
|
type: "get",
|
|
3194
3205
|
id: props.id,
|
|
3195
|
-
}, offline: (
|
|
3206
|
+
}, offline: (_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
|
|
3196
3207
|
renderBreadcrumb(pages),
|
|
3197
3208
|
react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
|
|
3198
3209
|
react_1.default.createElement("div", { className: "flex flex-col w-full" },
|
|
@@ -3201,8 +3212,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3201
3212
|
!isBottom && renderActionButtons(props.type)),
|
|
3202
3213
|
react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " gap-6 mt-6"), ref: formRef, refList: modalFormInputRefs, handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1 },
|
|
3203
3214
|
renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
|
|
3204
|
-
((
|
|
3205
|
-
((
|
|
3215
|
+
((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareUpdateComponent) &&
|
|
3216
|
+
((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareUpdateComponent(selectedData))),
|
|
3206
3217
|
react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
|
|
3207
3218
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
|
|
3208
3219
|
isBottom && renderActionButtons(props.type, true)));
|
|
@@ -3233,8 +3244,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3233
3244
|
dbEndpoint: devSettings.dbEndpoint,
|
|
3234
3245
|
dbAPIToken: devSettings.dbAPIToken,
|
|
3235
3246
|
dbUserToken: devSettings.dbUserToken,
|
|
3236
|
-
}, cond: handleReadQueryHocCond(), offline: (
|
|
3237
|
-
if ((
|
|
3247
|
+
}, cond: handleReadQueryHocCond(), offline: (_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareOffline, onChangeData: handleGetListData, onError: handleGetItemError }));
|
|
3248
|
+
if ((_u = props.renderSettings) === null || _u === void 0 ? void 0 : _u.renderListUI) {
|
|
3238
3249
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
3239
3250
|
rqHOCComp,
|
|
3240
3251
|
props.renderSettings.renderListUI(actionComponent, filterComponent, dataComponent)));
|
|
@@ -3246,7 +3257,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3246
3257
|
react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
|
|
3247
3258
|
react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
|
|
3248
3259
|
react_1.default.createElement("div", { className: "grow" }),
|
|
3249
|
-
!((
|
|
3260
|
+
!((_v = props.organise) === null || _v === void 0 ? void 0 : _v.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" }, filterComponent)),
|
|
3250
3261
|
react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center my-6 justify-content space-x-2 md:my-0" },
|
|
3251
3262
|
schemaPresent && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
3252
3263
|
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.ArrowsUpDownIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white", onClick: function () {
|
|
@@ -3268,16 +3279,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3268
3279
|
});
|
|
3269
3280
|
}, bgColor: "bg-white" }))),
|
|
3270
3281
|
!isBottom && renderActionButtons(props.type),
|
|
3271
|
-
(schemaPresent || ((
|
|
3282
|
+
(schemaPresent || ((_w = props.organise) === null || _w === void 0 ? void 0 : _w.showExport)) && (react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
|
|
3272
3283
|
//TODO: Bug - Crash on Next Js
|
|
3273
3284
|
// <Menu.Item>
|
|
3274
3285
|
react_1.default.createElement("span", { className: "block w-40 py-3 text-sm text-center text-gray-700 cursor-pointer hover:bg-gray-100", onClick: eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.onClick }, eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.text)
|
|
3275
3286
|
// </Menu.Item>
|
|
3276
3287
|
); })), lib: {
|
|
3277
|
-
Transition: (
|
|
3288
|
+
Transition: (_x = props === null || props === void 0 ? void 0 : props.lib) === null || _x === void 0 ? void 0 : _x.Transition,
|
|
3278
3289
|
} })))),
|
|
3279
|
-
((
|
|
3280
|
-
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id, tabs); }, darkMode: (
|
|
3290
|
+
((_y = props.organise) === null || _y === void 0 ? void 0 : _y.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center my-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row" }, filterComponent)),
|
|
3291
|
+
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id, tabs); }, darkMode: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.darkMode })),
|
|
3281
3292
|
renderTabContent(tabs, props.type, viewType),
|
|
3282
3293
|
isBottom && renderActionButtons(props.type, true)));
|
|
3283
3294
|
default:
|