@overmap-ai/core 1.0.35-projects-licensing.20 → 1.0.36-add-image-to-forms.0

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 (39) hide show
  1. package/dist/forms/builder/FieldActions.d.ts +4 -1
  2. package/dist/forms/constants.d.ts +9 -0
  3. package/dist/forms/fields/BaseField/BaseField.d.ts +1 -0
  4. package/dist/forms/fields/BaseField/layouts.d.ts +1 -0
  5. package/dist/forms/fields/SelectField/BaseSelectField.d.ts +1 -0
  6. package/dist/forms/fields/constants.d.ts +3 -0
  7. package/dist/forms/renderer/PatchForm/Provider.d.ts +4 -0
  8. package/dist/forms/typings.d.ts +1 -0
  9. package/dist/forms/utils.d.ts +2 -0
  10. package/dist/overmap-core.js +1058 -847
  11. package/dist/overmap-core.js.map +1 -1
  12. package/dist/overmap-core.umd.cjs +1051 -840
  13. package/dist/overmap-core.umd.cjs.map +1 -1
  14. package/dist/sdk/sdk.d.ts +1 -2
  15. package/dist/sdk/services/MainService.d.ts +1 -2
  16. package/dist/sdk/services/ProjectService.d.ts +3 -2
  17. package/dist/sdk/services/UserFormService.d.ts +4 -3
  18. package/dist/sdk/services/index.d.ts +0 -1
  19. package/dist/store/slices/categorySlice.d.ts +0 -1
  20. package/dist/store/slices/index.d.ts +0 -1
  21. package/dist/store/slices/issueSlice.d.ts +4 -2
  22. package/dist/store/slices/organizationSlice.d.ts +1 -5
  23. package/dist/store/slices/projectFileSlice.d.ts +0 -1
  24. package/dist/store/slices/projectSlice.d.ts +1 -7
  25. package/dist/store/slices/settingsSlice.d.ts +1 -7
  26. package/dist/store/slices/userFormSlice.d.ts +11 -2
  27. package/dist/store/slices/workspaceSlice.d.ts +0 -1
  28. package/dist/store/store.d.ts +1 -4
  29. package/dist/style.css +161 -48
  30. package/dist/typings/models/base.d.ts +0 -4
  31. package/dist/typings/models/forms.d.ts +5 -0
  32. package/dist/typings/models/index.d.ts +0 -1
  33. package/dist/typings/models/organizations.d.ts +0 -2
  34. package/dist/typings/models/projects.d.ts +0 -2
  35. package/package.json +1 -1
  36. package/dist/forms/builder/componentConstants.d.ts +0 -8
  37. package/dist/sdk/services/LicenseService.d.ts +0 -10
  38. package/dist/store/slices/licenseSlice.d.ts +0 -25
  39. package/dist/typings/models/license.d.ts +0 -19
