@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260423051720 → 0.8.1-dev.20260423070204

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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  HlsPlayer_default
4
- } from "./chunk-VNSFFK3H.mjs";
4
+ } from "./chunk-TXHD4F4A.mjs";
5
5
  export {
6
6
  HlsPlayer_default as default
7
7
  };
@@ -20,6 +20,7 @@ var HlsPlayer = React.memo(
20
20
  const [isHovered, setIsHovered] = useState(false);
21
21
  const [isMobile, setIsMobile] = useState(false);
22
22
  const [isControlsVisible, setIsControlsVisible] = useState(true);
23
+ const [isPosterVisible, setIsPosterVisible] = useState(true);
23
24
  const wasManuallyPausedRef = useRef(false);
24
25
  const inactivityTimerRef = useRef(null);
25
26
  const INACTIVITY_DELAY = 2500;
@@ -37,6 +38,20 @@ var HlsPlayer = React.memo(
37
38
  window.addEventListener("resize", checkMobile);
38
39
  return () => window.removeEventListener("resize", checkMobile);
39
40
  }, []);
41
+ useEffect(() => {
42
+ const v = videoRef.current;
43
+ if (!v) return;
44
+ const onPlaying = () => setIsPosterVisible(false);
45
+ const onPause = () => {
46
+ if (v.currentTime === 0) setIsPosterVisible(true);
47
+ };
48
+ v.addEventListener("playing", onPlaying);
49
+ v.addEventListener("pause", onPause);
50
+ return () => {
51
+ v.removeEventListener("playing", onPlaying);
52
+ v.removeEventListener("pause", onPause);
53
+ };
54
+ }, []);
40
55
  const resetInactivityTimer = useCallback(() => {
41
56
  setIsControlsVisible(true);
42
57
  if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
@@ -127,6 +142,7 @@ var HlsPlayer = React.memo(
127
142
  }, [isMobile, resetInactivityTimer]);
128
143
  const posterSources = resolvedSources.filter((s) => s.media && s.posterUrl);
129
144
  const fallbackPoster = posterUrl ?? resolvedSources.find((s) => !s.media)?.posterUrl ?? resolvedSources[0]?.posterUrl;
145
+ const isPlayOnHover = playOptions === "playOnHover";
130
146
  if (resolvedSources.length === 0) return null;
131
147
  return /* @__PURE__ */ jsxs(
132
148
  "div",
@@ -143,7 +159,7 @@ var HlsPlayer = React.memo(
143
159
  className: "w-full h-full object-contain",
144
160
  poster: fallbackPoster,
145
161
  controls: showControls && (isMobile || isPlaying),
146
- muted: playOptions === "autoplay" || playOptions === "playOnHover",
162
+ muted: playOptions === "autoplay" || isPlayOnHover,
147
163
  autoPlay: playOptions === "autoplay",
148
164
  loop,
149
165
  playsInline: true,
@@ -159,10 +175,14 @@ var HlsPlayer = React.memo(
159
175
  ))
160
176
  }
161
177
  ),
162
- !isMobile && playOptions === "playOnHover" && fallbackPoster && /* @__PURE__ */ jsxs(
178
+ !isMobile && fallbackPoster && /* @__PURE__ */ jsxs(
163
179
  "picture",
164
180
  {
165
- className: `absolute inset-0 transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`,
181
+ className: "absolute inset-0 pointer-events-none",
182
+ style: {
183
+ opacity: isPosterVisible && (!isPlayOnHover || !isHovered) ? 1 : 0,
184
+ transition: "opacity 0.4s ease"
185
+ },
166
186
  children: [
167
187
  posterSources.map(({ media, posterUrl: src }, i) => /* @__PURE__ */ jsx("source", { media, srcSet: src }, i)),
168
188
  /* @__PURE__ */ jsx(
@@ -178,7 +198,7 @@ var HlsPlayer = React.memo(
178
198
  ]
179
199
  }
180
200
  ),
181
- !isMobile && /* @__PURE__ */ jsx(
201
+ !isMobile && !isPlayOnHover && /* @__PURE__ */ jsx(
182
202
  "div",
183
203
  {
184
204
  className: "absolute inset-0 flex items-center justify-center pointer-events-none",
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 };