@stackbit/cms-core 1.0.15-develop.2 → 1.0.15-staging.1
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/dist/utils/custom-search-filters.d.ts +12 -0
- package/dist/utils/custom-search-filters.d.ts.map +1 -0
- package/dist/utils/custom-search-filters.js +46 -0
- package/dist/utils/custom-search-filters.js.map +1 -0
- package/package.json +5 -5
- package/dist/connector/model-converter.d.mts +0 -3
- package/dist/connector/model-converter.d.mts.map +0 -1
- package/dist/connector/model-converter.mjs +0 -138
- package/dist/connector/model-converter.mjs.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as ContentStoreTypes from '../types';
|
|
2
|
+
import { SearchFilterItem } from '../types';
|
|
3
|
+
import { ScheduledAction } from '@stackbit/types';
|
|
4
|
+
import { SchemaForSearch } from './search-utils';
|
|
5
|
+
declare type CustomFilterMethod = (filter: SearchFilterItem, document: ContentStoreTypes.Document, opts: {
|
|
6
|
+
locale?: string;
|
|
7
|
+
schema: SchemaForSearch;
|
|
8
|
+
activeScheduledActionsByDocumentId: Record<string, ScheduledAction[]>;
|
|
9
|
+
}) => boolean;
|
|
10
|
+
export declare const CUSTOM_FILTERS: Record<string, CustomFilterMethod>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=custom-search-filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-search-filters.d.ts","sourceRoot":"","sources":["../../src/utils/custom-search-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAqB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAiE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEhH,aAAK,kBAAkB,GAAG,CACtB,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,EACpC,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAC;IAAC,kCAAkC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAA;CAAE,KACxH,OAAO,CAAC;AAEb,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAwC7D,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CUSTOM_FILTERS = void 0;
|
|
4
|
+
const search_utils_1 = require("./search-utils");
|
|
5
|
+
exports.CUSTOM_FILTERS = {
|
|
6
|
+
hasSchedules: (filter, document, opts) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const field = {
|
|
9
|
+
type: 'boolean',
|
|
10
|
+
value: !!((_a = opts.activeScheduledActionsByDocumentId[document.srcObjectId]) === null || _a === void 0 ? void 0 : _a.length)
|
|
11
|
+
};
|
|
12
|
+
return (0, search_utils_1.isBooleanFieldMatches)({ field, filter, locale: opts.locale });
|
|
13
|
+
},
|
|
14
|
+
scheduledActionId: (filter, document, opts) => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const field = {
|
|
17
|
+
type: 'list',
|
|
18
|
+
items: (_b = (_a = opts.activeScheduledActionsByDocumentId[document.srcObjectId]) === null || _a === void 0 ? void 0 : _a.map((scheduledAction) => ({
|
|
19
|
+
type: 'string',
|
|
20
|
+
value: scheduledAction.id
|
|
21
|
+
}))) !== null && _b !== void 0 ? _b : []
|
|
22
|
+
};
|
|
23
|
+
const model = {
|
|
24
|
+
type: 'object',
|
|
25
|
+
name: '',
|
|
26
|
+
fields: [
|
|
27
|
+
{
|
|
28
|
+
name: '',
|
|
29
|
+
type: 'list',
|
|
30
|
+
items: {
|
|
31
|
+
type: 'string'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
return (0, search_utils_1.isListFieldMatches)({ field, filter, model, locale: opts.locale, document });
|
|
37
|
+
},
|
|
38
|
+
scheduledActionDate: (filter, document, opts) => {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
return ((_b = (_a = opts.activeScheduledActionsByDocumentId[document.srcObjectId]) === null || _a === void 0 ? void 0 : _a.some((scheduledAction) => {
|
|
41
|
+
const field = { type: 'date', value: scheduledAction.executeAt };
|
|
42
|
+
return (0, search_utils_1.isDateFieldMatches)({ field, filter, locale: opts.locale });
|
|
43
|
+
})) !== null && _b !== void 0 ? _b : false);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=custom-search-filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-search-filters.js","sourceRoot":"","sources":["../../src/utils/custom-search-filters.ts"],"names":[],"mappings":";;;AAIA,iDAAgH;AAQnG,QAAA,cAAc,GAAuC;IAC9D,YAAY,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;;QACrC,MAAM,KAAK,GAAG;YACV,IAAI,EAAE,SAAkB;YACxB,KAAK,EAAE,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,kCAAkC,CAAC,QAAQ,CAAC,WAAW,CAAC,0CAAE,MAAM,CAAA;SACjF,CAAC;QACF,OAAO,IAAA,oCAAqB,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,iBAAiB,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;;QAC1C,MAAM,KAAK,GAAsB;YAC7B,IAAI,EAAE,MAAM;YACZ,KAAK,EACD,MAAA,MAAA,IAAI,CAAC,kCAAkC,CAAC,QAAQ,CAAC,WAAW,CAAC,0CAAE,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;gBACrF,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,eAAe,CAAC,EAAE;aAC5B,CAAC,CAAC,mCAAI,EAAE;SAChB,CAAC;QACF,MAAM,KAAK,GAAU;YACjB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,EAAE;YACR,MAAM,EAAE;gBACJ;oBACI,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE;wBACH,IAAI,EAAE,QAAQ;qBACjB;iBACJ;aACJ;SACJ,CAAC;QACF,OAAO,IAAA,iCAAkB,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvF,CAAC;IACD,mBAAmB,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;;QAC5C,OAAO,CACH,MAAA,MAAA,IAAI,CAAC,kCAAkC,CAAC,QAAQ,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;YACpF,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,MAAe,EAAE,KAAK,EAAE,eAAe,CAAC,SAAS,EAAE,CAAC;YAC1E,OAAO,IAAA,iCAAkB,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC,mCAAI,KAAK,CACd,CAAC;IACN,CAAC;CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackbit/cms-core",
|
|
3
|
-
"version": "1.0.15-
|
|
3
|
+
"version": "1.0.15-staging.1",
|
|
4
4
|
"description": "stackbit-dev",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@babel/traverse": "^7.11.5",
|
|
27
27
|
"@iarna/toml": "^2.2.3",
|
|
28
28
|
"@netlify/sdk": "^1.17.2",
|
|
29
|
-
"@stackbit/sdk": "1.0.15-
|
|
30
|
-
"@stackbit/types": "0.11.4-
|
|
31
|
-
"@stackbit/utils": "0.4.4-
|
|
29
|
+
"@stackbit/sdk": "1.0.15-staging.1",
|
|
30
|
+
"@stackbit/types": "0.11.4-staging.1",
|
|
31
|
+
"@stackbit/utils": "0.4.4-staging.1",
|
|
32
32
|
"chalk": "^4.0.1",
|
|
33
33
|
"content-engine": "0.0.29",
|
|
34
34
|
"esm": "^3.2.25",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"slugify": "^1.6.5",
|
|
45
45
|
"uuid": "^9.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "beb3ec87b3b12e0d354d7aa8b1a81160de3ac3ee"
|
|
48
48
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-converter.d.mts","sourceRoot":"","sources":["../../src/connector/model-converter.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,mEAYrD"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
export function convertModels(models) {
|
|
2
|
-
const createModels = [];
|
|
3
|
-
models.forEach((model) => {
|
|
4
|
-
if (model.getTypeName() === `Image`) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
const createModel = convertModel(model, models);
|
|
8
|
-
if (createModel) {
|
|
9
|
-
createModels.push(createModel);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
return createModels;
|
|
13
|
-
}
|
|
14
|
-
function convertModel(model, models) {
|
|
15
|
-
let fieldGroups = model.fieldGroups;
|
|
16
|
-
if (model.devOnlyFieldGroup) {
|
|
17
|
-
fieldGroups || (fieldGroups = []);
|
|
18
|
-
fieldGroups.push(model.devOnlyFieldGroup);
|
|
19
|
-
}
|
|
20
|
-
// Create doesn't have named union types
|
|
21
|
-
if (model.isUnionType) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
const name = model.originalName || model.typeName;
|
|
25
|
-
const csiModel = {
|
|
26
|
-
name: name,
|
|
27
|
-
label: model.label || model.name,
|
|
28
|
-
type: model.isObjectType ? `object` : `data`,
|
|
29
|
-
fieldGroups,
|
|
30
|
-
fields: sdkFieldsToStackbitFields(model.fields, models)
|
|
31
|
-
};
|
|
32
|
-
return csiModel;
|
|
33
|
-
}
|
|
34
|
-
function sdkFieldsToStackbitFields(fields, models) {
|
|
35
|
-
return fields.map((field) => {
|
|
36
|
-
const definedTypename = field.type;
|
|
37
|
-
const fieldModel = models.get(definedTypename);
|
|
38
|
-
const typename = fieldModel?.originalName || definedTypename;
|
|
39
|
-
const isObject = fieldModel?.isObjectType;
|
|
40
|
-
const scalarTypename = isObject
|
|
41
|
-
? `object`
|
|
42
|
-
: {
|
|
43
|
-
// create only has a number field
|
|
44
|
-
float: 'number',
|
|
45
|
-
int: 'number'
|
|
46
|
-
}[typename.toLowerCase()] ||
|
|
47
|
-
// all other scalar types are supported as lowercase typenames
|
|
48
|
-
typename.toLowerCase();
|
|
49
|
-
const isImage = typename === `Image`;
|
|
50
|
-
const isReference = !isImage && fieldModel?.isNodeType;
|
|
51
|
-
const isUnion = fieldModel?.isUnionType;
|
|
52
|
-
const firstUnionType = isUnion && fieldModel?.compositeTypes && models.get(fieldModel.compositeTypes[0]);
|
|
53
|
-
const isObjectUnion = firstUnionType && firstUnionType.isObjectType;
|
|
54
|
-
const isReferenceUnion = firstUnionType && firstUnionType.isNodeType;
|
|
55
|
-
const type = (() => {
|
|
56
|
-
if ( /*isObject || */isObjectUnion) {
|
|
57
|
-
return `model`;
|
|
58
|
-
}
|
|
59
|
-
if (isReference || isReferenceUnion) {
|
|
60
|
-
return `reference`;
|
|
61
|
-
}
|
|
62
|
-
if (isUnion) {
|
|
63
|
-
// throw new ModelError(`Unhandled union type for model ${typename}. This is a bug in the Netlify SDK.`);
|
|
64
|
-
}
|
|
65
|
-
if (isImage) {
|
|
66
|
-
return `image`;
|
|
67
|
-
}
|
|
68
|
-
return scalarTypename;
|
|
69
|
-
})();
|
|
70
|
-
const stackbitField = {
|
|
71
|
-
type,
|
|
72
|
-
name: field.name
|
|
73
|
-
};
|
|
74
|
-
if (typename.toLowerCase() === `float`) {
|
|
75
|
-
stackbitField.subtype = `float`;
|
|
76
|
-
}
|
|
77
|
-
//TODO
|
|
78
|
-
if (isObject) {
|
|
79
|
-
stackbitField.fields = fieldModel.sdkFieldsToStackbitFields();
|
|
80
|
-
}
|
|
81
|
-
// if (isObject) {
|
|
82
|
-
// (stackbitField as CSITypes.FieldModelProps).models = [typename];
|
|
83
|
-
// }
|
|
84
|
-
// if (isObjectUnion) {
|
|
85
|
-
// (stackbitField as CSITypes.FieldModelProps).models = fieldModel.compositeTypes.map((ct: any) => {
|
|
86
|
-
// const fullType = models.get(ct);
|
|
87
|
-
// return fullType!.getOriginalName();
|
|
88
|
-
// });
|
|
89
|
-
// }
|
|
90
|
-
// any field names starting with _ are internal mandatory fields.
|
|
91
|
-
// they shouldn't be set as required in the Create UI as content admins
|
|
92
|
-
// don't need to set these fields, connector authors do.
|
|
93
|
-
if (`required` in field && !field.name.startsWith(`_`)) {
|
|
94
|
-
stackbitField.required = field.required;
|
|
95
|
-
}
|
|
96
|
-
if (`label` in field) {
|
|
97
|
-
stackbitField.label = field.label;
|
|
98
|
-
}
|
|
99
|
-
if (`hidden` in field) {
|
|
100
|
-
stackbitField.hidden = field.hidden;
|
|
101
|
-
}
|
|
102
|
-
if (`readOnly` in field) {
|
|
103
|
-
stackbitField.readOnly = field.readOnly;
|
|
104
|
-
}
|
|
105
|
-
if (`localized` in field) {
|
|
106
|
-
stackbitField.localized = field.localized;
|
|
107
|
-
}
|
|
108
|
-
if (`defaultValue` in field) {
|
|
109
|
-
stackbitField.default = field.defaultValue;
|
|
110
|
-
}
|
|
111
|
-
if (`group` in field) {
|
|
112
|
-
stackbitField.group = field.group;
|
|
113
|
-
}
|
|
114
|
-
if (isUnion) {
|
|
115
|
-
stackbitField.models = (fieldModel.compositeTypes || []).map((ct) => {
|
|
116
|
-
const fullType = models.get(ct);
|
|
117
|
-
return fullType.getOriginalName();
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
else if (isReference) {
|
|
121
|
-
stackbitField.models = [fieldModel.getOriginalName()];
|
|
122
|
-
}
|
|
123
|
-
if (field.list) {
|
|
124
|
-
const { name, required, hidden, ...items } = stackbitField;
|
|
125
|
-
return {
|
|
126
|
-
name,
|
|
127
|
-
required,
|
|
128
|
-
hidden,
|
|
129
|
-
type: `list`,
|
|
130
|
-
items
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
return stackbitField;
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=model-converter.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-converter.mjs","sourceRoot":"","sources":["../../src/connector/model-converter.mts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAC,MAAwB;IAClD,MAAM,YAAY,GAAkD,EAAE,CAAC;IACvE,MAAM,CAAC,OAAO,CAAC,CAAC,KAAU,EAAE,EAAE;QAC1B,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE;YACjC,OAAO;SACV;QACD,MAAM,WAAW,GAAG,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAChD,IAAI,WAAW,EAAE;YACb,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAClC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;AACxB,CAAC;AAED,SAAS,YAAY,CAAC,KAAU,EAAE,MAAW;IACzC,IAAI,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