@donotdev/crud 0.0.28 → 0.0.29

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.
@@ -1 +1 @@
1
- import{getCrudService as r}from"../CrudService";async function p(e,n){const s=r(),a=[],o=n.range?.start??1,t=n.range?.end??28;for(let c=o;c<=t;c++){const m=String(c),i=await s.get(n.path(e),m,n.schema);i&&a.push(i)}return a}async function d(e,n,s){const a=r();for(const o of s){const t=n.idOf(o);await a.set(n.path(e),t,o,n.schema)}}async function h(e,n,s){const a=r();if(n.idFrom){const o=n.idFrom(s);return a.set(n.path(e),o,s,n.schema)}return a.add(n.path(e),s,n.schema)}export{h as appendToCollection,p as loadDeterministicRange,d as upsertDeterministic};
1
+ import{getCrudService as o}from"../CrudService";async function p(a,e){const n=o(),s=[],t=e.range?.start??1,r=e.range?.end??28;for(let c=t;c<=r;c++){const m=String(c),i=await n.get(e.path(a),m,e.schema);i&&s.push(i)}return s}async function d(a,e,n){const s=o();for(const t of n){const r=e.idOf(t);await s.set(e.path(a),r,t,e.schema)}}async function h(a,e,n){const s=o();if(e.idFrom){const t=e.idFrom(n);return s.set(e.path(a),t,n,e.schema)}return s.add(e.path(a),n,e.schema)}export{h as appendToCollection,p as loadDeterministicRange,d as upsertDeterministic};
@@ -1 +1 @@
1
- "use client";function u(t){return!t||typeof t!="string"?!1:t.startsWith("https://")&&!t.startsWith("blob:")}function h(t){return!(!t||typeof t!="object"||!u(t.fullUrl)||t.thumbUrl&&!u(t.thumbUrl))}function i(t,e=""){const o=[];if(t==null)return o;if(typeof t=="string")return t.startsWith("blob:")&&o.push(e||"root"),o;if(typeof t!="object")return o;if(Array.isArray(t))t.forEach((s,r)=>{const n=e?`${e}[${r}]`:`[${r}]`;o.push(...i(s,n))});else{const s=t;if(s.fullUrl!==void 0&&s.thumbUrl!==void 0){const r=s.fullUrl,n=s.thumbUrl,l=typeof r=="string"&&!u(r),c=n&&typeof n=="string"&&!u(n);if(l||c){const f=e||"root";o.push(`${f}.fullUrl or ${f}.thumbUrl contains blob URL`)}}else Object.entries(s).forEach(([r,n])=>{const l=e?`${e}.${r}`:r;o.push(...i(n,l))})}return o}function b(t){return i(t).length>0}export{i as checkForBlobUrls,b as hasBlobUrls,u as isStorageUrl,h as validatePicture};
1
+ "use client";function u(t){return!t||typeof t!="string"?!1:t.startsWith("https://")&&!t.startsWith("blob:")}function h(t){return!(!t||typeof t!="object"||!u(t.fullUrl)||t.thumbUrl&&!u(t.thumbUrl))}function i(t,e=""){const s=[];if(t==null)return s;if(typeof t=="string")return t.startsWith("blob:")&&s.push(e||"root"),s;if(typeof t!="object")return s;if(Array.isArray(t))t.forEach((l,o)=>{const r=e?`${e}[${o}]`:`[${o}]`;s.push(...i(l,r))});else{const l=t;if(l.fullUrl!==void 0&&l.thumbUrl!==void 0){const o=l.fullUrl,r=l.thumbUrl,n=typeof o=="string"&&!u(o),c=r&&typeof r=="string"&&!u(r);if(n||c){const f=e||"root";s.push(`${f}.fullUrl or ${f}.thumbUrl contains blob URL`)}}else Object.entries(l).forEach(([o,r])=>{const n=e?`${e}.${o}`:o;s.push(...i(r,n))})}return s}function b(t){return i(t).length>0}export{i as checkForBlobUrls,b as hasBlobUrls,u as isStorageUrl,h as validatePicture};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/crud",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -53,8 +53,8 @@
53
53
  "@dnd-kit/core": "^6.3.1",
54
54
  "@dnd-kit/sortable": "^10.0.0",
55
55
  "@dnd-kit/utilities": "^3.2.2",
56
- "@donotdev/components": "^0.0.29",
57
- "@donotdev/core": "^0.0.40",
56
+ "@donotdev/components": "^0.0.30",
57
+ "@donotdev/core": "^0.0.41",
58
58
  "@hookform/resolvers": "^5.2.2",
59
59
  "dompurify": "^3.3.2",
60
60
  "react-easy-crop": "^5.5.6"