@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260704091052 → 0.8.1-dev.20260706114046

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/CopyButton-UPJPMJUB.mjs +57 -0
  2. package/dist/DateTimeViewClient-R3M6ISVK.mjs +16 -0
  3. package/dist/DateViewClient-VLTRN47D.mjs +9 -0
  4. package/dist/{chunk-SDNYBQSI.mjs → HlsPlayer-57543DTW.mjs} +3 -2
  5. package/dist/HlsPlayer-5AWFZ2P6.mjs +601 -0
  6. package/dist/IframeClient-RGJFZ5P2.mjs +98 -0
  7. package/dist/InputControlClient-NJV6B65M.mjs +604 -0
  8. package/dist/InputControlClient-OQDLYA4S.mjs +604 -0
  9. package/dist/InputControlClient-TW664WIJ.mjs +602 -0
  10. package/dist/{LinkNodeButton-WDDPNYWI.mjs → LinkNodeButton-FUL3J5HR.mjs} +6 -5
  11. package/dist/LinkNodeButton-IGJOGOKI.mjs +362 -0
  12. package/dist/LinkNodeButton-ZONM74OO.mjs +174 -0
  13. package/dist/Pagination-6OFACRMQ.mjs +229 -0
  14. package/dist/Pagination-FSYLYKUA.mjs +181 -0
  15. package/dist/Pagination-YCD5CU2L.mjs +183 -0
  16. package/dist/Slider-554BKC7N.mjs +322 -0
  17. package/dist/Slider-PEIVH6A5.mjs +320 -0
  18. package/dist/chunk-2GSYECIS.mjs +109 -0
  19. package/dist/chunk-3GWLDT7C.mjs +204 -0
  20. package/dist/chunk-3R4VVVNK.mjs +903 -0
  21. package/dist/chunk-47HD7QP7.mjs +199 -0
  22. package/dist/chunk-56HSDML5.mjs +22 -0
  23. package/dist/chunk-67IG5NBU.mjs +200 -0
  24. package/dist/chunk-7ZFZLN56.mjs +903 -0
  25. package/dist/chunk-CM7LUGCH.mjs +107 -0
  26. package/dist/chunk-IKIXEQPV.mjs +198 -0
  27. package/dist/chunk-IMNQO57B.mjs +25 -0
  28. package/dist/chunk-R2HV35IB.mjs +201 -0
  29. package/dist/chunk-SPRVN5IM.mjs +118 -0
  30. package/dist/chunk-TVL6KVD5.mjs +229 -0
  31. package/dist/chunk-WEV5U33G.mjs +207 -0
  32. package/dist/chunk-YG6FKKQJ.mjs +900 -0
  33. package/dist/index.d.mts +56 -169
  34. package/dist/index.d.ts +56 -169
  35. package/dist/index.js +3940 -3807
  36. package/dist/index.mjs +591 -2923
  37. package/dist/server.d.mts +72 -0
  38. package/dist/server.d.ts +72 -0
  39. package/dist/server.js +5126 -0
  40. package/dist/server.mjs +2698 -0
  41. package/package.json +18 -4
  42. package/dist/HlsPlayer-DZNDKG2P.mjs +0 -7
  43. package/dist/chunk-DOKQUUH3.mjs +0 -414
