@ogc-maps/storybook-components 0.4.0 → 0.5.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/{ExportButton-D2xn4G74.js → ExportButton-CLsWoW4m.js} +17 -17
- package/dist/{LayerPanel-K00X2QUj.js → LayerPanel-BHpb8dbm.js} +17 -16
- package/dist/SearchPanel-DCY01Wa-.js +363 -0
- package/dist/components/ExportButton/index.js +1 -1
- package/dist/components/LayerPanel/LayerPanel.d.ts +2 -1
- package/dist/components/LayerPanel/LayerPanel.d.ts.map +1 -1
- package/dist/components/LayerPanel/index.js +1 -1
- package/dist/components/SearchPanel/AutocompleteInput.d.ts +12 -0
- package/dist/components/SearchPanel/AutocompleteInput.d.ts.map +1 -0
- package/dist/components/SearchPanel/DateRangeInput.d.ts +11 -0
- package/dist/components/SearchPanel/DateRangeInput.d.ts.map +1 -0
- package/dist/components/SearchPanel/NumberInput.d.ts +11 -0
- package/dist/components/SearchPanel/NumberInput.d.ts.map +1 -0
- package/dist/components/SearchPanel/SearchPanel.d.ts +8 -4
- package/dist/components/SearchPanel/SearchPanel.d.ts.map +1 -1
- package/dist/components/SearchPanel/index.js +1 -1
- package/dist/cql2-BaKDic7B.js +288 -0
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +31 -11
- package/dist/hooks/useCsvExport.d.ts +2 -1
- package/dist/hooks/useCsvExport.d.ts.map +1 -1
- package/dist/index-BLgVA46J.js +2854 -0
- package/dist/main.js +72 -48
- package/dist/schemas/config.d.ts +836 -64
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.js +21 -2822
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +17 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +20 -16
- package/dist/utils/__tests__/cql2.test.d.ts +2 -0
- package/dist/utils/__tests__/cql2.test.d.ts.map +1 -0
- package/dist/utils/cql2.d.ts +75 -0
- package/dist/utils/cql2.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/ogcApi.d.ts +24 -7
- package/dist/utils/ogcApi.d.ts.map +1 -1
- package/package.json +4 -2
- package/dist/SearchPanel-CFVQV6JJ.js +0 -135
- package/dist/ogcApi-BuXSs9i0.js +0 -48
- package/dist/useCsvExport-wr7hy0P-.js +0 -101
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--mapui-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--mapui-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--mapui-color-blue-50:oklch(97% .014 254.604);--mapui-color-blue-100:oklch(93.2% .032 255.585);--mapui-color-blue-300:oklch(80.9% .105 251.813);--mapui-color-blue-500:oklch(62.3% .214 259.815);--mapui-color-blue-600:oklch(54.6% .245 262.881);--mapui-color-blue-700:oklch(48.8% .243 264.376);--mapui-color-gray-100:oklch(96.7% .003 264.542);--mapui-color-gray-200:oklch(92.8% .006 264.531);--mapui-color-gray-300:oklch(87.2% .01 258.338);--mapui-color-gray-400:oklch(70.7% .022 261.325);--mapui-color-gray-500:oklch(55.1% .027 264.364);--mapui-color-gray-600:oklch(44.6% .03 256.802);--mapui-color-gray-700:oklch(37.3% .034 259.733);--mapui-color-gray-800:oklch(27.8% .033 256.848);--mapui-color-black:#000;--mapui-color-white:#fff;--mapui-spacing:.25rem;--mapui-container-lg:32rem;--mapui-text-xs:.75rem;--mapui-text-xs--line-height:calc(1/.75);--mapui-text-sm:.875rem;--mapui-text-sm--line-height:calc(1.25/.875);--mapui-text-lg:1.125rem;--mapui-text-lg--line-height:calc(1.75/1.125);--mapui-font-weight-medium:500;--mapui-font-weight-semibold:600;--mapui-tracking-wide:.025em;--mapui-radius-sm:.25rem;--mapui-radius-md:.375rem;--mapui-radius-lg:.5rem;--mapui-default-transition-duration:.15s;--mapui-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--mapui-default-font-family:var(--mapui-font-sans);--mapui-default-mono-font-family:var(--mapui-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--mapui-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--mapui-default-font-feature-settings,normal);font-variation-settings:var(--mapui-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--mapui-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--mapui-default-mono-font-feature-settings,normal);font-variation-settings:var(--mapui-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.mapui\:absolute{position:absolute}.mapui\:fixed{position:fixed}.mapui\:relative{position:relative}.mapui\:inset-0{inset:calc(var(--mapui-spacing)*0)}.mapui\:top-0{top:calc(var(--mapui-spacing)*0)}.mapui\:top-full{top:100%}.mapui\:right-full{right:100%}.mapui\:bottom-full{bottom:100%}.mapui\:left-0{left:calc(var(--mapui-spacing)*0)}.mapui\:z-10{z-index:10}.mapui\:z-50{z-index:50}.mapui\:m-0{margin:calc(var(--mapui-spacing)*0)}.mapui\:mt-0{margin-top:calc(var(--mapui-spacing)*0)}.mapui\:mt-1{margin-top:calc(var(--mapui-spacing)*1)}.mapui\:mt-2{margin-top:calc(var(--mapui-spacing)*2)}.mapui\:mr-2{margin-right:calc(var(--mapui-spacing)*2)}.mapui\:mb-0{margin-bottom:calc(var(--mapui-spacing)*0)}.mapui\:mb-1{margin-bottom:calc(var(--mapui-spacing)*1)}.mapui\:mb-1\.5{margin-bottom:calc(var(--mapui-spacing)*1.5)}.mapui\:mb-2{margin-bottom:calc(var(--mapui-spacing)*2)}.mapui\:contents{display:contents}.mapui\:flex{display:flex}.mapui\:grid{display:grid}.mapui\:inline-block{display:inline-block}.mapui\:inline-flex{display:inline-flex}.mapui\:h-0\.5{height:calc(var(--mapui-spacing)*.5)}.mapui\:h-3{height:calc(var(--mapui-spacing)*3)}.mapui\:h-4{height:calc(var(--mapui-spacing)*4)}.mapui\:h-6{height:calc(var(--mapui-spacing)*6)}.mapui\:h-10{height:calc(var(--mapui-spacing)*10)}.mapui\:h-12{height:calc(var(--mapui-spacing)*12)}.mapui\:max-h-\[80vh\]{max-height:80vh}.mapui\:max-h-\[calc\(100vh-4rem\)\]{max-height:calc(100vh - 4rem)}.mapui\:w-3{width:calc(var(--mapui-spacing)*3)}.mapui\:w-4{width:calc(var(--mapui-spacing)*4)}.mapui\:w-6{width:calc(var(--mapui-spacing)*6)}.mapui\:w-10{width:calc(var(--mapui-spacing)*10)}.mapui\:w-16{width:calc(var(--mapui-spacing)*16)}.mapui\:w-64{width:calc(var(--mapui-spacing)*64)}.mapui\:w-72{width:calc(var(--mapui-spacing)*72)}.mapui\:w-full{width:100%}.mapui\:max-w-\[240px\]{max-width:240px}.mapui\:max-w-lg{max-width:var(--mapui-container-lg)}.mapui\:min-w-\[140px\]{min-width:140px}.mapui\:min-w-\[160px\]{min-width:160px}.mapui\:flex-1{flex:1}.mapui\:shrink-0{flex-shrink:0}.mapui\:cursor-grab{cursor:grab}.mapui\:cursor-not-allowed{cursor:not-allowed}.mapui\:cursor-pointer{cursor:pointer}.mapui\:list-none{list-style-type:none}.mapui\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.mapui\:flex-col{flex-direction:column}.mapui\:flex-wrap{flex-wrap:wrap}.mapui\:items-center{align-items:center}.mapui\:justify-between{justify-content:space-between}.mapui\:justify-center{justify-content:center}.mapui\:gap-0\.5{gap:calc(var(--mapui-spacing)*.5)}.mapui\:gap-1{gap:calc(var(--mapui-spacing)*1)}.mapui\:gap-1\.5{gap:calc(var(--mapui-spacing)*1.5)}.mapui\:gap-2{gap:calc(var(--mapui-spacing)*2)}.mapui\:gap-3{gap:calc(var(--mapui-spacing)*3)}.mapui\:gap-4{gap:calc(var(--mapui-spacing)*4)}:where(.mapui\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.mapui\:gap-x-4{column-gap:calc(var(--mapui-spacing)*4)}.mapui\:gap-y-2{row-gap:calc(var(--mapui-spacing)*2)}.mapui\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mapui\:overflow-hidden{overflow:hidden}.mapui\:overflow-y-auto{overflow-y:auto}.mapui\:rounded{border-radius:.25rem}.mapui\:rounded-full{border-radius:3.40282e38px}.mapui\:rounded-lg{border-radius:var(--mapui-radius-lg)}.mapui\:rounded-md{border-radius:var(--mapui-radius-md)}.mapui\:rounded-sm{border-radius:var(--mapui-radius-sm)}.mapui\:border{border-style:var(--tw-border-style);border-width:1px}.mapui\:border-0{border-style:var(--tw-border-style);border-width:0}.mapui\:border-2{border-style:var(--tw-border-style);border-width:2px}.mapui\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.mapui\:border-none{--tw-border-style:none;border-style:none}.mapui\:border-blue-500{border-color:var(--mapui-color-blue-500)}.mapui\:border-gray-100{border-color:var(--mapui-color-gray-100)}.mapui\:border-gray-200{border-color:var(--mapui-color-gray-200)}.mapui\:border-gray-300{border-color:var(--mapui-color-gray-300)}.mapui\:bg-black\/40{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/40{background-color:color-mix(in oklab,var(--mapui-color-black)40%,transparent)}}.mapui\:bg-black\/60{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/60{background-color:color-mix(in oklab,var(--mapui-color-black)60%,transparent)}}.mapui\:bg-blue-50{background-color:var(--mapui-color-blue-50)}.mapui\:bg-blue-100{background-color:var(--mapui-color-blue-100)}.mapui\:bg-blue-500{background-color:var(--mapui-color-blue-500)}.mapui\:bg-gray-100{background-color:var(--mapui-color-gray-100)}.mapui\:bg-transparent{background-color:#0000}.mapui\:bg-white{background-color:var(--mapui-color-white)}.mapui\:object-cover{object-fit:cover}.mapui\:p-0{padding:calc(var(--mapui-spacing)*0)}.mapui\:p-2{padding:calc(var(--mapui-spacing)*2)}.mapui\:p-3{padding:calc(var(--mapui-spacing)*3)}.mapui\:p-4{padding:calc(var(--mapui-spacing)*4)}.mapui\:px-2{padding-inline:calc(var(--mapui-spacing)*2)}.mapui\:px-3{padding-inline:calc(var(--mapui-spacing)*3)}.mapui\:px-4{padding-inline:calc(var(--mapui-spacing)*4)}.mapui\:py-0\.5{padding-block:calc(var(--mapui-spacing)*.5)}.mapui\:py-1{padding-block:calc(var(--mapui-spacing)*1)}.mapui\:py-1\.5{padding-block:calc(var(--mapui-spacing)*1.5)}.mapui\:py-2{padding-block:calc(var(--mapui-spacing)*2)}.mapui\:py-3{padding-block:calc(var(--mapui-spacing)*3)}.mapui\:pb-2{padding-bottom:calc(var(--mapui-spacing)*2)}.mapui\:pl-1{padding-left:calc(var(--mapui-spacing)*1)}.mapui\:font-mono{font-family:var(--mapui-font-mono)}.mapui\:text-lg{font-size:var(--mapui-text-lg);line-height:var(--tw-leading,var(--mapui-text-lg--line-height))}.mapui\:text-sm{font-size:var(--mapui-text-sm);line-height:var(--tw-leading,var(--mapui-text-sm--line-height))}.mapui\:text-xs{font-size:var(--mapui-text-xs);line-height:var(--tw-leading,var(--mapui-text-xs--line-height))}.mapui\:leading-none{--tw-leading:1;line-height:1}.mapui\:font-medium{--tw-font-weight:var(--mapui-font-weight-medium);font-weight:var(--mapui-font-weight-medium)}.mapui\:font-semibold{--tw-font-weight:var(--mapui-font-weight-semibold);font-weight:var(--mapui-font-weight-semibold)}.mapui\:tracking-wide{--tw-tracking:var(--mapui-tracking-wide);letter-spacing:var(--mapui-tracking-wide)}.mapui\:break-words{overflow-wrap:break-word}.mapui\:text-blue-300{color:var(--mapui-color-blue-300)}.mapui\:text-blue-600{color:var(--mapui-color-blue-600)}.mapui\:text-blue-700{color:var(--mapui-color-blue-700)}.mapui\:text-gray-400{color:var(--mapui-color-gray-400)}.mapui\:text-gray-500{color:var(--mapui-color-gray-500)}.mapui\:text-gray-600{color:var(--mapui-color-gray-600)}.mapui\:text-gray-700{color:var(--mapui-color-gray-700)}.mapui\:text-gray-800{color:var(--mapui-color-gray-800)}.mapui\:text-white{color:var(--mapui-color-white)}.mapui\:uppercase{text-transform:uppercase}.mapui\:accent-blue-600{accent-color:var(--mapui-color-blue-600)}.mapui\:opacity-50{opacity:.5}.mapui\:opacity-100{opacity:1}.mapui\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--mapui-default-transition-timing-function));transition-duration:var(--tw-duration,var(--mapui-default-transition-duration))}.mapui\:outline-none{--tw-outline-style:none;outline-style:none}.mapui\:select-none{-webkit-user-select:none;user-select:none}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
1
|
+
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--mapui-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--mapui-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--mapui-color-blue-50:oklch(97% .014 254.604);--mapui-color-blue-100:oklch(93.2% .032 255.585);--mapui-color-blue-300:oklch(80.9% .105 251.813);--mapui-color-blue-500:oklch(62.3% .214 259.815);--mapui-color-blue-600:oklch(54.6% .245 262.881);--mapui-color-blue-700:oklch(48.8% .243 264.376);--mapui-color-gray-100:oklch(96.7% .003 264.542);--mapui-color-gray-200:oklch(92.8% .006 264.531);--mapui-color-gray-300:oklch(87.2% .01 258.338);--mapui-color-gray-400:oklch(70.7% .022 261.325);--mapui-color-gray-500:oklch(55.1% .027 264.364);--mapui-color-gray-600:oklch(44.6% .03 256.802);--mapui-color-gray-700:oklch(37.3% .034 259.733);--mapui-color-gray-800:oklch(27.8% .033 256.848);--mapui-color-black:#000;--mapui-color-white:#fff;--mapui-spacing:.25rem;--mapui-container-lg:32rem;--mapui-text-xs:.75rem;--mapui-text-xs--line-height:calc(1/.75);--mapui-text-sm:.875rem;--mapui-text-sm--line-height:calc(1.25/.875);--mapui-text-lg:1.125rem;--mapui-text-lg--line-height:calc(1.75/1.125);--mapui-font-weight-medium:500;--mapui-font-weight-semibold:600;--mapui-tracking-wide:.025em;--mapui-radius-sm:.25rem;--mapui-radius-md:.375rem;--mapui-radius-lg:.5rem;--mapui-default-transition-duration:.15s;--mapui-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--mapui-default-font-family:var(--mapui-font-sans);--mapui-default-mono-font-family:var(--mapui-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--mapui-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--mapui-default-font-feature-settings,normal);font-variation-settings:var(--mapui-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--mapui-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--mapui-default-mono-font-feature-settings,normal);font-variation-settings:var(--mapui-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.mapui\:absolute{position:absolute}.mapui\:fixed{position:fixed}.mapui\:relative{position:relative}.mapui\:inset-0{inset:calc(var(--mapui-spacing)*0)}.mapui\:top-0{top:calc(var(--mapui-spacing)*0)}.mapui\:top-full{top:100%}.mapui\:right-0{right:calc(var(--mapui-spacing)*0)}.mapui\:right-full{right:100%}.mapui\:bottom-full{bottom:100%}.mapui\:z-10{z-index:10}.mapui\:z-50{z-index:50}.mapui\:m-0{margin:calc(var(--mapui-spacing)*0)}.mapui\:mt-0{margin-top:calc(var(--mapui-spacing)*0)}.mapui\:mt-1{margin-top:calc(var(--mapui-spacing)*1)}.mapui\:mt-2{margin-top:calc(var(--mapui-spacing)*2)}.mapui\:mr-2{margin-right:calc(var(--mapui-spacing)*2)}.mapui\:mb-0{margin-bottom:calc(var(--mapui-spacing)*0)}.mapui\:mb-1{margin-bottom:calc(var(--mapui-spacing)*1)}.mapui\:mb-1\.5{margin-bottom:calc(var(--mapui-spacing)*1.5)}.mapui\:mb-2{margin-bottom:calc(var(--mapui-spacing)*2)}.mapui\:contents{display:contents}.mapui\:flex{display:flex}.mapui\:grid{display:grid}.mapui\:inline-block{display:inline-block}.mapui\:inline-flex{display:inline-flex}.mapui\:h-0\.5{height:calc(var(--mapui-spacing)*.5)}.mapui\:h-3{height:calc(var(--mapui-spacing)*3)}.mapui\:h-4{height:calc(var(--mapui-spacing)*4)}.mapui\:h-6{height:calc(var(--mapui-spacing)*6)}.mapui\:h-10{height:calc(var(--mapui-spacing)*10)}.mapui\:h-12{height:calc(var(--mapui-spacing)*12)}.mapui\:max-h-48{max-height:calc(var(--mapui-spacing)*48)}.mapui\:max-h-\[80vh\]{max-height:80vh}.mapui\:max-h-\[calc\(100vh-4rem\)\]{max-height:calc(100vh - 4rem)}.mapui\:w-1\/2{width:50%}.mapui\:w-3{width:calc(var(--mapui-spacing)*3)}.mapui\:w-4{width:calc(var(--mapui-spacing)*4)}.mapui\:w-6{width:calc(var(--mapui-spacing)*6)}.mapui\:w-8{width:calc(var(--mapui-spacing)*8)}.mapui\:w-10{width:calc(var(--mapui-spacing)*10)}.mapui\:w-16{width:calc(var(--mapui-spacing)*16)}.mapui\:w-64{width:calc(var(--mapui-spacing)*64)}.mapui\:w-72{width:calc(var(--mapui-spacing)*72)}.mapui\:w-full{width:100%}.mapui\:max-w-\[240px\]{max-width:240px}.mapui\:max-w-lg{max-width:var(--mapui-container-lg)}.mapui\:min-w-12{min-width:calc(var(--mapui-spacing)*12)}.mapui\:min-w-\[140px\]{min-width:140px}.mapui\:min-w-\[160px\]{min-width:160px}.mapui\:flex-1{flex:1}.mapui\:shrink-0{flex-shrink:0}.mapui\:cursor-grab{cursor:grab}.mapui\:cursor-not-allowed{cursor:not-allowed}.mapui\:cursor-pointer{cursor:pointer}.mapui\:list-none{list-style-type:none}.mapui\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.mapui\:flex-col{flex-direction:column}.mapui\:flex-wrap{flex-wrap:wrap}.mapui\:items-center{align-items:center}.mapui\:justify-between{justify-content:space-between}.mapui\:justify-center{justify-content:center}.mapui\:gap-0\.5{gap:calc(var(--mapui-spacing)*.5)}.mapui\:gap-1{gap:calc(var(--mapui-spacing)*1)}.mapui\:gap-1\.5{gap:calc(var(--mapui-spacing)*1.5)}.mapui\:gap-2{gap:calc(var(--mapui-spacing)*2)}.mapui\:gap-3{gap:calc(var(--mapui-spacing)*3)}.mapui\:gap-4{gap:calc(var(--mapui-spacing)*4)}:where(.mapui\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.mapui\:gap-x-4{column-gap:calc(var(--mapui-spacing)*4)}.mapui\:gap-y-2{row-gap:calc(var(--mapui-spacing)*2)}.mapui\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mapui\:overflow-hidden{overflow:hidden}.mapui\:overflow-y-auto{overflow-y:auto}.mapui\:rounded{border-radius:.25rem}.mapui\:rounded-full{border-radius:3.40282e38px}.mapui\:rounded-lg{border-radius:var(--mapui-radius-lg)}.mapui\:rounded-md{border-radius:var(--mapui-radius-md)}.mapui\:rounded-sm{border-radius:var(--mapui-radius-sm)}.mapui\:border{border-style:var(--tw-border-style);border-width:1px}.mapui\:border-0{border-style:var(--tw-border-style);border-width:0}.mapui\:border-2{border-style:var(--tw-border-style);border-width:2px}.mapui\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.mapui\:border-none{--tw-border-style:none;border-style:none}.mapui\:border-blue-500{border-color:var(--mapui-color-blue-500)}.mapui\:border-gray-100{border-color:var(--mapui-color-gray-100)}.mapui\:border-gray-200{border-color:var(--mapui-color-gray-200)}.mapui\:border-gray-300{border-color:var(--mapui-color-gray-300)}.mapui\:bg-black\/40{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/40{background-color:color-mix(in oklab,var(--mapui-color-black)40%,transparent)}}.mapui\:bg-black\/60{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/60{background-color:color-mix(in oklab,var(--mapui-color-black)60%,transparent)}}.mapui\:bg-blue-50{background-color:var(--mapui-color-blue-50)}.mapui\:bg-blue-100{background-color:var(--mapui-color-blue-100)}.mapui\:bg-blue-500{background-color:var(--mapui-color-blue-500)}.mapui\:bg-gray-100{background-color:var(--mapui-color-gray-100)}.mapui\:bg-transparent{background-color:#0000}.mapui\:bg-white{background-color:var(--mapui-color-white)}.mapui\:object-cover{object-fit:cover}.mapui\:p-0{padding:calc(var(--mapui-spacing)*0)}.mapui\:p-2{padding:calc(var(--mapui-spacing)*2)}.mapui\:p-3{padding:calc(var(--mapui-spacing)*3)}.mapui\:p-4{padding:calc(var(--mapui-spacing)*4)}.mapui\:px-2{padding-inline:calc(var(--mapui-spacing)*2)}.mapui\:px-3{padding-inline:calc(var(--mapui-spacing)*3)}.mapui\:px-4{padding-inline:calc(var(--mapui-spacing)*4)}.mapui\:py-0\.5{padding-block:calc(var(--mapui-spacing)*.5)}.mapui\:py-1{padding-block:calc(var(--mapui-spacing)*1)}.mapui\:py-1\.5{padding-block:calc(var(--mapui-spacing)*1.5)}.mapui\:py-2{padding-block:calc(var(--mapui-spacing)*2)}.mapui\:py-3{padding-block:calc(var(--mapui-spacing)*3)}.mapui\:pb-2{padding-bottom:calc(var(--mapui-spacing)*2)}.mapui\:pl-1{padding-left:calc(var(--mapui-spacing)*1)}.mapui\:text-right{text-align:right}.mapui\:font-mono{font-family:var(--mapui-font-mono)}.mapui\:text-lg{font-size:var(--mapui-text-lg);line-height:var(--tw-leading,var(--mapui-text-lg--line-height))}.mapui\:text-sm{font-size:var(--mapui-text-sm);line-height:var(--tw-leading,var(--mapui-text-sm--line-height))}.mapui\:text-xs{font-size:var(--mapui-text-xs);line-height:var(--tw-leading,var(--mapui-text-xs--line-height))}.mapui\:leading-none{--tw-leading:1;line-height:1}.mapui\:font-medium{--tw-font-weight:var(--mapui-font-weight-medium);font-weight:var(--mapui-font-weight-medium)}.mapui\:font-semibold{--tw-font-weight:var(--mapui-font-weight-semibold);font-weight:var(--mapui-font-weight-semibold)}.mapui\:tracking-wide{--tw-tracking:var(--mapui-tracking-wide);letter-spacing:var(--mapui-tracking-wide)}.mapui\:break-words{overflow-wrap:break-word}.mapui\:whitespace-nowrap{white-space:nowrap}.mapui\:text-blue-300{color:var(--mapui-color-blue-300)}.mapui\:text-blue-600{color:var(--mapui-color-blue-600)}.mapui\:text-blue-700{color:var(--mapui-color-blue-700)}.mapui\:text-gray-400{color:var(--mapui-color-gray-400)}.mapui\:text-gray-500{color:var(--mapui-color-gray-500)}.mapui\:text-gray-600{color:var(--mapui-color-gray-600)}.mapui\:text-gray-700{color:var(--mapui-color-gray-700)}.mapui\:text-gray-800{color:var(--mapui-color-gray-800)}.mapui\:text-white{color:var(--mapui-color-white)}.mapui\:uppercase{text-transform:uppercase}.mapui\:accent-blue-600{accent-color:var(--mapui-color-blue-600)}.mapui\:opacity-50{opacity:.5}.mapui\:opacity-100{opacity:1}.mapui\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--mapui-default-transition-timing-function));transition-duration:var(--tw-duration,var(--mapui-default-transition-duration))}.mapui\:outline-none{--tw-outline-style:none;outline-style:none}.mapui\:select-none{-webkit-user-select:none;user-select:none}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema } from '../schemas/config';
|
|
2
|
+
import { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, TextSearchFieldSchema, NumberSearchFieldSchema, DatetimeSearchFieldSchema, SelectSearchFieldSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema } from '../schemas/config';
|
|
3
3
|
export type ViewConfig = z.infer<typeof ViewConfigSchema>;
|
|
4
4
|
export type OgcApiSource = z.infer<typeof OgcApiSourceSchema>;
|
|
5
5
|
export type FillPaint = z.infer<typeof FillPaintSchema>;
|
|
@@ -11,13 +11,27 @@ export type CircleStyle = z.infer<typeof CircleStyleSchema>;
|
|
|
11
11
|
export type StyleConfig = z.infer<typeof StyleConfigSchema>;
|
|
12
12
|
export type LegendEntry = z.infer<typeof LegendEntrySchema>;
|
|
13
13
|
export type LegendConfig = z.infer<typeof LegendConfigSchema>;
|
|
14
|
+
export type TextSearchField = z.infer<typeof TextSearchFieldSchema>;
|
|
15
|
+
export type NumberSearchField = z.infer<typeof NumberSearchFieldSchema>;
|
|
16
|
+
export type DatetimeSearchField = z.infer<typeof DatetimeSearchFieldSchema>;
|
|
17
|
+
export type SelectSearchField = z.infer<typeof SelectSearchFieldSchema>;
|
|
14
18
|
export type SearchField = z.infer<typeof SearchFieldSchema>;
|
|
15
19
|
export type SearchConfig = z.infer<typeof SearchConfigSchema>;
|
|
16
|
-
export type
|
|
20
|
+
export type SearchFilterValue = string | number | {
|
|
21
|
+
start: string;
|
|
22
|
+
end: string;
|
|
23
|
+
} | {
|
|
24
|
+
value: number;
|
|
25
|
+
operator: string;
|
|
26
|
+
} | {
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
} | undefined;
|
|
30
|
+
export type SearchFilterValues = Record<string, SearchFilterValue>;
|
|
17
31
|
export type FilterConfig = z.infer<typeof FilterConfigSchema>;
|
|
18
32
|
export type LayerConfig = z.infer<typeof LayerConfigSchema>;
|
|
19
33
|
export type BasemapConfig = z.infer<typeof BasemapConfigSchema>;
|
|
20
34
|
export type UIConfig = z.infer<typeof UIConfigSchema>;
|
|
21
35
|
export type MapConfig = z.infer<typeof MapConfigSchema>;
|
|
22
|
-
export { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema, };
|
|
36
|
+
export { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, TextSearchFieldSchema, NumberSearchFieldSchema, DatetimeSearchFieldSchema, SelectSearchFieldSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema, };
|
|
23
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB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ACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,GAChB,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as S, C as c, a as h, D as i, F as m, b as s, c as l, L as n, d as r, e as t, f as g, g as o, M as C, N as f, O as F, S as d, h as y, i as L, j as p, T as P, U as b, V as u } from "../index-BLgVA46J.js";
|
|
2
2
|
export {
|
|
3
3
|
S as BasemapConfigSchema,
|
|
4
4
|
c as CirclePaintSchema,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
m as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
h as CircleStyleSchema,
|
|
6
|
+
i as DatetimeSearchFieldSchema,
|
|
7
|
+
m as FillPaintSchema,
|
|
8
|
+
s as FillStyleSchema,
|
|
9
|
+
l as FilterConfigSchema,
|
|
10
|
+
n as LayerConfigSchema,
|
|
11
|
+
r as LegendConfigSchema,
|
|
12
|
+
t as LegendEntrySchema,
|
|
13
|
+
g as LinePaintSchema,
|
|
14
|
+
o as LineStyleSchema,
|
|
15
|
+
C as MapConfigSchema,
|
|
16
|
+
f as NumberSearchFieldSchema,
|
|
17
|
+
F as OgcApiSourceSchema,
|
|
18
|
+
d as SearchConfigSchema,
|
|
19
|
+
y as SearchFieldSchema,
|
|
20
|
+
L as SelectSearchFieldSchema,
|
|
18
21
|
p as StyleConfigSchema,
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
P as TextSearchFieldSchema,
|
|
23
|
+
b as UIConfigSchema,
|
|
24
|
+
u as ViewConfigSchema
|
|
21
25
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cql2.test.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/cql2.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CQL2 JSON (OGC Common Query Language 2) types and builder utilities.
|
|
3
|
+
*
|
|
4
|
+
* CQL2 JSON spec: https://docs.ogc.org/is/21-065r2/21-065r2.html
|
|
5
|
+
*
|
|
6
|
+
* All builder functions return plain CQL2Expression objects suitable for
|
|
7
|
+
* JSON serialization and direct use with OGC API endpoints via the
|
|
8
|
+
* `filter` query parameter with `filter-lang=cql2-json`.
|
|
9
|
+
*/
|
|
10
|
+
/** A reference to a feature property (column) in a CQL2 expression. */
|
|
11
|
+
export type CQL2PropertyRef = {
|
|
12
|
+
property: string;
|
|
13
|
+
};
|
|
14
|
+
/** A date literal: ISO 8601 date string "YYYY-MM-DD". */
|
|
15
|
+
export type CQL2Date = {
|
|
16
|
+
date: string;
|
|
17
|
+
};
|
|
18
|
+
/** A timestamp literal: ISO 8601 datetime string "YYYY-MM-DDTHH:MM:SSZ". */
|
|
19
|
+
export type CQL2Timestamp = {
|
|
20
|
+
timestamp: string;
|
|
21
|
+
};
|
|
22
|
+
/** A temporal interval with start and end as date/timestamp strings or "..". */
|
|
23
|
+
export type CQL2Interval = {
|
|
24
|
+
interval: [string, string];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* A CQL2 expression node. Intentionally kept as a simple op+args structure
|
|
28
|
+
* rather than a complex discriminated union — builders enforce correctness
|
|
29
|
+
* and the type must remain JSON-serializable.
|
|
30
|
+
*/
|
|
31
|
+
export type CQL2Expression = {
|
|
32
|
+
op: string;
|
|
33
|
+
args: unknown[];
|
|
34
|
+
};
|
|
35
|
+
export declare function eq(property: string, value: string | number | boolean | CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
36
|
+
export declare function neq(property: string, value: string | number | boolean): CQL2Expression;
|
|
37
|
+
export declare function gt(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
38
|
+
export declare function gte(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
39
|
+
export declare function lt(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
40
|
+
export declare function lte(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
41
|
+
export declare function between(property: string, lower: number, upper: number): CQL2Expression;
|
|
42
|
+
/** LIKE pattern match. Use `%` as wildcard, e.g. `like('name', '%France%')`. */
|
|
43
|
+
export declare function like(property: string, pattern: string): CQL2Expression;
|
|
44
|
+
/** Checks if a property value is in a list. Named inList to avoid reserved word. */
|
|
45
|
+
export declare function inList(property: string, values: (string | number)[]): CQL2Expression;
|
|
46
|
+
export declare function isNull(property: string): CQL2Expression;
|
|
47
|
+
/**
|
|
48
|
+
* Combines expressions with AND. Filters out null/undefined entries.
|
|
49
|
+
* Returns null if no valid expressions remain.
|
|
50
|
+
*/
|
|
51
|
+
export declare function and(...expressions: (CQL2Expression | null | undefined)[]): CQL2Expression | null;
|
|
52
|
+
/**
|
|
53
|
+
* Combines expressions with OR. Filters out null/undefined entries.
|
|
54
|
+
* Returns null if no valid expressions remain.
|
|
55
|
+
*/
|
|
56
|
+
export declare function or(...expressions: (CQL2Expression | null | undefined)[]): CQL2Expression | null;
|
|
57
|
+
export declare function not(expression: CQL2Expression): CQL2Expression;
|
|
58
|
+
export declare function tAfter(property: string, dateOrTimestamp: CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
59
|
+
export declare function tBefore(property: string, dateOrTimestamp: CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
60
|
+
export declare function tDuring(property: string, start: CQL2Date | CQL2Timestamp, end: CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
61
|
+
/**
|
|
62
|
+
* Converts a simple key-value filter record to a CQL2 expression.
|
|
63
|
+
* Each entry becomes an equality check; multiple entries are combined with AND.
|
|
64
|
+
* Returns null if the record is empty.
|
|
65
|
+
*/
|
|
66
|
+
export declare function fromSimpleFilters(filters: Record<string, string | number>): CQL2Expression | null;
|
|
67
|
+
/**
|
|
68
|
+
* Converts structured `SearchFilterValues` (with typed shapes) to a CQL2 expression.
|
|
69
|
+
* Uses field configs to determine the right operator per field type.
|
|
70
|
+
* Returns null if no active filters remain.
|
|
71
|
+
*/
|
|
72
|
+
export declare function fromStructuredFilters(filters: Record<string, import('../types').SearchFilterValue>, fields: import('../types').SearchField[]): CQL2Expression | null;
|
|
73
|
+
/** Serializes a CQL2 expression to a JSON string for use as a query parameter. */
|
|
74
|
+
export declare function serializeCql2(expr: CQL2Expression): string;
|
|
75
|
+
//# sourceMappingURL=cql2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cql2.d.ts","sourceRoot":"","sources":["../../src/utils/cql2.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,gFAAgF;AAChF,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB,CAAC;AAMF,wBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,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AAE,GAAG,cAAc,GAAG,IAAI,CAK/F;AAED,wBAAgB,GAAG,CAAC,UAAU,EAAE,cAAc,GAAG,cAAc,CAE9D;AAMD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,GAAG,aAAa,GAAG,cAAc,CAElG;AAED,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,GAAG,aAAa,GAAG,cAAc,CAEnG;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,QAAQ,GAAG,aAAa,EAC/B,GAAG,EAAE,QAAQ,GAAG,aAAa,GAC5B,cAAc,CAIhB;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GACvC,cAAc,GAAG,IAAI,CAMvB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,UAAU,EAAE,iBAAiB,CAAC,EAC7D,MAAM,EAAE,OAAO,UAAU,EAAE,WAAW,EAAE,GACvC,cAAc,GAAG,IAAI,CAwDvB;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE1D"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
|
package/dist/utils/ogcApi.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CQL2Expression } from './cql2';
|
|
1
2
|
/** A single OGC API collection. */
|
|
2
3
|
export interface OgcCollection {
|
|
3
4
|
id: string;
|
|
@@ -48,18 +49,18 @@ export interface OgcFeatureCollection {
|
|
|
48
49
|
type?: string;
|
|
49
50
|
}>;
|
|
50
51
|
}
|
|
51
|
-
/** A single queryable property definition. */
|
|
52
|
+
/** A single queryable property definition (OGC API schemajson format). */
|
|
52
53
|
export interface QueryableProperty {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
enum?: string[];
|
|
54
|
+
name?: string;
|
|
55
|
+
type?: string;
|
|
56
|
+
$ref?: string;
|
|
57
57
|
}
|
|
58
|
-
/** OGC API queryables response. */
|
|
58
|
+
/** OGC API queryables response (schemajson format). */
|
|
59
59
|
export interface OgcQueryables {
|
|
60
|
+
$id?: string;
|
|
61
|
+
$schema?: string;
|
|
60
62
|
type: string;
|
|
61
63
|
title?: string;
|
|
62
|
-
description?: string;
|
|
63
64
|
properties: Record<string, QueryableProperty>;
|
|
64
65
|
}
|
|
65
66
|
/** Options for fetchFeatures. */
|
|
@@ -69,7 +70,10 @@ export interface FetchFeaturesOptions {
|
|
|
69
70
|
offset?: number;
|
|
70
71
|
properties?: string[];
|
|
71
72
|
datetime?: string;
|
|
73
|
+
/** @deprecated Use cql2Filter instead. Simple key-value equality filters. */
|
|
72
74
|
filter?: Record<string, string | number>;
|
|
75
|
+
/** CQL2 JSON filter expression. When provided, takes precedence over filter. */
|
|
76
|
+
cql2Filter?: CQL2Expression;
|
|
73
77
|
}
|
|
74
78
|
/**
|
|
75
79
|
* Fetch the list of collections from an OGC API endpoint.
|
|
@@ -97,4 +101,17 @@ export declare function getVectorTileUrl(baseUrl: string, collection: string, ti
|
|
|
97
101
|
* Returns a URL with `{z}/{x}/{y}` placeholders suitable for MapLibre.
|
|
98
102
|
*/
|
|
99
103
|
export declare function getFilteredVectorTileUrl(baseUrl: string, collection: string, filter?: Record<string, string | number>, tileMatrixSetId?: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* Fetch distinct non-null string values for a property in an OGC API collection.
|
|
106
|
+
* Optionally filters by a substring query using a CQL2 `like` filter.
|
|
107
|
+
*/
|
|
108
|
+
export declare function fetchDistinctValues(baseUrl: string, collection: string, property: string, options?: {
|
|
109
|
+
query?: string;
|
|
110
|
+
limit?: number;
|
|
111
|
+
}): Promise<string[]>;
|
|
112
|
+
/**
|
|
113
|
+
* Build a vector tile URL template with a CQL2 JSON filter applied.
|
|
114
|
+
* Returns a URL with `{z}/{x}/{y}` placeholders suitable for MapLibre.
|
|
115
|
+
*/
|
|
116
|
+
export declare function getCql2FilteredVectorTileUrl(baseUrl: string, collection: string, cql2Filter?: CQL2Expression | null, tileMatrixSetId?: string): string;
|
|
100
117
|
//# sourceMappingURL=ogcApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogcApi.d.ts","sourceRoot":"","sources":["../../src/utils/ogcApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ogcApi.d.ts","sourceRoot":"","sources":["../../src/utils/ogcApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAI7C,mCAAmC;AACnC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3E,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;YAAC,GAAG,CAAC,EAAE,MAAM,CAAA;SAAE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GR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACxC,eAAe,GAAE,MAA0B,GAC1C,MAAM,CAUR;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3C,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBnB;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,EAClC,eAAe,GAAE,MAA0B,GAC1C,MAAM,CAUR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogc-maps/storybook-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"zod": "^3.24.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
+
"vitest": "^2.1.0",
|
|
79
80
|
"@chromatic-com/storybook": "^3.2.2",
|
|
80
81
|
"@storybook/addon-essentials": "^8.5.0",
|
|
81
82
|
"@storybook/addon-interactions": "^8.5.0",
|
|
@@ -102,6 +103,7 @@
|
|
|
102
103
|
"dev": "vite build --watch",
|
|
103
104
|
"build": "vite build",
|
|
104
105
|
"storybook": "storybook dev -p 6006",
|
|
105
|
-
"build-storybook": "storybook build"
|
|
106
|
+
"build-storybook": "storybook build",
|
|
107
|
+
"test": "vitest run"
|
|
106
108
|
}
|
|
107
109
|
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as x, useState as C, useEffect as Q, useCallback as l } from "react";
|
|
3
|
-
import { b as $ } from "./ogcApi-BuXSs9i0.js";
|
|
4
|
-
function E({
|
|
5
|
-
layers: c,
|
|
6
|
-
sources: d = [],
|
|
7
|
-
activeFilters: g,
|
|
8
|
-
onFilterChange: s,
|
|
9
|
-
onClearFilters: y,
|
|
10
|
-
className: b = ""
|
|
11
|
-
}) {
|
|
12
|
-
const o = x(
|
|
13
|
-
() => c.filter((e) => {
|
|
14
|
-
var i;
|
|
15
|
-
return (i = e.search) == null ? void 0 : i.fields.length;
|
|
16
|
-
}),
|
|
17
|
-
[c]
|
|
18
|
-
), [f, v] = C({}), N = x(
|
|
19
|
-
() => o.map((e) => e.id).join(","),
|
|
20
|
-
[o]
|
|
21
|
-
);
|
|
22
|
-
Q(() => {
|
|
23
|
-
o.forEach(async (e) => {
|
|
24
|
-
var a;
|
|
25
|
-
const i = d.find((p) => p.id === e.sourceId);
|
|
26
|
-
if (!i) return;
|
|
27
|
-
if ((a = e.search) == null ? void 0 : a.fields.some(
|
|
28
|
-
(p) => p.type === "select" && (!p.options || p.options.length === 0)
|
|
29
|
-
))
|
|
30
|
-
try {
|
|
31
|
-
const p = await $(i.url, e.collection);
|
|
32
|
-
v((m) => ({
|
|
33
|
-
...m,
|
|
34
|
-
[e.id]: p.properties
|
|
35
|
-
}));
|
|
36
|
-
} catch (p) {
|
|
37
|
-
console.error(`Failed to fetch queryables for layer ${e.id}`, p);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}, [N, o, d]);
|
|
41
|
-
const h = l(
|
|
42
|
-
(e, i, t) => {
|
|
43
|
-
s(e, i, t || void 0);
|
|
44
|
-
},
|
|
45
|
-
[s]
|
|
46
|
-
), S = l(
|
|
47
|
-
(e, i, t) => {
|
|
48
|
-
s(e, i, t === "" ? void 0 : Number(t));
|
|
49
|
-
},
|
|
50
|
-
[s]
|
|
51
|
-
), j = l(
|
|
52
|
-
(e, i, t) => {
|
|
53
|
-
s(e, i, t || void 0);
|
|
54
|
-
},
|
|
55
|
-
[s]
|
|
56
|
-
);
|
|
57
|
-
return o.length === 0 ? /* @__PURE__ */ n("div", { className: `mapui:flex mapui:flex-col mapui:gap-1 ${b}`.trim(), children: [
|
|
58
|
-
/* @__PURE__ */ r("h3", { className: "mapui:m-0 mapui:mb-2 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Search & Filter" }),
|
|
59
|
-
/* @__PURE__ */ r("p", { className: "mapui:m-0 mapui:text-xs mapui:text-gray-500", children: "No searchable layers configured." })
|
|
60
|
-
] }) : /* @__PURE__ */ n("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${b}`.trim(), children: [
|
|
61
|
-
/* @__PURE__ */ r("h3", { className: "mapui:m-0 mapui:mb-2 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Search & Filter" }),
|
|
62
|
-
o.map((e) => {
|
|
63
|
-
const i = g[e.id] ?? {}, t = Object.values(i).some((a) => a !== void 0);
|
|
64
|
-
return /* @__PURE__ */ n("div", { className: "mapui:flex mapui:flex-col mapui:gap-2 mapui:border-b mapui:border-gray-100 mapui:pb-2 last:mapui:border-0", children: [
|
|
65
|
-
/* @__PURE__ */ n("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
66
|
-
/* @__PURE__ */ r("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: e.label }),
|
|
67
|
-
t && /* @__PURE__ */ r(
|
|
68
|
-
"button",
|
|
69
|
-
{
|
|
70
|
-
type: "button",
|
|
71
|
-
onClick: () => y(e.id),
|
|
72
|
-
className: "mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:p-0 mapui:text-xs mapui:text-blue-600 hover:mapui:text-blue-800",
|
|
73
|
-
children: "Clear"
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
] }),
|
|
77
|
-
e.search.fields.map((a) => {
|
|
78
|
-
const p = i[a.property];
|
|
79
|
-
let m = a.options;
|
|
80
|
-
if (a.type === "select" && (!m || m.length === 0)) {
|
|
81
|
-
const u = f[e.id];
|
|
82
|
-
u && u[a.property] && (m = u[a.property].enum);
|
|
83
|
-
}
|
|
84
|
-
return /* @__PURE__ */ n("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
85
|
-
/* @__PURE__ */ r("label", { className: "mapui:text-xs mapui:text-gray-500", children: a.label }),
|
|
86
|
-
a.type === "text" && /* @__PURE__ */ r(
|
|
87
|
-
"input",
|
|
88
|
-
{
|
|
89
|
-
type: "text",
|
|
90
|
-
value: p ?? "",
|
|
91
|
-
placeholder: a.placeholder ?? "",
|
|
92
|
-
onChange: (u) => h(e.id, a.property, u.target.value),
|
|
93
|
-
className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500"
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
a.type === "number" && /* @__PURE__ */ r(
|
|
97
|
-
"input",
|
|
98
|
-
{
|
|
99
|
-
type: "number",
|
|
100
|
-
value: p ?? "",
|
|
101
|
-
placeholder: a.placeholder ?? "",
|
|
102
|
-
onChange: (u) => S(e.id, a.property, u.target.value),
|
|
103
|
-
className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500"
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
a.type === "datetime" && /* @__PURE__ */ r(
|
|
107
|
-
"input",
|
|
108
|
-
{
|
|
109
|
-
type: "datetime-local",
|
|
110
|
-
value: p ?? "",
|
|
111
|
-
onChange: (u) => h(e.id, a.property, u.target.value),
|
|
112
|
-
className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500"
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
a.type === "select" && /* @__PURE__ */ n(
|
|
116
|
-
"select",
|
|
117
|
-
{
|
|
118
|
-
value: p ?? "",
|
|
119
|
-
onChange: (u) => j(e.id, a.property, u.target.value),
|
|
120
|
-
className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500",
|
|
121
|
-
children: [
|
|
122
|
-
/* @__PURE__ */ r("option", { value: "", children: a.placeholder ?? "Select..." }),
|
|
123
|
-
m == null ? void 0 : m.map((u) => /* @__PURE__ */ r("option", { value: u, children: u }, u))
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
)
|
|
127
|
-
] }, a.property);
|
|
128
|
-
})
|
|
129
|
-
] }, e.id);
|
|
130
|
-
})
|
|
131
|
-
] });
|
|
132
|
-
}
|
|
133
|
-
export {
|
|
134
|
-
E as S
|
|
135
|
-
};
|
package/dist/ogcApi-BuXSs9i0.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
function c(t) {
|
|
2
|
-
return t.endsWith("/") ? t.slice(0, -1) : t;
|
|
3
|
-
}
|
|
4
|
-
async function f(t) {
|
|
5
|
-
const n = await fetch(t);
|
|
6
|
-
if (!n.ok)
|
|
7
|
-
throw new Error(`OGC API request failed: ${n.status} ${n.statusText} (${t})`);
|
|
8
|
-
return n.json();
|
|
9
|
-
}
|
|
10
|
-
async function u(t) {
|
|
11
|
-
const n = `${c(t)}/collections?f=json`;
|
|
12
|
-
return (await f(n)).collections;
|
|
13
|
-
}
|
|
14
|
-
async function b(t, n, e = {}) {
|
|
15
|
-
var r;
|
|
16
|
-
const o = c(t), s = new URLSearchParams({ f: "geojson" });
|
|
17
|
-
if (e.limit != null && s.set("limit", String(e.limit)), e.offset != null && s.set("offset", String(e.offset)), e.bbox && s.set("bbox", e.bbox.join(",")), (r = e.properties) != null && r.length && s.set("properties", e.properties.join(",")), e.datetime && s.set("datetime", e.datetime), e.filter)
|
|
18
|
-
for (const [i, l] of Object.entries(e.filter))
|
|
19
|
-
s.set(i, String(l));
|
|
20
|
-
const a = `${o}/collections/${encodeURIComponent(n)}/items?${s}`;
|
|
21
|
-
return f(a);
|
|
22
|
-
}
|
|
23
|
-
async function d(t, n) {
|
|
24
|
-
const o = `${c(t)}/collections/${encodeURIComponent(n)}/queryables?f=json`;
|
|
25
|
-
return f(o);
|
|
26
|
-
}
|
|
27
|
-
function $(t, n, e = "WebMercatorQuad") {
|
|
28
|
-
return `${c(t)}/collections/${encodeURIComponent(n)}/tiles/${encodeURIComponent(e)}/tilejson.json`;
|
|
29
|
-
}
|
|
30
|
-
function m(t, n, e = "WebMercatorQuad") {
|
|
31
|
-
return `${c(t)}/collections/${encodeURIComponent(n)}/tiles/${encodeURIComponent(e)}/{z}/{x}/{y}`;
|
|
32
|
-
}
|
|
33
|
-
function U(t, n, e, o = "WebMercatorQuad") {
|
|
34
|
-
const a = `${c(t)}/collections/${encodeURIComponent(n)}/tiles/${encodeURIComponent(o)}/{z}/{x}/{y}`;
|
|
35
|
-
if (!e || Object.keys(e).length === 0) return a;
|
|
36
|
-
const r = new URLSearchParams();
|
|
37
|
-
for (const [i, l] of Object.entries(e))
|
|
38
|
-
r.set(i, String(l));
|
|
39
|
-
return `${a}?${r}`;
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
b as a,
|
|
43
|
-
d as b,
|
|
44
|
-
$ as c,
|
|
45
|
-
m as d,
|
|
46
|
-
u as f,
|
|
47
|
-
U as g
|
|
48
|
-
};
|