@donotdev/crud 0.0.30 → 0.1.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/LICENSE.md +3 -3
- package/dist/CrudService.d.ts +4 -4
- package/dist/CrudStore.d.ts +1 -1
- package/dist/FieldRegistry.d.ts +1 -1
- package/dist/FieldRegistry.d.ts.map +1 -1
- package/dist/adapters/FunctionsAdapter.d.ts +3 -3
- package/dist/adapters/FunctionsAdapter.d.ts.map +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/builtinFieldTypes.d.ts +1 -1
- package/dist/components/CrudCard.d.ts.map +1 -1
- package/dist/components/CrudCard.js +1 -1
- package/dist/components/DisplayFieldRenderer.d.ts +1 -1
- package/dist/components/DisplayThumbnail.d.ts +1 -1
- package/dist/components/FormLayout.d.ts +1 -1
- package/dist/components/fields/display/AvatarFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/BadgeFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/ButtonFieldDisplay.d.ts +2 -2
- package/dist/components/fields/display/CheckboxFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/DateFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/DropdownDisplay.d.ts +1 -1
- package/dist/components/fields/display/FileFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/GeoPointFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/HiddenFieldDisplay.d.ts +2 -2
- package/dist/components/fields/display/ImageFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/LinkFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/MapFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/MultiDropdownDisplay.d.ts +1 -1
- package/dist/components/fields/display/MultiInputTextFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/NumberFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/PasswordFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/PhoneNumberDisplay.d.ts +1 -1
- package/dist/components/fields/display/RadioFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/RangeFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/ReferenceFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/RichTextDisplay.d.ts +1 -1
- package/dist/components/fields/display/TextAreaDisplay.d.ts +1 -1
- package/dist/components/fields/display/TextFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/TimestampFieldDisplay.d.ts +1 -1
- package/dist/components/fields/display/index.d.ts +1 -1
- package/dist/components/form/fields/AvatarFieldComponent.d.ts +2 -2
- package/dist/components/form/fields/BadgeFieldComponent.d.ts +2 -2
- package/dist/components/form/fields/CheckboxFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/ComboboxComponent.d.ts +1 -1
- package/dist/components/form/fields/CurrencyFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/DateFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/DropdownComponent.d.ts +1 -1
- package/dist/components/form/fields/GdprConsentFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/GeoPointFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/HiddenFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/MultiDropdownComponent.d.ts +1 -1
- package/dist/components/form/fields/NumberFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/PasswordFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/PhoneNumberComponent.d.ts +1 -1
- package/dist/components/form/fields/RangeFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/RatingFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/RichTextComponent.d.ts +1 -1
- package/dist/components/form/fields/SwitchFieldComponent.d.ts +1 -1
- package/dist/components/form/fields/TextAreaComponent.d.ts +1 -1
- package/dist/components/form/fields/TextFieldComponent.d.ts +2 -2
- package/dist/components/form/fields/index.d.ts +1 -1
- package/dist/components/form/fields/internal/TiptapEditor.d.ts +1 -1
- package/dist/components/form/fields/types.d.ts +1 -1
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/fieldTypeRegistry.d.ts.map +1 -1
- package/dist/fieldTypeRegistry.types.d.ts.map +1 -1
- package/dist/forms/hooks/index.d.ts +1 -1
- package/dist/forms/hooks/useEntityField.d.ts +1 -1
- package/dist/forms/hooks/useEntityForm.d.ts.map +1 -1
- package/dist/forms/index.d.ts +1 -1
- package/dist/forms/types.d.ts +7 -7
- package/dist/forms/utils/getFieldsForOperation.d.ts +2 -2
- package/dist/forms/utils/index.d.ts +1 -1
- package/dist/forms/utils/isFieldEditable.d.ts +1 -1
- package/dist/forms/utils/translateFieldLabel.d.ts +3 -3
- package/dist/forms/utils/validateEntity.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +4 -4
- package/dist/utils/clientListProcessing.d.ts +1 -1
- package/dist/utils/collections.d.ts +6 -6
- package/dist/utils/imageProcessing.d.ts +1 -1
- package/dist/utils/imageUtils.d.ts +1 -1
- package/dist/utils/imageUtils.js +1 -1
- package/dist/utils/matchesFilter.d.ts.map +1 -1
- package/dist/utils/sanitizeHtml.d.ts +0 -5
- package/dist/utils/sanitizeHtml.d.ts.map +1 -1
- package/dist/utils/sanitizeHtml.js +1 -1
- package/dist/utils/uploadValidation.d.ts +1 -1
- package/dist/workflows/WorkflowPersistence.d.ts +1 -1
- package/dist/workflows/defineWorkflow.d.ts +1 -1
- package/dist/workflows/index.d.ts +1 -1
- package/package.json +3 -3
package/LICENSE.md
CHANGED
|
@@ -8,7 +8,7 @@ Copyright © 2025 Ambroise Park Consulting. All rights reserved.
|
|
|
8
8
|
|
|
9
9
|
## 1. DEFINITIONS
|
|
10
10
|
|
|
11
|
-
**1.1 "Framework"** means the DoNotDev commercial software packages (excluding @donotdev/cli and @donotdev/
|
|
11
|
+
**1.1 "Framework"** means the DoNotDev commercial software packages (excluding @donotdev/cli, @donotdev/components, @donotdev/expo, and @donotdev/templates, which are licensed under MIT), including all compiled JavaScript files, TypeScript definition files, and associated documentation.
|
|
12
12
|
|
|
13
13
|
**1.2 "License Key"** means the unique alphanumeric key provided to you upon purchase, required to suppress watermarks and unlock full Framework functionality.
|
|
14
14
|
|
|
@@ -231,12 +231,12 @@ Ambroise Park Consulting has no obligation to provide support, updates, or maint
|
|
|
231
231
|
|
|
232
232
|
Questions about licensing or compliance:
|
|
233
233
|
|
|
234
|
-
**Email:**
|
|
234
|
+
**Email:** contact@donotdev.com
|
|
235
235
|
**Website:** donotdev.com
|
|
236
236
|
|
|
237
237
|
---
|
|
238
238
|
|
|
239
239
|
**END OF LICENSE AGREEMENT**
|
|
240
240
|
|
|
241
|
-
**DoNotDev Framework License
|
|
241
|
+
**DoNotDev Framework License v1.0**
|
|
242
242
|
Ambroise Park Consulting – 2025
|
package/dist/CrudService.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type { CacheOptions };
|
|
|
4
4
|
/**
|
|
5
5
|
* Complete CRUD orchestrator with TanStack Query caching
|
|
6
6
|
*
|
|
7
|
-
* @version 0.0
|
|
7
|
+
* @version 0.1.0
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
@@ -34,7 +34,7 @@ declare class CrudService implements CrudServiceInterface {
|
|
|
34
34
|
* getCrudService().setSecurity(security);
|
|
35
35
|
* ```
|
|
36
36
|
*
|
|
37
|
-
* @version 0.0
|
|
37
|
+
* @version 0.1.0
|
|
38
38
|
* @since 0.0.1
|
|
39
39
|
*/
|
|
40
40
|
setSecurity(security: SecurityContext): void;
|
|
@@ -46,7 +46,7 @@ declare class CrudService implements CrudServiceInterface {
|
|
|
46
46
|
* onAuthStateChanged((user) => getCrudService().setCurrentUser(user?.id ?? null));
|
|
47
47
|
* ```
|
|
48
48
|
*
|
|
49
|
-
* @version 0.0
|
|
49
|
+
* @version 0.1.0
|
|
50
50
|
* @since 0.0.1
|
|
51
51
|
*/
|
|
52
52
|
setCurrentUser(userId: string | null): void;
|
|
@@ -169,7 +169,7 @@ declare class CrudService implements CrudServiceInterface {
|
|
|
169
169
|
/**
|
|
170
170
|
* Get or create CrudService singleton instance
|
|
171
171
|
*
|
|
172
|
-
* @version 0.0
|
|
172
|
+
* @version 0.1.0
|
|
173
173
|
* @since 0.0.1
|
|
174
174
|
* @author AMBROISE PARK Consulting
|
|
175
175
|
*/
|
package/dist/CrudStore.d.ts
CHANGED
package/dist/FieldRegistry.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldRegistry.d.ts","sourceRoot":"","sources":["../src/FieldRegistry.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,EAAE,SAAS,SAAS,GAAG,SAAS;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;CACzB;AAYD;;GAEG;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,OAAO,CAE3D"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Audit logs and metadata
|
|
10
10
|
* - Rate limiting
|
|
11
11
|
*
|
|
12
|
-
* @version 0.0
|
|
12
|
+
* @version 0.1.0
|
|
13
13
|
* @since 0.0.1
|
|
14
14
|
* @author AMBROISE PARK Consulting
|
|
15
15
|
*/
|
|
@@ -17,7 +17,7 @@ import type { dndevSchema, ICrudAdapter, ListSchemaType, PaginatedQueryResult }
|
|
|
17
17
|
/**
|
|
18
18
|
* Query options for Functions queries
|
|
19
19
|
*
|
|
20
|
-
* @version 0.0
|
|
20
|
+
* @version 0.1.0
|
|
21
21
|
* @since 0.0.1
|
|
22
22
|
* @author AMBROISE PARK Consulting
|
|
23
23
|
*/
|
|
@@ -43,7 +43,7 @@ export interface FunctionsQueryOptions {
|
|
|
43
43
|
*
|
|
44
44
|
* All backends go through ICallableProvider. If none configured, falls back to FirebaseCallableProvider.
|
|
45
45
|
*
|
|
46
|
-
* @version 0.0
|
|
46
|
+
* @version 0.1.0
|
|
47
47
|
* @since 0.0.1
|
|
48
48
|
* @author AMBROISE PARK Consulting
|
|
49
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionsAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/FunctionsAdapter.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,WAAW,EAEX,YAAY,EACZ,cAAc,EACd,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"FunctionsAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/FunctionsAdapter.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,WAAW,EAEX,YAAY,EACZ,cAAc,EACd,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAIxB;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAA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B,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAwBnD,KAAK,CAAC,CAAC,EACX,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,UAAU,GAAE,cAAsC,GACjD,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAqEnC,SAAS,CAAC,CAAC,KAAK,MAAM,IAAI;IAS1B,qBAAqB,CAAC,CAAC,KAAK,MAAM,IAAI;CAQvC"}
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudCard.d.ts","sourceRoot":"","sources":["../../src/components/CrudCard.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAA2B,MAAM,gBAAgB,CAAC;AA4C7E;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,MAAM,EACN,OAAO,EACP,WAAW,EAAE,eAAe,EAC5B,cAAc,EAAE,kBAAkB,EAClC,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAAE,gBAAgB,EAC9B,UAAkB,EAClB,aAAa,EACb,SAAS,GACV,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"CrudCard.d.ts","sourceRoot":"","sources":["../../src/components/CrudCard.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAA2B,MAAM,gBAAgB,CAAC;AA4C7E;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,MAAM,EACN,OAAO,EACP,WAAW,EAAE,eAAe,EAC5B,cAAc,EAAE,kBAAkB,EAClC,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAAE,gBAAgB,EAC9B,UAAkB,EAClB,aAAa,EACb,SAAS,GACV,EAAE,aAAa,2CA4Lf;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i,jsxs as
|
|
1
|
+
import{jsx as i,jsxs as D}from"react/jsx-runtime";import{Trash2 as E}from"lucide-react";import{useMemo as h}from"react";import{Card as q,Stack as w,Text as A,ActionButton as G}from"@donotdev/components";import{useTranslation as k,getListCardFieldNames as H}from"@donotdev/core";import{formatValue as v}from"./DisplayFieldRenderer";import{DisplayThumbnail as L}from"./DisplayThumbnail";import{translateFieldLabel as J}from"../forms/utils/translateFieldLabel";import{useCrud as K}from"../useCrud";function u(e){return e==="image"||e==="images"}function O(e){return h(()=>{const t=e.listCardFields;if(t&&!Array.isArray(t)){const o=t;return{titleFields:o.title??[],subtitleFields:o.subtitle??[],contentFields:o.content??[],footerFields:o.footer??[]}}const p=H(e),g=p.filter(o=>!u(e.fields[o]?.type)),x=p.filter(o=>u(e.fields[o]?.type)),C=g.length>0?[g[0]]:[],S=[...g.slice(1,4),...x];return{titleFields:C,subtitleFields:[],contentFields:S,footerFields:[]}},[e])}function Q({item:e,entity:t,onClick:p,titleFields:g,subtitleFields:x,contentFields:C,footerFields:S,showDelete:o=!1,renderActions:B,className:R}){const{t:n}=k([t.namespace,"crud"]),{t:m}=k("crud"),b=O(t),I=g??b.titleFields,T=x??b.subtitleFields,j=C??b.contentFields,F=S??b.footerFields,V=h(()=>{if(!I?.length)return e.id??"";const c=I.filter(l=>typeof l=="string").filter(l=>!u(t.fields[l]?.type)).map(l=>{const s=t.fields[l],a=e[l],f=s?v(a,s,n,{compact:!0,asString:!0}):a;return typeof f=="string"?f:String(f??"")}).filter(Boolean),r=!Array.isArray(t.listCardFields)&&t.listCardFields?.titleSeparator!=null?t.listCardFields.titleSeparator:" ";return c.join(r)||String(e.id??"")},[e,t.fields,I,t.listCardFields,n]),M=h(()=>T?.length&&T.filter(r=>typeof r=="string").filter(r=>!u(t.fields[r]?.type)).map(r=>{const l=t.fields[r],s=e[r],a=l?v(s,l,n,{compact:!0,asString:!0}):s;return typeof a=="string"?a:String(a??"")}).filter(Boolean).join(" ")||void 0,[e,t.fields,T,n]),P=h(()=>{if(!j?.length)return null;const c=j.map(r=>{const l=t.fields[r];if(!l)return null;if(u(l.type)){const s=e[r];return s==null?null:i(L,{pictures:s,alt:String(V),aspectRatio:"16/9"},r)}return D("div",{children:[i(A,{level:"small",variant:"muted",children:J(r,l,n)}),i(A,{children:v(e[r],l,n,{compact:!0})})]},r)}).filter(Boolean);return c.length>0?i(w,{direction:"column",gap:"tight",children:c}):null},[e,t.fields,j,V,n]),_=h(()=>{if(!F?.length)return;if(F.some(r=>u(t.fields[r]?.type))){const r=F.map(l=>{const s=t.fields[l];if(!s)return null;if(u(s.type)){const f=e[l];return f==null?null:i(L,{pictures:f,alt:"",aspectRatio:"1"},l)}const a=v(e[l],s,n,{compact:!0});return i("span",{children:a},l)});return i(w,{direction:"row",gap:"tight",align:"center",children:r.filter(Boolean)})}const c=F.map(r=>{const l=t.fields[r];return l?v(e[r],l,n,{compact:!0}):e[r]});return i(A,{level:"small",children:c.join(" \xB7 ")})},[e,t.fields,F,n]),y=K(t).delete,z=B||o?D("div",{style:{position:"absolute",top:"var(--gap-sm)",insetInlineEnd:"var(--gap-sm)",zIndex:10,display:"flex",alignItems:"flex-start",gap:"var(--gap-xs)"},onClick:d=>d.stopPropagation(),onMouseDown:d=>d.stopPropagation(),children:[B,o&&i(G,{action:async()=>{await y(e.id)},confirmText:m("delete.confirm",{defaultValue:"Are you sure you want to delete this item?"}),confirmTitle:m("delete.title",{defaultValue:"Delete Item"}),loadingText:m("delete.loading",{defaultValue:"Deleting..."}),variant:"destructive",icon:E,"aria-label":m("delete",{defaultValue:"Delete"}),children:m("delete",{defaultValue:"Delete"})})]}):null;return i(q,{title:String(V??""),subtitle:M,content:P??void 0,footer:_,clickable:!0,elevated:!0,onClick:p?()=>p(e.id):void 0,className:R,children:z})}var re=Q;export{Q as CrudCard,re as default};
|
|
@@ -31,7 +31,7 @@ export declare function formatValue(value: any, config: EntityField, t: (key: st
|
|
|
31
31
|
* - editable: 'admin' and viewer is not admin
|
|
32
32
|
* - editable: 'create-only' and viewing existing record
|
|
33
33
|
*
|
|
34
|
-
* @version 0.0
|
|
34
|
+
* @version 0.1.0
|
|
35
35
|
* @since 0.0.1
|
|
36
36
|
* @author AMBROISE PARK Consulting
|
|
37
37
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @description Renders the thumbnail of the first picture (pictures[0]) for list cards and list views.
|
|
4
4
|
* Normalizes string (backend-optimized thumbUrl), single Picture, or Picture[].
|
|
5
5
|
*
|
|
6
|
-
* @version 0.0
|
|
6
|
+
* @version 0.1.0
|
|
7
7
|
* @since 0.0.1
|
|
8
8
|
* @author AMBROISE PARK Consulting
|
|
9
9
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview ButtonFieldDisplay component
|
|
3
3
|
* @description Button fields are not displayed in read-only mode
|
|
4
4
|
*
|
|
5
|
-
* @version 0.0
|
|
5
|
+
* @version 0.1.0
|
|
6
6
|
* @since 0.0.1
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
@@ -20,7 +20,7 @@ export interface ButtonFieldDisplayProps {
|
|
|
20
20
|
/**
|
|
21
21
|
* ButtonFieldDisplay - Button fields are not displayed in read-only mode
|
|
22
22
|
*
|
|
23
|
-
* @version 0.0
|
|
23
|
+
* @version 0.1.0
|
|
24
24
|
* @since 0.0.1
|
|
25
25
|
* @author AMBROISE PARK Consulting
|
|
26
26
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview HiddenFieldDisplay component
|
|
3
3
|
* @description Hidden fields are not displayed
|
|
4
4
|
*
|
|
5
|
-
* @version 0.0
|
|
5
|
+
* @version 0.1.0
|
|
6
6
|
* @since 0.0.1
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
@@ -21,7 +21,7 @@ export interface HiddenFieldDisplayProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* HiddenFieldDisplay - Hidden fields are not displayed
|
|
23
23
|
*
|
|
24
|
-
* @version 0.0
|
|
24
|
+
* @version 0.1.0
|
|
25
25
|
* @since 0.0.1
|
|
26
26
|
* @author AMBROISE PARK Consulting
|
|
27
27
|
*/
|
|
@@ -16,7 +16,7 @@ export interface RichTextDisplayProps {
|
|
|
16
16
|
* Renders HTML with styling that matches Tiptap editor output.
|
|
17
17
|
* Safe to use with HTML from Tiptap (sanitized by Tiptap).
|
|
18
18
|
*
|
|
19
|
-
* @version 0.0
|
|
19
|
+
* @version 0.1.0
|
|
20
20
|
* @since 0.0.1
|
|
21
21
|
* @author AMBROISE PARK Consulting
|
|
22
22
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview AvatarFieldComponent
|
|
3
3
|
* @description Input field for avatar URLs with preview
|
|
4
4
|
*
|
|
5
|
-
* @version 0.0
|
|
5
|
+
* @version 0.1.0
|
|
6
6
|
* @since 0.0.1
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
@@ -26,7 +26,7 @@ export interface AvatarFieldComponentProps extends Omit<ComponentProps<typeof In
|
|
|
26
26
|
/**
|
|
27
27
|
* AvatarFieldComponent - Input field for avatar URLs with preview
|
|
28
28
|
*
|
|
29
|
-
* @version 0.0
|
|
29
|
+
* @version 0.1.0
|
|
30
30
|
* @since 0.0.1
|
|
31
31
|
* @author AMBROISE PARK Consulting
|
|
32
32
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview BadgeFieldComponent
|
|
3
3
|
* @description Input field for badge text with preview
|
|
4
4
|
*
|
|
5
|
-
* @version 0.0
|
|
5
|
+
* @version 0.1.0
|
|
6
6
|
* @since 0.0.1
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
@@ -28,7 +28,7 @@ export interface BadgeFieldComponentProps extends Omit<ComponentProps<typeof Inp
|
|
|
28
28
|
/**
|
|
29
29
|
* BadgeFieldComponent - Input field for badge text with preview
|
|
30
30
|
*
|
|
31
|
-
* @version 0.0
|
|
31
|
+
* @version 0.1.0
|
|
32
32
|
* @since 0.0.1
|
|
33
33
|
* @author AMBROISE PARK Consulting
|
|
34
34
|
*/
|
|
@@ -38,7 +38,7 @@ export interface ComboboxComponentProps {
|
|
|
38
38
|
* ComboboxComponent renders a searchable combobox with autocomplete.
|
|
39
39
|
* Input + Dropdown pattern: user types in input, dropdown appears below.
|
|
40
40
|
*
|
|
41
|
-
* @version 0.0
|
|
41
|
+
* @version 0.1.0
|
|
42
42
|
* @since 0.0.1
|
|
43
43
|
* @author AMBROISE PARK Consulting
|
|
44
44
|
* @param props - ComboboxComponentProps
|
|
@@ -15,7 +15,7 @@ export interface GdprConsentFieldComponentProps {
|
|
|
15
15
|
* GDPR Consent Field Component - Renders a consent checkbox with automatic label generation.
|
|
16
16
|
* Opens privacy policy and terms in Sheet with iframe when links are clicked.
|
|
17
17
|
*
|
|
18
|
-
* @version 0.0
|
|
18
|
+
* @version 0.1.0
|
|
19
19
|
* @since 0.0.1
|
|
20
20
|
* @author AMBROISE PARK Consulting
|
|
21
21
|
* @param props - GdprConsentFieldComponentProps
|
|
@@ -25,7 +25,7 @@ export interface MultiDropdownComponentProps {
|
|
|
25
25
|
/**
|
|
26
26
|
* MultiDropdownComponent renders a multi-select dropdown field using Radix UI's Select.
|
|
27
27
|
*
|
|
28
|
-
* @version 0.0
|
|
28
|
+
* @version 0.1.0
|
|
29
29
|
* @since 0.0.1
|
|
30
30
|
* @author AMBROISE PARK Consulting
|
|
31
31
|
* @param props - MultiDropdownComponentProps
|
|
@@ -28,7 +28,7 @@ export interface NumberFieldComponentProps {
|
|
|
28
28
|
/**
|
|
29
29
|
* NumberFieldComponent renders a styled number input with validation.
|
|
30
30
|
*
|
|
31
|
-
* @version 0.0
|
|
31
|
+
* @version 0.1.0
|
|
32
32
|
* @since 0.0.1
|
|
33
33
|
* @author AMBROISE PARK Consulting
|
|
34
34
|
* @param props - NumberFieldComponentProps
|
|
@@ -15,7 +15,7 @@ export interface PasswordFieldComponentProps extends Omit<ComponentProps<typeof
|
|
|
15
15
|
/**
|
|
16
16
|
* PasswordFieldComponent renders a styled password input.
|
|
17
17
|
*
|
|
18
|
-
* @version 0.0
|
|
18
|
+
* @version 0.1.0
|
|
19
19
|
* @since 0.0.1
|
|
20
20
|
* @author AMBROISE PARK Consulting
|
|
21
21
|
* @param props - PasswordFieldComponentProps
|