@panneau/fields 5.0.0-alpha.11 → 5.0.0-alpha.13

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.
Files changed (99) hide show
  1. package/README.md +13 -1
  2. package/dist/country/CountryField.d.ts +17 -0
  3. package/dist/country/CountryField.d.ts.map +1 -0
  4. package/dist/country/CountryField.js +151 -0
  5. package/dist/country/CountryField.js.map +1 -0
  6. package/dist/country/codes.d.ts +6 -0
  7. package/dist/country/codes.d.ts.map +1 -0
  8. package/dist/country/codes.js +261 -0
  9. package/dist/country/codes.js.map +1 -0
  10. package/dist/country/countries.d.ts +32 -0
  11. package/dist/country/countries.d.ts.map +1 -0
  12. package/dist/country/countries.js +60 -0
  13. package/dist/country/countries.js.map +1 -0
  14. package/dist/country/index.d.ts +3 -0
  15. package/dist/country/index.d.ts.map +1 -0
  16. package/dist/country/index.js +4 -0
  17. package/dist/embed/EmbedField.js +1 -1
  18. package/dist/file/FileField.js +2 -2
  19. package/dist/group/GroupField.css +20 -3
  20. package/dist/group/GroupField.d.ts +2 -2
  21. package/dist/group/GroupField.d.ts.map +1 -1
  22. package/dist/group/GroupField.js +49 -36
  23. package/dist/group/GroupField.js.map +1 -1
  24. package/dist/group/GroupField.module.js +10 -2
  25. package/dist/group/GroupField.module.js.map +1 -1
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +3 -1
  29. package/dist/json/JsonField.js +1 -1
  30. package/dist/localized/LocalizedField.css +27 -6
  31. package/dist/localized/LocalizedField.d.ts +18 -7
  32. package/dist/localized/LocalizedField.d.ts.map +1 -1
  33. package/dist/localized/LocalizedField.js +236 -104
  34. package/dist/localized/LocalizedField.js.map +1 -1
  35. package/dist/localized/LocalizedField.module.js +10 -4
  36. package/dist/localized/LocalizedField.module.js.map +1 -1
  37. package/dist/location/LocationField.js +2 -2
  38. package/dist/region/RegionField.d.ts +22 -0
  39. package/dist/region/RegionField.d.ts.map +1 -0
  40. package/dist/region/RegionField.js +136 -0
  41. package/dist/region/RegionField.js.map +1 -0
  42. package/dist/region/data.d.ts +5 -0
  43. package/dist/region/data.d.ts.map +1 -0
  44. package/dist/region/data.js +513 -0
  45. package/dist/region/data.js.map +1 -0
  46. package/dist/region/index.d.ts +3 -0
  47. package/dist/region/index.d.ts.map +1 -0
  48. package/dist/region/index.js +3 -0
  49. package/dist/region/regions.d.ts +15 -0
  50. package/dist/region/regions.d.ts.map +1 -0
  51. package/dist/region/regions.js +29 -0
  52. package/dist/region/regions.js.map +1 -0
  53. package/dist/relation/RelationField.js +2 -2
  54. package/dist/repeater/RepeaterField.js +2 -2
  55. package/dist/shared/CodeComboBox.d.ts +20 -0
  56. package/dist/shared/CodeComboBox.d.ts.map +1 -0
  57. package/dist/shared/CodeComboBox.js +238 -0
  58. package/dist/shared/CodeComboBox.js.map +1 -0
  59. package/dist/shared/DefinitionField.d.ts +3 -1
  60. package/dist/shared/DefinitionField.d.ts.map +1 -1
  61. package/dist/shared/DefinitionField.js +81 -73
  62. package/dist/shared/DefinitionField.js.map +1 -1
  63. package/dist/shared/builtIn.d.ts.map +1 -1
  64. package/dist/shared/builtIn.js +5 -1
  65. package/dist/shared/builtIn.js.map +1 -1
  66. package/dist/shared/context.d.ts +5 -0
  67. package/dist/shared/context.d.ts.map +1 -1
  68. package/dist/shared/context.js.map +1 -1
  69. package/dist/shared/entry.d.ts +2 -2
  70. package/dist/shared/entry.d.ts.map +1 -1
  71. package/dist/shared/entry.js +5 -4
  72. package/dist/shared/entry.js.map +1 -1
  73. package/dist/shared/flow.d.ts +8 -0
  74. package/dist/shared/flow.d.ts.map +1 -0
  75. package/dist/shared/flow.js +37 -0
  76. package/dist/shared/flow.js.map +1 -0
  77. package/dist/shared/reveal.d.ts +16 -0
  78. package/dist/shared/reveal.d.ts.map +1 -0
  79. package/dist/shared/reveal.js +46 -0
  80. package/dist/shared/reveal.js.map +1 -0
  81. package/dist/shared/types.d.ts +10 -0
  82. package/dist/shared/types.d.ts.map +1 -1
  83. package/dist/slug/SlugField.js +2 -2
  84. package/dist/tel/TelField.d.ts +16 -5
  85. package/dist/tel/TelField.d.ts.map +1 -1
  86. package/dist/tel/TelField.js +253 -51
  87. package/dist/tel/TelField.js.map +1 -1
  88. package/dist/tel/index.d.ts +1 -0
  89. package/dist/tel/index.d.ts.map +1 -1
  90. package/dist/tel/index.js +3 -1
  91. package/dist/tel/phone.d.ts +31 -0
  92. package/dist/tel/phone.d.ts.map +1 -0
  93. package/dist/tel/phone.js +60 -0
  94. package/dist/tel/phone.js.map +1 -0
  95. package/dist/text/TextField.js +2 -2
  96. package/dist/upload/FilePicker.js +1 -1
  97. package/dist/upload/UploadList.js +1 -1
  98. package/dist/url/UrlField.js +1 -1
  99. package/package.json +15 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.js","names":["RegionEntry","code","en","fr","REGIONS","Readonly","Record","AR","AU","BR","CA","CN","IN","JP","MX","US"],"sources":["../../src/region/data.ts"],"sourcesContent":["// Generated from the CLDR (common/subdivisions/en.xml and fr.xml, and the subdivision containment\n// of cldr-core 49): the first-level subdivisions that postal addresses name. Codes are those of\n// ISO 3166-2, without their country.\n\n/** A region: its code, its English name, and its French name when it differs. */\nexport type RegionEntry = readonly [code: string, en: string, fr?: string];\n\n/** The regions of the countries that Panneau knows, by country code. */\nexport const REGIONS: Readonly<Record<string, readonly RegionEntry[]>> = {\n AR: [\n ['A', 'Salta'],\n ['B', 'Buenos Aires Province', 'Province de Buenos Aires'],\n ['C', 'Buenos Aires'],\n ['D', 'San Luis'],\n ['E', 'Entre Ríos'],\n ['F', 'La Rioja'],\n ['G', 'Santiago del Estero'],\n ['H', 'Chaco'],\n ['J', 'San Juan'],\n ['K', 'Catamarca'],\n ['L', 'La Pampa'],\n ['M', 'Mendoza'],\n ['N', 'Misiones'],\n ['P', 'Formosa'],\n ['Q', 'Neuquén'],\n ['R', 'Río Negro'],\n ['S', 'Santa Fe'],\n ['T', 'Tucumán'],\n ['U', 'Chubut'],\n ['V', 'Tierra del Fuego', 'Terre de Feu'],\n ['W', 'Corrientes'],\n ['X', 'Córdoba'],\n ['Y', 'Jujuy'],\n ['Z', 'Santa Cruz'],\n ],\n AU: [\n ['ACT', 'Australian Capital Territory', 'Territoire de la capitale australienne'],\n ['NSW', 'New South Wales', 'Nouvelle-Galles du Sud'],\n ['NT', 'Northern Territory', 'Territoire du Nord'],\n ['QLD', 'Queensland'],\n ['SA', 'South Australia', 'Australie-Méridionale'],\n ['TAS', 'Tasmania', 'Tasmanie'],\n ['VIC', 'Victoria'],\n ['WA', 'Western Australia', 'Australie-Occidentale'],\n ],\n BR: [\n ['AC', 'Acre'],\n ['AL', 'Alagoas'],\n ['AM', 'Amazonas'],\n ['AP', 'Amapá'],\n ['BA', 'Bahia'],\n ['CE', 'Ceará'],\n ['DF', 'Federal District', 'District Fédéral'],\n ['ES', 'Espírito Santo'],\n ['GO', 'Goiás'],\n ['MA', 'Maranhão'],\n ['MG', 'Minas Gerais'],\n ['MS', 'Mato Grosso do Sul'],\n ['MT', 'Mato Grosso'],\n ['PA', 'Pará'],\n ['PB', 'Paraíba'],\n ['PE', 'Pernambuco', 'Pernambouc'],\n ['PI', 'Piauí'],\n ['PR', 'Paraná'],\n ['RJ', 'Rio de Janeiro', 'État de Rio de Janeiro'],\n ['RN', 'Rio Grande do Norte'],\n ['RO', 'Rondônia'],\n ['RR', 'Roraima'],\n ['RS', 'Rio Grande do Sul'],\n ['SC', 'Santa Catarina'],\n ['SE', 'Sergipe'],\n ['SP', 'São Paulo', 'État de São Paulo'],\n ['TO', 'Tocantins'],\n ],\n CA: [\n ['AB', 'Alberta'],\n ['BC', 'British Columbia', 'Colombie-Britannique'],\n ['MB', 'Manitoba'],\n ['NB', 'New Brunswick', 'Nouveau-Brunswick'],\n ['NL', 'Newfoundland and Labrador', 'Terre-Neuve-et-Labrador'],\n ['NS', 'Nova Scotia', 'Nouvelle-Écosse'],\n ['NT', 'Northwest Territories', 'Territoires du Nord-Ouest'],\n ['NU', 'Nunavut'],\n ['ON', 'Ontario'],\n ['PE', 'Prince Edward Island', 'Île-du-Prince-Édouard'],\n ['QC', 'Quebec', 'Québec'],\n ['SK', 'Saskatchewan'],\n ['YT', 'Yukon'],\n ],\n CN: [\n ['AH', 'Anhui'],\n ['BJ', 'Beijing', 'Pékin'],\n ['CQ', 'Chongqing'],\n ['FJ', 'Fujian'],\n ['GD', 'Guangdong'],\n ['GS', 'Gansu'],\n ['GX', 'Guangxi'],\n ['GZ', 'Guizhou'],\n ['HA', 'Henan'],\n ['HB', 'Hubei'],\n ['HE', 'Hebei'],\n ['HI', 'Hainan'],\n ['HL', 'Heilongjiang'],\n ['HN', 'Hunan'],\n ['JL', 'Jilin'],\n ['JS', 'Jiangsu'],\n ['JX', 'Jiangxi'],\n ['LN', 'Liaoning'],\n ['NM', 'Inner Mongolia', 'Mongolie-Intérieure'],\n ['NX', 'Ningxia', 'Níngxià'],\n ['QH', 'Qinghai'],\n ['SC', 'Sichuan'],\n ['SD', 'Shandong'],\n ['SH', 'Shanghai'],\n ['SN', 'Shaanxi'],\n ['SX', 'Shanxi'],\n ['TJ', 'Tianjin'],\n ['XJ', 'Xinjiang'],\n ['XZ', 'Tibet', 'Région autonome du Tibet'],\n ['YN', 'Yunnan'],\n ['ZJ', 'Zhejiang'],\n ],\n IN: [\n ['AN', 'Andaman and Nicobar Islands', 'Îles Andaman-et-Nicobar'],\n ['AP', 'Andhra Pradesh'],\n ['AR', 'Arunachal Pradesh'],\n ['AS', 'Assam'],\n ['BR', 'Bihar'],\n ['CG', 'Chhattīsgarh', 'Chhattisgarh'],\n ['CH', 'Chandigarh'],\n ['DH', 'Dādra and Nagar Haveli and Damān and Diu', 'Dadra et Nagar Haveli et Daman et Diu'],\n ['DL', 'Delhi'],\n ['GA', 'Goa'],\n ['GJ', 'Gujarat'],\n ['HP', 'Himachal Pradesh'],\n ['HR', 'Haryana'],\n ['JH', 'Jharkhand'],\n ['JK', 'Jammu and Kashmir', 'Jammu-et-Cachemire'],\n ['KA', 'Karnataka'],\n ['KL', 'Kerala'],\n ['LA', 'Ladakh'],\n ['LD', 'Lakshadweep'],\n ['MH', 'Maharashtra'],\n ['ML', 'Meghalaya'],\n ['MN', 'Manipur'],\n ['MP', 'Madhya Pradesh'],\n ['MZ', 'Mizoram'],\n ['NL', 'Nagaland'],\n ['OD', 'Odisha'],\n ['PB', 'Punjab', 'Pendjab'],\n ['PY', 'Puducherry', 'Territoire de Pondichéry'],\n ['RJ', 'Rajasthan'],\n ['SK', 'Sikkim'],\n ['TN', 'Tamil Nadu'],\n ['TR', 'Tripura'],\n ['TS', 'Telangāna', 'Telangana'],\n ['UK', 'Uttarākhand', 'Uttarakhand'],\n ['UP', 'Uttar Pradesh'],\n ['WB', 'West Bengal', 'Bengale-Occidental'],\n ],\n JP: [\n ['01', 'Hokkaidō'],\n ['02', 'Aomori'],\n ['03', 'Iwate'],\n ['04', 'Miyagi'],\n ['05', 'Akita'],\n ['06', 'Yamagata'],\n ['07', 'Fukushima'],\n ['08', 'Ibaraki'],\n ['09', 'Tochigi'],\n ['10', 'Gunma'],\n ['11', 'Saitama'],\n ['12', 'Chiba'],\n ['13', 'Tokyo'],\n ['14', 'Kanagawa'],\n ['15', 'Niigata'],\n ['16', 'Toyama'],\n ['17', 'Ishikawa'],\n ['18', 'Fukui'],\n ['19', 'Yamanashi'],\n ['20', 'Nagano'],\n ['21', 'Gifu'],\n ['22', 'Shizuoka'],\n ['23', 'Aichi'],\n ['24', 'Mie'],\n ['25', 'Shiga'],\n ['26', 'Kyōto', 'Kyoto'],\n ['27', 'Ōsaka', 'Osaka'],\n ['28', 'Hyōgo'],\n ['29', 'Nara'],\n ['30', 'Wakayama'],\n ['31', 'Tottori'],\n ['32', 'Shimane'],\n ['33', 'Okayama'],\n ['34', 'Hiroshima'],\n ['35', 'Yamaguchi'],\n ['36', 'Tokushima'],\n ['37', 'Kagawa'],\n ['38', 'Ehime'],\n ['39', 'Kōchi'],\n ['40', 'Fukuoka'],\n ['41', 'Saga'],\n ['42', 'Nagasaki'],\n ['43', 'Kumamoto'],\n ['44', 'Ōita'],\n ['45', 'Miyazaki'],\n ['46', 'Kagoshima'],\n ['47', 'Okinawa'],\n ],\n MX: [\n ['AGU', 'Aguascalientes'],\n ['BCN', 'Baja California', 'Basse-Californie'],\n ['BCS', 'Baja California Sur', 'Basse-Californie du Sud'],\n ['CAM', 'Campeche'],\n ['CHH', 'Chihuahua'],\n ['CHP', 'Chiapas'],\n ['CMX', 'Ciudad de Mexico', 'Mexico'],\n ['COA', 'Coahuila'],\n ['COL', 'Colima'],\n ['DUR', 'Durango'],\n ['GRO', 'Guerrero'],\n ['GUA', 'Guanajuato'],\n ['HID', 'Hidalgo'],\n ['JAL', 'Jalisco'],\n ['MEX', 'Mexico State', 'État de Mexico'],\n ['MIC', 'Michoacán'],\n ['MOR', 'Morelos'],\n ['NAY', 'Nayarit'],\n ['NLE', 'Nuevo León'],\n ['OAX', 'Oaxaca'],\n ['PUE', 'Puebla'],\n ['QUE', 'Querétaro'],\n ['ROO', 'Quintana Roo'],\n ['SIN', 'Sinaloa'],\n ['SLP', 'San Luis Potosí'],\n ['SON', 'Sonora'],\n ['TAB', 'Tabasco'],\n ['TAM', 'Tamaulipas'],\n ['TLA', 'Tlaxcala'],\n ['VER', 'Veracruz'],\n ['YUC', 'Yucatán'],\n ['ZAC', 'Zacatecas'],\n ],\n US: [\n ['AK', 'Alaska'],\n ['AL', 'Alabama'],\n ['AR', 'Arkansas'],\n ['AS', 'American Samoa'],\n ['AZ', 'Arizona'],\n ['CA', 'California', 'Californie'],\n ['CO', 'Colorado'],\n ['CT', 'Connecticut'],\n ['DC', 'Washington DC', 'District de Columbia'],\n ['DE', 'Delaware'],\n ['FL', 'Florida', 'Floride'],\n ['GA', 'Georgia', 'Géorgie'],\n ['GU', 'Guam'],\n ['HI', 'Hawaii', 'Hawaï'],\n ['IA', 'Iowa'],\n ['ID', 'Idaho'],\n ['IL', 'Illinois'],\n ['IN', 'Indiana'],\n ['KS', 'Kansas'],\n ['KY', 'Kentucky'],\n ['LA', 'Louisiana', 'Louisiane'],\n ['MA', 'Massachusetts'],\n ['MD', 'Maryland'],\n ['ME', 'Maine'],\n ['MI', 'Michigan'],\n ['MN', 'Minnesota'],\n ['MO', 'Missouri'],\n ['MP', 'Northern Mariana Islands'],\n ['MS', 'Mississippi'],\n ['MT', 'Montana'],\n ['NC', 'North Carolina', 'Caroline du Nord'],\n ['ND', 'North Dakota', 'Dakota du Nord'],\n ['NE', 'Nebraska'],\n ['NH', 'New Hampshire'],\n ['NJ', 'New Jersey'],\n ['NM', 'New Mexico', 'Nouveau-Mexique'],\n ['NV', 'Nevada'],\n ['NY', 'New York'],\n ['OH', 'Ohio'],\n ['OK', 'Oklahoma'],\n ['OR', 'Oregon'],\n ['PA', 'Pennsylvania', 'Pennsylvanie'],\n ['PR', 'Puerto Rico'],\n ['RI', 'Rhode Island'],\n ['SC', 'South Carolina', 'Caroline du Sud'],\n ['SD', 'South Dakota', 'Dakota du Sud'],\n ['TN', 'Tennessee'],\n ['TX', 'Texas'],\n ['UM', 'U.S. Outlying Islands'],\n ['UT', 'Utah'],\n ['VA', 'Virginia', 'Virginie'],\n ['VI', 'U.S. Virgin Islands'],\n ['VT', 'Vermont'],\n ['WA', 'Washington', 'État de Washington'],\n ['WI', 'Wisconsin'],\n ['WV', 'West Virginia', 'Virginie-Occidentale'],\n ['WY', 'Wyoming'],\n ],\n};\n"],"mappings":";;AAQA,IAAaI,UAA4D;CACrEG,IAAI;EACA,CAAC,KAAK,OAAO;EACb;GAAC;GAAK;GAAyB;EAA0B;EACzD,CAAC,KAAK,cAAc;EACpB,CAAC,KAAK,UAAU;EAChB,CAAC,KAAK,YAAY;EAClB,CAAC,KAAK,UAAU;EAChB,CAAC,KAAK,qBAAqB;EAC3B,CAAC,KAAK,OAAO;EACb,CAAC,KAAK,UAAU;EAChB,CAAC,KAAK,WAAW;EACjB,CAAC,KA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AM,aAAa;EACpB,CAAC,MAAM,SAAS;EAChB;GAAC;GAAM;GAAkB;EAAkB;EAC3C;GAAC;GAAM;GAAgB;EAAgB;EACvC,CAAC,MAAM,UAAU;EACjB,CAAC,MAAM,eAAe;EACtB,CAAC,MAAM,YAAY;EACnB;GAAC;GAAM;GAAc;EAAiB;EACtC,CAAC,MAAM,QAAQ;EACf,CAAC,MAAM,UAAU;EACjB,CAAC,MAAM,MAAM;EACb,CAAC,MAAM,UAAU;EACjB,CAAC,MAAM,QAAQ;EACf;GAAC;GAAM;GAAgB;EAAc;EACrC,CAAC,MAAM,aAAa;EACpB,CAAC,MAAM,cAAc;EACrB;GAAC;GAAM;GAAkB;EAAiB;EAC1C;GAAC;GAAM;GAAgB;EAAe;EACtC,CAAC,MAAM,WAAW;EAClB,CAAC,MAAM,OAAO;EACd,CAAC,MAAM,uBAAuB;EAC9B,CAAC,MAAM,MAAM;EACb;GAAC;GAAM;GAAY;EAAU;EAC7B,CAAC,MAAM,qBAAqB;EAC5B,CAAC,MAAM,SAAS;EAChB;GAAC;GAAM;GAAc;EAAoB;EACzC,CAAC,MAAM,WAAW;EAClB;GAAC;GAAM;GAAiB;EAAsB;EAC9C,CAAC,MAAM,SAAS;CAAC;AAEzB"}
