@wix/patterns-fields-utils 1.0.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.
- package/@wix/patterns-fields-bundled-cm-media-utils/dist/cjs/index.d.ts +176 -0
- package/@wix/patterns-fields-bundled-cm-media-utils/dist/cjs/index.js +7103 -0
- package/@wix/patterns-fields-bundled-cm-media-utils/dist/cjs/index.js.map +1 -0
- package/@wix/patterns-fields-bundled-cm-media-utils/dist/esm/index.d.mts +176 -0
- package/@wix/patterns-fields-bundled-cm-media-utils/dist/esm/index.mjs +7118 -0
- package/@wix/patterns-fields-bundled-cm-media-utils/dist/esm/index.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-cm-media-utils/package.json +37 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/cjs/index.css.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/cjs/index.d.ts +115 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/cjs/index.global.css +1536 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/cjs/index.js +76375 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/cjs/index.js.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/cjs/move-POMANKZG.svg +3 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-ANOFRNLZ.mjs +302 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-ANOFRNLZ.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-D3Y2XBAR.mjs +9573 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-D3Y2XBAR.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-FOPGQED5.mjs +60 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-FOPGQED5.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-KK6IAXDC.mjs +61 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-KK6IAXDC.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-LSMTMMMM.mjs +999 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/chunk-LSMTMMMM.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/hls-X7Z2O2CI.mjs +32977 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/hls-X7Z2O2CI.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/html2canvas.esm-26SHFSHQ.mjs +7813 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/html2canvas.esm-26SHFSHQ.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/index.css.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/index.d.mts +115 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/index.global.css +1537 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/index.mjs +23054 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/index.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/lib-INOZ3X5B.mjs +6427 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/lib-INOZ3X5B.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/move-POMANKZG.svg +3 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/player.es-EHCCDTX6.mjs +1600 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/player.es-EHCCDTX6.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/validateTypes-OWSYRJSG.mjs +85 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/validateTypes-OWSYRJSG.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/videoItem-QVVYW7GT.mjs +311 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/videoItem-QVVYW7GT.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/videoScrollHelper-HX35Z6JI.mjs +307 -0
- package/@wix/patterns-fields-bundled-organize-media/dist/esm/videoScrollHelper-HX35Z6JI.mjs.map +1 -0
- package/@wix/patterns-fields-bundled-organize-media/package.json +70 -0
- package/@wix/wix-data-schema-types/.nvmrc +1 -0
- package/@wix/wix-data-schema-types/index.d.ts +1 -0
- package/@wix/wix-data-schema-types/lib/capabilities.d.ts +18 -0
- package/@wix/wix-data-schema-types/lib/capabilities.js +3 -0
- package/@wix/wix-data-schema-types/lib/capabilities.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/defaultMaxPageSize.d.ts +4 -0
- package/@wix/wix-data-schema-types/lib/defaultMaxPageSize.js +9 -0
- package/@wix/wix-data-schema-types/lib/defaultMaxPageSize.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/field.d.ts +350 -0
- package/@wix/wix-data-schema-types/lib/field.js +173 -0
- package/@wix/wix-data-schema-types/lib/field.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/fieldPlugins.d.ts +23 -0
- package/@wix/wix-data-schema-types/lib/fieldPlugins.js +8 -0
- package/@wix/wix-data-schema-types/lib/fieldPlugins.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/filter.d.ts +261 -0
- package/@wix/wix-data-schema-types/lib/filter.js +41 -0
- package/@wix/wix-data-schema-types/lib/filter.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/index.d.ts +9 -0
- package/@wix/wix-data-schema-types/lib/index.js +26 -0
- package/@wix/wix-data-schema-types/lib/index.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/order.d.ts +24 -0
- package/@wix/wix-data-schema-types/lib/order.js +9 -0
- package/@wix/wix-data-schema-types/lib/order.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/pagingMode.d.ts +4 -0
- package/@wix/wix-data-schema-types/lib/pagingMode.js +9 -0
- package/@wix/wix-data-schema-types/lib/pagingMode.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/plugins.d.ts +76 -0
- package/@wix/wix-data-schema-types/lib/plugins.js +27 -0
- package/@wix/wix-data-schema-types/lib/plugins.js.map +1 -0
- package/@wix/wix-data-schema-types/lib/schema.d.ts +202 -0
- package/@wix/wix-data-schema-types/lib/schema.js +106 -0
- package/@wix/wix-data-schema-types/lib/schema.js.map +1 -0
- package/@wix/wix-data-schema-types/package.json +45 -0
- package/@wix/wix-data-schema-types/src/capabilities.ts +19 -0
- package/@wix/wix-data-schema-types/src/defaultMaxPageSize.ts +6 -0
- package/@wix/wix-data-schema-types/src/field.ts +355 -0
- package/@wix/wix-data-schema-types/src/fieldPlugins.ts +28 -0
- package/@wix/wix-data-schema-types/src/filter.ts +280 -0
- package/@wix/wix-data-schema-types/src/index.ts +9 -0
- package/@wix/wix-data-schema-types/src/order.ts +26 -0
- package/@wix/wix-data-schema-types/src/pagingMode.ts +4 -0
- package/@wix/wix-data-schema-types/src/plugins.ts +97 -0
- package/@wix/wix-data-schema-types/src/schema.ts +222 -0
- package/@wix/wix-data-schema-types/tsconfig.json +18 -0
- package/@wix/wix-data-schema-types/tslint.json +3 -0
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { OrderSpec } from './order'
|
|
2
|
+
|
|
3
|
+
export const PUBLISHING_PLUGIN_ID = 'publishing' as const
|
|
4
|
+
|
|
5
|
+
export const PUBLISH_STATUS_FIELD_KEY = '_publishStatus' as const
|
|
6
|
+
export const PUBLISH_DATE_FIELD_KEY = '_publishDate' as const
|
|
7
|
+
export const DRAFT_DATE_FIELD_KEY = '_draftDate' as const
|
|
8
|
+
|
|
9
|
+
export enum PublishingStatus {
|
|
10
|
+
DRAFT = 'DRAFT',
|
|
11
|
+
PUBLISHED = 'PUBLISHED'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface PublishingPlugin {
|
|
15
|
+
defaultStatus: PublishingStatus
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const GRID_APPLESS_PLUGIN_ID = 'gridAppless'
|
|
19
|
+
|
|
20
|
+
export interface GridApplessPlugin {
|
|
21
|
+
isMigrated: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const SINGLES_PLUGIN_ID = 'singleItem' as const
|
|
25
|
+
|
|
26
|
+
export interface SinglesPlugin {
|
|
27
|
+
singleItemId: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const URLIZED_PLUGIN_ID = 'urlized' as const
|
|
31
|
+
|
|
32
|
+
export enum UrlizedFormat {
|
|
33
|
+
PLAIN = 'plain',
|
|
34
|
+
ORIGINAL = 'original'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface UrlizedPlugin {
|
|
38
|
+
format: UrlizedFormat
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const MULTILINGUAL_PLUGIN_ID = 'multilingual' as const
|
|
42
|
+
|
|
43
|
+
export interface MultilingualPlugin {
|
|
44
|
+
translatable: string[]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const SHARED_PLUGIN_ID = 'shared' as const
|
|
48
|
+
|
|
49
|
+
export interface SharedPlugin {}
|
|
50
|
+
|
|
51
|
+
export const PAGE_LINK_PLUGIN_ID = 'persistentPageLink' as const
|
|
52
|
+
export interface PageLinkPlugin {
|
|
53
|
+
isPersisted: boolean
|
|
54
|
+
isUpdatable: boolean
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const CMS_PLUGIN_ID = 'cms'
|
|
58
|
+
export interface CmsPlugin {
|
|
59
|
+
siteSort?: {
|
|
60
|
+
sort: OrderSpec[]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const CATALOG_PLUGIN_ID = 'CATALOG'
|
|
65
|
+
export interface CatalogOptions {
|
|
66
|
+
name?: string
|
|
67
|
+
price?: string
|
|
68
|
+
url?: string | null
|
|
69
|
+
description?: string | null
|
|
70
|
+
image?: string | null
|
|
71
|
+
quantity?: string | null
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface CatalogPlugin {
|
|
75
|
+
catalogOptions?: CatalogOptions
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const CATEGORIES_PLUGIN_ID = 'categories'
|
|
79
|
+
export interface CategoriesPlugin {}
|
|
80
|
+
|
|
81
|
+
export interface KnownSchemaPlugins {
|
|
82
|
+
[PUBLISHING_PLUGIN_ID]?: PublishingPlugin
|
|
83
|
+
[GRID_APPLESS_PLUGIN_ID]?: GridApplessPlugin
|
|
84
|
+
[SINGLES_PLUGIN_ID]?: SinglesPlugin
|
|
85
|
+
[URLIZED_PLUGIN_ID]?: UrlizedPlugin
|
|
86
|
+
[MULTILINGUAL_PLUGIN_ID]?: MultilingualPlugin
|
|
87
|
+
[SHARED_PLUGIN_ID]?: SharedPlugin
|
|
88
|
+
[PAGE_LINK_PLUGIN_ID]?: PageLinkPlugin
|
|
89
|
+
[CMS_PLUGIN_ID]?: CmsPlugin
|
|
90
|
+
[CATALOG_PLUGIN_ID]?: CatalogPlugin
|
|
91
|
+
[CATEGORIES_PLUGIN_ID]?: CategoriesPlugin
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type SchemaPlugins = KnownSchemaPlugins & Record<string, object>
|
|
95
|
+
|
|
96
|
+
export type SchemaPluginId = keyof KnownSchemaPlugins
|
|
97
|
+
export type SchemaPlugin = Required<KnownSchemaPlugins>[SchemaPluginId]
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { Capabilities } from './capabilities'
|
|
2
|
+
import { FieldSpec } from './field'
|
|
3
|
+
import { OrderSpec } from './order'
|
|
4
|
+
import { PagingMode } from './pagingMode'
|
|
5
|
+
import { SchemaPlugins } from './plugins'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @interface Schema
|
|
9
|
+
* @member displayName {string} - Defines UI-friendly name of a collection.
|
|
10
|
+
* @member namespace {string} - Defines to which namespace the collections belongs to.
|
|
11
|
+
* This is used for grouping collections in the editor's left side menu under Database section.
|
|
12
|
+
* @member displayNamespace {string} - Defines a UI-friendly namespace value.
|
|
13
|
+
* @member isDeleted {boolean} - Marks the schema as deleted and unavailable for use in data operations.
|
|
14
|
+
* @member id {string} - ID should be formed by concatenating namespace, slash ('/') and collection name. For example:
|
|
15
|
+
* 'Stores/Products'. This is the property that is used in Wix Data requests to refer to the collection. For example:
|
|
16
|
+
* wixData.query('Stores/Products').find()
|
|
17
|
+
* @member ownerAppId {string} - Id of app that exposes the schema. The collection will only be visible in sites
|
|
18
|
+
* that have an application with the given id provisioned.
|
|
19
|
+
* @member allowedOperations {Array<string>} - Lists Wix Data operations that are allowed in a given collection.
|
|
20
|
+
* Operations that are not available will be hidden in Content Manager, Permissions dialog and Dataset options.
|
|
21
|
+
* Wix Data however will not reject any operation performed by user from code. It is up for the driver to do so. It
|
|
22
|
+
* is recommended to reject with a meaningful error message explaining why the operation did not succeed.
|
|
23
|
+
* Returning empty array would block all filter options, returning null would allow options default for that type.
|
|
24
|
+
* @member permissions - see {@link Permissions}
|
|
25
|
+
* @member dataPermissions - general collection permission configuration (read-only)
|
|
26
|
+
* @member allowedPermissions - allowed data operations for current user, included only on-demand, see {@link AllowedDataPermissions}
|
|
27
|
+
* @member defaultSort {OrderSpec} - Denotes default sort of database if no sort is applied. This is used to communicate
|
|
28
|
+
* to the user what the sort order is, if no sort order is specified. This should be set only if default sort order
|
|
29
|
+
* exists for you collection as this is not the default order that will be passed down to find, but the order the
|
|
30
|
+
* driver applies when no order is given.
|
|
31
|
+
* @member displayField marks a field value of which will be used to represent the item in (multi-)references.
|
|
32
|
+
* When showing assigned (multi-)references Content Manager will use this field to display which items are assigned.
|
|
33
|
+
* When assigning new (multi-)reference item, this field can be used to search for the item.
|
|
34
|
+
* @member fields { [fieldName: string]: FieldSpec } - Fields specifications.
|
|
35
|
+
* @member maxPageSize {string} - Defines a maximum page size of a query supported by schema. Defaults are defined in DefaultMaxPageSize.
|
|
36
|
+
* @member storage - see {@link Storage}
|
|
37
|
+
* @member plugins - a map of plugins enabled for schema.
|
|
38
|
+
* @member version {number} - When Optimistic Locking is enabled, the version number is defined and increments on
|
|
39
|
+
* every schema change.
|
|
40
|
+
* @member ttl - number of seconds this schema can be safely cached for. We suggest a high number for schemas that are
|
|
41
|
+
* static in nature (that is user can not change them) and low number for those that can change. Schemas have little impact
|
|
42
|
+
* to data operations in a live, so it is safe to cache even schemas that change because of user actions; only exceptions are
|
|
43
|
+
* references and field deletion. Schemas are not cached in Editor segment.
|
|
44
|
+
* @member capabilities - see {@link Capabilities}
|
|
45
|
+
*/
|
|
46
|
+
export interface Schema {
|
|
47
|
+
displayName: string
|
|
48
|
+
namespace?: string | null
|
|
49
|
+
displayNamespace?: string | null
|
|
50
|
+
isDeleted?: boolean
|
|
51
|
+
id: string
|
|
52
|
+
ownerAppId?: string | null
|
|
53
|
+
allowedOperations?: DataOperation[]
|
|
54
|
+
collectionOperations?: CollectionOperation[]
|
|
55
|
+
permissions: Permissions | any // Allow for non-build breaking migration
|
|
56
|
+
dataPermissions?: DataPermissions
|
|
57
|
+
allowedPermissions?: AllowedDataPermissions
|
|
58
|
+
defaultSort?: OrderSpec | null
|
|
59
|
+
displayField?: string
|
|
60
|
+
fields: { [fieldName: string]: FieldSpec }
|
|
61
|
+
maxPageSize?: number
|
|
62
|
+
storage?: Storage
|
|
63
|
+
plugins?: SchemaPlugins
|
|
64
|
+
version?: number
|
|
65
|
+
ttl?: number | null
|
|
66
|
+
pagingMode?: PagingMode[]
|
|
67
|
+
capabilities?: Capabilities
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @member ownerAppId - required in DB driver schemas, see {@link Schema} for more details.
|
|
72
|
+
*/
|
|
73
|
+
export interface DbDriverSchema extends Schema {
|
|
74
|
+
ownerAppId: string,
|
|
75
|
+
namespace: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export enum DataOperation {
|
|
79
|
+
aggregate = 'aggregate',
|
|
80
|
+
bulkInsert = 'bulkInsert',
|
|
81
|
+
bulkRemove = 'bulkRemove',
|
|
82
|
+
bulkSave = 'bulkSave',
|
|
83
|
+
bulkUpdate = 'bulkUpdate',
|
|
84
|
+
count = 'count',
|
|
85
|
+
distinct = 'distinct',
|
|
86
|
+
find = 'find',
|
|
87
|
+
get = 'get',
|
|
88
|
+
insert = 'insert',
|
|
89
|
+
insertReference = 'insertReference',
|
|
90
|
+
isReferenced = 'isReferenced',
|
|
91
|
+
queryReferenced = 'queryReferenced',
|
|
92
|
+
remove = 'remove',
|
|
93
|
+
removeReference = 'removeReference',
|
|
94
|
+
replaceReferences = 'replaceReferences',
|
|
95
|
+
save = 'save',
|
|
96
|
+
truncate = 'truncate',
|
|
97
|
+
update = 'update',
|
|
98
|
+
patch = 'patch',
|
|
99
|
+
bulkPatch = 'bulkPatch'
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export enum CollectionOperation {
|
|
103
|
+
UPDATE = 'update',
|
|
104
|
+
REMOVE = 'remove'
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Defines permissions to be shown in Content Manager. User
|
|
109
|
+
* will see a read only list of permissions applied. The items
|
|
110
|
+
* displayed are determined from allowedOperations and the
|
|
111
|
+
* values are specified in this data structure.
|
|
112
|
+
*
|
|
113
|
+
* @deprecated use allowedPermissions to check current user or data permission service to configure permissions
|
|
114
|
+
*/
|
|
115
|
+
export interface Permissions {
|
|
116
|
+
read?: PermissionRole
|
|
117
|
+
update?: PermissionRole
|
|
118
|
+
insert?: PermissionRole
|
|
119
|
+
remove?: PermissionRole
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export enum PermissionRole {
|
|
123
|
+
/**
|
|
124
|
+
* Anyone (anonymous) can perform the operation
|
|
125
|
+
*/
|
|
126
|
+
anyone = 'anyone',
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* User of user can perform the operation
|
|
130
|
+
*/
|
|
131
|
+
siteMember = 'siteMember',
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* User of user who is the owner (producer) of the
|
|
135
|
+
* data can perform the operation.
|
|
136
|
+
*
|
|
137
|
+
* In regular Wix Data collections, this allows
|
|
138
|
+
* performing operation on an item if _owner field
|
|
139
|
+
* matches the currently logged Site Member id.
|
|
140
|
+
*
|
|
141
|
+
* In case of DB drivers, this can match the
|
|
142
|
+
* ownership that is appropriate to vertical, ex.:
|
|
143
|
+
* UoU can see his purchases, or contact can see
|
|
144
|
+
* his details.
|
|
145
|
+
*/
|
|
146
|
+
siteMemberAuthor = 'siteMemberAuthor',
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Site Admin can perform the operation.
|
|
150
|
+
*/
|
|
151
|
+
admin = 'admin'
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface DataPermissions {
|
|
155
|
+
itemRead: AccessLevel
|
|
156
|
+
itemInsert: AccessLevel
|
|
157
|
+
itemUpdate: AccessLevel
|
|
158
|
+
itemRemove: AccessLevel
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export enum AccessLevel {
|
|
162
|
+
/** Any subject, including visitors */
|
|
163
|
+
ANYONE = 'ANYONE',
|
|
164
|
+
|
|
165
|
+
/** Any signed-in user (both site members and collaborators) */
|
|
166
|
+
SITE_MEMBER = 'SITE_MEMBER',
|
|
167
|
+
|
|
168
|
+
/** Any signed-in user, but site members only have access to own items */
|
|
169
|
+
SITE_MEMBER_AUTHOR = 'SITE_MEMBER_AUTHOR',
|
|
170
|
+
|
|
171
|
+
/** Site collaborator that has a role with CMS Access permission */
|
|
172
|
+
CMS_EDITOR = 'CMS_EDITOR',
|
|
173
|
+
|
|
174
|
+
/** CMS administrators and users or roles granted with special access */
|
|
175
|
+
PRIVILEGED = 'PRIVILEGED'
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Defines actual allowed data operations
|
|
180
|
+
*/
|
|
181
|
+
export interface AllowedDataPermissions {
|
|
182
|
+
itemRead: boolean
|
|
183
|
+
itemInsert: boolean
|
|
184
|
+
itemUpdate: boolean
|
|
185
|
+
itemRemove: boolean
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export enum Storage {
|
|
189
|
+
/**
|
|
190
|
+
* DB driver collection
|
|
191
|
+
*/
|
|
192
|
+
driver = 'driver',
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* User collection
|
|
196
|
+
*/
|
|
197
|
+
docstore = 'docstore',
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* App builder collection
|
|
201
|
+
* @deprecated
|
|
202
|
+
* `Storage.staticAppSchema` should be used instead
|
|
203
|
+
*/
|
|
204
|
+
app = 'app',
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* External db driver collection
|
|
208
|
+
*/
|
|
209
|
+
external = 'external',
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Dynamic application collection. For example Forms collection.
|
|
213
|
+
* @deprecated
|
|
214
|
+
* `Storage.driver` should be used instead
|
|
215
|
+
*/
|
|
216
|
+
dynamicApplication = 'dynamicApplication',
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Static application collection. For example Blocks collection.
|
|
220
|
+
*/
|
|
221
|
+
staticAppSchema = 'staticAppSchema'
|
|
222
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"target": "es2017",
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"strictNullChecks": true,
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"outDir": "lib",
|
|
11
|
+
"baseUrl": "./src",
|
|
12
|
+
"skipLibCheck": true
|
|
13
|
+
},
|
|
14
|
+
"compileOnSave": true,
|
|
15
|
+
"include": [
|
|
16
|
+
"src/**/*"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @wix/patterns-fields-utils\n *\n * This package bundles various utilities and dependencies for fields.\n * Bundled packages are copied to the @wix/ directory and can be imported from there.\n *\n * Available bundled packages:\n * - @wix/patterns-fields-bundled-organize-media (photography organize media)\n * - @wix/patterns-fields-bundled-cm-media-utils (media URI parsing and URL generation)\n */\n\nexport {};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @wix/patterns-fields-utils
|
|
3
|
+
*
|
|
4
|
+
* This package bundles various utilities and dependencies for fields.
|
|
5
|
+
* Bundled packages are copied to the @wix/ directory and can be imported from there.
|
|
6
|
+
*
|
|
7
|
+
* Available bundled packages:
|
|
8
|
+
* - @wix/patterns-fields-bundled-organize-media (photography organize media)
|
|
9
|
+
* - @wix/patterns-fields-bundled-cm-media-utils (media URI parsing and URL generation)
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @wix/patterns-fields-utils
|
|
3
|
+
*
|
|
4
|
+
* This package bundles various utilities and dependencies for fields.
|
|
5
|
+
* Bundled packages are copied to the @wix/ directory and can be imported from there.
|
|
6
|
+
*
|
|
7
|
+
* Available bundled packages:
|
|
8
|
+
* - @wix/patterns-fields-bundled-organize-media (photography organize media)
|
|
9
|
+
* - @wix/patterns-fields-bundled-cm-media-utils (media URI parsing and URL generation)
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wix/patterns-fields-utils",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "UNLICENSED",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Kobi",
|
|
7
|
+
"email": "kobia@wix.com"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/cjs/index.js",
|
|
10
|
+
"module": "dist/esm/index.js",
|
|
11
|
+
"types": "dist/types/index.d.ts",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "yarn copy:bundled-modules && yoshi-library build",
|
|
15
|
+
"copy:bundled-modules": "ts-node -T --project tsconfig.scripts.json ./scripts/copy-bundled-modules.ts",
|
|
16
|
+
"start": "yoshi-library start",
|
|
17
|
+
"test": ":",
|
|
18
|
+
"lint": "yoshi-library lint",
|
|
19
|
+
"type-check": "tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist/cjs",
|
|
23
|
+
"dist/esm",
|
|
24
|
+
"dist/types",
|
|
25
|
+
"@wix"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@babel/runtime": "^7.0.0",
|
|
29
|
+
"classnames": "^2.5.1",
|
|
30
|
+
"lodash": "^4.17.21",
|
|
31
|
+
"path-parse": "^1.0.7",
|
|
32
|
+
"react-draggable": "^4.4.6",
|
|
33
|
+
"react-measure": "^2.5.2",
|
|
34
|
+
"tslib": "^2.0.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@wix/eslint-config-yoshi": "^6.74.0",
|
|
38
|
+
"@wix/jest-yoshi-preset": "^6.74.0",
|
|
39
|
+
"@wix/patterns-fields-bundled-cm-media-utils": "1.0.0",
|
|
40
|
+
"@wix/patterns-fields-bundled-organize-media": "1.0.0",
|
|
41
|
+
"@wix/wix-data-schema-types": "^2.0.26",
|
|
42
|
+
"@wix/yoshi-flow-library": "^6.74.0",
|
|
43
|
+
"ts-node": "^10.9.1",
|
|
44
|
+
"typescript": "~4.9.5"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"react": "^16.8.0 || ^18.0.0",
|
|
48
|
+
"react-dom": "^16.8.0 || ^18.0.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"react": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"react-dom": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"jest": {
|
|
59
|
+
"preset": "@wix/jest-yoshi-preset"
|
|
60
|
+
},
|
|
61
|
+
"eslintConfig": {
|
|
62
|
+
"extends": "@wix/eslint-config-yoshi",
|
|
63
|
+
"rules": {
|
|
64
|
+
"prettier/prettier": [
|
|
65
|
+
"warn",
|
|
66
|
+
{
|
|
67
|
+
"singleQuote": true,
|
|
68
|
+
"trailingComma": "all"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"usePrettierrc": false
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"wix": {
|
|
77
|
+
"artifact": {
|
|
78
|
+
"groupId": "com.wixpress",
|
|
79
|
+
"artifactId": "patterns-fields-utils"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"registry": "https://registry.npmjs.org/",
|
|
84
|
+
"access": "public"
|
|
85
|
+
},
|
|
86
|
+
"falconPackageHash": "dfa03e4129a3684d8c68060b0468ae2f1d83fbc0654d169bc3cbbc85"
|
|
87
|
+
}
|