@timardex/cluemart-server-shared 1.0.42 → 1.0.43
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/{chunk-JNKHAKC6.mjs → chunk-QA4UVYI6.mjs} +57 -166
- package/dist/chunk-QA4UVYI6.mjs.map +1 -0
- package/dist/index.cjs +56 -165
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +56 -165
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +56 -165
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +56 -165
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-JNKHAKC6.mjs.map +0 -1
|
@@ -397,8 +397,8 @@ var require_react_production = __commonJS({
|
|
|
397
397
|
exports.useDeferredValue = function(value, initialValue) {
|
|
398
398
|
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
399
399
|
};
|
|
400
|
-
exports.useEffect = function(
|
|
401
|
-
return ReactSharedInternals.H.useEffect(
|
|
400
|
+
exports.useEffect = function(create, deps) {
|
|
401
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
402
402
|
};
|
|
403
403
|
exports.useEffectEvent = function(callback) {
|
|
404
404
|
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
@@ -406,17 +406,17 @@ var require_react_production = __commonJS({
|
|
|
406
406
|
exports.useId = function() {
|
|
407
407
|
return ReactSharedInternals.H.useId();
|
|
408
408
|
};
|
|
409
|
-
exports.useImperativeHandle = function(ref,
|
|
410
|
-
return ReactSharedInternals.H.useImperativeHandle(ref,
|
|
409
|
+
exports.useImperativeHandle = function(ref, create, deps) {
|
|
410
|
+
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
411
411
|
};
|
|
412
|
-
exports.useInsertionEffect = function(
|
|
413
|
-
return ReactSharedInternals.H.useInsertionEffect(
|
|
412
|
+
exports.useInsertionEffect = function(create, deps) {
|
|
413
|
+
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
414
414
|
};
|
|
415
|
-
exports.useLayoutEffect = function(
|
|
416
|
-
return ReactSharedInternals.H.useLayoutEffect(
|
|
415
|
+
exports.useLayoutEffect = function(create, deps) {
|
|
416
|
+
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
417
417
|
};
|
|
418
|
-
exports.useMemo = function(
|
|
419
|
-
return ReactSharedInternals.H.useMemo(
|
|
418
|
+
exports.useMemo = function(create, deps) {
|
|
419
|
+
return ReactSharedInternals.H.useMemo(create, deps);
|
|
420
420
|
};
|
|
421
421
|
exports.useOptimistic = function(passthrough, reducer) {
|
|
422
422
|
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
@@ -1358,11 +1358,11 @@ var require_react_development = __commonJS({
|
|
|
1358
1358
|
exports.useDeferredValue = function(value, initialValue) {
|
|
1359
1359
|
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
1360
1360
|
};
|
|
1361
|
-
exports.useEffect = function(
|
|
1362
|
-
null ==
|
|
1361
|
+
exports.useEffect = function(create, deps) {
|
|
1362
|
+
null == create && console.warn(
|
|
1363
1363
|
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1364
1364
|
);
|
|
1365
|
-
return resolveDispatcher().useEffect(
|
|
1365
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
1366
1366
|
};
|
|
1367
1367
|
exports.useEffectEvent = function(callback) {
|
|
1368
1368
|
return resolveDispatcher().useEffectEvent(callback);
|
|
@@ -1370,23 +1370,23 @@ var require_react_development = __commonJS({
|
|
|
1370
1370
|
exports.useId = function() {
|
|
1371
1371
|
return resolveDispatcher().useId();
|
|
1372
1372
|
};
|
|
1373
|
-
exports.useImperativeHandle = function(ref,
|
|
1374
|
-
return resolveDispatcher().useImperativeHandle(ref,
|
|
1373
|
+
exports.useImperativeHandle = function(ref, create, deps) {
|
|
1374
|
+
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
1375
1375
|
};
|
|
1376
|
-
exports.useInsertionEffect = function(
|
|
1377
|
-
null ==
|
|
1376
|
+
exports.useInsertionEffect = function(create, deps) {
|
|
1377
|
+
null == create && console.warn(
|
|
1378
1378
|
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1379
1379
|
);
|
|
1380
|
-
return resolveDispatcher().useInsertionEffect(
|
|
1380
|
+
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
1381
1381
|
};
|
|
1382
|
-
exports.useLayoutEffect = function(
|
|
1383
|
-
null ==
|
|
1382
|
+
exports.useLayoutEffect = function(create, deps) {
|
|
1383
|
+
null == create && console.warn(
|
|
1384
1384
|
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1385
1385
|
);
|
|
1386
|
-
return resolveDispatcher().useLayoutEffect(
|
|
1386
|
+
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
1387
1387
|
};
|
|
1388
|
-
exports.useMemo = function(
|
|
1389
|
-
return resolveDispatcher().useMemo(
|
|
1388
|
+
exports.useMemo = function(create, deps) {
|
|
1389
|
+
return resolveDispatcher().useMemo(create, deps);
|
|
1390
1390
|
};
|
|
1391
1391
|
exports.useOptimistic = function(passthrough, reducer) {
|
|
1392
1392
|
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
@@ -6745,131 +6745,6 @@ var TupleSchema = class extends Schema {
|
|
|
6745
6745
|
}
|
|
6746
6746
|
};
|
|
6747
6747
|
create$1.prototype = TupleSchema.prototype;
|
|
6748
|
-
function create(builder) {
|
|
6749
|
-
return new Lazy(builder);
|
|
6750
|
-
}
|
|
6751
|
-
function catchValidationError(fn) {
|
|
6752
|
-
try {
|
|
6753
|
-
return fn();
|
|
6754
|
-
} catch (err) {
|
|
6755
|
-
if (ValidationError.isError(err)) return Promise.reject(err);
|
|
6756
|
-
throw err;
|
|
6757
|
-
}
|
|
6758
|
-
}
|
|
6759
|
-
var Lazy = class _Lazy {
|
|
6760
|
-
constructor(builder) {
|
|
6761
|
-
this.type = "lazy";
|
|
6762
|
-
this.__isYupSchema__ = true;
|
|
6763
|
-
this.spec = void 0;
|
|
6764
|
-
this._resolve = (value, options = {}) => {
|
|
6765
|
-
let schema13 = this.builder(value, options);
|
|
6766
|
-
if (!isSchema(schema13)) throw new TypeError("lazy() functions must return a valid schema");
|
|
6767
|
-
if (this.spec.optional) schema13 = schema13.optional();
|
|
6768
|
-
return schema13.resolve(options);
|
|
6769
|
-
};
|
|
6770
|
-
this.builder = builder;
|
|
6771
|
-
this.spec = {
|
|
6772
|
-
meta: void 0,
|
|
6773
|
-
optional: false
|
|
6774
|
-
};
|
|
6775
|
-
}
|
|
6776
|
-
clone(spec) {
|
|
6777
|
-
const next = new _Lazy(this.builder);
|
|
6778
|
-
next.spec = Object.assign({}, this.spec, spec);
|
|
6779
|
-
return next;
|
|
6780
|
-
}
|
|
6781
|
-
optionality(optional) {
|
|
6782
|
-
const next = this.clone({
|
|
6783
|
-
optional
|
|
6784
|
-
});
|
|
6785
|
-
return next;
|
|
6786
|
-
}
|
|
6787
|
-
optional() {
|
|
6788
|
-
return this.optionality(true);
|
|
6789
|
-
}
|
|
6790
|
-
resolve(options) {
|
|
6791
|
-
return this._resolve(options.value, options);
|
|
6792
|
-
}
|
|
6793
|
-
cast(value, options) {
|
|
6794
|
-
return this._resolve(value, options).cast(value, options);
|
|
6795
|
-
}
|
|
6796
|
-
asNestedTest(config) {
|
|
6797
|
-
let {
|
|
6798
|
-
key,
|
|
6799
|
-
index,
|
|
6800
|
-
parent,
|
|
6801
|
-
options
|
|
6802
|
-
} = config;
|
|
6803
|
-
let value = parent[index != null ? index : key];
|
|
6804
|
-
return this._resolve(value, Object.assign({}, options, {
|
|
6805
|
-
value,
|
|
6806
|
-
parent
|
|
6807
|
-
})).asNestedTest(config);
|
|
6808
|
-
}
|
|
6809
|
-
validate(value, options) {
|
|
6810
|
-
return catchValidationError(() => this._resolve(value, options).validate(value, options));
|
|
6811
|
-
}
|
|
6812
|
-
validateSync(value, options) {
|
|
6813
|
-
return this._resolve(value, options).validateSync(value, options);
|
|
6814
|
-
}
|
|
6815
|
-
validateAt(path, value, options) {
|
|
6816
|
-
return catchValidationError(() => this._resolve(value, options).validateAt(path, value, options));
|
|
6817
|
-
}
|
|
6818
|
-
validateSyncAt(path, value, options) {
|
|
6819
|
-
return this._resolve(value, options).validateSyncAt(path, value, options);
|
|
6820
|
-
}
|
|
6821
|
-
isValid(value, options) {
|
|
6822
|
-
try {
|
|
6823
|
-
return this._resolve(value, options).isValid(value, options);
|
|
6824
|
-
} catch (err) {
|
|
6825
|
-
if (ValidationError.isError(err)) {
|
|
6826
|
-
return Promise.resolve(false);
|
|
6827
|
-
}
|
|
6828
|
-
throw err;
|
|
6829
|
-
}
|
|
6830
|
-
}
|
|
6831
|
-
isValidSync(value, options) {
|
|
6832
|
-
return this._resolve(value, options).isValidSync(value, options);
|
|
6833
|
-
}
|
|
6834
|
-
describe(options) {
|
|
6835
|
-
return options ? this.resolve(options).describe(options) : {
|
|
6836
|
-
type: "lazy",
|
|
6837
|
-
meta: this.spec.meta,
|
|
6838
|
-
label: void 0
|
|
6839
|
-
};
|
|
6840
|
-
}
|
|
6841
|
-
meta(...args) {
|
|
6842
|
-
if (args.length === 0) return this.spec.meta;
|
|
6843
|
-
let next = this.clone();
|
|
6844
|
-
next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);
|
|
6845
|
-
return next;
|
|
6846
|
-
}
|
|
6847
|
-
get ["~standard"]() {
|
|
6848
|
-
const schema13 = this;
|
|
6849
|
-
const standard = {
|
|
6850
|
-
version: 1,
|
|
6851
|
-
vendor: "yup",
|
|
6852
|
-
async validate(value) {
|
|
6853
|
-
try {
|
|
6854
|
-
const result = await schema13.validate(value, {
|
|
6855
|
-
abortEarly: false
|
|
6856
|
-
});
|
|
6857
|
-
return {
|
|
6858
|
-
value: result
|
|
6859
|
-
};
|
|
6860
|
-
} catch (err) {
|
|
6861
|
-
if (ValidationError.isError(err)) {
|
|
6862
|
-
return {
|
|
6863
|
-
issues: issuesFromValidationError(err)
|
|
6864
|
-
};
|
|
6865
|
-
}
|
|
6866
|
-
throw err;
|
|
6867
|
-
}
|
|
6868
|
-
}
|
|
6869
|
-
};
|
|
6870
|
-
return standard;
|
|
6871
|
-
}
|
|
6872
|
-
};
|
|
6873
6748
|
|
|
6874
6749
|
// node_modules/@timardex/cluemart-shared/dist/index.mjs
|
|
6875
6750
|
var React2 = __toESM(require_react(), 1);
|
|
@@ -9916,6 +9791,14 @@ var GET_POST = gql`
|
|
|
9916
9791
|
}
|
|
9917
9792
|
${POST_FIELDS_FRAGMENT}
|
|
9918
9793
|
`;
|
|
9794
|
+
var GET_POSTS_BY_TYPE = gql`
|
|
9795
|
+
query getPostsByType($postType: PostTypeEnum!) {
|
|
9796
|
+
postsByType(postType: $postType) {
|
|
9797
|
+
...PostFields
|
|
9798
|
+
}
|
|
9799
|
+
}
|
|
9800
|
+
${POST_FIELDS_FRAGMENT}
|
|
9801
|
+
`;
|
|
9919
9802
|
var CREATE_POST_MUTATION = gql`
|
|
9920
9803
|
mutation createPost($input: PostInputType!) {
|
|
9921
9804
|
createPost(input: $input) {
|
|
@@ -10521,25 +10404,33 @@ var listContentSchema = create$3({
|
|
|
10521
10404
|
title: create$6().optional()
|
|
10522
10405
|
}).required()
|
|
10523
10406
|
});
|
|
10524
|
-
var contentDataSchema = create((
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10407
|
+
var contentDataSchema = create$8().required("Content data is required").test(
|
|
10408
|
+
"contentData-by-type",
|
|
10409
|
+
"Invalid content data for content type",
|
|
10410
|
+
function(value) {
|
|
10411
|
+
const { contentType } = this.parent;
|
|
10412
|
+
const schema13 = (() => {
|
|
10413
|
+
switch (contentType) {
|
|
10414
|
+
case "cover":
|
|
10415
|
+
return coverContentSchema;
|
|
10416
|
+
case "textarea":
|
|
10417
|
+
return textareaContentSchema;
|
|
10418
|
+
case "image":
|
|
10419
|
+
return imagesContentSchema;
|
|
10420
|
+
case "video":
|
|
10421
|
+
return videoContentSchema;
|
|
10422
|
+
case "list":
|
|
10423
|
+
return listContentSchema;
|
|
10424
|
+
default:
|
|
10425
|
+
return null;
|
|
10426
|
+
}
|
|
10427
|
+
})();
|
|
10428
|
+
if (!schema13) return false;
|
|
10429
|
+
return schema13.isValidSync(value);
|
|
10539
10430
|
}
|
|
10540
|
-
|
|
10431
|
+
);
|
|
10541
10432
|
var postContentSchema = create$3().shape({
|
|
10542
|
-
contentData: contentDataSchema
|
|
10433
|
+
contentData: contentDataSchema,
|
|
10543
10434
|
contentOrder: create$5().min(0).required(),
|
|
10544
10435
|
contentType: create$8().oneOf(Object.values(EnumPostContentType)).required()
|
|
10545
10436
|
});
|
|
@@ -11801,4 +11692,4 @@ react/cjs/react.development.js:
|
|
|
11801
11692
|
* LICENSE file in the root directory of this source tree.
|
|
11802
11693
|
*)
|
|
11803
11694
|
*/
|
|
11804
|
-
//# sourceMappingURL=chunk-
|
|
11695
|
+
//# sourceMappingURL=chunk-QA4UVYI6.mjs.map
|