package/dist/style.css CHANGED
@@ -1,15 +1,54 @@
1
- ._description_o5vqt_1 {
1
+ ._description_1rtl0_1 {
2
2
  white-space: pre-line;
3
3
  }
4
4
 
5
- ._floatingButtonContainer_o5vqt_5 {
5
+ ._floatingButtonContainer_1rtl0_5 {
6
6
  position: sticky;
7
7
  bottom: 0;
8
8
  padding-bottom: 10px;
9
9
  padding-right: 10px;
10
10
  }
11
11
 
12
- ._tabsList_o5vqt_12 {
12
+ ._FullScreenImageContainer_1rtl0_12 {
13
+ position: fixed;
14
+ top: 0;
15
+ left: 0;
16
+ height: 100%;
17
+ width: 100%;
18
+ z-index: 5000;
19
+ background-color: rgba(0, 0, 0, 0.85);
20
+ }
21
+
22
+ ._fileName_1rtl0_22 {
23
+ flex-grow: 1;
24
+ text-align: center;
25
+ }
26
+
27
+ ._longIconButton_1rtl0_27 {
28
+ font-size: 0.8em;
29
+ min-width: 50px;
30
+ margin: 10px;
31
+ }
32
+
33
+ ._previewImage_1rtl0_33 {
34
+ object-fit: cover;
35
+ width: min(300px, 100%);
36
+ height: 100px;
37
+ border-radius: var(--radius-2);
38
+ cursor: pointer;
39
+ }
40
+
41
+ ._FullScreenImage_1rtl0_12 {
42
+ position: absolute;
43
+ top: 50%;
44
+ left: 50%;
45
+ transform: translate(-50%, -50%);
46
+ object-fit: contain;
47
+ max-height: calc(100% - 120px);
48
+ max-width: 100vw;
49
+ }
50
+
51
+ ._tabsList_1rtl0_51 {
13
52
  display: flex;
14
53
  position: sticky;
15
54
  background-color: var(--color-background);
@@ -17,37 +56,76 @@
17
56
  z-index: 2000;
18
57
  }
19
58
 
20
- ._tabTrigger_o5vqt_20 {
59
+ ._tabTrigger_1rtl0_59 {
21
60
  flex: 1;
22
61
  }
23
62
 
24
- ._patchfieldBorder_o5vqt_24, ._description_o5vqt_1, ._title_o5vqt_24 {
63
+ ._patchfieldBorder_1rtl0_63, ._description_1rtl0_1, ._title_1rtl0_63 {
25
64
  accent-color: var(--gray-surface);
26
65
  border: 1px solid var(--gray-a7);
27
66
  border-radius: 8px;
28
67
  padding-left: var(--space-2);
29
68
  }
30
69
 
31
- ._title_o5vqt_24 {
70
+ ._title_1rtl0_63 {
32
71
  font-weight: bold;
33
72
  }
34
73
 
35
- ._description_o5vqt_1 {
74
+ ._description_1rtl0_1 {
36
75
  min-height: max-content;
37
76
  padding-top: var(--space-2);
38
77
  }
39
78
 
40
- ._error_o5vqt_40 {
79
+ ._error_1rtl0_79 {
41
80
  border-color: var(--red-a11);
42
- }._description_1p32e_1 {
81
+ }._description_1nfty_1 {
43
82
  white-space: pre-line;
44
83
  }
45
84
 
46
- ._floatingButtonContainer_1p32e_5 {
85
+ ._floatingButtonContainer_1nfty_5 {
47
86
  position: sticky;
48
87
  bottom: 0;
49
88
  padding-bottom: 10px;
50
89
  padding-right: 10px;
90
+ }
91
+
92
+ ._FullScreenImageContainer_1nfty_12 {
93
+ position: fixed;
94
+ top: 0;
95
+ left: 0;
96
+ height: 100%;
97
+ width: 100%;
98
+ z-index: 5000;
99
+ background-color: rgba(0, 0, 0, 0.85);
100
+ }
101
+
102
+ ._fileName_1nfty_22 {
103
+ flex-grow: 1;
104
+ text-align: center;
105
+ }
106
+
107
+ ._longIconButton_1nfty_27 {
108
+ font-size: 0.8em;
109
+ min-width: 50px;
110
+ margin: 10px;
111
+ }
112
+
113
+ ._previewImage_1nfty_33 {
114
+ object-fit: cover;
115
+ width: min(300px, 100%);
116
+ height: 100px;
117
+ border-radius: var(--radius-2);
118
+ cursor: pointer;
119
+ }
120
+
121
+ ._FullScreenImage_1nfty_12 {
122
+ position: absolute;
123
+ top: 50%;
124
+ left: 50%;
125
+ transform: translate(-50%, -50%);
126
+ object-fit: contain;
127
+ max-height: calc(100% - 120px);
128
+ max-width: 100vw;
51
129
  }._clickableLinkContainer_1ace7_1 {
52
130
  z-index: 1;
53
131
  }
@@ -56,7 +134,7 @@
56
134
  overflow-x: auto;
57
135
  white-space: nowrap;
58
136
  padding-top: calc(var(--space-1) + 1px);
59
- }._previewImage_y4yd1_1 {
137
+ }._previewImage_ebhyt_1 {
60
138
  max-height: 100px;
61
139
  border-radius: max(var(--radius-2), var(--radius-4));
62
140
  flex-basis: 50%;
@@ -64,23 +142,56 @@
64
142
  cursor: pointer;
65
143
  }
66
144
 
67
- ._nameContainer_y4yd1_9 {
145
+ ._nameContainer_ebhyt_9 {
68
146
  width: 80%;
69
147
  }
70
148
 
71
149
  @media only screen and (min-width: 768px) {
72
- ._hasPreview_y4yd1_14 {
150
+ ._hasPreview_ebhyt_14 {
73
151
  max-width: 250px;
74
152
  }
75
153
  }
76
154
 
77
- ._useEllipsis_y4yd1_19 {
155
+ ._useEllipsis_ebhyt_19 {
78
156
  overflow: hidden;
79
157
  white-space: nowrap;
80
158
  text-overflow: ellipsis;
159
+ }._favoriteIcon_1bixi_1._favoriteIcon_1bixi_1 {
160
+ color: var(--yellow-a9);
161
+ }
162
+ ._favoriteIcon_1bixi_1._favoriteIcon_1bixi_1:hover:not(:disabled) {
163
+ background-color: transparent;
164
+ color: var(--gray-a9);
165
+ }
166
+
167
+ ._regularIcon_1bixi_9._regularIcon_1bixi_9:hover:not(:disabled) {
168
+ color: var(--yellow-a9);
169
+ background-color: transparent;
170
+ }._submissionsContainer_9iirt_1 {
171
+ overflow-y: auto;
172
+ max-height: min(369px, 100vh - 200px);
173
+ }
174
+
175
+ ._stopHorizontalOverflow_9iirt_6 {
176
+ min-width: 0;
177
+ }._typeBadge_an5ff_1 {
178
+ width: fit-content;
179
+ }
180
+
181
+ ._addSectionButton_an5ff_5 {
182
+ margin-bottom: var(--space-4);
183
+ }._description_13g4a_1 {
184
+ white-space: pre-line;
185
+ }
186
+
187
+ ._floatingButtonContainer_13g4a_5 {
188
+ position: sticky;
189
+ bottom: 0;
190
+ padding-bottom: 10px;
191
+ padding-right: 10px;
81
192
  }
82
193
 
83
- ._FullScreenImageContainer_y4yd1_25 {
194
+ ._FullScreenImageContainer_13g4a_12 {
84
195
  position: fixed;
85
196
  top: 0;
86
197
  left: 0;
@@ -90,18 +201,26 @@
90
201
  background-color: rgba(0, 0, 0, 0.85);
91
202
  }
92
203
 
93
- ._fileName_y4yd1_35 {
204
+ ._fileName_13g4a_22 {
94
205
  flex-grow: 1;
95
206
  text-align: center;
96
207
  }
97
208
 
98
- ._longIconButton_y4yd1_40 {
209
+ ._longIconButton_13g4a_27 {
99
210
  font-size: 0.8em;
100
211
  min-width: 50px;
101
212
  margin: 10px;
102
213
  }
103
214
 
104
- ._FullScreenImage_y4yd1_25 {
215
+ ._previewImage_13g4a_33 {
216
+ object-fit: cover;
217
+ width: min(300px, 100%);
218
+ height: 100px;
219
+ border-radius: var(--radius-2);
220
+ cursor: pointer;
221
+ }
222
+
223
+ ._FullScreenImage_13g4a_12 {
105
224
  position: absolute;
106
225
  top: 50%;
107
226
  left: 50%;
@@ -109,70 +228,64 @@
109
228
  object-fit: contain;
110
229
  max-height: calc(100% - 120px);
111
230
  max-width: 100vw;
112
- }._favoriteIcon_1bixi_1._favoriteIcon_1bixi_1 {
113
- color: var(--yellow-a9);
114
- }
115
- ._favoriteIcon_1bixi_1._favoriteIcon_1bixi_1:hover:not(:disabled) {
116
- background-color: transparent;
117
- color: var(--gray-a9);
118
231
  }
119
232
 
120
- ._regularIcon_1bixi_9._regularIcon_1bixi_9:hover:not(:disabled) {
121
- color: var(--yellow-a9);
122
- background-color: transparent;
123
- }._submissionsContainer_9iirt_1 {
124
- overflow-y: auto;
125
- max-height: min(369px, 100vh - 200px);
233
+ ._popoverInputsContainer_13g4a_51 {
234
+ max-width: 240px;
126
235
  }
127
236
 
128
- ._stopHorizontalOverflow_9iirt_6 {
129
- min-width: 0;
130
- }._typeBadge_an5ff_1 {
131
- width: fit-content;
237
+ ._imageContainer_13g4a_55 {
238
+ position: relative;
239
+ display: inline-block;
240
+ width: min(300px, 100%);
241
+ }
242
+ ._imageContainer_13g4a_55:hover:not(:disabled) ._deleteImageButton_13g4a_60 {
243
+ display: flex;
132
244
  }
133
245
 
134
- ._addSectionButton_an5ff_5 {
135
- margin-bottom: var(--space-4);
136
- }._popoverInputsContainer_wqdmr_1 {
137
- max-width: 240px;
246
+ ._deleteImageButton_13g4a_60 {
247
+ position: absolute;
248
+ top: var(--space-2);
249
+ right: var(--space-2);
250
+ display: none;
138
251
  }
139
252
 
140
- ._typeBadge_wqdmr_5 {
253
+ ._typeBadge_13g4a_71 {
141
254
  width: fit-content;
142
255
  height: var(--space-5);
143
256
  }
144
257
 
145
- ._previewInput_wqdmr_10 button[id=upload-input-upload-button] {
258
+ ._previewInput_13g4a_76 button[id=upload-input-upload-button] {
146
259
  width: 100%;
147
260
  }
148
261
 
149
- ._directInput_wqdmr_14 {
262
+ ._directInput_13g4a_80 {
150
263
  min-width: 40%;
151
264
  margin-left: var(--space-3);
152
265
  }
153
266
 
154
- ._grow_wqdmr_19 {
267
+ ._grow_13g4a_85 {
155
268
  display: grid;
156
269
  }
157
270
 
158
- ._grow_wqdmr_19::after {
271
+ ._grow_13g4a_85::after {
159
272
  content: attr(data-replicated-value) " ";
160
273
  white-space: pre-wrap;
161
274
  visibility: hidden;
162
275
  }
163
276
 
164
- ._grow_wqdmr_19 > textarea {
277
+ ._grow_13g4a_85 > textarea {
165
278
  resize: none;
166
279
  overflow: hidden;
167
280
  min-height: max-content;
168
281
  }
169
282
 
170
- ._grow_wqdmr_19 > input,
171
- ._grow_wqdmr_19::after {
283
+ ._grow_13g4a_85 > input,
284
+ ._grow_13g4a_85::after {
172
285
  grid-area: 1/1;
173
286
  }
174
287
 
175
- ._grow_wqdmr_19 > textarea,
176
- ._grow_wqdmr_19::after {
288
+ ._grow_13g4a_85 > textarea,
289
+ ._grow_13g4a_85::after {
177
290
  grid-area: 1/1/2/2;
178
291
  }
@@ -16,7 +16,3 @@ export interface FileObject {
16
16
  file: string;
17
17
  objectURL?: string;
18
18
  }
19
- export interface OwnedByUserOrOrganization {
20
- user_owner: number;
21
- organization_owner: number;
22
- }
@@ -44,4 +44,9 @@ export interface UserFormSubmissionAttachment extends OfflineModel, UploadedFile
44
44
  file_name: string;
45
45
  field_identifier: string;
46
46
  }
47
+ export interface UserFormRevisionAttachment extends OfflineModel, UploadedFileModel {
48
+ revision: string;
49
+ file_name: string;
50
+ field_identifier: string;
51
+ }
47
52
  export type UserFormSubmissionPayload = Omit<Payload<UserFormSubmission>, "created_by">;
@@ -13,4 +13,3 @@ export * from "./workspace";
13
13
  export * from "./emailVerification";
14
14
  export * from "./store";
15
15
  export * from "./emailDomain";
16
- export * from "./license.ts";
@@ -2,7 +2,6 @@ import { Model } from "./base";
2
2
  import { OrganizationAccess } from "./access";
3
3
  import { EmailDomain } from "./emailDomain";
4
4
  import { User } from "./users";
5
- import { License } from "./license.ts";
6
5
  export interface Organization extends Model {
7
6
  id: number;
8
7
  name: string;
@@ -14,5 +13,4 @@ export interface InitialOrganizationData {
14
13
  users: User[];
15
14
  organization_accesses: OrganizationAccess[];
16
15
  email_domains: EmailDomain[];
17
- licenses: License[];
18
16
  }
@@ -11,8 +11,6 @@ export interface Project extends Model {
11
11
  owner_user: number | null;
12
12
  bounds: [L.LatLngTuple, L.LatLngTuple] | undefined;
13
13
  invited?: boolean;
14
- issues_count: number;
15
- form_submissions_count: number;
16
14
  }
17
15
  export interface ProjectFile extends Model, FileObject {
18
16
  offline_id: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core functionality for Overmap",
4
4
  "author": "Wôrdn Inc.",
5
5
  "license": "UNLICENSED",
6
- "version": "1.0.35-projects-licensing.20",
6
+ "version": "1.0.36-add-image-to-forms.0",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",
@@ -1,8 +0,0 @@
1
- import { ReactElement } from "react";
2
- import { FieldTypeIdentifier } from "../typings";
3
- interface FieldTypeDropdownProps {
4
- setFieldType: (id: Exclude<FieldTypeIdentifier, "section">) => void;
5
- children: ReactElement;
6
- }
7
- export declare const FieldTypeDropdown: import("react").MemoExoticComponent<(props: FieldTypeDropdownProps) => import("react/jsx-runtime").JSX.Element>;
8
- export {};
@@ -1,10 +0,0 @@
1
- import { BaseApiService } from "./BaseApiService.ts";
2
- import { License, Project } from "../../typings";
3
- export declare class LicenseService extends BaseApiService {
4
- getLicensesForOrganization(organizationId: number, showLoading?: boolean): Promise<License[]>;
5
- pauseLicense(license: License): Promise<License>;
6
- resumeLicense(license: License): Promise<License>;
7
- cancelLicense(license: License): Promise<License>;
8
- attachLicenseToProject(license: License, project: Project): Promise<License>;
9
- detachLicenseFromProject(license: License): Promise<License>;
10
- }
@@ -1,25 +0,0 @@
1
- import { License } from "../../typings/models/license.ts";
2
- import { Reducer } from "@reduxjs/toolkit";
3
- import { Selector, SelectorWithArgs } from "../../typings";
4
- export interface LicenseState {
5
- licenses: Record<string, License>;
6
- }
7
- export declare const licenseSlice: import("@reduxjs/toolkit").Slice<LicenseState, {
8
- setLicenses: (state: import("immer/dist/internal.js").WritableDraft<LicenseState>, action: {
9
- payload: License[];
10
- }) => void;
11
- addLicenses: (state: import("immer/dist/internal.js").WritableDraft<LicenseState>, action: {
12
- payload: License[];
13
- }) => void;
14
- updateLicense: (state: import("immer/dist/internal.js").WritableDraft<LicenseState>, action: {
15
- payload: License;
16
- }) => void;
17
- }, "license">;
18
- export declare const setLicenses: import("@reduxjs/toolkit").ActionCreatorWithPayload<License[], "license/setLicenses">, addLicenses: import("@reduxjs/toolkit").ActionCreatorWithPayload<License[], "license/addLicenses">, updateLicense: import("@reduxjs/toolkit").ActionCreatorWithPayload<License, "license/updateLicense">;
19
- export declare const selectLicenses: Selector<Record<string, License>>;
20
- export declare const selectLicense: SelectorWithArgs<string, License>;
21
- export declare const selectActiveLicense: Selector<License | null>;
22
- export declare const selectLicenseForProject: SelectorWithArgs<number, License | null>;
23
- export declare const selectActiveStatusLicenses: Selector<License[]>;
24
- export declare const selectLicencesMapping: Selector<Record<number, License>>;
25
- export declare const licenseReducer: Reducer<LicenseState>;
@@ -1,19 +0,0 @@
1
- import { OfflineModel, OwnedByUserOrOrganization } from "./base.ts";
2
- export declare enum LicenseLevel {
3
- PRO = 0
4
- }
5
- export declare enum LicenseStatus {
6
- ACTIVE = 0,
7
- PAUSED = 2,
8
- CANCELED = 4,
9
- INACTIVE = 6
10
- }
11
- export interface License extends OfflineModel, OwnedByUserOrOrganization {
12
- project: number | null;
13
- level: LicenseLevel;
14
- status: LicenseStatus;
15
- is_active: boolean;
16
- is_paused: boolean;
17
- is_cancelled: boolean;
18
- next_billing_date: Date;
19
- }