sveltekit-ui 1.1.16 → 1.1.17

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 (156) hide show
  1. package/package.json +1 -1
  2. package/dist/Components/ArrowToggle/index.svelte +0 -62
  3. package/dist/Components/Attachment/index.svelte +0 -77
  4. package/dist/Components/Attachment/index.svelte.js +0 -119
  5. package/dist/Components/AudioEditor/index.svelte +0 -252
  6. package/dist/Components/AudioEditor/index.svelte.js +0 -977
  7. package/dist/Components/AudioEditor/samples/alloy-voice-sample.mp3 +0 -0
  8. package/dist/Components/AudioEditor/samples/echo-voice-sample.mp3 +0 -0
  9. package/dist/Components/AudioEditor/samples/fable-voice-sample.mp3 +0 -0
  10. package/dist/Components/AudioEditor/samples/nova-voice-sample.mp3 +0 -0
  11. package/dist/Components/AudioEditor/samples/onyx-voice-sample.mp3 +0 -0
  12. package/dist/Components/AudioEditor/samples/shimmer-voice-sample.mp3 +0 -0
  13. package/dist/Components/Breadcrumbs/index.svelte +0 -27
  14. package/dist/Components/Breadcrumbs/index.svelte.js +0 -88
  15. package/dist/Components/Chart/Klines/index.svelte +0 -87
  16. package/dist/Components/Chart/index.svelte +0 -226
  17. package/dist/Components/Chart/index.svelte.js +0 -1090
  18. package/dist/Components/ChartInput/DisplayNav/Klines/index.svelte +0 -150
  19. package/dist/Components/ChartInput/DisplayNav/Lines/index.svelte +0 -45
  20. package/dist/Components/ChartInput/DisplayNav/index.svelte +0 -297
  21. package/dist/Components/ChartInput/EditPanel/index.svelte +0 -155
  22. package/dist/Components/ChartInput/index.svelte +0 -21
  23. package/dist/Components/ChartInput/index.svelte.js +0 -671
  24. package/dist/Components/Color/index.svelte +0 -51
  25. package/dist/Components/Color/index.svelte.js +0 -31
  26. package/dist/Components/ColorInput/ChromaPicker/index.svelte +0 -50
  27. package/dist/Components/ColorInput/ColorPalette/index.svelte +0 -62
  28. package/dist/Components/ColorInput/OpacityPicker/index.svelte +0 -68
  29. package/dist/Components/ColorInput/ShowcasePicker/index.svelte +0 -136
  30. package/dist/Components/ColorInput/index.svelte +0 -70
  31. package/dist/Components/ColorInput/index.svelte.js +0 -386
  32. package/dist/Components/ConditionsInput/index.svelte +0 -46
  33. package/dist/Components/ConditionsInput/index.svelte.js +0 -201
  34. package/dist/Components/Confetti/index.svelte +0 -98
  35. package/dist/Components/Confetti/index.svelte.js +0 -94
  36. package/dist/Components/Content/index.svelte +0 -500
  37. package/dist/Components/Content/index.svelte.js +0 -910
  38. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Audio/index.svelte +0 -31
  39. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Audio/index.svelte.js +0 -258
  40. package/dist/Components/ContentInput/AttributesInput/CustomConfig/AudioAdvanced/index.svelte +0 -31
  41. package/dist/Components/ContentInput/AttributesInput/CustomConfig/AudioAdvanced/index.svelte.js +0 -258
  42. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Dropdown/index.svelte +0 -58
  43. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Dropdown/index.svelte.js +0 -206
  44. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Image/index.svelte +0 -28
  45. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Image/index.svelte.js +0 -224
  46. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Number/index.svelte +0 -44
  47. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Number/index.svelte.js +0 -272
  48. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Qr/index.svelte +0 -41
  49. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Qr/index.svelte.js +0 -202
  50. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Slider/index.svelte +0 -19
  51. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Slider/index.svelte.js +0 -117
  52. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TableAdvanced/index.svelte +0 -60
  53. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TableAdvanced/index.svelte.js +0 -542
  54. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Tag/index.svelte +0 -47
  55. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Tag/index.svelte.js +0 -185
  56. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TextInput/index.svelte +0 -35
  57. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TextInput/index.svelte.js +0 -222
  58. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TimeInput/index.svelte +0 -20
  59. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TimeInput/index.svelte.js +0 -84
  60. package/dist/Components/ContentInput/AttributesInput/DefinedTypeInput/index.svelte +0 -25
  61. package/dist/Components/ContentInput/AttributesInput/DefinedTypeInput/index.svelte.js +0 -91
  62. package/dist/Components/ContentInput/AttributesInput/index.svelte +0 -352
  63. package/dist/Components/ContentInput/AttributesInput/index.svelte.js +0 -1436
  64. package/dist/Components/ContentInput/ContentPanelBuilder/AddElement/index.svelte +0 -64
  65. package/dist/Components/ContentInput/ContentPanelBuilder/AddElement/index.svelte.js +0 -97
  66. package/dist/Components/ContentInput/ContentPanelBuilder/ElementList/index.svelte +0 -184
  67. package/dist/Components/ContentInput/ContentPanelBuilder/index.svelte +0 -41
  68. package/dist/Components/ContentInput/index.svelte +0 -78
  69. package/dist/Components/ContentInput/index.svelte.js +0 -1197
  70. package/dist/Components/CronInput/index.svelte +0 -78
  71. package/dist/Components/CronInput/index.svelte.js +0 -198
  72. package/dist/Components/DataTypeInput/index.svelte +0 -174
  73. package/dist/Components/DataTypeInput/index.svelte.js +0 -565
  74. package/dist/Components/Dropdown/index.svelte +0 -116
  75. package/dist/Components/Dropdown/index.svelte.js +0 -403
  76. package/dist/Components/ErrorX/index.svelte +0 -58
  77. package/dist/Components/FileInput/index.svelte +0 -146
  78. package/dist/Components/FileInput/index.svelte.js +0 -225
  79. package/dist/Components/Hamburger/index.svelte +0 -99
  80. package/dist/Components/HorizScrollBox/index.svelte +0 -145
  81. package/dist/Components/IconInput/index.svelte +0 -77
  82. package/dist/Components/IconInput/index.svelte.js +0 -259
  83. package/dist/Components/Image/index.svelte +0 -126
  84. package/dist/Components/Image/index.svelte.js +0 -116
  85. package/dist/Components/ImageEditor/Image/CropBox/index.svelte +0 -165
  86. package/dist/Components/ImageEditor/Image/index.svelte +0 -104
  87. package/dist/Components/ImageEditor/Panels/AI/index.svelte +0 -44
  88. package/dist/Components/ImageEditor/Panels/Crop/index.svelte +0 -96
  89. package/dist/Components/ImageEditor/Panels/File/QualityPicker/index.svelte +0 -124
  90. package/dist/Components/ImageEditor/Panels/File/index.svelte +0 -74
  91. package/dist/Components/ImageEditor/Panels/Filters/index.svelte +0 -46
  92. package/dist/Components/ImageEditor/Panels/Resize/index.svelte +0 -58
  93. package/dist/Components/ImageEditor/index.svelte +0 -93
  94. package/dist/Components/ImageEditor/index.svelte.js +0 -1961
  95. package/dist/Components/ImageSlider/index.svelte +0 -124
  96. package/dist/Components/ImageSlider/index.svelte.js +0 -99
  97. package/dist/Components/Json/Nested/index.svelte +0 -157
  98. package/dist/Components/LabeledItem/index.svelte +0 -102
  99. package/dist/Components/Layout/NavBar/FullNav/index.svelte +0 -52
  100. package/dist/Components/Layout/NavBar/NavGuts/index.svelte +0 -87
  101. package/dist/Components/Layout/NavBar/index.svelte +0 -72
  102. package/dist/Components/Layout/index.svelte +0 -149
  103. package/dist/Components/Layout/index.svelte.js +0 -360
  104. package/dist/Components/LoadingWheel/index.svelte +0 -38
  105. package/dist/Components/LocationInput/index.svelte +0 -197
  106. package/dist/Components/LocationInput/index.svelte.js +0 -965
  107. package/dist/Components/Number/index.svelte +0 -47
  108. package/dist/Components/Number/index.svelte.js +0 -151
  109. package/dist/Components/PhoneCountryCode/index.svelte +0 -7
  110. package/dist/Components/PhoneCountryCode/index.svelte.js +0 -260
  111. package/dist/Components/Popover/index.svelte +0 -396
  112. package/dist/Components/Popover/index.svelte.js +0 -319
  113. package/dist/Components/Spacer/index.svelte +0 -41
  114. package/dist/Components/StoragePicker/DisplayFile/index.svelte +0 -15
  115. package/dist/Components/StoragePicker/index.svelte +0 -187
  116. package/dist/Components/StoragePicker/index.svelte.js +0 -592
  117. package/dist/Components/TableAdvanced/ColumnInput/index.svelte +0 -117
  118. package/dist/Components/TableAdvanced/ColumnInput/index.svelte.js +0 -456
  119. package/dist/Components/TableAdvanced/FilterInput/index.svelte +0 -54
  120. package/dist/Components/TableAdvanced/FilterInput/index.svelte.js +0 -247
  121. package/dist/Components/TableAdvanced/Pagination/index.svelte +0 -43
  122. package/dist/Components/TableAdvanced/Pagination/index.svelte.js +0 -97
  123. package/dist/Components/TableAdvanced/SortByInput/index.svelte +0 -72
  124. package/dist/Components/TableAdvanced/SortByInput/index.svelte.js +0 -176
  125. package/dist/Components/Tag/index.svelte +0 -45
  126. package/dist/Components/Tag/index.svelte.js +0 -76
  127. package/dist/Components/TextArrayInput/index.svelte +0 -108
  128. package/dist/Components/TextArrayInput/index.svelte.js +0 -239
  129. package/dist/Components/TextInput/PasswordTooltip/index.svelte +0 -89
  130. package/dist/Components/TimeInput/NumberToggler/index.svelte +0 -34
  131. package/dist/Components/TimeInput/NumberToggler/index.svelte.js +0 -79
  132. package/dist/Components/TimeInput/index.js +0 -702
  133. package/dist/Components/TimeInput/index.svelte +0 -211
  134. package/dist/Components/TimeInput/index.svelte.js +0 -638
  135. package/dist/Components/Tooltip/index.svelte +0 -143
  136. package/dist/Components/TransparentBackground/index.svelte +0 -153
  137. package/dist/Components/TypingDots/index.svelte +0 -84
  138. package/dist/Components/VariablePathInput/index.svelte +0 -63
  139. package/dist/Components/VariablePathInput/index.svelte.js +0 -273
  140. package/dist/Components/XFollow/index.svelte +0 -42
  141. package/dist/Components/YoutubeChannelButton/index.svelte +0 -82
  142. package/dist/Components/YoutubeVideo/index.svelte +0 -73
  143. package/dist/Components/YoutubeVideo/index.svelte.js +0 -54
  144. package/dist/actions/draggable.js +0 -49
  145. package/dist/actions/index.js +0 -24
  146. package/dist/actions/no_spaces.js +0 -33
  147. package/dist/actions/numbers_only.js +0 -26
  148. package/dist/actions/scroll_y.js +0 -28
  149. package/dist/actions/stop_scroll_propagation_y.js +0 -42
  150. package/dist/actions/swipe_handler.js +0 -295
  151. package/dist/client/astc_formatting/index.js +0 -1128
  152. package/dist/client/docs/index.js +0 -7622
  153. package/dist/client/index.js +0 -735
  154. package/dist/client/types/index.js +0 -2812
  155. package/dist/index.js +0 -180
  156. package/dist/style.css +0 -682