@@ -0,0 +1,3 @@
1
+ export { RegionField, RegionFieldEntry, type RegionFieldProps, getRegionCountry, } from './RegionField.js';
2
+ export { REGION_COUNTRIES, type Region, getRegionName, getRegions } from './regions.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/region/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,gBAAgB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,KAAK,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { REGION_COUNTRIES, getRegionName, getRegions } from "./regions.js";
2
+ import { RegionField, RegionFieldEntry, getRegionCountry } from "./RegionField.js";
3
+ export { REGION_COUNTRIES, RegionField, RegionFieldEntry, getRegionCountry, getRegionName, getRegions };
@@ -0,0 +1,15 @@
1
+ /** A region of a country: its code without the country (`QC`), and its name in a locale. */
2
+ export interface Region {
3
+ code: string;
4
+ name: string;
5
+ }
6
+ /** The countries whose regions Panneau knows, by code. */
7
+ export declare const REGION_COUNTRIES: readonly string[];
8
+ /**
9
+ * The regions of a country, with their names in the locale (French or English), sorted by name.
10
+ * `null` for a country whose regions Panneau doesn't know.
11
+ */
12
+ export declare function getRegions(country: string | null | undefined, locale: string): Region[] | null;
13
+ /** The name of a region of a country in the locale, or `null` when Panneau doesn't know it. */
14
+ export declare function getRegionName(country: string | null | undefined, code: string, locale: string): string | null;
15
+ //# sourceMappingURL=regions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regions.d.ts","sourceRoot":"","sources":["../../src/region/regions.ts"],"names":[],"mappings":"AAEA,4FAA4F;AAC5F,MAAM,WAAW,MAAM;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAyB,CAAC;AAMxE;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAS9F;AAED,+FAA+F;AAC/F,wBAAgB,aAAa,CACzB,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACf,MAAM,GAAG,IAAI,CAIf"}
@@ -0,0 +1,29 @@
1
+ import { REGIONS } from "./data.js";
2
+ //#region src/region/regions.ts
3
+ /** The countries whose regions Panneau knows, by code. */
4
+ var REGION_COUNTRIES = Object.keys(REGIONS);
5
+ function nameIn(entry, locale) {
6
+ return locale.toLowerCase().startsWith("fr") ? entry[2] ?? entry[1] : entry[1];
7
+ }
8
+ /**
9
+ * The regions of a country, with their names in the locale (French or English), sorted by name.
10
+ * `null` for a country whose regions Panneau doesn't know.
11
+ */
12
+ function getRegions(country, locale) {
13
+ const entries = country !== null && country !== void 0 ? REGIONS[country] : void 0;
14
+ if (entries === void 0) return null;
15
+ const collator = new Intl.Collator(locale);
16
+ return entries.map((entry) => ({
17
+ code: entry[0],
18
+ name: nameIn(entry, locale)
19
+ })).sort((a, b) => collator.compare(a.name, b.name));
20
+ }
21
+ /** The name of a region of a country in the locale, or `null` when Panneau doesn't know it. */
22
+ function getRegionName(country, code, locale) {
23
+ const entry = (country !== null && country !== void 0 ? REGIONS[country] : void 0)?.find((item) => item[0] === code);
24
+ return entry !== void 0 ? nameIn(entry, locale) : null;
25
+ }
26
+ //#endregion
27
+ export { REGION_COUNTRIES, getRegionName, getRegions };
28
+
29
+ //# sourceMappingURL=regions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regions.js","names":["REGIONS","Region","code","name","REGION_COUNTRIES","Object","keys","nameIn","entry","locale","toLowerCase","startsWith","getRegions","country","entries","undefined","collator","Intl","Collator","map","sort","a","b","compare","getRegionName","find","item"],"sources":["../../src/region/regions.ts"],"sourcesContent":["import { REGIONS } from './data';\n\n/** A region of a country: its code without the country (`QC`), and its name in a locale. */\nexport interface Region {\n code: string;\n name: string;\n}\n\n/** The countries whose regions Panneau knows, by code. */\nexport const REGION_COUNTRIES: readonly string[] = Object.keys(REGIONS);\n\nfunction nameIn(entry: readonly [string, string, string?], locale: string): string {\n return locale.toLowerCase().startsWith('fr') ? (entry[2] ?? entry[1]) : entry[1];\n}\n\n/**\n * The regions of a country, with their names in the locale (French or English), sorted by name.\n * `null` for a country whose regions Panneau doesn't know.\n */\nexport function getRegions(country: string | null | undefined, locale: string): Region[] | null {\n const entries = country !== null && country !== undefined ? REGIONS[country] : undefined;\n if (entries === undefined) {\n return null;\n }\n const collator = new Intl.Collator(locale);\n return entries\n .map((entry) => ({ code: entry[0], name: nameIn(entry, locale) }))\n .sort((a, b) => collator.compare(a.name, b.name));\n}\n\n/** The name of a region of a country in the locale, or `null` when Panneau doesn't know it. */\nexport function getRegionName(\n country: string | null | undefined,\n code: string,\n locale: string,\n): string | null {\n const entries = country !== null && country !== undefined ? REGIONS[country] : undefined;\n const entry = entries?.find((item) => item[0] === code);\n return entry !== undefined ? nameIn(entry, locale) : null;\n}\n"],"mappings":";;;AASA,IAAaI,mBAAsCC,OAAOC,KAAKN,OAAO;AAEtE,SAASO,OAAOC,OAA2CC,QAAwB;CAC/E,OAAOA,OAAOC,YAAY,CAAC,CAACC,WAAW,IAAI,IAAKH,MAAM,MAAMA,MAAM,KAAMA,MAAM;AAClF;;;;;AAMA,SAAgBI,WAAWC,SAAoCJ,QAAiC;CAC5F,MAAMK,UAAUD,YAAY,QAAQA,YAAYE,KAAAA,IAAYf,QAAQa,WAAWE,KAAAA;CAC/E,IAAID,YAAYC,KAAAA,GACZ,OAAO;CAEX,MAAMC,WAAW,IAAIC,KAAKC,SAAST,MAAM;CACzC,OAAOK,QACFK,KAAKX,WAAW;EAAEN,MAAMM,MAAM;EAAIL,MAAMI,OAAOC,OAAOC,MAAM;CAAE,EAAE,CAAC,CACjEW,MAAMC,GAAGC,MAAMN,SAASO,QAAQF,EAAElB,MAAMmB,EAAEnB,IAAI,CAAC;AACxD;;AAGA,SAAgBqB,cACZX,SACAX,MACAO,QACa;CAEb,MAAMD,SADUK,YAAY,QAAQA,YAAYE,KAAAA,IAAYf,QAAQa,WAAWE,KAAAA,EAAAA,EACxDU,MAAMC,SAASA,KAAK,OAAOxB,IAAI;CACtD,OAAOM,UAAUO,KAAAA,IAAYR,OAAOC,OAAOC,MAAM,IAAI;AACzD"}
@@ -5,10 +5,10 @@ import { messages } from "../shared/messages.js";
5
5
  import { toReferences, useRelationReferences } from "../shared/relation.js";