@@ -0,0 +1,199 @@
1
+ import {
2
+ Constants
3
+ } from "./chunk-CM7LUGCH.mjs";
4
+
5
+ // src/clients/OdataBuilder.tsx
6
+ var OdataBuilder = class {
7
+ constructor(url) {
8
+ this.baseUrl = url;
9
+ this.top = Constants.pagesize.toString();
10
+ this.skip = "0";
11
+ this.keyword = "";
12
+ this.filterBy = "";
13
+ this.orderBy = "";
14
+ }
15
+ // parseSearchParams(ReadonlyUrlSearchParams): DataQuery {
16
+ // this.top = top;
17
+ // return this;
18
+ // }
19
+ setQuery(odata) {
20
+ if (odata) {
21
+ for (const key in odata) {
22
+ if (odata[key] != null && odata[key] != "") {
23
+ if (key == "$skip") {
24
+ this.setSkip(odata[key]);
25
+ }
26
+ if (key == "$filter") {
27
+ this.setFilter(odata[key]);
28
+ }
29
+ if (key == "$top") {
30
+ this.setTop(odata[key]);
31
+ }
32
+ if (key == "$orderby") {
33
+ this.setOrderBy(odata[key]);
34
+ }
35
+ if (key == "searchTerm") {
36
+ this.searchTerm = odata[key];
37
+ }
38
+ if (key == "searchCols") {
39
+ this.searchCols = odata[key];
40
+ }
41
+ }
42
+ }
43
+ }
44
+ return this;
45
+ }
46
+ // parseKeyValuePairs(inputString: string): { [key: string]: string } {
47
+ // return inputString.split('$')
48
+ // .map((pair) => pair.split('='))
49
+ // .reduce((result: { [key: string]: string }, [key, value]) => {
50
+ // if (key && value) {
51
+ // result[key.trim()] = value.trim();
52
+ // }
53
+ // return result;
54
+ // }, {});
55
+ // }
56
+ static getOdataQueryString(obj, defaultOrder) {
57
+ let queryString = "";
58
+ let skip = (obj && obj["$skip"]) ?? "0";
59
+ let top = (obj && obj["$top"]) ?? Constants.pagesize.toString();
60
+ queryString = `$skip=${skip}&$top=${top}&$count=true`;
61
+ if (obj?.["searchTerm"] && obj["searchTerm"].trim() !== "") {
62
+ queryString += `&searchTerm=${encodeURIComponent(obj["searchTerm"])}`;
63
+ }
64
+ if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
65
+ queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
66
+ }
67
+ if (obj) {
68
+ if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
69
+ queryString = queryString + `&$filter=${encodeURIComponent(obj["$filter"])}`;
70
+ }
71
+ if (obj["$orderby"] && obj["$orderby"] !== null && obj["$orderby"] !== "") {
72
+ queryString = queryString + `&$orderby=${encodeURIComponent(obj["$orderby"])}`;
73
+ } else if (defaultOrder) {
74
+ queryString = queryString + `&$orderby=${encodeURIComponent(defaultOrder)}`;
75
+ }
76
+ } else {
77
+ if (defaultOrder) {
78
+ queryString = queryString + `&$orderby=${encodeURIComponent(defaultOrder)}`;
79
+ }
80
+ }
81
+ return queryString;
82
+ }
83
+ setTop(top) {
84
+ this.top = top;
85
+ return this;
86
+ }
87
+ setSkip(skip) {
88
+ this.skip = skip;
89
+ return this;
90
+ }
91
+ setKeyword(keyword) {
92
+ this.keyword = keyword;
93
+ return this;
94
+ }
95
+ setFilter(filterBy) {
96
+ this.filterBy = filterBy;
97
+ return this;
98
+ }
99
+ setOrderBy(orderBy) {
100
+ this.orderBy = orderBy;
101
+ return this;
102
+ }
103
+ getPageNumber(pageSize) {
104
+ let pageNumber = 1;
105
+ if (this.skip && this.top) {
106
+ const skip = parseInt(this.skip);
107
+ const top = parseInt(this.top);
108
+ if (!isNaN(skip) && !isNaN(top)) {
109
+ pageNumber = skip / pageSize + 1;
110
+ }
111
+ }
112
+ return pageNumber;
113
+ }
114
+ getUrl() {
115
+ let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
116
+ if (this.filterBy !== null && this.filterBy !== "") {
117
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
118
+ }
119
+ if (this.orderBy !== null && this.orderBy !== "") {
120
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
121
+ }
122
+ if (this.searchTerm) {
123
+ url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
124
+ }
125
+ if (this.searchCols) {
126
+ url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
127
+ }
128
+ console.log(url);
129
+ return url;
130
+ }
131
+ getNewOrderByUrl(orderBy) {
132
+ let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
133
+ if (this.filterBy !== null && this.filterBy !== "") {
134
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
135
+ }
136
+ if (this.searchTerm) {
137
+ url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
138
+ }
139
+ if (this.searchCols) {
140
+ url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
141
+ }
142
+ url = url + `&$orderby=${encodeURIComponent(orderBy)}`;
143
+ return url;
144
+ }
145
+ getNewFilterUrl(filterBy) {
146
+ let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
147
+ if (filterBy !== null && filterBy !== "") {
148
+ url = url + `&$filter=${encodeURIComponent(filterBy)}`;
149
+ }
150
+ if (this.orderBy !== null && this.orderBy !== "") {
151
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
152
+ }
153
+ if (this.searchTerm) {
154
+ url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
155
+ }
156
+ if (this.searchCols) {
157
+ url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
158
+ }
159
+ return url;
160
+ }
161
+ getNewPageUrl(page) {
162
+ let skip = page * Constants.pagesize - Constants.pagesize;
163
+ let url = `${this.baseUrl}?$skip=${skip}&$top=${this.top}&$count=true`;
164
+ if (this.filterBy !== null && this.filterBy !== "") {
165
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
166
+ }
167
+ if (this.orderBy !== null && this.orderBy !== "") {
168
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
169
+ }
170
+ if (this.searchTerm) {
171
+ url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
172
+ }
173
+ if (this.searchCols) {
174
+ url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
175
+ }
176
+ return url;
177
+ }
178
+ getNewPageSizeUrl(pageSize) {
179
+ const currentPage = this.getPageNumber(
180
+ parseInt(this.top || Constants.pagesize.toString())
181
+ );
182
+ const skip = (currentPage - 1) * pageSize;
183
+ let url = `${this.baseUrl}?$skip=${skip}&$top=${pageSize}&$count=true`;
184
+ if (this.filterBy !== null && this.filterBy !== "") {
185
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
186
+ }
187
+ if (this.orderBy !== null && this.orderBy !== "") {
188
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
189
+ }
190
+ return url;
191
+ }
192
+ getOrderBy() {
193
+ return this.orderBy;
194
+ }
195
+ };
196
+
197
+ export {
198
+ OdataBuilder
199
+ };
@@ -0,0 +1,22 @@
1
+ // src/components/StyleTypes.tsx
2
+ var buttonClasses = /* @__PURE__ */ new Map([
3
+ [
4
+ "Primary" /* Solid */,
5
+ "btn-solid relative inline-flex items-center justify-center rounded px-4 py-3 lg:py-2 font-medium shadow-sm hover:shadow-lg focus:outline-none active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed transition duration-150 ease-in-out"
6
+ ],
7
+ [
8
+ "PrimaryHollow" /* Hollow */,
9
+ "btn-hollow inline-flex font-medium items-center justify-center px-4 py-3 lg:py-2 rounded hover:shadow-md focus:outline-none transition duration-150 ease-in-out active:scale-95"
10
+ ],
11
+ ["Link" /* Link */, "btn-link"]
12
+ ]);
13
+ var progressClasses = /* @__PURE__ */ new Map([
14
+ ["Primary" /* Solid */, ""],
15
+ ["PrimaryHollow" /* Hollow */, ""],
16
+ ["Link" /* Link */, ""]
17
+ ]);
18
+
19
+ export {
20
+ buttonClasses,
21
+ progressClasses
22
+ };
@@ -0,0 +1,200 @@
1
+ "use client";
2
+
3
+ import {
4
+ buttonClasses,
5
+ progressClasses
6
+ } from "./chunk-IMNQO57B.mjs";
7
+
8
+ // src/components/ToastService.tsx
9
+ var ToastService = class _ToastService {
10
+ static initialize(showToast, closeToast) {
11
+ _ToastService.showToast = showToast;
12
+ _ToastService.closeToast = closeToast;
13
+ }
14
+ static showError(message) {
15
+ if (_ToastService.showToast) {
16
+ _ToastService.showToast(message, "error");
17
+ }
18
+ }
19
+ static showInfo(message) {
20
+ if (_ToastService.showToast) {
21
+ _ToastService.showToast(message, "info");
22
+ }
23
+ }
24
+ static showWarning(message) {
25
+ if (_ToastService.showToast) {
26
+ _ToastService.showToast(message, "warning");
27
+ }
28
+ }
29
+ static showSuccess(message) {
30
+ if (_ToastService.showToast) {
31
+ _ToastService.showToast(message, "success");
32
+ }
33
+ }
34
+ static close() {
35
+ if (_ToastService.closeToast) {
36
+ _ToastService.closeToast();
37
+ }
38
+ }
39
+ };
40
+ var ToastService_default = ToastService;
41
+
42
+ // src/components/Button.tsx
43
+ import React3, { useState as useState2 } from "react";
44
+
45
+ // src/components/Confirm.tsx
46
+ import { useState } from "react";
47
+
48
+ // src/components/ClientButton.tsx
49
+ import React from "react";
50
+ import { jsx } from "react/jsx-runtime";
51
+ var ClientButton = (props) => {
52
+ const execute = async (event) => {
53
+ if (props.onClick !== void 0) {
54
+ props.onClick();
55
+ } else {
56
+ ToastService_default.showError("No action defined.");
57
+ }
58
+ };
59
+ let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
60
+ return /* @__PURE__ */ jsx(React.Fragment, { children: /* @__PURE__ */ jsx(
61
+ "button",
62
+ {
63
+ type: "button",
64
+ onClick: execute,
65
+ className: buttonClass + " " + props.className,
66
+ children: props.children
67
+ }
68
+ ) });
69
+ };
70
+ var ClientButton_default = ClientButton;
71
+
72
+ // src/components/Confirm.tsx
73
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
74
+ var Confirm = ({ message, onConfirm, onCancel }) => {
75
+ const [showModal, setShowModal] = useState(true);
76
+ const handleConfirmAction = () => {
77
+ setShowModal(false);
78
+ if (onConfirm) {
79
+ onConfirm();
80
+ }
81
+ };
82
+ const handleCancelAction = () => {
83
+ setShowModal(false);
84
+ if (onCancel) {
85
+ onCancel();
86
+ }
87
+ };
88
+ return /* @__PURE__ */ jsx2(Fragment, { children: showModal && /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
89
+ /* @__PURE__ */ jsx2("div", { className: "absolute inset-0 bg-black opacity-70" }),
90
+ /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
91
+ /* @__PURE__ */ jsx2("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
92
+ /* @__PURE__ */ jsx2("p", { className: "mb-4", children: message }),
93
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-8", children: [
94
+ /* @__PURE__ */ jsx2(
95
+ ClientButton_default,
96
+ {
97
+ onClick: handleCancelAction,
98
+ ButtonType: "PrimaryHollow" /* Hollow */,
99
+ children: "Cancel"
100
+ }
101
+ ),
102
+ /* @__PURE__ */ jsx2(
103
+ ClientButton_default,
104
+ {
105
+ onClick: handleConfirmAction,
106
+ children: "Confirm"
107
+ }
108
+ )
109
+ ] })
110
+ ] })
111
+ ] }) });
112
+ };
113
+ var Confirm_default = Confirm;
114
+ {
115
+ }
116
+
117
+ // src/components/Button.tsx
118
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
119
+ var Button = (props) => {
120
+ const [inProgress, setInProgress] = useState2(false);
121
+ const [isActionPerformed, setIsActionPerformed] = useState2(false);
122
+ const [responseMessage, setResponseMessage] = useState2(null);
123
+ const [showModal, setShowModal] = useState2(null);
124
+ const execute = async (event) => {
125
+ event.preventDefault();
126
+ event.stopPropagation();
127
+ if (props.confirm) {
128
+ const confirmed = await showConfirmation("Are you sure you want to delete this item?");
129
+ setShowModal(null);
130
+ if (!confirmed) {
131
+ return;
132
+ }
133
+ }
134
+ if (props.oneTimeAction && isActionPerformed) {
135
+ return;
136
+ }
137
+ setInProgress(true);
138
+ let isValid = true;
139
+ if (props.onValidate !== void 0) {
140
+ isValid = await props.onValidate();
141
+ if (!isValid) {
142
+ setInProgress(false);
143
+ ToastService_default.showError("There are errors in the form. Please fix them before proceeding.");
144
+ return;
145
+ }
146
+ }
147
+ if (props.onClick !== void 0) {
148
+ let response = await props.onClick();
149
+ if (response.isSuccessful) {
150
+ setIsActionPerformed(true);
151
+ setResponseMessage(response.message);
152
+ if (props.showToast) {
153
+ ToastService_default.showInfo(response.message || "");
154
+ }
155
+ } else {
156
+ ToastService_default.showError(response.message || "");
157
+ }
158
+ } else {
159
+ ToastService_default.showError("No action defined.");
160
+ }
161
+ setInProgress(false);
162
+ };
163
+ const showConfirmation = (message) => {
164
+ return new Promise((resolve) => {
165
+ const onConfirm = () => resolve(true);
166
+ const onCancel = () => resolve(false);
167
+ setShowModal(/* @__PURE__ */ jsx3(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
168
+ });
169
+ };
170
+ let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
171
+ let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
172
+ const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
173
+ return /* @__PURE__ */ jsxs2(React3.Fragment, { children: [
174
+ /* @__PURE__ */ jsxs2(
175
+ "button",
176
+ {
177
+ type: "submit",
178
+ onClick: execute,
179
+ disabled: props.disabled,
180
+ title: isDisabled ? "The button is disabled to prevent any action" : "",
181
+ className: buttonClass + " relative " + props.className,
182
+ children: [
183
+ isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
184
+ inProgress && /* @__PURE__ */ jsx3(React3.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx3("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ jsxs2("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
185
+ /* @__PURE__ */ jsx3("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
186
+ /* @__PURE__ */ jsx3("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
187
+ ] }) })
188
+ ]
189
+ }
190
+ ),
191
+ showModal
192
+ ] });
193
+ };
194
+ var Button_default = Button;
195
+
196
+ export {
197
+ ToastService_default,
198
+ ClientButton_default,
199
+ Button_default
200
+ };