blixify-ui-web 0.1.83 → 0.1.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.
Files changed (55) hide show
  1. package/lib/components/chart/barChart/index.js +2 -2
  2. package/lib/components/chart/barChart/index.js.map +1 -1
  3. package/lib/components/chart/lineChart/index.d.ts +13 -21
  4. package/lib/components/chart/lineChart/index.d.ts.map +1 -1
  5. package/lib/components/chart/lineChart/index.js +72 -100
  6. package/lib/components/chart/lineChart/index.js.map +1 -1
  7. package/lib/components/chart/pieChart/index.d.ts.map +1 -1
  8. package/lib/components/chart/pieChart/index.js +23 -3
  9. package/lib/components/chart/pieChart/index.js.map +1 -1
  10. package/lib/components/data/dataTemplate/index.d.ts +1 -0
  11. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  12. package/lib/components/data/dataTemplate/index.js +84 -52
  13. package/lib/components/data/dataTemplate/index.js.map +1 -1
  14. package/lib/components/data/dataTemplate/model.d.ts +3 -3
  15. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  16. package/lib/components/data/utils.d.ts.map +1 -1
  17. package/lib/components/data/utils.js +4 -0
  18. package/lib/components/data/utils.js.map +1 -1
  19. package/lib/components/input/address/index.d.ts.map +1 -1
  20. package/lib/components/input/address/index.js +4 -1
  21. package/lib/components/input/address/index.js.map +1 -1
  22. package/lib/components/input/datePicker/index.d.ts.map +1 -1
  23. package/lib/components/input/datePicker/index.js +3 -1
  24. package/lib/components/input/datePicker/index.js.map +1 -1
  25. package/lib/components/input/select/index.d.ts +1 -1
  26. package/lib/components/input/select/index.d.ts.map +1 -1
  27. package/lib/components/input/select/index.js +3 -1
  28. package/lib/components/input/select/index.js.map +1 -1
  29. package/lib/components/input/textInput/index.d.ts.map +1 -1
  30. package/lib/components/input/textInput/index.js +3 -1
  31. package/lib/components/input/textInput/index.js.map +1 -1
  32. package/lib/components/input/uploadInput/index.d.ts.map +1 -1
  33. package/lib/components/input/uploadInput/index.js +11 -11
  34. package/lib/components/input/uploadInput/index.js.map +1 -1
  35. package/lib/components/navigation/bars/index.d.ts +1 -0
  36. package/lib/components/navigation/bars/index.d.ts.map +1 -1
  37. package/lib/components/navigation/bars/index.js +2 -6
  38. package/lib/components/navigation/bars/index.js.map +1 -1
  39. package/lib/components/navigation/leftNav/index.d.ts +1 -0
  40. package/lib/components/navigation/leftNav/index.d.ts.map +1 -1
  41. package/lib/components/navigation/leftNav/index.js +1 -1
  42. package/lib/components/navigation/leftNav/index.js.map +1 -1
  43. package/lib/components/navigation/tabs/index.d.ts +1 -0
  44. package/lib/components/navigation/tabs/index.d.ts.map +1 -1
  45. package/lib/components/navigation/tabs/index.js +2 -6
  46. package/lib/components/navigation/tabs/index.js.map +1 -1
  47. package/package.json +1 -1
  48. package/lib/components/chart/lineChart/DateRangeModal.d.ts +0 -21
  49. package/lib/components/chart/lineChart/DateRangeModal.d.ts.map +0 -1
  50. package/lib/components/chart/lineChart/DateRangeModal.js +0 -106
  51. package/lib/components/chart/lineChart/DateRangeModal.js.map +0 -1
  52. package/lib/components/chart/lineChart/DateRangeSelect.d.ts +0 -29
  53. package/lib/components/chart/lineChart/DateRangeSelect.d.ts.map +0 -1
  54. package/lib/components/chart/lineChart/DateRangeSelect.js +0 -126
  55. package/lib/components/chart/lineChart/DateRangeSelect.js.map +0 -1
