siam-ui-utils 2.2.25 → 2.2.27

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 (137) hide show
  1. package/dist/CustomBootstrap.js +9 -0
  2. package/dist/CustomBootstrap.js.map +1 -0
  3. package/dist/CustomSelectInput.js +12 -0
  4. package/dist/CustomSelectInput.js.map +1 -0
  5. package/dist/IntlMessages.js +10 -0
  6. package/dist/IntlMessages.js.map +1 -0
  7. package/dist/assets/img/copiar.png.js +5 -0
  8. package/dist/assets/img/copiar.png.js.map +1 -0
  9. package/dist/assets/img/take-photo.png.js +5 -0
  10. package/dist/assets/img/take-photo.png.js.map +1 -0
  11. package/dist/bridges/with-router-bridge.js +14 -0
  12. package/dist/bridges/with-router-bridge.js.map +1 -0
  13. package/dist/constants.js +9 -0
  14. package/dist/constants.js.map +1 -0
  15. package/dist/copy-link/index.js +60 -0
  16. package/dist/copy-link/index.js.map +1 -0
  17. package/dist/custom-input/CustomInputCheckbox.js +36 -0
  18. package/dist/custom-input/CustomInputCheckbox.js.map +1 -0
  19. package/dist/custom-input/CustomInputRadio.js +43 -0
  20. package/dist/custom-input/CustomInputRadio.js.map +1 -0
  21. package/dist/dropzone/Dropzone.js +513 -0
  22. package/dist/dropzone/Dropzone.js.map +1 -0
  23. package/{src/dropzone/Input.tsx → dist/dropzone/Input.js} +77 -76
  24. package/dist/dropzone/Input.js.map +1 -0
  25. package/{src/dropzone/Layout.tsx → dist/dropzone/Layout.js} +50 -57
  26. package/dist/dropzone/Layout.js.map +1 -0
  27. package/dist/dropzone/Preview.js +117 -0
  28. package/dist/dropzone/Preview.js.map +1 -0
  29. package/dist/dropzone/SubmitButton.js +34 -0
  30. package/dist/dropzone/SubmitButton.js.map +1 -0
  31. package/dist/dropzone/assets/cancel.svg.js +5 -0
  32. package/dist/dropzone/assets/cancel.svg.js.map +1 -0
  33. package/dist/dropzone/assets/remove.svg.js +5 -0
  34. package/dist/dropzone/assets/remove.svg.js.map +1 -0
  35. package/dist/dropzone/assets/restart.svg.js +5 -0
  36. package/dist/dropzone/assets/restart.svg.js.map +1 -0
  37. package/dist/dropzone/utils.js +85 -0
  38. package/dist/dropzone/utils.js.map +1 -0
  39. package/dist/dropzone-uploader/dropzone-uploader-dni-digital/index.js +150 -0
  40. package/dist/dropzone-uploader/dropzone-uploader-dni-digital/index.js.map +1 -0
  41. package/dist/dropzone-uploader/index.js +136 -0
  42. package/dist/dropzone-uploader/index.js.map +1 -0
  43. package/dist/iconos/constants-svg.js +41 -0
  44. package/dist/iconos/constants-svg.js.map +1 -0
  45. package/dist/iconos/icon-button-svg.js +50 -0
  46. package/dist/iconos/icon-button-svg.js.map +1 -0
  47. package/dist/iconos/styled-icon.js +26 -0
  48. package/dist/iconos/styled-icon.js.map +1 -0
  49. package/dist/index.js +33 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/select/constants.js +8 -0
  52. package/dist/select/constants.js.map +1 -0
  53. package/dist/select/index.js +90 -0
  54. package/dist/select/index.js.map +1 -0
  55. package/dist/timer/index.js +60 -0
  56. package/dist/timer/index.js.map +1 -0
  57. package/dist/tomar-foto/index.js +62 -0
  58. package/dist/tomar-foto/index.js.map +1 -0
  59. package/dist/view-layout/button-editor.js +14 -0
  60. package/dist/view-layout/button-editor.js.map +1 -0
  61. package/dist/view-layout/constants.js +11 -0
  62. package/dist/view-layout/constants.js.map +1 -0
  63. package/dist/view-layout/editor-layer.js +28 -0
  64. package/dist/view-layout/editor-layer.js.map +1 -0
  65. package/dist/view-layout/index.js +53 -0
  66. package/dist/view-layout/index.js.map +1 -0
  67. package/dist/view-layout/slot-wrapper.js +39 -0
  68. package/dist/view-layout/slot-wrapper.js.map +1 -0
  69. package/dist/where-by-room/index.js +20 -0
  70. package/dist/where-by-room/index.js.map +1 -0
  71. package/dist/where-by-room/room.js +78 -0
  72. package/dist/where-by-room/room.js.map +1 -0
  73. package/package.json +69 -18
  74. package/eslint.config.mjs +0 -45
  75. package/index.html +0 -17
  76. package/src/App.css +0 -47
  77. package/src/App.jsx +0 -66
  78. package/src/CustomBootstrap.jsx +0 -10
  79. package/src/CustomSelectInput.jsx +0 -8
  80. package/src/IntlMessages.jsx +0 -7
  81. package/src/assets/css/sass/_gogo.style.scss +0 -8967
  82. package/src/assets/css/sass/_mixins.scss +0 -125
  83. package/src/assets/css/sass/_plugins.scss +0 -1
  84. package/src/assets/css/sass/ampf_style.scss +0 -185
  85. package/src/assets/css/sass/main.scss +0 -11
  86. package/src/assets/css/sass/plugins/react-table.scss +0 -314
  87. package/src/assets/css/sass/themes/gogo.light.redruby.scss +0 -41
  88. package/src/assets/css/sass/themes/variables.scss +0 -86
  89. package/src/assets/css/vendor/bootstrap.min.css +0 -6
  90. package/src/assets/css/vendor/bootstrap.rtl.only.min.css +0 -1428
  91. package/src/assets/img/copiar.png +0 -0
  92. package/src/assets/img/take-photo.png +0 -0
  93. package/src/bridges/index.js +0 -1
  94. package/src/bridges/with-router-bridge.jsx +0 -11
  95. package/src/constants.js +0 -7
  96. package/src/copy-link/index.jsx +0 -58
  97. package/src/copy-link/styles.scss +0 -39
  98. package/src/custom-input/CustomInputCheckbox.jsx +0 -33
  99. package/src/custom-input/CustomInputRadio.jsx +0 -37
  100. package/src/custom-input/index.css +0 -168
  101. package/src/custom-input/index.js +0 -2
  102. package/src/dropzone/Dropzone.tsx +0 -816
  103. package/src/dropzone/Preview.tsx +0 -139
  104. package/src/dropzone/SubmitButton.tsx +0 -47
  105. package/src/dropzone/assets/cancel.svg +0 -1
  106. package/src/dropzone/assets/remove.svg +0 -1
  107. package/src/dropzone/assets/restart.svg +0 -1
  108. package/src/dropzone/styles.css +0 -140
  109. package/src/dropzone/utils.ts +0 -113
  110. package/src/dropzone-uploader/dropzone-uploader-dni-digital/index.jsx +0 -151
  111. package/src/dropzone-uploader/dropzone-uploader.css +0 -66
  112. package/src/dropzone-uploader/index.jsx +0 -138
  113. package/src/iconos/constants-svg.js +0 -659
  114. package/src/iconos/icon-button-svg.jsx +0 -50
  115. package/src/iconos/index.js +0 -2
  116. package/src/iconos/styled-icon.jsx +0 -25
  117. package/src/index.css +0 -74
  118. package/src/index.js +0 -13
  119. package/src/main.jsx +0 -7
  120. package/src/select/constants.js +0 -4
  121. package/src/select/index.tsx +0 -147
  122. package/src/test-resources.jsx +0 -145
  123. package/src/timer/index.jsx +0 -62
  124. package/src/timer/styles.scss +0 -54
  125. package/src/tomar-foto/index.jsx +0 -69
  126. package/src/view-layout/button-editor.jsx +0 -18
  127. package/src/view-layout/constants.js +0 -7
  128. package/src/view-layout/editor-layer.jsx +0 -27
  129. package/src/view-layout/index.tsx +0 -62
  130. package/src/view-layout/item-slot.tsx +0 -20
  131. package/src/view-layout/slot-wrapper.tsx +0 -44
  132. package/src/view-layout/styles.scss +0 -143
  133. package/src/where-by-room/constants.js +0 -2
  134. package/src/where-by-room/index.jsx +0 -17
  135. package/src/where-by-room/room.jsx +0 -79
  136. package/tsconfig.json +0 -19
  137. package/vite.config.ts +0 -22