@@ -1,31 +0,0 @@
1
- <script>
2
- import StoragePicker from "../../../../StoragePicker/index.svelte"
3
- import TextInput from "../../../../TextInput/index.svelte"
4
- import Checkbox from "../../../../Checkbox/index.svelte"
5
- import Dropdown from "../../../../Dropdown/index.svelte"
6
-
7
- let { manager } = $props()
8
- </script>
9
-
10
- <Dropdown manager={manager?.ui_type_dropdown_manager} />
11
- <StoragePicker manager={manager?.audio_storage_picker_manager} />
12
- <TextInput manager={manager?.storage_id_text_input_manager} />
13
- <p style="font-size: 1.2rem;">
14
- if only storage_id is provided the src values can be autogenerated at time of page load. Also, if the storage_id is
15
- not public signed url can be generated and used for src values on page load
16
- </p>
17
- <Checkbox manager={manager?.is_storage_id_public_checkbox_manager} />
18
- <TextInput manager={manager?.src_text_input_manager} />
19
- <TextInput manager={manager?.mime_type_text_input_manager} />
20
- <TextInput manager={manager?.title_text_input_manager} />
21
- <TextInput manager={manager?.album_text_input_manager} />
22
- <TextInput manager={manager?.artist_text_input_manager} />
23
- <StoragePicker manager={manager?.image_storage_picker_manager} />
24
- <TextInput manager={manager?.image_storage_id_text_input_manager} />
25
- <Checkbox manager={manager?.image_is_storage_id_public_checkbox_manager} />
26
- <TextInput manager={manager?.image_src_text_input_manager} />
27
- <TextInput manager={manager?.image_src_quick_text_input_manager} />
28
- <TextInput manager={manager?.image_mime_type_text_input_manager} />
29
- <TextInput manager={manager?.image_width_text_input_manager} />
30
- <TextInput manager={manager?.image_height_text_input_manager} />
31
- <TextInput manager={manager?.image_aspect_ratio_text_input_manager} />
@@ -1,258 +0,0 @@
1
- import { create_storage_picker_manager } from "../../../../StoragePicker/index.svelte.js"
2
- import { create_text_input_manager } from "../../../../TextInput/index.svelte.js"
3
- import { create_checkbox_manager } from "../../../../Checkbox/index.svelte.js"
4
- import { create_dropdown_manager } from "../../../../Dropdown/index.svelte.js"
5
- import { set_closurable, get_image_dimensions_from_src } from "../../../../../client/index.js"
6
-
7
- export function create_audio_config_manager(config) {
8
- let ui_type_dropdown_manager = $state(null)
9
- let audio_storage_picker_manager = $state(null)
10
- let storage_id_text_input_manager = $state(null)
11
- let is_storage_id_public_checkbox_manager = $state(null)
12
- let src_text_input_manager = $state(null)
13
- let mime_type_text_input_manager = $state(null)
14
- let title_text_input_manager = $state(null)
15
- let album_text_input_manager = $state(null)
16
- let artist_text_input_manager = $state(null)
17
- let image_storage_picker_manager = $state(null)
18
- let image_storage_id_text_input_manager = $state(null)
19
- let image_is_storage_id_public_checkbox_manager = $state(null)
20
- let image_src_text_input_manager = $state(null)
21
- let image_src_quick_text_input_manager = $state(null)
22
- let image_mime_type_text_input_manager = $state(null)
23
- let image_width_text_input_manager = $state(null)
24
- let image_height_text_input_manager = $state(null)
25
- let image_aspect_ratio_text_input_manager = $state(null)
26
-
27
- let storage_src = $derived(
28
- set_closurable(config?.storage_src, "https://www.contibase.com/api/v1/storage/{storage_id}")
29
- )
30
-
31
- let val = $derived({
32
- ui_type: ui_type_dropdown_manager?.val,
33
- storage_id: storage_id_text_input_manager?.val,
34
- is_storage_id_public: is_storage_id_public_checkbox_manager?.val,
35
- src: src_text_input_manager?.val,
36
- mime_type: mime_type_text_input_manager?.val,
37
- title: title_text_input_manager?.val,
38
- album: album_text_input_manager?.val,
39
- artist: artist_text_input_manager?.val,
40
- image_storage_id: image_storage_id_text_input_manager?.val,
41
- image_is_storage_id_public: image_is_storage_id_public_checkbox_manager?.val,
42
- image_src: image_src_text_input_manager?.val,
43
- image_src_quick: image_src_quick_text_input_manager?.val,
44
- image_mime_type: image_mime_type_text_input_manager?.val,
45
- image_width: image_width_text_input_manager?.val,
46
- image_height: image_height_text_input_manager?.val,
47
- image_aspect_ratio: image_aspect_ratio_text_input_manager?.val,
48
- })
49
-
50
- function set_val(input) {
51
- ui_type_dropdown_manager.set_val(input?.ui_type ?? null)
52
- storage_id_text_input_manager.set_val(input?.storage_id ?? null)
53
- is_storage_id_public_checkbox_manager.set_val(input?.is_storage_id_public ?? null)
54
- src_text_input_manager.set_val(input?.src ?? null)
55
- mime_type_text_input_manager.set_val(input?.mime_type ?? null)
56
- title_text_input_manager.set_val(input?.title ?? null)
57
- album_text_input_manager.set_val(input?.album ?? null)
58
- artist_text_input_manager.set_val(input?.artist ?? null)
59
- image_storage_id_text_input_manager.set_val(input?.image_storage_id ?? null)
60
- image_is_storage_id_public_checkbox_manager.set_val(input?.image_storage_id_is_public ?? null)
61
- image_src_text_input_manager.set_val(input?.image_src ?? null)
62
- image_src_quick_text_input_manager.set_val(input?.image_src_quick ?? null)
63
- image_mime_type_text_input_manager.set_val(input?.image_mime_type ?? null)
64
- image_width_text_input_manager.set_val(input?.image_width ?? null)
65
- image_height_text_input_manager.set_val(input?.image_height ?? null)
66
- image_aspect_ratio_text_input_manager.set_val(input?.image_aspect_ratio ?? null)
67
- }
68
-
69
- function init(config) {
70
- console.log("init_image_conf", config)
71
- ui_type_dropdown_manager = create_dropdown_manager({
72
- label: "UI Type",
73
- is_button_compressed: true,
74
- options: [
75
- { key: "standard", name: "Standard" },
76
- { key: "short", name: "Short" },
77
- { key: "square", name: "Square" },
78
- ],
79
- val: config?.val?.ui_type,
80
- })
81
- audio_storage_picker_manager = create_storage_picker_manager({
82
- storage: config?.storage,
83
- default_folder_path: config?.storage_default_folder_path,
84
- storage_path: config?.storage_path,
85
- storage_origins: ["storage"],
86
- is_drop_zone: false,
87
- accept: ["audio/mpeg"],
88
- is_multiselect: false,
89
- on_finish: async (input) => {
90
- const src = storage_src.replace("{storage_id}", input?.id)
91
- storage_id_text_input_manager.set_val(input?.id ?? null)
92
- is_storage_id_public_checkbox_manager.set_val(input?.is_public ?? null)
93
- src_text_input_manager.set_val(null)
94
- mime_type_text_input_manager.set_val(input?.mime_type ?? null)
95
- },
96
- })
97
- title_text_input_manager = create_text_input_manager({
98
- label: "Title",
99
- placeholder: "title",
100
- val: config?.val?.title,
101
- })
102
- album_text_input_manager = create_text_input_manager({
103
- label: "Album",
104
- placeholder: "album",
105
- val: config?.val?.album,
106
- })
107
- artist_text_input_manager = create_text_input_manager({
108
- label: "Artist",
109
- placeholder: "artist",
110
- val: config?.val?.artist,
111
- })
112
- storage_id_text_input_manager = create_text_input_manager({
113
- label: "Storage ID",
114
- placeholder: "storage_id",
115
- val: config?.val?.storage_id,
116
- })
117
- is_storage_id_public_checkbox_manager = create_checkbox_manager({
118
- type: "toggle",
119
- label: "Is Public",
120
- val: config?.val?.is_storage_id_public,
121
- })
122
- src_text_input_manager = create_text_input_manager({
123
- label: "src",
124
- placeholder: "src",
125
- val: config?.val?.src,
126
- })
127
- mime_type_text_input_manager = create_text_input_manager({
128
- label: "Mime Type",
129
- placeholder: "mime_type",
130
- val: config?.val?.mime_type,
131
- })
132
- image_storage_picker_manager = create_storage_picker_manager({
133
- storage: config?.storage,
134
- default_folder_path: config?.storage_default_folder_path,
135
- storage_path: config?.storage_path,
136
- storage_origins: ["storage"],
137
- is_drop_zone: false,
138
- accept: ["image/png", "image/jpeg", "image/webp", "image/gif"],
139
- is_multiselect: false,
140
- on_finish: async (input) => {
141
- const src = storage_src.replace("{storage_id}", input?.id)
142
- const dimensions = await get_image_dimensions_from_src(src)
143
- image_storage_id_text_input_manager.set_val(input?.id ?? null)
144
- image_mime_type_text_input_manager.set_val(input?.mime_type ?? null)
145
- image_is_storage_id_public_checkbox_manager.set_val(input?.is_public ?? null)
146
- image_width_text_input_manager.set_val(dimensions?.width ?? null)
147
- image_height_text_input_manager.set_val(dimensions?.height ?? null)
148
- image_aspect_ratio_text_input_manager.set_val(dimensions?.aspect_ratio ?? null)
149
- },
150
- })
151
- image_storage_id_text_input_manager = create_text_input_manager({
152
- label: "Image Storage ID",
153
- placeholder: "image_storage_id",
154
- val: config?.val?.image_storage_id,
155
- })
156
- image_mime_type_text_input_manager = create_text_input_manager({
157
- label: "Image Mime Type",
158
- placeholder: "image_mime_type",
159
- val: config?.val?.mime_type,
160
- })
161
- image_is_storage_id_public_checkbox_manager = create_checkbox_manager({
162
- type: "toggle",
163
- label: "Is Image Public",
164
- val: config?.val?.image_is_storage_id_public,
165
- })
166
- image_src_text_input_manager = create_text_input_manager({
167
- label: "Image src",
168
- placeholder: "image_src",
169
- val: config?.val?.image_src,
170
- })
171
- image_src_quick_text_input_manager = create_text_input_manager({
172
- label: "image src quick (low quality placeholder image)",
173
- placeholder: "src_quick",
174
- val: config?.val?.image_src_quick,
175
- })
176
- image_width_text_input_manager = create_text_input_manager({
177
- type: "number",
178
- label: "Width",
179
- placeholder: "width",
180
- val: config?.val?.image_width,
181
- })
182
- image_height_text_input_manager = create_text_input_manager({
183
- type: "number",
184
- label: "Height",
185
- placeholder: "height",
186
- val: config?.val?.image_height,
187
- })
188
- image_aspect_ratio_text_input_manager = create_text_input_manager({
189
- type: "number",
190
- label: "Aspect Ratio",
191
- placeholder: "aspect ratio",
192
- val: config?.val?.image_aspect_ratio,
193
- })
194
- }
195
-
196
- init(config)
197
-
198
- return {
199
- get val() {
200
- return val
201
- },
202
- get ui_type_dropdown_manager() {
203
- return ui_type_dropdown_manager
204
- },
205
- get audio_storage_picker_manager() {
206
- return audio_storage_picker_manager
207
- },
208
- get storage_id_text_input_manager() {
209
- return storage_id_text_input_manager
210
- },
211
- get is_storage_id_public_checkbox_manager() {
212
- return is_storage_id_public_checkbox_manager
213
- },
214
- get src_text_input_manager() {
215
- return src_text_input_manager
216
- },
217
- get mime_type_text_input_manager() {
218
- return mime_type_text_input_manager
219
- },
220
- get title_text_input_manager() {
221
- return title_text_input_manager
222
- },
223
- get album_text_input_manager() {
224
- return album_text_input_manager
225
- },
226
- get artist_text_input_manager() {
227
- return artist_text_input_manager
228
- },
229
- get image_storage_picker_manager() {
230
- return image_storage_picker_manager
231
- },
232
- get image_storage_id_text_input_manager() {
233
- return image_storage_id_text_input_manager
234
- },
235
- get image_is_storage_id_public_checkbox_manager() {
236
- return image_is_storage_id_public_checkbox_manager
237
- },
238
- get image_src_text_input_manager() {
239
- return image_src_text_input_manager
240
- },
241
- get image_src_quick_text_input_manager() {
242
- return image_src_quick_text_input_manager
243
- },
244
- get image_mime_type_text_input_manager() {
245
- return image_mime_type_text_input_manager
246
- },
247
- get image_width_text_input_manager() {
248
- return image_width_text_input_manager
249
- },
250
- get image_height_text_input_manager() {
251
- return image_height_text_input_manager
252
- },
253
- get image_aspect_ratio_text_input_manager() {
254
- return image_aspect_ratio_text_input_manager
255
- },
256
- set_val,
257
- }
258
- }
@@ -1,31 +0,0 @@
1
- <script>
2
- import StoragePicker from "../../../../StoragePicker/index.svelte"
3
- import TextInput from "../../../../TextInput/index.svelte"
4
- import Checkbox from "../../../../Checkbox/index.svelte"
5
- import Dropdown from "../../../../Dropdown/index.svelte"
6
-
7
- let { manager } = $props()
8
- </script>
9
-
10
- <Dropdown manager={manager?.ui_type_dropdown_manager} />
11
- <StoragePicker manager={manager?.audio_storage_picker_manager} />
12
- <TextInput manager={manager?.storage_id_text_input_manager} />
13
- <p style="font-size: 1.2rem;">
14
- if only storage_id is provided the src values can be autogenerated at time of page load. Also, if the storage_id is
15
- not public signed url can be generated and used for src values on page load
16
- </p>
17
- <Checkbox manager={manager?.is_storage_id_public_checkbox_manager} />
18
- <TextInput manager={manager?.src_text_input_manager} />
19
- <TextInput manager={manager?.mime_type_text_input_manager} />
20
- <TextInput manager={manager?.title_text_input_manager} />
21
- <TextInput manager={manager?.album_text_input_manager} />
22
- <TextInput manager={manager?.artist_text_input_manager} />
23
- <StoragePicker manager={manager?.image_storage_picker_manager} />
24
- <TextInput manager={manager?.image_storage_id_text_input_manager} />
25
- <Checkbox manager={manager?.image_is_storage_id_public_checkbox_manager} />
26
- <TextInput manager={manager?.image_src_text_input_manager} />
27
- <TextInput manager={manager?.image_src_quick_text_input_manager} />
28
- <TextInput manager={manager?.image_mime_type_text_input_manager} />
29
- <TextInput manager={manager?.image_width_text_input_manager} />
30
- <TextInput manager={manager?.image_height_text_input_manager} />
31
- <TextInput manager={manager?.image_aspect_ratio_text_input_manager} />
@@ -1,258 +0,0 @@
1
- import { create_storage_picker_manager } from "../../../../StoragePicker/index.svelte.js"
2
- import { create_text_input_manager } from "../../../../TextInput/index.svelte.js"
3
- import { create_checkbox_manager } from "../../../../Checkbox/index.svelte.js"
4
- import { create_dropdown_manager } from "../../../../Dropdown/index.svelte.js"
5
- import { set_closurable, get_image_dimensions_from_src } from "../../../../../client/index.js"
6
-
7
- export function create_audio_advanced_config_manager(config) {
8
- let ui_type_dropdown_manager = $state(null)
9
- let audio_storage_picker_manager = $state(null)
10
- let storage_id_text_input_manager = $state(null)
11
- let is_storage_id_public_checkbox_manager = $state(null)
12
- let src_text_input_manager = $state(null)
13
- let mime_type_text_input_manager = $state(null)
14
- let title_text_input_manager = $state(null)
15
- let album_text_input_manager = $state(null)
16
- let artist_text_input_manager = $state(null)
17
- let image_storage_picker_manager = $state(null)
18
- let image_storage_id_text_input_manager = $state(null)
19
- let image_is_storage_id_public_checkbox_manager = $state(null)
20
- let image_src_text_input_manager = $state(null)
21
- let image_src_quick_text_input_manager = $state(null)
22
- let image_mime_type_text_input_manager = $state(null)
23
- let image_width_text_input_manager = $state(null)
24
- let image_height_text_input_manager = $state(null)
25
- let image_aspect_ratio_text_input_manager = $state(null)
26
-
27
- let storage_src = $derived(
28
- set_closurable(config?.storage_src, "https://www.contibase.com/api/v1/storage/{storage_id}")
29
- )
30
-
31
- let val = $derived({
32
- ui_type: ui_type_dropdown_manager?.val,
33
- storage_id: storage_id_text_input_manager?.val,
34
- is_storage_id_public: is_storage_id_public_checkbox_manager?.val,
35
- src: src_text_input_manager?.val,
36
- mime_type: mime_type_text_input_manager?.val,
37
- title: title_text_input_manager?.val,
38
- album: album_text_input_manager?.val,
39
- artist: artist_text_input_manager?.val,
40
- image_storage_id: image_storage_id_text_input_manager?.val,
41
- image_is_storage_id_public: image_is_storage_id_public_checkbox_manager?.val,
42
- image_src: image_src_text_input_manager?.val,
43
- image_src_quick: image_src_quick_text_input_manager?.val,
44
- image_mime_type: image_mime_type_text_input_manager?.val,
45
- image_width: image_width_text_input_manager?.val,
46
- image_height: image_height_text_input_manager?.val,
47
- image_aspect_ratio: image_aspect_ratio_text_input_manager?.val,
48
- })
49
-
50
- function set_val(input) {
51
- ui_type_dropdown_manager.set_val(input?.ui_type ?? null)
52
- storage_id_text_input_manager.set_val(input?.storage_id ?? null)
53
- is_storage_id_public_checkbox_manager.set_val(input?.is_storage_id_public ?? null)
54
- src_text_input_manager.set_val(input?.src ?? null)
55
- mime_type_text_input_manager.set_val(input?.mime_type ?? null)
56
- title_text_input_manager.set_val(input?.title ?? null)
57
- album_text_input_manager.set_val(input?.album ?? null)
58
- artist_text_input_manager.set_val(input?.artist ?? null)
59
- image_storage_id_text_input_manager.set_val(input?.image_storage_id ?? null)
60
- image_is_storage_id_public_checkbox_manager.set_val(input?.image_storage_id_is_public ?? null)
61
- image_src_text_input_manager.set_val(input?.image_src ?? null)
62
- image_src_quick_text_input_manager.set_val(input?.image_src_quick ?? null)
63
- image_mime_type_text_input_manager.set_val(input?.image_mime_type ?? null)
64
- image_width_text_input_manager.set_val(input?.image_width ?? null)
65
- image_height_text_input_manager.set_val(input?.image_height ?? null)
66
- image_aspect_ratio_text_input_manager.set_val(input?.image_aspect_ratio ?? null)
67
- }
68
-
69
- function init(config) {
70
- console.log("init_image_conf", config)
71
- ui_type_dropdown_manager = create_dropdown_manager({
72
- label: "UI Type",
73
- is_button_compressed: true,
74
- options: [
75
- { key: "standard", name: "Standard" },
76
- { key: "short", name: "Short" },
77
- { key: "square", name: "Square" },
78
- ],
79
- val: config?.val?.ui_type,
80
- })
81
- audio_storage_picker_manager = create_storage_picker_manager({
82
- storage: config?.storage,
83
- default_folder_path: config?.storage_default_folder_path,
84
- storage_path: config?.storage_path,
85
- storage_origins: ["storage"],
86
- is_drop_zone: false,
87
- accept: ["audio/mpeg"],
88
- is_multiselect: false,
89
- on_finish: async (input) => {
90
- const src = storage_src.replace("{storage_id}", input?.id)
91
- storage_id_text_input_manager.set_val(input?.id ?? null)
92
- is_storage_id_public_checkbox_manager.set_val(input?.is_public ?? null)
93
- src_text_input_manager.set_val(null)
94
- mime_type_text_input_manager.set_val(input?.mime_type ?? null)
95
- },
96
- })
97
- title_text_input_manager = create_text_input_manager({
98
- label: "Title",
99
- placeholder: "title",
100
- val: config?.val?.title,
101
- })
102
- album_text_input_manager = create_text_input_manager({
103
- label: "Album",
104
- placeholder: "album",
105
- val: config?.val?.album,
106
- })
107
- artist_text_input_manager = create_text_input_manager({
108
- label: "Artist",
109
- placeholder: "artist",
110
- val: config?.val?.artist,
111
- })
112
- storage_id_text_input_manager = create_text_input_manager({
113
- label: "Storage ID",
114
- placeholder: "storage_id",
115
- val: config?.val?.storage_id,
116
- })
117
- is_storage_id_public_checkbox_manager = create_checkbox_manager({
118
- type: "toggle",
119
- label: "Is Public",
120
- val: config?.val?.is_storage_id_public,
121
- })
122
- src_text_input_manager = create_text_input_manager({
123
- label: "src",
124
- placeholder: "src",
125
- val: config?.val?.src,
126
- })
127
- mime_type_text_input_manager = create_text_input_manager({
128
- label: "Mime Type",
129
- placeholder: "mime_type",
130
- val: config?.val?.mime_type,
131
- })
132
- image_storage_picker_manager = create_storage_picker_manager({
133
- storage: config?.storage,
134
- default_folder_path: config?.storage_default_folder_path,
135
- storage_path: config?.storage_path,
136
- storage_origins: ["storage"],
137
- is_drop_zone: false,
138
- accept: ["image/png", "image/jpeg", "image/webp", "image/gif"],
139
- is_multiselect: false,
140
- on_finish: async (input) => {
141
- const src = storage_src.replace("{storage_id}", input?.id)
142
- const dimensions = await get_image_dimensions_from_src(src)
143
- image_storage_id_text_input_manager.set_val(input?.id ?? null)
144
- image_mime_type_text_input_manager.set_val(input?.mime_type ?? null)
145
- image_is_storage_id_public_checkbox_manager.set_val(input?.is_public ?? null)
146
- image_width_text_input_manager.set_val(dimensions?.width ?? null)
147
- image_height_text_input_manager.set_val(dimensions?.height ?? null)
148
- image_aspect_ratio_text_input_manager.set_val(dimensions?.aspect_ratio ?? null)
149
- },
150
- })
151
- image_storage_id_text_input_manager = create_text_input_manager({
152
- label: "Image Storage ID",
153
- placeholder: "image_storage_id",
154
- val: config?.val?.image_storage_id,
155
- })
156
- image_mime_type_text_input_manager = create_text_input_manager({
157
- label: "Image Mime Type",
158
- placeholder: "image_mime_type",
159
- val: config?.val?.mime_type,
160
- })
161
- image_is_storage_id_public_checkbox_manager = create_checkbox_manager({
162
- type: "toggle",
163
- label: "Is Image Public",
164
- val: config?.val?.image_is_storage_id_public,
165
- })
166
- image_src_text_input_manager = create_text_input_manager({
167
- label: "Image src",
168
- placeholder: "image_src",
169
- val: config?.val?.image_src,
170
- })
171
- image_src_quick_text_input_manager = create_text_input_manager({
172
- label: "image src quick (low quality placeholder image)",
173
- placeholder: "src_quick",
174
- val: config?.val?.image_src_quick,
175
- })
176
- image_width_text_input_manager = create_text_input_manager({
177
- type: "number",
178
- label: "Width",
179
- placeholder: "width",
180
- val: config?.val?.image_width,
181
- })
182
- image_height_text_input_manager = create_text_input_manager({
183
- type: "number",
184
- label: "Height",
185
- placeholder: "height",
186
- val: config?.val?.image_height,
187
- })
188
- image_aspect_ratio_text_input_manager = create_text_input_manager({
189
- type: "number",
190
- label: "Aspect Ratio",
191
- placeholder: "aspect ratio",
192
- val: config?.val?.image_aspect_ratio,
193
- })
194
- }
195
-
196
- init(config)
197
-
198
- return {
199
- get val() {
200
- return val
201
- },
202
- get ui_type_dropdown_manager() {
203
- return ui_type_dropdown_manager
204
- },
205
- get audio_storage_picker_manager() {
206
- return audio_storage_picker_manager
207
- },
208
- get storage_id_text_input_manager() {
209
- return storage_id_text_input_manager
210
- },
211
- get is_storage_id_public_checkbox_manager() {
212
- return is_storage_id_public_checkbox_manager
213
- },
214
- get src_text_input_manager() {
215
- return src_text_input_manager
216
- },
217
- get mime_type_text_input_manager() {
218
- return mime_type_text_input_manager
219
- },
220
- get title_text_input_manager() {
221
- return title_text_input_manager
222
- },
223
- get album_text_input_manager() {
224
- return album_text_input_manager
225
- },
226
- get artist_text_input_manager() {
227
- return artist_text_input_manager
228
- },
229
- get image_storage_picker_manager() {
230
- return image_storage_picker_manager
231
- },
232
- get image_storage_id_text_input_manager() {
233
- return image_storage_id_text_input_manager
234
- },
235
- get image_is_storage_id_public_checkbox_manager() {
236
- return image_is_storage_id_public_checkbox_manager
237
- },
238
- get image_src_text_input_manager() {
239
- return image_src_text_input_manager
240
- },
241
- get image_src_quick_text_input_manager() {
242
- return image_src_quick_text_input_manager
243
- },
244
- get image_mime_type_text_input_manager() {
245
- return image_mime_type_text_input_manager
246
- },
247
- get image_width_text_input_manager() {
248
- return image_width_text_input_manager
249
- },
250
- get image_height_text_input_manager() {
251
- return image_height_text_input_manager
252
- },
253
- get image_aspect_ratio_text_input_manager() {
254
- return image_aspect_ratio_text_input_manager
255
- },
256
- set_val,
257
- }
258
- }
@@ -1,58 +0,0 @@
1
- <script>
2
- import Button from "../../../../Button/index.svelte"
3
- import Checkbox from "../../../../Checkbox/index.svelte"
4
- import Slider from "../../../../Slider/index.svelte"
5
- import TextInput from "../../../../TextInput/index.svelte"
6
- import VariablePathInput from "../../../../VariablePathInput/index.svelte"
7
- import DefinedTypeInput from "../../DefinedTypeInput/index.svelte"
8
-
9
- let { manager } = $props()
10
- </script>
11
-
12
- <DefinedTypeInput manager={manager?.val_defined_type_input_manager} >
13
- {#snippet content()}
14
- <TextInput manager={manager?.val_text_input_manager} />
15
- {/snippet}
16
- </DefinedTypeInput>
17
- <TextInput manager={manager?.header_text_input_manager} />
18
- <TextInput manager={manager?.placeholder_text_input_manager} />
19
- <Checkbox manager={manager?.is_multiselect_checkbox_manager} />
20
- <Checkbox manager={manager?.is_set_null_button_checkbox_manager} />
21
- <Checkbox manager={manager?.is_show_arrow_checkbox_manager} />
22
- <Checkbox manager={manager?.is_button_compressed_checkbox_manager} />
23
- <Checkbox manager={manager?.is_searchable_checkbox_manager} />
24
- <Slider manager={manager?.target_width_slider_manager} />
25
- <Slider manager={manager?.target_height_slider_manager} />
26
- <h3>Options</h3>
27
- <div class="table_container">
28
- <table style="margin: 0;">
29
- <thead>
30
- <tr>
31
- <th>Key</th>
32
- <th>Name</th>
33
- <th>Delete</th>
34
- </tr>
35
- </thead>
36
- <tbody>
37
- {#if Array.isArray(manager?.options_prepped) && manager?.options_prepped.length > 0}
38
- {#each manager?.options_prepped as option_prepped}
39
- <tr>
40
- <td>{option_prepped?.option?.key}</td>
41
- <td>{option_prepped?.option?.name}</td>
42
- <td><Button manager={option_prepped?.delete_button_manager} /></td>
43
- </tr>
44
- {/each}
45
- {:else}
46
- <tr>
47
- <td colspan="3">No options found</td>
48
- </tr>
49
- {/if}
50
- </tbody>
51
- </table>
52
- </div>
53
- <div class="cardns" style="margin-top: 1rem; padding: 1rem;">
54
- <h5>Add Option</h5>
55
- <TextInput manager={manager?.key_to_add_text_input_manager} />
56
- <TextInput manager={manager?.name_to_add_text_input_manager} />
57
- <Button manager={manager?.add_option_button_manager} />
58
- </div>