@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260423042903 → 0.8.1-dev.20260423063335
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/{HlsPlayer-IBPSMECZ.mjs → HlsPlayer-CTZICLSJ.mjs} +1 -1
- package/dist/{chunk-BV2VX3HP.mjs → chunk-VNSFFK3H.mjs} +38 -6
- package/dist/index.d.mts +112 -1
- package/dist/index.d.ts +112 -1
- package/dist/index.js +1014 -825
- package/dist/index.mjs +571 -416
- package/package.json +1 -1
|
@@ -19,7 +19,10 @@ var HlsPlayer = React.memo(
|
|
|
19
19
|
const [isPlaying, setIsPlaying] = useState(playOptions === "autoplay");
|
|
20
20
|
const [isHovered, setIsHovered] = useState(false);
|
|
21
21
|
const [isMobile, setIsMobile] = useState(false);
|
|
22
|
+
const [isControlsVisible, setIsControlsVisible] = useState(true);
|
|
22
23
|
const wasManuallyPausedRef = useRef(false);
|
|
24
|
+
const inactivityTimerRef = useRef(null);
|
|
25
|
+
const INACTIVITY_DELAY = 2500;
|
|
23
26
|
const resolvedSources = sources && sources.length > 0 ? sources : assetUrl ? [{ src: assetUrl, posterUrl }] : [];
|
|
24
27
|
useEffect(() => {
|
|
25
28
|
const checkMobile = () => {
|
|
@@ -34,6 +37,27 @@ var HlsPlayer = React.memo(
|
|
|
34
37
|
window.addEventListener("resize", checkMobile);
|
|
35
38
|
return () => window.removeEventListener("resize", checkMobile);
|
|
36
39
|
}, []);
|
|
40
|
+
const resetInactivityTimer = useCallback(() => {
|
|
41
|
+
setIsControlsVisible(true);
|
|
42
|
+
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
43
|
+
if (isPlaying) {
|
|
44
|
+
inactivityTimerRef.current = setTimeout(
|
|
45
|
+
() => setIsControlsVisible(false),
|
|
46
|
+
INACTIVITY_DELAY
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}, [isPlaying]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (!isPlaying) {
|
|
52
|
+
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
53
|
+
setIsControlsVisible(true);
|
|
54
|
+
}
|
|
55
|
+
}, [isPlaying]);
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
return () => {
|
|
58
|
+
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
59
|
+
};
|
|
60
|
+
}, []);
|
|
37
61
|
useEffect(() => {
|
|
38
62
|
const v = videoRef.current;
|
|
39
63
|
if (!v || resolvedSources.length === 0) return;
|
|
@@ -81,19 +105,26 @@ var HlsPlayer = React.memo(
|
|
|
81
105
|
const handleMouseEnter = useCallback(() => {
|
|
82
106
|
if (isMobile) return;
|
|
83
107
|
setIsHovered(true);
|
|
108
|
+
resetInactivityTimer();
|
|
84
109
|
if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
|
|
85
110
|
videoRef.current.play().then(() => setIsPlaying(true));
|
|
86
111
|
}
|
|
87
|
-
}, [playOptions, isMobile]);
|
|
112
|
+
}, [playOptions, isMobile, resetInactivityTimer]);
|
|
88
113
|
const handleMouseLeave = useCallback(() => {
|
|
89
114
|
if (isMobile) return;
|
|
90
115
|
setIsHovered(false);
|
|
116
|
+
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
117
|
+
if (isPlaying) setIsControlsVisible(false);
|
|
91
118
|
if (playOptions === "playOnHover" && videoRef.current) {
|
|
92
119
|
videoRef.current.pause();
|
|
93
120
|
videoRef.current.currentTime = 0;
|
|
94
121
|
setIsPlaying(false);
|
|
95
122
|
}
|
|
96
|
-
}, [playOptions, isMobile]);
|
|
123
|
+
}, [playOptions, isMobile, isPlaying]);
|
|
124
|
+
const handleMouseMove = useCallback(() => {
|
|
125
|
+
if (isMobile) return;
|
|
126
|
+
resetInactivityTimer();
|
|
127
|
+
}, [isMobile, resetInactivityTimer]);
|
|
97
128
|
const posterSources = resolvedSources.filter((s) => s.media && s.posterUrl);
|
|
98
129
|
const fallbackPoster = posterUrl ?? resolvedSources.find((s) => !s.media)?.posterUrl ?? resolvedSources[0]?.posterUrl;
|
|
99
130
|
if (resolvedSources.length === 0) return null;
|
|
@@ -103,6 +134,7 @@ var HlsPlayer = React.memo(
|
|
|
103
134
|
className: "relative w-full aspect-video bg-black",
|
|
104
135
|
onMouseEnter: handleMouseEnter,
|
|
105
136
|
onMouseLeave: handleMouseLeave,
|
|
137
|
+
onMouseMove: handleMouseMove,
|
|
106
138
|
children: [
|
|
107
139
|
/* @__PURE__ */ jsx(
|
|
108
140
|
"video",
|
|
@@ -151,8 +183,8 @@ var HlsPlayer = React.memo(
|
|
|
151
183
|
{
|
|
152
184
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
|
153
185
|
style: {
|
|
154
|
-
opacity:
|
|
155
|
-
transition: "opacity 0.
|
|
186
|
+
opacity: isControlsVisible ? 1 : 0,
|
|
187
|
+
transition: "opacity 0.3s ease"
|
|
156
188
|
},
|
|
157
189
|
children: /* @__PURE__ */ jsx(
|
|
158
190
|
"button",
|
|
@@ -164,7 +196,7 @@ var HlsPlayer = React.memo(
|
|
|
164
196
|
handlePlayPause();
|
|
165
197
|
},
|
|
166
198
|
style: {
|
|
167
|
-
pointerEvents: "auto",
|
|
199
|
+
pointerEvents: isControlsVisible ? "auto" : "none",
|
|
168
200
|
width: 64,
|
|
169
201
|
height: 64,
|
|
170
202
|
borderRadius: "50%",
|
|
@@ -199,7 +231,7 @@ var HlsPlayer = React.memo(
|
|
|
199
231
|
] })
|
|
200
232
|
) : (
|
|
201
233
|
/* Play — solid triangle, nudged right for optical balance */
|
|
202
|
-
/* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg",
|
|
234
|
+
/* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M5 3.5L17 10L5 16.5V3.5Z", fill: "white" }) })
|
|
203
235
|
)
|
|
204
236
|
}
|
|
205
237
|
)
|
package/dist/index.d.mts
CHANGED
|
@@ -16,6 +16,7 @@ declare const ViewControlTypes: {
|
|
|
16
16
|
lineText: string;
|
|
17
17
|
asset: string;
|
|
18
18
|
multilineTextBullets: string;
|
|
19
|
+
boolean: string;
|
|
19
20
|
money: string;
|
|
20
21
|
date: string;
|
|
21
22
|
time: string;
|
|
@@ -183,6 +184,116 @@ interface FilterColumn {
|
|
|
183
184
|
}
|
|
184
185
|
declare const DataList: React.FC<DataListConfiguration<any>>;
|
|
185
186
|
|
|
187
|
+
interface SiteFormData {
|
|
188
|
+
siteFormId: number;
|
|
189
|
+
siteId: number;
|
|
190
|
+
appId: number;
|
|
191
|
+
formTitle?: string;
|
|
192
|
+
siteFormTypeId: number;
|
|
193
|
+
siteFormType: SiteFormTypeData;
|
|
194
|
+
siteFormDataList: SiteFormDataListData;
|
|
195
|
+
siteFormDataForm: SiteFormDataFormData;
|
|
196
|
+
}
|
|
197
|
+
interface SiteFormTypeData {
|
|
198
|
+
siteFormTypeId: number;
|
|
199
|
+
siteFormTypeCode?: string;
|
|
200
|
+
siteFormTypeTitle?: string;
|
|
201
|
+
siteFormTypeThumbnail?: string;
|
|
202
|
+
siteFormTypeIcon?: string;
|
|
203
|
+
}
|
|
204
|
+
interface SiteFormDataListData {
|
|
205
|
+
siteFormDataListId: number;
|
|
206
|
+
siteFormId: number;
|
|
207
|
+
serviceRoute?: string;
|
|
208
|
+
addLinkHref?: string;
|
|
209
|
+
addLinkText?: string;
|
|
210
|
+
siteFormDataListColumns?: SiteFormDataListColumnData[];
|
|
211
|
+
siteFormDataListFilters?: SiteFormDataListFilterData[];
|
|
212
|
+
}
|
|
213
|
+
interface SiteFormDataListFilterData {
|
|
214
|
+
siteFormDataListFilterId: number;
|
|
215
|
+
siteFormDataListId: number;
|
|
216
|
+
placeholder?: string;
|
|
217
|
+
columnName?: string;
|
|
218
|
+
serviceRoute?: string;
|
|
219
|
+
dataTextFieldName?: string;
|
|
220
|
+
dataKeyFieldName?: string;
|
|
221
|
+
isKeyNumber: boolean;
|
|
222
|
+
}
|
|
223
|
+
interface SiteFormDataFormActionData {
|
|
224
|
+
siteFormDataFormActionId: number;
|
|
225
|
+
siteFormDataFormId: number;
|
|
226
|
+
actionCode?: string;
|
|
227
|
+
actionTitle?: string;
|
|
228
|
+
serviceRoute?: string;
|
|
229
|
+
httpMethod?: string;
|
|
230
|
+
returnRoute?: string;
|
|
231
|
+
}
|
|
232
|
+
interface SiteFormDataFormData {
|
|
233
|
+
entityIdParamName?: string;
|
|
234
|
+
actions?: SiteFormDataFormActionData[];
|
|
235
|
+
sections?: SiteFormDataFormSectionData[];
|
|
236
|
+
}
|
|
237
|
+
interface SiteFormDataFormSectionData {
|
|
238
|
+
siteFormDataFormSectionId: number;
|
|
239
|
+
siteFormDataFormId: number;
|
|
240
|
+
sectionTitle?: string;
|
|
241
|
+
sectionName?: string;
|
|
242
|
+
parentSectionName?: string;
|
|
243
|
+
isChildSection: boolean;
|
|
244
|
+
sectionRows?: SiteFormDataFormSectionRowData[];
|
|
245
|
+
}
|
|
246
|
+
interface SiteFormDataListColumnData {
|
|
247
|
+
siteFormDataListColumnId: number;
|
|
248
|
+
siteFormDataListId: number;
|
|
249
|
+
columnName?: string;
|
|
250
|
+
label?: string;
|
|
251
|
+
controlTypeCode?: string;
|
|
252
|
+
enableSorting: boolean;
|
|
253
|
+
format?: string;
|
|
254
|
+
showAsLink: boolean;
|
|
255
|
+
linkUrlSegment?: string;
|
|
256
|
+
emptyValueLabel?: string;
|
|
257
|
+
}
|
|
258
|
+
interface SiteFormDataFormSectionRowData {
|
|
259
|
+
siteFormDataFormRowId: number;
|
|
260
|
+
siteFormDataFormSectionId: number;
|
|
261
|
+
grow?: boolean;
|
|
262
|
+
elements?: SiteFormDataFormSectionRowElementData[];
|
|
263
|
+
}
|
|
264
|
+
interface SiteFormDataFormSectionRowElementData {
|
|
265
|
+
siteFormDataFormRowElementId: number;
|
|
266
|
+
siteFormDataFormRowId: number;
|
|
267
|
+
name?: string;
|
|
268
|
+
label?: string;
|
|
269
|
+
controlTypeCode?: string;
|
|
270
|
+
required?: boolean;
|
|
271
|
+
readOnly?: boolean;
|
|
272
|
+
errorMessage?: string;
|
|
273
|
+
dataSource?: string;
|
|
274
|
+
dataTextFieldName?: string;
|
|
275
|
+
dataKeyFieldName?: string;
|
|
276
|
+
maxLength?: number;
|
|
277
|
+
minLength?: number;
|
|
278
|
+
maxValue?: number;
|
|
279
|
+
minValue?: number;
|
|
280
|
+
placeholder?: string;
|
|
281
|
+
hintText?: string;
|
|
282
|
+
helpText?: string;
|
|
283
|
+
autoFocus?: boolean;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
interface DataListRendererProps {
|
|
287
|
+
formDefinition: SiteFormData;
|
|
288
|
+
apiBaseUrl: string;
|
|
289
|
+
session: any;
|
|
290
|
+
params: Record<string, any>;
|
|
291
|
+
query: Record<string, any>;
|
|
292
|
+
path: string;
|
|
293
|
+
widgetProps?: any;
|
|
294
|
+
}
|
|
295
|
+
declare const DataListRenderer: ({ formDefinition, apiBaseUrl, session, params, query, path, widgetProps, }: DataListRendererProps) => react_jsx_runtime.JSX.Element;
|
|
296
|
+
|
|
186
297
|
interface Session {
|
|
187
298
|
cid: string;
|
|
188
299
|
contactId?: number;
|
|
@@ -255,4 +366,4 @@ declare const EmailInput: React.FC<InputControlProps>;
|
|
|
255
366
|
|
|
256
367
|
declare const TimeInput: React.FC<InputControlProps>;
|
|
257
368
|
|
|
258
|
-
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
|
369
|
+
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DataListRenderer, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare const ViewControlTypes: {
|
|
|
16
16
|
lineText: string;
|
|
17
17
|
asset: string;
|
|
18
18
|
multilineTextBullets: string;
|
|
19
|
+
boolean: string;
|
|
19
20
|
money: string;
|
|
20
21
|
date: string;
|
|
21
22
|
time: string;
|
|
@@ -183,6 +184,116 @@ interface FilterColumn {
|
|
|
183
184
|
}
|
|
184
185
|
declare const DataList: React.FC<DataListConfiguration<any>>;
|
|
185
186
|
|
|
187
|
+
interface SiteFormData {
|
|
188
|
+
siteFormId: number;
|
|
189
|
+
siteId: number;
|
|
190
|
+
appId: number;
|
|
191
|
+
formTitle?: string;
|
|
192
|
+
siteFormTypeId: number;
|
|
193
|
+
siteFormType: SiteFormTypeData;
|
|
194
|
+
siteFormDataList: SiteFormDataListData;
|
|
195
|
+
siteFormDataForm: SiteFormDataFormData;
|
|
196
|
+
}
|
|
197
|
+
interface SiteFormTypeData {
|
|
198
|
+
siteFormTypeId: number;
|
|
199
|
+
siteFormTypeCode?: string;
|
|
200
|
+
siteFormTypeTitle?: string;
|
|
201
|
+
siteFormTypeThumbnail?: string;
|
|
202
|
+
siteFormTypeIcon?: string;
|
|
203
|
+
}
|
|
204
|
+
interface SiteFormDataListData {
|
|
205
|
+
siteFormDataListId: number;
|
|
206
|
+
siteFormId: number;
|
|
207
|
+
serviceRoute?: string;
|
|
208
|
+
addLinkHref?: string;
|
|
209
|
+
addLinkText?: string;
|
|
210
|
+
siteFormDataListColumns?: SiteFormDataListColumnData[];
|
|
211
|
+
siteFormDataListFilters?: SiteFormDataListFilterData[];
|
|
212
|
+
}
|
|
213
|
+
interface SiteFormDataListFilterData {
|
|
214
|
+
siteFormDataListFilterId: number;
|
|
215
|
+
siteFormDataListId: number;
|
|
216
|
+
placeholder?: string;
|
|
217
|
+
columnName?: string;
|
|
218
|
+
serviceRoute?: string;
|
|
219
|
+
dataTextFieldName?: string;
|
|
220
|
+
dataKeyFieldName?: string;
|
|
221
|
+
isKeyNumber: boolean;
|
|
222
|
+
}
|
|
223
|
+
interface SiteFormDataFormActionData {
|
|
224
|
+
siteFormDataFormActionId: number;
|
|
225
|
+
siteFormDataFormId: number;
|
|
226
|
+
actionCode?: string;
|
|
227
|
+
actionTitle?: string;
|
|
228
|
+
serviceRoute?: string;
|
|
229
|
+
httpMethod?: string;
|
|
230
|
+
returnRoute?: string;
|
|
231
|
+
}
|
|
232
|
+
interface SiteFormDataFormData {
|
|
233
|
+
entityIdParamName?: string;
|
|
234
|
+
actions?: SiteFormDataFormActionData[];
|
|
235
|
+
sections?: SiteFormDataFormSectionData[];
|
|
236
|
+
}
|
|
237
|
+
interface SiteFormDataFormSectionData {
|
|
238
|
+
siteFormDataFormSectionId: number;
|
|
239
|
+
siteFormDataFormId: number;
|
|
240
|
+
sectionTitle?: string;
|
|
241
|
+
sectionName?: string;
|
|
242
|
+
parentSectionName?: string;
|
|
243
|
+
isChildSection: boolean;
|
|
244
|
+
sectionRows?: SiteFormDataFormSectionRowData[];
|
|
245
|
+
}
|
|
246
|
+
interface SiteFormDataListColumnData {
|
|
247
|
+
siteFormDataListColumnId: number;
|
|
248
|
+
siteFormDataListId: number;
|
|
249
|
+
columnName?: string;
|
|
250
|
+
label?: string;
|
|
251
|
+
controlTypeCode?: string;
|
|
252
|
+
enableSorting: boolean;
|
|
253
|
+
format?: string;
|
|
254
|
+
showAsLink: boolean;
|
|
255
|
+
linkUrlSegment?: string;
|
|
256
|
+
emptyValueLabel?: string;
|
|
257
|
+
}
|
|
258
|
+
interface SiteFormDataFormSectionRowData {
|
|
259
|
+
siteFormDataFormRowId: number;
|
|
260
|
+
siteFormDataFormSectionId: number;
|
|
261
|
+
grow?: boolean;
|
|
262
|
+
elements?: SiteFormDataFormSectionRowElementData[];
|
|
263
|
+
}
|
|
264
|
+
interface SiteFormDataFormSectionRowElementData {
|
|
265
|
+
siteFormDataFormRowElementId: number;
|
|
266
|
+
siteFormDataFormRowId: number;
|
|
267
|
+
name?: string;
|
|
268
|
+
label?: string;
|
|
269
|
+
controlTypeCode?: string;
|
|
270
|
+
required?: boolean;
|
|
271
|
+
readOnly?: boolean;
|
|
272
|
+
errorMessage?: string;
|
|
273
|
+
dataSource?: string;
|
|
274
|
+
dataTextFieldName?: string;
|
|
275
|
+
dataKeyFieldName?: string;
|
|
276
|
+
maxLength?: number;
|
|
277
|
+
minLength?: number;
|
|
278
|
+
maxValue?: number;
|
|
279
|
+
minValue?: number;
|
|
280
|
+
placeholder?: string;
|
|
281
|
+
hintText?: string;
|
|
282
|
+
helpText?: string;
|
|
283
|
+
autoFocus?: boolean;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
interface DataListRendererProps {
|
|
287
|
+
formDefinition: SiteFormData;
|
|
288
|
+
apiBaseUrl: string;
|
|
289
|
+
session: any;
|
|
290
|
+
params: Record<string, any>;
|
|
291
|
+
query: Record<string, any>;
|
|
292
|
+
path: string;
|
|
293
|
+
widgetProps?: any;
|
|
294
|
+
}
|
|
295
|
+
declare const DataListRenderer: ({ formDefinition, apiBaseUrl, session, params, query, path, widgetProps, }: DataListRendererProps) => react_jsx_runtime.JSX.Element;
|
|
296
|
+
|
|
186
297
|
interface Session {
|
|
187
298
|
cid: string;
|
|
188
299
|
contactId?: number;
|
|
@@ -255,4 +366,4 @@ declare const EmailInput: React.FC<InputControlProps>;
|
|
|
255
366
|
|
|
256
367
|
declare const TimeInput: React.FC<InputControlProps>;
|
|
257
368
|
|
|
258
|
-
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
|
369
|
+
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DataListRenderer, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|