@@ -1,27 +0,0 @@
1
- import './styles.scss';
2
-
3
- const EditorLayer = ({ gridCols, gridRows }) => {
4
- return (
5
- <div
6
- className="editor-layer"
7
- style={{
8
- gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
9
- gridTemplateRows: `repeat(${gridRows}, 1fr)`,
10
- }}
11
- >
12
- {Array.from({ length: gridRows * gridCols }).map((_, idx) => {
13
- const x = idx % gridCols;
14
- const y = Math.floor(idx / gridCols);
15
- return (
16
- <div key={`cell-${x}-${y}`} className="editor-layer-cell">
17
- <div className="editor-layer-cell-coord">
18
- x:{x};y:{y}
19
- </div>
20
- </div>
21
- );
22
- })}
23
- </div>
24
- );
25
- };
26
-
27
- export default EditorLayer;
@@ -1,62 +0,0 @@
1
- import React, { FC, useState } from 'react';
2
- import SlotWrapper from './slot-wrapper';
3
- import { ItemSlot } from './item-slot';
4
- import EditorLayer from './editor-layer.jsx';
5
- import { GRID_SIZES, LOCALHOST } from './constants';
6
- import ButtonEditor from './button-editor.jsx';
7
- import './styles.scss';
8
-
9
- interface LayoutProps {
10
- slots: ItemSlot[];
11
- alto?: number;
12
- ancho?: number;
13
- size?: 'sm' | 'md' | 'lg';
14
- [key: string]: any;
15
- }
16
-
17
- const ViewLayout: FC<LayoutProps> = ({
18
- slots = [],
19
- size = 'md',
20
- alto = 80,
21
- ancho = 90,
22
- server = window?.location?.hostname,
23
- ...props
24
- }) => {
25
-
26
- const isLocalhost=LOCALHOST.includes(server);
27
-
28
- const [isEditorActivo, setEditorActivo] = useState(false);
29
- const gridCols = GRID_SIZES[size].cols;
30
- const gridRows = GRID_SIZES[size].rows;
31
- return (
32
- <div className="visualizador-container">
33
- {isLocalhost && (
34
- <ButtonEditor
35
- activo={isEditorActivo}
36
- onClick={() => setEditorActivo((prev) => !prev)}
37
- />
38
- )}
39
-
40
- <div
41
- className="visualizador-grid-css"
42
- style={{
43
- maxWidth: `${ancho}vw`,
44
- height: `${alto}vh`,
45
- gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
46
- gridTemplateRows: `repeat(${gridRows}, 1fr)`,
47
- }}
48
- {...props}
49
- >
50
- {isEditorActivo && (
51
- <EditorLayer gridCols={gridCols} gridRows={gridRows} />
52
- )}
53
- {slots.map((slot) => {
54
- const { x, y, w, h, legend } = slot;
55
- return <SlotWrapper {...slot} legend={legend} key={slot.slot} />;
56
- })}
57
- </div>
58
- </div>
59
- );
60
- };
61
-
62
- export { ViewLayout };
@@ -1,20 +0,0 @@
1
- export interface ItemSlot {
2
- slot: number;
3
- component: React.ReactElement;
4
- x: number;
5
- y: number;
6
- w?: number;
7
- h?: number;
8
- align?: 'start' | 'center' | 'end' | 'stretch';
9
- contentSize?: 'small' | 'medium' | 'large';
10
- direction?: 'row' | 'column';
11
- justify?:
12
- | 'start'
13
- | 'center'
14
- | 'end'
15
- | 'space-between'
16
- | 'space-around'
17
- | 'space-evenly';
18
- legend?: string;
19
- showBorder?: boolean;
20
- }
@@ -1,44 +0,0 @@
1
- import React, { FC } from 'react';
2
- import { ItemSlot } from './item-slot';
3
-
4
- const SlotWrapper: FC<ItemSlot> = ({
5
- slot = 1,
6
- component = null,
7
- x = 0,
8
- y = 0,
9
- w = 2,
10
- h = 2,
11
- align = 'stretch',
12
- contentSize = 'medium',
13
- direction = 'column',
14
- justify = 'flex-start',
15
- legend,
16
- showBorder = false,
17
- }) => {
18
- return (
19
- <fieldset
20
- key={slot}
21
- className={
22
- `visualizador-slot ` +
23
- `visualizador-slot-content--${contentSize} ` +
24
- `visualizador-slot--${direction} ` +
25
- `visualizador-slot-align--${align} ` +
26
- `visualizador-slot-justify--${justify} ` +
27
- (!showBorder ? 'visualizador-slot--no-border' : '')
28
- }
29
- style={{
30
- position: 'relative',
31
- gridColumn: `${x + 1} / span ${w}`,
32
- gridRow: `${y + 1} / span ${h}`,
33
- display: 'flex',
34
- overflow: 'hidden',
35
- border: showBorder ? undefined : 'none',
36
- }}
37
- >
38
- <legend className="slot-legend">{legend}</legend>
39
- <div className="slot-content">{component}</div>
40
- </fieldset>
41
- );
42
- };
43
-
44
- export default SlotWrapper;
@@ -1,143 +0,0 @@
1
- // Container
2
- .visualizador-container {
3
- position: relative;
4
- }
5
-
6
- // Grid
7
- .visualizador-grid,
8
- .visualizador-grid-css {
9
- width: 100%;
10
- height: 100%;
11
- min-width: 90vh;
12
- min-height: 80vh;
13
- background: #ffffff;
14
- border-radius: 12px;
15
- display: grid;
16
- border: solid 2px #900604;
17
- position: relative;
18
- gap: 1px;
19
- box-sizing: content-box;
20
- }
21
-
22
- // Slot
23
- .visualizador-slot {
24
- display: flex;
25
- border: 1px solid #900604;
26
- border-radius: 7px;
27
- background: #fff;
28
-
29
- // Direction
30
- &--row,
31
- &-row {
32
- flex-direction: row;
33
- }
34
- &--column,
35
- &-column,
36
- &-column-col {
37
- flex-direction: column;
38
- }
39
-
40
- // Content size
41
- &-content--small {
42
- font-size: 0.85rem;
43
- }
44
- &-content--medium {
45
- font-size: 1rem;
46
- }
47
- &-content--large {
48
- font-size: 1.5rem;
49
- }
50
-
51
- // Alignment
52
- &-align--start {
53
- align-items: flex-start;
54
- }
55
- &-align--center {
56
- align-items: center;
57
- }
58
- &-align--end {
59
- align-items: flex-end;
60
- }
61
- &-align--stretch {
62
- align-items: stretch;
63
- }
64
-
65
- // Justification
66
- &-justify--start {
67
- justify-content: flex-start;
68
- }
69
- &-justify--center {
70
- justify-content: center;
71
- }
72
- &-justify--end {
73
- justify-content: flex-end;
74
- }
75
- &-justify--space-between {
76
- justify-content: space-between;
77
- }
78
- &-justify--space-around {
79
- justify-content: space-around;
80
- }
81
- &-justify--space-evenly {
82
- justify-content: space-evenly;
83
- }
84
- &--no-border {
85
- border: none !important;
86
- }
87
- }
88
-
89
- // Legend
90
- .slot-legend {
91
- width: auto;
92
- font-size: 0.75rem;
93
- margin-bottom: 0px !important;
94
- margin-left: -20px !important;
95
- font-weight: 700;
96
- color: #900604;
97
- white-space: nowrap;
98
- }
99
-
100
- // Editor Layer
101
- .editor-layer {
102
- position: absolute;
103
- width: 100%;
104
- height: 100%;
105
- pointer-events: none;
106
- z-index: 20;
107
- display: grid;
108
- }
109
- .editor-layer-cell-coord {
110
- font-size: 0.75rem;
111
- justify-self: center;
112
- }
113
- .editor-layer-cell {
114
- font-size: 0.7em;
115
- color: #797979;
116
- align-content: center;
117
- padding: 2px;
118
- text-align: left;
119
- pointer-events: none;
120
- box-sizing: border-box;
121
- border: 1px dashed #bbb;
122
- }
123
-
124
- // Editor Button
125
- .visualizador-editor-btn {
126
- position: absolute;
127
- top: 8px;
128
- right: 8px;
129
- z-index: 100;
130
- padding: 6px 12px;
131
- font-size: 1em;
132
- color: #fff;
133
- border: none;
134
- border-radius: 4px;
135
- cursor: pointer;
136
-
137
- &--activo {
138
- background: #900604;
139
- }
140
- &--inactivo {
141
- background: #bbb;
142
- }
143
- }
@@ -1,2 +0,0 @@
1
- export const ALERT_TIMEOUT = 5; //5 MINUTOS (alerta de tiempo restante)
2
- export const SESSION_TIMEOUT = 30; //30 MINUTOS
@@ -1,17 +0,0 @@
1
- import { WherebyProvider } from '@whereby.com/browser-sdk/react';
2
- import '@whereby.com/browser-sdk/embed';
3
- import Room from './room';
4
-
5
- export const WhereByRoom = ({ src, onEvent, onActions, iframeClass }) => {
6
- return (
7
- <WherebyProvider>
8
- <Room
9
- src={src}
10
- onEvent={onEvent}
11
- onActions={onActions}
12
- iframeClass={iframeClass}
13
- />
14
- </WherebyProvider>
15
- );
16
- };
17
- export default WhereByRoom;
@@ -1,79 +0,0 @@
1
- import { useEffect, useRef } from 'react';
2
- import '@whereby.com/browser-sdk/embed';
3
-
4
- export const Room = ({ src, onEvent, onActions, iframeClass }) => {
5
- const wherebyRef = useRef(null);
6
-
7
- useEffect(() => {
8
- const elm = wherebyRef.current;
9
- if (!elm) return;
10
-
11
- if (onActions) {
12
- onActions({
13
- endMeeting: () => elm.endMeeting(),
14
- knock: () => elm.knock(),
15
- cancelKnock: () => elm.cancelKnock(),
16
- leaveRoom: () => elm.leaveRoom(),
17
- startRecording: () => elm.startRecording(),
18
- stopRecording: () => elm.stopRecording(),
19
- startStreaming: () => elm.startStreaming(),
20
- stopStreaming: () => elm.stopStreaming(),
21
- startLiveTranscription: () => elm.startLiveTranscription(),
22
- stopLiveTranscription: () => elm.stopLiveTranscription(),
23
- toggleCamera: (enabled) => elm.toggleCamera(enabled),
24
- toggleMicrophone: (enabled) => elm.toggleMicrophone(enabled),
25
- toggleScreenshare: (enabled) => elm.toggleScreenshare(enabled),
26
- toggleChat: (enabled) => elm.toggleChat(enabled),
27
- });
28
- }
29
-
30
- const events = [
31
- 'ready',
32
- 'grant_device_permission',
33
- 'deny_device_permission',
34
- 'precall_check_completed',
35
- 'precall_check_skipped',
36
- 'knock',
37
- 'cancel_knock',
38
- 'join',
39
- 'leave',
40
- 'meeting_end',
41
- 'participantupdate',
42
- 'participant_join',
43
- 'participant_leave',
44
- 'microphone_toggle',
45
- 'camera_toggle',
46
- 'screenshare_toggle',
47
- 'chat_toggle',
48
- 'people_toggle',
49
- 'pip_toggle',
50
- 'streaming_status_change',
51
- 'recording_status_change',
52
- 'transcription_status_change',
53
- 'connection_status_change',
54
- ];
55
- function handleEvent(e) {
56
- if (onEvent) onEvent(e.type, e.detail);
57
- }
58
- events.forEach((ev) => elm.addEventListener(ev, handleEvent));
59
- return () => {
60
- events.forEach((ev) => elm.removeEventListener(ev, handleEvent));
61
- };
62
- }, [onEvent, onActions]);
63
-
64
- return (
65
- <div className={iframeClass}>
66
- <whereby-embed
67
- ref={wherebyRef}
68
- class={iframeClass}
69
- room={src}
70
- chat="on"
71
- screenshare="on"
72
- audio="on"
73
- video="on"
74
- allow="camera; microphone; fullscreen"
75
- />
76
- </div>
77
- );
78
- };
79
- export default Room;
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es6",
4
- "lib": ["dom", "dom.iterable", "esnext"],
5
- "allowJs": true,
6
- "esModuleInterop": true,
7
- "skipLibCheck": true,
8
- "strict": true,
9
- "forceConsistentCasingInFileNames": true,
10
- "module": "commonjs",
11
- "moduleResolution": "node",
12
- "noImplicitReturns": true,
13
- "resolveJsonModule": true,
14
- "isolatedModules": true,
15
- "noEmit": true,
16
- "jsx": "preserve"
17
- },
18
- "include": ["src", "index.d.ts"]
19
- }
package/vite.config.ts DELETED
@@ -1,22 +0,0 @@
1
- import react from '@vitejs/plugin-react';
2
- import { defineConfig } from 'vitest/config';
3
- import commonjs from 'vite-plugin-commonjs';
4
-
5
- export default defineConfig({
6
- define: {
7
- 'process.env': {},
8
- },
9
- plugins: [react(), commonjs()],
10
- server: {
11
- port: 5173,
12
- open: true,
13
- hmr: true,
14
- },
15
- css: {
16
- preprocessorOptions: {
17
- scss: {
18
- silenceDeprecations: ['legacy-js-api'],
19
- },
20
- },
21
- },
22
- });