@panneau/fields 5.0.0-alpha.5 → 5.0.0-alpha.6
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/README.md +34 -0
- package/dist/duration/DurationField.css +11 -0
- package/dist/duration/DurationField.d.ts +26 -0
- package/dist/duration/DurationField.d.ts.map +1 -0
- package/dist/duration/DurationField.js +129 -0
- package/dist/duration/DurationField.js.map +1 -0
- package/dist/duration/DurationField.module.js +12 -0
- package/dist/duration/DurationField.module.js.map +1 -0
- package/dist/duration/index.d.ts +2 -0
- package/dist/duration/index.d.ts.map +1 -0
- package/dist/duration/index.js +1 -0
- package/dist/embed/EmbedField.css +60 -0
- package/dist/embed/EmbedField.d.ts +20 -0
- package/dist/embed/EmbedField.d.ts.map +1 -0
- package/dist/embed/EmbedField.js +130 -0
- package/dist/embed/EmbedField.js.map +1 -0
- package/dist/embed/EmbedField.module.js +22 -0
- package/dist/embed/EmbedField.module.js.map +1 -0
- package/dist/embed/index.d.ts +3 -0
- package/dist/embed/index.d.ts.map +1 -0
- package/dist/embed/index.js +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/json/JsonField.css +7 -0
- package/dist/json/JsonField.d.ts +22 -0
- package/dist/json/JsonField.d.ts.map +1 -0
- package/dist/json/JsonField.js +125 -0
- package/dist/json/JsonField.js.map +1 -0
- package/dist/json/JsonField.module.js +8 -0
- package/dist/json/JsonField.module.js.map +1 -0
- package/dist/json/index.d.ts +2 -0
- package/dist/json/index.d.ts.map +1 -0
- package/dist/json/index.js +1 -0
- package/dist/location/LocationField.css +54 -0
- package/dist/location/LocationField.d.ts +31 -0
- package/dist/location/LocationField.d.ts.map +1 -0
- package/dist/location/LocationField.js +350 -0
- package/dist/location/LocationField.js.map +1 -0
- package/dist/location/LocationField.module.js +22 -0
- package/dist/location/LocationField.module.js.map +1 -0
- package/dist/location/LocationMap.d.ts +25 -0
- package/dist/location/LocationMap.d.ts.map +1 -0
- package/dist/location/LocationMap.js +115 -0
- package/dist/location/LocationMap.js.map +1 -0
- package/dist/location/index.d.ts +5 -0
- package/dist/location/index.d.ts.map +1 -0
- package/dist/location/index.js +4 -0
- package/dist/location/leafletCss.d.ts +2 -0
- package/dist/location/leafletCss.d.ts.map +1 -0
- package/dist/location/leafletCss.js +6 -0
- package/dist/location/leafletCss.js.map +1 -0
- package/dist/location/nominatim.d.ts +17 -0
- package/dist/location/nominatim.d.ts.map +1 -0
- package/dist/location/nominatim.js +50 -0
- package/dist/location/nominatim.js.map +1 -0
- package/dist/location/types.d.ts +40 -0
- package/dist/location/types.d.ts.map +1 -0
- package/dist/range/RangeField.d.ts +22 -0
- package/dist/range/RangeField.d.ts.map +1 -0
- package/dist/range/RangeField.js +132 -0
- package/dist/range/RangeField.js.map +1 -0
- package/dist/range/index.d.ts +2 -0
- package/dist/range/index.d.ts.map +1 -0
- package/dist/range/index.js +1 -0
- package/dist/shared/builtIn.d.ts +1 -0
- package/dist/shared/builtIn.d.ts.map +1 -1
- package/dist/shared/builtIn.js +16 -1
- package/dist/shared/builtIn.js.map +1 -1
- package/dist/shared/context.d.ts +13 -3
- package/dist/shared/context.d.ts.map +1 -1
- package/dist/shared/context.js +27 -19
- package/dist/shared/context.js.map +1 -1
- package/dist/shared/embed.d.ts +19 -0
- package/dist/shared/embed.d.ts.map +1 -0
- package/dist/shared/embed.js +14 -0
- package/dist/shared/embed.js.map +1 -0
- package/dist/tags/TagsField.d.ts +17 -0
- package/dist/tags/TagsField.d.ts.map +1 -0
- package/dist/tags/TagsField.js +120 -0
- package/dist/tags/TagsField.js.map +1 -0
- package/dist/tags/index.d.ts +2 -0
- package/dist/tags/index.d.ts.map +1 -0
- package/dist/tags/index.js +1 -0
- package/dist/tel/TelField.d.ts +11 -0
- package/dist/tel/TelField.d.ts.map +1 -0
- package/dist/tel/TelField.js +87 -0
- package/dist/tel/TelField.js.map +1 -0
- package/dist/tel/index.d.ts +2 -0
- package/dist/tel/index.d.ts.map +1 -0
- package/dist/tel/index.js +1 -0
- package/package.json +41 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtIn.d.ts","sourceRoot":"","sources":["../../src/shared/builtIn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtIn.d.ts","sourceRoot":"","sources":["../../src/shared/builtIn.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAwB9D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC7C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAK7D,CAAC"}
|
package/dist/shared/builtIn.js
CHANGED
|
@@ -3,14 +3,21 @@ import { TextFieldEntry } from "../text/TextField.js";
|
|
|
3
3
|
import { ColorFieldEntry } from "../color/ColorField.js";
|
|
4
4
|
import { DateFieldEntry } from "../date/DateField.js";
|
|
5
5
|
import { DateTimeFieldEntry } from "../datetime/DateTimeField.js";
|
|
6
|
+
import { DurationFieldEntry } from "../duration/DurationField.js";
|
|
6
7
|
import { EmailFieldEntry } from "../email/EmailField.js";
|
|
8
|
+
import { EmbedFieldEntry } from "../embed/EmbedField.js";
|
|
7
9
|
import { FileFieldEntry } from "../file/FileField.js";
|
|
8
10
|
import { GroupFieldEntry } from "../group/GroupField.js";
|
|
11
|
+
import { JsonFieldEntry } from "../json/JsonField.js";
|
|
12
|
+
import { LocationFieldEntry } from "../location/LocationField.js";
|
|
9
13
|
import { NumberFieldEntry } from "../number/NumberField.js";
|
|
14
|
+
import { RangeFieldEntry } from "../range/RangeField.js";
|
|
10
15
|
import { RelationFieldEntry } from "../relation/RelationField.js";
|
|
11
16
|
import { RepeaterFieldEntry } from "../repeater/RepeaterField.js";
|
|
12
17
|
import { SelectFieldEntry } from "../select/SelectField.js";
|
|
13
18
|
import { SlugFieldEntry } from "../slug/SlugField.js";
|
|
19
|
+
import { TagsFieldEntry } from "../tags/TagsField.js";
|
|
20
|
+
import { TelFieldEntry } from "../tel/TelField.js";
|
|
14
21
|
import { TextAreaFieldEntry } from "../textarea/TextAreaField.js";
|
|
15
22
|
import { TimeFieldEntry } from "../time/TimeField.js";
|
|
16
23
|
import { UrlFieldEntry } from "../url/UrlField.js";
|
|
@@ -20,6 +27,7 @@ import { fr } from "@panneau/intl";
|
|
|
20
27
|
* The entries of the built-in field types. `richtext` and `media` come with their plugins
|
|
21
28
|
* (`@panneau/editor` and `@panneau/media`): without them, `DefinitionField` renders a placeholder.
|
|
22
29
|
* `file` uploads through the upload source of the fields context, or gives the files themselves.
|
|
30
|
+
* `embed` and `location` use its embed source and its maps; `location` loads Leaflet when shown.
|
|
23
31
|
*/
|
|
24
32
|
var builtInFields = {
|
|
25
33
|
text: TextFieldEntry,
|
|
@@ -37,7 +45,14 @@ var builtInFields = {
|
|
|
37
45
|
file: FileFieldEntry,
|
|
38
46
|
relation: RelationFieldEntry,
|
|
39
47
|
group: GroupFieldEntry,
|
|
40
|
-
repeater: RepeaterFieldEntry
|
|
48
|
+
repeater: RepeaterFieldEntry,
|
|
49
|
+
tel: TelFieldEntry,
|
|
50
|
+
range: RangeFieldEntry,
|
|
51
|
+
duration: DurationFieldEntry,
|
|
52
|
+
json: JsonFieldEntry,
|
|
53
|
+
tags: TagsFieldEntry,
|
|
54
|
+
embed: EmbedFieldEntry,
|
|
55
|
+
location: LocationFieldEntry
|
|
41
56
|
};
|
|
42
57
|
/**
|
|
43
58
|
* The built-in fields as a `@panneau/core` plugin: their entries, and the French messages of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtIn.js","names":[],"sources":["../../src/shared/builtIn.ts"],"sourcesContent":["import { fr } from '@panneau/intl';\n\nimport { BooleanFieldEntry } from '../boolean/BooleanField';\nimport { ColorFieldEntry } from '../color/ColorField';\nimport { DateFieldEntry } from '../date/DateField';\nimport { DateTimeFieldEntry } from '../datetime/DateTimeField';\nimport { EmailFieldEntry } from '../email/EmailField';\nimport { FileFieldEntry } from '../file/FileField';\nimport { GroupFieldEntry } from '../group/GroupField';\nimport { NumberFieldEntry } from '../number/NumberField';\nimport { RelationFieldEntry } from '../relation/RelationField';\nimport { RepeaterFieldEntry } from '../repeater/RepeaterField';\nimport { SelectFieldEntry } from '../select/SelectField';\nimport { SlugFieldEntry } from '../slug/SlugField';\nimport { TextFieldEntry } from '../text/TextField';\nimport { TextAreaFieldEntry } from '../textarea/TextAreaField';\nimport { TimeFieldEntry } from '../time/TimeField';\nimport { UrlFieldEntry } from '../url/UrlField';\nimport type { FieldEntry } from './types';\n\n/**\n * The entries of the built-in field types. `richtext` and `media` come with their plugins\n * (`@panneau/editor` and `@panneau/media`): without them, `DefinitionField` renders a placeholder.\n * `file` uploads through the upload source of the fields context, or gives the files themselves.\n */\nexport const builtInFields: Readonly<Record<string, FieldEntry>> = {\n text: TextFieldEntry,\n textarea: TextAreaFieldEntry,\n number: NumberFieldEntry,\n boolean: BooleanFieldEntry,\n date: DateFieldEntry,\n datetime: DateTimeFieldEntry,\n time: TimeFieldEntry,\n select: SelectFieldEntry,\n email: EmailFieldEntry,\n url: UrlFieldEntry,\n color: ColorFieldEntry,\n slug: SlugFieldEntry,\n file: FileFieldEntry,\n relation: RelationFieldEntry,\n group: GroupFieldEntry,\n repeater: RepeaterFieldEntry,\n};\n\n/**\n * The built-in fields as a `@panneau/core` plugin: their entries, and the French messages of\n * every Panneau package (`@panneau/ui`, `@panneau/fields`, `@panneau/forms`…, from\n * `@panneau/intl`). Pass it before the plugins that override a type.\n */\nexport const fieldsPlugin: {\n id: string;\n fields: Readonly<Record<string, FieldEntry>>;\n locales: Readonly<Record<string, Record<string, string>>>;\n} = {\n id: 'panneau-fields',\n fields: builtInFields,\n locales: { fr },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtIn.js","names":[],"sources":["../../src/shared/builtIn.ts"],"sourcesContent":["import { fr } from '@panneau/intl';\n\nimport { BooleanFieldEntry } from '../boolean/BooleanField';\nimport { ColorFieldEntry } from '../color/ColorField';\nimport { DateFieldEntry } from '../date/DateField';\nimport { DateTimeFieldEntry } from '../datetime/DateTimeField';\nimport { DurationFieldEntry } from '../duration/DurationField';\nimport { EmailFieldEntry } from '../email/EmailField';\nimport { EmbedFieldEntry } from '../embed/EmbedField';\nimport { FileFieldEntry } from '../file/FileField';\nimport { GroupFieldEntry } from '../group/GroupField';\nimport { JsonFieldEntry } from '../json/JsonField';\nimport { LocationFieldEntry } from '../location/LocationField';\nimport { NumberFieldEntry } from '../number/NumberField';\nimport { RangeFieldEntry } from '../range/RangeField';\nimport { RelationFieldEntry } from '../relation/RelationField';\nimport { RepeaterFieldEntry } from '../repeater/RepeaterField';\nimport { SelectFieldEntry } from '../select/SelectField';\nimport { SlugFieldEntry } from '../slug/SlugField';\nimport { TagsFieldEntry } from '../tags/TagsField';\nimport { TelFieldEntry } from '../tel/TelField';\nimport { TextFieldEntry } from '../text/TextField';\nimport { TextAreaFieldEntry } from '../textarea/TextAreaField';\nimport { TimeFieldEntry } from '../time/TimeField';\nimport { UrlFieldEntry } from '../url/UrlField';\nimport type { FieldEntry } from './types';\n\n/**\n * The entries of the built-in field types. `richtext` and `media` come with their plugins\n * (`@panneau/editor` and `@panneau/media`): without them, `DefinitionField` renders a placeholder.\n * `file` uploads through the upload source of the fields context, or gives the files themselves.\n * `embed` and `location` use its embed source and its maps; `location` loads Leaflet when shown.\n */\nexport const builtInFields: Readonly<Record<string, FieldEntry>> = {\n text: TextFieldEntry,\n textarea: TextAreaFieldEntry,\n number: NumberFieldEntry,\n boolean: BooleanFieldEntry,\n date: DateFieldEntry,\n datetime: DateTimeFieldEntry,\n time: TimeFieldEntry,\n select: SelectFieldEntry,\n email: EmailFieldEntry,\n url: UrlFieldEntry,\n color: ColorFieldEntry,\n slug: SlugFieldEntry,\n file: FileFieldEntry,\n relation: RelationFieldEntry,\n group: GroupFieldEntry,\n repeater: RepeaterFieldEntry,\n tel: TelFieldEntry,\n range: RangeFieldEntry,\n duration: DurationFieldEntry,\n json: JsonFieldEntry,\n tags: TagsFieldEntry,\n embed: EmbedFieldEntry,\n location: LocationFieldEntry,\n};\n\n/**\n * The built-in fields as a `@panneau/core` plugin: their entries, and the French messages of\n * every Panneau package (`@panneau/ui`, `@panneau/fields`, `@panneau/forms`…, from\n * `@panneau/intl`). Pass it before the plugins that override a type.\n */\nexport const fieldsPlugin: {\n id: string;\n fields: Readonly<Record<string, FieldEntry>>;\n locales: Readonly<Record<string, Record<string, string>>>;\n} = {\n id: 'panneau-fields',\n fields: builtInFields,\n locales: { fr },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAa,gBAAsD;CAC/D,MAAM;CACN,UAAU;CACV,QAAQ;CACR,SAAS;CACT,MAAM;CACN,UAAU;CACV,MAAM;CACN,QAAQ;CACR,OAAO;CACP,KAAK;CACL,OAAO;CACP,MAAM;CACN,MAAM;CACN,UAAU;CACV,OAAO;CACP,UAAU;CACV,KAAK;CACL,OAAO;CACP,UAAU;CACV,MAAM;CACN,MAAM;CACN,OAAO;CACP,UAAU;AACd;;;;;;AAOA,IAAa,eAIT;CACA,IAAI;CACJ,QAAQ;CACR,SAAS,EAAE,GAAG;AAClB"}
|
package/dist/shared/context.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from 'react';
|
|
2
2
|
import type { Field } from '@panneau/protocol';
|
|
3
|
+
import type { MapsConfig } from '../location/types';
|
|
3
4
|
import type { UploadSource } from '../upload/types';
|
|
4
5
|
import type { FieldCheckSource } from './check';
|
|
6
|
+
import type { EmbedSource } from './embed';
|
|
5
7
|
import type { RelationSource } from './relation';
|
|
6
8
|
import type { FieldEntry } from './types';
|
|
7
9
|
/** What a binding gives a field: its value, handlers and errors at a path. */
|
|
@@ -41,6 +43,10 @@ export interface FieldsContextValue {
|
|
|
41
43
|
uploadSource: UploadSource | null;
|
|
42
44
|
/** Where fields with `check` check their value, such as a slug's availability. */
|
|
43
45
|
checkSource: FieldCheckSource | null;
|
|
46
|
+
/** Where `embed` fields get what a URL embeds. Without one, they keep the URL alone. */
|
|
47
|
+
embedSource: EmbedSource | null;
|
|
48
|
+
/** The tiles and the address search of `location` fields. */
|
|
49
|
+
maps: MapsConfig | null;
|
|
44
50
|
binding: FieldBinding | null;
|
|
45
51
|
}
|
|
46
52
|
/** The fields context of the closest `FieldsProvider`. */
|
|
@@ -54,15 +60,19 @@ export interface FieldsProviderProps {
|
|
|
54
60
|
uploadSource?: UploadSource | null;
|
|
55
61
|
/** `createFieldCheckSource(adapter, resource, id)`, for the form of an item. */
|
|
56
62
|
checkSource?: FieldCheckSource | null;
|
|
63
|
+
/** `createEmbedSource(adapter)`. */
|
|
64
|
+
embedSource?: EmbedSource | null;
|
|
65
|
+
/** The tiles and the address search of `location` fields. */
|
|
66
|
+
maps?: MapsConfig | null;
|
|
57
67
|
binding?: FieldBinding | null;
|
|
58
68
|
children?: ReactNode;
|
|
59
69
|
}
|
|
60
70
|
/**
|
|
61
71
|
* Provides what fields rendered from a definition need: the components of each type, the locales
|
|
62
|
-
* of localized values,
|
|
63
|
-
* provider.
|
|
72
|
+
* of localized values, the sources of relations, uploads, checks and embeds, the maps of
|
|
73
|
+
* locations, and a binding. Values not given come from the parent provider.
|
|
64
74
|
*/
|
|
65
|
-
export declare function FieldsProvider({ components, locales, relationSource, uploadSource, checkSource, binding, children, }: FieldsProviderProps): import("react").JSX.Element;
|
|
75
|
+
export declare function FieldsProvider({ components, locales, relationSource, uploadSource, checkSource, embedSource, maps, binding, children, }: FieldsProviderProps): import("react").JSX.Element;
|
|
66
76
|
/** The parent path of a path: `blocks.2` for `blocks.2.title`, `''` for `title`. */
|
|
67
77
|
export declare function getParentPath(path: string): string;
|
|
68
78
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/shared/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAED,4FAA4F;AAC5F,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAC;CACjD;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAC/B,+DAA+D;IA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I,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC3B,UAAU,EACV,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,EACX,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,GACX,EAAE,mBAAmB,+BAcrB;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGlD"}
|
package/dist/shared/context.js
CHANGED
|
@@ -8,6 +8,8 @@ var FieldsContext = createContext({
|
|
|
8
8
|
relationSource: null,
|
|
9
9
|
uploadSource: null,
|
|
10
10
|
checkSource: null,
|
|
11
|
+
embedSource: null,
|
|
12
|
+
maps: null,
|
|
11
13
|
binding: null
|
|
12
14
|
});
|
|
13
15
|
/** The fields context of the closest `FieldsProvider`. */
|
|
@@ -16,12 +18,12 @@ function useFieldsContext() {
|
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* Provides what fields rendered from a definition need: the components of each type, the locales
|
|
19
|
-
* of localized values,
|
|
20
|
-
* provider.
|
|
21
|
+
* of localized values, the sources of relations, uploads, checks and embeds, the maps of
|
|
22
|
+
* locations, and a binding. Values not given come from the parent provider.
|
|
21
23
|
*/
|
|
22
24
|
function FieldsProvider(t0) {
|
|
23
|
-
const $ = c(
|
|
24
|
-
const { components, locales, relationSource, uploadSource, checkSource, binding, children } = t0;
|
|
25
|
+
const $ = c(15);
|
|
26
|
+
const { components, locales, relationSource, uploadSource, checkSource, embedSource, maps, binding, children } = t0;
|
|
25
27
|
const parent = use(FieldsContext);
|
|
26
28
|
let t1;
|
|
27
29
|
if ($[0] !== components || $[1] !== parent.components) {
|
|
@@ -37,16 +39,20 @@ function FieldsProvider(t0) {
|
|
|
37
39
|
const t3 = relationSource === void 0 ? parent.relationSource : relationSource;
|
|
38
40
|
const t4 = uploadSource === void 0 ? parent.uploadSource : uploadSource;
|
|
39
41
|
const t5 = checkSource === void 0 ? parent.checkSource : checkSource;
|
|
40
|
-
const t6 =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const t6 = embedSource === void 0 ? parent.embedSource : embedSource;
|
|
43
|
+
const t7 = maps === void 0 ? parent.maps : maps;
|
|
44
|
+
const t8 = binding === void 0 ? parent.binding : binding;
|
|
45
|
+
let t9;
|
|
46
|
+
if ($[3] !== t1 || $[4] !== t2 || $[5] !== t3 || $[6] !== t4 || $[7] !== t5 || $[8] !== t6 || $[9] !== t7 || $[10] !== t8) {
|
|
47
|
+
t9 = {
|
|
44
48
|
components: t1,
|
|
45
49
|
locales: t2,
|
|
46
50
|
relationSource: t3,
|
|
47
51
|
uploadSource: t4,
|
|
48
52
|
checkSource: t5,
|
|
49
|
-
|
|
53
|
+
embedSource: t6,
|
|
54
|
+
maps: t7,
|
|
55
|
+
binding: t8
|
|
50
56
|
};
|
|
51
57
|
$[3] = t1;
|
|
52
58
|
$[4] = t2;
|
|
@@ -55,19 +61,21 @@ function FieldsProvider(t0) {
|
|
|
55
61
|
$[7] = t5;
|
|
56
62
|
$[8] = t6;
|
|
57
63
|
$[9] = t7;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
$[10] = t8;
|
|
65
|
+
$[11] = t9;
|
|
66
|
+
} else t9 = $[11];
|
|
67
|
+
const value = t9;
|
|
68
|
+
let t10;
|
|
69
|
+
if ($[12] !== children || $[13] !== value) {
|
|
70
|
+
t10 = /* @__PURE__ */ jsx(FieldsContext, {
|
|
63
71
|
value,
|
|
64
72
|
children
|
|
65
73
|
});
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
} else
|
|
70
|
-
return
|
|
74
|
+
$[12] = children;
|
|
75
|
+
$[13] = value;
|
|
76
|
+
$[14] = t10;
|
|
77
|
+
} else t10 = $[14];
|
|
78
|
+
return t10;
|
|
71
79
|
}
|
|
72
80
|
/** The parent path of a path: `blocks.2` for `blocks.2.title`, `''` for `title`. */
|
|
73
81
|
function getParentPath(path) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":["value","children","_c"],"sources":["../../src/shared/context.tsx"],"sourcesContent":["import { type ComponentType, type ReactNode, createContext, use } from 'react';\n\nimport type { Field } from '@panneau/protocol';\n\nimport type { UploadSource } from '../upload/types';\nimport type { FieldCheckSource } from './check';\nimport type { RelationSource } from './relation';\nimport type { FieldEntry } from './types';\n\n/** What a binding gives a field: its value, handlers and errors at a path. */\nexport interface BoundFieldProps {\n value: unknown;\n onChange: (value: unknown) => void;\n onBlur?: () => void;\n errors?: readonly string[];\n}\n\n/** Props of a binding: it decides whether a field shows, and where its value comes from. */\nexport interface FieldBindingProps {\n field: Field;\n /** Dot path of the field's value. */\n path: string;\n /** Dot path of the object the field belongs to: `''` at the top, `blocks.2` in a block. */\n parentPath: string;\n /** Renders the field with its bound value. */\n render: (bound: BoundFieldProps) => ReactNode;\n}\n\n/**\n * Binds nested fields (in groups, blocks and localized values) to a store by path, instead of the\n * value and `onChange` of their parent. `@panneau/forms` binds them to its form state, so that\n * every value is set, validated and shown in error by its own path.\n */\nexport type FieldBinding = ComponentType<FieldBindingProps>;\n\nexport interface FieldsContextValue {\n /** Registry entries, by field type, over the built-in ones. */\n components: Readonly<Record<string, FieldEntry>>;\n /** Locales of localized values, in order. */\n locales: readonly string[];\n /** Where relation fields search for items. */\n relationSource: RelationSource | null;\n /**\n * Where fields that take files upload them directly to storage. Without one, they give the\n * files themselves.\n */\n uploadSource: UploadSource | null;\n /** Where fields with `check` check their value, such as a slug's availability. */\n checkSource: FieldCheckSource | null;\n binding: FieldBinding | null;\n}\n\nconst FieldsContext = createContext<FieldsContextValue>({\n components: {},\n locales: [],\n relationSource: null,\n uploadSource: null,\n checkSource: null,\n binding: null,\n});\n\n/** The fields context of the closest `FieldsProvider`. */\nexport function useFieldsContext(): FieldsContextValue {\n return use(FieldsContext);\n}\n\nexport interface FieldsProviderProps {\n /** Registry entries by type, added over those of a parent provider. */\n components?: Readonly<Record<string, FieldEntry>>;\n locales?: readonly string[];\n relationSource?: RelationSource | null;\n /** Make it once, outside of render: fields make an uploader for each source they get. */\n uploadSource?: UploadSource | null;\n /** `createFieldCheckSource(adapter, resource, id)`, for the form of an item. */\n checkSource?: FieldCheckSource | null;\n binding?: FieldBinding | null;\n children?: ReactNode;\n}\n\n/**\n * Provides what fields rendered from a definition need: the components of each type, the locales\n * of localized values,
|
|
1
|
+
{"version":3,"file":"context.js","names":["value","children","_c"],"sources":["../../src/shared/context.tsx"],"sourcesContent":["import { type ComponentType, type ReactNode, createContext, use } from 'react';\n\nimport type { Field } from '@panneau/protocol';\n\nimport type { MapsConfig } from '../location/types';\nimport type { UploadSource } from '../upload/types';\nimport type { FieldCheckSource } from './check';\nimport type { EmbedSource } from './embed';\nimport type { RelationSource } from './relation';\nimport type { FieldEntry } from './types';\n\n/** What a binding gives a field: its value, handlers and errors at a path. */\nexport interface BoundFieldProps {\n value: unknown;\n onChange: (value: unknown) => void;\n onBlur?: () => void;\n errors?: readonly string[];\n}\n\n/** Props of a binding: it decides whether a field shows, and where its value comes from. */\nexport interface FieldBindingProps {\n field: Field;\n /** Dot path of the field's value. */\n path: string;\n /** Dot path of the object the field belongs to: `''` at the top, `blocks.2` in a block. */\n parentPath: string;\n /** Renders the field with its bound value. */\n render: (bound: BoundFieldProps) => ReactNode;\n}\n\n/**\n * Binds nested fields (in groups, blocks and localized values) to a store by path, instead of the\n * value and `onChange` of their parent. `@panneau/forms` binds them to its form state, so that\n * every value is set, validated and shown in error by its own path.\n */\nexport type FieldBinding = ComponentType<FieldBindingProps>;\n\nexport interface FieldsContextValue {\n /** Registry entries, by field type, over the built-in ones. */\n components: Readonly<Record<string, FieldEntry>>;\n /** Locales of localized values, in order. */\n locales: readonly string[];\n /** Where relation fields search for items. */\n relationSource: RelationSource | null;\n /**\n * Where fields that take files upload them directly to storage. Without one, they give the\n * files themselves.\n */\n uploadSource: UploadSource | null;\n /** Where fields with `check` check their value, such as a slug's availability. */\n checkSource: FieldCheckSource | null;\n /** Where `embed` fields get what a URL embeds. Without one, they keep the URL alone. */\n embedSource: EmbedSource | null;\n /** The tiles and the address search of `location` fields. */\n maps: MapsConfig | null;\n binding: FieldBinding | null;\n}\n\nconst FieldsContext = createContext<FieldsContextValue>({\n components: {},\n locales: [],\n relationSource: null,\n uploadSource: null,\n checkSource: null,\n embedSource: null,\n maps: null,\n binding: null,\n});\n\n/** The fields context of the closest `FieldsProvider`. */\nexport function useFieldsContext(): FieldsContextValue {\n return use(FieldsContext);\n}\n\nexport interface FieldsProviderProps {\n /** Registry entries by type, added over those of a parent provider. */\n components?: Readonly<Record<string, FieldEntry>>;\n locales?: readonly string[];\n relationSource?: RelationSource | null;\n /** Make it once, outside of render: fields make an uploader for each source they get. */\n uploadSource?: UploadSource | null;\n /** `createFieldCheckSource(adapter, resource, id)`, for the form of an item. */\n checkSource?: FieldCheckSource | null;\n /** `createEmbedSource(adapter)`. */\n embedSource?: EmbedSource | null;\n /** The tiles and the address search of `location` fields. */\n maps?: MapsConfig | null;\n binding?: FieldBinding | null;\n children?: ReactNode;\n}\n\n/**\n * Provides what fields rendered from a definition need: the components of each type, the locales\n * of localized values, the sources of relations, uploads, checks and embeds, the maps of\n * locations, and a binding. Values not given come from the parent provider.\n */\nexport function FieldsProvider({\n components,\n locales,\n relationSource,\n uploadSource,\n checkSource,\n embedSource,\n maps,\n binding,\n children,\n}: FieldsProviderProps) {\n const parent = use(FieldsContext);\n const value: FieldsContextValue = {\n components:\n components !== undefined ? { ...parent.components, ...components } : parent.components,\n locales: locales ?? parent.locales,\n relationSource: relationSource === undefined ? parent.relationSource : relationSource,\n uploadSource: uploadSource === undefined ? parent.uploadSource : uploadSource,\n checkSource: checkSource === undefined ? parent.checkSource : checkSource,\n embedSource: embedSource === undefined ? parent.embedSource : embedSource,\n maps: maps === undefined ? parent.maps : maps,\n binding: binding === undefined ? parent.binding : binding,\n };\n return <FieldsContext value={value}>{children}</FieldsContext>;\n}\n\n/** The parent path of a path: `blocks.2` for `blocks.2.title`, `''` for `title`. */\nexport function getParentPath(path: string): string {\n const index = path.lastIndexOf('.');\n return index === -1 ? '' : path.slice(0, index);\n}\n"],"mappings":";;;;AA0DA,IAAM,gBAAgB,cAAkC;CACpD,YAAY,CAAC;CACb,SAAS,CAAA;CACT,gBAAgB;CAChB,cAAc;CACd,aAAa;CACb,aAAa;CACb,MAAM;CACN,SAAS;AACb,CAAC;;AAGD,SAAgB,mBAAuC;CACnD,OAAO,IAAI,aAAa;AAC5B;;;;;;AAwBA,SAAO,eAAA,IAAA;CAAA,MAAA,IAAAE,EAAA,EAAA;CAAwB,MAAA,EAAA,YAAA,SAAA,gBAAA,cAAA,aAAA,aAAA,MAAA,SAAA,aAAA;CAW3B,MAAA,SAAe,IAAI,aAAa;CAAE,IAAA;CAAA,IAAA,EAAA,OAAA,cAAA,EAAA,OAAA,OAAA,YAAA;EAG1B,KAAA,eAAe,KAAA,IAAf;GAAA,GAAgC,OAAM;GAAW,GAAK;EAA+B,IAAhB,OAAM;EAAW,EAAA,KAAA;EAAA,EAAA,KAAA,OAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CACjF,MAAA,KAAA,WAAW,OAAM;CACV,MAAA,KAAA,mBAAmB,KAAA,IAAY,OAAM,iBAArC;CACF,MAAA,KAAA,iBAAiB,KAAA,IAAY,OAAM,eAAnC;CACD,MAAA,KAAA,gBAAgB,KAAA,IAAY,OAAM,cAAlC;CACA,MAAA,KAAA,gBAAgB,KAAA,IAAY,OAAM,cAAlC;CACP,MAAA,KAAA,SAAS,KAAA,IAAY,OAAM,OAA3B;CACG,MAAA,KAAA,YAAY,KAAA,IAAY,OAAM,UAA9B;CAAgD,IAAA;CAAA,IAAA,EAAA,OAAA,MAAA,EAAA,OAAA,MAAA,EAAA,OAAA,MAAA,EAAA,OAAA,MAAA,EAAA,OAAA,MAAA,EAAA,OAAA,MAAA,EAAA,OAAA,MAAA,EAAA,QAAA,IAAA;EAT3B,KAAA;GAAA,YAE1B;GAAsF,SACjF;GAAyB,gBAClB;GAAqE,cACvE;GAA+D,aAChE;GAA4D,aAC5D;GAA4D,MACnE;GAAuC,SACpC;EACb;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,KAAA,EAAA;CAVD,MAAA,QAAkC;CAUhC,IAAA;CAAA,IAAA,EAAA,QAAA,YAAA,EAAA,QAAA,OAAA;EACK,MAAA,oBAAC,eAAD;GAAsB;GAAQ;EAAhB,CAAA;EAAyC,EAAA,MAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,MAAA,EAAA;CAAA,OAAvD;AAAuD;;AAIlE,SAAgB,cAAc,MAAsB;CAChD,MAAM,QAAQ,KAAK,YAAY,GAAG;CAClC,OAAO,UAAU,KAAK,KAAK,KAAK,MAAM,GAAG,KAAK;AAClD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EmbedValue } from '@panneau/protocol';
|
|
2
|
+
/** Where `embed` fields get what a URL embeds: the backend, from the provider's oEmbed. */
|
|
3
|
+
export interface EmbedSource {
|
|
4
|
+
resolve(url: string, options: {
|
|
5
|
+
signal: AbortSignal;
|
|
6
|
+
}): Promise<EmbedValue>;
|
|
7
|
+
}
|
|
8
|
+
/** What `createEmbedSource()` needs from an adapter: the `resolveEmbed()` of `@panneau/data`. */
|
|
9
|
+
export interface EmbedAdapter {
|
|
10
|
+
resolveEmbed?(url: string, options?: {
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
}): Promise<EmbedValue>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The embed source of an adapter (`GET /embeds?url=`). Null when the adapter can't resolve
|
|
16
|
+
* embeds: `embed` fields then keep the URL alone.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createEmbedSource(adapter: EmbedAdapter): EmbedSource | null;
|
|
19
|
+
//# sourceMappingURL=embed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../src/shared/embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,2FAA2F;AAC3F,MAAM,WAAW,WAAW;IACxB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAC/E;AAED,iGAAiG;AACjG,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACvF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,GAAG,IAAI,CAM3E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/shared/embed.ts
|
|
2
|
+
/**
|
|
3
|
+
* The embed source of an adapter (`GET /embeds?url=`). Null when the adapter can't resolve
|
|
4
|
+
* embeds: `embed` fields then keep the URL alone.
|
|
5
|
+
*/
|
|
6
|
+
function createEmbedSource(adapter) {
|
|
7
|
+
const { resolveEmbed } = adapter;
|
|
8
|
+
if (resolveEmbed === void 0) return null;
|
|
9
|
+
return { resolve: (url, { signal }) => resolveEmbed.call(adapter, url, { signal }) };
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { createEmbedSource };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=embed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.js","names":[],"sources":["../../src/shared/embed.ts"],"sourcesContent":["import type { EmbedValue } from '@panneau/protocol';\n\n/** Where `embed` fields get what a URL embeds: the backend, from the provider's oEmbed. */\nexport interface EmbedSource {\n resolve(url: string, options: { signal: AbortSignal }): Promise<EmbedValue>;\n}\n\n/** What `createEmbedSource()` needs from an adapter: the `resolveEmbed()` of `@panneau/data`. */\nexport interface EmbedAdapter {\n resolveEmbed?(url: string, options?: { signal?: AbortSignal }): Promise<EmbedValue>;\n}\n\n/**\n * The embed source of an adapter (`GET /embeds?url=`). Null when the adapter can't resolve\n * embeds: `embed` fields then keep the URL alone.\n */\nexport function createEmbedSource(adapter: EmbedAdapter): EmbedSource | null {\n const { resolveEmbed } = adapter;\n if (resolveEmbed === undefined) {\n return null;\n }\n return { resolve: (url, { signal }) => resolveEmbed.call(adapter, url, { signal }) };\n}\n"],"mappings":";;;;;AAgBA,SAAgB,kBAAkB,SAA2C;CACzE,MAAM,EAAE,iBAAiB;CACzB,IAAI,iBAAiB,KAAA,GACjB,OAAO;CAEX,OAAO,EAAE,UAAU,KAAK,EAAE,aAAa,aAAa,KAAK,SAAS,KAAK,EAAE,OAAO,CAAC,EAAE;AACvF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TagSuggestion } from '@panneau/ui';
|
|
2
|
+
import type { FieldEntryProps, FieldProps } from '../shared/types';
|
|
3
|
+
export interface TagsFieldProps extends FieldProps<string[]> {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
/** Tags offered as the user types. */
|
|
6
|
+
suggestions?: readonly TagSuggestion[];
|
|
7
|
+
/** Whether tags outside the suggestions are allowed. Defaults to true. */
|
|
8
|
+
allowCustom?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** A list of words, typed or picked among suggestions. An empty list is `null`. */
|
|
11
|
+
export declare function TagsField({ disabled, readOnly, required, ...props }: TagsFieldProps): import("react").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* The `tags` type: its `options` as suggestions, and setting `allowCustom` (true by default)
|
|
14
|
+
* for tags outside them.
|
|
15
|
+
*/
|
|
16
|
+
export declare function TagsFieldEntry(props: FieldEntryProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=TagsField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsField.d.ts","sourceRoot":"","sources":["../../src/tags/TagsField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,aAAa,CAAC;AAG5D,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,WAAW,cAAe,SAAQ,UAAU,CAAC,MAAM,EAAE,CAAC;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,WAAW,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACvC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAInF;AAOD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,+BAiBpD"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { getFieldProps, getSetting, isString } from "../shared/entry.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { TagsInput } from "@panneau/ui";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/tags/TagsField.tsx
|
|
6
|
+
/** A list of words, typed or picked among suggestions. An empty list is `null`. */
|
|
7
|
+
function TagsField(t0) {
|
|
8
|
+
const $ = c(10);
|
|
9
|
+
let disabled;
|
|
10
|
+
let props;
|
|
11
|
+
let readOnly;
|
|
12
|
+
let required;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({disabled, readOnly, required, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = disabled;
|
|
17
|
+
$[2] = props;
|
|
18
|
+
$[3] = readOnly;
|
|
19
|
+
$[4] = required;
|
|
20
|
+
} else {
|
|
21
|
+
disabled = $[1];
|
|
22
|
+
props = $[2];
|
|
23
|
+
readOnly = $[3];
|
|
24
|
+
required = $[4];
|
|
25
|
+
}
|
|
26
|
+
let t1;
|
|
27
|
+
if ($[5] !== disabled || $[6] !== props || $[7] !== readOnly || $[8] !== required) {
|
|
28
|
+
t1 = /* @__PURE__ */ jsx(TagsInput, {
|
|
29
|
+
...props,
|
|
30
|
+
isDisabled: disabled,
|
|
31
|
+
isReadOnly: readOnly,
|
|
32
|
+
isRequired: required
|
|
33
|
+
});
|
|
34
|
+
$[5] = disabled;
|
|
35
|
+
$[6] = props;
|
|
36
|
+
$[7] = readOnly;
|
|
37
|
+
$[8] = required;
|
|
38
|
+
$[9] = t1;
|
|
39
|
+
} else t1 = $[9];
|
|
40
|
+
return t1;
|
|
41
|
+
}
|
|
42
|
+
/** The options of a field as suggestions: their values as strings. */
|
|
43
|
+
function toSuggestions(options) {
|
|
44
|
+
return options.map((option) => ({
|
|
45
|
+
value: String(option.value),
|
|
46
|
+
label: option.label
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The `tags` type: its `options` as suggestions, and setting `allowCustom` (true by default)
|
|
51
|
+
* for tags outside them.
|
|
52
|
+
*/
|
|
53
|
+
function TagsFieldEntry(props) {
|
|
54
|
+
const $ = c(18);
|
|
55
|
+
const { field } = props;
|
|
56
|
+
let t0;
|
|
57
|
+
if ($[0] !== field) {
|
|
58
|
+
t0 = getSetting(field, "allowCustom", _temp);
|
|
59
|
+
$[0] = field;
|
|
60
|
+
$[1] = t0;
|
|
61
|
+
} else t0 = $[1];
|
|
62
|
+
const allowCustom = t0;
|
|
63
|
+
let t1;
|
|
64
|
+
if ($[2] !== props.value) {
|
|
65
|
+
t1 = Array.isArray(props.value) ? props.value.filter(isString) : null;
|
|
66
|
+
$[2] = props.value;
|
|
67
|
+
$[3] = t1;
|
|
68
|
+
} else t1 = $[3];
|
|
69
|
+
const value_0 = t1;
|
|
70
|
+
let t2;
|
|
71
|
+
if ($[4] !== props) {
|
|
72
|
+
t2 = getFieldProps(props);
|
|
73
|
+
$[4] = props;
|
|
74
|
+
$[5] = t2;
|
|
75
|
+
} else t2 = $[5];
|
|
76
|
+
const t3 = value_0 !== null && value_0.length > 0 ? value_0 : null;
|
|
77
|
+
const t4 = props.onChange;
|
|
78
|
+
let t5;
|
|
79
|
+
if ($[6] !== field.options) {
|
|
80
|
+
t5 = field.options ?? [];
|
|
81
|
+
$[6] = field.options;
|
|
82
|
+
$[7] = t5;
|
|
83
|
+
} else t5 = $[7];
|
|
84
|
+
let t6;
|
|
85
|
+
if ($[8] !== t5) {
|
|
86
|
+
t6 = toSuggestions(t5);
|
|
87
|
+
$[8] = t5;
|
|
88
|
+
$[9] = t6;
|
|
89
|
+
} else t6 = $[9];
|
|
90
|
+
let t7;
|
|
91
|
+
if ($[10] !== allowCustom) {
|
|
92
|
+
t7 = allowCustom !== void 0 ? { allowCustom } : {};
|
|
93
|
+
$[10] = allowCustom;
|
|
94
|
+
$[11] = t7;
|
|
95
|
+
} else t7 = $[11];
|
|
96
|
+
let t8;
|
|
97
|
+
if ($[12] !== props.onChange || $[13] !== t2 || $[14] !== t3 || $[15] !== t6 || $[16] !== t7) {
|
|
98
|
+
t8 = /* @__PURE__ */ jsx(TagsField, {
|
|
99
|
+
...t2,
|
|
100
|
+
value: t3,
|
|
101
|
+
onChange: t4,
|
|
102
|
+
suggestions: t6,
|
|
103
|
+
...t7
|
|
104
|
+
});
|
|
105
|
+
$[12] = props.onChange;
|
|
106
|
+
$[13] = t2;
|
|
107
|
+
$[14] = t3;
|
|
108
|
+
$[15] = t6;
|
|
109
|
+
$[16] = t7;
|
|
110
|
+
$[17] = t8;
|
|
111
|
+
} else t8 = $[17];
|
|
112
|
+
return t8;
|
|
113
|
+
}
|
|
114
|
+
function _temp(value) {
|
|
115
|
+
return typeof value === "boolean";
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
export { TagsField, TagsFieldEntry };
|
|
119
|
+
|
|
120
|
+
//# sourceMappingURL=TagsField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsField.js","names":["disabled","readOnly","required","value","_c"],"sources":["../../src/tags/TagsField.tsx"],"sourcesContent":["import type { Option } from '@panneau/protocol';\nimport { type TagSuggestion, TagsInput } from '@panneau/ui';\n\nimport { getFieldProps, getSetting, isString } from '../shared/entry';\nimport type { FieldEntryProps, FieldProps } from '../shared/types';\n\nexport interface TagsFieldProps extends FieldProps<string[]> {\n placeholder?: string;\n /** Tags offered as the user types. */\n suggestions?: readonly TagSuggestion[];\n /** Whether tags outside the suggestions are allowed. Defaults to true. */\n allowCustom?: boolean;\n}\n\n/** A list of words, typed or picked among suggestions. An empty list is `null`. */\nexport function TagsField({ disabled, readOnly, required, ...props }: TagsFieldProps) {\n return (\n <TagsInput {...props} isDisabled={disabled} isReadOnly={readOnly} isRequired={required} />\n );\n}\n\n/** The options of a field as suggestions: their values as strings. */\nfunction toSuggestions(options: readonly Option[]): TagSuggestion[] {\n return options.map((option) => ({ value: String(option.value), label: option.label }));\n}\n\n/**\n * The `tags` type: its `options` as suggestions, and setting `allowCustom` (true by default)\n * for tags outside them.\n */\nexport function TagsFieldEntry(props: FieldEntryProps) {\n const { field } = props;\n const allowCustom = getSetting(\n field,\n 'allowCustom',\n (value): value is boolean => typeof value === 'boolean',\n );\n const value = Array.isArray(props.value) ? props.value.filter(isString) : null;\n return (\n <TagsField\n {...getFieldProps(props)}\n value={value !== null && value.length > 0 ? value : null}\n onChange={props.onChange}\n suggestions={toSuggestions(field.options ?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ts","sourceRoot":"","sources":["../../src/tags/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TagsField, TagsFieldEntry } from "./TagsField.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FieldEntryProps } from '../shared/types';
|
|
2
|
+
import { type TextFieldProps } from '../text/TextField';
|
|
3
|
+
export type TelFieldProps = Omit<TextFieldProps, 'type' | 'inputMode'>;
|
|
4
|
+
/**
|
|
5
|
+
* A phone number, as typed, with the phone keyboard on phones. Spaces around it are removed on
|
|
6
|
+
* blur. A `pattern` rule constrains its format when a project needs one.
|
|
7
|
+
*/
|
|
8
|
+
export declare function TelField({ value, onChange, onBlur, ...props }: TelFieldProps): import("react").JSX.Element;
|
|
9
|
+
/** The `tel` type. */
|
|
10
|
+
export declare function TelFieldEntry(props: FieldEntryProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=TelField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelField.d.ts","sourceRoot":"","sources":["../../src/tel/TelField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC;AAEvE;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAkB5E;AAED,sBAAsB;AACtB,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,+BAQnD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { getFieldProps, isString } from "../shared/entry.js";
|
|
2
|
+
import { TextField } from "../text/TextField.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/tel/TelField.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A phone number, as typed, with the phone keyboard on phones. Spaces around it are removed on
|
|
8
|
+
* blur. A `pattern` rule constrains its format when a project needs one.
|
|
9
|
+
*/
|
|
10
|
+
function TelField(t0) {
|
|
11
|
+
const $ = c(14);
|
|
12
|
+
let onBlur;
|
|
13
|
+
let onChange;
|
|
14
|
+
let props;
|
|
15
|
+
let value;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({value, onChange, onBlur, ...props} = t0);
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = onBlur;
|
|
20
|
+
$[2] = onChange;
|
|
21
|
+
$[3] = props;
|
|
22
|
+
$[4] = value;
|
|
23
|
+
} else {
|
|
24
|
+
onBlur = $[1];
|
|
25
|
+
onChange = $[2];
|
|
26
|
+
props = $[3];
|
|
27
|
+
value = $[4];
|
|
28
|
+
}
|
|
29
|
+
let t1;
|
|
30
|
+
if ($[5] !== onBlur || $[6] !== onChange || $[7] !== value) {
|
|
31
|
+
t1 = () => {
|
|
32
|
+
const trimmed = value?.trim() ?? null;
|
|
33
|
+
if (trimmed !== value) onChange?.(trimmed === "" ? null : trimmed);
|
|
34
|
+
onBlur?.();
|
|
35
|
+
};
|
|
36
|
+
$[5] = onBlur;
|
|
37
|
+
$[6] = onChange;
|
|
38
|
+
$[7] = value;
|
|
39
|
+
$[8] = t1;
|
|
40
|
+
} else t1 = $[8];
|
|
41
|
+
let t2;
|
|
42
|
+
if ($[9] !== onChange || $[10] !== props || $[11] !== t1 || $[12] !== value) {
|
|
43
|
+
t2 = /* @__PURE__ */ jsx(TextField, {
|
|
44
|
+
autoComplete: "tel",
|
|
45
|
+
...props,
|
|
46
|
+
type: "tel",
|
|
47
|
+
inputMode: "tel",
|
|
48
|
+
value,
|
|
49
|
+
onChange,
|
|
50
|
+
onBlur: t1
|
|
51
|
+
});
|
|
52
|
+
$[9] = onChange;
|
|
53
|
+
$[10] = props;
|
|
54
|
+
$[11] = t1;
|
|
55
|
+
$[12] = value;
|
|
56
|
+
$[13] = t2;
|
|
57
|
+
} else t2 = $[13];
|
|
58
|
+
return t2;
|
|
59
|
+
}
|
|
60
|
+
/** The `tel` type. */
|
|
61
|
+
function TelFieldEntry(props) {
|
|
62
|
+
const $ = c(6);
|
|
63
|
+
let t0;
|
|
64
|
+
if ($[0] !== props) {
|
|
65
|
+
t0 = getFieldProps(props);
|
|
66
|
+
$[0] = props;
|
|
67
|
+
$[1] = t0;
|
|
68
|
+
} else t0 = $[1];
|
|
69
|
+
const t1 = isString(props.value) ? props.value : null;
|
|
70
|
+
let t2;
|
|
71
|
+
if ($[2] !== props.onChange || $[3] !== t0 || $[4] !== t1) {
|
|
72
|
+
t2 = /* @__PURE__ */ jsx(TelField, {
|
|
73
|
+
...t0,
|
|
74
|
+
value: t1,
|
|
75
|
+
onChange: props.onChange
|
|
76
|
+
});
|
|
77
|
+
$[2] = props.onChange;
|
|
78
|
+
$[3] = t0;
|
|
79
|
+
$[4] = t1;
|
|
80
|
+
$[5] = t2;
|
|
81
|
+
} else t2 = $[5];
|
|
82
|
+
return t2;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { TelField, TelFieldEntry };
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=TelField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelField.js","names":["value","onChange","_c"],"sources":["../../src/tel/TelField.tsx"],"sourcesContent":["import { getFieldProps, isString } from '../shared/entry';\nimport type { FieldEntryProps } from '../shared/types';\nimport { TextField, type TextFieldProps } from '../text/TextField';\n\nexport type TelFieldProps = Omit<TextFieldProps, 'type' | 'inputMode'>;\n\n/**\n * A phone number, as typed, with the phone keyboard on phones. Spaces around it are removed on\n * blur. A `pattern` rule constrains its format when a project needs one.\n */\nexport function TelField({ value, onChange, onBlur, ...props }: TelFieldProps) {\n return (\n <TextField\n autoComplete=\"tel\"\n {...props}\n type=\"tel\"\n inputMode=\"tel\"\n value={value}\n onChange={onChange}\n onBlur={() => {\n const trimmed = value?.trim() ?? null;\n if (trimmed !== value) {\n onChange?.(trimmed === '' ? null : trimmed);\n }\n onBlur?.();\n }}\n />\n );\n}\n\n/** The `tel` type. */\nexport function TelFieldEntry(props: FieldEntryProps) {\n return (\n <TelField\n {...getFieldProps(props)}\n value={isString(props.value) ? props.value : null}\n onChange={props.onChange}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAUA,SAAO,SAAA,IAAA;CAAA,MAAA,IAAAE,EAAA,EAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAkB,CAAA,CAAA,OAAA,UAAA,QAAA,GAAA,SAAA;EAAoD,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,SAAA,EAAA;EAAA,WAAA,EAAA;EAAA,QAAA,EAAA;EAAA,QAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,UAAA,EAAA,OAAA,YAAA,EAAA,OAAA,OAAA;EASzD,WAAA;GACJ,MAAA,UAAgB,OAAK,KAAe,KAApB;GAChB,IAAI,YAAY,OACZ,WAAW,YAAY,KAAZ,OAAA,OAA+B;GAE9C,SAAS;EAAC;EACb,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,YAAA,EAAA,QAAA,SAAA,EAAA,QAAA,MAAA,EAAA,QAAA,OAAA;EAbL,KAAA,oBAAC,WAAD;GACiB,cAAA;GAAK,GACd;GACC,MAAA;GACK,WAAA;GACH;G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