blixify-ui-web 0.4.83 → 0.4.85
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/chart/radialBar/index.d.ts +3 -0
- package/lib/components/chart/radialBar/index.d.ts.map +1 -1
- package/lib/components/chart/radialBar/index.js +10 -5
- package/lib/components/chart/radialBar/index.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +114 -53
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.js +16 -2
- package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
- package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.js +8 -14
- package/lib/components/data/dataWrapper/index.js.map +1 -1
- package/lib/components/data/updateModule.js +1 -1
- package/lib/components/data/updateModule.js.map +1 -1
- package/lib/components/input/address/index.d.ts.map +1 -1
- package/lib/components/input/address/index.js +1 -4
- package/lib/components/input/address/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ interface Props {
|
|
|
5
5
|
title: string;
|
|
6
6
|
labels: string[];
|
|
7
7
|
series: number[];
|
|
8
|
+
description?: string;
|
|
8
9
|
showToolbar?: boolean;
|
|
9
10
|
tool?: ReactElement;
|
|
10
11
|
chartSize?: number;
|
|
@@ -13,6 +14,7 @@ interface Props {
|
|
|
13
14
|
customDate?: RangeInterface;
|
|
14
15
|
chartOnly?: boolean;
|
|
15
16
|
dataUnit?: string;
|
|
17
|
+
barColors?: string[];
|
|
16
18
|
onChangeDate?: (customDate?: RangeInterface) => void;
|
|
17
19
|
darkMode?: boolean;
|
|
18
20
|
darkModeBg?: string;
|
|
@@ -26,6 +28,7 @@ export declare class RadialBar extends Component<Props> {
|
|
|
26
28
|
renderDarkModeSettings: () => {
|
|
27
29
|
bgColor: string;
|
|
28
30
|
textColor: string;
|
|
31
|
+
subTextColor: string;
|
|
29
32
|
};
|
|
30
33
|
render(): React.JSX.Element;
|
|
31
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chart/radialBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzD,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,SAAU,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC7C,KAAK;;MAEH;IAEF,iBAAiB,sBAKf;IAEF,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chart/radialBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzD,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,SAAU,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC7C,KAAK;;MAEH;IAEF,iBAAiB,sBAKf;IAEF,WAAW,0BAgDT;IAEF,sBAAsB;;;;MAUpB;IAEF,MAAM;CAkCP"}
|
|
@@ -100,7 +100,7 @@ var RadialBar = /** @class */ (function (_super) {
|
|
|
100
100
|
});
|
|
101
101
|
}); };
|
|
102
102
|
_this.renderChart = function () {
|
|
103
|
-
var _a;
|
|
103
|
+
var _a, _b;
|
|
104
104
|
var APEXModule = _this.state.apexModule;
|
|
105
105
|
var chartTextColor = _this.props.darkMode ? "#FFF" : undefined;
|
|
106
106
|
return (react_1.default.createElement(react_1.default.Fragment, null, APEXModule && (react_1.default.createElement(APEXModule, { options: {
|
|
@@ -132,8 +132,9 @@ var RadialBar = /** @class */ (function (_super) {
|
|
|
132
132
|
},
|
|
133
133
|
},
|
|
134
134
|
},
|
|
135
|
+
colors: (_a = _this.props.barColors) !== null && _a !== void 0 ? _a : undefined,
|
|
135
136
|
labels: _this.props.labels,
|
|
136
|
-
}, series: _this.props.series, type: "radialBar", height: (
|
|
137
|
+
}, series: _this.props.series, type: "radialBar", height: (_b = _this.props.chartSize) !== null && _b !== void 0 ? _b : 300 }))));
|
|
137
138
|
};
|
|
138
139
|
_this.renderDarkModeSettings = function () {
|
|
139
140
|
var _a;
|
|
@@ -142,19 +143,23 @@ var RadialBar = /** @class */ (function (_super) {
|
|
|
142
143
|
bgColor = (_a = _this.props.darkModeBg) !== null && _a !== void 0 ? _a : "bg-gray-900";
|
|
143
144
|
}
|
|
144
145
|
var textColor = _this.props.darkMode ? "text-white" : "text-gray-700";
|
|
145
|
-
|
|
146
|
+
var subTextColor = _this.props.darkMode
|
|
147
|
+
? "text-gray-300"
|
|
148
|
+
: "text-gray-500";
|
|
149
|
+
return { bgColor: bgColor, textColor: textColor, subTextColor: subTextColor };
|
|
146
150
|
};
|
|
147
151
|
return _this;
|
|
148
152
|
}
|
|
149
153
|
RadialBar.prototype.render = function () {
|
|
150
|
-
var _a = this.renderDarkModeSettings(), bgColor = _a.bgColor, textColor = _a.textColor;
|
|
154
|
+
var _a = this.renderDarkModeSettings(), bgColor = _a.bgColor, textColor = _a.textColor, subTextColor = _a.subTextColor;
|
|
151
155
|
var defaultClass = "flex flex-col justify-center ".concat(bgColor, " overflow-hidden shadow rounded-lg pl-4 pb-3 w-full ");
|
|
152
156
|
if (this.props.containerStyle)
|
|
153
157
|
defaultClass += this.props.containerStyle;
|
|
154
158
|
return !this.props.chartOnly ? (react_1.default.createElement("div", { className: defaultClass },
|
|
155
159
|
react_1.default.createElement("div", { className: "ml-2 pr-5 my-4 flex flex-row items-center" },
|
|
156
160
|
react_1.default.createElement("div", { className: "flex-1" },
|
|
157
|
-
react_1.default.createElement("h3", { className: "text-lg truncate font-medium ".concat(textColor) }, this.props.title)
|
|
161
|
+
react_1.default.createElement("h3", { className: "text-lg truncate font-medium ".concat(textColor) }, this.props.title),
|
|
162
|
+
this.props.description && (react_1.default.createElement("p", { className: "text-xs ".concat(subTextColor) }, this.props.description))),
|
|
158
163
|
this.props.tool),
|
|
159
164
|
react_1.default.createElement("div", { className: "mr-4" }, this.renderChart()),
|
|
160
165
|
this.props.dateRangeVisible && (react_1.default.createElement(DateRange_1.DateRange, { className: "px-3", customDate: this.props.customDate, onChangeDate: this.props.onChangeDate, darkMode: this.props.darkMode })))) : (react_1.default.createElement("div", { className: this.props.containerStyle }, this.renderChart()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/radialBar/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,8BAA4B;AAC5B,0CAAyD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/radialBar/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,8BAA4B;AAC5B,0CAAyD;AAqBzD;IAA+B,6BAAgB;IAA/C;;QACE,WAAK,GAAG;YACN,UAAU,EAAE,IAAI;SACjB,CAAC;QAEF,uBAAiB,GAAG;;;;4BACK,sFAAa,kBAAkB,QAAC;;wBAAjD,cAAc,GAAG,SAAgC;wBACvD,IAAI,CAAC,QAAQ,CAAC;4BACZ,UAAU,EAAE,cAAc,CAAC,OAAO;yBACnC,CAAC,CAAC;;;;aACJ,CAAC;QAEF,iBAAW,GAAG;;YACZ,IAAM,UAAU,GAAQ,KAAI,CAAC,KAAK,CAAC,UAAU,CAAC;YAC9C,IAAM,cAAc,GAAG,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CA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W,CACrB,CACL,CACG;gBACL,IAAI,CAAC,KAAK,CAAC,IAAI,CACZ;YACN,uCAAK,SAAS,EAAC,MAAM,IAAE,IAAI,CAAC,WAAW,EAAE,CAAO;YAC/C,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAC9B,8BAAC,qBAAS,IACR,SAAS,EAAC,MAAM,EAChB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EACjC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAC7B,CACH,CACG,CACP,CAAC,CAAC,CAAC,CACF,uCAAK,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,IAAG,IAAI,CAAC,WAAW,EAAE,CAAO,CACtE,CAAC;IACJ,CAAC;IACH,gBAAC;AAAD,CAAC,AA5GD,CAA+B,iBAAS,GA4GvC;AA5GY,8BAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAmEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAmEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFAilOvB,CAAC"}
|
|
@@ -4022,19 +4022,29 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4022
4022
|
} }))));
|
|
4023
4023
|
}
|
|
4024
4024
|
else if (type === "list") {
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4025
|
+
var listActionBtns = [];
|
|
4026
|
+
if (isActivityLog) {
|
|
4027
|
+
listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }), onClick: function () { return setActivityModal(true); }, background: "bg-primary-500 hover:bg-primary-600" }));
|
|
4028
|
+
}
|
|
4029
|
+
if (bareActionComponent) {
|
|
4030
|
+
listActionBtns.push(bareActionComponent);
|
|
4031
|
+
}
|
|
4032
|
+
else if (((_g = props.edit) === null || _g === void 0 ? void 0 : _g.allEditable) || ((_h = props.edit) === null || _h === void 0 ? void 0 : _h.createBtn)) {
|
|
4033
|
+
listActionBtns.push(react_1.default.createElement(react_1.default.Fragment, null,
|
|
4034
|
+
hasNavigation ? (react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
|
|
4035
|
+
var _a, _b;
|
|
4036
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", "new");
|
|
4037
|
+
}, className: isBottom ? "mt-5" : "" })) : (react_1.default.createElement(link_1.Link, { href: "".concat(props.localURLEndpoint, "?data=new&type=update&collection=").concat(props.collectionId), linkType: props.linkType, custom: props.custom },
|
|
4038
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", className: isBottom ? "mt-5" : "" }))),
|
|
4039
|
+
offlineDataLength > 0 && (react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.CloudArrowUpIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
|
|
4040
|
+
handlePopUpModal(true, "offline");
|
|
4041
|
+
}, className: isBottom ? "mt-5" : "" }))));
|
|
4042
|
+
}
|
|
4043
|
+
if (listActionBtns.length > 0) {
|
|
4044
|
+
return react_1.default.createElement(react_1.default.Fragment, null, listActionBtns);
|
|
4045
|
+
}
|
|
4046
|
+
else
|
|
4047
|
+
return null;
|
|
4038
4048
|
}
|
|
4039
4049
|
return null;
|
|
4040
4050
|
};
|
|
@@ -4151,7 +4161,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4151
4161
|
authList));
|
|
4152
4162
|
};
|
|
4153
4163
|
var renderContent = function () {
|
|
4154
|
-
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, _0, _1
|
|
4164
|
+
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, _0, _1;
|
|
4155
4165
|
var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
|
|
4156
4166
|
var tabs = renderTabs();
|
|
4157
4167
|
var pages = [
|
|
@@ -4263,7 +4273,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4263
4273
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
|
|
4264
4274
|
isBottom && renderActionButtons(props.type, true)));
|
|
4265
4275
|
case "list":
|
|
4266
|
-
var
|
|
4276
|
+
var filterComponent_1 = renderSearchContent();
|
|
4267
4277
|
var dataComponent = renderTabContent(tabs, props.type, viewType);
|
|
4268
4278
|
var actionComponent = renderActionButtons(props.type);
|
|
4269
4279
|
var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
@@ -4279,8 +4289,91 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4279
4289
|
if ((_0 = props.renderSettings) === null || _0 === void 0 ? void 0 : _0.renderListUI) {
|
|
4280
4290
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4281
4291
|
listReadQueryHOC,
|
|
4282
|
-
props.renderSettings.renderListUI(actionComponent,
|
|
4292
|
+
props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
|
|
4283
4293
|
}
|
|
4294
|
+
var renderListFilterElements = function () {
|
|
4295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4296
|
+
var filterElementList = [];
|
|
4297
|
+
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.filterComponentNewRow)) {
|
|
4298
|
+
if ((_b = props.organise) === null || _b === void 0 ? void 0 : _b.showGroupByFeature) {
|
|
4299
|
+
filterElementList.push(react_1.default.createElement(select_1.Select, { label: "Group", options: (_h = (_e = (_d = (_c = props === null || props === void 0 ? void 0 : props.organise) === null || _c === void 0 ? void 0 : _c.renderGroupByOptions) === null || _d === void 0 ? void 0 : _d.call(_c)) !== null && _e !== void 0 ? _e : (_g = (_f = props === null || props === void 0 ? void 0 : props.organise) === null || _f === void 0 ? void 0 : _f.renderReferenceLabelOptions) === null || _g === void 0 ? void 0 : _g.call(_f, props.collectionId, true)) !== null && _h !== void 0 ? _h : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
|
|
4300
|
+
}
|
|
4301
|
+
if (filterComponent_1 &&
|
|
4302
|
+
Array.isArray(filterComponent_1) &&
|
|
4303
|
+
filterComponent_1.length > 0) {
|
|
4304
|
+
filterElementList = filterElementList.concat(filterComponent_1);
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4307
|
+
if (filterElementList.length > 0) {
|
|
4308
|
+
return (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" }, filterElementList));
|
|
4309
|
+
}
|
|
4310
|
+
else
|
|
4311
|
+
return null;
|
|
4312
|
+
};
|
|
4313
|
+
var renderListActionElements = function () {
|
|
4314
|
+
var _a, _b;
|
|
4315
|
+
var actionElementList = [];
|
|
4316
|
+
if (schemaPresent) {
|
|
4317
|
+
actionElementList.push(react_1.default.createElement(react_1.default.Fragment, null,
|
|
4318
|
+
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 () {
|
|
4319
|
+
handlePopUpModal(true, "sort");
|
|
4320
|
+
} }),
|
|
4321
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4322
|
+
handlePopUpModal(true, "filter");
|
|
4323
|
+
}, bgColor: "bg-white" }),
|
|
4324
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.AdjustmentsHorizontalIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4325
|
+
handlePopUpModal(true, "overview");
|
|
4326
|
+
}, bgColor: "bg-white" }),
|
|
4327
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4328
|
+
// INFO - When Refresh Don't Clear Filter
|
|
4329
|
+
handleRefresh();
|
|
4330
|
+
}, bgColor: "bg-white" })));
|
|
4331
|
+
}
|
|
4332
|
+
if (!isBottom) {
|
|
4333
|
+
var actionBtns = renderActionButtons(props.type);
|
|
4334
|
+
if (actionBtns)
|
|
4335
|
+
actionElementList.push(actionBtns);
|
|
4336
|
+
}
|
|
4337
|
+
if (schemaPresent || ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.showExport)) {
|
|
4338
|
+
actionElementList.push(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 (
|
|
4339
|
+
//TODO: Bug - Crash on Next Js
|
|
4340
|
+
// <Menu.Item>
|
|
4341
|
+
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)
|
|
4342
|
+
// </Menu.Item>
|
|
4343
|
+
); })), lib: {
|
|
4344
|
+
Transition: (_b = props === null || props === void 0 ? void 0 : props.lib) === null || _b === void 0 ? void 0 : _b.Transition,
|
|
4345
|
+
} }));
|
|
4346
|
+
}
|
|
4347
|
+
if (actionElementList.length > 0) {
|
|
4348
|
+
return (react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center my-6 justify-content space-x-2 md:my-0" }, actionElementList));
|
|
4349
|
+
}
|
|
4350
|
+
else
|
|
4351
|
+
return null;
|
|
4352
|
+
};
|
|
4353
|
+
var renderListNewRowFilterElements = function () {
|
|
4354
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4355
|
+
var filterElementList = [];
|
|
4356
|
+
if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.filterComponentNewRow) {
|
|
4357
|
+
if (props.organise.showGroupByFeature) {
|
|
4358
|
+
filterElementList.push(react_1.default.createElement(select_1.Select, { label: "Group", options: (_g = (_d = (_c = (_b = props === null || props === void 0 ? void 0 : props.organise) === null || _b === void 0 ? void 0 : _b.renderGroupByOptions) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : (_f = (_e = props === null || props === void 0 ? void 0 : props.organise) === null || _e === void 0 ? void 0 : _e.renderReferenceLabelOptions) === null || _f === void 0 ? void 0 : _f.call(_e, props.collectionId, true)) !== null && _g !== void 0 ? _g : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
|
|
4359
|
+
}
|
|
4360
|
+
if (filterComponent_1 &&
|
|
4361
|
+
Array.isArray(filterComponent_1) &&
|
|
4362
|
+
filterComponent_1.length > 0) {
|
|
4363
|
+
filterComponent_1.forEach(function (item, index) {
|
|
4364
|
+
var filter = additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery[index];
|
|
4365
|
+
filterElementList.push(react_1.default.createElement("div", { key: index, className: (filter === null || filter === void 0 ? void 0 : filter.type) === "range"
|
|
4366
|
+
? "flex-grow sm:basis-full md:basis-1/2 lg:basis-1/3"
|
|
4367
|
+
: "flex-grow sm:flex-shrink-0 sm:basis-1/2 md:basis-1/4 lg:basis-1/6" }, item));
|
|
4368
|
+
});
|
|
4369
|
+
}
|
|
4370
|
+
}
|
|
4371
|
+
if (filterElementList.length > 0) {
|
|
4372
|
+
return (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" }, filterElementList));
|
|
4373
|
+
}
|
|
4374
|
+
else
|
|
4375
|
+
return null;
|
|
4376
|
+
};
|
|
4284
4377
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4285
4378
|
listReadQueryHOC,
|
|
4286
4379
|
react_1.default.createElement("div", { className: "flex flex-col py-2 md:items-end md:flex-row" },
|
|
@@ -4288,42 +4381,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4288
4381
|
react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
|
|
4289
4382
|
react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
|
|
4290
4383
|
react_1.default.createElement("div", { className: "grow" }),
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
schemaPresent && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4296
|
-
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 () {
|
|
4297
|
-
handlePopUpModal(true, "sort");
|
|
4298
|
-
} }),
|
|
4299
|
-
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4300
|
-
handlePopUpModal(true, "filter");
|
|
4301
|
-
}, bgColor: "bg-white" }),
|
|
4302
|
-
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.AdjustmentsHorizontalIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4303
|
-
handlePopUpModal(true, "overview");
|
|
4304
|
-
}, bgColor: "bg-white" }),
|
|
4305
|
-
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4306
|
-
// INFO - When Refresh Don't Clear Filter
|
|
4307
|
-
handleRefresh();
|
|
4308
|
-
}, bgColor: "bg-white" }))),
|
|
4309
|
-
!isBottom && renderActionButtons(props.type),
|
|
4310
|
-
(schemaPresent || ((_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.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 (
|
|
4311
|
-
//TODO: Bug - Crash on Next Js
|
|
4312
|
-
// <Menu.Item>
|
|
4313
|
-
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)
|
|
4314
|
-
// </Menu.Item>
|
|
4315
|
-
); })), lib: {
|
|
4316
|
-
Transition: (_10 = props === null || props === void 0 ? void 0 : props.lib) === null || _10 === void 0 ? void 0 : _10.Transition,
|
|
4317
|
-
} })))),
|
|
4318
|
-
((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" },
|
|
4319
|
-
((_12 = props === null || props === void 0 ? void 0 : props.organise) === null || _12 === void 0 ? void 0 : _12.showGroupByFeature) && (react_1.default.createElement(select_1.Select, { label: "Group", options: (_18 = (_15 = (_14 = (_13 = props === null || props === void 0 ? void 0 : props.organise) === null || _13 === void 0 ? void 0 : _13.renderGroupByOptions) === null || _14 === void 0 ? void 0 : _14.call(_13)) !== null && _15 !== void 0 ? _15 : (_17 = (_16 = props === null || props === void 0 ? void 0 : props.organise) === null || _16 === void 0 ? void 0 : _16.renderReferenceLabelOptions) === null || _17 === void 0 ? void 0 : _17.call(_16, props.collectionId, true)) !== null && _18 !== void 0 ? _18 : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } })),
|
|
4320
|
-
filterComponent.map(function (item, index) {
|
|
4321
|
-
var filter = additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery[index];
|
|
4322
|
-
return (react_1.default.createElement("div", { key: index, className: (filter === null || filter === void 0 ? void 0 : filter.type) === "range"
|
|
4323
|
-
? "flex-grow sm:basis-full md:basis-1/2 lg:basis-1/3"
|
|
4324
|
-
: "flex-grow sm:flex-shrink-0 sm:basis-1/2 md:basis-1/4 lg:basis-1/6" }, item));
|
|
4325
|
-
}))),
|
|
4326
|
-
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.darkMode })),
|
|
4384
|
+
renderListFilterElements(),
|
|
4385
|
+
renderListActionElements()),
|
|
4386
|
+
renderListNewRowFilterElements(),
|
|
4387
|
+
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode })),
|
|
4327
4388
|
renderTabContent(tabs, props.type, viewType),
|
|
4328
4389
|
isBottom && renderActionButtons(props.type, true)));
|
|
4329
4390
|
default:
|
|
@@ -5322,7 +5383,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5322
5383
|
} }));
|
|
5323
5384
|
}
|
|
5324
5385
|
else if (filterModal) {
|
|
5325
|
-
return (react_1.default.createElement(settingsModal_1.FilterModal, { server: props.devSettings.server, filter: additionalQuery, onChangeFilter: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.onChangeFilter, renderReferenceLabelOptions: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.renderReferenceSpaceOptions, setNotification: setNotification, onClose: function () {
|
|
5386
|
+
return (react_1.default.createElement(settingsModal_1.FilterModal, { server: props.devSettings.server, filter: additionalQuery, model: props.model, onChangeFilter: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.onChangeFilter, renderReferenceLabelOptions: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.renderReferenceSpaceOptions, setNotification: setNotification, onClose: function () {
|
|
5326
5387
|
handlePopUpModal(false);
|
|
5327
5388
|
} }));
|
|
5328
5389
|
}
|