@multiplatform.one/components 10.1.2 → 10.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/layouts/timeline.cjs +0 -1
- package/dist/cjs/layouts/timeline.native.cjs +0 -1
- package/dist/cjs/layouts/timeline.native.js +0 -1
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/views/Calendar.cjs +54 -76
- package/dist/cjs/views/Calendar.native.cjs +54 -76
- package/dist/cjs/views/Calendar.native.js +54 -76
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Gantt.cjs +185 -69
- package/dist/cjs/views/Gantt.native.cjs +190 -72
- package/dist/cjs/views/Gantt.native.js +190 -72
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/GanttDateGrip.cjs +20 -14
- package/dist/cjs/views/GanttDateGrip.native.cjs +24 -14
- package/dist/cjs/views/GanttDateGrip.native.js +24 -14
- package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
- package/dist/cjs/views/GanttGripDot.cjs +43 -0
- package/dist/cjs/views/GanttGripDot.native.cjs +46 -0
- package/dist/cjs/views/GanttGripDot.native.js +48 -0
- package/dist/cjs/views/GanttGripDot.native.js.map +1 -0
- package/dist/cjs/views/eventTint.cjs +242 -0
- package/dist/cjs/views/eventTint.native.cjs +346 -0
- package/dist/cjs/views/eventTint.native.js +348 -0
- package/dist/cjs/views/eventTint.native.js.map +1 -0
- package/dist/esm/layouts/timeline.mjs +0 -1
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +0 -1
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/views/Calendar.mjs +53 -75
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +53 -75
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +186 -70
- package/dist/esm/views/Gantt.mjs.map +1 -1
- package/dist/esm/views/Gantt.native.js +191 -73
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.mjs +21 -15
- package/dist/esm/views/GanttDateGrip.mjs.map +1 -1
- package/dist/esm/views/GanttDateGrip.native.js +25 -15
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
- package/dist/esm/views/GanttGripDot.mjs +24 -0
- package/dist/esm/views/GanttGripDot.mjs.map +1 -0
- package/dist/esm/views/GanttGripDot.native.js +25 -0
- package/dist/esm/views/GanttGripDot.native.js.map +1 -0
- package/dist/esm/views/eventTint.mjs +196 -0
- package/dist/esm/views/eventTint.mjs.map +1 -0
- package/dist/esm/views/eventTint.native.js +298 -0
- package/dist/esm/views/eventTint.native.js.map +1 -0
- package/dist/jsx/layouts/timeline.mjs +0 -1
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.cjs +0 -1
- package/dist/jsx/layouts/timeline.native.js +0 -1
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/views/Calendar.mjs +53 -75
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.cjs +54 -76
- package/dist/jsx/views/Calendar.native.js +54 -76
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Gantt.mjs +186 -70
- package/dist/jsx/views/Gantt.mjs.map +1 -1
- package/dist/jsx/views/Gantt.native.cjs +190 -72
- package/dist/jsx/views/Gantt.native.js +190 -72
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.mjs +21 -15
- package/dist/jsx/views/GanttDateGrip.mjs.map +1 -1
- package/dist/jsx/views/GanttDateGrip.native.cjs +24 -14
- package/dist/jsx/views/GanttDateGrip.native.js +24 -14
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
- package/dist/jsx/views/GanttGripDot.mjs +24 -0
- package/dist/jsx/views/GanttGripDot.mjs.map +1 -0
- package/dist/jsx/views/GanttGripDot.native.cjs +46 -0
- package/dist/jsx/views/GanttGripDot.native.js +48 -0
- package/dist/jsx/views/GanttGripDot.native.js.map +1 -0
- package/dist/jsx/views/eventTint.mjs +196 -0
- package/dist/jsx/views/eventTint.mjs.map +1 -0
- package/dist/jsx/views/eventTint.native.cjs +346 -0
- package/dist/jsx/views/eventTint.native.js +348 -0
- package/dist/jsx/views/eventTint.native.js.map +1 -0
- package/package.json +7 -7
- package/src/hoverTouchPath.coarse.spec.tsx +28 -4
- package/src/layouts/timeline.replyInset.spec.tsx +72 -22
- package/src/layouts/timeline.tsx +0 -1
- package/src/views/Calendar.eventFill.spec.tsx +44 -9
- package/src/views/Calendar.tsx +23 -31
- package/src/views/Gantt.barInk.spec.tsx +257 -0
- package/src/views/Gantt.grips.spec.tsx +226 -0
- package/src/views/Gantt.tint.palette.spec.ts +288 -0
- package/src/views/Gantt.tsx +224 -65
- package/src/views/GanttDateGrip.native.spec.tsx +8 -0
- package/src/views/GanttDateGrip.tsx +28 -17
- package/src/views/GanttGripDot.tsx +36 -0
- package/src/views/dataIdentity.spec.tsx +29 -13
- package/src/views/eventTint.ts +305 -0
- package/types/layouts/timeline.d.ts.map +1 -1
- package/types/views/Calendar.d.ts.map +1 -1
- package/types/views/Gantt.d.ts.map +1 -1
- package/types/views/GanttDateGrip.d.ts +7 -0
- package/types/views/GanttDateGrip.d.ts.map +1 -1
- package/types/views/GanttGripDot.d.ts +9 -0
- package/types/views/GanttGripDot.d.ts.map +1 -0
- package/types/views/eventTint.d.ts +72 -0
- package/types/views/eventTint.d.ts.map +1 -0
|
@@ -26,6 +26,8 @@ var import_react_native = require("react-native-web");
|
|
|
26
26
|
var import_tamagui = require("tamagui");
|
|
27
27
|
var import_theme = require("@multiplatform.one/theme");
|
|
28
28
|
var import_ganttMath = require("./ganttMath.cjs");
|
|
29
|
+
var import_GanttGripDot = require("./GanttGripDot.cjs");
|
|
30
|
+
var import_eventTint = require("./eventTint.cjs");
|
|
29
31
|
var import_ganttIntervals = require("./ganttIntervals.cjs");
|
|
30
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
33
|
function GanttDateGrip(props) {
|
|
@@ -51,11 +53,15 @@ function GanttDateGrip(props) {
|
|
|
51
53
|
pxPerDay,
|
|
52
54
|
rtl
|
|
53
55
|
]);
|
|
56
|
+
const glyphWidth = Number(knobProps.controlIcon.width);
|
|
54
57
|
const width = Math.min(import_theme.MIN_PRESS_TARGET, Math.max(0, viewport.end - viewport.start));
|
|
55
|
-
const
|
|
58
|
+
const inner = Math.min(width / 2, Math.max(0, props.barWidth / 2));
|
|
59
|
+
const logicalLeft = Math.max(viewport.start, Math.min(edge === "start" ? x - (width - inner) : x - inner, viewport.end - width));
|
|
56
60
|
const left = rtl ? chartWidth - logicalLeft - width : logicalLeft;
|
|
57
|
-
const
|
|
58
|
-
const
|
|
61
|
+
const dotX = Math.max(viewport.start + import_eventTint.EVENT_GRIP_DOT_PX / 2, Math.min(x, viewport.end - import_eventTint.EVENT_GRIP_DOT_PX / 2));
|
|
62
|
+
const dotLeft = (rtl ? chartWidth - dotX : dotX) - left - import_eventTint.EVENT_GRIP_DOT_PX / 2;
|
|
63
|
+
const dotTop = (edge === "start" ? props.barBottom : props.barTop) - import_eventTint.EVENT_GRIP_DOT_PX / 2;
|
|
64
|
+
const visible = props.shown || focused;
|
|
59
65
|
const begin = (startX) => {
|
|
60
66
|
cleanup.current?.();
|
|
61
67
|
const frozen = props;
|
|
@@ -138,6 +144,8 @@ function GanttDateGrip(props) {
|
|
|
138
144
|
},
|
|
139
145
|
onFocus: () => setFocused(true),
|
|
140
146
|
onBlur: () => setFocused(false),
|
|
147
|
+
onHoverIn: () => props.onHoverChange(true),
|
|
148
|
+
onHoverOut: () => props.onHoverChange(false),
|
|
141
149
|
tabIndex: 0,
|
|
142
150
|
role: "slider",
|
|
143
151
|
"aria-label": label,
|
|
@@ -145,7 +153,8 @@ function GanttDateGrip(props) {
|
|
|
145
153
|
"aria-valuenow": Math.round(x / pxPerDay),
|
|
146
154
|
"aria-valuemin": Math.floor(viewport.start / pxPerDay),
|
|
147
155
|
"aria-valuemax": Math.ceil(viewport.end / pxPerDay),
|
|
148
|
-
"data-gantt-date-grip": edge
|
|
156
|
+
"data-gantt-date-grip": edge,
|
|
157
|
+
"data-gantt-grip-of": props.gripOf
|
|
149
158
|
} : {
|
|
150
159
|
accessible: true,
|
|
151
160
|
accessibilityRole: "adjustable",
|
|
@@ -175,6 +184,7 @@ function GanttDateGrip(props) {
|
|
|
175
184
|
width,
|
|
176
185
|
height: rowHeight,
|
|
177
186
|
zIndex: 6,
|
|
187
|
+
...import_tamagui.isWeb || visible ? null : { pointerEvents: "none" },
|
|
178
188
|
alignItems: "center",
|
|
179
189
|
justifyContent: "center",
|
|
180
190
|
...import_tamagui.isWeb ? {
|
|
@@ -182,16 +192,12 @@ function GanttDateGrip(props) {
|
|
|
182
192
|
cursor: "ew-resize"
|
|
183
193
|
} : {}
|
|
184
194
|
},
|
|
185
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
backgroundColor: "background",
|
|
192
|
-
borderColor: "color-12",
|
|
193
|
-
borderWidth: import_theme.hairlineWidth,
|
|
194
|
-
pointerEvents: "none",
|
|
195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GanttGripDot.GanttGripDot, {
|
|
196
|
+
left: dotLeft,
|
|
197
|
+
top: dotTop,
|
|
198
|
+
color: props.color,
|
|
199
|
+
shown: props.shown || focused,
|
|
200
|
+
edge,
|
|
195
201
|
...focused ? import_theme.keyboardFocusRingProps : {}
|
|
196
202
|
})
|
|
197
203
|
});
|
|
@@ -29,6 +29,8 @@ var import_react_native = require("react-native");
|
|
|
29
29
|
var import_tamagui = require("tamagui");
|
|
30
30
|
var import_theme = require("@multiplatform.one/theme");
|
|
31
31
|
var import_ganttMath = require("./ganttMath.native.js");
|
|
32
|
+
var import_GanttGripDot = require("./GanttGripDot.native.js");
|
|
33
|
+
var import_eventTint = require("./eventTint.native.js");
|
|
32
34
|
var import_ganttIntervals = require("./ganttIntervals.native.js");
|
|
33
35
|
function GanttDateGrip(props) {
|
|
34
36
|
var _span_start, _span_end;
|
|
@@ -60,11 +62,15 @@ function GanttDateGrip(props) {
|
|
|
60
62
|
pxPerDay,
|
|
61
63
|
rtl
|
|
62
64
|
]);
|
|
65
|
+
var glyphWidth = Number(knobProps.controlIcon.width);
|
|
63
66
|
var width = Math.min(import_theme.MIN_PRESS_TARGET, Math.max(0, viewport.end - viewport.start));
|
|
64
|
-
var
|
|
67
|
+
var inner = Math.min(width / 2, Math.max(0, props.barWidth / 2));
|
|
68
|
+
var logicalLeft = Math.max(viewport.start, Math.min(edge === "start" ? x - (width - inner) : x - inner, viewport.end - width));
|
|
65
69
|
var left = rtl ? chartWidth - logicalLeft - width : logicalLeft;
|
|
66
|
-
var
|
|
67
|
-
var
|
|
70
|
+
var dotX = Math.max(viewport.start + import_eventTint.EVENT_GRIP_DOT_PX / 2, Math.min(x, viewport.end - import_eventTint.EVENT_GRIP_DOT_PX / 2));
|
|
71
|
+
var dotLeft = (rtl ? chartWidth - dotX : dotX) - left - import_eventTint.EVENT_GRIP_DOT_PX / 2;
|
|
72
|
+
var dotTop = (edge === "start" ? props.barBottom : props.barTop) - import_eventTint.EVENT_GRIP_DOT_PX / 2;
|
|
73
|
+
var visible = props.shown || focused;
|
|
68
74
|
var begin = function begin2(startX) {
|
|
69
75
|
var _cleanup_current;
|
|
70
76
|
(_cleanup_current = cleanup.current) === null || _cleanup_current === void 0 ? void 0 : _cleanup_current.call(cleanup);
|
|
@@ -162,6 +168,12 @@ function GanttDateGrip(props) {
|
|
|
162
168
|
onBlur: function onBlur() {
|
|
163
169
|
return setFocused(false);
|
|
164
170
|
},
|
|
171
|
+
onHoverIn: function onHoverIn() {
|
|
172
|
+
return props.onHoverChange(true);
|
|
173
|
+
},
|
|
174
|
+
onHoverOut: function onHoverOut() {
|
|
175
|
+
return props.onHoverChange(false);
|
|
176
|
+
},
|
|
165
177
|
tabIndex: 0,
|
|
166
178
|
role: "slider",
|
|
167
179
|
"aria-label": label,
|
|
@@ -169,7 +181,8 @@ function GanttDateGrip(props) {
|
|
|
169
181
|
"aria-valuenow": Math.round(x / pxPerDay),
|
|
170
182
|
"aria-valuemin": Math.floor(viewport.start / pxPerDay),
|
|
171
183
|
"aria-valuemax": Math.ceil(viewport.end / pxPerDay),
|
|
172
|
-
"data-gantt-date-grip": edge
|
|
184
|
+
"data-gantt-date-grip": edge,
|
|
185
|
+
"data-gantt-grip-of": props.gripOf
|
|
173
186
|
} : {
|
|
174
187
|
accessible: true,
|
|
175
188
|
accessibilityRole: "adjustable",
|
|
@@ -217,6 +230,7 @@ function GanttDateGrip(props) {
|
|
|
217
230
|
width,
|
|
218
231
|
height: rowHeight,
|
|
219
232
|
zIndex: 6,
|
|
233
|
+
...import_tamagui.isWeb || visible ? null : { pointerEvents: "none" },
|
|
220
234
|
alignItems: "center",
|
|
221
235
|
justifyContent: "center",
|
|
222
236
|
...import_tamagui.isWeb ? {
|
|
@@ -224,16 +238,12 @@ function GanttDateGrip(props) {
|
|
|
224
238
|
cursor: "ew-resize"
|
|
225
239
|
} : {}
|
|
226
240
|
},
|
|
227
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
backgroundColor: "background",
|
|
234
|
-
borderColor: "color-12",
|
|
235
|
-
borderWidth: import_theme.hairlineWidth,
|
|
236
|
-
pointerEvents: "none",
|
|
241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GanttGripDot.GanttGripDot, {
|
|
242
|
+
left: dotLeft,
|
|
243
|
+
top: dotTop,
|
|
244
|
+
color: props.color,
|
|
245
|
+
shown: props.shown || focused,
|
|
246
|
+
edge,
|
|
237
247
|
...focused ? import_theme.keyboardFocusRingProps : {}
|
|
238
248
|
})
|
|
239
249
|
});
|
|
@@ -29,6 +29,8 @@ var import_react_native = require("react-native");
|
|
|
29
29
|
var import_tamagui = require("tamagui");
|
|
30
30
|
var import_theme = require("@multiplatform.one/theme");
|
|
31
31
|
var import_ganttMath = require("./ganttMath.native.js");
|
|
32
|
+
var import_GanttGripDot = require("./GanttGripDot.native.js");
|
|
33
|
+
var import_eventTint = require("./eventTint.native.js");
|
|
32
34
|
var import_ganttIntervals = require("./ganttIntervals.native.js");
|
|
33
35
|
function GanttDateGrip(props) {
|
|
34
36
|
var _span_start, _span_end;
|
|
@@ -60,11 +62,15 @@ function GanttDateGrip(props) {
|
|
|
60
62
|
pxPerDay,
|
|
61
63
|
rtl
|
|
62
64
|
]);
|
|
65
|
+
var glyphWidth = Number(knobProps.controlIcon.width);
|
|
63
66
|
var width = Math.min(import_theme.MIN_PRESS_TARGET, Math.max(0, viewport.end - viewport.start));
|
|
64
|
-
var
|
|
67
|
+
var inner = Math.min(width / 2, Math.max(0, props.barWidth / 2));
|
|
68
|
+
var logicalLeft = Math.max(viewport.start, Math.min(edge === "start" ? x - (width - inner) : x - inner, viewport.end - width));
|
|
65
69
|
var left = rtl ? chartWidth - logicalLeft - width : logicalLeft;
|
|
66
|
-
var
|
|
67
|
-
var
|
|
70
|
+
var dotX = Math.max(viewport.start + import_eventTint.EVENT_GRIP_DOT_PX / 2, Math.min(x, viewport.end - import_eventTint.EVENT_GRIP_DOT_PX / 2));
|
|
71
|
+
var dotLeft = (rtl ? chartWidth - dotX : dotX) - left - import_eventTint.EVENT_GRIP_DOT_PX / 2;
|
|
72
|
+
var dotTop = (edge === "start" ? props.barBottom : props.barTop) - import_eventTint.EVENT_GRIP_DOT_PX / 2;
|
|
73
|
+
var visible = props.shown || focused;
|
|
68
74
|
var begin = function begin2(startX) {
|
|
69
75
|
var _cleanup_current;
|
|
70
76
|
(_cleanup_current = cleanup.current) === null || _cleanup_current === void 0 ? void 0 : _cleanup_current.call(cleanup);
|
|
@@ -162,6 +168,12 @@ function GanttDateGrip(props) {
|
|
|
162
168
|
onBlur: function onBlur() {
|
|
163
169
|
return setFocused(false);
|
|
164
170
|
},
|
|
171
|
+
onHoverIn: function onHoverIn() {
|
|
172
|
+
return props.onHoverChange(true);
|
|
173
|
+
},
|
|
174
|
+
onHoverOut: function onHoverOut() {
|
|
175
|
+
return props.onHoverChange(false);
|
|
176
|
+
},
|
|
165
177
|
tabIndex: 0,
|
|
166
178
|
role: "slider",
|
|
167
179
|
"aria-label": label,
|
|
@@ -169,7 +181,8 @@ function GanttDateGrip(props) {
|
|
|
169
181
|
"aria-valuenow": Math.round(x / pxPerDay),
|
|
170
182
|
"aria-valuemin": Math.floor(viewport.start / pxPerDay),
|
|
171
183
|
"aria-valuemax": Math.ceil(viewport.end / pxPerDay),
|
|
172
|
-
"data-gantt-date-grip": edge
|
|
184
|
+
"data-gantt-date-grip": edge,
|
|
185
|
+
"data-gantt-grip-of": props.gripOf
|
|
173
186
|
} : {
|
|
174
187
|
accessible: true,
|
|
175
188
|
accessibilityRole: "adjustable",
|
|
@@ -217,6 +230,7 @@ function GanttDateGrip(props) {
|
|
|
217
230
|
width,
|
|
218
231
|
height: rowHeight,
|
|
219
232
|
zIndex: 6,
|
|
233
|
+
...import_tamagui.isWeb || visible ? null : { pointerEvents: "none" },
|
|
220
234
|
alignItems: "center",
|
|
221
235
|
justifyContent: "center",
|
|
222
236
|
...import_tamagui.isWeb ? {
|
|
@@ -224,16 +238,12 @@ function GanttDateGrip(props) {
|
|
|
224
238
|
cursor: "ew-resize"
|
|
225
239
|
} : {}
|
|
226
240
|
},
|
|
227
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
backgroundColor: "background",
|
|
234
|
-
borderColor: "color-12",
|
|
235
|
-
borderWidth: import_theme.hairlineWidth,
|
|
236
|
-
pointerEvents: "none",
|
|
241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GanttGripDot.GanttGripDot, {
|
|
242
|
+
left: dotLeft,
|
|
243
|
+
top: dotTop,
|
|
244
|
+
color: props.color,
|
|
245
|
+
shown: props.shown || focused,
|
|
246
|
+
edge,
|
|
237
247
|
...focused ? import_theme.keyboardFocusRingProps : {}
|
|
238
248
|
})
|
|
239
249
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GanttDateGrip.native.js","names":[],"sources":["cjs/views/GanttDateGrip.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GanttDateGrip_exports = {};\n__export(GanttDateGrip_exports, {\n GanttDateGrip: () => GanttDateGrip\n});\nmodule.exports = __toCommonJS(GanttDateGrip_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar import_react_native = require(\"react-native\");\nvar import_tamagui = require(\"tamagui\");\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar import_ganttMath = require(\"./ganttMath\");\nvar import_ganttIntervals = require(\"./ganttIntervals\");\nfunction GanttDateGrip(props) {\n var _span_start, _span_end;\n var { knobProps } = (0, import_theme.useResolvedKnobs)();\n var [focused, setFocused] = (0, import_react.useState)(false);\n var session = (0, import_react.useRef)(null);\n var cleanup = (0, import_react.useRef)(null);\n var previewRef = (0, import_react.useRef)(props.onPreview);\n previewRef.current = props.onPreview;\n (0, import_react.useEffect)(function() {\n return function() {\n var _cleanup_current;\n (_cleanup_current = cleanup.current) === null || _cleanup_current === void 0 ? void 0 : _cleanup_current.call(cleanup);\n previewRef.current(null);\n };\n }, []);\n var { span, edge, range, viewport, pxPerDay, rtl, rowHeight, chartWidth, label, valueText } = props;\n var x = props.displayX;\n (0, import_react.useEffect)(function() {\n return function() {\n var _session_current;\n (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(0, true);\n };\n }, [\n (_span_start = span.start) === null || _span_start === void 0 ? void 0 : _span_start.getTime(),\n (_span_end = span.end) === null || _span_end === void 0 ? void 0 : _span_end.getTime(),\n range.start.getTime(),\n range.end.getTime(),\n pxPerDay,\n rtl\n ]);\n var width = Math.min(import_theme.MIN_PRESS_TARGET, Math.max(0, viewport.end - viewport.start));\n var logicalLeft = Math.max(viewport.start, Math.min(edge === \"start\" ? x - width : x, viewport.end - width));\n var left = rtl ? chartWidth - logicalLeft - width : logicalLeft;\n var glyphWidth = Number(knobProps.controlIcon.width);\n var glyphLeft = Math.max(0, Math.min((rtl ? chartWidth - x : x) - left - glyphWidth / 2, width - glyphWidth));\n var begin = function begin2(startX) {\n var _cleanup_current;\n (_cleanup_current = cleanup.current) === null || _cleanup_current === void 0 ? void 0 : _cleanup_current.call(cleanup);\n var frozen = props;\n var base = (0, import_ganttIntervals.intervalEdgeX)(frozen.span, frozen.edge, frozen.range, frozen.pxPerDay, frozen.viewport);\n var moved = false;\n var nextAt = function nextAt2(physicalX) {\n var target = base + (physicalX - startX) * (frozen.rtl ? -1 : 1);\n var reopen = frozen.edge === \"end\" ? target > base && target >= frozen.viewport.end - glyphWidth : target < base && target <= frozen.viewport.start + glyphWidth;\n return (0, import_ganttIntervals.editIntervalEdge)(frozen.span, frozen.edge, reopen ? frozen.viewport[frozen.edge] : target, frozen.range, frozen.pxPerDay, frozen.viewport, frozen.snapUnit, frozen.firstDayOfWeek);\n };\n frozen.onPreview(frozen.span);\n session.current = {\n move: function move(physicalX) {\n if (Math.abs(physicalX - startX) >= 4) moved = true;\n if (moved) frozen.onPreview(nextAt(physicalX));\n },\n end: function end(physicalX) {\n var cancel = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var _cleanup_current2;\n var next = Math.abs(physicalX - startX) < 4 ? frozen.span : nextAt(physicalX);\n (_cleanup_current2 = cleanup.current) === null || _cleanup_current2 === void 0 ? void 0 : _cleanup_current2.call(cleanup);\n session.current = null;\n frozen.onPreview(null);\n if (!cancel && moved && !(0, import_ganttIntervals.sameInterval)(frozen.span, next)) frozen.onCommit(next);\n }\n };\n };\n var pointerDown = function pointerDown2(event) {\n var _event_stopPropagation, _event_preventDefault;\n if (!import_tamagui.isWeb) return;\n if (event.button !== void 0 && event.button !== 0) return;\n (_event_stopPropagation = event.stopPropagation) === null || _event_stopPropagation === void 0 ? void 0 : _event_stopPropagation.call(event);\n (_event_preventDefault = event.preventDefault) === null || _event_preventDefault === void 0 ? void 0 : _event_preventDefault.call(event);\n var id = event.pointerId;\n begin(event.clientX);\n var previous = document.body.style.userSelect;\n document.body.style.userSelect = \"none\";\n var own = function own2(e) {\n return id === void 0 || e.pointerId === id;\n };\n var move = function move2(e) {\n if (own(e)) {\n var _session_current;\n e.preventDefault();\n (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.move(e.clientX);\n }\n };\n var up = function up2(e) {\n var _session_current;\n if (own(e)) (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(e.clientX);\n };\n var cancel = function cancel2(e) {\n var _session_current;\n if (own(e)) (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(event.clientX, true);\n };\n var key = function key2(e) {\n if (e.key === \"Escape\") {\n var _session_current;\n e.stopPropagation();\n (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(event.clientX, true);\n }\n };\n window.addEventListener(\"pointermove\", move, {\n passive: false\n });\n window.addEventListener(\"pointerup\", up);\n window.addEventListener(\"pointercancel\", cancel);\n window.addEventListener(\"keydown\", key, true);\n cleanup.current = function() {\n window.removeEventListener(\"pointermove\", move);\n window.removeEventListener(\"pointerup\", up);\n window.removeEventListener(\"pointercancel\", cancel);\n window.removeEventListener(\"keydown\", key, true);\n document.body.style.userSelect = previous;\n cleanup.current = null;\n };\n };\n var step = function step2(direction) {\n var date = (0, import_ganttMath.xToDate)(x, range.start, pxPerDay);\n var days = props.snapUnit === \"month\" ? (0, import_ganttMath.dayDiff)(date, new Date(date.getFullYear(), date.getMonth() + direction, 1)) : direction * (props.snapUnit === \"week\" ? 7 : 1);\n var next = (0, import_ganttIntervals.editIntervalEdge)(span, edge, x + days * pxPerDay, range, pxPerDay, viewport, props.snapUnit, props.firstDayOfWeek);\n if (!(0, import_ganttIntervals.sameInterval)(span, next)) props.onCommit(next);\n };\n var surfaceProps = import_tamagui.isWeb ? {\n onPointerDown: pointerDown,\n onKeyDown: function onKeyDown(event) {\n var _event_preventDefault, _event_stopPropagation;\n if (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") return;\n (_event_preventDefault = event.preventDefault) === null || _event_preventDefault === void 0 ? void 0 : _event_preventDefault.call(event);\n (_event_stopPropagation = event.stopPropagation) === null || _event_stopPropagation === void 0 ? void 0 : _event_stopPropagation.call(event);\n step((event.key === \"ArrowRight\" ? 1 : -1) * (rtl ? -1 : 1));\n },\n onFocus: function onFocus() {\n return setFocused(true);\n },\n onBlur: function onBlur() {\n return setFocused(false);\n },\n tabIndex: 0,\n role: \"slider\",\n \"aria-label\": label,\n \"aria-valuetext\": valueText,\n \"aria-valuenow\": Math.round(x / pxPerDay),\n \"aria-valuemin\": Math.floor(viewport.start / pxPerDay),\n \"aria-valuemax\": Math.ceil(viewport.end / pxPerDay),\n \"data-gantt-date-grip\": edge\n } : {\n accessible: true,\n accessibilityRole: \"adjustable\",\n accessibilityLabel: label,\n accessibilityValue: {\n text: valueText\n },\n accessibilityActions: [\n {\n name: \"increment\"\n },\n {\n name: \"decrement\"\n }\n ],\n onAccessibilityAction: function onAccessibilityAction(event) {\n return step(event.nativeEvent.actionName === \"increment\" ? 1 : -1);\n },\n onStartShouldSetResponder: function onStartShouldSetResponder() {\n return true;\n },\n onMoveShouldSetResponder: function onMoveShouldSetResponder() {\n return true;\n },\n onResponderTerminationRequest: function onResponderTerminationRequest() {\n return false;\n },\n onResponderGrant: function onResponderGrant(event) {\n var _event_stopPropagation;\n (_event_stopPropagation = event.stopPropagation) === null || _event_stopPropagation === void 0 ? void 0 : _event_stopPropagation.call(event);\n begin(event.nativeEvent.pageX);\n },\n onResponderMove: function onResponderMove(event) {\n var _session_current;\n return (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.move(event.nativeEvent.pageX);\n },\n onResponderRelease: function onResponderRelease(event) {\n var _session_current;\n return (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(event.nativeEvent.pageX);\n },\n onResponderTerminate: function onResponderTerminate() {\n var _session_current;\n return (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(0, true);\n }\n };\n var Surface = import_tamagui.isWeb ? import_tamagui.YStack : import_react_native.View;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Surface, {\n ...surfaceProps,\n testID: `gantt-date-grip-${edge}`,\n style: {\n position: \"absolute\",\n left,\n top: 0,\n width,\n height: rowHeight,\n zIndex: 6,\n alignItems: \"center\",\n justifyContent: \"center\",\n ...import_tamagui.isWeb ? {\n touchAction: \"none\",\n cursor: \"ew-resize\"\n } : {}\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n position: \"absolute\",\n left: glyphLeft,\n width: knobProps.controlIcon.width,\n height: knobProps.controlIcon.height,\n ...knobProps.containerRadius,\n backgroundColor: \"background\",\n borderColor: \"color-12\",\n borderWidth: import_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A,iBAAiB,SAAS,gBAAgB,OAAO;GAC/C,IAAI;GACJ,QAAQ,mBAAmB,QAAQ,aAAa,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB,KAAK,MAAM,YAAY,KAAK;EAC9I;EACA,oBAAoB,SAAS,mBAAmB,OAAO;GACrD,IAAI;GACJ,QAAQ,mBAAmB,QAAQ,aAAa,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB,IAAI,MAAM,YAAY,KAAK;EAC7I;EACA,sBAAsB,SAAS,uBAAuB;GACpD,IAAI;GACJ,QAAQ,mBAAmB,QAAQ,aAAa,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB,IAAI,GAAG,IAAI;EAC7H;CACF;CACA,IAAI,UAAU,eAAe,QAAQ,eAAe,SAAS,oBAAoB;CACjF,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,SAAS;EAC1D,GAAG;EACH,QAAQ,mBAAmB;EAC3B,OAAO;GACL,UAAU;GACV;GACA,KAAK;GACL;GACA,QAAQ;GACR,QAAQ;GACR,YAAY;GACZ,gBAAgB;GAChB,GAAG,eAAe,QAAQ;IACxB,aAAa;IACb,QAAQ;GACV,IAAI,CAAC;EACP;EACA,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,QAAQ;GAC3E,UAAU;GACV,MAAM;GACN,OAAO,UAAU,YAAY;GAC7B,QAAQ,UAAU,YAAY;GAC9B,GAAG,UAAU;GACb,iBAAiB;GACjB,aAAa;GACb,aAAa,aAAa;GAC1B,eAAe;GACf,GAAG,UAAU,aAAa,yBAAyB,CAAC;EACtD,CAAC;CACH,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"GanttDateGrip.native.js","names":[],"sources":["cjs/views/GanttDateGrip.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GanttDateGrip_exports = {};\n__export(GanttDateGrip_exports, {\n GanttDateGrip: () => GanttDateGrip\n});\nmodule.exports = __toCommonJS(GanttDateGrip_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar import_react_native = require(\"react-native\");\nvar import_tamagui = require(\"tamagui\");\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar import_ganttMath = require(\"./ganttMath\");\nvar import_GanttGripDot = require(\"./GanttGripDot\");\nvar import_eventTint = require(\"./eventTint\");\nvar import_ganttIntervals = require(\"./ganttIntervals\");\nfunction GanttDateGrip(props) {\n var _span_start, _span_end;\n var { knobProps } = (0, import_theme.useResolvedKnobs)();\n var [focused, setFocused] = (0, import_react.useState)(false);\n var session = (0, import_react.useRef)(null);\n var cleanup = (0, import_react.useRef)(null);\n var previewRef = (0, import_react.useRef)(props.onPreview);\n previewRef.current = props.onPreview;\n (0, import_react.useEffect)(function() {\n return function() {\n var _cleanup_current;\n (_cleanup_current = cleanup.current) === null || _cleanup_current === void 0 ? void 0 : _cleanup_current.call(cleanup);\n previewRef.current(null);\n };\n }, []);\n var { span, edge, range, viewport, pxPerDay, rtl, rowHeight, chartWidth, label, valueText } = props;\n var x = props.displayX;\n (0, import_react.useEffect)(function() {\n return function() {\n var _session_current;\n (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(0, true);\n };\n }, [\n (_span_start = span.start) === null || _span_start === void 0 ? void 0 : _span_start.getTime(),\n (_span_end = span.end) === null || _span_end === void 0 ? void 0 : _span_end.getTime(),\n range.start.getTime(),\n range.end.getTime(),\n pxPerDay,\n rtl\n ]);\n var glyphWidth = Number(knobProps.controlIcon.width);\n var width = Math.min(import_theme.MIN_PRESS_TARGET, Math.max(0, viewport.end - viewport.start));\n var inner = Math.min(width / 2, Math.max(0, props.barWidth / 2));\n var logicalLeft = Math.max(viewport.start, Math.min(edge === \"start\" ? x - (width - inner) : x - inner, viewport.end - width));\n var left = rtl ? chartWidth - logicalLeft - width : logicalLeft;\n var dotX = Math.max(viewport.start + import_eventTint.EVENT_GRIP_DOT_PX / 2, Math.min(x, viewport.end - import_eventTint.EVENT_GRIP_DOT_PX / 2));\n var dotLeft = (rtl ? chartWidth - dotX : dotX) - left - import_eventTint.EVENT_GRIP_DOT_PX / 2;\n var dotTop = (edge === \"start\" ? props.barBottom : props.barTop) - import_eventTint.EVENT_GRIP_DOT_PX / 2;\n var visible = props.shown || focused;\n var begin = function begin2(startX) {\n var _cleanup_current;\n (_cleanup_current = cleanup.current) === null || _cleanup_current === void 0 ? void 0 : _cleanup_current.call(cleanup);\n var frozen = props;\n var base = (0, import_ganttIntervals.intervalEdgeX)(frozen.span, frozen.edge, frozen.range, frozen.pxPerDay, frozen.viewport);\n var moved = false;\n var nextAt = function nextAt2(physicalX) {\n var target = base + (physicalX - startX) * (frozen.rtl ? -1 : 1);\n var reopen = frozen.edge === \"end\" ? target > base && target >= frozen.viewport.end - glyphWidth : target < base && target <= frozen.viewport.start + glyphWidth;\n return (0, import_ganttIntervals.editIntervalEdge)(frozen.span, frozen.edge, reopen ? frozen.viewport[frozen.edge] : target, frozen.range, frozen.pxPerDay, frozen.viewport, frozen.snapUnit, frozen.firstDayOfWeek);\n };\n frozen.onPreview(frozen.span);\n session.current = {\n move: function move(physicalX) {\n if (Math.abs(physicalX - startX) >= 4) moved = true;\n if (moved) frozen.onPreview(nextAt(physicalX));\n },\n end: function end(physicalX) {\n var cancel = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var _cleanup_current2;\n var next = Math.abs(physicalX - startX) < 4 ? frozen.span : nextAt(physicalX);\n (_cleanup_current2 = cleanup.current) === null || _cleanup_current2 === void 0 ? void 0 : _cleanup_current2.call(cleanup);\n session.current = null;\n frozen.onPreview(null);\n if (!cancel && moved && !(0, import_ganttIntervals.sameInterval)(frozen.span, next)) frozen.onCommit(next);\n }\n };\n };\n var pointerDown = function pointerDown2(event) {\n var _event_stopPropagation, _event_preventDefault;\n if (!import_tamagui.isWeb) return;\n if (event.button !== void 0 && event.button !== 0) return;\n (_event_stopPropagation = event.stopPropagation) === null || _event_stopPropagation === void 0 ? void 0 : _event_stopPropagation.call(event);\n (_event_preventDefault = event.preventDefault) === null || _event_preventDefault === void 0 ? void 0 : _event_preventDefault.call(event);\n var id = event.pointerId;\n begin(event.clientX);\n var previous = document.body.style.userSelect;\n document.body.style.userSelect = \"none\";\n var own = function own2(e) {\n return id === void 0 || e.pointerId === id;\n };\n var move = function move2(e) {\n if (own(e)) {\n var _session_current;\n e.preventDefault();\n (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.move(e.clientX);\n }\n };\n var up = function up2(e) {\n var _session_current;\n if (own(e)) (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(e.clientX);\n };\n var cancel = function cancel2(e) {\n var _session_current;\n if (own(e)) (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(event.clientX, true);\n };\n var key = function key2(e) {\n if (e.key === \"Escape\") {\n var _session_current;\n e.stopPropagation();\n (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(event.clientX, true);\n }\n };\n window.addEventListener(\"pointermove\", move, {\n passive: false\n });\n window.addEventListener(\"pointerup\", up);\n window.addEventListener(\"pointercancel\", cancel);\n window.addEventListener(\"keydown\", key, true);\n cleanup.current = function() {\n window.removeEventListener(\"pointermove\", move);\n window.removeEventListener(\"pointerup\", up);\n window.removeEventListener(\"pointercancel\", cancel);\n window.removeEventListener(\"keydown\", key, true);\n document.body.style.userSelect = previous;\n cleanup.current = null;\n };\n };\n var step = function step2(direction) {\n var date = (0, import_ganttMath.xToDate)(x, range.start, pxPerDay);\n var days = props.snapUnit === \"month\" ? (0, import_ganttMath.dayDiff)(date, new Date(date.getFullYear(), date.getMonth() + direction, 1)) : direction * (props.snapUnit === \"week\" ? 7 : 1);\n var next = (0, import_ganttIntervals.editIntervalEdge)(span, edge, x + days * pxPerDay, range, pxPerDay, viewport, props.snapUnit, props.firstDayOfWeek);\n if (!(0, import_ganttIntervals.sameInterval)(span, next)) props.onCommit(next);\n };\n var surfaceProps = import_tamagui.isWeb ? {\n onPointerDown: pointerDown,\n onKeyDown: function onKeyDown(event) {\n var _event_preventDefault, _event_stopPropagation;\n if (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") return;\n (_event_preventDefault = event.preventDefault) === null || _event_preventDefault === void 0 ? void 0 : _event_preventDefault.call(event);\n (_event_stopPropagation = event.stopPropagation) === null || _event_stopPropagation === void 0 ? void 0 : _event_stopPropagation.call(event);\n step((event.key === \"ArrowRight\" ? 1 : -1) * (rtl ? -1 : 1));\n },\n onFocus: function onFocus() {\n return setFocused(true);\n },\n onBlur: function onBlur() {\n return setFocused(false);\n },\n onHoverIn: function onHoverIn() {\n return props.onHoverChange(true);\n },\n onHoverOut: function onHoverOut() {\n return props.onHoverChange(false);\n },\n tabIndex: 0,\n role: \"slider\",\n \"aria-label\": label,\n \"aria-valuetext\": valueText,\n \"aria-valuenow\": Math.round(x / pxPerDay),\n \"aria-valuemin\": Math.floor(viewport.start / pxPerDay),\n \"aria-valuemax\": Math.ceil(viewport.end / pxPerDay),\n \"data-gantt-date-grip\": edge,\n \"data-gantt-grip-of\": props.gripOf\n } : {\n accessible: true,\n accessibilityRole: \"adjustable\",\n accessibilityLabel: label,\n accessibilityValue: {\n text: valueText\n },\n accessibilityActions: [\n {\n name: \"increment\"\n },\n {\n name: \"decrement\"\n }\n ],\n onAccessibilityAction: function onAccessibilityAction(event) {\n return step(event.nativeEvent.actionName === \"increment\" ? 1 : -1);\n },\n onStartShouldSetResponder: function onStartShouldSetResponder() {\n return true;\n },\n onMoveShouldSetResponder: function onMoveShouldSetResponder() {\n return true;\n },\n onResponderTerminationRequest: function onResponderTerminationRequest() {\n return false;\n },\n onResponderGrant: function onResponderGrant(event) {\n var _event_stopPropagation;\n (_event_stopPropagation = event.stopPropagation) === null || _event_stopPropagation === void 0 ? void 0 : _event_stopPropagation.call(event);\n begin(event.nativeEvent.pageX);\n },\n onResponderMove: function onResponderMove(event) {\n var _session_current;\n return (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.move(event.nativeEvent.pageX);\n },\n onResponderRelease: function onResponderRelease(event) {\n var _session_current;\n return (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(event.nativeEvent.pageX);\n },\n onResponderTerminate: function onResponderTerminate() {\n var _session_current;\n return (_session_current = session.current) === null || _session_current === void 0 ? void 0 : _session_current.end(0, true);\n }\n };\n var Surface = import_tamagui.isWeb ? import_tamagui.YStack : import_react_native.View;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Surface, {\n ...surfaceProps,\n testID: `gantt-date-grip-${edge}`,\n style: {\n position: \"absolute\",\n left,\n top: 0,\n width,\n height: rowHeight,\n zIndex: 6,\n ...import_tamagui.isWeb || visible ? null : {\n pointerEvents: \"none\"\n },\n alignItems: \"center\",\n justifyContent: \"center\",\n ...import_tamagui.isWeb ? {\n touchAction: \"none\",\n cursor: \"ew-resize\"\n } : {}\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GanttGripDot.GanttGripDot, {\n left: dotLeft,\n top: dotTop,\n color: props.color,\n shown: props.shown || focused,\n edge,\n ...focused ? import_theme.keyboardFocusRingProps : {}\n })\n });\n}\n//# sourceMappingURL=GanttDateGrip.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;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AAoB,cAAc;GACtF,MAAM;GACN,KAAK;GACL,OAAO,MAAM;GACb,OAAO,MAAM,SAAS;GACtB;GACA,GAAG,UAAU,aAAa,yBAAyB,CAAC;EACtD,CAAC;CACH,CAAC;AACH"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var GanttGripDot_exports = {};
|
|
22
|
+
__export(GanttGripDot_exports, { GanttGripDot: () => GanttGripDot });
|
|
23
|
+
module.exports = __toCommonJS(GanttGripDot_exports);
|
|
24
|
+
var import_tamagui = require("tamagui");
|
|
25
|
+
var import_eventTint = require("./eventTint.cjs");
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
function GanttGripDot({ left, top, color, shown, edge, ...ring }) {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
29
|
+
position: "absolute",
|
|
30
|
+
left,
|
|
31
|
+
top,
|
|
32
|
+
width: import_eventTint.EVENT_GRIP_DOT_PX,
|
|
33
|
+
height: import_eventTint.EVENT_GRIP_DOT_PX,
|
|
34
|
+
borderRadius: import_eventTint.EVENT_GRIP_DOT_PX / 2,
|
|
35
|
+
borderWidth: 2,
|
|
36
|
+
borderColor: color,
|
|
37
|
+
backgroundColor: "background",
|
|
38
|
+
opacity: shown ? 1 : 0,
|
|
39
|
+
pointerEvents: "none",
|
|
40
|
+
...ring,
|
|
41
|
+
...{ "data-gantt-date-grip-glyph": edge }
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var GanttGripDot_exports = {};
|
|
24
|
+
__export(GanttGripDot_exports, { GanttGripDot: () => GanttGripDot });
|
|
25
|
+
module.exports = __toCommonJS(GanttGripDot_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var import_tamagui = require("tamagui");
|
|
28
|
+
var import_eventTint = require("./eventTint.native.js");
|
|
29
|
+
function GanttGripDot(param) {
|
|
30
|
+
var { left, top, color, shown, edge, ...ring } = param;
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
left,
|
|
34
|
+
top,
|
|
35
|
+
width: import_eventTint.EVENT_GRIP_DOT_PX,
|
|
36
|
+
height: import_eventTint.EVENT_GRIP_DOT_PX,
|
|
37
|
+
borderRadius: import_eventTint.EVENT_GRIP_DOT_PX / 2,
|
|
38
|
+
borderWidth: 2,
|
|
39
|
+
borderColor: color,
|
|
40
|
+
backgroundColor: "background",
|
|
41
|
+
opacity: shown ? 1 : 0,
|
|
42
|
+
pointerEvents: "none",
|
|
43
|
+
...ring,
|
|
44
|
+
"data-gantt-date-grip-glyph": edge
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var GanttGripDot_exports = {};
|
|
24
|
+
__export(GanttGripDot_exports, { GanttGripDot: () => GanttGripDot });
|
|
25
|
+
module.exports = __toCommonJS(GanttGripDot_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var import_tamagui = require("tamagui");
|
|
28
|
+
var import_eventTint = require("./eventTint.native.js");
|
|
29
|
+
function GanttGripDot(param) {
|
|
30
|
+
var { left, top, color, shown, edge, ...ring } = param;
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
left,
|
|
34
|
+
top,
|
|
35
|
+
width: import_eventTint.EVENT_GRIP_DOT_PX,
|
|
36
|
+
height: import_eventTint.EVENT_GRIP_DOT_PX,
|
|
37
|
+
borderRadius: import_eventTint.EVENT_GRIP_DOT_PX / 2,
|
|
38
|
+
borderWidth: 2,
|
|
39
|
+
borderColor: color,
|
|
40
|
+
backgroundColor: "background",
|
|
41
|
+
opacity: shown ? 1 : 0,
|
|
42
|
+
pointerEvents: "none",
|
|
43
|
+
...ring,
|
|
44
|
+
"data-gantt-date-grip-glyph": edge
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=GanttGripDot.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GanttGripDot.native.js","names":[],"sources":["cjs/views/GanttGripDot.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GanttGripDot_exports = {};\n__export(GanttGripDot_exports, {\n GanttGripDot: () => GanttGripDot\n});\nmodule.exports = __toCommonJS(GanttGripDot_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_tamagui = require(\"tamagui\");\nvar import_eventTint = require(\"./eventTint\");\nfunction GanttGripDot(param) {\n var { left, top, color, shown, edge, ...ring } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n position: \"absolute\",\n left,\n top,\n width: import_eventTint.EVENT_GRIP_DOT_PX,\n height: import_eventTint.EVENT_GRIP_DOT_PX,\n borderRadius: import_eventTint.EVENT_GRIP_DOT_PX / 2,\n borderWidth: 2,\n borderColor: color,\n backgroundColor: \"background\",\n opacity: shown ? 1 : 0,\n pointerEvents: \"none\",\n ...ring,\n \"data-gantt-date-grip-glyph\": edge\n });\n}\n//# sourceMappingURL=GanttGripDot.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ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