6
6
  import RelationField_module_default from "./RelationField.module.js";
7
7
  import { c } from "react/compiler-runtime";
8
- import { ComboBox, Fieldset, IconButton, usePanneauIntl } from "@panneau/ui";
8
+ import { X } from "lucide-react";
9
9
  import { useEffect, useState } from "react";
10
+ import { ComboBox, Fieldset, IconButton, usePanneauIntl } from "@panneau/ui";
10
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
- import { X } from "lucide-react";
12
12
  //#region src/relation/RelationField.tsx
13
13
  /** The id of the "Create “…”" option of the picker. */
14
14
  var CREATE_ID = "\0create";
@@ -4,10 +4,10 @@ import { messages } from "../shared/messages.js";
4
4
  import RepeaterField_module_default from "./RepeaterField.module.js";
5
5
  import { NestedField } from "../shared/DefinitionField.js";
6
6
  import { c } from "react/compiler-runtime";
7
- import { Button, Fieldset, IconButton, Menu, MenuItem, MenuTrigger, usePanneauIntl } from "@panneau/ui";
7
+ import { ArrowDown, ArrowUp, Plus, Trash2 } from "lucide-react";
8
8
  import { useId } from "react";
9
+ import { Button, Fieldset, IconButton, Menu, MenuItem, MenuTrigger, usePanneauIntl } from "@panneau/ui";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
- import { ArrowDown, ArrowUp, Plus, Trash2 } from "lucide-react";
11
11
  //#region src/repeater/RepeaterField.tsx
