@dhis2/analytics 24.10.1 → 25.1.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/CHANGELOG.md +19 -0
- package/build/cjs/__demo__/CalculationModal.stories.js +448 -0
- package/build/cjs/api/analytics/AnalyticsRequest.js +12 -1
- package/build/cjs/api/dimensions.js +1 -1
- package/build/cjs/api/expression.js +67 -0
- package/build/cjs/assets/DimensionItemIcons/CalculationIcon.js +25 -0
- package/build/cjs/assets/FormulaIcon.js +40 -0
- package/build/cjs/components/DataDimension/Calculation/CalculationModal.js +448 -0
- package/build/cjs/components/DataDimension/Calculation/DataElementOption.js +78 -0
- package/build/cjs/components/DataDimension/Calculation/DataElementSelector.js +309 -0
- package/build/cjs/components/DataDimension/Calculation/DndContext.js +213 -0
- package/build/cjs/components/DataDimension/Calculation/DragHandleIcon.js +23 -0
- package/build/cjs/components/DataDimension/Calculation/DraggingItem.js +58 -0
- package/build/cjs/components/DataDimension/Calculation/DropZone.js +58 -0
- package/build/cjs/components/DataDimension/Calculation/FormulaField.js +121 -0
- package/build/cjs/components/DataDimension/Calculation/FormulaItem.js +232 -0
- package/build/cjs/components/DataDimension/Calculation/MathOperatorSelector.js +58 -0
- package/build/cjs/components/DataDimension/Calculation/Operator.js +81 -0
- package/build/cjs/components/DataDimension/Calculation/styles/CalculationModal.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/DataElementOption.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/DataElementSelector.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/DraggingItem.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/DropZone.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/FormulaField.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/FormulaItem.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/MathOperatorSelector.style.js +13 -0
- package/build/cjs/components/DataDimension/Calculation/styles/Operator.style.js +13 -0
- package/build/cjs/components/DataDimension/DataDimension.js +22 -6
- package/build/cjs/components/DataDimension/DataTypeSelector.js +5 -3
- package/build/cjs/components/DataDimension/ItemSelector.js +111 -73
- package/build/cjs/components/LegendKey/LegendKey.js +1 -1
- package/build/cjs/components/TransferOption.js +13 -4
- package/build/cjs/components/styles/DimensionSelector.style.js +2 -2
- package/build/cjs/components/styles/TransferOption.style.js +2 -2
- package/build/cjs/index.js +6 -0
- package/build/cjs/locales/en/translations.json +32 -7
- package/build/cjs/modules/__tests__/expressions.spec.js +139 -0
- package/build/cjs/modules/__tests__/hash.spec.js +92 -0
- package/build/cjs/modules/__tests__/parseExpression.spec.js +46 -0
- package/build/cjs/modules/dataTypes.js +8 -1
- package/build/cjs/modules/dimensionListItem.js +82 -0
- package/build/cjs/modules/expressions.js +164 -0
- package/build/cjs/modules/hash.js +28 -0
- package/build/cjs/visualizations/config/generators/dhis/singleValue.js +112 -58
- package/build/es/__demo__/CalculationModal.stories.js +440 -0
- package/build/es/api/analytics/AnalyticsRequest.js +11 -1
- package/build/es/api/dimensions.js +1 -1
- package/build/es/api/expression.js +57 -0
- package/build/es/assets/DimensionItemIcons/CalculationIcon.js +13 -0
- package/build/es/assets/FormulaIcon.js +30 -0
- package/build/es/components/DataDimension/Calculation/CalculationModal.js +419 -0
- package/build/es/components/DataDimension/Calculation/DataElementOption.js +61 -0
- package/build/es/components/DataDimension/Calculation/DataElementSelector.js +283 -0
- package/build/es/components/DataDimension/Calculation/DndContext.js +194 -0
- package/build/es/components/DataDimension/Calculation/DragHandleIcon.js +11 -0
- package/build/es/components/DataDimension/Calculation/DraggingItem.js +40 -0
- package/build/es/components/DataDimension/Calculation/DropZone.js +43 -0
- package/build/es/components/DataDimension/Calculation/FormulaField.js +98 -0
- package/build/es/components/DataDimension/Calculation/FormulaItem.js +207 -0
- package/build/es/components/DataDimension/Calculation/MathOperatorSelector.js +42 -0
- package/build/es/components/DataDimension/Calculation/Operator.js +64 -0
- package/build/es/components/DataDimension/Calculation/styles/CalculationModal.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/DataElementOption.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/DataElementSelector.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/DraggingItem.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/DropZone.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/FormulaField.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/FormulaItem.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/MathOperatorSelector.style.js +4 -0
- package/build/es/components/DataDimension/Calculation/styles/Operator.style.js +4 -0
- package/build/es/components/DataDimension/DataDimension.js +21 -6
- package/build/es/components/DataDimension/DataTypeSelector.js +6 -4
- package/build/es/components/DataDimension/ItemSelector.js +111 -73
- package/build/es/components/LegendKey/LegendKey.js +1 -1
- package/build/es/components/TransferOption.js +14 -5
- package/build/es/components/styles/DimensionSelector.style.js +2 -2
- package/build/es/components/styles/TransferOption.style.js +2 -2
- package/build/es/index.js +1 -1
- package/build/es/locales/en/translations.json +32 -7
- package/build/es/modules/__tests__/expressions.spec.js +136 -0
- package/build/es/modules/__tests__/hash.spec.js +88 -0
- package/build/es/modules/__tests__/parseExpression.spec.js +43 -0
- package/build/es/modules/dataTypes.js +6 -0
- package/build/es/modules/dimensionListItem.js +61 -0
- package/build/es/modules/expressions.js +131 -0
- package/build/es/modules/hash.js +12 -0
- package/build/es/visualizations/config/generators/dhis/singleValue.js +112 -58
- package/package.json +6 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.LAST_DROPZONE_ID = exports.FORMULA_BOX_ID = void 0;
|
|
7
|
+
|
|
8
|
+
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
|
+
|
|
10
|
+
var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
11
|
+
|
|
12
|
+
var _ui = require("@dhis2/ui");
|
|
13
|
+
|
|
14
|
+
var _core = require("@dnd-kit/core");
|
|
15
|
+
|
|
16
|
+
var _sortable = require("@dnd-kit/sortable");
|
|
17
|
+
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
21
|
+
|
|
22
|
+
var _FormulaIcon = _interopRequireDefault(require("../../../assets/FormulaIcon.js"));
|
|
23
|
+
|
|
24
|
+
var _DropZone = _interopRequireDefault(require("./DropZone.js"));
|
|
25
|
+
|
|
26
|
+
var _FormulaItem = _interopRequireDefault(require("./FormulaItem.js"));
|
|
27
|
+
|
|
28
|
+
var _FormulaFieldStyle = _interopRequireDefault(require("./styles/FormulaField.style.js"));
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
const LAST_DROPZONE_ID = 'lastdropzone';
|
|
33
|
+
exports.LAST_DROPZONE_ID = LAST_DROPZONE_ID;
|
|
34
|
+
const FORMULA_BOX_ID = 'formulabox';
|
|
35
|
+
exports.FORMULA_BOX_ID = FORMULA_BOX_ID;
|
|
36
|
+
|
|
37
|
+
const Placeholder = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
"data-test": "placeholder",
|
|
39
|
+
className: "jsx-".concat(_FormulaFieldStyle.default.__hash) + " " + "placeholder"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_FormulaIcon.default, null), /*#__PURE__*/_react.default.createElement("span", {
|
|
41
|
+
className: "jsx-".concat(_FormulaFieldStyle.default.__hash) + " " + "help-text"
|
|
42
|
+
}, _d2I18n.default.t('Drag items here, or double click in the list, to start building a calculation formula')), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
43
|
+
id: _FormulaFieldStyle.default.__hash
|
|
44
|
+
}, _FormulaFieldStyle.default));
|
|
45
|
+
|
|
46
|
+
const FormulaField = _ref => {
|
|
47
|
+
let {
|
|
48
|
+
items = [],
|
|
49
|
+
selectedItemId,
|
|
50
|
+
focusItemId,
|
|
51
|
+
onChange,
|
|
52
|
+
onClick,
|
|
53
|
+
onDoubleClick,
|
|
54
|
+
loading
|
|
55
|
+
} = _ref;
|
|
56
|
+
const {
|
|
57
|
+
over,
|
|
58
|
+
setNodeRef: setLastDropzoneRef
|
|
59
|
+
} = (0, _core.useDroppable)({
|
|
60
|
+
id: LAST_DROPZONE_ID
|
|
61
|
+
});
|
|
62
|
+
const itemIds = items.map(item => item.id);
|
|
63
|
+
const overLastDropZone = (over === null || over === void 0 ? void 0 : over.id) === LAST_DROPZONE_ID;
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
className: "jsx-".concat(_FormulaFieldStyle.default.__hash) + " " + "container"
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
+
className: "jsx-".concat(_FormulaFieldStyle.default.__hash) + " " + "border"
|
|
68
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
+
ref: setLastDropzoneRef,
|
|
70
|
+
"data-test": "formula-field",
|
|
71
|
+
className: "jsx-".concat(_FormulaFieldStyle.default.__hash) + " " + "formula-field"
|
|
72
|
+
}, loading && /*#__PURE__*/_react.default.createElement(_ui.Center, null, /*#__PURE__*/_react.default.createElement(_ui.CircularLoader, {
|
|
73
|
+
small: true
|
|
74
|
+
})), !loading && itemIds && /*#__PURE__*/_react.default.createElement(_sortable.SortableContext, {
|
|
75
|
+
id: FORMULA_BOX_ID,
|
|
76
|
+
items: itemIds
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_DropZone.default, {
|
|
78
|
+
firstElementId: itemIds[0],
|
|
79
|
+
overLastDropZone: overLastDropZone
|
|
80
|
+
}), !items.length && /*#__PURE__*/_react.default.createElement(Placeholder, null), Boolean(items.length) && items.map((_ref2, index) => {
|
|
81
|
+
let {
|
|
82
|
+
id,
|
|
83
|
+
label,
|
|
84
|
+
type,
|
|
85
|
+
value
|
|
86
|
+
} = _ref2;
|
|
87
|
+
return /*#__PURE__*/_react.default.createElement(_FormulaItem.default, {
|
|
88
|
+
key: id,
|
|
89
|
+
id: id,
|
|
90
|
+
label: label,
|
|
91
|
+
type: type,
|
|
92
|
+
value: value,
|
|
93
|
+
hasFocus: focusItemId === id,
|
|
94
|
+
isHighlighted: selectedItemId === id,
|
|
95
|
+
isLast: index === items.length - 1,
|
|
96
|
+
onChange: onChange,
|
|
97
|
+
onClick: onClick,
|
|
98
|
+
onDoubleClick: onDoubleClick,
|
|
99
|
+
overLastDropZone: overLastDropZone
|
|
100
|
+
});
|
|
101
|
+
}))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
102
|
+
id: _FormulaFieldStyle.default.__hash
|
|
103
|
+
}, _FormulaFieldStyle.default));
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
FormulaField.propTypes = {
|
|
107
|
+
onChange: _propTypes.default.func.isRequired,
|
|
108
|
+
onClick: _propTypes.default.func.isRequired,
|
|
109
|
+
onDoubleClick: _propTypes.default.func.isRequired,
|
|
110
|
+
focusItemId: _propTypes.default.string,
|
|
111
|
+
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
112
|
+
id: _propTypes.default.string,
|
|
113
|
+
label: _propTypes.default.string,
|
|
114
|
+
type: _propTypes.default.string,
|
|
115
|
+
value: _propTypes.default.string
|
|
116
|
+
})),
|
|
117
|
+
loading: _propTypes.default.bool,
|
|
118
|
+
selectedItemId: _propTypes.default.string
|
|
119
|
+
};
|
|
120
|
+
var _default = FormulaField;
|
|
121
|
+
exports.default = _default;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
|
+
|
|
10
|
+
var _ui = require("@dhis2/ui");
|
|
11
|
+
|
|
12
|
+
var _sortable = require("@dnd-kit/sortable");
|
|
13
|
+
|
|
14
|
+
var _utilities = require("@dnd-kit/utilities");
|
|
15
|
+
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
+
|
|
22
|
+
var _dataTypes = require("../../../modules/dataTypes.js");
|
|
23
|
+
|
|
24
|
+
var _dimensionListItem = require("../../../modules/dimensionListItem.js");
|
|
25
|
+
|
|
26
|
+
var _expressions = require("../../../modules/expressions.js");
|
|
27
|
+
|
|
28
|
+
var _DragHandleIcon = _interopRequireDefault(require("./DragHandleIcon.js"));
|
|
29
|
+
|
|
30
|
+
var _FormulaItemStyle = _interopRequireDefault(require("./styles/FormulaItem.style.js"));
|
|
31
|
+
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
|
+
|
|
38
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
39
|
+
|
|
40
|
+
const BEFORE = 'BEFORE';
|
|
41
|
+
const AFTER = 'AFTER';
|
|
42
|
+
const maxMsBetweenClicks = 300;
|
|
43
|
+
const TAG_INPUT = 'INPUT';
|
|
44
|
+
|
|
45
|
+
const FormulaItem = _ref => {
|
|
46
|
+
let {
|
|
47
|
+
id,
|
|
48
|
+
label,
|
|
49
|
+
value = '',
|
|
50
|
+
type,
|
|
51
|
+
isLast,
|
|
52
|
+
isHighlighted,
|
|
53
|
+
overLastDropZone,
|
|
54
|
+
onChange,
|
|
55
|
+
onClick,
|
|
56
|
+
onDoubleClick,
|
|
57
|
+
hasFocus
|
|
58
|
+
} = _ref;
|
|
59
|
+
const {
|
|
60
|
+
attributes,
|
|
61
|
+
listeners,
|
|
62
|
+
index,
|
|
63
|
+
isDragging,
|
|
64
|
+
over,
|
|
65
|
+
active,
|
|
66
|
+
setNodeRef,
|
|
67
|
+
transform,
|
|
68
|
+
transition
|
|
69
|
+
} = (0, _sortable.useSortable)({
|
|
70
|
+
id,
|
|
71
|
+
data: {
|
|
72
|
+
label,
|
|
73
|
+
type,
|
|
74
|
+
value
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const inputRef = (0, _react.useRef)(null);
|
|
78
|
+
const [clickTimeoutId, setClickTimeoutId] = (0, _react.useState)(null);
|
|
79
|
+
(0, _react.useEffect)(() => {
|
|
80
|
+
if (hasFocus && inputRef.current) {
|
|
81
|
+
// setTimeout seems to be needed in order for the cursor
|
|
82
|
+
// to remain in the input. Without it, the cursor disappears
|
|
83
|
+
// even though the input still has the focus.
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
inputRef.current.focus();
|
|
86
|
+
}, 50);
|
|
87
|
+
}
|
|
88
|
+
}, [inputRef, hasFocus]);
|
|
89
|
+
const activeIndex = (active === null || active === void 0 ? void 0 : active.data.current.sortable.index) || -1;
|
|
90
|
+
const style = transform ? {
|
|
91
|
+
transform: active ? undefined : _utilities.CSS.Translate.toString({
|
|
92
|
+
x: transform.x,
|
|
93
|
+
y: transform.y,
|
|
94
|
+
scaleX: 1,
|
|
95
|
+
scaleY: 1
|
|
96
|
+
}),
|
|
97
|
+
transition
|
|
98
|
+
} : undefined;
|
|
99
|
+
let insertPosition;
|
|
100
|
+
|
|
101
|
+
if ((over === null || over === void 0 ? void 0 : over.id) === id) {
|
|
102
|
+
// This item is being hovered over by the item being dragged
|
|
103
|
+
if (activeIndex === -1) {
|
|
104
|
+
//The item being dragged came from the expression options
|
|
105
|
+
// so we will insert after
|
|
106
|
+
insertPosition = AFTER;
|
|
107
|
+
} else {
|
|
108
|
+
// The item being dragged is being moved in the formula
|
|
109
|
+
// so if the item is before the item being dragged, use the
|
|
110
|
+
// BEFORE position. Otherwise use the AFTER position
|
|
111
|
+
insertPosition = index > activeIndex ? AFTER : BEFORE;
|
|
112
|
+
}
|
|
113
|
+
} else if (isLast && overLastDropZone) {
|
|
114
|
+
insertPosition = AFTER;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const handleClick = e => {
|
|
118
|
+
const tagname = e.target.tagName;
|
|
119
|
+
clearTimeout(clickTimeoutId);
|
|
120
|
+
const to = setTimeout(function () {
|
|
121
|
+
if (tagname !== TAG_INPUT) {
|
|
122
|
+
onClick(id);
|
|
123
|
+
} else {
|
|
124
|
+
inputRef.current && inputRef.current.focus();
|
|
125
|
+
}
|
|
126
|
+
}, maxMsBetweenClicks);
|
|
127
|
+
setClickTimeoutId(to);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const handleDoubleClick = e => {
|
|
131
|
+
clearTimeout(clickTimeoutId);
|
|
132
|
+
setClickTimeoutId(null);
|
|
133
|
+
|
|
134
|
+
if (e.target.tagName !== TAG_INPUT) {
|
|
135
|
+
onDoubleClick(id);
|
|
136
|
+
} else {
|
|
137
|
+
inputRef.current && inputRef.current.focus();
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const handleChange = e => onChange({
|
|
142
|
+
itemId: id,
|
|
143
|
+
value: e.target.value
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const getContent = () => {
|
|
147
|
+
if (type === _expressions.EXPRESSION_TYPE_NUMBER) {
|
|
148
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + ((0, _classnames.default)('content', 'number', {
|
|
150
|
+
highlighted: isHighlighted
|
|
151
|
+
}) || "")
|
|
152
|
+
}, _DragHandleIcon.default, /*#__PURE__*/_react.default.createElement("span", {
|
|
153
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + "number-positioner"
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
155
|
+
"aria-hidden": "true",
|
|
156
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + "number-width"
|
|
157
|
+
}, value), /*#__PURE__*/_react.default.createElement("input", {
|
|
158
|
+
id: id,
|
|
159
|
+
name: label,
|
|
160
|
+
onChange: handleChange,
|
|
161
|
+
value: value,
|
|
162
|
+
type: "number",
|
|
163
|
+
ref: inputRef,
|
|
164
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + "input"
|
|
165
|
+
})), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
166
|
+
id: _FormulaItemStyle.default.__hash
|
|
167
|
+
}, _FormulaItemStyle.default));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (type === _expressions.EXPRESSION_TYPE_DATA) {
|
|
171
|
+
return /*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
|
|
172
|
+
content: label,
|
|
173
|
+
placement: "bottom"
|
|
174
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + ((0, _classnames.default)('content', 'data', {
|
|
176
|
+
highlighted: isHighlighted
|
|
177
|
+
}) || "")
|
|
178
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
179
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + "icon"
|
|
180
|
+
}, (0, _dimensionListItem.getIcon)(_dataTypes.DIMENSION_TYPE_DATA_ELEMENT)), /*#__PURE__*/_react.default.createElement("span", {
|
|
181
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + "label"
|
|
182
|
+
}, label), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
183
|
+
id: _FormulaItemStyle.default.__hash
|
|
184
|
+
}, _FormulaItemStyle.default)));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
188
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + ((0, _classnames.default)('content', 'operator', {
|
|
189
|
+
highlighted: isHighlighted
|
|
190
|
+
}) || "")
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
192
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + "label"
|
|
193
|
+
}, label), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
194
|
+
id: _FormulaItemStyle.default.__hash
|
|
195
|
+
}, _FormulaItemStyle.default));
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
199
|
+
ref: setNodeRef,
|
|
200
|
+
style: style,
|
|
201
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + ((0, _classnames.default)({
|
|
202
|
+
'last-item': isLast
|
|
203
|
+
}) || "")
|
|
204
|
+
}, /*#__PURE__*/_react.default.createElement("div", _extends({}, attributes, listeners, {
|
|
205
|
+
onClick: handleClick,
|
|
206
|
+
onDoubleClick: handleDoubleClick,
|
|
207
|
+
"data-test": "formula-item-".concat(id),
|
|
208
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash) + " " + ((0, _classnames.default)('formula-item', {
|
|
209
|
+
inactive: !isDragging,
|
|
210
|
+
insertBefore: insertPosition === BEFORE,
|
|
211
|
+
insertAfter: insertPosition === AFTER
|
|
212
|
+
}) || "")
|
|
213
|
+
}), getContent())), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
214
|
+
id: _FormulaItemStyle.default.__hash
|
|
215
|
+
}, _FormulaItemStyle.default));
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
FormulaItem.propTypes = {
|
|
219
|
+
id: _propTypes.default.string.isRequired,
|
|
220
|
+
label: _propTypes.default.string.isRequired,
|
|
221
|
+
type: _propTypes.default.string.isRequired,
|
|
222
|
+
onChange: _propTypes.default.func.isRequired,
|
|
223
|
+
onClick: _propTypes.default.func.isRequired,
|
|
224
|
+
onDoubleClick: _propTypes.default.func.isRequired,
|
|
225
|
+
hasFocus: _propTypes.default.bool,
|
|
226
|
+
isHighlighted: _propTypes.default.bool,
|
|
227
|
+
isLast: _propTypes.default.bool,
|
|
228
|
+
overLastDropZone: _propTypes.default.bool,
|
|
229
|
+
value: _propTypes.default.string
|
|
230
|
+
};
|
|
231
|
+
var _default = FormulaItem;
|
|
232
|
+
exports.default = _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _index = _interopRequireDefault(require("../../../locales/index.js"));
|
|
15
|
+
|
|
16
|
+
var _expressions = require("../../../modules/expressions.js");
|
|
17
|
+
|
|
18
|
+
var _Operator = _interopRequireDefault(require("./Operator.js"));
|
|
19
|
+
|
|
20
|
+
var _MathOperatorSelectorStyle = _interopRequireDefault(require("./styles/MathOperatorSelector.style.js"));
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
24
|
+
const MathOperatorSelector = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
onDoubleClick
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
+
className: "jsx-".concat(_MathOperatorSelectorStyle.default.__hash) + " " + "wrapper"
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("h4", {
|
|
31
|
+
className: "jsx-".concat(_MathOperatorSelectorStyle.default.__hash) + " " + "sub-header"
|
|
32
|
+
}, _index.default.t('Math operators')), /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
"data-test": "operators-list",
|
|
34
|
+
className: "jsx-".concat(_MathOperatorSelectorStyle.default.__hash) + " " + "operators"
|
|
35
|
+
}, (0, _expressions.getOperators)().map((_ref2, index) => {
|
|
36
|
+
let {
|
|
37
|
+
label,
|
|
38
|
+
value,
|
|
39
|
+
type
|
|
40
|
+
} = _ref2;
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_Operator.default, {
|
|
42
|
+
key: "".concat(label, "-").concat(index),
|
|
43
|
+
label: label,
|
|
44
|
+
value: value,
|
|
45
|
+
type: type,
|
|
46
|
+
index: index,
|
|
47
|
+
onDoubleClick: onDoubleClick
|
|
48
|
+
});
|
|
49
|
+
}))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
50
|
+
id: _MathOperatorSelectorStyle.default.__hash
|
|
51
|
+
}, _MathOperatorSelectorStyle.default));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
MathOperatorSelector.propTypes = {
|
|
55
|
+
onDoubleClick: _propTypes.default.func.isRequired
|
|
56
|
+
};
|
|
57
|
+
var _default = MathOperatorSelector;
|
|
58
|
+
exports.default = _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
|
+
|
|
10
|
+
var _sortable = require("@dnd-kit/sortable");
|
|
11
|
+
|
|
12
|
+
var _utilities = require("@dnd-kit/utilities");
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireDefault(require("react"));
|
|
19
|
+
|
|
20
|
+
var _expressions = require("../../../modules/expressions.js");
|
|
21
|
+
|
|
22
|
+
var _FormulaItemStyle = _interopRequireDefault(require("./styles/FormulaItem.style.js"));
|
|
23
|
+
|
|
24
|
+
var _OperatorStyle = _interopRequireDefault(require("./styles/Operator.style.js"));
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
30
|
+
const Operator = _ref => {
|
|
31
|
+
let {
|
|
32
|
+
label,
|
|
33
|
+
value,
|
|
34
|
+
type,
|
|
35
|
+
onDoubleClick
|
|
36
|
+
} = _ref;
|
|
37
|
+
const data = {
|
|
38
|
+
label,
|
|
39
|
+
value,
|
|
40
|
+
type
|
|
41
|
+
};
|
|
42
|
+
const {
|
|
43
|
+
attributes,
|
|
44
|
+
listeners,
|
|
45
|
+
setNodeRef,
|
|
46
|
+
transform
|
|
47
|
+
} = (0, _sortable.useSortable)({
|
|
48
|
+
id: "operator-".concat(label),
|
|
49
|
+
data
|
|
50
|
+
});
|
|
51
|
+
const style = {
|
|
52
|
+
transform: _utilities.CSS.Translate.toString(transform)
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, attributes, listeners, {
|
|
55
|
+
ref: setNodeRef,
|
|
56
|
+
style: style,
|
|
57
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash, " jsx-").concat(_OperatorStyle.default.__hash) + " " + (listeners && listeners.className != null && listeners.className || attributes && attributes.className != null && attributes.className || "")
|
|
58
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
59
|
+
"data-test": "operator",
|
|
60
|
+
onDoubleClick: () => onDoubleClick(data),
|
|
61
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash, " jsx-").concat(_OperatorStyle.default.__hash) + " " + ((0, _classnames.default)('content', {
|
|
62
|
+
operator: type === _expressions.EXPRESSION_TYPE_OPERATOR,
|
|
63
|
+
number: type === _expressions.EXPRESSION_TYPE_NUMBER
|
|
64
|
+
}) || "")
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
66
|
+
className: "jsx-".concat(_FormulaItemStyle.default.__hash, " jsx-").concat(_OperatorStyle.default.__hash)
|
|
67
|
+
}, label)), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
68
|
+
id: _FormulaItemStyle.default.__hash
|
|
69
|
+
}, _FormulaItemStyle.default), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
70
|
+
id: _OperatorStyle.default.__hash
|
|
71
|
+
}, _OperatorStyle.default));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
Operator.propTypes = {
|
|
75
|
+
label: _propTypes.default.string.isRequired,
|
|
76
|
+
type: _propTypes.default.string.isRequired,
|
|
77
|
+
value: _propTypes.default.string.isRequired,
|
|
78
|
+
onDoubleClick: _propTypes.default.func.isRequired
|
|
79
|
+
};
|
|
80
|
+
var _default = Operator;
|
|
81
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".header.jsx-1005744271{background:".concat(_ui.colors.grey200, ";padding:").concat(_ui.spacers.dp16, ";font-weight:normal;}"), ".header-icon.jsx-1005744271{padding:0 ".concat(_ui.spacers.dp8, ";vertical-align:text-bottom;line-height:14px;}"), ".actions-wrapper.jsx-1005744271{margin-top:".concat(_ui.spacers.dp16, ";margin-bottom:").concat(_ui.spacers.dp16, ";margin-left:").concat(_ui.spacers.dp4, ";}"), ".button-container.jsx-1005744271{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".validate-button.jsx-1005744271{margin-bottom:".concat(_ui.spacers.dp4, ";}"), ".remove-button.jsx-1005744271{margin-right:".concat(_ui.spacers.dp8, ";}"), ".delete-button.jsx-1005744271{margin-right:".concat(_ui.spacers.dp8, ";}"), ".content.jsx-1005744271{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".left-section.jsx-1005744271{width:45%;}", ".right-section.jsx-1005744271{width:55%;padding-left:".concat(_ui.spacers.dp8, ";font-size:14px;}"), ".validation-message.jsx-1005744271{margin-left:".concat(_ui.spacers.dp8, ";}"), ".validation-error.jsx-1005744271{color:".concat(_ui.colors.red500, ";}"), ".validation-success.jsx-1005744271{color:".concat(_ui.colors.green500, ";}"), ".name-input.jsx-1005744271{margin-top:".concat(_ui.spacers.dp12, ";}")];
|
|
11
|
+
_defaultExport.__hash = "1005744271";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".wrapper.jsx-2286537164{margin-top:".concat(_ui.spacers.dp4, ";}"), ".wrapper.jsx-2286537164:last-child{margin-bottom:".concat(_ui.spacers.dp4, ";}"), ".draggable-item.jsx-2286537164{cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".chip.jsx-2286537164{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;background:".concat(_ui.colors.grey200, ";font-size:14px;padding:2px ").concat(_ui.spacers.dp8, " 2px 2px;border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"), ".chip.jsx-2286537164:hover{background:".concat(_ui.colors.grey300, ";}"), ".icon.jsx-2286537164,.label.jsx-2286537164{line-height:18px;}", ".icon.jsx-2286537164{margin-right:2px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:text-bottom;padding-top:1px;}"];
|
|
11
|
+
_defaultExport.__hash = "2286537164";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".dimension-list-container.jsx-4262244129{position:relative;}", ".dimension-list-scrollbox.jsx-4262244129{position:relative;width:100%;height:337px;overflow:hidden;overflow-y:auto;border:1px solid ".concat(_ui.colors.grey400, ";}"), ".dimension-list-scroller.jsx-4262244129{position:relative;min-height:1px;padding:0 ".concat(_ui.spacers.dp4, ";}"), ".dimension-list-scroller.loading.jsx-4262244129{-webkit-filter:blur(2px);filter:blur(2px);}", ".scroll-detector.jsx-4262244129{boxsizing:border-box;width:100%;height:100px;position:absolute;bottom:0;left:0;z-index:-1;}", ".dimension-list-overlay.jsx-4262244129{position:absolute;width:100%;height:100%;z-index:2;top:0;left:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", ".filter-wrapper.jsx-4262244129{padding:".concat(_ui.spacers.dp8, ";border:1px solid ").concat(_ui.colors.grey400, ";border-bottom:0;}"), ".selector-wrapper.jsx-4262244129{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(_ui.spacers.dp4, ";}"), ".sub-header.jsx-4262244129{font-size:14px;font-weight:normal;margin:0 0 ".concat(_ui.spacers.dp4, ";}"), ".group-select.jsx-4262244129{width:50%;margin-top:".concat(_ui.spacers.dp4, ";}"), ".empty-list.jsx-4262244129{text-align:center;font-size:14px;line-height:16px;margin:".concat(_ui.spacers.dp24, " 0 0;color:").concat(_ui.colors.grey700, ";}")];
|
|
11
|
+
_defaultExport.__hash = "4262244129";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".dragging.jsx-2818590818{border:2px solid ".concat(_ui.colors.blue500, ";cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;}"), ".number.jsx-2818590818{padding:0 ".concat(_ui.spacers.dp8, ";}")];
|
|
11
|
+
_defaultExport.__hash = "2818590818";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".first-dropzone.jsx-3773517794{position:absolute;top:0;left:0;z-index:-1;width:24px;height:28px;background-color:transparent;}", ".dragging-over.jsx-3773517794{z-index:100;}", ".empty.jsx-3773517794{position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;z-index:100;margin-left:-10px;margin-top:-4px;}", ".dragging-over.jsx-3773517794::before,.dragging-over.jsx-3773517794::after{content:'';position:absolute;}", ".dragging-over.jsx-3773517794::before{top:10px;width:4px;left:4px;height:18px;background-color:".concat(_ui.colors.blue500, ";}"), ".dragging-over.jsx-3773517794::after{top:0;left:0;width:12px;height:12px;border:4px solid ".concat(_ui.colors.blue500, ";background:transparent;border-radius:12px;}")];
|
|
11
|
+
_defaultExport.__hash = "3773517794";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".formula-field.jsx-926760428{border-right:2px solid ".concat(_ui.colors.grey200, ";height:180px;overflow:auto;padding:6px 12px;position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:").concat(_ui.spacers.dp4, " ").concat(_ui.spacers.dp8, ";width:100%;}"), ".container.jsx-926760428{position:relative;}", ".border.jsx-926760428{position:absolute;top:0;left:6px;height:180px;width:calc(100% - 6px);border-left:2px solid ".concat(_ui.colors.grey200, ";border-top:2px solid ").concat(_ui.colors.grey200, ";border-bottom:2px solid ").concat(_ui.colors.grey200, ";}"), ".placeholder.jsx-926760428{height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:".concat(_ui.spacers.dp8, ";-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-top:-28px;padding:0 ").concat(_ui.spacers.dp32, ";}"), ".help-text.jsx-926760428{color:".concat(_ui.colors.grey600, ";font-size:14px;line-height:19px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")];
|
|
11
|
+
_defaultExport.__hash = "926760428";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".formula-item.jsx-255634210{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}", ".formula-item.jsx-255634210:not(.inactive){opacity:0.5;}", ".content.jsx-255634210{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:24px;font-size:14px;border-radius:3px;background:".concat(_ui.colors.grey200, ";}"), ".icon.jsx-255634210{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;margin-right:2px;}", ".operator.jsx-255634210{padding:0;width:24px;}", ".data.jsx-255634210,.number.jsx-255634210{padding:0 ".concat(_ui.spacers.dp8, " 0 2px;}"), ".operator.jsx-255634210 .label.jsx-255634210{margin-bottom:1px;}", ".data.jsx-255634210 .label.jsx-255634210{max-width:280px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}", ".number-positioner.jsx-255634210{position:relative;line-height:18px;}", ".number-width.jsx-255634210{padding:0 24px 0 0;visibility:hidden;}", ".input.jsx-255634210{position:absolute;width:100%;left:0;background-color:transparent;border:1px dashed #a0adba;padding:0 0 0 2px;}", ".input.jsx-255634210:hover,.input.jsx-255634210:focus{background:white;border:1px solid rgba(0,0,0,0.2);}", ".highlighted.jsx-255634210{background:".concat(_ui.theme.secondary800, ";color:").concat(_ui.colors.white, ";}"), ".highlighted.jsx-255634210 .input.jsx-255634210{color:".concat(_ui.colors.white, ";}"), ".highlighted.jsx-255634210 .input.jsx-255634210:hover,.highlighted.jsx-255634210 .input.jsx-255634210:active,.highlighted.jsx-255634210 .input.jsx-255634210:focus{color:".concat(_ui.colors.grey900, ";}"), ".highlighted.jsx-255634210 .icon path{fill:".concat(_ui.colors.white, ";}"), ".inactive.insertBefore.jsx-255634210 .content.jsx-255634210::before,.inactive.insertAfter.jsx-255634210 .content.jsx-255634210::before,.inactive.insertBefore.jsx-255634210 .content.jsx-255634210::after,.inactive.insertAfter.jsx-255634210 .content.jsx-255634210::after{content:'';position:absolute;z-index:100;}", ".content.jsx-255634210::before{top:6px;bottom:0;width:4px;background-color:".concat(_ui.colors.blue500, ";}"), ".content.jsx-255634210::after{top:-4px;width:12px;height:12px;border:4px solid ".concat(_ui.colors.blue500, ";background:transparent;border-radius:12px;}"), ".last-item.jsx-255634210{-webkit-flex:1;-ms-flex:1;flex:1;}", ".insertBefore.jsx-255634210 .content.jsx-255634210::before{left:-6px;}", ".insertBefore.jsx-255634210 .content.jsx-255634210::after{left:-10px;}", ".insertAfter.jsx-255634210 .content.jsx-255634210::before{right:-6px;}", ".insertAfter.jsx-255634210 .content.jsx-255634210::after{right:-10px;}"];
|
|
11
|
+
_defaultExport.__hash = "255634210";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".wrapper.jsx-1314592703{border:1px solid ".concat(_ui.colors.grey400, ";margin-top:").concat(_ui.spacers.dp8, ";}"), ".operators.jsx-1314592703{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:".concat(_ui.spacers.dp4, ";padding:").concat(_ui.spacers.dp4, ";border-top:1px solid ").concat(_ui.colors.grey400, ";}"), ".sub-header.jsx-1314592703{font-size:14px;font-weight:normal;margin:".concat(_ui.spacers.dp4, " ").concat(_ui.spacers.dp8, ";}")];
|
|
11
|
+
_defaultExport.__hash = "1314592703";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ui = require("@dhis2/ui");
|
|
9
|
+
|
|
10
|
+
const _defaultExport = [".number.jsx-2117397001{padding:0 ".concat(_ui.spacers.dp8, ";}"), ".operator.jsx-2117397001:hover,.number.jsx-2117397001:hover{background:".concat(_ui.colors.grey300, ";}")];
|
|
11
|
+
_defaultExport.__hash = "2117397001";
|
|
12
|
+
var _default = _defaultExport;
|
|
13
|
+
exports.default = _default;
|