@@ -1,126 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
41
- return (mod && mod.__esModule) ? mod : { "default": mod };
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- var outline_1 = require("@heroicons/react/24/outline");
45
- var moment_1 = __importDefault(require("moment"));
46
- var react_1 = __importStar(require("react"));
47
- //TODO : Change this to Select.ts
48
- var DateRangeSelect = /** @class */ (function (_super) {
49
- __extends(DateRangeSelect, _super);
50
- function DateRangeSelect() {
51
- var _this = _super !== null && _super.apply(this, arguments) || this;
52
- _this.state = {
53
- onFocus: false,
54
- };
55
- _this.handleShowInput = function (onFocus) {
56
- setTimeout(function () {
57
- _this.setState({
58
- onFocus: onFocus,
59
- });
60
- }, 200);
61
- };
62
- _this.handleOnChange = function (key) {
63
- if (_this.props.onChange) {
64
- _this.props.onChange(_this.props.id, key);
65
- }
66
- _this.handleShowInput(false);
67
- };
68
- _this.renderOptions = function () {
69
- var optionView = [];
70
- _this.props.options.map(function (eachOption) {
71
- optionView.push(react_1.default.createElement("li", { key: eachOption.key, className: "text-gray-900 cursor-default select-none relative px-5 py-3 hover:bg-primary-300 group", onClick: _this.handleOnChange.bind(_this, eachOption.key) },
72
- react_1.default.createElement("span", { className: "font-normal block text-xs truncate group-hover:text-white" }, eachOption.title),
73
- _this.props.value === eachOption.key && (react_1.default.createElement("span", { className: "text-primary-600 absolute inset-y-0 right-0 flex items-center pr-4 group-hover:text-white" },
74
- react_1.default.createElement(outline_1.CheckIcon, { className: "h-5 w-5" })))));
75
- return null;
76
- });
77
- return optionView;
78
- };
79
- _this.renderSelectedResult = function () {
80
- var _a;
81
- var selectedValue = "";
82
- if (_this.props.range) {
83
- var startDay = (0, moment_1.default)(_this.props.range.startDate).format("DD/MM/YYYY");
84
- var endDay = (0, moment_1.default)(_this.props.range.endDate).format("DD/MM/YYYY");
85
- if (startDay === endDay) {
86
- selectedValue = "".concat(startDay, " - Custom Time");
87
- }
88
- else {
89
- selectedValue = "".concat(startDay, " - ").concat(endDay);
90
- }
91
- }
92
- else {
93
- _this.props.options.map(function (eachOption) {
94
- if (eachOption.key === _this.props.value) {
95
- selectedValue = eachOption.title;
96
- }
97
- return null;
98
- });
99
- }
100
- var className = "block truncate text-primary-600 font-bold";
101
- if (!selectedValue) {
102
- selectedValue = (_a = _this.props.placeholder) !== null && _a !== void 0 ? _a : "Placeholder";
103
- }
104
- return react_1.default.createElement("span", { className: className }, selectedValue);
105
- };
106
- return _this;
107
- }
108
- DateRangeSelect.prototype.render = function () {
109
- var buttonClassName = "bg-white w-full relative rounded-md px-5 py-3 text-left text-xs cursor-default focus:outline-none focus:border-primary-500";
110
- var optionClassName = "absolute z-10 mt-1 w-full bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm";
111
- if (this.props.error) {
112
- buttonClassName += " border-red-300";
113
- }
114
- return (react_1.default.createElement("div", { className: "mt-1 relative" },
115
- react_1.default.createElement("button", { type: "button", className: buttonClassName, "aria-haspopup": "listbox", "aria-expanded": "true", "aria-labelledby": "listbox-label", onClick: this.handleShowInput.bind(this, !this.state.onFocus), onFocus: this.handleShowInput.bind(this, true), onBlur: this.handleShowInput.bind(this, false) },
116
- this.renderSelectedResult(),
117
- react_1.default.createElement("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none" },
118
- react_1.default.createElement("svg", { className: "h-5 w-5 text-primary-600", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" },
119
- react_1.default.createElement("path", { fillRule: "evenodd", d: "M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z", clipRule: "evenodd" })))),
120
- this.state.onFocus && (react_1.default.createElement("ul", { className: optionClassName }, this.renderOptions())),
121
- react_1.default.createElement("span", { className: "text-red-500 text-sm" }, this.props.error)));
122
- };
123
- return DateRangeSelect;
124
- }(react_1.Component));
125
- exports.default = DateRangeSelect;
126
- //# sourceMappingURL=DateRangeSelect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateRangeSelect.js","sourceRoot":"","sources":["../../../../src/components/chart/lineChart/DateRangeSelect.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwD;AACxD,kDAA4B;AAC5B,6CAAyC;AAiBzC,iCAAiC;AACjC;IAA6C,mCAAgB;IAA7D;QAAA,qEAqHC;QApHC,WAAK,GAAG;YACN,OAAO,EAAE,KAAK;SACf,CAAC;QAEF,qBAAe,GAAG,UAAC,OAAgB;YACjC,UAAU,CAAC;gBACT,KAAI,CAAC,QAAQ,CAAC;oBACZ,OAAO,SAAA;iBACR,CAAC,CAAC;YACL,CAAC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