12
12
  function defaults(fields) {
13
13
  return Object.fromEntries(fields.flatMap((field) => field.default !== void 0 ? [[field.name, field.default]] : []));
@@ -0,0 +1,20 @@
1
+ import type { FieldProps } from './types.js';
2
+ /** A choice of a code combo box: a code, its name, and a decorative prefix (a flag). */
3
+ export interface CodeChoice {
4
+ code: string;
5
+ name: string;
6
+ prefix?: string;
7
+ }
8
+ export interface CodeComboBoxProps extends Omit<FieldProps<string>, 'onChange'> {
9
+ choices: readonly CodeChoice[];
10
+ onChange?: ((value: string | null) => void) | undefined;
11
+ placeholder?: string | undefined;
12
+ emptyMessage: string;
13
+ controlClassName?: string | undefined;
14
+ }
15
+ /**
16
+ * A combo box of codes shown by their names (countries, regions): typing filters them by the start
17
+ * of a word of their name, or by their code. A value outside the choices shows as it is.
18
+ */
19
+ export declare function CodeComboBox({ choices, value, onChange, onBlur, label, description, errors, disabled, readOnly, required, placeholder, name, id, autoFocus, emptyMessage, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, ...props }: CodeComboBoxProps): import("react").JSX.Element;
20
+ //# sourceMappingURL=CodeComboBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeComboBox.d.ts","sourceRoot":"","sources":["../../src/shared/CodeComboBox.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wFAAwF;AACxF,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC3E,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACxD,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAwBD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EACzB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,EAAE,EACF,SAAS,EACT,YAAY,EACZ,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,GAAG,KAAK,EACX,EAAE,iBAAiB,+BA0DnB"}
@@ -0,0 +1,238 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { useState } from "react";
3
+ import { ComboBox } from "@panneau/ui";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/shared/CodeComboBox.tsx
6
+ /** Lower case, without accents: `Québec` matches `quebec`. */
7
+ function normalize(text) {
8
+ return text.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase();
9
+ }
10
+ function matches(choice, query) {
11
+ const text = normalize(query.trim());
12
+ if (text === "") return true;
13
+ return normalize(choice.name).split(/[\s'’-]+/).some((word) => word.startsWith(text)) || normalize(choice.name).startsWith(text) || choice.code.toLowerCase() === text;
14
+ }
15
+ /**
16
+ * A combo box of codes shown by their names (countries, regions): typing filters them by the start
17
+ * of a word of their name, or by their code. A value outside the choices shows as it is.
18
+ */
19
+ function CodeComboBox(t0) {
20
+ const $ = c(71);
21
+ let autoFocus;
22
+ let choices;
23
+ let className;
24
+ let controlClassName;
25
+ let description;
26
+ let descriptionClassName;
27
+ let disabled;
28
+ let emptyMessage;
29
+ let errors;
30
+ let errorsClassName;
31
+ let id;
32
+ let label;
33
+ let labelClassName;
34
+ let name;
35
+ let onBlur;
36
+ let onChange;
37
+ let placeholder;
38
+ let props;
39
+ let readOnly;
40
+ let required;
41
+ let value;
42
+ if ($[0] !== t0) {
43
+ ({choices, value, onChange, onBlur, label, description, errors, disabled, readOnly, required, placeholder, name, id, autoFocus, emptyMessage, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, ...props} = t0);
44
+ $[0] = t0;
45
+ $[1] = autoFocus;
46
+ $[2] = choices;
47
+ $[3] = className;
48
+ $[4] = controlClassName;
49
+ $[5] = description;
50
+ $[6] = descriptionClassName;
51
+ $[7] = disabled;
52
+ $[8] = emptyMessage;
53
+ $[9] = errors;
54
+ $[10] = errorsClassName;
55
+ $[11] = id;
56
+ $[12] = label;
57
+ $[13] = labelClassName;
58
+ $[14] = name;
59
+ $[15] = onBlur;
60
+ $[16] = onChange;
61
+ $[17] = placeholder;
62
+ $[18] = props;
63
+ $[19] = readOnly;
64
+ $[20] = required;
65
+ $[21] = value;
66
+ } else {
67
+ autoFocus = $[1];
68
+ choices = $[2];
69
+ className = $[3];
70
+ controlClassName = $[4];
71
+ description = $[5];
72
+ descriptionClassName = $[6];
73
+ disabled = $[7];
74
+ emptyMessage = $[8];
75
+ errors = $[9];
76
+ errorsClassName = $[10];
77
+ id = $[11];
78
+ label = $[12];
79
+ labelClassName = $[13];
80
+ name = $[14];
81
+ onBlur = $[15];
82
+ onChange = $[16];
83
+ placeholder = $[17];
84
+ props = $[18];
85
+ readOnly = $[19];
86
+ required = $[20];
87
+ value = $[21];
88
+ }
89
+ const [query, setQuery] = useState(null);
90
+ const current = value !== null && value !== void 0 && value !== "" ? value : null;
91
+ let t1;
92
+ if ($[22] !== choices || $[23] !== current) {
93
+ t1 = current !== null ? choices.find((choice) => choice.code === current) : null;
94
+ $[22] = choices;
95
+ $[23] = current;
96
+ $[24] = t1;
97
+ } else t1 = $[24];
98
+ const selected = t1;
99
+ let t2;
100
+ if ($[25] !== choices || $[26] !== current || $[27] !== query || $[28] !== selected) {
101
+ t2 = (query !== null ? choices.filter((choice_0) => matches(choice_0, query)) : choices).concat(current !== null && selected === void 0 && query === null ? [{
102
+ code: current,
103
+ name: current
104
+ }] : []).map(_temp);
105
+ $[25] = choices;
106
+ $[26] = current;
107
+ $[27] = query;
108
+ $[28] = selected;
109
+ $[29] = t2;
110
+ } else t2 = $[29];
111
+ const items = t2;
112
+ let t3;
113
+ if ($[30] !== errors) {
114
+ t3 = errors ?? [];
115
+ $[30] = errors;
116
+ $[31] = t3;
117
+ } else t3 = $[31];
118
+ let t4;
119
+ if ($[32] !== controlClassName) {
120
+ t4 = controlClassName !== void 0 ? { controlClassName } : {};
121
+ $[32] = controlClassName;
122
+ $[33] = t4;
123
+ } else t4 = $[33];
124
+ let t5;
125
+ if ($[34] !== props) {
126
+ t5 = props["aria-label"] !== void 0 ? { "aria-label": props["aria-label"] } : {};
127
+ $[34] = props;
128
+ $[35] = t5;
129
+ } else t5 = $[35];
130
+ let t6;
131
+ if ($[36] !== name) {
132
+ t6 = name !== void 0 ? { name } : {};
133
+ $[36] = name;
134
+ $[37] = t6;
135
+ } else t6 = $[37];
136
+ let t7;
137
+ if ($[38] !== id) {
138
+ t7 = id !== void 0 ? { id } : {};
139
+ $[38] = id;
140
+ $[39] = t7;
141
+ } else t7 = $[39];
142
+ const t8 = query === null ? selected?.prefix : void 0;
143
+ const t9 = query ?? selected?.name ?? current ?? "";
144
+ let t10;
145
+ let t11;
146
+ if ($[40] !== current || $[41] !== onChange) {
147
+ t10 = (text) => {
148
+ setQuery(text);
149
+ if (text === "" && current !== null) onChange?.(null);
150
+ };
151
+ t11 = (code) => {
152
+ setQuery(null);
153
+ if (code !== null && code !== current) onChange?.(code);
154
+ };
155
+ $[40] = current;
156
+ $[41] = onChange;
157
+ $[42] = t10;
158
+ $[43] = t11;
159
+ } else {
160
+ t10 = $[42];
161
+ t11 = $[43];
162
+ }
163
+ let t12;
164
+ if ($[44] !== onBlur) {
165
+ t12 = () => {
166
+ setQuery(null);
167
+ onBlur?.();
168
+ };
169
+ $[44] = onBlur;
170
+ $[45] = t12;
171
+ } else t12 = $[45];
172
+ let t13;
173
+ if ($[46] !== autoFocus || $[47] !== className || $[48] !== current || $[49] !== description || $[50] !== descriptionClassName || $[51] !== disabled || $[52] !== emptyMessage || $[53] !== errorsClassName || $[54] !== items || $[55] !== label || $[56] !== labelClassName || $[57] !== placeholder || $[58] !== readOnly || $[59] !== required || $[60] !== t10 || $[61] !== t11 || $[62] !== t12 || $[63] !== t3 || $[64] !== t4 || $[65] !== t5 || $[66] !== t6 || $[67] !== t7 || $[68] !== t8 || $[69] !== t9) {
174
+ t13 = /* @__PURE__ */ jsx(ComboBox, {
175
+ label,
176
+ description,
177
+ errors: t3,
178
+ isRequired: required,
179
+ isDisabled: disabled,
180
+ isReadOnly: readOnly,
181
+ autoFocus,
182
+ className,
183
+ labelClassName,
184
+ descriptionClassName,
185
+ errorsClassName,
186
+ ...t4,
187
+ ...t5,
188
+ ...t6,
189
+ ...t7,
190
+ items,
191
+ value: current,
192
+ prefix: t8,
193
+ inputValue: t9,
194
+ onInputChange: t10,
195
+ onChange: t11,
196
+ onBlur: t12,
197
+ placeholder,
198
+ emptyMessage
199
+ });
200
+ $[46] = autoFocus;
201
+ $[47] = className;
202
+ $[48] = current;
203
+ $[49] = description;
204
+ $[50] = descriptionClassName;
205
+ $[51] = disabled;
206
+ $[52] = emptyMessage;
207
+ $[53] = errorsClassName;
208
+ $[54] = items;
209
+ $[55] = label;
210
+ $[56] = labelClassName;
211
+ $[57] = placeholder;
212
+ $[58] = readOnly;
213
+ $[59] = required;
214
+ $[60] = t10;
215
+ $[61] = t11;
216
+ $[62] = t12;
217
+ $[63] = t3;
218
+ $[64] = t4;
219
+ $[65] = t5;
220
+ $[66] = t6;
221
+ $[67] = t7;
222
+ $[68] = t8;
223
+ $[69] = t9;
224
+ $[70] = t13;
225
+ } else t13 = $[70];
226
+ return t13;
227
+ }
228
+ function _temp(choice_1) {
229
+ return {
230
+ id: choice_1.code,
231
+ label: choice_1.name,
232
+ ...choice_1.prefix !== void 0 ? { prefix: choice_1.prefix } : {}
233
+ };
234
+ }
235
+ //#endregion
236
+ export { CodeComboBox };
237
+
238
+ //# sourceMappingURL=CodeComboBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeComboBox.js","names":["ReactNode","useState","ComboBox","FieldProps","CodeChoice","code","name","prefix","CodeComboBoxProps","Omit","choices","onChange","value","placeholder","emptyMessage","controlClassName","normalize","text","replace","toLowerCase","matches","choice","query","trim","split","some","word","startsWith","CodeComboBox","t0","$","_c","autoFocus","className","description","descriptionClassName","disabled","errors","errorsClassName","id","label","labelClassName","onBlur","props","readOnly","required","setQuery","current","undefined","t1","find","selected","t2","filter","choice_0","concat","map","_temp","items","t3","t4","t5","t6","t7","t8","t9","t10","t11","t12","t13","choice_1","_c"],"sources":["../../src/shared/CodeComboBox.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport { ComboBox } from '@panneau/ui';\n\nimport type { FieldProps } from './types';\n\n/** A choice of a code combo box: a code, its name, and a decorative prefix (a flag). */\nexport interface CodeChoice {\n code: string;\n name: string;\n prefix?: string;\n}\n\nexport interface CodeComboBoxProps extends Omit<FieldProps<string>, 'onChange'> {\n choices: readonly CodeChoice[];\n onChange?: ((value: string | null) => void) | undefined;\n placeholder?: string | undefined;\n emptyMessage: string;\n controlClassName?: string | undefined;\n}\n\n/** Lower case, without accents: `Québec` matches `quebec`. */\nfunction normalize(text: string): string {\n return text\n .normalize('NFD')\n .replace(/\\p{Diacritic}/gu, '')\n .toLowerCase();\n}\n\nfunction matches(choice: CodeChoice, query: string): boolean {\n const text = normalize(query.trim());\n if (text === '') {\n return true;\n }\n return (\n normalize(choice.name)\n .split(/[\\s'’-]+/)\n .some((word) => word.startsWith(text)) ||\n normalize(choice.name).startsWith(text) ||\n choice.code.toLowerCase() === text\n );\n}\n\n/**\n * A combo box of codes shown by their names (countries, regions): typing filters them by the start\n * of a word of their name, or by their code. A value outside the choices shows as it is.\n */\nexport function CodeComboBox({\n choices,\n value,\n onChange,\n onBlur,\n label,\n description,\n errors,\n disabled,\n readOnly,\n required,\n placeholder,\n name,\n id,\n autoFocus,\n emptyMessage,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n controlClassName,\n ...props\n}: CodeComboBoxProps) {\n // The text being typed, while the user searches; the name of the value otherwise.\n const [query, setQuery] = useState<string | null>(null);\n const current = value !== null && value !== undefined && value !== '' ? value : null;\n const selected = current !== null ? choices.find((choice) => choice.code === current) : null;\n const items = (query !== null ? choices.filter((choice) => matches(choice, query)) : choices)\n .concat(\n // A value outside the choices, kept from before, stays selectable as it is.\n current !== null && selected === undefined && query === null\n ? [{ code: current, name: current }]\n : [],\n )\n .map((choice): { id: string; label: string; prefix?: ReactNode } => ({\n id: choice.code,\n label: choice.name,\n ...(choice.prefix !== undefined ? { prefix: choice.prefix } : {}),\n }));\n return (\n <ComboBox\n label={label}\n description={description}\n errors={errors ?? []}\n isRequired={required}\n isDisabled={disabled}\n isReadOnly={readOnly}\n autoFocus={autoFocus}\n className={className}\n labelClassName={labelClassName}\n descriptionClassName={descriptionClassName}\n errorsClassName={errorsClassName}\n {...(controlClassName !== undefined ? { controlClassName } : {})}\n {...(props['aria-label'] !== undefined ? { 'aria-label': props['aria-label'] } : {})}\n {...(name !== undefined ? { name } : {})}\n {...(id !== undefined ? { id } : {})}\n items={items}\n value={current}\n prefix={query === null ? selected?.prefix : undefined}\n inputValue={query ?? selected?.name ?? current ?? ''}\n onInputChange={(text) => {\n setQuery(text);\n if (text === '' && current !== null) {\n onChange?.(null);\n }\n }}\n onChange={(code) => {\n setQuery(null);\n if (code !== null && code !== current) {\n onChange?.(code);\n }\n }}\n onBlur={() => {\n setQuery(null);\n onBlur?.();\n }}\n placeholder={placeholder}\n emptyMessage={emptyMessage}\n />\n );\n}\n"],"mappings":";;;;;;AAsBA,SAASgB,UAAUC,MAAsB;CACrC,OAAOA,KACFD,UAAU,KAAK,CAAC,CAChBE,QAAQ,mBAAmB,EAAE,CAAC,CAC9BC,YAAY;AACrB;AAEA,SAASC,QAAQC,QAAoBC,OAAwB;CACzD,MAAML,OAAOD,UAAUM,MAAMC,KAAK,CAAC;CACnC,IAAIN,SAAS,IACT,OAAO;CAEX,OACID,UAAUK,OAAOf,IAAI,CAAC,CACjBkB,MAAM,UAAU,CAAC,CACjBC,MAAMC,SAASA,KAAKC,WAAWV,IAAI,CAAC,KACzCD,UAAUK,OAAOf,IAAI,CAAC,CAACqB,WAAWV,IAAI,KACtCI,OAAOhB,KAAKc,YAAY,MAAMF;AAEtC;;;;;AAMA,SAAOW,aAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAtB;CAAA,IAAAuB;CAAA,IAAAlB;CAAA,IAAAm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J,EAAA,MAAAK;EAAAL,EAAA,MAAAM;EAAAN,EAAA,MAAAhB;EAAAgB,EAAA,MAAAQ;EAAAR,EAAA,MAAA4B;EAAA5B,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAjB;EAAAiB,EAAA,MAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAoC;EAAApC,EAAA,MAAAqC;EAAArC,EAAA,MAAAsC;EAAAtC,EAAA,MAAA6B;EAAA7B,EAAA,MAAA8B;EAAA9B,EAAA,MAAA+B;EAAA/B,EAAA,MAAAgC;EAAAhC,EAAA,MAAAiC;EAAAjC,EAAA,MAAAkC;EAAAlC,EAAA,MAAAmC;EAAAnC,EAAA,MAAAuC;CAAA,OAAAA,MAAAvC,EAAA;CAAA,OAtCFuC;AAsCE;AA9EH,SAAAZ,MAAAa,UAAA;CAAA,OAkCsE;EAAA/B,IAC7DlB,SAAMhB;EAAKmC,OACRnB,SAAMf;EAAK,GACde,SAAMd,WAAYyC,KAAAA,IAAlB,EAAAzC,QAAwCc,SAAMd,OAAa,IAA3D,CAA2D;CACnE;AAAC"}
@@ -14,6 +14,8 @@ export interface NestedFieldProps {
14
14
  parentValue?: unknown;
15
15
  /** The locale of the value, in a localized field. */
16
16
  locale?: string;
17
+ /** Renders the field without a visible label, named by its label for assistive technologies. */
18
+ hideLabel?: boolean;
17
19
  disabled?: boolean;
18
20
  readOnly?: boolean;
19
21
  className?: string;
@@ -24,7 +26,7 @@ export interface NestedFieldProps {
24
26
  * one, it uses `value` and `onChange`, and hides itself when its `visibleWhen` condition on the
25
27
  * parent value is false.
26
28
  */
27
- export declare function NestedField({ field, path, value, onChange, onBlur, errors, parentValue, locale, disabled, readOnly, className, }: NestedFieldProps): import("react").JSX.Element | null;
29
+ export declare function NestedField({ field, path, value, onChange, onBlur, errors, parentValue, locale, hideLabel, disabled, readOnly, className, }: NestedFieldProps): import("react").JSX.Element | null;
28
30
  /**
29
31
  * Renders a field of the definition with the entry of its type: from the fields context, or a
30
32
  * built-in one. A localized field renders an input per locale. A type without an entry renders a
@@ -1 +1 @@
1
- {"version":3,"file":"DefinitionField.d.ts","sourceRoot":"","sources":["../../src/shared/DefinitionField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAU/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,MAAM,EACN,WAAW,EACX,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,GACZ,EAAE,gBAAgB,sCAiClB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,+BAQrD"}
1
+ {"version":3,"file":"DefinitionField.d.ts","sourceRoot":"","sources":["../../src/shared/DefinitionField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAU/C,OAAO,KAAK,EA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