@powerhousedao/document-engineering 1.36.0 → 1.38.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/dist/src/scalars/components/file-field/file-field.d.ts.map +1 -1
- package/dist/src/scalars/components/file-field/file-field.js +6 -2
- package/dist/src/scalars/components/file-field/file-field.js.map +1 -1
- package/dist/src/table/components/cells/render-cell/render-cell.d.ts.map +1 -1
- package/dist/src/table/components/cells/render-cell/render-cell.js +3 -12
- package/dist/src/table/components/cells/render-cell/render-cell.js.map +1 -1
- package/dist/src/table/components/cells/render-cell/use-cell-logic.d.ts +9 -3
- package/dist/src/table/components/cells/render-cell/use-cell-logic.d.ts.map +1 -1
- package/dist/src/table/components/cells/render-cell/use-cell-logic.js +21 -1
- package/dist/src/table/components/cells/render-cell/use-cell-logic.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/aid-editor.d.ts +1 -1
- package/dist/src/table/components/default-cell-editors/aid-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/aid-editor.js +4 -3
- package/dist/src/table/components/default-cell-editors/aid-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/boolean-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/boolean-editor.js +3 -3
- package/dist/src/table/components/default-cell-editors/boolean-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/country-editor.d.ts +1 -1
- package/dist/src/table/components/default-cell-editors/country-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/country-editor.js +2 -4
- package/dist/src/table/components/default-cell-editors/country-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/currency-editor.d.ts +1 -1
- package/dist/src/table/components/default-cell-editors/currency-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/currency-editor.js +3 -2
- package/dist/src/table/components/default-cell-editors/currency-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/date-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/date-editor.js +2 -1
- package/dist/src/table/components/default-cell-editors/date-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/datetime-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/datetime-editor.js +2 -1
- package/dist/src/table/components/default-cell-editors/datetime-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/email-editor.d.ts +1 -1
- package/dist/src/table/components/default-cell-editors/email-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/email-editor.js +3 -2
- package/dist/src/table/components/default-cell-editors/email-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/enum-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/enum-editor.js +3 -2
- package/dist/src/table/components/default-cell-editors/enum-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/get-cell-editor-fn.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/get-cell-editor-fn.js +5 -0
- package/dist/src/table/components/default-cell-editors/get-cell-editor-fn.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/index.d.ts +1 -0
- package/dist/src/table/components/default-cell-editors/index.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/index.js +1 -0
- package/dist/src/table/components/default-cell-editors/index.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/number-editor.d.ts +2 -2
- package/dist/src/table/components/default-cell-editors/number-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/number-editor.js +1 -1
- package/dist/src/table/components/default-cell-editors/number-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/oid-editor.d.ts +2 -2
- package/dist/src/table/components/default-cell-editors/oid-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/oid-editor.js +11 -3
- package/dist/src/table/components/default-cell-editors/oid-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/phid-editor.d.ts +2 -2
- package/dist/src/table/components/default-cell-editors/phid-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/phid-editor.js +11 -3
- package/dist/src/table/components/default-cell-editors/phid-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/phone-editor.d.ts +4 -0
- package/dist/src/table/components/default-cell-editors/phone-editor.d.ts.map +1 -0
- package/dist/src/table/components/default-cell-editors/phone-editor.js +13 -0
- package/dist/src/table/components/default-cell-editors/phone-editor.js.map +1 -0
- package/dist/src/table/components/default-cell-editors/string-editor.d.ts +1 -1
- package/dist/src/table/components/default-cell-editors/string-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/string-editor.js +3 -2
- package/dist/src/table/components/default-cell-editors/string-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/time-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/time-editor.js +2 -1
- package/dist/src/table/components/default-cell-editors/time-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/url-editor.d.ts +1 -1
- package/dist/src/table/components/default-cell-editors/url-editor.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-editors/url-editor.js +31 -6
- package/dist/src/table/components/default-cell-editors/url-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-editors/utils.d.ts +4 -0
- package/dist/src/table/components/default-cell-editors/utils.d.ts.map +1 -0
- package/dist/src/table/components/default-cell-editors/utils.js +19 -0
- package/dist/src/table/components/default-cell-editors/utils.js.map +1 -0
- package/dist/src/table/components/default-cell-renderers/aid-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/aid-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/aid-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/amount-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/amount-render.js +17 -5
- package/dist/src/table/components/default-cell-renderers/amount-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/boolean-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/boolean-render.js +3 -6
- package/dist/src/table/components/default-cell-renderers/boolean-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/country-render.d.ts +2 -2
- package/dist/src/table/components/default-cell-renderers/country-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/country-render.js +9 -8
- package/dist/src/table/components/default-cell-renderers/country-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/currency-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/currency-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/currency-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/date-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/date-render.js +4 -7
- package/dist/src/table/components/default-cell-renderers/date-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/datetime-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/datetime-render.js +4 -7
- package/dist/src/table/components/default-cell-renderers/datetime-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/email-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/email-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/email-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/enum-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/enum-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/enum-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/get-render-fn.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/get-render-fn.js +10 -4
- package/dist/src/table/components/default-cell-renderers/get-render-fn.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/number-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/number-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/number-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/oid-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/oid-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/oid-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/phid-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/phid-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/phid-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/phone-render.d.ts +4 -0
- package/dist/src/table/components/default-cell-renderers/phone-render.d.ts.map +1 -0
- package/dist/src/table/components/default-cell-renderers/phone-render.js +28 -0
- package/dist/src/table/components/default-cell-renderers/phone-render.js.map +1 -0
- package/dist/src/table/components/default-cell-renderers/string-multiline-render.d.ts +4 -0
- package/dist/src/table/components/default-cell-renderers/string-multiline-render.d.ts.map +1 -0
- package/dist/src/table/components/default-cell-renderers/string-multiline-render.js +8 -0
- package/dist/src/table/components/default-cell-renderers/string-multiline-render.js.map +1 -0
- package/dist/src/table/components/default-cell-renderers/string-render.d.ts +4 -0
- package/dist/src/table/components/default-cell-renderers/string-render.d.ts.map +1 -0
- package/dist/src/table/components/default-cell-renderers/string-render.js +8 -0
- package/dist/src/table/components/default-cell-renderers/string-render.js.map +1 -0
- package/dist/src/table/components/default-cell-renderers/time-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/time-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/time-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/url-render.d.ts.map +1 -1
- package/dist/src/table/components/default-cell-renderers/url-render.js +2 -5
- package/dist/src/table/components/default-cell-renderers/url-render.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/utils.d.ts +18 -0
- package/dist/src/table/components/default-cell-renderers/utils.d.ts.map +1 -0
- package/dist/src/table/components/default-cell-renderers/utils.js +17 -0
- package/dist/src/table/components/default-cell-renderers/utils.js.map +1 -0
- package/dist/src/table/components/default-fns/default-cell-value-formatter.d.ts +2 -1
- package/dist/src/table/components/default-fns/default-cell-value-formatter.d.ts.map +1 -1
- package/dist/src/table/components/default-fns/default-cell-value-formatter.js +8 -3
- package/dist/src/table/components/default-fns/default-cell-value-formatter.js.map +1 -1
- package/dist/src/table/components/default-fns/default-column-config.d.ts.map +1 -1
- package/dist/src/table/components/default-fns/default-column-config.js +2 -0
- package/dist/src/table/components/default-fns/default-column-config.js.map +1 -1
- package/dist/src/table/components/default-sort-columns/default-sort-fns.d.ts.map +1 -1
- package/dist/src/table/components/default-sort-columns/default-sort-fns.js +2 -0
- package/dist/src/table/components/default-sort-columns/default-sort-fns.js.map +1 -1
- package/dist/src/table/components/header/header-number-td.js +1 -1
- package/dist/src/table/components/header/header-number-td.js.map +1 -1
- package/dist/src/table/components/header.d.ts.map +1 -1
- package/dist/src/table/components/header.js +7 -2
- package/dist/src/table/components/header.js.map +1 -1
- package/dist/src/table/components/rows/render-row.d.ts.map +1 -1
- package/dist/src/table/components/rows/render-row.js +7 -3
- package/dist/src/table/components/rows/render-row.js.map +1 -1
- package/dist/src/table/components/table-focus-trap.d.ts.map +1 -1
- package/dist/src/table/components/table-focus-trap.js +10 -0
- package/dist/src/table/components/table-focus-trap.js.map +1 -1
- package/dist/src/table/components/table-provider/table-provider.d.ts +1 -1
- package/dist/src/table/components/table-provider/table-provider.d.ts.map +1 -1
- package/dist/src/table/components/table-provider/table-provider.js +4 -0
- package/dist/src/table/components/table-provider/table-provider.js.map +1 -1
- package/dist/src/table/components/table-provider/table-reducer.d.ts +9 -0
- package/dist/src/table/components/table-provider/table-reducer.d.ts.map +1 -1
- package/dist/src/table/components/table-provider/table-reducer.js +19 -0
- package/dist/src/table/components/table-provider/table-reducer.js.map +1 -1
- package/dist/src/table/events/index.d.ts +3 -0
- package/dist/src/table/events/index.d.ts.map +1 -0
- package/dist/src/table/events/index.js +2 -0
- package/dist/src/table/events/index.js.map +1 -0
- package/dist/src/table/events/table-event-manager.d.ts +91 -0
- package/dist/src/table/events/table-event-manager.d.ts.map +1 -0
- package/dist/src/table/events/table-event-manager.js +203 -0
- package/dist/src/table/events/table-event-manager.js.map +1 -0
- package/dist/src/table/events/types.d.ts +420 -0
- package/dist/src/table/events/types.d.ts.map +1 -0
- package/dist/src/table/events/types.js +2 -0
- package/dist/src/table/events/types.js.map +1 -0
- package/dist/src/table/examples/api-usage/api-usage.js.map +1 -1
- package/dist/src/table/examples/column-visibility/column-visibility.d.ts +3 -0
- package/dist/src/table/examples/column-visibility/column-visibility.d.ts.map +1 -0
- package/dist/src/table/examples/column-visibility/column-visibility.js +51 -0
- package/dist/src/table/examples/column-visibility/column-visibility.js.map +1 -0
- package/dist/src/table/examples/custom-cell-editors/custom-cell-editors.d.ts.map +1 -1
- package/dist/src/table/examples/custom-cell-editors/custom-cell-editors.js +1 -0
- package/dist/src/table/examples/custom-cell-editors/custom-cell-editors.js.map +1 -1
- package/dist/src/table/examples/events/event-log-card.d.ts +8 -0
- package/dist/src/table/examples/events/event-log-card.d.ts.map +1 -0
- package/dist/src/table/examples/events/event-log-card.js +56 -0
- package/dist/src/table/examples/events/event-log-card.js.map +1 -0
- package/dist/src/table/examples/events/events.d.ts +10 -0
- package/dist/src/table/examples/events/events.d.ts.map +1 -0
- package/dist/src/table/examples/events/events.js +269 -0
- package/dist/src/table/examples/events/events.js.map +1 -0
- package/dist/src/table/examples/table-editing/table-editing.d.ts.map +1 -1
- package/dist/src/table/examples/table-editing/table-editing.js +15 -0
- package/dist/src/table/examples/table-editing/table-editing.js.map +1 -1
- package/dist/src/table/hooks/useGlobalTableKeyEvents.d.ts.map +1 -1
- package/dist/src/table/hooks/useGlobalTableKeyEvents.js +7 -1
- package/dist/src/table/hooks/useGlobalTableKeyEvents.js.map +1 -1
- package/dist/src/table/lib/sort-utils.d.ts.map +1 -1
- package/dist/src/table/lib/sort-utils.js +2 -0
- package/dist/src/table/lib/sort-utils.js.map +1 -1
- package/dist/src/table/logic/public-table-api.d.ts +1 -1
- package/dist/src/table/logic/public-table-api.d.ts.map +1 -1
- package/dist/src/table/logic/public-table-api.js.map +1 -1
- package/dist/src/table/logic/table-api.d.ts +7 -0
- package/dist/src/table/logic/table-api.d.ts.map +1 -1
- package/dist/src/table/logic/table-api.js +256 -13
- package/dist/src/table/logic/table-api.js.map +1 -1
- package/dist/src/table/logic/types.d.ts +4 -2
- package/dist/src/table/logic/types.d.ts.map +1 -1
- package/dist/src/table/table/mock-data.d.ts +1 -0
- package/dist/src/table/table/mock-data.d.ts.map +1 -1
- package/dist/src/table/table/mock-data.js +39 -32
- package/dist/src/table/table/mock-data.js.map +1 -1
- package/dist/src/table/table/types.d.ts +15 -5
- package/dist/src/table/table/types.d.ts.map +1 -1
- package/dist/src/table/table/utils.d.ts +6 -0
- package/dist/src/table/table/utils.d.ts.map +1 -1
- package/dist/src/table/table/utils.js +58 -13
- package/dist/src/table/table/utils.js.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/file-input.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/file-input.js +3 -2
- package/dist/src/ui/components/data-entry/file-input/file-input.js.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/types.d.ts +2 -1
- package/dist/src/ui/components/data-entry/file-input/types.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/types.js.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/useUploadFile.d.ts +4 -3
- package/dist/src/ui/components/data-entry/file-input/useUploadFile.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/useUploadFile.js +11 -5
- package/dist/src/ui/components/data-entry/file-input/useUploadFile.js.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/utils.d.ts +46 -3
- package/dist/src/ui/components/data-entry/file-input/utils.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/utils.js +158 -2
- package/dist/src/ui/components/data-entry/file-input/utils.js.map +1 -1
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.js +1 -1
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.js.map +1 -1
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.js +17 -14
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.js.map +1 -1
- package/dist/src/ui/components/data-entry/textarea/textarea.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/textarea/textarea.js +13 -5
- package/dist/src/ui/components/data-entry/textarea/textarea.js.map +1 -1
- package/dist/style.css +39 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/table/components/default-cell-renderers/text-render.d.ts +0 -4
- package/dist/src/table/components/default-cell-renderers/text-render.d.ts.map +0 -1
- package/dist/src/table/components/default-cell-renderers/text-render.js +0 -11
- package/dist/src/table/components/default-cell-renderers/text-render.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oid-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/oid-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oid-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/oid-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gDAAgD,CAAA;AAE7F,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,QAAQ,EACnD,eAAe,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,aAEnC,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,WAAW,WAAW,CAAC,CAAC,CAAC,4CA6CtG,CAAA"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { OIDField } from '../../../scalars/components/oid-field/
|
|
2
|
+
import { OIDField } from '../../../scalars/components/oid-field/index.js';
|
|
3
|
+
import { normalizeStringValue } from './utils.js';
|
|
3
4
|
export const buildOidCellEditor = (oidFieldProps) => {
|
|
4
5
|
const OidCellEditor = (value, onChange, context) => {
|
|
5
|
-
const oidValue =
|
|
6
|
-
|
|
6
|
+
const oidValue = normalizeStringValue(value);
|
|
7
|
+
if (oidFieldProps.autoComplete !== false && oidFieldProps.fetchOptionsCallback) {
|
|
8
|
+
const { autoComplete: _1, fetchOptionsCallback, ...restProps } = oidFieldProps;
|
|
9
|
+
return (_jsx(OIDField, { name: context.column.field, className: "max-w-full", autoFocus: true, fetchOptionsCallback: fetchOptionsCallback, ...restProps, value: oidValue, onChange: (value) => {
|
|
10
|
+
onChange(value);
|
|
11
|
+
} }));
|
|
12
|
+
}
|
|
13
|
+
const { autoComplete: _1, fetchOptionsCallback: _2, fetchSelectedOptionCallback: _3, previewPlaceholder: _4, ...restProps } = oidFieldProps;
|
|
14
|
+
return (_jsx(OIDField, { name: context.column.field, className: "max-w-full", autoFocus: true, autoComplete: false, ...restProps, value: oidValue, onChange: (value) => {
|
|
7
15
|
onChange(value);
|
|
8
16
|
} }));
|
|
9
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oid-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/oid-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"oid-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/oid-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,gDAAgD,CAAA;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,aAAiE,EACjE,EAAE;IACF,MAAM,aAAa,GAAG,CAAC,KAAc,EAAE,QAAqC,EAAE,OAAuB,EAAE,EAAE;QACvG,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAA;QAE5C,IAAI,aAAa,CAAC,YAAY,KAAK,KAAK,IAAI,aAAa,CAAC,oBAAoB,EAAE,CAAC;YAC/E,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,oBAAoB,EAAE,GAAG,SAAS,EAAE,GAAG,aAAa,CAAA;YAE9E,OAAO,CACL,KAAC,QAAQ,IACP,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,SAAS,EAAC,YAAY,EACtB,SAAS,QACT,oBAAoB,EAAE,oBAAoB,KACtC,SAAS,EACb,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;oBAClB,QAAQ,CAAC,KAAK,CAAC,CAAA;gBACjB,CAAC,GACD,CACH,CAAA;QACH,CAAC;QAED,MAAM,EACJ,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,2BAA2B,EAAE,EAAE,EAC/B,kBAAkB,EAAE,EAAE,EACtB,GAAG,SAAS,EACb,GAAG,aAAa,CAAA;QAEjB,OAAO,CACL,KAAC,QAAQ,IACP,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,SAAS,EAAC,YAAY,EACtB,SAAS,QACT,YAAY,EAAE,KAAK,KACf,SAAS,EACb,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,QAAQ,CAAC,KAAK,CAAC,CAAA;YACjB,CAAC,GACD,CACH,CAAA;IACH,CAAC,CAAA;IAED,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PHIDFieldProps } from '../../../scalars/components/phid-field/index.js';
|
|
2
2
|
import type { CellContext, DataType } from '../../table/types.js';
|
|
3
|
-
export declare const buildPhidCellEditor: <T extends DataType>(phidFieldProps: Omit<PHIDFieldProps, "name" | "value" | "onChange"
|
|
3
|
+
export declare const buildPhidCellEditor: <T extends DataType>(phidFieldProps: Omit<PHIDFieldProps, "name" | "value" | "onChange">) => (value: unknown, onChange: (newValue: unknown) => void, context: CellContext<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=phid-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phid-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/phid-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"phid-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/phid-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,iDAAiD,CAAA;AAEhG,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,QAAQ,EACpD,gBAAgB,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,aAEpC,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,WAAW,WAAW,CAAC,CAAC,CAAC,4CAiDvG,CAAA"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PHIDField } from '../../../scalars/components/phid-field/
|
|
2
|
+
import { PHIDField } from '../../../scalars/components/phid-field/index.js';
|
|
3
|
+
import { normalizeStringValue } from './utils.js';
|
|
3
4
|
export const buildPhidCellEditor = (phidFieldProps) => {
|
|
4
5
|
const PhidCellEditor = (value, onChange, context) => {
|
|
5
|
-
const phidValue =
|
|
6
|
-
|
|
6
|
+
const phidValue = normalizeStringValue(value);
|
|
7
|
+
if (phidFieldProps.autoComplete !== false && phidFieldProps.fetchOptionsCallback) {
|
|
8
|
+
const { autoComplete: _1, fetchOptionsCallback, allowUris, allowedScopes, ...restProps } = phidFieldProps;
|
|
9
|
+
return (_jsx(PHIDField, { name: context.column.field, className: "max-w-full", autoFocus: true, fetchOptionsCallback: fetchOptionsCallback, ...(allowUris ? { allowUris: true, allowedScopes } : { allowUris: undefined }), ...restProps, value: phidValue, onChange: (value) => {
|
|
10
|
+
onChange(value);
|
|
11
|
+
} }));
|
|
12
|
+
}
|
|
13
|
+
const { autoComplete: _1, fetchOptionsCallback: _2, fetchSelectedOptionCallback: _3, previewPlaceholder: _4, allowUris, allowedScopes, ...restProps } = phidFieldProps;
|
|
14
|
+
return (_jsx(PHIDField, { name: context.column.field, className: "max-w-full", autoFocus: true, autoComplete: false, ...(allowUris ? { allowUris: true, allowedScopes } : { allowUris: undefined }), ...restProps, value: phidValue, onChange: (value) => {
|
|
7
15
|
onChange(value);
|
|
8
16
|
} }));
|
|
9
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phid-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/phid-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"phid-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/phid-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,iDAAiD,CAAA;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,cAAmE,EACnE,EAAE;IACF,MAAM,cAAc,GAAG,CAAC,KAAc,EAAE,QAAqC,EAAE,OAAuB,EAAE,EAAE;QACxG,MAAM,SAAS,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAA;QAE7C,IAAI,cAAc,CAAC,YAAY,KAAK,KAAK,IAAI,cAAc,CAAC,oBAAoB,EAAE,CAAC;YACjF,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,oBAAoB,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,GAAG,cAAc,CAAA;YAEzG,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,SAAS,EAAC,YAAY,EACtB,SAAS,QACT,oBAAoB,EAAE,oBAAoB,KACtC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,KAC3E,SAAS,EACb,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;oBAClB,QAAQ,CAAC,KAAK,CAAC,CAAA;gBACjB,CAAC,GACD,CACH,CAAA;QACH,CAAC;QAED,MAAM,EACJ,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,2BAA2B,EAAE,EAAE,EAC/B,kBAAkB,EAAE,EAAE,EACtB,SAAS,EACT,aAAa,EACb,GAAG,SAAS,EACb,GAAG,cAAc,CAAA;QAElB,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,SAAS,EAAC,YAAY,EACtB,SAAS,QACT,YAAY,EAAE,KAAK,KACf,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,KAC3E,SAAS,EACb,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,QAAQ,CAAC,KAAK,CAAC,CAAA;YACjB,CAAC,GACD,CACH,CAAA;IACH,CAAC,CAAA;IAED,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type PhoneNumberFieldProps } from '../../../scalars/components/phone-number-field/index.js';
|
|
2
|
+
import type { CellContext, DataType } from '../../table/types.js';
|
|
3
|
+
export declare const buildPhoneCellEditor: <T extends DataType>(phoneNumberFieldProps: Omit<PhoneNumberFieldProps, "name" | "value" | "onChange">) => (value: unknown, onChange: (newValue: unknown) => void, context: CellContext<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=phone-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/phone-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,yDAAyD,CAAA;AAEtH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,QAAQ,EACrD,uBAAuB,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,aAE3C,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,WAAW,WAAW,CAAC,CAAC,CAAC,4CAmB9G,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PhoneNumberField } from '../../../scalars/components/phone-number-field/index.js';
|
|
3
|
+
import { normalizeStringValue } from './utils.js';
|
|
4
|
+
export const buildPhoneCellEditor = (phoneNumberFieldProps) => {
|
|
5
|
+
const PhoneNumberCellEditor = (value, onChange, context) => {
|
|
6
|
+
const phoneValue = normalizeStringValue(value);
|
|
7
|
+
return (_jsx(PhoneNumberField, { name: context.column.field, autoComplete: "off", className: "max-w-full", autoFocus: true, ...phoneNumberFieldProps, value: phoneValue, onChange: (value) => {
|
|
8
|
+
onChange(value);
|
|
9
|
+
} }));
|
|
10
|
+
};
|
|
11
|
+
return PhoneNumberCellEditor;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=phone-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/phone-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAA8B,MAAM,yDAAyD,CAAA;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,qBAAiF,EACjF,EAAE;IACF,MAAM,qBAAqB,GAAG,CAAC,KAAc,EAAE,QAAqC,EAAE,OAAuB,EAAE,EAAE;QAC/G,MAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAA;QAE9C,OAAO,CACL,KAAC,gBAAgB,IACf,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,YAAY,EAAC,KAAK,EAClB,SAAS,EAAC,YAAY,EACtB,SAAS,WACL,qBAAqB,EACzB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,QAAQ,CAAC,KAAK,CAAC,CAAA;YACjB,CAAC,GACD,CACH,CAAA;IACH,CAAC,CAAA;IAED,OAAO,qBAAqB,CAAA;AAC9B,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type StringFieldProps } from '../../../scalars/components/string-field/
|
|
1
|
+
import { type StringFieldProps } from '../../../scalars/components/string-field/index.js';
|
|
2
2
|
import type { CellContext, DataType } from '../../table/types.js';
|
|
3
3
|
export declare const buildStringCellEditor: <T extends DataType>(stringFieldProps: Omit<StringFieldProps, "name" | "value" | "onChange">) => (value: unknown, onChange: (newValue: unknown) => void, context: CellContext<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=string-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/string-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"string-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/string-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAA;AAEtG,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,QAAQ,EACtD,kBAAkB,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,aAEtC,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,WAAW,WAAW,CAAC,CAAC,CAAC,4CAkBzG,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { StringField } from '../../../scalars/components/string-field/
|
|
2
|
+
import { StringField } from '../../../scalars/components/string-field/index.js';
|
|
3
|
+
import { normalizeStringValue } from './utils.js';
|
|
3
4
|
export const buildStringCellEditor = (stringFieldProps) => {
|
|
4
5
|
const StringCellEditor = (value, onChange, context) => {
|
|
5
|
-
const stringValue =
|
|
6
|
+
const stringValue = normalizeStringValue(value);
|
|
6
7
|
return (_jsx(StringField, { name: context.column.field, className: "max-w-full", autoFocus: true, ...stringFieldProps, value: stringValue, onChange: (e) => {
|
|
7
8
|
onChange(e.target.value);
|
|
8
9
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/string-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,
|
|
1
|
+
{"version":3,"file":"string-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/string-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,mDAAmD,CAAA;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,gBAAuE,EACvE,EAAE;IACF,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAE,QAAqC,EAAE,OAAuB,EAAE,EAAE;QAC1G,MAAM,WAAW,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAA;QAE/C,OAAO,CACL,KAAC,WAAW,IACV,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,SAAS,EAAC,YAAY,EACtB,SAAS,WACL,gBAAgB,EACpB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YAC1B,CAAC,GACD,CACH,CAAA;IACH,CAAC,CAAA;IAED,OAAO,gBAAgB,CAAA;AACzB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/time-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,wDAAwD,CAAA;
|
|
1
|
+
{"version":3,"file":"time-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/time-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,wDAAwD,CAAA;AAE7G,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,QAAQ,EACpD,gBAAgB,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,aAEpC,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,WAAW,WAAW,CAAC,CAAC,CAAC,4CAkBvG,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TimePickerField } from '../../../scalars/components/time-picker-field/index.js';
|
|
3
|
+
import { normalizeStringValue } from './utils.js';
|
|
3
4
|
export const buildTimeCellEditor = (timeFieldProps) => {
|
|
4
5
|
const TimeCellEditor = (value, onChange, context) => {
|
|
5
|
-
const timeValue =
|
|
6
|
+
const timeValue = normalizeStringValue(value);
|
|
6
7
|
return (_jsx(TimePickerField, { name: context.column.field, className: "max-w-full", autoFocus: true, ...timeFieldProps, value: timeValue, onChange: (e) => {
|
|
7
8
|
onChange(e.target.value);
|
|
8
9
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/time-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,eAAe,EAAE,MAAM,wDAAwD,CAAA;
|
|
1
|
+
{"version":3,"file":"time-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/time-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,eAAe,EAAE,MAAM,wDAAwD,CAAA;AAC7G,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,cAAmE,EACnE,EAAE;IACF,MAAM,cAAc,GAAG,CAAC,KAAc,EAAE,QAAqC,EAAE,OAAuB,EAAE,EAAE;QACxG,MAAM,SAAS,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAA;QAE7C,OAAO,CACL,KAAC,eAAe,IACd,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,SAAS,EAAC,YAAY,EACtB,SAAS,WACL,cAAc,EAClB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YAC1B,CAAC,GACD,CACH,CAAA;IACH,CAAC,CAAA;IAED,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type UrlFieldProps } from '../../../scalars/components/url-field/
|
|
1
|
+
import { type UrlFieldProps } from '../../../scalars/components/url-field/index.js';
|
|
2
2
|
import type { CellContext, DataType } from '../../table/types.js';
|
|
3
3
|
export declare const buildUrlCellEditor: <T extends DataType>(urlFieldProps: Omit<UrlFieldProps, "name" | "value" | "onChange">) => (value: unknown, onChange: (newValue: unknown) => void, context: CellContext<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=url-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/url-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url-editor.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/url-editor.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gDAAgD,CAAA;AAE7F,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,QAAQ,EACnD,eAAe,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,aAEnC,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,WAAW,WAAW,CAAC,CAAC,CAAC,4CA8EtG,CAAA"}
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import { Popover, PopoverAnchor, PopoverContent } from '../../../scalars/components/fragments/popover/index.js';
|
|
4
|
+
import { Tooltip, TooltipProvider } from '../../../ui/components/tooltip/index.js';
|
|
5
|
+
import { Icon } from '../../../ui/components/icon/index.js';
|
|
6
|
+
import { cn } from '../../../scalars/lib/utils.js';
|
|
7
|
+
import { UrlField } from '../../../scalars/components/url-field/index.js';
|
|
8
|
+
import { normalizeStringValue } from './utils.js';
|
|
3
9
|
export const buildUrlCellEditor = (urlFieldProps) => {
|
|
4
10
|
const UrlCellEditor = (value, onChange, context) => {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
const [hasCopied, setHasCopied] = useState(false);
|
|
12
|
+
const urlValue = normalizeStringValue(value);
|
|
13
|
+
const shouldShowPopover = urlValue !== '' && context.isEditMode;
|
|
14
|
+
const handleCopy = useCallback(() => {
|
|
15
|
+
navigator.clipboard
|
|
16
|
+
.writeText(urlValue)
|
|
17
|
+
.then(() => {
|
|
18
|
+
setHasCopied(true);
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
setHasCopied(false);
|
|
21
|
+
}, 2000);
|
|
22
|
+
})
|
|
23
|
+
.catch((error) => {
|
|
24
|
+
console.error('Failed to copy URL', error);
|
|
25
|
+
});
|
|
26
|
+
}, [urlValue]);
|
|
27
|
+
return (_jsxs(Popover, { open: shouldShowPopover, children: [_jsx(PopoverAnchor, { asChild: true, children: _jsx("div", { children: _jsx(UrlField, { name: context.column.field, className: "max-w-full", autoFocus: true, ...urlFieldProps, value: urlValue, onChange: (e) => {
|
|
28
|
+
onChange(e.target.value);
|
|
29
|
+
} }) }) }), shouldShowPopover && (_jsxs(PopoverContent, { align: "start", sideOffset: 12, className: cn('flex items-center gap-2 px-3 py-2 border-none w-fit'), onOpenAutoFocus: (e) => {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
}, onMouseDown: (e) => {
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
}, children: [_jsx("div", { className: "max-w-60", children: _jsx("a", { href: urlValue, target: "_blank", rel: "noopener noreferrer", className: "text-blue-900 hover:underline focus-visible:outline-none truncate block text-sm", title: urlValue, children: urlValue }) }), _jsx(TooltipProvider, { children: _jsx(Tooltip, { content: "Copied!", open: hasCopied, triggerAsChild: true, children: _jsx("button", { type: "button", "aria-label": "Copy URL", onClick: handleCopy, className: cn('focus-visible:outline-none [&_svg]:pointer-events-none'), children: _jsx(Icon, { name: "Copy", size: 16, className: cn('text-gray-500 dark:text-gray-600') }) }) }) })] }))] }));
|
|
9
34
|
};
|
|
10
35
|
return UrlCellEditor;
|
|
11
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/url-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"url-editor.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/url-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAA;AAC/G,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAA;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAsB,MAAM,gDAAgD,CAAA;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,aAAiE,EACjE,EAAE;IACF,MAAM,aAAa,GAAG,CAAC,KAAc,EAAE,QAAqC,EAAE,OAAuB,EAAE,EAAE;QACvG,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;QAEjD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAA;QAC5C,MAAM,iBAAiB,GAAG,QAAQ,KAAK,EAAE,IAAI,OAAO,CAAC,UAAU,CAAA;QAE/D,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;YAClC,SAAS,CAAC,SAAS;iBAChB,SAAS,CAAC,QAAQ,CAAC;iBACnB,IAAI,CAAC,GAAG,EAAE;gBACT,YAAY,CAAC,IAAI,CAAC,CAAA;gBAClB,UAAU,CAAC,GAAG,EAAE;oBACd,YAAY,CAAC,KAAK,CAAC,CAAA;gBACrB,CAAC,EAAE,IAAI,CAAC,CAAA;YACV,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACf,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAA;YAC5C,CAAC,CAAC,CAAA;QACN,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;QAEd,OAAO,CACL,MAAC,OAAO,IAAC,IAAI,EAAE,iBAAiB,aAC9B,KAAC,aAAa,IAAC,OAAO,kBACpB,wBACE,KAAC,QAAQ,IACP,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAC1B,SAAS,EAAC,YAAY,EACtB,SAAS,WACL,aAAa,EACjB,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gCACd,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;4BAC1B,CAAC,GACD,GACE,GACQ,EACf,iBAAiB,IAAI,CACpB,MAAC,cAAc,IACb,KAAK,EAAC,OAAO,EACb,UAAU,EAAE,EAAE,EACd,SAAS,EAAE,EAAE,CAAC,qDAAqD,CAAC,EACpE,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE;wBACrB,CAAC,CAAC,cAAc,EAAE,CAAA;oBACpB,CAAC,EACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;wBACjB,CAAC,CAAC,cAAc,EAAE,CAAA;oBACpB,CAAC,aAED,cAAK,SAAS,EAAC,UAAU,YACvB,YACE,IAAI,EAAE,QAAQ,EACd,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,iFAAiF,EAC3F,KAAK,EAAE,QAAQ,YAEd,QAAQ,GACP,GACA,EACN,KAAC,eAAe,cACd,KAAC,OAAO,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAE,SAAS,EAAE,cAAc,kBACxD,iBACE,IAAI,EAAC,QAAQ,gBACF,UAAU,EACrB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,EAAE,CAAC,wDAAwD,CAAC,YAEvE,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,kCAAkC,CAAC,GAAI,GAC1E,GACD,GACM,IACH,CAClB,IACO,CACX,CAAA;IACH,CAAC,CAAA;IAED,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const normalizeStringValue: (value: unknown) => string;
|
|
2
|
+
export declare const normalizeEnumValue: (value: unknown) => string | string[] | undefined;
|
|
3
|
+
export declare const normalizeDateValue: (value: unknown) => string | Date | undefined;
|
|
4
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,MAErD,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAQvE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IAAI,GAAG,SAKnE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const normalizeStringValue = (value) => {
|
|
2
|
+
return typeof value === 'string' ? value : (value?.toString() ?? '');
|
|
3
|
+
};
|
|
4
|
+
export const normalizeEnumValue = (value) => {
|
|
5
|
+
if (typeof value === 'string') {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
if (Array.isArray(value) && value.every((item) => typeof item === 'string')) {
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
};
|
|
13
|
+
export const normalizeDateValue = (value) => {
|
|
14
|
+
if (typeof value === 'string' || value instanceof Date) {
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-editors/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAc,EAAU,EAAE;IAC7D,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;AACtE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAiC,EAAE;IAClF,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAA;IACd,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC5E,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAA6B,EAAE;IAC9E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;QACvD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aid-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/aid-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aid-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/aid-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,QAAA,MAAM,aAAa,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAS5F,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
+
import { getTextAlignmentClasses } from './utils.js';
|
|
3
4
|
const renderAidCell = (value, context) => {
|
|
4
|
-
return (_jsx("div", { className: cn({
|
|
5
|
-
'text-right': context.column.align === 'right',
|
|
6
|
-
'text-center': context.column.align === 'center',
|
|
7
|
-
'text-left': context.column.align === 'left' || !context.column.align,
|
|
8
|
-
}), children: value?.toString() ?? '' }));
|
|
5
|
+
return (_jsx("div", { className: cn(getTextAlignmentClasses(context), 'truncate'), style: { maxWidth: context.column.maxWidth ?? context.column.width }, children: value?.toString() ?? '' }));
|
|
9
6
|
};
|
|
10
7
|
export { renderAidCell };
|
|
11
8
|
//# sourceMappingURL=aid-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aid-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/aid-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"aid-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/aid-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,aAAa,GAAG,CAAgC,KAAc,EAAE,OAAuB,EAAE,EAAE;IAC/F,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,EAC3D,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,YAEnE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,GACpB,CACP,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/amount-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"amount-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/amount-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAGjE,QAAA,MAAM,gBAAgB,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAkB/F,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
+
import { getTextAlignmentClasses } from './utils.js';
|
|
3
4
|
const renderAmountCell = (value, context) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const formatAmount = (rawValue) => {
|
|
6
|
+
if (typeof rawValue === 'object' && rawValue !== null && 'value' in rawValue) {
|
|
7
|
+
const amount = rawValue;
|
|
8
|
+
if (amount.value !== undefined && amount.unit) {
|
|
9
|
+
return `${amount.value} ${amount.unit}`;
|
|
10
|
+
}
|
|
11
|
+
if (amount.value !== undefined) {
|
|
12
|
+
return amount.value.toString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (typeof rawValue === 'number') {
|
|
16
|
+
return rawValue.toString();
|
|
17
|
+
}
|
|
18
|
+
return '';
|
|
19
|
+
};
|
|
20
|
+
return _jsx("div", { className: cn(getTextAlignmentClasses(context), 'font-semibold'), children: formatAmount(value) });
|
|
9
21
|
};
|
|
10
22
|
export { renderAmountCell };
|
|
11
23
|
//# sourceMappingURL=amount-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/amount-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"amount-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/amount-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAIpD,MAAM,gBAAgB,GAAG,CAAgC,KAAc,EAAE,OAAuB,EAAE,EAAE;IAClG,MAAM,YAAY,GAAG,CAAC,QAAiB,EAAU,EAAE;QACjD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC7E,MAAM,MAAM,GAAG,QAAkB,CAAA;YACjC,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC9C,OAAO,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,EAAE,CAAA;YACzC,CAAC;YACD,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC/B,OAAO,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;YAChC,CAAC;QACH,CAAC;QACD,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAA;QAC5B,CAAC;QACD,OAAO,EAAE,CAAA;IACX,CAAC,CAAA;IAED,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,YAAG,YAAY,CAAC,KAAK,CAAC,GAAO,CAAA;AAC3G,CAAC,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/boolean-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"boolean-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/boolean-render.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,QAAA,MAAM,iBAAiB,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAMhG,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
-
import { Checkbox } from '../../../ui/components/data-entry/checkbox/
|
|
3
|
+
import { Checkbox } from '../../../ui/components/data-entry/checkbox/index.js';
|
|
4
|
+
import { getJustifyAlignmentClasses } from './utils.js';
|
|
4
5
|
const renderBooleanCell = (value, context) => {
|
|
5
|
-
return (_jsx("div", { className: cn({
|
|
6
|
-
'justify-end': context.column.align === 'right',
|
|
7
|
-
'justify-center': context.column.align === 'center',
|
|
8
|
-
'justify-start': context.column.align === 'left' || !context.column.align,
|
|
9
|
-
}, 'flex w-full'), children: _jsx(Checkbox, { value: String(value) === 'true', disabled: true }) }));
|
|
6
|
+
return (_jsx("div", { className: cn(getJustifyAlignmentClasses(context), 'flex w-full [&_button]:!mr-0'), children: _jsx(Checkbox, { value: String(value) === 'true', disabled: true }) }));
|
|
10
7
|
};
|
|
11
8
|
export { renderBooleanCell };
|
|
12
9
|
//# sourceMappingURL=boolean-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/boolean-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"boolean-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/boolean-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAA;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAGvD,MAAM,iBAAiB,GAAG,CAAgC,KAAc,EAAE,OAAuB,EAAE,EAAE;IACnG,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,8BAA8B,CAAC,YACrF,KAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAI,GACzD,CACP,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { CellContext, DataType } from '../../table/types.js';
|
|
2
|
-
declare const
|
|
3
|
-
export { renderCountryCell };
|
|
2
|
+
declare const RenderCountryCell: <T extends DataType = DataType>(value: unknown, context: CellContext<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export { RenderCountryCell as renderCountryCell };
|
|
4
4
|
//# sourceMappingURL=country-render.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/country-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"country-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/country-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAKjE,QAAA,MAAM,iBAAiB,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAYhG,CAAA;AAED,OAAO,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { getTextAlignmentClasses } from './utils.js';
|
|
4
|
+
import countries from 'world-countries';
|
|
5
|
+
import { useMemo } from 'react';
|
|
6
|
+
import { CircleFlag } from 'react-circle-flags';
|
|
7
|
+
const RenderCountryCell = (value, context) => {
|
|
8
|
+
const countryValue = useMemo(() => countries.find((country) => country.cca2 === value), [value]);
|
|
9
|
+
return (_jsxs("div", { className: cn('flex items-center gap-2', getTextAlignmentClasses(context)), children: [countryValue && _jsx(CircleFlag, { className: "size-4", countryCode: countryValue.cca2.toLowerCase(), height: 16 }), countryValue?.name.common ?? ''] }));
|
|
9
10
|
};
|
|
10
|
-
export { renderCountryCell };
|
|
11
|
+
export { RenderCountryCell as renderCountryCell };
|
|
11
12
|
//# sourceMappingURL=country-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/country-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"country-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/country-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAEpD,OAAO,SAA6B,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,iBAAiB,GAAG,CAAgC,KAAc,EAAE,OAAuB,EAAE,EAAE;IACnG,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAE,SAAkC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,EACnF,CAAC,KAAK,CAAC,CACR,CAAA;IAED,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC,aAC5E,YAAY,IAAI,KAAC,UAAU,IAAC,SAAS,EAAC,QAAQ,EAAC,WAAW,EAAE,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,EAC3G,YAAY,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE,IAC5B,CACP,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/currency-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"currency-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/currency-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,QAAA,MAAM,kBAAkB,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAEjG,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
+
import { getTextAlignmentClasses } from './utils.js';
|
|
3
4
|
const renderCurrencyCell = (value, context) => {
|
|
4
|
-
return
|
|
5
|
-
'text-right': context.column.align === 'right',
|
|
6
|
-
'text-center': context.column.align === 'center',
|
|
7
|
-
'text-left': context.column.align === 'left' || !context.column.align,
|
|
8
|
-
}), children: value?.toString() ?? '' }));
|
|
5
|
+
return _jsx("div", { className: cn(getTextAlignmentClasses(context), 'font-semibold'), children: value?.toString() ?? '' });
|
|
9
6
|
};
|
|
10
7
|
export { renderCurrencyCell };
|
|
11
8
|
//# sourceMappingURL=currency-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/currency-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"currency-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/currency-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,kBAAkB,GAAG,CAAgC,KAAc,EAAE,OAAuB,EAAE,EAAE;IACpG,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,YAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAO,CAAA;AAC/G,CAAC,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/date-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/date-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,QAAA,MAAM,cAAc,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAe7F,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
+
import { getTextAlignmentClasses } from './utils.js';
|
|
3
4
|
const renderDateCell = (value, context) => {
|
|
4
5
|
const formatDate = (dateValue) => {
|
|
5
6
|
if (!dateValue)
|
|
@@ -7,18 +8,14 @@ const renderDateCell = (value, context) => {
|
|
|
7
8
|
try {
|
|
8
9
|
const date = new Date(dateValue);
|
|
9
10
|
if (isNaN(date.getTime()))
|
|
10
|
-
return
|
|
11
|
+
return typeof dateValue === 'string' ? dateValue : '';
|
|
11
12
|
return date.toLocaleDateString();
|
|
12
13
|
}
|
|
13
14
|
catch {
|
|
14
|
-
return
|
|
15
|
+
return typeof dateValue === 'string' ? dateValue : '';
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
|
-
return
|
|
18
|
-
'text-right': context.column.align === 'right',
|
|
19
|
-
'text-center': context.column.align === 'center',
|
|
20
|
-
'text-left': context.column.align === 'left' || !context.column.align,
|
|
21
|
-
}), children: formatDate(value) }));
|
|
18
|
+
return _jsx("div", { className: cn(getTextAlignmentClasses(context), 'font-semibold'), children: formatDate(value) });
|
|
22
19
|
};
|
|
23
20
|
export { renderDateCell };
|
|
24
21
|
//# sourceMappingURL=date-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/date-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"date-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/date-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,cAAc,GAAG,CAAgC,KAAc,EAAE,OAAuB,EAAE,EAAE;IAChG,MAAM,UAAU,GAAG,CAAC,SAAkB,EAAU,EAAE;QAChD,IAAI,CAAC,SAAS;YAAE,OAAO,EAAE,CAAA;QAEzB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAA0B,CAAC,CAAA;YACjD,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAAE,OAAO,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;YAEhF,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAClC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;QACvD,CAAC;IACH,CAAC,CAAA;IAED,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,YAAG,UAAU,CAAC,KAAK,CAAC,GAAO,CAAA;AACzG,CAAC,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/datetime-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"datetime-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/datetime-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,QAAA,MAAM,kBAAkB,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAejG,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
+
import { getTextAlignmentClasses } from './utils.js';
|
|
3
4
|
const renderDateTimeCell = (value, context) => {
|
|
4
5
|
const formatDateTime = (dateValue) => {
|
|
5
6
|
if (!dateValue)
|
|
@@ -7,18 +8,14 @@ const renderDateTimeCell = (value, context) => {
|
|
|
7
8
|
try {
|
|
8
9
|
const date = new Date(dateValue);
|
|
9
10
|
if (isNaN(date.getTime()))
|
|
10
|
-
return
|
|
11
|
+
return typeof dateValue === 'string' ? dateValue : '';
|
|
11
12
|
return date.toLocaleString();
|
|
12
13
|
}
|
|
13
14
|
catch {
|
|
14
|
-
return
|
|
15
|
+
return typeof dateValue === 'string' ? dateValue : '';
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
|
-
return
|
|
18
|
-
'text-right': context.column.align === 'right',
|
|
19
|
-
'text-center': context.column.align === 'center',
|
|
20
|
-
'text-left': context.column.align === 'left' || !context.column.align,
|
|
21
|
-
}), children: formatDateTime(value) }));
|
|
18
|
+
return _jsx("div", { className: cn(getTextAlignmentClasses(context), 'font-semibold'), children: formatDateTime(value) });
|
|
22
19
|
};
|
|
23
20
|
export { renderDateTimeCell };
|
|
24
21
|
//# sourceMappingURL=datetime-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/datetime-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"datetime-render.js","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/datetime-render.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,kBAAkB,GAAG,CAAgC,KAAc,EAAE,OAAuB,EAAE,EAAE;IACpG,MAAM,cAAc,GAAG,CAAC,SAAkB,EAAU,EAAE;QACpD,IAAI,CAAC,SAAS;YAAE,OAAO,EAAE,CAAA;QAEzB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAA0B,CAAC,CAAA;YACjD,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAAE,OAAO,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;YAEhF,OAAO,IAAI,CAAC,cAAc,EAAE,CAAA;QAC9B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;QACvD,CAAC;IACH,CAAC,CAAA;IAED,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,YAAG,cAAc,CAAC,KAAK,CAAC,GAAO,CAAA;AAC7G,CAAC,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/email-render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email-render.d.ts","sourceRoot":"","sources":["../../../../../src/table/components/default-cell-renderers/email-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEjE,QAAA,MAAM,eAAe,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,4CAE9F,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../scalars/lib/utils.js';
|
|
3
|
+
import { getTextAlignmentClasses } from './utils.js';
|
|
3
4
|
const renderEmailCell = (value, context) => {
|
|
4
|
-
return
|
|
5
|
-
'text-right': context.column.align === 'right',
|
|
6
|
-
'text-center': context.column.align === 'center',
|
|
7
|
-
'text-left': context.column.align === 'left' || !context.column.align,
|
|
8
|
-
}), children: value?.toString() ?? '' }));
|
|
5
|
+
return _jsx("div", { className: cn(getTextAlignmentClasses(context), 'break-all'), children: value?.toString() ?? '' });
|
|
9
6
|
};
|
|
10
7
|
export { renderEmailCell };
|
|
11
8
|
//# sourceMappingURL=email-render.js.map
|