@donotdev/crud 0.2.2 → 0.2.3
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/CrudService.bulk.d.ts +8 -6
- package/dist/CrudService.bulk.d.ts.map +1 -1
- package/dist/CrudService.bulk.js +1 -1
- package/dist/CrudService.bulkAcross.d.ts +4 -2
- package/dist/CrudService.bulkAcross.d.ts.map +1 -1
- package/dist/CrudService.bulkAcross.js +1 -1
- package/dist/CrudService.cache.d.ts +21 -2
- package/dist/CrudService.cache.d.ts.map +1 -1
- package/dist/CrudService.cache.js +1 -1
- package/dist/CrudService.d.ts +7 -5
- package/dist/CrudService.d.ts.map +1 -1
- package/dist/CrudService.internal.d.ts +3 -2
- package/dist/CrudService.internal.d.ts.map +1 -1
- package/dist/CrudService.internal.js +2 -2
- package/dist/CrudService.queries.d.ts.map +1 -1
- package/dist/CrudService.queries.js +1 -1
- package/dist/CrudService.subscriptions.d.ts.map +1 -1
- package/dist/CrudService.subscriptions.js +1 -1
- package/dist/CrudStore.js +1 -1
- package/dist/adapters/FunctionsAdapter.d.ts.map +1 -1
- package/dist/adapters/FunctionsAdapter.js +1 -1
- package/dist/components/CrudButton.js +1 -1
- package/dist/components/CrudCard.d.ts +2 -2
- package/dist/components/CrudCard.d.ts.map +1 -1
- package/dist/components/CrudCard.js +1 -1
- package/dist/components/DateFilter.js +1 -1
- package/dist/components/DisplayFieldRenderer.d.ts +5 -2
- package/dist/components/DisplayFieldRenderer.d.ts.map +1 -1
- package/dist/components/DisplayFieldRenderer.js +1 -1
- package/dist/components/DisplayThumbnail.d.ts.map +1 -1
- package/dist/components/DisplayThumbnail.js +1 -1
- package/dist/components/EntityFilters.d.ts +4 -1
- package/dist/components/EntityFilters.d.ts.map +1 -1
- package/dist/components/EntityFilters.js +1 -1
- package/dist/components/FormFieldRenderer.d.ts +0 -8
- package/dist/components/FormFieldRenderer.d.ts.map +1 -1
- package/dist/components/FormFieldRenderer.js +1 -1
- package/dist/components/FormLayout.js +1 -1
- package/dist/components/YearFilter.js +1 -1
- package/dist/components/controlled/complex/ControlledAddressField.d.ts.map +1 -1
- package/dist/components/controlled/complex/ControlledAddressField.js +1 -1
- package/dist/components/controlled/complex/ControlledDateField.d.ts.map +1 -1
- package/dist/components/controlled/complex/ControlledFieldArrayField.d.ts.map +1 -1
- package/dist/components/controlled/complex/ControlledGeoPointField.d.ts.map +1 -1
- package/dist/components/controlled/complex/ControlledMapField.d.ts.map +1 -1
- package/dist/components/controlled/complex/ControlledMultiInputField.d.ts.map +1 -1
- package/dist/components/controlled/complex/ControlledRichTextField.d.ts.map +1 -1
- package/dist/components/controlled/complex/ControlledTimestampField.d.ts.map +1 -1
- package/dist/components/controlled/fieldOptions.d.ts +39 -0
- package/dist/components/controlled/fieldOptions.d.ts.map +1 -0
- package/dist/components/controlled/fieldOptions.js +1 -0
- package/dist/components/controlled/file/ControlledDocumentField.js +1 -1
- package/dist/components/controlled/file/ControlledFileField.js +1 -1
- package/dist/components/controlled/file/ControlledImageField.d.ts.map +1 -1
- package/dist/components/controlled/file/ControlledImageField.js +1 -1
- package/dist/components/controlled/file/ControlledMultiDocumentField.d.ts.map +1 -1
- package/dist/components/controlled/file/ControlledMultiDocumentField.js +1 -1
- package/dist/components/controlled/file/ControlledMultiFileField.d.ts.map +1 -1
- package/dist/components/controlled/file/ControlledMultiFileField.js +1 -1
- package/dist/components/controlled/file/ControlledMultiImageField.d.ts.map +1 -1
- package/dist/components/controlled/file/ControlledMultiImageField.js +1 -1
- package/dist/components/controlled/input/ControlledCheckboxField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledCurrencyField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledDurationField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledGdprConsentField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledGdprConsentField.js +1 -1
- package/dist/components/controlled/input/ControlledNumberField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledPasswordField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledPhoneField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledPriceField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledRangeField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledRangeField.js +1 -1
- package/dist/components/controlled/input/ControlledRatingField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledSwitchField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledSwitchField.js +1 -1
- package/dist/components/controlled/input/ControlledTextField.d.ts.map +1 -1
- package/dist/components/controlled/input/ControlledTextField.js +1 -1
- package/dist/components/controlled/input/ControlledTextareaField.js +1 -1
- package/dist/components/controlled/select/ControlledComboboxField.d.ts.map +1 -1
- package/dist/components/controlled/select/ControlledDropdownField.d.ts.map +1 -1
- package/dist/components/controlled/select/ControlledMultiDropdownField.d.ts.map +1 -1
- package/dist/components/controlled/select/ControlledRadioField.d.ts.map +1 -1
- package/dist/components/controlled/select/ControlledReferenceField.d.ts.map +1 -1
- package/dist/components/controlled/select/ControlledReferenceField.js +1 -1
- package/dist/components/controlled/select/ControlledYearField.d.ts.map +1 -1
- package/dist/components/controlled/types.d.ts.map +1 -1
- package/dist/components/fields/display/AvatarFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/AvatarFieldDisplay.js +1 -1
- package/dist/components/fields/display/BadgeFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/BadgeFieldDisplay.js +1 -1
- package/dist/components/fields/display/ButtonFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/CheckboxFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/CheckboxFieldDisplay.js +1 -1
- package/dist/components/fields/display/DateFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/DateFieldDisplay.js +1 -1
- package/dist/components/fields/display/DropdownDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/FileFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/FileFieldDisplay.js +1 -1
- package/dist/components/fields/display/GeoPointFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/HiddenFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/ImageFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/LinkFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/LinkFieldDisplay.js +1 -1
- package/dist/components/fields/display/MapFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/MapFieldDisplay.js +1 -1
- package/dist/components/fields/display/MultiDropdownDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/MultiInputTextFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/NumberFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/NumberFieldDisplay.js +1 -1
- package/dist/components/fields/display/PasswordFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/PasswordFieldDisplay.js +1 -1
- package/dist/components/fields/display/PhoneNumberDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/RadioFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/RangeFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/ReferenceFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/ReferenceFieldDisplay.js +1 -1
- package/dist/components/fields/display/RichTextDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/TextAreaDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/TextAreaDisplay.js +1 -1
- package/dist/components/fields/display/TextFieldDisplay.d.ts.map +1 -1
- package/dist/components/fields/display/TextFieldDisplay.js +1 -1
- package/dist/components/fields/display/TimestampFieldDisplay.d.ts.map +1 -1
- package/dist/components/form/fields/AddressFieldComponent.d.ts.map +1 -1
- package/dist/components/form/fields/AddressFieldComponent.js +1 -1
- package/dist/components/form/fields/AvatarFieldComponent.d.ts.map +1 -1
- package/dist/components/form/fields/AvatarFieldComponent.js +1 -1
- package/dist/components/form/fields/BadgeFieldComponent.d.ts.map +1 -1
- package/dist/components/form/fields/BadgeFieldComponent.js +1 -1
- package/dist/components/form/fields/ButtonFieldComponent.js +1 -1
- package/dist/components/form/fields/CheckboxFieldComponent.d.ts.map +1 -1
- package/dist/components/form/fields/CheckboxFieldComponent.js +1 -1
- package/dist/components/form/fields/ComboboxComponent.js +1 -1
- package/dist/components/form/fields/CurrencyFieldComponent.js +1 -1
- package/dist/components/form/fields/DateFieldComponent.js +1 -1
- package/dist/components/form/fields/DocumentFieldComponent.js +1 -1
- package/dist/components/form/fields/DropdownComponent.js +1 -1
- package/dist/components/form/fields/DurationFieldComponent.js +1 -1
- package/dist/components/form/fields/FileFieldComponent.js +1 -1
- package/dist/components/form/fields/GdprConsentFieldComponent.d.ts.map +1 -1
- package/dist/components/form/fields/GdprConsentFieldComponent.js +1 -1
- package/dist/components/form/fields/GeoPointFieldComponent.js +1 -1
- package/dist/components/form/fields/ImageFieldComponent.js +1 -1
- package/dist/components/form/fields/MapFieldComponent.d.ts.map +1 -1
- package/dist/components/form/fields/MultiDropdownComponent.js +1 -1
- package/dist/components/form/fields/MultiInputTextFieldComponent.js +1 -1
- package/dist/components/form/fields/NumberFieldComponent.js +1 -1
- package/dist/components/form/fields/PasswordFieldComponent.js +1 -1
- package/dist/components/form/fields/PhoneNumberComponent.js +1 -1
- package/dist/components/form/fields/PriceFieldComponent.js +1 -1
- package/dist/components/form/fields/RangeFieldComponent.js +1 -1
- package/dist/components/form/fields/RatingFieldComponent.js +1 -1
- package/dist/components/form/fields/ReferenceFieldComponent.js +1 -1
- package/dist/components/form/fields/RichTextComponent.js +1 -1
- package/dist/components/form/fields/SwitchFieldComponent.d.ts.map +1 -1
- package/dist/components/form/fields/SwitchFieldComponent.js +1 -1
- package/dist/components/form/fields/TextAreaComponent.js +1 -1
- package/dist/components/form/fields/TextFieldComponent.js +1 -1
- package/dist/components/form/fields/TimestampFieldComponent.js +1 -1
- package/dist/components/form/fields/internal/InlineFieldRow.d.ts +24 -0
- package/dist/components/form/fields/internal/InlineFieldRow.d.ts.map +1 -0
- package/dist/components/form/fields/internal/InlineFieldRow.js +1 -0
- package/dist/components/form/fields/internal/TiptapEditor.d.ts.map +1 -1
- package/dist/components/form/fields/internal/TiptapEditor.js +2 -2
- package/dist/components/form/internal/ImageViewerDialog.js +1 -1
- package/dist/fieldTypeRegistry.store.js +1 -1
- package/dist/fieldTypeRegistry.types.d.ts.map +1 -1
- package/dist/forms/hooks/useController.js +1 -1
- package/dist/forms/hooks/useEntityField.d.ts.map +1 -1
- package/dist/forms/hooks/useEntityField.js +1 -1
- package/dist/forms/hooks/useEntityForm.d.ts.map +1 -1
- package/dist/forms/hooks/useEntityForm.js +1 -1
- package/dist/forms/utils/buildInitialValues.js +1 -1
- package/dist/forms/utils/isFieldEditable.js +1 -1
- package/dist/forms/utils/translateFieldLabel.d.ts +1 -9
- package/dist/forms/utils/translateFieldLabel.d.ts.map +1 -1
- package/dist/forms/utils/translateFieldLabel.js +1 -1
- package/dist/forms/utils/validateEntity.js +1 -1
- package/dist/hooks/useCrudFilters.js +1 -1
- package/dist/hooks/useCrudPageSize.js +1 -1
- package/dist/hooks/useEntityFavorites.js +1 -1
- package/dist/hooks/useFileUpload.js +1 -1
- package/dist/hooks/useReferenceResolver.d.ts.map +1 -1
- package/dist/hooks/useReferenceResolver.js +1 -1
- package/dist/hooks/useRelatedItems.js +1 -1
- package/dist/registerBuiltinFieldTypes.d.ts +2 -2
- package/dist/registerBuiltinFieldTypes.d.ts.map +1 -1
- package/dist/registerBuiltinFieldTypes.js +1 -1
- package/dist/stores/FormStore.js +1 -1
- package/dist/stores/UploadStore.js +1 -1
- package/dist/symbol-index.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/useBaseCrudList.d.ts.map +1 -1
- package/dist/useBaseCrudList.js +1 -1
- package/dist/useCrud.d.ts +13 -4
- package/dist/useCrud.d.ts.map +1 -1
- package/dist/useCrud.js +1 -1
- package/dist/useCrudCardList.js +1 -1
- package/dist/useCrudDoc.d.ts.map +1 -1
- package/dist/useCrudDoc.js +1 -1
- package/dist/useCrudList.js +1 -1
- package/dist/utils/clientListProcessing.d.ts.map +1 -1
- package/dist/utils/clientListProcessing.js +1 -1
- package/dist/utils/collections.js +1 -1
- package/dist/utils/imageProcessing.js +1 -1
- package/dist/utils/matchesFilter.d.ts.map +1 -1
- package/dist/utils/matchesFilter.js +1 -1
- package/dist/utils/referenceEntity.d.ts +11 -0
- package/dist/utils/referenceEntity.d.ts.map +1 -0
- package/dist/utils/referenceEntity.js +1 -0
- package/dist/utils/uploadValidation.js +1 -1
- package/dist/utils/useRowTranslator.d.ts +21 -0
- package/dist/utils/useRowTranslator.d.ts.map +1 -0
- package/dist/utils/useRowTranslator.js +1 -0
- package/dist/workflows/defineWorkflow.js +1 -1
- package/dist/workflows/useEntityWorkflow.js +1 -1
- package/guidelines/COMPONENTS.md +6 -0
- package/guidelines/CRUD.md +96 -12
- package/guidelines/GOTCHAS.md +2 -0
- package/package.json +8 -8
- package/dist/builtinFieldTypes.d.ts +0 -23
- package/dist/builtinFieldTypes.d.ts.map +0 -1
- package/dist/builtinFieldTypes.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/BadgeFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;IACjE,uBAAuB;IACvB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,2BAA2B;
|
|
1
|
+
{"version":3,"file":"BadgeFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/BadgeFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;IACjE,uBAAuB;IACvB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC,sBAAsB,CA6BzE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Badge as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Badge as l,Text as r}from"@donotdev/components";const n=({config:m,value:a,t:s,className:e})=>{if(a==null)return o(r,{as:"span",variant:"muted",className:e,children:"-"});const t=typeof a=="boolean"?s(a?"common.yes":"common.no"):String(a);return o(l,{variant:typeof a=="boolean"?a?"default":"secondary":"outline",className:e,children:t})};var i=n;export{n as BadgeFieldDisplay,i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/ButtonFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC;IACxC,uBAAuB;
|
|
1
|
+
{"version":3,"file":"ButtonFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/ButtonFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC;IACxC,uBAAuB;IAEvB,KAAK,EAAE,GAAG,CAAC;IACX,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,aAAa,CAClD,uBAAuB,CAGxB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/CheckboxFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IAC5C,uBAAuB;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,2BAA2B;
|
|
1
|
+
{"version":3,"file":"CheckboxFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/CheckboxFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IAC5C,uBAAuB;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,aAAa,CACpD,yBAAyB,CAkB1B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{Badge as c,Text as l}from"@donotdev/components";const n=({config:t,value:a,t:o,className:e})=>{if(a==null)return s(l,{as:"span",variant:"muted",className:e,children:"-"});const r=o(a?"common.yes":"common.no");return s(c,{variant:a?"default":"secondary",className:e,children:r})};var m=n;export{n as CheckboxFieldDisplay,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/DateFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAC/C,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"DateFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/DateFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAC/C,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,qBAAqB,CAgDjE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as d}from"react/jsx-runtime";import{Text as
|
|
1
|
+
import{jsx as a,jsxs as d}from"react/jsx-runtime";import{Text as e,Spinner as p}from"@donotdev/components";import{getI18nInstance as u}from"@donotdev/core";const i=({config:c,value:t,t:g,className:s,loading:m=!1})=>{if(m)return a(p,{className:s});if(!t)return a(e,{as:"span",variant:"muted",className:s,children:"-"});try{const n=new Date(t),r=u()?.language,l=n.toLocaleDateString(r),o=n.toLocaleTimeString(r);return c.type==="date"?a(e,{as:"span",className:s,children:l}):d("div",{className:s,children:[a(e,{as:"span",children:l}),a(e,{as:"span",variant:"muted",level:"small",children:o})]})}catch{return a(e,{as:"span",variant:"muted",className:s,children:"-"})}};var f=i;export{i as DateFieldDisplay,f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/DropdownDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"DropdownDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/DropdownDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAmBrE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/FileFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,uBAAuB;IACvB,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,2BAA2B;
|
|
1
|
+
{"version":3,"file":"FileFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/FileFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,uBAAuB;IACvB,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CA0BvE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s,jsxs as i}from"react/jsx-runtime";import{Badge as n,BADGE_VARIANT as t,Text as l,Stack as c}from"@donotdev/components";const r=({config:m,value:a,t:o,className:e})=>a?i(c,{direction:"row",align:"center",className:e,children:[s(l,{as:"span",level:"small",children:a.name}),a.size&&i(n,{variant:t.SECONDARY,children:[(a.size/1024).toFixed(1)," KB"]})]}):s(l,{as:"span",variant:"muted",className:e,children:"-"});var d=r;export{r as FileFieldDisplay,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoPointFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/GeoPointFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,2BAA2B;
|
|
1
|
+
{"version":3,"file":"GeoPointFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/GeoPointFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,yBAAyB,CAmBzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/HiddenFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"HiddenFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/HiddenFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAC5C,uBAAuB,CAGxB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/ImageFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"ImageFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/ImageFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,sBAAsB,CAsCnE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/LinkFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC;IAC7C,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"LinkFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/LinkFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC;IAC7C,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,qBAAqB,CAkDjE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Text as i}from"@donotdev/components";const o=({config:l,value:e,t:r,className:n})=>{if(!e)return t(i,{as:"span",variant:"muted",className:n,children:"-"});const s=(()=>{switch(l.type){case"email":return{href:`mailto:${e}`,"aria-label":r("common.sendEmailTo",{email:e})};case"tel":return{href:`tel:${e}`,"aria-label":r("common.callNumber",{number:e})};default:return{href:e,target:"_blank",rel:"noopener noreferrer","aria-label":r("common.openLink")}}})();return t("a",{...s,className:n||"",style:{color:"var(--primary)",textDecoration:"none"},onMouseEnter:a=>a.currentTarget.style.textDecoration="underline",onMouseLeave:a=>a.currentTarget.style.textDecoration="none",children:e})};var c=o;export{o as LinkFieldDisplay,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/MapFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,uBAAuB;IACvB,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,2BAA2B;
|
|
1
|
+
{"version":3,"file":"MapFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/MapFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,uBAAuB;IACvB,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAmB/D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as i}from"react/jsx-runtime";import{Text as l}from"@donotdev/components";const e=({config:d,value:a,t:m,className:s})=>!a||a.lat===void 0&&a.lng===void 0?o(l,{as:"span",variant:"muted",className:s,children:"-"}):i(l,{as:"div",level:"small",className:`font-mono ${s||""}`,children:[a.lat?.toFixed(6),", ",a.lng?.toFixed(6)]});var t=e;export{e as MapFieldDisplay,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiDropdownDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/MultiDropdownDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACnC,uBAAuB;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,2BAA2B;
|
|
1
|
+
{"version":3,"file":"MultiDropdownDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/MultiDropdownDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACnC,uBAAuB;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,yBAAyB,CAuBzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInputTextFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/MultiInputTextFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,+BAA+B;IAC9C,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;
|
|
1
|
+
{"version":3,"file":"MultiInputTextFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/MultiInputTextFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,+BAA+B;IAC9C,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IAEvB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,aAAa,CACpD,+BAA+B,CAmBhC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/NumberFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC;IACxC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"NumberFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/NumberFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC;IACxC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,uBAAuB,CAwBrE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s}from"react/jsx-runtime";import{Text as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{Text as e,Spinner as l}from"@donotdev/components";import{getI18nInstance as r}from"@donotdev/core";const o=({config:i,value:n,t:c,className:a,loading:t=!1})=>t?s(l,{className:a}):n==null?s(e,{as:"span",variant:"muted",className:a,children:"-"}):s(e,{as:"span",className:`font-mono ${a||""}`,children:n.toLocaleString(r()?.language)});var m=o;export{o as NumberFieldDisplay,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/PasswordFieldDisplay.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"PasswordFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/PasswordFieldDisplay.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,yBAAyB,CAwCzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as t}from"react/jsx-runtime";import{Eye as c,EyeOff as n}from"lucide-react";import{useState as u}from"react";import{Skeleton as m,Button as y,CopyToClipboard as f,Stack as i}from"@donotdev/components";const l=({config:g,value:e,t:r,className:s,loading:d=!1})=>{const[a,p]=u(!1);return d?o(m,{className:s}):e?t(i,{direction:"row",align:"center",className:s,children:[o("span",{style:{fontFamily:"monospace"},children:a?e:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),t(i,{direction:"row",align:"center",gap:"tight",children:[o(y,{type:"button",onClick:()=>p(!a),"aria-label":a?"Hide password":"Show password",children:a?o(n,{}):o(c,{})}),o(f,{text:e,tooltipText:r("copyToClipboard")||"Copy to clipboard",copiedTooltipText:r("copied")||"Copied!",ariaLabel:r("copyPassword")||"Copy password"})]})]}):o("div",{style:{color:"var(--muted-foreground)"},children:"-"})};var w=l;export{l as PasswordFieldDisplay,w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/PhoneNumberDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"PhoneNumberDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/PhoneNumberDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,uBAAuB,CA0BrE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/RadioFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"RadioFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/RadioFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,sBAAsB,CAmBnE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/RangeFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"RangeFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/RangeFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,sBAAsB,CAmBnE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/ReferenceFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,uBAAuB;
|
|
1
|
+
{"version":3,"file":"ReferenceFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/ReferenceFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,uBAAuB;IAEvB,KAAK,EAAE,GAAG,CAAC;IACX,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,0BAA0B,CAiB3B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{Badge as i,BADGE_VARIANT as n,Text as l}from"@donotdev/components";const r=({config:c,value:a,t:d,className:e})=>{if(!a)return s(l,{as:"span",variant:"muted",className:e,children:"-"});const t=a.displayName||a.name||a.id||a;return s(i,{variant:n.OUTLINE,className:e,children:String(t)})};var m=r;export{r as ReferenceFieldDisplay,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/RichTextDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"RichTextDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/RichTextDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAkG/D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/TextAreaDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"TextAreaDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/TextAreaDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAuB/D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{Text as l}from"@donotdev/components";const r=({config:i,value:a,t:m,className:e})=>a?s(l,{as:"div",level:"small",className:`whitespace-pre-wrap ${e||""}`,children:a}):s(l,{as:"span",variant:"muted",className:e,children:"-"});var t=r;export{r as TextAreaDisplay,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/TextFieldDisplay.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAY3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;IAClE,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;
|
|
1
|
+
{"version":3,"file":"TextFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/TextFieldDisplay.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAY3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;IAClE,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,qBAAqB,CAgKjE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Mail as L,Calendar as k,Clock as I}from"lucide-react";import{useState as A}from"react";import{Skeleton as T,Badge as B,BADGE_VARIANT as E,Text as l,cn as f,CopyToClipboard as x,Stack as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Mail as L,Calendar as k,Clock as I}from"lucide-react";import{useState as A}from"react";import{Skeleton as T,Badge as B,BADGE_VARIANT as E,Text as l,cn as f,CopyToClipboard as x,Stack as i}from"@donotdev/components";import{getWeekFromISOString as M,getI18nInstance as b}from"@donotdev/core";const C=({config:o,value:a,t:r,className:s,loading:v=!1,showCopy:g=!1,asBadge:w=!1,truncate:c=!1,maxLength:d=50,showLabel:p=!1})=>{const[j,u]=A(!1),F=async()=>{try{await navigator.clipboard.writeText(a),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},h=()=>{switch(o.type){case"email":return e(L,{});case"month":case"week":return e(k,{});case"time":return e(I,{});default:return null}},S=t=>{if(!t)return null;switch(o.type){case"email":return n("a",{href:`mailto:${t}`,style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)"},onMouseEnter:m=>m.currentTarget.style.textDecoration="underline",onMouseLeave:m=>m.currentTarget.style.textDecoration="none",children:[h(),t]});case"month":return new Date(t).toLocaleDateString(b()?.language,{year:"numeric",month:"long"});case"week":return M(t);case"time":return new Date(`2000-01-01T${t}`).toLocaleTimeString(b()?.language);default:return t}},D=t=>!c||t.length<=d?t:`${t.substring(0,d)}...`;if(v)return n(i,{gap:"tight",children:[p&&e(T,{style:{height:"1rem",width:"6rem"}}),e(T,{className:"dndev-w-full",style:{height:"1.5rem"}})]});if(!a)return n(i,{gap:"tight",children:[p&&e(l,{as:"span",variant:"muted",children:o.label||o.name}),e(l,{as:"span",variant:"muted",className:f(s),style:{fontStyle:"italic"},children:r("common.noValue",{defaultValue:"No value"})})]});const N=S(a),y=D(String(N));return w?n(i,{direction:"row",align:"center",gap:"tight",children:[h(),e(B,{variant:E.SECONDARY,className:s,children:y}),g&&e(x,{text:a,tooltipText:r("copyToClipboard")||"Copy to clipboard",copiedTooltipText:r("copied")||"Copied!",ariaLabel:r("copyToClipboard")||"Copy to clipboard"})]}):n(i,{gap:"tight",children:[p&&e(l,{as:"span",variant:"muted",children:o.label||o.name}),n(i,{direction:"row",align:"center",gap:"tight",children:[e("div",{className:f("dndev-flex-1",c&&"truncate",s),title:c&&a.length>d?a:void 0,children:e(l,{as:"span",children:y})}),g&&e(x,{text:a,tooltipText:r("copyToClipboard")||"Copy to clipboard",copiedTooltipText:r("copied")||"Copied!",ariaLabel:r("copyToClipboard")||"Copy to clipboard"})]})]})};var V=C;export{C as TextFieldDisplay,V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimestampFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/TimestampFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,uBAAuB;IACvB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,2BAA2B;
|
|
1
|
+
{"version":3,"file":"TimestampFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/display/TimestampFieldDisplay.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,uBAAuB;IACvB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,0BAA0B,CA+B3B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/AddressFieldComponent.tsx"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,KAAK,CAAC,EAAE;QACN,iBAAiB,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"AddressFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/AddressFieldComponent.tsx"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,KAAK,CAAC,EAAE;QACN,iBAAiB,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,qBAAqB;IAErB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwJD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,qBAAqB,GAAI,iGAS5B,0BAA0B,gCA+U5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as L,jsxs as B}from"react/jsx-runtime";import{useState as E,useEffect as q,useRef as D,useCallback as H}from"react";import{Combobox as F,Stack as K}from"@donotdev/components";import{useTranslation as Q,getPlatformEnvVar as X}from"@donotdev/core";const W="dndev-address-autocomplete-cache",$=100;function ee(){try{const o=typeof localStorage<"u"?localStorage.getItem(W):null;if(o)return new Map(JSON.parse(o))}catch{}return new Map}function te(o){try{typeof localStorage<"u"&&localStorage.setItem(W,JSON.stringify([...o]))}catch{}}function Y(o){if(o.size>$){const d=o.keys().next().value;d!==void 0&&o.delete(d)}}function S(){return window.google}const M=ee(),G=new Map;function oe(o){const d={key:o,v:"weekly"},r="google",A="importLibrary",P="__ib__",f=document,u=window;u[r]=u[r]||{};const c=u[r].maps||(u[r].maps={}),l=new Set,a=new URLSearchParams,g=()=>c._p||(c._p=new Promise(async(w,p)=>{const h=f.createElement("script");a.set("libraries",[...l].join(","));for(const y of Object.keys(d))a.set(y.replace(/[A-Z]/g,j=>"_"+j[0].toLowerCase()),d[y]);a.set("callback",r+".maps."+P),h.src="https://maps.googleapis.com/maps/api/js?"+a,c[P]=w,h.onerror=()=>{c._p=null,p(new Error("Google Maps JS API could not load."))};const m=f.querySelector("script[nonce]");m?.nonce&&(h.nonce=m.nonce),f.head.append(h)}));c[A]||(c[A]=(w,...p)=>(l.add(w),g().then(()=>c[A](w,...p))))}const ae=({label:o,value:d,onChange:r,enableGoogleMaps:A=!1,extractDistrictCode:P,error:f,helperText:u,required:c})=>{const{t:l}=Q("crud"),[a,g]=E(d?.formatted_address||""),[w,p]=E([]),[h,m]=E(!1),[y,j]=E(!1),[T,J]=E(!1),k=D(null),C=D(null),I=X("GOOGLE_MAPS_API_KEY")||"",v=A&&!!I;q(()=>{const t=d?.formatted_address??"";g(e=>e===t?e:t)},[d]),q(()=>{if(!v||T)return;const t=S();if(t?.maps?.places?.AutocompleteSuggestion){k.current=new t.maps.places.AutocompleteSessionToken,J(!0);return}let e=!1;return(async()=>{try{if(S()?.maps?.importLibrary||oe(I),await S().maps.importLibrary("places"),e)return;k.current=new(S()).maps.places.AutocompleteSessionToken,J(!0)}catch{e||j(!0)}})(),()=>{e=!0}},[v,I,T]),q(()=>{if(!v||!T||y)return;if(a.length<3){p([]);return}const t=M.get(a);if(t){p(t);return}return C.current&&clearTimeout(C.current),C.current=setTimeout(async()=>{m(!0);try{const e=S().maps.places,{suggestions:b}=await e.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:a,sessionToken:k.current}),_=b.filter(s=>s.placePrediction).map(s=>{const n=s.placePrediction,i=[n.mainText?.text,n.secondaryText?.text].filter(Boolean).join(", ");return G.set(i,n),Y(G),{value:i,label:i}});p(_),M.set(a,_),Y(M),te(M)}catch{j(!0),p([])}finally{m(!1)}},300),()=>{C.current&&clearTimeout(C.current)}},[v,T,y,a]);const N=H(async t=>{const e=Array.isArray(t)?t[0]||"":t;if(!e)return;if(!v){g(e),r({formatted_address:e});return}let b=G.get(e);const _=S()?.maps?.places;if(_){if(!b){m(!0);try{const{suggestions:s}=await _.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:e,sessionToken:k.current}),n=s.find(i=>[i.placePrediction?.mainText?.text,i.placePrediction?.secondaryText?.text].filter(Boolean).join(", ")===e);n?.placePrediction&&(b=n.placePrediction,G.set(e,b))}catch{}if(!b){m(!1),g(e),r({formatted_address:e});return}}m(!0);try{const s=b.toPlace();await s.fetchFields({fields:["formattedAddress","location","addressComponents"]});const n=s.formattedAddress||e;let i=s.location?.lat()??0,O=s.location?.lng()??0;if(i===0&&O===0&&n)try{const z=await S().maps.importLibrary("geocoding"),x=(await new z.Geocoder().geocode({address:n})).results?.[0]?.geometry?.location;x&&(i=x.lat(),O=x.lng())}catch{}const V={formatted_address:n,latitude:i,longitude:O};if(P){const z=s.addressComponents||[],x=z.find(U=>(U.types||[]).includes("postal_code"))?.longText||z.find(U=>(U.types||[]).includes("postal_code"))?.long_name||"",Z=x.startsWith("92")?92:parseInt(x.slice(-2),10)||null;V.district_code=Z}g(n),p([]),r(V),k.current=new _.AutocompleteSessionToken}catch{g(e),r({formatted_address:e})}finally{m(!1)}}},[v,P,r]),R=t=>{g(t)};return v?B(K,{gap:"tight",children:[L(F,{label:o,value:a,onValueChange:N,onSearchChange:R,placeholder:l("address.placeholder","Enter address..."),emptyMessage:h?l("messages.loading","Loading..."):l("address.noResults","No addresses found"),options:w.map(t=>({value:t.value,label:t.label})),required:c,variant:f?"destructive":void 0,isLoading:h,creatable:!0,createLabel:l("actions.use","Use this address"),disabled:!T&&!y}),y&&L("p",{style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:l("address.apiUnavailable","Google Places unavailable \u2014 type address manually")}),u&&L("p",{style:{fontSize:"var(--font-size-xs)",color:f?"var(--destructive-foreground)":"var(--muted-foreground)"},children:u})]}):B(K,{gap:"tight",children:[L(F,{label:o,value:a,onValueChange:N,onSearchChange:R,placeholder:l("address.placeholder","Enter address..."),options:[],required:c,variant:f?"destructive":void 0,creatable:!0,createLabel:l("actions.use","Use this address")}),u&&L("p",{style:{fontSize:"var(--font-size-xs)",color:f?"var(--destructive-foreground)":"var(--muted-foreground)"},children:u})]})};var re=ae;export{re as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/AvatarFieldComponent.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAU,KAAK,EAAa,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CACrD,cAAc,CAAC,OAAO,KAAK,CAAC,EAC5B,OAAO,GAAG,UAAU,CACrB;IACC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kBAAkB;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;
|
|
1
|
+
{"version":3,"file":"AvatarFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/AvatarFieldComponent.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAU,KAAK,EAAa,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CACrD,cAAc,CAAC,OAAO,KAAK,CAAC,EAC5B,OAAO,GAAG,UAAU,CACrB;IACC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kBAAkB;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;CAC3D;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,yBAAyB,CAuDzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Avatar as
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Avatar as m,Input as u,cn as f,Stack as n}from"@donotdev/components";const s=({config:r,value:t,onChange:c,error:A,helperText:l,t:i,className:d,...h})=>{const v=a=>a.split(" ").map(p=>p.charAt(0)).slice(0,2).join("").toUpperCase();return o(n,{children:[o(n,{direction:"row",align:"center",children:[e(m,{src:t,alt:r.label||"Avatar",fallback:v(r.label||"AV"),style:{height:"var(--touch-target)",width:"var(--touch-target)"}}),e("div",{className:"dndev-flex-1",children:e(u,{type:"url",className:f("dndev-w-full",d),placeholder:i("common.enterAvatarUrl"),value:t,onChange:a=>c(a.target.value),...h})})]}),l&&e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:l})]})};var g=s;export{s as AvatarFieldComponent,g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/BadgeFieldComponent.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAS,KAAK,EAAa,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,cAAc,CAAC,OAAO,KAAK,CAAC,EAC5B,OAAO,GAAG,UAAU,CACrB;IACC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kBAAkB;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;
|
|
1
|
+
{"version":3,"file":"BadgeFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/BadgeFieldComponent.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAS,KAAK,EAAa,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,cAAc,CAAC,OAAO,KAAK,CAAC,EAC5B,OAAO,GAAG,UAAU,CACrB;IACC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kBAAkB;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAE3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,oBAAoB;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;CAC/D;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,wBAAwB,CAyCvE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Badge as v,Input as f,cn as g,Stack as o}from"@donotdev/components";const l=({config:p,value:a,onChange:d,error:u,helperText:r,t:n,variant:s="default",className:i,...c})=>t(o,{children:[t(o,{direction:"row",align:"center",children:[e(v,{variant:s,style:{minWidth:0},children:a||n("common.badgePreview")}),e("div",{className:"dndev-flex-1",children:e(f,{type:"text",className:g("dndev-w-full",i),placeholder:n("common.enterBadgeText"),value:a,onChange:m=>d(m.target.value),...c})})]}),r&&e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:r})]});var h=l;export{l as BadgeFieldComponent,h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Button as l}from"@donotdev/components";const n=({label:a,type:t,onClick:r,variant:e,disabled:i=!1})=>o(l,{type:t,onClick:r,variant:e,disabled:i,children:a});var s=n;export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/CheckboxFieldComponent.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/CheckboxFieldComponent.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMnE,MAAM,WAAW,2BAA2B;IAC1C,mFAAmF;IACnF,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1D,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,sBAAsB,EAAE,aAAa,CAAC,2BAA2B,CAwBtE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Checkbox as h}from"@donotdev/components";import{InlineFieldRow as i}from"./internal/InlineFieldRow";const l=({label:o,checked:a=!1,onChange:e,required:c})=>r(i,{children:r(h,{checked:a,onCheckedChange:d=>{e&&e({target:{checked:d}})},label:o,required:c})});var n=l;export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as c}from"react/jsx-runtime";import{useMemo as L,useId as N}from"react";import{Combobox as $,Stack as d}from"@donotdev/components";import{useTranslation as D}from"@donotdev/core";const I=({label:u,value:l,options:s,error:p,helperText:
|
|
1
|
+
import{jsx as o,jsxs as c}from"react/jsx-runtime";import{useMemo as L,useId as N}from"react";import{Combobox as $,Stack as d}from"@donotdev/components";import{useTranslation as D}from"@donotdev/core";const I=({label:u,value:l,options:s,error:p,helperText:r,onChange:n,onBlur:m,required:g,placeholder:h,translationNamespace:v="dndev",placeholderKey:f="actions.select",placeholderDefault:b="Select",creatable:x=!1,createLabel:y,emptyMessage:C})=>{const{t:a}=D(v),i=N(),z=L(()=>s.map(e=>({value:String(e.value),label:e.label})),[s]),S=e=>{if(n){const q={target:{value:Array.isArray(e)?e[0]||"":e}};n(q)}},A=e=>{e||m?.()},t=!!p,M=`${i}-error`,j=`${i}-helper`;return c(d,{gap:"tight",children:[o($,{label:u,value:l||"",onValueChange:S,onOpenChange:A,placeholder:h||a(f,b),emptyMessage:C||a("messages.noResults","No results found"),creatable:x,createLabel:y||a("actions.create","Create"),options:z,required:g,variant:t?"destructive":void 0,clearable:!!l}),t&&c(d,{id:M,direction:"row",align:"center",gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--destructive-foreground)"},role:"alert",children:[o("span",{children:"\u26A0"}),r]}),r&&!t&&o("p",{id:j,style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:r})]})};var O=I;export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as y}from"react/jsx-runtime";import{useState as h,useEffect as j,useId as q}from"react";import{Input as C,FloatingLabel as L,Stack as M}from"@donotdev/components";const U=({label:b,value:r,onChange:x,currency:
|
|
1
|
+
import{jsx as n,jsxs as y}from"react/jsx-runtime";import{useState as h,useEffect as j,useId as q}from"react";import{Input as C,FloatingLabel as L,Stack as M}from"@donotdev/components";const U=({label:b,value:r,onChange:x,currency:l="EUR",locale:S,error:i,helperText:c,required:F=!1,disabled:u=!1,placeholder:N})=>{const d=q(),z=S||(typeof navigator<"u"?navigator.language:"en-US"),o=e=>e==null||isNaN(e)?"":(e/100).toString(),p=e=>{if(!e||e.trim()==="")return null;const a=e.replace(/[^\d.,\-]/g,"").replace(",","."),t=parseFloat(a);return isNaN(t)?null:Math.round(t*100)},[g,s]=h(o(r)),[v,m]=h(!1);j(()=>{v?p(g)!==r&&s(o(r)):s(o(r))},[r,v]);const E=e=>{const a=e.target.value;s(a);const t={target:{value:p(a)}};x(t)},I=()=>m(!0),T=()=>m(!1),f=(()=>{try{return new Intl.NumberFormat(z,{style:"currency",currency:l,currencyDisplay:"symbol"}).formatToParts(0).find(e=>e.type==="currency")?.value||l}catch{return l}})();return y(M,{gap:"tight",children:[n(L,{htmlFor:d,label:b,disabled:u,required:F,children:y("div",{style:{position:"relative"},children:[n("span",{style:{position:"absolute",left:"var(--gap-md)",top:"50%",transform:"translateY(-50%)",color:"var(--muted-foreground)",pointerEvents:"none",zIndex:1},children:f}),n(C,{id:d,type:"text",inputMode:"decimal",bare:!0,value:g,onChange:E,onFocus:I,onBlur:T,disabled:u,placeholder:N||"0","data-variant":i?"destructive":void 0,style:{paddingLeft:`calc(var(--gap-md) + ${f.length*.6}em + var(--gap-sm))`}})]})}),c&&n("p",{style:{fontSize:"var(--font-size-xs)",color:i?"var(--destructive-foreground)":"var(--muted-foreground)",marginTop:"var(--gap-sm)"},children:c})]})};var B=U;export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useId as m}from"react";import{DatePicker as z,DateTimePicker as $,Input as b,cn as h,Stack as d}from"@donotdev/components";const x=({label:u,value:s,onChange:v,error:c,helperText:i,mode:a="date",required:g,...p})=>{const r=m(),e=!!c,f=o=>{const S=o.target.value?new Date(o.target.value).toISOString():null;v(S)};let l="";if(s){const o=new Date(s);a==="date"?l=o.toISOString().split("T")[0]||"":a==="datetime-local"?l=o.toISOString().slice(0,16)||"":a==="month"?l=o.toISOString().slice(0,7):a==="time"?l=o.toISOString().slice(11,16):a==="week"&&(l=o.toISOString().split("T")[0]||"")}return a==="date"?n(d,{gap:"tight",children:[t(z,{id:r,label:u,value:s??null,onChange:v,required:g,"aria-describedby":h(e&&`${r}-error`,i&&!e&&`${r}-helper`),"aria-invalid":e,"data-variant":e?"destructive":void 0}),e&&n(d,{id:`${r}-error`,direction:"row",align:"center",gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--destructive-foreground)"},role:"alert",children:[t("span",{children:"\u26A0"}),c]}),i&&!e&&t("p",{id:`${r}-helper`,style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:i})]}):a==="datetime-local"?n(d,{gap:"tight",children:[t($,{id:r,label:u,value:s??null,onChange:v,required:g,"aria-describedby":h(e&&`${r}-error`,i&&!e&&`${r}-helper`),"aria-invalid":e,"data-variant":e?"destructive":void 0}),e&&n(d,{id:`${r}-error`,direction:"row",align:"center",gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--destructive-foreground)"},role:"alert",children:[t("span",{children:"\u26A0"}),c]}),i&&!e&&t("p",{id:`${r}-helper`,style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:i})]}):n(d,{gap:"tight",children:[t(b,{id:r,label:u,type:a,value:l,onChange:f,required:g,"aria-describedby":h(e&&`${r}-error`,i&&!e&&`${r}-helper`),"aria-invalid":e,"data-variant":e?"destructive":void 0,className:"dndev-w-full",...p}),e&&n(d,{id:`${r}-error`,direction:"row",align:"center",gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--destructive-foreground)"},role:"alert",children:[t("span",{children:"\u26A0"}),c]}),i&&!e&&t("p",{id:`${r}-helper`,style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:i})]})};var y=x;export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as n,Fragment as K}from"react/jsx-runtime";import{Upload as V,X as _,FileText as u,FileSpreadsheet as J,File as Q,Loader2 as Y,Eye as Z}from"lucide-react";import{useState as D,useRef as $,useImperativeHandle as ee,forwardRef as ae}from"react";import{Button as k,BUTTON_VARIANT as C,Text as s,Stack as m,Progress as re,Dialog as te,DialogContent as ne,DialogHeader as ie,DialogTitle as le}from"@donotdev/components";import{handleError as y,useTranslation as oe}from"@donotdev/core";import{useFileUpload as se}from"../../../hooks/useFileUpload";import{uploadFile as de,deleteFile as ce,getFileIcon as pe,formatFileSize as me,getDocumentAcceptString as ue}from"../../../utils/fileStorage";const ve=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".html",".csv"],fe=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","text/plain","text/markdown","text/html","text/csv"];function ge({type:d,className:i}){switch(d){case"pdf":return a(u,{className:i,style:{color:"var(--destructive)"}});case"doc":return a(u,{className:i,style:{color:"var(--primary)"}});case"xls":return a(J,{className:i,style:{color:"var(--success)"}});case"ppt":return a(u,{className:i,style:{color:"var(--warning)"}});case"text":case"html":return a(u,{className:i});default:return a(Q,{className:i})}}function z(d){const i="."+d.name.split(".").pop()?.toLowerCase();return ve.includes(i)}const P=ae(({name:d="document",label:i,value:S,onChange:A,error:v,helperText:x,multiple:f=!1,maxFiles:L=10,maxSize:
|
|
1
|
+
"use client";import{jsx as a,jsxs as n,Fragment as K}from"react/jsx-runtime";import{Upload as V,X as _,FileText as u,FileSpreadsheet as J,File as Q,Loader2 as Y,Eye as Z}from"lucide-react";import{useState as D,useRef as $,useImperativeHandle as ee,forwardRef as ae}from"react";import{Button as k,BUTTON_VARIANT as C,Text as s,Stack as m,Progress as re,Dialog as te,DialogContent as ne,DialogHeader as ie,DialogTitle as le}from"@donotdev/components";import{handleError as y,useTranslation as oe}from"@donotdev/core";import{useFileUpload as se}from"../../../hooks/useFileUpload";import{uploadFile as de,deleteFile as ce,getFileIcon as pe,formatFileSize as me,getDocumentAcceptString as ue}from"../../../utils/fileStorage";const ve=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".html",".csv"],fe=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","text/plain","text/markdown","text/html","text/csv"];function ge({type:d,className:i}){switch(d){case"pdf":return a(u,{className:i,style:{color:"var(--destructive)"}});case"doc":return a(u,{className:i,style:{color:"var(--primary)"}});case"xls":return a(J,{className:i,style:{color:"var(--success)"}});case"ppt":return a(u,{className:i,style:{color:"var(--warning)"}});case"text":case"html":return a(u,{className:i});default:return a(Q,{className:i})}}function z(d){const i="."+d.name.split(".").pop()?.toLowerCase();return ve.includes(i)}const P=ae(({name:d="document",label:i,value:S,onChange:A,error:v,helperText:x,multiple:f=!1,maxFiles:L=10,maxSize:E=25*1024*1024,storagePath:w,required:I,enablePreview:b=!0},O)=>{const{t:l}=oe("crud"),[N,g]=D(!1),[h,T]=D(null),c=$(null),H=ue();function M(e,r){return de(e,{storagePath:w,onProgress:t=>r(t.progress)})}const{files:o,addFiles:F,removeFile:R}=se({name:d,value:S,onChange:A,multiple:f,maxFiles:L,maxSize:E,accept:fe,storagePath:w,uploadFn:M});ee(O,()=>({upload:async()=>{},getDocuments:()=>o}),[o]);function W(e){const r=Array.from(e.target.files||[]);if(r.length>0){const t=r.filter(p=>z(p)?!0:(y(new Error("Invalid document type"),{userMessage:l("document.errors.invalidType",{fileName:p.name}),severity:"warning",showNotification:!0}),!1));t.length>0&&F(t)}c.current&&(c.current.value="")}function j(e){e.preventDefault(),g(!1);const r=Array.from(e.dataTransfer.files).filter(t=>z(t)?!0:(y(new Error("Invalid document type"),{userMessage:l("document.errors.invalidType",{fileName:t.name}),severity:"warning",showNotification:!0}),!1));r.length>0&&F(r)}async function B(e){const r=o.find(t=>t.id===e);if(r)try{r.uploaded&&"url"in r.uploaded&&await ce(r.uploaded),R(e)}catch(t){y(t,{userMessage:l("document.delete.failed"),severity:"error",showNotification:!0})}}function U(e){if(e.uploaded&&"url"in e.uploaded){const r=e.uploaded;r.mimeType==="application/pdf"&&T(r.url)}}const G=f||o.length===0;return n(K,{children:[n(m,{gap:"tight",children:[n(s,{level:"body",textAlign:"start",children:[i,I?"*":""]}),G&&n("div",{role:"button",tabIndex:0,"aria-label":l("document.upload.ariaLabel"),className:"dndev-surface","data-variant":v?"destructive":"default",style:{border:"var(--border-width) dashed",borderColor:N?"var(--primary)":v?"var(--destructive)":"var(--border)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:N?"color-mix(in oklab, var(--primary) 5%, transparent)":"var(--surface)",transition:"border-color var(--dur-fast), background-color var(--dur-fast)",cursor:"pointer",outline:"none"},onDragOver:e=>{e.preventDefault(),g(!0)},onDragLeave:()=>g(!1),onDrop:j,onClick:()=>c.current?.click(),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),c.current?.click())},children:[a("input",{ref:c,type:"file",accept:H,multiple:f,style:{display:"none"},onChange:W}),n(m,{align:"center",justify:"center",children:[a(V,{className:"dndev-size-lg",style:{color:"var(--muted-foreground)"}}),a(s,{as:"p",variant:"muted",level:"small",textAlign:"center",children:l("document.upload.hint")}),a(s,{as:"p",variant:"muted",level:"caption",textAlign:"center",children:"PDF, Word, Excel, PowerPoint, TXT, Markdown, HTML"})]})]}),o.length>0&&a(m,{gap:"tight",children:o.map(e=>{const r=e.uploaded&&"mimeType"in e.uploaded?e.uploaded.mimeType:e.file.type,t=pe(r||"",e.file.name),p=e.status==="uploading",X=r==="application/pdf"||e.file.name.toLowerCase().endsWith(".pdf"),q=e.uploaded&&"size"in e.uploaded?e.uploaded.size:e.file.size;return n("div",{className:"dndev-surface","data-variant":"muted",style:{padding:"var(--gap-md)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",gap:"var(--gap-md)"},children:[a(ge,{type:t,className:"dndev-size-md"}),n(m,{gap:"none",style:{flex:1,minWidth:0},children:[a(s,{level:"small",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.file.name}),n(s,{level:"caption",variant:"muted",children:[me(q),e.error&&n("span",{style:{color:"var(--destructive)"},children:[" ","\xB7 ",e.error]})]}),p&&a(re,{value:e.progress||0,max:100,style:{marginTop:"var(--gap-xs)"}})]}),n(m,{direction:"row",gap:"tight",children:[b&&X&&e.status==="complete"&&a(k,{variant:C.GHOST,onClick:()=>U(e),"aria-label":l("document.preview.ariaLabel"),children:a(Z,{className:"dndev-size-sm"})}),p?a(Y,{className:"dndev-size-sm",style:{animation:"spin 1s linear infinite"}}):a(k,{variant:C.GHOST,onClick:()=>B(e.id),"aria-label":l("document.delete.ariaLabel"),children:a(_,{className:"dndev-size-sm"})})]})]},e.id)})}),x&&a(s,{level:"caption",variant:v?"destructive":"muted",style:{marginTop:"var(--gap-xs)"},children:x})]}),b&&h&&a(te,{open:!!h,onOpenChange:()=>T(null),children:n(ne,{style:{maxWidth:"90vw",maxHeight:"90vh",width:"900px",height:"80vh"},children:[a(ie,{children:a(le,{children:l("document.preview.title")})}),a("iframe",{src:h,sandbox:"allow-same-origin",style:{width:"100%",height:"100%",border:"none",borderRadius:"var(--radius-md)"},title:"PDF Preview"})]})})]})});P.displayName="DocumentFieldComponent";var he=P;export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as g}from"react/jsx-runtime";import{Select as d,Stack as v}from"@donotdev/components";import{useTranslation as m}from"@donotdev/core";const f=({label:o,value:r,options:n,error:s,helperText:a,onChange:l,onBlur:i,required:u})=>{const{t:p}=m("crud"),c=r!=null?String(r):"";return g(v,{gap:"tight",children:[t(d,{label:o,value:c,onValueChange:e=>{l&&l({target:{value:e}})},onOpenChange:e=>!e&&i?.(),placeholder:p("actions.select","Select"),required:u,options:n.map(e=>({value:String(e.value),label:e.label}))}),a&&t("p",{style:{fontSize:"var(--font-size-xs)",color:s?"var(--destructive-foreground)":"var(--muted-foreground)",marginTop:"var(--gap-sm)"},children:a})]})};var h=f;export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i,jsxs as
|
|
1
|
+
import{jsx as i,jsxs as u}from"react/jsx-runtime";import{Clock as x}from"lucide-react";import{useState as T,useMemo as k}from"react";import{Label as $,Stack as s,Button as S,Slider as w}from"@donotdev/components";const f=[15,30,45,60,90,120,150,180],N={15:"duration.15m",30:"duration.30m",45:"duration.45m",60:"duration.1h",90:"duration.1h30",120:"duration.2h",150:"duration.2h30",180:"duration.3h"};function q(e,n){const o=e<60?`${e}m`:e%60===0?`${e/60}h`:`${Math.floor(e/60)}h${e%60}`,l=N[e];return!n||!l?o:n(`crud:${l}`,{defaultValue:o})??o}const W=({label:e,value:n,onChange:o,error:l,helperText:d,disabled:m,required:p,readonly:M,min:g=0,max:v=480,step:V=5,t})=>{const r=typeof n=="number"&&!Number.isNaN(n)?n:0,h=f.includes(r),[c,b]=T(!h&&r>0),C=k(()=>f.map(a=>({minutes:a,label:q(a,t)})),[t]),y=t?t("crud:duration.custom",{defaultValue:"Custom"}):"Custom";if(M){const a=r===0?t?t("crud:duration.zero",{defaultValue:"\u2014"}):"\u2014":r<60?t?t("crud:duration.minutes",{count:r,defaultValue:`${r} min`}):`${r} min`:t?t("crud:duration.hoursMinutes",{hours:Math.floor(r/60),minutes:r%60,defaultValue:`${Math.floor(r/60)}h${r%60?` ${r%60}min`:""}`}):`${Math.floor(r/60)}h${r%60?` ${r%60}m`:""}`;return u(s,{gap:"tight",children:[i($,{required:p,style:{fontSize:"var(--font-size-sm)",fontWeight:500},children:e}),u(s,{direction:"row",gap:"tight",align:"center",children:[i(x,{size:18,style:{color:"var(--muted-foreground)"},"aria-hidden":!0}),i("span",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)"},children:a})]}),d&&i("p",{style:{fontSize:"var(--font-size-xs)",color:l?"var(--destructive-foreground)":"var(--muted-foreground)",marginTop:"var(--gap-sm)"},children:d})]})}return u(s,{children:[i($,{required:p,style:{fontSize:"var(--font-size-sm)",fontWeight:500},children:e}),u(s,{direction:"row",gap:"tight",align:"center",style:{flexWrap:"wrap"},children:[C.map(({minutes:a,label:z})=>u(S,{type:"button",variant:r===a?"primary":"outline",disabled:m,onClick:()=>{b(!1),o(a)},"aria-pressed":r===a,"aria-label":z,children:[i(x,{size:14,style:{marginRight:"var(--gap-xs)"},"aria-hidden":!0}),z]},a)),i(S,{type:"button",variant:c?"primary":"outline",disabled:m,onClick:()=>{b(!0),!h&&r>0?o(r):o(30)},"aria-pressed":c,"aria-label":y,children:y})]}),c&&i(s,{gap:"tight",style:{marginTop:"var(--gap-sm)"},children:i(w,{value:[h?30:r],onValueChange:([a])=>o(Math.max(g,Math.min(v,a??0))),min:g,max:v,step:V,showValue:!0,disabled:m,"aria-label":e})}),d&&i("p",{style:{fontSize:"var(--font-size-xs)",color:l?"var(--destructive-foreground)":"var(--muted-foreground)",marginTop:"var(--gap-sm)"},children:d})]})};var j=W;export{f as DURATION_PRESETS,j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as s}from"react/jsx-runtime";import{Upload as B,X as M,File as U,Loader2 as E,FileText as g,FileSpreadsheet as H,FileImage as V,FileVideo as q,FileAudio as G,FileArchive as K,FileCode as W}from"lucide-react";import{useState as X,useRef as _,useImperativeHandle as J,forwardRef as Q}from"react";import{Button as Y,BUTTON_VARIANT as Z,Text as d,Stack as u,Progress as $}from"@donotdev/components";import{handleError as ee,useTranslation as ae}from"@donotdev/core";import{useFileUpload as re}from"../../../hooks/useFileUpload";import{uploadFile as le,deleteFile as se,getFileIcon as te,formatFileSize as ie}from"../../../utils/fileStorage";function ne({type:p,className:r}){switch(p){case"pdf":return a(g,{className:r,style:{color:"var(--destructive)"}});case"doc":return a(g,{className:r,style:{color:"var(--primary)"}});case"xls":return a(H,{className:r,style:{color:"var(--success)"}});case"ppt":return a(g,{className:r,style:{color:"var(--warning)"}});case"image":return a(V,{className:r});case"video":return a(q,{className:r});case"audio":return a(G,{className:r});case"archive":return a(K,{className:r});case"html":case"text":return a(W,{className:r});default:return a(U,{className:r})}}const b=Q(({name:p="file",label:r,value:T,onChange:w,error:m,helperText:h,accept:v,multiple:n=!1,maxFiles:k=10,maxSize:z=50*1024*1024,storagePath:y,required:
|
|
1
|
+
"use client";import{jsx as a,jsxs as s}from"react/jsx-runtime";import{Upload as B,X as M,File as U,Loader2 as E,FileText as g,FileSpreadsheet as H,FileImage as V,FileVideo as q,FileAudio as G,FileArchive as K,FileCode as W}from"lucide-react";import{useState as X,useRef as _,useImperativeHandle as J,forwardRef as Q}from"react";import{Button as Y,BUTTON_VARIANT as Z,Text as d,Stack as u,Progress as $}from"@donotdev/components";import{handleError as ee,useTranslation as ae}from"@donotdev/core";import{useFileUpload as re}from"../../../hooks/useFileUpload";import{uploadFile as le,deleteFile as se,getFileIcon as te,formatFileSize as ie}from"../../../utils/fileStorage";function ne({type:p,className:r}){switch(p){case"pdf":return a(g,{className:r,style:{color:"var(--destructive)"}});case"doc":return a(g,{className:r,style:{color:"var(--primary)"}});case"xls":return a(H,{className:r,style:{color:"var(--success)"}});case"ppt":return a(g,{className:r,style:{color:"var(--warning)"}});case"image":return a(V,{className:r});case"video":return a(q,{className:r});case"audio":return a(G,{className:r});case"archive":return a(K,{className:r});case"html":case"text":return a(W,{className:r});default:return a(U,{className:r})}}const b=Q(({name:p="file",label:r,value:T,onChange:w,error:m,helperText:h,accept:v,multiple:n=!1,maxFiles:k=10,maxSize:z=50*1024*1024,storagePath:y,required:D},S)=>{const{t:c}=ae("crud"),[x,f]=X(!1),o=_(null);function A(e,l){return le(e,{storagePath:y,onProgress:t=>l(t.progress)})}const{files:i,addFiles:F,removeFile:C}=re({name:p,value:T,onChange:w,multiple:n,maxFiles:k,maxSize:z,accept:v?[v]:[],storagePath:y,uploadFn:A});J(S,()=>({upload:async()=>{},getFiles:()=>i}),[i]);function I(e){const l=Array.from(e.target.files||[]);l.length>0&&F(l),o.current&&(o.current.value="")}function L(e){e.preventDefault(),f(!1),F(Array.from(e.dataTransfer.files))}async function P(e){const l=i.find(t=>t.id===e);if(l)try{l.uploaded&&"url"in l.uploaded&&await se(l.uploaded),C(e)}catch(t){ee(t,{userMessage:c("file.delete.failed"),severity:"error",showNotification:!0})}}const R=n||i.length===0;return s(u,{gap:"tight",children:[s(d,{level:"body",textAlign:"start",children:[r,D?"*":""]}),R&&s("div",{role:"button",tabIndex:0,"aria-label":c(n?"file.upload.ariaLabelMultiple":"file.upload.ariaLabelSingle"),className:"dndev-surface","data-variant":m?"destructive":"default",style:{border:"var(--border-width) dashed",borderColor:x?"var(--primary)":m?"var(--destructive)":"var(--border)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:x?"color-mix(in oklab, var(--primary) 5%, transparent)":"var(--surface)",transition:"border-color var(--dur-fast), background-color var(--dur-fast)",cursor:"pointer",outline:"none"},onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:L,onClick:()=>o.current?.click(),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),o.current?.click())},children:[a("input",{ref:o,type:"file",accept:v,multiple:n,style:{display:"none"},onChange:I}),s(u,{align:"center",justify:"center",children:[a(B,{className:"dndev-size-lg",style:{color:"var(--muted-foreground)"}}),a(d,{as:"p",variant:"muted",level:"small",textAlign:"center",children:c(n?"file.upload.dragDropMultiple":"file.upload.dragDropSingle")})]})]}),i.length>0&&a(u,{gap:"tight",children:i.map((e,l)=>{const t=e.uploaded&&"mimeType"in e.uploaded?e.uploaded.mimeType:e.file.type,O=te(t||"",e.file.name),N=e.status==="uploading",j=e.uploaded&&"size"in e.uploaded?e.uploaded.size:e.file.size;return s("div",{className:"dndev-surface","data-variant":"muted",style:{padding:"var(--gap-md)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",gap:"var(--gap-md)"},children:[a(ne,{type:O,className:"dndev-size-md"}),s(u,{gap:"none",style:{flex:1,minWidth:0},children:[a(d,{level:"small",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.file.name}),s(d,{level:"caption",variant:"muted",children:[ie(j),e.error&&s("span",{style:{color:"var(--destructive)"},children:[" ","\xB7 ",e.error]})]}),N&&a($,{value:e.progress||0,max:100,style:{marginTop:"var(--gap-xs)"}})]}),N?a(E,{className:"dndev-size-sm",style:{animation:"spin 1s linear infinite"}}):a(Y,{variant:Z.GHOST,onClick:()=>P(e.id),"aria-label":c("file.delete.ariaLabel"),children:a(M,{className:"dndev-size-sm"})})]},e.id)})}),h&&a(d,{level:"caption",variant:m?"destructive":"muted",style:{marginTop:"var(--gap-xs)"},children:h})]})});b.displayName="FileFieldComponent";var oe=b;export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GdprConsentFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/GdprConsentFieldComponent.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAc,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GdprConsentFieldComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fields/GdprConsentFieldComponent.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAc,MAAM,OAAO,CAAC;AAOpE,MAAM,WAAW,8BAA8B;IAC7C,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1D,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,yBAAyB,EAAE,aAAa,CAC5C,8BAA8B,CA4I/B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as o,Fragment as w}from"react/jsx-runtime";import{useState as f}from"react";import{Checkbox as D,Label as H,Sheet as
|
|
1
|
+
import{jsx as t,jsxs as o,Fragment as w}from"react/jsx-runtime";import{useState as f}from"react";import{Checkbox as D,Label as H,Sheet as u,Text as P}from"@donotdev/components";import{useTranslation as V}from"@donotdev/core";import{InlineFieldRow as j}from"./internal/InlineFieldRow";const F=({checked:a=!1,onChange:l,required:g,privacyPolicyPath:s="/legal/privacy",termsPath:c="/legal/terms"})=>{const{t:r}=V("crud"),[y,d]=f(!1),[x,h]=f(!1),p=e=>{l&&l({target:{checked:e}})},v=e=>{e.target.tagName!=="A"&&(e.target.closest('[data-type="checkbox"]')||p(!a))},m=(e,k)=>{e.preventDefault(),k==="privacy"?d(!0):h(!0)},C=r("gdprConsent.consent",{defaultValue:"I agree to the"}),n=r("gdprConsent.privacyPolicy",{defaultValue:"privacy policy"}),i=r("gdprConsent.terms",{defaultValue:"terms of use"}),b=r("gdprConsent.and",{defaultValue:"and consent to the processing of my personal data."});return o(w,{children:[o(j,{children:[t(D,{checked:a,onCheckedChange:p}),t(H,{required:g,plain:!0,onClick:v,style:{cursor:"pointer"},children:o(P,{level:"body",style:{fontSize:"var(--font-size-input)"},children:[C," ",t("a",{href:s,onClick:e=>m(e,"privacy"),style:{textDecoration:"underline",cursor:"pointer"},children:n})," / ",t("a",{href:c,onClick:e=>m(e,"terms"),style:{textDecoration:"underline",cursor:"pointer"},children:i})," ",b]})})]}),t(u,{open:y,onOpenChange:d,side:"bottom",title:n,style:{width:"100%",height:"90%",maxHeight:"90dvh",display:"flex",flexDirection:"column",overflow:"hidden"},children:t("iframe",{src:s,style:{width:"100%",height:"100%",border:"none",flex:1,minHeight:0},title:n})}),t(u,{open:x,onOpenChange:h,side:"bottom",title:i,style:{width:"100%",height:"90%",maxHeight:"90dvh",display:"flex",flexDirection:"column",overflow:"hidden"},children:t("iframe",{src:c,style:{width:"100%",height:"100%",border:"none",flex:1,minHeight:0},title:i})})]})};var I=F;export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as u}from"react/jsx-runtime";import{Label as b,Input as v,Stack as g}from"@donotdev/components";const h=({label:c,value:a={lat:0,lng:0},onChange:i,error:r,helperText:o,disabled:d,required:f})=>{const m=l=>{const e=parseFloat(l.target.value)||0;if(e>=-90&&e<=90){const n={...a,lat:e},s={target:{value:JSON.stringify(n)}};i(s)}},p=l=>{const e=parseFloat(l.target.value)||0;if(e>=-180&&e<=180){const n={...a,lng:e},s={target:{value:JSON.stringify(n)}};i(s)}};return u(g,{gap:"tight",children:[t(b,{required:f,style:{display:"block",fontSize:"var(--font-size-sm)",fontWeight:500},children:c}),u(g,{direction:"row",children:[t(v,{label:"Latitude",type:"number",value:a.lat,onChange:m,min:"-90",max:"90",step:"0.000001",disabled:d,"data-variant":r?"destructive":void 0,className:"dndev-w-full"}),t(v,{label:"Longitude",type:"number",value:a.lng,onChange:p,min:"-180",max:"180",step:"0.000001",disabled:d,"data-variant":r?"destructive":void 0,className:"dndev-w-full"})]}),o&&t("p",{style:{fontSize:"var(--font-size-xs)",color:r?"var(--destructive-foreground)":"var(--muted-foreground)",marginTop:"var(--gap-sm)"},children:o})]})};var y=h;export{y as default};
|