@startinblox/core 0.17.23 → 0.17.26
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/_snowpack/pkg/import-map.json +8 -2
- package/dist/_snowpack/pkg/showdown.js +5059 -0
- package/dist/_snowpack/pkg/showdown.js.map +1 -0
- package/dist/_snowpack/pkg/showdown.js.map.proxy.js +1 -0
- package/dist/_snowpack/pkg/tinymce/icons/default.js +196 -0
- package/dist/_snowpack/pkg/tinymce/icons/default.js.map +1 -0
- package/dist/_snowpack/pkg/tinymce/icons/default.js.map.proxy.js +1 -0
- package/dist/_snowpack/pkg/tinymce/models/dom.js +7955 -0
- package/dist/_snowpack/pkg/tinymce/models/dom.js.map +1 -0
- package/dist/_snowpack/pkg/tinymce/models/dom.js.map.proxy.js +1 -0
- package/dist/_snowpack/pkg/tinymce/plugins/autoresize/plugin.js +156 -0
- package/dist/_snowpack/pkg/tinymce/plugins/autoresize/plugin.js.map +1 -0
- package/dist/_snowpack/pkg/tinymce/plugins/autoresize/plugin.js.map.proxy.js +1 -0
- package/dist/_snowpack/pkg/tinymce/plugins/link/plugin.js +1188 -0
- package/dist/_snowpack/pkg/tinymce/plugins/link/plugin.js.map +1 -0
- package/dist/_snowpack/pkg/tinymce/plugins/link/plugin.js.map.proxy.js +1 -0
- package/dist/_snowpack/pkg/tinymce/plugins/lists/plugin.js +1757 -0
- package/dist/_snowpack/pkg/tinymce/plugins/lists/plugin.js.map +1 -0
- package/dist/_snowpack/pkg/tinymce/plugins/lists/plugin.js.map.proxy.js +1 -0
- package/dist/_snowpack/pkg/tinymce/themes/silver.js +26121 -0
- package/dist/_snowpack/pkg/tinymce/themes/silver.js.map +1 -0
- package/dist/_snowpack/pkg/tinymce/themes/silver.js.map.proxy.js +1 -0
- package/dist/_snowpack/pkg/tinymce.js +29045 -0
- package/dist/_snowpack/pkg/tinymce.js.map +1 -0
- package/dist/_snowpack/pkg/tinymce.js.map.proxy.js +1 -0
- package/dist/components/solid-map.js +2 -2
- package/dist/components/solid-map.js.map +1 -1
- package/dist/new-widgets/callbackMixins/editorMixin.js +92 -0
- package/dist/new-widgets/callbackMixins/editorMixin.js.map +1 -0
- package/dist/new-widgets/callbackMixins/index.js +4 -2
- package/dist/new-widgets/callbackMixins/index.js.map +1 -1
- package/dist/new-widgets/templates/formTemplatesDirectory.js +23 -8
- package/dist/new-widgets/templates/formTemplatesDirectory.js.map +1 -1
- package/dist/new-widgets/templatesDependencies/formFileMixin.js +2 -2
- package/dist/new-widgets/templatesDependencies/formFileMixin.js.map +1 -1
- package/dist/new-widgets/templatesDependencies/valueEditorMixin.js +17 -0
- package/dist/new-widgets/templatesDependencies/valueEditorMixin.js.map +1 -0
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js +4 -1
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js.map +1 -1
- package/package.json +9 -3
- package/dist/_snowpack/pkg/leaflet.js +0 -14066
- package/dist/_snowpack/pkg/leaflet.js.map +0 -1
- package/dist/_snowpack/pkg/leaflet.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/leaflet.markercluster.js +0 -2697
- package/dist/_snowpack/pkg/leaflet.markercluster.js.map +0 -1
- package/dist/_snowpack/pkg/leaflet.markercluster.js.map.proxy.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "/_snowpack/pkg/tinymce.js.map";
|
|
@@ -33,9 +33,9 @@ import { store } from '../libs/store/store.js';
|
|
|
33
33
|
import { uniqID } from '../libs/helpers.js';
|
|
34
34
|
import { spread } from '../libs/lit-helpers.js'; //@ts-ignore
|
|
35
35
|
|
|
36
|
-
import L from '
|
|
36
|
+
import L from 'https://cdn.skypack.dev/leaflet@1.7.1'; // TODO : revert to "leaflet" when apps up to date
|
|
37
37
|
|
|
38
|
-
import '
|
|
38
|
+
import 'https://cdn.skypack.dev/leaflet.markercluster@1.4.1'; // TODO : revert to "leaflet.markercluster" when apps up to date
|
|
39
39
|
|
|
40
40
|
import { html, render } from '../_snowpack/pkg/lit-html.js';
|
|
41
41
|
import { ifDefined } from '../_snowpack/pkg/lit-html/directives/if-defined.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["solid-map.ts"],"names":["Sib","ListMixin","StoreMixin","WidgetMixin","CounterMixin","FilterMixin","FederationMixin","GrouperMixin","NextMixin","store","uniqID","spread","L","html","render","ifDefined","SolidMap","name","use","attributes","clustering","type","Boolean","default","initialState","markers","subscriptions","resetPlanned","hasBeenResetOnce","created","document","body","addEventListener","setTimeout","isVisible","reset","Map","element","offsetParent","attached","id","template","div","querySelector","map","tileLayer","addTo","markersCluster","markerClusterGroup","addLayer","invalidateSize","length","fitBounds","featureGroup","getBounds","fitWorld","planReset","dispatchSelect","event","target","resource","dispatchEvent","CustomEvent","detail","goToNext","appendChildElt","resourceId","groupClass","getData","context","get","set","PubSub","subscribe","updateDOM","lat","lng","icon","divIcon","className","iconSize","iconAnchor","popupAnchor","marker","toString","on","bind","fields","bindPopup","getPopupContent","minWidth","push","attr","startsWith","value","replace","createElement","empty","removeLayer","renderGroup","groupName","sanitizedGroupName","encodeURIComponent","toLowerCase","dataset","renderDOM","resources","listPostProcessors","Promise","all","nextProcessor","shift","register"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,GAAT,QAAoB,aAApB;AACA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,UAAT,QAA2B,sBAA3B;AACA,SAASC,WAAT,QAA4B,uBAA5B;AACA,SAASC,YAAT,QAA6B,wBAA7B;AACA,SAASC,WAAT,QAA4B,uBAA5B;AACA,SAASC,eAAT,QAAgC,2BAAhC;AACA,SAASC,YAAT,QAA6B,wBAA7B;AACA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,KAAT,QAAsB,qBAAtB;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,MAAT,QAAuB,qBAAvB,C,CAEA;;AACA,OAAOC,CAAP,MAAiC,SAAjC,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oB;AAC7B,UAAMC,kBAAkB,GAAGC,kBAAkB,CAACF,SAAS,CAACG,WAAV,EAAD,CAAlB,CAA4CR,OAA5C,CAAoD,gBAApD,EAAsE,EAAtE,CAA3B;AACA,UAAMrD,GAAG,GAAGZ,QAAQ,CAACkE,aAAT,CAAuB,KAAvB,CAAZ,CAF6B,CAEc;;AAC3CtD,IAAAA,GAAG,CAAC8D,OAAJ,CAAYrC,UAAZ,GAAyB,WAAWkC,kBAApC;AACA,WAAO3D,GAAP;AACD,GAlMqB;;AAmMtB;AACF;AACA;AACA;AACA;AACA;AACA;AACE,QAAM+D,SAAN,CAAgBC,SAAhB,EAAqCC,kBAArC,EAAqEjE,GAArE,EAAuF2B,OAAvF,EAAwG;AACtG,UAAMF,UAAU,GAAGzB,GAAG,CAAC8D,OAAJ,CAAYrC,UAAZ,IAA0B,EAA7C,CADsG,CACrD;;AACjD,UAAMyC,OAAO,CAACC,GAAR,CAAYH,SAAS,CAAC9D,GAAV,CAAcgB,QAAQ,IAAI,KAAKK,cAAL,CAAoBL,QAAQ,CAAC,KAAD,CAA5B,EAAqCO,UAArC,CAA1B,CAAZ,CAAN;AACA,SAAKX,SAAL;AAEA,UAAMsD,aAAa,GAAGH,kBAAkB,CAACI,KAAnB,EAAtB;AACA,QAAGD,aAAH,EAAkB,MAAMA,aAAa,CAACJ,SAAD,EAAYC,kBAAZ,EAAgCjE,GAAhC,EAAqC2B,OAArC,CAAnB;AACnB;;AAjNqB,CAAjB;AAoNPrE,GAAG,CAACgH,QAAJ,CAAahG,QAAb","sourcesContent":["import { Sib } from '../libs/Sib';\nimport { ListMixin } from '../mixins/listMixin';\nimport { StoreMixin } from '../mixins/storeMixin';\nimport { WidgetMixin } from '../mixins/widgetMixin';\nimport { CounterMixin } from '../mixins/counterMixin';\nimport { FilterMixin } from '../mixins/filterMixin';\nimport { FederationMixin } from '../mixins/federationMixin';\nimport { GrouperMixin } from '../mixins/grouperMixin';\nimport { NextMixin } from '../mixins/nextMixin';\nimport { store } from '../libs/store/store';\nimport { uniqID } from '../libs/helpers';\nimport { spread } from '../libs/lit-helpers';\n\n//@ts-ignore\nimport L, { MarkerOptions } from 'leaflet'; // TODO : revert to \"leaflet\" when apps up to date\nimport 'leaflet.markercluster'; // TODO : revert to \"leaflet.markercluster\" when apps up to date\n\nimport { html, render } from 'lit-html';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nexport const SolidMap = {\n name: 'solid-map',\n use: [\n WidgetMixin,\n ListMixin,\n StoreMixin,\n GrouperMixin,\n CounterMixin,\n FilterMixin,\n FederationMixin,\n NextMixin,\n ],\n attributes: {\n clustering: {\n type: Boolean,\n default: null\n }\n },\n initialState: {\n markers: {\n default: null\n },\n subscriptions: null,\n resetPlanned: false,\n hasBeenResetOnce: false\n },\n created(): void {\n //@ts-ignore\n import('leaflet/dist/leaflet.css');\n //@ts-ignore\n import('../style/default-theme.css');\n //@ts-ignore\n import('leaflet.markercluster/dist/MarkerCluster.css');\n //@ts-ignore\n import('leaflet.markercluster/dist/MarkerCluster.Default.css');\n\n // reset when it becomes visible to prevent bug https://git.startinblox.com/framework/sib-core/issues/661\n document.body.addEventListener('navigate', () =>\n setTimeout(() => this.isVisible && !this.hasBeenResetOnce && this.reset())\n );\n this.markers = [];\n this.subscriptions = new Map();\n },\n get isVisible() {\n return this.element.offsetParent !== null\n },\n attached(): void {\n const id = uniqID();\n const template = html`\n <div id=${id} style=\"width:100%;height:100%;\"></div>\n `;\n render(template, this.element);\n\n const div = this.element.querySelector(`#${id}`);\n this.map = L.map(div);\n\n L.tileLayer(\n 'https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png'\n ).addTo(this.map);\n\n if (this.clustering !== null) {\n this.markersCluster = L.markerClusterGroup();\n this.map.addLayer(this.markersCluster);\n }\n },\n reset() {\n if (this.isVisible) { // reset only if visible\n this.map.invalidateSize();\n\n if (this.markers.length) {\n this.map.fitBounds(L.featureGroup(this.markers).getBounds()); // Center map on markers if some available\n } else {\n this.map.fitWorld(); // ... or on the world if not\n }\n this.hasBeenResetOnce = true;\n }\n },\n /**\n * Execute a reset only if none is planned already\n */\n planReset() {\n if (!this.resetPlanned) {\n this.resetPlanned = true;\n setTimeout(() => {\n this.reset();\n this.resetPlanned = false;\n })\n }\n },\n dispatchSelect(event: CustomEvent): void {\n const target = event.target as Element;\n const resource = target['options'].resource;\n this.element.dispatchEvent(\n new CustomEvent('resourceSelect', { detail: { resource: resource } })\n );\n this.goToNext(resource);\n },\n\n /**\n * Override listMixin method: initialize a marker on the map\n * @param resourceId: id of the resource to display\n * @param groupClass: class of the group of markers\n */\n async appendChildElt(resourceId: string, groupClass: string) {\n const resource = await store.getData(resourceId, this.context);\n if (!this.subscriptions.get(resourceId)) {\n this.subscriptions.set(resourceId, PubSub.subscribe(resourceId, () => this.updateDOM()))\n }\n if (!resource) return;\n const lat = await resource['lat'];\n const lng = await resource['lng'];\n\n if (lat && lng) {\n const icon = L.divIcon({ // create the icon, doc here: https://leafletjs.com/reference-1.6.0.html#icon\n className: 'sib-custom-marker ' + groupClass, // default class used for styling\n iconSize: [8, 8],\n iconAnchor: [12, 34],\n popupAnchor: [0,-34]\n });\n\n // create a marker, doc here: https://leafletjs.com/reference-1.6.0.html#marker\n const marker = L.marker(\n [lat.toString(), lng.toString()], \n {resource, icon} as MarkerOptions\n );\n if(this.clustering === null) marker.addTo(this.map);\n else this.markersCluster.addLayer(marker);\n marker.on('click', this.dispatchSelect.bind(this));\n\n if (this.fields !== null) { // show popups only if fields attribute\n marker.bindPopup(() => this.getPopupContent(resourceId), { minWidth: 150 }) // re-generate popup solid-display\n }\n\n this.markers.push(marker);\n }\n },\n /**\n * Generate the solid-display of the popup\n * @param resourceId: id of the popup clicked\n */\n getPopupContent(resourceId: string) {\n const attributes:{[key:string]: string} = {};\n\n for (let attr of this.element.attributes) {\n //copy widget and value attributes\n if (\n attr.name.startsWith('value-') ||\n attr.name.startsWith('label-') ||\n attr.name.startsWith('widget-') ||\n attr.name.startsWith('class-') ||\n attr.name.startsWith('multiple-') ||\n attr.name.startsWith('editable-') ||\n attr.name.startsWith('action-') ||\n attr.name.startsWith('default-') ||\n attr.name == 'extra-context'\n )\n attributes[attr.name] = attr.value;\n if (attr.name.startsWith('child-'))\n attributes[attr.name.replace(/^child-/, '')] = attr.value;\n }\n\n const div = document.createElement('div');\n const template = html`\n <solid-display\n fields=\"${ifDefined(this.fields)}\"\n data-src=\"${resourceId}\"\n ...=${spread(attributes)}\n ></solid-display>\n `;\n render(template, div);\n return div.querySelector('solid-display');\n },\n /**\n * Override widgetMixin method: empty the map\n */\n empty(): void {\n if (!this.map) return;\n if (this.markersCluster) this.map.removeLayer(this.markersCluster);\n for (let marker of this.markers) this.map.removeLayer(marker);\n if(this.clustering !== null) {\n this.markersCluster = L.markerClusterGroup();\n this.map.addLayer(this.markersCluster);\n }\n this.markers = [];\n },\n /**\n * Override groupMixin method\n * @param groupName: value of the group\n */\n renderGroup(groupName: string) {\n const sanitizedGroupName = encodeURIComponent(groupName.toLowerCase()).replace(/%[0-9A-F]{2}/gi, '');\n const div = document.createElement('div'); // used to pass group info to renderDOM\n div.dataset.groupClass = 'group-' + sanitizedGroupName;\n return div;\n },\n /**\n * Override listMixin method: display all the resources\n * @param resources\n * @param listPostProcessors\n * @param div\n * @param context\n */\n async renderDOM(resources: object[], listPostProcessors: Function[], div: HTMLElement, context: string) {\n const groupClass = div.dataset.groupClass || ''; // get the group class from the useless div element\n await Promise.all(resources.map(resource => this.appendChildElt(resource['@id'], groupClass)))\n this.planReset();\n\n const nextProcessor = listPostProcessors.shift();\n if(nextProcessor) await nextProcessor(resources, listPostProcessors, div, context);\n }\n};\n\nSib.register(SolidMap);"]}
|
|
1
|
+
{"version":3,"sources":["solid-map.ts"],"names":["Sib","ListMixin","StoreMixin","WidgetMixin","CounterMixin","FilterMixin","FederationMixin","GrouperMixin","NextMixin","store","uniqID","spread","L","html","render","ifDefined","SolidMap","name","use","attributes","clustering","type","Boolean","default","initialState","markers","subscriptions","resetPlanned","hasBeenResetOnce","created","document","body","addEventListener","setTimeout","isVisible","reset","Map","element","offsetParent","attached","id","template","div","querySelector","map","tileLayer","addTo","markersCluster","markerClusterGroup","addLayer","invalidateSize","length","fitBounds","featureGroup","getBounds","fitWorld","planReset","dispatchSelect","event","target","resource","dispatchEvent","CustomEvent","detail","goToNext","appendChildElt","resourceId","groupClass","getData","context","get","set","PubSub","subscribe","updateDOM","lat","lng","icon","divIcon","className","iconSize","iconAnchor","popupAnchor","marker","toString","on","bind","fields","bindPopup","getPopupContent","minWidth","push","attr","startsWith","value","replace","createElement","empty","removeLayer","renderGroup","groupName","sanitizedGroupName","encodeURIComponent","toLowerCase","dataset","renderDOM","resources","listPostProcessors","Promise","all","nextProcessor","shift","register"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,GAAT,QAAoB,aAApB;AACA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,UAAT,QAA2B,sBAA3B;AACA,SAASC,WAAT,QAA4B,uBAA5B;AACA,SAASC,YAAT,QAA6B,wBAA7B;AACA,SAASC,WAAT,QAA4B,uBAA5B;AACA,SAASC,eAAT,QAAgC,2BAAhC;AACA,SAASC,YAAT,QAA6B,wBAA7B;AACA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,KAAT,QAAsB,qBAAtB;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,MAAT,QAAuB,qBAAvB,C,CAEA;;AACA,OAAOC,CAAP,MAAiC,uCAAjC,C,CAA0E;;AAC1E,OAAO,qDAAP,C,CAA8D;;AAE9D,SAASC,IAAT,EAAeC,MAAf,QAA6B,UAA7B;AACA,SAASC,SAAT,QAA0B,gCAA1B;AAEA,OAAO,MAAMC,QAAQ,GAAG;AACtBC,EAAAA,IAAI,EAAE,WADgB;AAEtBC,EAAAA,GAAG,EAAE,CACHf,WADG,EAEHF,SAFG,EAGHC,UAHG,EAIHK,YAJG,EAKHH,YALG,EAMHC,W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kBAApC;AACA,WAAO3D,GAAP;AACD,GAlMqB;;AAmMtB;AACF;AACA;AACA;AACA;AACA;AACA;AACE,QAAM+D,SAAN,CAAgBC,SAAhB,EAAqCC,kBAArC,EAAqEjE,GAArE,EAAuF2B,OAAvF,EAAwG;AACtG,UAAMF,UAAU,GAAGzB,GAAG,CAAC8D,OAAJ,CAAYrC,UAAZ,IAA0B,EAA7C,CADsG,CACrD;;AACjD,UAAMyC,OAAO,CAACC,GAAR,CAAYH,SAAS,CAAC9D,GAAV,CAAcgB,QAAQ,IAAI,KAAKK,cAAL,CAAoBL,QAAQ,CAAC,KAAD,CAA5B,EAAqCO,UAArC,CAA1B,CAAZ,CAAN;AACA,SAAKX,SAAL;AAEA,UAAMsD,aAAa,GAAGH,kBAAkB,CAACI,KAAnB,EAAtB;AACA,QAAGD,aAAH,EAAkB,MAAMA,aAAa,CAACJ,SAAD,EAAYC,kBAAZ,EAAgCjE,GAAhC,EAAqC2B,OAArC,CAAnB;AACnB;;AAjNqB,CAAjB;AAoNPrE,GAAG,CAACgH,QAAJ,CAAahG,QAAb","sourcesContent":["import { Sib } from '../libs/Sib';\nimport { ListMixin } from '../mixins/listMixin';\nimport { StoreMixin } from '../mixins/storeMixin';\nimport { WidgetMixin } from '../mixins/widgetMixin';\nimport { CounterMixin } from '../mixins/counterMixin';\nimport { FilterMixin } from '../mixins/filterMixin';\nimport { FederationMixin } from '../mixins/federationMixin';\nimport { GrouperMixin } from '../mixins/grouperMixin';\nimport { NextMixin } from '../mixins/nextMixin';\nimport { store } from '../libs/store/store';\nimport { uniqID } from '../libs/helpers';\nimport { spread } from '../libs/lit-helpers';\n\n//@ts-ignore\nimport L, { MarkerOptions } from 'https://cdn.skypack.dev/leaflet@1.7.1'; // TODO : revert to \"leaflet\" when apps up to date\nimport 'https://cdn.skypack.dev/leaflet.markercluster@1.4.1'; // TODO : revert to \"leaflet.markercluster\" when apps up to date\n\nimport { html, render } from 'lit-html';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nexport const SolidMap = {\n name: 'solid-map',\n use: [\n WidgetMixin,\n ListMixin,\n StoreMixin,\n GrouperMixin,\n CounterMixin,\n FilterMixin,\n FederationMixin,\n NextMixin,\n ],\n attributes: {\n clustering: {\n type: Boolean,\n default: null\n }\n },\n initialState: {\n markers: {\n default: null\n },\n subscriptions: null,\n resetPlanned: false,\n hasBeenResetOnce: false\n },\n created(): void {\n //@ts-ignore\n import('leaflet/dist/leaflet.css');\n //@ts-ignore\n import('../style/default-theme.css');\n //@ts-ignore\n import('leaflet.markercluster/dist/MarkerCluster.css');\n //@ts-ignore\n import('leaflet.markercluster/dist/MarkerCluster.Default.css');\n\n // reset when it becomes visible to prevent bug https://git.startinblox.com/framework/sib-core/issues/661\n document.body.addEventListener('navigate', () =>\n setTimeout(() => this.isVisible && !this.hasBeenResetOnce && this.reset())\n );\n this.markers = [];\n this.subscriptions = new Map();\n },\n get isVisible() {\n return this.element.offsetParent !== null\n },\n attached(): void {\n const id = uniqID();\n const template = html`\n <div id=${id} style=\"width:100%;height:100%;\"></div>\n `;\n render(template, this.element);\n\n const div = this.element.querySelector(`#${id}`);\n this.map = L.map(div);\n\n L.tileLayer(\n 'https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png'\n ).addTo(this.map);\n\n if (this.clustering !== null) {\n this.markersCluster = L.markerClusterGroup();\n this.map.addLayer(this.markersCluster);\n }\n },\n reset() {\n if (this.isVisible) { // reset only if visible\n this.map.invalidateSize();\n\n if (this.markers.length) {\n this.map.fitBounds(L.featureGroup(this.markers).getBounds()); // Center map on markers if some available\n } else {\n this.map.fitWorld(); // ... or on the world if not\n }\n this.hasBeenResetOnce = true;\n }\n },\n /**\n * Execute a reset only if none is planned already\n */\n planReset() {\n if (!this.resetPlanned) {\n this.resetPlanned = true;\n setTimeout(() => {\n this.reset();\n this.resetPlanned = false;\n })\n }\n },\n dispatchSelect(event: CustomEvent): void {\n const target = event.target as Element;\n const resource = target['options'].resource;\n this.element.dispatchEvent(\n new CustomEvent('resourceSelect', { detail: { resource: resource } })\n );\n this.goToNext(resource);\n },\n\n /**\n * Override listMixin method: initialize a marker on the map\n * @param resourceId: id of the resource to display\n * @param groupClass: class of the group of markers\n */\n async appendChildElt(resourceId: string, groupClass: string) {\n const resource = await store.getData(resourceId, this.context);\n if (!this.subscriptions.get(resourceId)) {\n this.subscriptions.set(resourceId, PubSub.subscribe(resourceId, () => this.updateDOM()))\n }\n if (!resource) return;\n const lat = await resource['lat'];\n const lng = await resource['lng'];\n\n if (lat && lng) {\n const icon = L.divIcon({ // create the icon, doc here: https://leafletjs.com/reference-1.6.0.html#icon\n className: 'sib-custom-marker ' + groupClass, // default class used for styling\n iconSize: [8, 8],\n iconAnchor: [12, 34],\n popupAnchor: [0,-34]\n });\n\n // create a marker, doc here: https://leafletjs.com/reference-1.6.0.html#marker\n const marker = L.marker(\n [lat.toString(), lng.toString()], \n {resource, icon} as MarkerOptions\n );\n if(this.clustering === null) marker.addTo(this.map);\n else this.markersCluster.addLayer(marker);\n marker.on('click', this.dispatchSelect.bind(this));\n\n if (this.fields !== null) { // show popups only if fields attribute\n marker.bindPopup(() => this.getPopupContent(resourceId), { minWidth: 150 }) // re-generate popup solid-display\n }\n\n this.markers.push(marker);\n }\n },\n /**\n * Generate the solid-display of the popup\n * @param resourceId: id of the popup clicked\n */\n getPopupContent(resourceId: string) {\n const attributes:{[key:string]: string} = {};\n\n for (let attr of this.element.attributes) {\n //copy widget and value attributes\n if (\n attr.name.startsWith('value-') ||\n attr.name.startsWith('label-') ||\n attr.name.startsWith('widget-') ||\n attr.name.startsWith('class-') ||\n attr.name.startsWith('multiple-') ||\n attr.name.startsWith('editable-') ||\n attr.name.startsWith('action-') ||\n attr.name.startsWith('default-') ||\n attr.name == 'extra-context'\n )\n attributes[attr.name] = attr.value;\n if (attr.name.startsWith('child-'))\n attributes[attr.name.replace(/^child-/, '')] = attr.value;\n }\n\n const div = document.createElement('div');\n const template = html`\n <solid-display\n fields=\"${ifDefined(this.fields)}\"\n data-src=\"${resourceId}\"\n ...=${spread(attributes)}\n ></solid-display>\n `;\n render(template, div);\n return div.querySelector('solid-display');\n },\n /**\n * Override widgetMixin method: empty the map\n */\n empty(): void {\n if (!this.map) return;\n if (this.markersCluster) this.map.removeLayer(this.markersCluster);\n for (let marker of this.markers) this.map.removeLayer(marker);\n if(this.clustering !== null) {\n this.markersCluster = L.markerClusterGroup();\n this.map.addLayer(this.markersCluster);\n }\n this.markers = [];\n },\n /**\n * Override groupMixin method\n * @param groupName: value of the group\n */\n renderGroup(groupName: string) {\n const sanitizedGroupName = encodeURIComponent(groupName.toLowerCase()).replace(/%[0-9A-F]{2}/gi, '');\n const div = document.createElement('div'); // used to pass group info to renderDOM\n div.dataset.groupClass = 'group-' + sanitizedGroupName;\n return div;\n },\n /**\n * Override listMixin method: display all the resources\n * @param resources\n * @param listPostProcessors\n * @param div\n * @param context\n */\n async renderDOM(resources: object[], listPostProcessors: Function[], div: HTMLElement, context: string) {\n const groupClass = div.dataset.groupClass || ''; // get the group class from the useless div element\n await Promise.all(resources.map(resource => this.appendChildElt(resource['@id'], groupClass)))\n this.planReset();\n\n const nextProcessor = listPostProcessors.shift();\n if(nextProcessor) await nextProcessor(resources, listPostProcessors, div, context);\n }\n};\n\nSib.register(SolidMap);"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import tinymce from '../../_snowpack/pkg/tinymce.js';
|
|
2
|
+
import '../../_snowpack/pkg/tinymce/themes/silver.js';
|
|
3
|
+
import '../../_snowpack/pkg/tinymce/models/dom.js';
|
|
4
|
+
import '../../_snowpack/pkg/tinymce/icons/default.js';
|
|
5
|
+
import { importCSS } from '../../libs/helpers.js';
|
|
6
|
+
import { uniqID } from '../../libs/helpers.js';
|
|
7
|
+
import '../../_snowpack/pkg/tinymce/plugins/lists/plugin.js';
|
|
8
|
+
import '../../_snowpack/pkg/tinymce/plugins/link/plugin.js';
|
|
9
|
+
import '../../_snowpack/pkg/tinymce/plugins/autoresize/plugin.js';
|
|
10
|
+
import showdown from '../../_snowpack/pkg/showdown.js';
|
|
11
|
+
const EditorMixin = {
|
|
12
|
+
name: 'editor-mixin',
|
|
13
|
+
initialState: {
|
|
14
|
+
tinymce: null
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
created() {
|
|
18
|
+
importCSS('https://cdn.skypack.dev/tinymce/skins/ui/oxide/skin.css');
|
|
19
|
+
importCSS('https://cdn.skypack.dev/tinymce/skins/content/default/content.css');
|
|
20
|
+
importCSS('https://cdn.skypack.dev/tinymce/skins/ui/oxide/content.css');
|
|
21
|
+
this.tinymce = null;
|
|
22
|
+
this.listAttributes['id'] = uniqID();
|
|
23
|
+
this.listCallbacks.push(this.addCallback.bind(this));
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
addCallback(value, listCallbacks) {
|
|
27
|
+
//set value in editor (markdown format transform in html to edit it)
|
|
28
|
+
if (this.tinymce == null) {
|
|
29
|
+
const converter = new showdown.Converter();
|
|
30
|
+
const htmlValue = converter.makeHtml(this.value);
|
|
31
|
+
tinymce.init({
|
|
32
|
+
selector: '#' + this.listAttributes['id'],
|
|
33
|
+
max_height: 500,
|
|
34
|
+
min_height: 120,
|
|
35
|
+
resize: true,
|
|
36
|
+
menubar: false,
|
|
37
|
+
plugins: ['lists', 'link', 'autoresize'],
|
|
38
|
+
toolbar: 'styles | bold italic | blockquote | bullist numlist | link | removeformat',
|
|
39
|
+
style_formats: [{
|
|
40
|
+
title: 'Normal',
|
|
41
|
+
format: 'p'
|
|
42
|
+
}, {
|
|
43
|
+
title: 'Headings',
|
|
44
|
+
items: [{
|
|
45
|
+
title: 'Heading 1',
|
|
46
|
+
format: 'h1'
|
|
47
|
+
}, {
|
|
48
|
+
title: 'Heading 2',
|
|
49
|
+
format: 'h2'
|
|
50
|
+
}, {
|
|
51
|
+
title: 'Heading 3',
|
|
52
|
+
format: 'h3'
|
|
53
|
+
}, {
|
|
54
|
+
title: 'Heading 4',
|
|
55
|
+
format: 'h4'
|
|
56
|
+
}, {
|
|
57
|
+
title: 'Heading 5',
|
|
58
|
+
format: 'h5'
|
|
59
|
+
}, {
|
|
60
|
+
title: 'Heading 6',
|
|
61
|
+
format: 'h6'
|
|
62
|
+
}]
|
|
63
|
+
}],
|
|
64
|
+
//to avoid simple line break
|
|
65
|
+
setup: function (editor) {
|
|
66
|
+
editor.on('keydown', function (event) {
|
|
67
|
+
if (event.code == 'Enter' && event.shiftKey) {
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
event.stopPropagation();
|
|
70
|
+
return false;
|
|
71
|
+
} else return true;
|
|
72
|
+
});
|
|
73
|
+
editor.on('init', function () {
|
|
74
|
+
editor.setContent(htmlValue);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (this.value) {
|
|
80
|
+
const converter = new showdown.Converter();
|
|
81
|
+
const htmlValue = converter.makeHtml(this.value);
|
|
82
|
+
tinymce.get(this.listAttributes['id']).setContent(htmlValue);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const nextProcessor = listCallbacks.shift();
|
|
87
|
+
if (nextProcessor) nextProcessor(value, listCallbacks);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
};
|
|
91
|
+
export { EditorMixin };
|
|
92
|
+
//# sourceMappingURL=editorMixin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["editorMixin.ts"],"names":["tinymce","importCSS","uniqID","showdown","EditorMixin","name","initialState","created","listAttributes","listCallbacks","push","addCallback","bind","value","converter","Converter","htmlValue","makeHtml","init","selector","max_height","min_height","resize","menubar","plugins","toolbar","style_formats","title","format","items","setup","editor","on","event","code","shiftKey","preventDefault","stopPropagation","setContent","get","nextProcessor","shift"],"mappings":"AAAA,OAAOA,OAAP,MAAoB,SAApB;AACA,OAAO,uBAAP;AACA,OAAO,oBAAP;AACA,OAAO,uBAAP;AACA,SAASC,S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AAO,CAACuC,GAAR,CAAY,KAAK/B,cAAL,CAAoB,IAApB,CAAZ,EAAuC8B,UAAvC,CAAkDtB,SAAlD;AACD;AACF;;AACD,UAAMwB,aAAa,GAAG/B,aAAa,CAACgC,KAAd,EAAtB;AACA,QAAID,aAAJ,EAAmBA,aAAa,CAAC3B,KAAD,EAAQJ,aAAR,CAAb;AACpB;;AAjEiB,CAApB;AAoEA,SACEL,WADF","sourcesContent":["import tinymce from 'tinymce';\nimport 'tinymce/themes/silver';\nimport 'tinymce/models/dom';\nimport 'tinymce/icons/default';\nimport { importCSS } from '../../libs/helpers';\nimport { uniqID } from '../../libs/helpers';\n\nimport 'tinymce/plugins/lists/plugin.js';\nimport 'tinymce/plugins/link/plugin.js';\nimport 'tinymce/plugins/autoresize/plugin.js';\n\nimport showdown from 'showdown';\n\nconst EditorMixin = {\n name: 'editor-mixin',\n initialState: {\n tinymce: null,\n },\n\n created() {\n importCSS('https://cdn.skypack.dev/tinymce/skins/ui/oxide/skin.css');\n importCSS('https://cdn.skypack.dev/tinymce/skins/content/default/content.css');\n importCSS('https://cdn.skypack.dev/tinymce/skins/ui/oxide/content.css');\n this.tinymce = null;\n this.listAttributes['id'] = uniqID();\n this.listCallbacks.push(this.addCallback.bind(this));\n },\n addCallback(value: string, listCallbacks: Function[]) {\n //set value in editor (markdown format transform in html to edit it)\n\n if (this.tinymce == null) {\n const converter = new showdown.Converter();\n const htmlValue = converter.makeHtml(this.value);\n tinymce.init({\n selector: '#' + this.listAttributes['id'],\n max_height: 500,\n min_height: 120,\n resize: true,\n menubar: false,\n plugins: [\n 'lists', 'link', 'autoresize'\n ],\n toolbar: 'styles | bold italic | blockquote | bullist numlist | link | removeformat',\n style_formats: [\n { title: 'Normal', format: 'p' },\n {\n title: 'Headings', items: [\n { title: 'Heading 1', format: 'h1' },\n { title: 'Heading 2', format: 'h2' },\n { title: 'Heading 3', format: 'h3' },\n { title: 'Heading 4', format: 'h4' },\n { title: 'Heading 5', format: 'h5' },\n { title: 'Heading 6', format: 'h6' }\n ]\n }\n ],\n //to avoid simple line break\n setup: function (editor) {\n editor.on('keydown', function (event) {\n if (event.code == 'Enter' && event.shiftKey) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n } else return true;\n })\n editor.on('init', function() {\n editor.setContent(htmlValue);\n })\n }\n });\n if(this.value) {\n const converter = new showdown.Converter();\n const htmlValue = converter.makeHtml(this.value);\n tinymce.get(this.listAttributes['id']).setContent(htmlValue);\n }\n }\n const nextProcessor = listCallbacks.shift();\n if (nextProcessor) nextProcessor(value, listCallbacks);\n },\n}\n\nexport {\n EditorMixin\n}"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { AutocompletionMixin } from './autocompletionMixin.js';
|
|
2
2
|
import { RichtextMixin } from './richtextMixin.js';
|
|
3
|
+
import { EditorMixin } from './editorMixin.js';
|
|
3
4
|
const callbackDirectory = {
|
|
4
5
|
autocompletion: AutocompletionMixin,
|
|
5
|
-
richtext: RichtextMixin
|
|
6
|
+
richtext: RichtextMixin,
|
|
7
|
+
editor: EditorMixin
|
|
6
8
|
};
|
|
7
|
-
export { callbackDirectory, AutocompletionMixin, RichtextMixin };
|
|
9
|
+
export { callbackDirectory, AutocompletionMixin, RichtextMixin, EditorMixin };
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":["AutocompletionMixin","RichtextMixin","callbackDirectory","autocompletion","richtext"],"mappings":"AAAA,SAASA,mBAAT,QAAoC,uBAApC;AACA,SAASC,aAAT,QAA8B,iBAA9B;AAEA,MAAMC,iBAAiB,GAAG;AACxBC,EAAAA,cAAc,
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["AutocompletionMixin","RichtextMixin","EditorMixin","callbackDirectory","autocompletion","richtext","editor"],"mappings":"AAAA,SAASA,mBAAT,QAAoC,uBAApC;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,WAAT,QAA4B,eAA5B;AAEA,MAAMC,iBAAiB,GAAG;AACxBC,EAAAA,cAAc,EAAEJ,mBADQ;AAExBK,EAAAA,QAAQ,EAAEJ,aAFc;AAGxBK,EAAAA,MAAM,EAAEJ;AAHgB,CAA1B;AAMA,SACEC,iBADF,EAEEH,mBAFF,EAGEC,aAHF,EAIEC,WAJF","sourcesContent":["import { AutocompletionMixin } from './autocompletionMixin';\nimport { RichtextMixin } from './richtextMixin';\nimport { EditorMixin } from './editorMixin';\n\nconst callbackDirectory = {\n autocompletion: AutocompletionMixin,\n richtext: RichtextMixin,\n editor: EditorMixin\n}\n\nexport {\n callbackDirectory,\n AutocompletionMixin,\n RichtextMixin,\n EditorMixin\n}\n"]}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _templateObject30() {
|
|
2
2
|
const data = _taggedTemplateLiteral(["\n <input\n type=\"time\"\n placeholder=", "\n name=", "\n id=", "\n value=", "\n min=", "\n max=", "\n step=", "\n ?required=", "\n data-holder\n @change=", "\n />\n "]);
|
|
3
3
|
|
|
4
|
+
_templateObject30 = function () {
|
|
5
|
+
return data;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
return data;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function _templateObject29() {
|
|
12
|
+
const data = _taggedTemplateLiteral(["\n <input\n type=\"password\"\n placeholder=", "\n id=", "\n name=", "\n value=", "\n ?required=", "\n pattern=", "\n title=", "\n data-holder\n maxlength=", "\n minlength=", "\n @change=", "\n />\n "]);
|
|
13
|
+
|
|
4
14
|
_templateObject29 = function () {
|
|
5
15
|
return data;
|
|
6
16
|
};
|
|
@@ -9,7 +19,7 @@ function _templateObject29() {
|
|
|
9
19
|
}
|
|
10
20
|
|
|
11
21
|
function _templateObject28() {
|
|
12
|
-
const data = _taggedTemplateLiteral(["\n <input\n type=\"
|
|
22
|
+
const data = _taggedTemplateLiteral(["\n <input\n type=\"email\"\n placeholder=", "\n id=", "\n name=", "\n value=", "\n ?required=", "\n data-holder\n maxlength=", "\n minlength=", "\n @change=", "\n />\n "]);
|
|
13
23
|
|
|
14
24
|
_templateObject28 = function () {
|
|
15
25
|
return data;
|
|
@@ -19,7 +29,7 @@ function _templateObject28() {
|
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
function _templateObject27() {
|
|
22
|
-
const data = _taggedTemplateLiteral(["\n <input\n type=\"
|
|
32
|
+
const data = _taggedTemplateLiteral(["\n <input\n type=\"color\"\n placeholder=", "\n id=", "\n name=", "\n ?required=", "\n value=", "\n data-holder\n @change=", "\n />\n "]);
|
|
23
33
|
|
|
24
34
|
_templateObject27 = function () {
|
|
25
35
|
return data;
|
|
@@ -29,7 +39,7 @@ function _templateObject27() {
|
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
function _templateObject26() {
|
|
32
|
-
const data = _taggedTemplateLiteral(["\n <
|
|
42
|
+
const data = _taggedTemplateLiteral(["\n <textarea\n id=", "\n data-editor\n name=", "\n data-holder\n ></textarea>\n "]);
|
|
33
43
|
|
|
34
44
|
_templateObject26 = function () {
|
|
35
45
|
return data;
|
|
@@ -303,6 +313,7 @@ import { MultipleselectFormMixin } from '../templatesDependencies/multipleselect
|
|
|
303
313
|
import { RangeMixin } from '../templatesDependencies/rangeMixin.js';
|
|
304
314
|
import { FilterRangeFormMixin } from '../templatesDependencies/filterRangeFormMixin.js';
|
|
305
315
|
import { ValueRichtextMixin } from '../templatesDependencies/valueRichtextMixin.js';
|
|
316
|
+
import { ValueEditorMixin } from '../templatesDependencies/valueEditorMixin.js';
|
|
306
317
|
import { PatternMixin } from '../templatesDependencies/patternMixin.js';
|
|
307
318
|
import { FormStepMixin } from '../templatesDependencies/formStepMixin.js';
|
|
308
319
|
import { FormLengthMixin } from '../templatesDependencies/formLengthMixin.js';
|
|
@@ -377,20 +388,24 @@ export const formTemplates = {
|
|
|
377
388
|
template: (_value, attributes) => html(_templateObject25(), ifDefined(attributes.name)),
|
|
378
389
|
dependencies: [ValueRichtextMixin, FormMixin]
|
|
379
390
|
},
|
|
391
|
+
editor: {
|
|
392
|
+
template: (_value, attributes) => html(_templateObject26(), attributes.id, ifDefined(attributes.name)),
|
|
393
|
+
dependencies: [ValueEditorMixin, FormMixin]
|
|
394
|
+
},
|
|
380
395
|
color: {
|
|
381
|
-
template: (_value, attributes) => html(
|
|
396
|
+
template: (_value, attributes) => html(_templateObject27(), ifDefined(attributes.placeholder), ifDefined(attributes.id), ifDefined(attributes.name), attributes.required, ifDefined(attributes.originalValue), attributes.onChange),
|
|
382
397
|
dependencies: [FormMixin]
|
|
383
398
|
},
|
|
384
399
|
email: {
|
|
385
|
-
template: (value, attributes) => html(
|
|
400
|
+
template: (value, attributes) => html(_templateObject28(), ifDefined(attributes.placeholder), ifDefined(attributes.id), ifDefined(attributes.name), value || '', attributes.required, ifDefined(attributes.maxlength), ifDefined(attributes.minlength), attributes.onChange),
|
|
386
401
|
dependencies: [FormMixin, FormLengthMixin]
|
|
387
402
|
},
|
|
388
403
|
password: {
|
|
389
|
-
template: (value, attributes) => html(
|
|
404
|
+
template: (value, attributes) => html(_templateObject29(), ifDefined(attributes.placeholder), ifDefined(attributes.id), ifDefined(attributes.name), value || '', attributes.required, ifDefined(attributes.pattern), ifDefined(attributes.title), ifDefined(attributes.maxlength), ifDefined(attributes.minlength), attributes.onChange),
|
|
390
405
|
dependencies: [FormMixin, PatternMixin, FormLengthMixin]
|
|
391
406
|
},
|
|
392
407
|
time: {
|
|
393
|
-
template: (value, attributes) => html(
|
|
408
|
+
template: (value, attributes) => html(_templateObject30(), ifDefined(attributes.placeholder), ifDefined(attributes.name), ifDefined(attributes.id), value || '', ifDefined(attributes.min), ifDefined(attributes.max), ifDefined(attributes.step), attributes.required, attributes.onChange),
|
|
394
409
|
dependencies: [FormMixin, FormMinMaxMixin, FormStepMixin]
|
|
395
410
|
}
|
|
396
411
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["formTemplatesDirectory.ts"],"names":["FormMixin","FormCheckboxMixin","FormMinMaxMixin","FormNumberMixin","FormDropdownMixin","FormCheckboxesMixin","FormRadioMixin","FormFileMixin","MultipleFormMixin","MultipleselectFormMixin","RangeMixin","FilterRangeFormMixin","ValueRichtextMixin","PatternMixin","FormStepMixin","FormLengthMixin","html","ifDefined","formTemplates","text","template","value","attributes","placeholder","name","id","pattern","title","required","autocomplete","maxlength","minlength","onChange","dependencies","textarea","checkbox","label","date","_value","originalValue","rangedate","startValue","endValue","number","min","max","step","rangenumber","hidden","dropdown","multiple","range","map","el","selectedValue","values","includes","Object","entries","enum","key","val","radio","multicheckbox","checkboxes","orderAsc","orderDesc","children","child","index","removeItem","removeLabel","addItem","addLabel","multipleselect","file","fileValue","selectFile","resetButtonHidden","resetFile","output","image","richtext","color","email","password","time"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,SAAT,QAA0B,oCAA1B;AACA,SAASC,iBAAT,QAAkC,4CAAlC;AACA,SAASC,eAAT,QAAgC,0CAAhC;AACA,SAASC,eAAT,QAAgC,0CAAhC;AACA,SAASC,iBAAT,QAAkC,4CAAlC;AACA,SAASC,mBAAT,QAAoC,8CAApC;AACA,SAASC,cAAT,QAA+B,yCAA/B;AACA,SAASC,aAAT,QAA8B,wCAA9B;AACA,SAASC,iBAAT,QAAkC,4CAAlC;AACA,SAASC,uBAAT,QAAwC,kDAAxC;AACA,SAASC,UAAT,QAA2B,qCAA3B;AACA,SAASC,oBAAT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A9B;AAhBV;AAnYqB,CAAtB","sourcesContent":["import { FormMixin } from '../templatesDependencies/formMixin';\nimport { FormCheckboxMixin } from '../templatesDependencies/formCheckboxMixin';\nimport { FormMinMaxMixin } from '../templatesDependencies/formMinMaxMixin';\nimport { FormNumberMixin } from '../templatesDependencies/formNumberMixin';\nimport { FormDropdownMixin } from '../templatesDependencies/formDropdownMixin';\nimport { FormCheckboxesMixin } from '../templatesDependencies/formCheckboxesMixin';\nimport { FormRadioMixin } from '../templatesDependencies/formRadioMixin';\nimport { FormFileMixin } from '../templatesDependencies/formFileMixin';\nimport { MultipleFormMixin } from '../templatesDependencies/multipleFormMixin';\nimport { MultipleselectFormMixin } from '../templatesDependencies/multipleselectFormMixin';\nimport { RangeMixin } from '../templatesDependencies/rangeMixin';\nimport { FilterRangeFormMixin } from '../templatesDependencies/filterRangeFormMixin';\nimport { ValueRichtextMixin } from '../templatesDependencies/valueRichtextMixin';\nimport { PatternMixin } from '../templatesDependencies/patternMixin';\nimport { FormStepMixin } from '../templatesDependencies/formStepMixin';\nimport { FormLengthMixin } from '../templatesDependencies/formLengthMixin';\n\nimport { html } from 'lit-html';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nexport const formTemplates = {\n text: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"text\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n value=${value || ''}\n pattern=${ifDefined(attributes.pattern)}\n title=${ifDefined(attributes.title)}\n ?required=${attributes.required}\n autocomplete=${ifDefined(attributes.autocomplete)}\n data-holder\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, PatternMixin, FormLengthMixin ]\n },\n textarea: {\n template: (value: string, attributes: any) => html`\n <textarea\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n placeholder=${ifDefined(attributes.placeholder)}\n data-holder\n ?required=${attributes.required}\n autocomplete=${ifDefined(attributes.autocomplete)}\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n >${value}</textarea>\n `,\n dependencies: [ FormMixin, FormLengthMixin ]\n },\n checkbox: {\n template: (value: string, attributes: any) => html`\n <label>\n <input\n data-holder\n type=\"checkbox\"\n name=${ifDefined(attributes.name)}\n ?required=${attributes.required}\n ?checked=${value === 'true'}\n @change=${attributes.onChange}\n >\n <div>${attributes.label || attributes.name}</div>\n </label>\n `,\n dependencies: [ FormCheckboxMixin, FormMixin ]\n },\n date: {\n template: (_value: string, attributes: any) => html`\n <input\n type=\"date\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n ?required=${attributes.required}\n value=${ifDefined(attributes.originalValue)}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin ]\n },\n rangedate: {\n template: (_value: string, attributes: any) => html`\n <input\n data-holder\n type=\"date\"\n name=\"${attributes.name || ''}-start\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.startValue)}\n />\n <input\n data-holder\n type=\"date\"\n name=\"${attributes.name || ''}-end\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.endValue)}\n />\n `,\n dependencies: [ FilterRangeFormMixin, FormMixin ]\n },\n number: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"number\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n value=${value}\n min=${ifDefined(attributes.min)}\n max=${ifDefined(attributes.max)}\n step=${ifDefined(attributes.step)}\n ?required=${attributes.required}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormNumberMixin, FormMinMaxMixin, FormMixin, FormStepMixin ]\n },\n rangenumber: {\n template: (_value: string, attributes: any) => html`\n <input\n data-holder\n type=\"number\"\n name=\"${attributes.name || ''}-start\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.startValue)}\n />\n <input\n data-holder\n type=\"number\"\n name=\"${attributes.name || ''}-end\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.endValue)}\n />\n `,\n dependencies: [ FilterRangeFormMixin, FormNumberMixin, FormMixin ]\n },\n hidden: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"hidden\"\n name=${ifDefined(attributes.name)}\n value=${value}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin ]\n },\n dropdown: {\n template: (value: string, attributes: any) => html`\n <select\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n data-holder\n ?required=${attributes.required}\n ?multiple=${attributes.multiple}\n autocomplete=${ifDefined(attributes.autocomplete)}\n @change=${attributes.onChange}\n >\n ${!(attributes.multiple || attributes.autocomplete) ? html`\n <option value=\"\" ?selected=${value === \"\"}>\n ${attributes.placeholder || '-'}\n </option>\n ` : ''}\n ${(attributes.range || []).map(el => html`\n <option\n value=${el.value}\n ?selected=${!attributes.multiple ? value === el.selectedValue : attributes.values.includes(el.selectedValue)}\n >\n ${el.label}\n </option>\n `)}\n ${Object.entries(attributes.enum || []).map(([key, val]) => html`\n <option\n value=\"${key}\"\n ?selected=${!attributes.multiple ? value === key : attributes.values.includes(key)}\n >\n ${val}\n </option>\n `)}\n </select>\n `,\n dependencies: [ FormDropdownMixin, FormMixin, RangeMixin ]\n },\n radio: {\n template: (value: string, attributes: any) => html`\n <div\n name=${ifDefined(attributes.name)}\n >\n ${(attributes.range || []).map(el => html`\n <label>\n <input\n type=\"radio\"\n name=${ifDefined(attributes.id)}\n value=${el.value}\n ?required=${attributes.required}\n ?checked=${value === el.selectedValue}\n > <span>${el.label}</span>\n </label>\n `)}\n ${Object.entries(attributes.enum || []).map(([key, val]) => html`\n <label>\n <input\n type=\"radio\"\n value=\"${key}\"\n name=${ifDefined(attributes.id)}\n ?required=${attributes.required}\n ?checked=${value === key}\n > <span>${val}</span>\n </label>\n `)}\n `,\n dependencies: [ FormRadioMixin, FormMixin, RangeMixin ]\n },\n multicheckbox: {\n template: (_value: string, attributes: any) => html`\n <div\n name=${ifDefined(attributes.name)}\n >\n ${(attributes.range || []).map(el => html`\n <label>\n <input\n type=\"checkbox\"\n value=${el.value}\n ?checked=${attributes.values.includes(el.selectedValue)}\n /> <span>${el.label}</span>\n </label>\n `)}\n ${Object.entries(attributes.enum || [])\n .map(([key, val]) => html`\n <label>\n <input type=\"checkbox\"\n value=\"${key}\"\n /> <span>${val}</span>\n </label>\n `)}\n </select>\n `,\n dependencies: [ FormCheckboxesMixin, FormMixin, RangeMixin ]\n },\n checkboxes: {\n template: (_value: string, attributes: any) => html`\n <solid-form-multicheckbox\n data-holder\n name=${ifDefined(attributes.name)}\n range=${ifDefined(attributes.range)}\n enum=${ifDefined(attributes.enum)}\n values=${ifDefined(attributes.values)}\n order-asc=${ifDefined(attributes.orderAsc)}\n order-desc=${ifDefined(attributes.orderDesc)}\n ?required=${attributes.required}\n ></solid-form-multicheckbox>\n `,\n dependencies: [ MultipleselectFormMixin, FormMixin ]\n },\n multiple: {\n template: (_value: string, attributes: any) => html`\n ${(attributes.children || []).map((child, index) => html`\n <div data-index=${attributes.name + index}>\n ${child}\n <button type=\"button\" @click=${() => attributes.removeItem(index)}>${attributes.removeLabel}</button>\n </div>\n `)}\n <button type=\"button\" @click=${attributes.addItem}>${attributes.addLabel}</button>\n `,\n dependencies: [ MultipleFormMixin, FormMixin ]\n },\n multipleselect: {\n template: (_value: string, attributes: any) => html`\n <solid-form-dropdown\n data-holder\n name=${ifDefined(attributes.name)}\n data-id=${ifDefined(attributes.id)}\n range=${ifDefined(attributes.range)}\n values=${ifDefined(attributes.values)}\n order-asc=${ifDefined(attributes.orderAsc)}\n order-desc=${ifDefined(attributes.orderDesc)}\n ?required=${attributes.required}\n multiple\n ></solid-form-dropdown>\n `,\n dependencies: [ MultipleselectFormMixin, FormMixin ]\n },\n file: {\n template: (value: string, attributes: any) => html`\n <div>\n <input\n data-holder\n type=\"text\"\n ?required=${attributes.required}\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n >\n <input\n type=\"file\"\n id=${ifDefined(attributes.id)}\n value=${ifDefined(attributes.fileValue)}\n @change=${attributes.selectFile}\n />\n <button\n ?hidden=${attributes.resetButtonHidden}\n @click=${attributes.resetFile}\n >×</button>\n <span>${attributes.output}</span>\n </div>\n `,\n dependencies: [ FormFileMixin, FormMixin ]\n },\n image: {\n template: (value: string, attributes: any) => html`\n <div>\n <input\n data-holder\n type=\"text\"\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n ?required=${attributes.required}\n >\n <input\n type=\"file\"\n accept=\"image/*\"\n id=${ifDefined(attributes.id)}\n value=${ifDefined(attributes.fileValue)}\n @change=${attributes.selectFile}\n />\n <img\n src=${value || ''}\n ?hidden=${value === ''}\n />\n <button\n ?hidden=${attributes.resetButtonHidden}\n @click=${attributes.resetFile}\n >×</button>\n <span>${attributes.output}</span>\n </div>\n `,\n dependencies: [ FormFileMixin, FormMixin ]\n },\n richtext: {\n template: (_value: string, attributes: any) => html`\n <div \n data-richtext\n name=${ifDefined(attributes.name)}\n data-holder\n ></div>\n `,\n dependencies: [ ValueRichtextMixin, FormMixin ]\n },\n color: {\n template: (_value: string, attributes: any) => html`\n <input\n type=\"color\"\n placeholder=${ifDefined(attributes.placeholder)}\n id=${ifDefined(attributes.id)}\n name=${ifDefined(attributes.name)}\n ?required=${attributes.required}\n value=${ifDefined(attributes.originalValue)}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin ]\n },\n email: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"email\"\n placeholder=${ifDefined(attributes.placeholder)}\n id=${ifDefined(attributes.id)}\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n ?required=${attributes.required}\n data-holder\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, FormLengthMixin ]\n },\n password: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"password\"\n placeholder=${ifDefined(attributes.placeholder)}\n id=${ifDefined(attributes.id)}\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n ?required=${attributes.required}\n pattern=${ifDefined(attributes.pattern)}\n title=${ifDefined(attributes.title)}\n data-holder\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, PatternMixin, FormLengthMixin ]\n },\n time: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"time\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n value=${value || ''}\n min=${ifDefined(attributes.min)}\n max=${ifDefined(attributes.max)}\n step=${ifDefined(attributes.step)}\n ?required=${attributes.required}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, FormMinMaxMixin, FormStepMixin ]\n },\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["formTemplatesDirectory.ts"],"names":["FormMixin","FormCheckboxMixin","FormMinMaxMixin","FormNumberMixin","FormDropdownMixin","FormCheckboxesMixin","FormRadioMixin","FormFileMixin","MultipleFormMixin","MultipleselectFormMixin","RangeMixin","FilterRangeFormMixin","ValueRichtextMixin","ValueEditorMixin","PatternMixin","FormStepMixin","FormLengthMixin","html","ifDefined","formTemplates","text","template","value","attributes","placeholder","name","id","pattern","title","required","autocomplete","maxlength","minlength","onChange","dependencies","textarea","checkbox","label","date","_value","originalValue","rangedate","startValue","endValue","number","min","max","step","rangenumber","hidden","dropdown","multiple","range","map","el","selectedValue","values","includes","Object","entries","enum","key","val","radio","multicheckbox","checkboxes","orderAsc","orderDesc","children","child","index","removeItem","removeLabel","addItem","addLabel","multipleselect","file","fileValue","selectFile","resetButtonHidden","resetFile","output","image","richtext","editor","color","email","password","time"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAACK,UAAU,CAACC,WAAZ,CAHjB,EAIDN,SAAS,CAACK,UAAU,CAACG,EAAZ,CAJR,EAKCR,SAAS,CAACK,UAAU,CAACE,IAAZ,CALV,EAMEH,KAAK,IAAI,EANX,EAOMC,UAAU,CAACM,QAPjB,EAQIX,SAAS,CAACK,UAAU,CAACI,OAAZ,CARb,EASET,SAAS,CAACK,UAAU,CAACK,KAAZ,CATX,EAWMV,SAAS,CAACK,UAAU,CAACQ,SAAZ,CAXf,EAYMb,SAAS,CAACK,UAAU,CAACS,SAAZ,CAZf,EAaIT,UAAU,CAACU,QAbf,CADF;AAiBRC,IAAAA,YAAY,EAAE,CAAElC,SAAF,EAAac,YAAb,EAA2BE,eAA3B;AAjBN,GA3XiB;AA8Y3BwE,EAAAA,IAAI,EAAE;AACJnE,IAAAA,QAAQ,EAAE,CAACC,KAAD,EAAgBC,UAAhB,KAAoCN,IAApC,sBAGQC,SAAS,CAACK,UAAU,CAACC,WAAZ,CAHjB,EAICN,SAAS,CAACK,UAAU,CAACE,IAAZ,CAJV,EAKDP,SAAS,CAACK,UAAU,CAACG,EAAZ,CALR,EAMEJ,KAAK,IAAI,EANX,EAOAJ,SAAS,CAACK,UAAU,CAACsB,GAAZ,CAPT,EAQA3B,SAAS,CAACK,UAAU,CAACuB,GAAZ,CART,EASC5B,SAAS,CAACK,UAAU,CAACwB,IAAZ,CATV,EAUMxB,UAAU,CAACM,QAVjB,EAYIN,UAAU,CAACU,QAZf,CADN;AAgBJC,IAAAA,YAAY,EAAE,CAAElC,SAAF,EAAaE,eAAb,EAA8Ba,aAA9B;AAhBV;AA9YqB,CAAtB","sourcesContent":["import { FormMixin } from '../templatesDependencies/formMixin';\nimport { FormCheckboxMixin } from '../templatesDependencies/formCheckboxMixin';\nimport { FormMinMaxMixin } from '../templatesDependencies/formMinMaxMixin';\nimport { FormNumberMixin } from '../templatesDependencies/formNumberMixin';\nimport { FormDropdownMixin } from '../templatesDependencies/formDropdownMixin';\nimport { FormCheckboxesMixin } from '../templatesDependencies/formCheckboxesMixin';\nimport { FormRadioMixin } from '../templatesDependencies/formRadioMixin';\nimport { FormFileMixin } from '../templatesDependencies/formFileMixin';\nimport { MultipleFormMixin } from '../templatesDependencies/multipleFormMixin';\nimport { MultipleselectFormMixin } from '../templatesDependencies/multipleselectFormMixin';\nimport { RangeMixin } from '../templatesDependencies/rangeMixin';\nimport { FilterRangeFormMixin } from '../templatesDependencies/filterRangeFormMixin';\nimport { ValueRichtextMixin } from '../templatesDependencies/valueRichtextMixin';\nimport { ValueEditorMixin } from '../templatesDependencies/valueEditorMixin';\nimport { PatternMixin } from '../templatesDependencies/patternMixin';\nimport { FormStepMixin } from '../templatesDependencies/formStepMixin';\nimport { FormLengthMixin } from '../templatesDependencies/formLengthMixin';\n\nimport { html } from 'lit-html';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nexport const formTemplates = {\n text: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"text\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n value=${value || ''}\n pattern=${ifDefined(attributes.pattern)}\n title=${ifDefined(attributes.title)}\n ?required=${attributes.required}\n autocomplete=${ifDefined(attributes.autocomplete)}\n data-holder\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, PatternMixin, FormLengthMixin ]\n },\n textarea: {\n template: (value: string, attributes: any) => html`\n <textarea\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n placeholder=${ifDefined(attributes.placeholder)}\n data-holder\n ?required=${attributes.required}\n autocomplete=${ifDefined(attributes.autocomplete)}\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n >${value}</textarea>\n `,\n dependencies: [ FormMixin, FormLengthMixin ]\n },\n checkbox: {\n template: (value: string, attributes: any) => html`\n <label>\n <input\n data-holder\n type=\"checkbox\"\n name=${ifDefined(attributes.name)}\n ?required=${attributes.required}\n ?checked=${value === 'true'}\n @change=${attributes.onChange}\n >\n <div>${attributes.label || attributes.name}</div>\n </label>\n `,\n dependencies: [ FormCheckboxMixin, FormMixin ]\n },\n date: {\n template: (_value: string, attributes: any) => html`\n <input\n type=\"date\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n ?required=${attributes.required}\n value=${ifDefined(attributes.originalValue)}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin ]\n },\n rangedate: {\n template: (_value: string, attributes: any) => html`\n <input\n data-holder\n type=\"date\"\n name=\"${attributes.name || ''}-start\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.startValue)}\n />\n <input\n data-holder\n type=\"date\"\n name=\"${attributes.name || ''}-end\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.endValue)}\n />\n `,\n dependencies: [ FilterRangeFormMixin, FormMixin ]\n },\n number: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"number\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n value=${value}\n min=${ifDefined(attributes.min)}\n max=${ifDefined(attributes.max)}\n step=${ifDefined(attributes.step)}\n ?required=${attributes.required}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormNumberMixin, FormMinMaxMixin, FormMixin, FormStepMixin ]\n },\n rangenumber: {\n template: (_value: string, attributes: any) => html`\n <input\n data-holder\n type=\"number\"\n name=\"${attributes.name || ''}-start\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.startValue)}\n />\n <input\n data-holder\n type=\"number\"\n name=\"${attributes.name || ''}-end\"\n @change=${attributes.onChange}\n value=${ifDefined(attributes.endValue)}\n />\n `,\n dependencies: [ FilterRangeFormMixin, FormNumberMixin, FormMixin ]\n },\n hidden: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"hidden\"\n name=${ifDefined(attributes.name)}\n value=${value}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin ]\n },\n dropdown: {\n template: (value: string, attributes: any) => html`\n <select\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n data-holder\n ?required=${attributes.required}\n ?multiple=${attributes.multiple}\n autocomplete=${ifDefined(attributes.autocomplete)}\n @change=${attributes.onChange}\n >\n ${!(attributes.multiple || attributes.autocomplete) ? html`\n <option value=\"\" ?selected=${value === \"\"}>\n ${attributes.placeholder || '-'}\n </option>\n ` : ''}\n ${(attributes.range || []).map(el => html`\n <option\n value=${el.value}\n ?selected=${!attributes.multiple ? value === el.selectedValue : attributes.values.includes(el.selectedValue)}\n >\n ${el.label}\n </option>\n `)}\n ${Object.entries(attributes.enum || []).map(([key, val]) => html`\n <option\n value=\"${key}\"\n ?selected=${!attributes.multiple ? value === key : attributes.values.includes(key)}\n >\n ${val}\n </option>\n `)}\n </select>\n `,\n dependencies: [ FormDropdownMixin, FormMixin, RangeMixin ]\n },\n radio: {\n template: (value: string, attributes: any) => html`\n <div\n name=${ifDefined(attributes.name)}\n >\n ${(attributes.range || []).map(el => html`\n <label>\n <input\n type=\"radio\"\n name=${ifDefined(attributes.id)}\n value=${el.value}\n ?required=${attributes.required}\n ?checked=${value === el.selectedValue}\n > <span>${el.label}</span>\n </label>\n `)}\n ${Object.entries(attributes.enum || []).map(([key, val]) => html`\n <label>\n <input\n type=\"radio\"\n value=\"${key}\"\n name=${ifDefined(attributes.id)}\n ?required=${attributes.required}\n ?checked=${value === key}\n > <span>${val}</span>\n </label>\n `)}\n `,\n dependencies: [ FormRadioMixin, FormMixin, RangeMixin ]\n },\n multicheckbox: {\n template: (_value: string, attributes: any) => html`\n <div\n name=${ifDefined(attributes.name)}\n >\n ${(attributes.range || []).map(el => html`\n <label>\n <input\n type=\"checkbox\"\n value=${el.value}\n ?checked=${attributes.values.includes(el.selectedValue)}\n /> <span>${el.label}</span>\n </label>\n `)}\n ${Object.entries(attributes.enum || [])\n .map(([key, val]) => html`\n <label>\n <input type=\"checkbox\"\n value=\"${key}\"\n /> <span>${val}</span>\n </label>\n `)}\n </select>\n `,\n dependencies: [ FormCheckboxesMixin, FormMixin, RangeMixin ]\n },\n checkboxes: {\n template: (_value: string, attributes: any) => html`\n <solid-form-multicheckbox\n data-holder\n name=${ifDefined(attributes.name)}\n range=${ifDefined(attributes.range)}\n enum=${ifDefined(attributes.enum)}\n values=${ifDefined(attributes.values)}\n order-asc=${ifDefined(attributes.orderAsc)}\n order-desc=${ifDefined(attributes.orderDesc)}\n ?required=${attributes.required}\n ></solid-form-multicheckbox>\n `,\n dependencies: [ MultipleselectFormMixin, FormMixin ]\n },\n multiple: {\n template: (_value: string, attributes: any) => html`\n ${(attributes.children || []).map((child, index) => html`\n <div data-index=${attributes.name + index}>\n ${child}\n <button type=\"button\" @click=${() => attributes.removeItem(index)}>${attributes.removeLabel}</button>\n </div>\n `)}\n <button type=\"button\" @click=${attributes.addItem}>${attributes.addLabel}</button>\n `,\n dependencies: [ MultipleFormMixin, FormMixin ]\n },\n multipleselect: {\n template: (_value: string, attributes: any) => html`\n <solid-form-dropdown\n data-holder\n name=${ifDefined(attributes.name)}\n data-id=${ifDefined(attributes.id)}\n range=${ifDefined(attributes.range)}\n values=${ifDefined(attributes.values)}\n order-asc=${ifDefined(attributes.orderAsc)}\n order-desc=${ifDefined(attributes.orderDesc)}\n ?required=${attributes.required}\n multiple\n ></solid-form-dropdown>\n `,\n dependencies: [ MultipleselectFormMixin, FormMixin ]\n },\n file: {\n template: (value: string, attributes: any) => html`\n <div>\n <input\n data-holder\n type=\"text\"\n ?required=${attributes.required}\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n >\n <input\n type=\"file\"\n id=${ifDefined(attributes.id)}\n value=${ifDefined(attributes.fileValue)}\n @change=${attributes.selectFile}\n />\n <button\n ?hidden=${attributes.resetButtonHidden}\n @click=${attributes.resetFile}\n >×</button>\n <span>${attributes.output}</span>\n </div>\n `,\n dependencies: [ FormFileMixin, FormMixin ]\n },\n image: {\n template: (value: string, attributes: any) => html`\n <div>\n <input\n data-holder\n type=\"text\"\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n ?required=${attributes.required}\n >\n <input\n type=\"file\"\n accept=\"image/*\"\n id=${ifDefined(attributes.id)}\n value=${ifDefined(attributes.fileValue)}\n @change=${attributes.selectFile}\n />\n <img\n src=${value || ''}\n ?hidden=${value === ''}\n />\n <button\n ?hidden=${attributes.resetButtonHidden}\n @click=${attributes.resetFile}\n >×</button>\n <span>${attributes.output}</span>\n </div>\n `,\n dependencies: [ FormFileMixin, FormMixin ]\n },\n richtext: {\n template: (_value: string, attributes: any) => html`\n <div \n data-richtext\n name=${ifDefined(attributes.name)}\n data-holder\n ></div>\n `,\n dependencies: [ ValueRichtextMixin, FormMixin ]\n },\n editor: {\n template: (_value: string, attributes: any) => html`\n <textarea\n id=${attributes.id}\n data-editor\n name=${ifDefined(attributes.name)}\n data-holder\n ></textarea>\n `,\n dependencies: [ ValueEditorMixin, FormMixin ]\n },\n color: {\n template: (_value: string, attributes: any) => html`\n <input\n type=\"color\"\n placeholder=${ifDefined(attributes.placeholder)}\n id=${ifDefined(attributes.id)}\n name=${ifDefined(attributes.name)}\n ?required=${attributes.required}\n value=${ifDefined(attributes.originalValue)}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin ]\n },\n email: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"email\"\n placeholder=${ifDefined(attributes.placeholder)}\n id=${ifDefined(attributes.id)}\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n ?required=${attributes.required}\n data-holder\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, FormLengthMixin ]\n },\n password: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"password\"\n placeholder=${ifDefined(attributes.placeholder)}\n id=${ifDefined(attributes.id)}\n name=${ifDefined(attributes.name)}\n value=${value || ''}\n ?required=${attributes.required}\n pattern=${ifDefined(attributes.pattern)}\n title=${ifDefined(attributes.title)}\n data-holder\n maxlength=${ifDefined(attributes.maxlength)}\n minlength=${ifDefined(attributes.minlength)}\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, PatternMixin, FormLengthMixin ]\n },\n time: {\n template: (value: string, attributes: any) => html`\n <input\n type=\"time\"\n placeholder=${ifDefined(attributes.placeholder)}\n name=${ifDefined(attributes.name)}\n id=${ifDefined(attributes.id)}\n value=${value || ''}\n min=${ifDefined(attributes.min)}\n max=${ifDefined(attributes.max)}\n step=${ifDefined(attributes.step)}\n ?required=${attributes.required}\n data-holder\n @change=${attributes.onChange}\n />\n `,\n dependencies: [ FormMixin, FormMinMaxMixin, FormStepMixin ]\n },\n}\n"]}
|
|
@@ -8,7 +8,7 @@ const FormFileMixin = {
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
initialState: {
|
|
11
|
-
initialValue:
|
|
11
|
+
initialValue: ''
|
|
12
12
|
},
|
|
13
13
|
|
|
14
14
|
created() {
|
|
@@ -31,7 +31,7 @@ const FormFileMixin = {
|
|
|
31
31
|
selectFile() {
|
|
32
32
|
if (this.uploadUrl === null) return;
|
|
33
33
|
|
|
34
|
-
if (this.initialValue ===
|
|
34
|
+
if (this.initialValue === '') {
|
|
35
35
|
this.initialValue = this.value;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["formFileMixin.ts"],"names":["store","FormFileMixin","name","attributes","uploadUrl","type","String","default","initialState","initialValue","created","listAttributes","selectFile","bind","resetFile","attached","document","addEventListener","e","target","contains","element","value","planRender","filePicker","querySelector","files","length","file","formData","FormData","append","fetchAuthn","method","body","then","response","location","headers","get","catch","error","console","event","preventDefault"],"mappings":"AAAA,SAASA,KAAT,QAAsB,wBAAtB;AAEA,MAAMC,aAAa,GAAG;AACpBC,EAAAA,IAAI,EAAE,iBADc;AAEpBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,SAAS,EAAE;AACTC,MAAAA,IAAI,EAAEC,MADG;AAETC,MAAAA,OAAO,EAAE;AAFA;AADD,GAFQ;AAQpBC,EAAAA,YAAY,EAAE;AACZC,IAAAA,YAAY,EAAE;AADF,GARM;;AAWpBC,EAAAA,OAAO,GAAG;AACR,SAAKC,cAAL,CAAoB,QAApB,IAAgC,EAAhC;AACA,SAAKA,cAAL,CAAoB,mBAApB,IAA2C,IAA3C;AACA,SAAKA,cAAL,CAAoB,YAApB,IAAoC,KAAKC,UAAL,CAAgBC,IAAhB,CAAqB,IAArB,CAApC;AACA,SAAKF,cAAL,CAAoB,WAApB,IAAmC,KAAKG,SAAL,CAAeD,IAAf,CAAoB,IAApB,CAAnC;AACD,GAhBmB;;AAiBpBE,EAAAA,QAAQ,GAAG;AACTC,IAAAA,QAAQ,CAACC,gBAAT,CAA0B,OAA1B,EAAoCC,CAAD,IAAO;AACxC,UAAIA,CAAC,CAACC,MAAF,IAAaD,CAAC,CAACC,MAAH,CAA0BC,QAA1B,CAAmC,KAAKC,OAAxC,CAAhB,EAAkE;AAChE,aAAKC,KAAL,GAAa,KAAKb,YAAlB;AACA,aAAKE,cAAL,CAAoB,mBAApB,IAA2C,IAA3C;AACA,aAAKY,UAAL;AACD;AACF,KAND;AAOD,GAzBmB;;AA0BpBX,EAAAA,UAAU,GAAG;AACX,QAAI,KAAKR,SAAL,KAAmB,IAAvB,EAA6B;;AAE7B,QAAI,KAAKK,YAAL,KAAsB,
|
|
1
|
+
{"version":3,"sources":["formFileMixin.ts"],"names":["store","FormFileMixin","name","attributes","uploadUrl","type","String","default","initialState","initialValue","created","listAttributes","selectFile","bind","resetFile","attached","document","addEventListener","e","target","contains","element","value","planRender","filePicker","querySelector","files","length","file","formData","FormData","append","fetchAuthn","method","body","then","response","location","headers","get","catch","error","console","event","preventDefault"],"mappings":"AAAA,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SAAKX,cAAL,CAAoB,WAApB,IAAmC,EAAnC;AACA,SAAKA,cAAL,CAAoB,QAApB,IAAgC,EAAhC;AACA,SAAKA,cAAL,CAAoB,mBAApB,IAA2C,IAA3C,CAPe,CAQf;;AACA,SAAKY,UAAL;AACD;;AA1EmB,CAAtB;AA6EA,SACEtB,aADF","sourcesContent":["import { store } from \"../../libs/store/store\";\n\nconst FormFileMixin = {\n name: 'form-file-mixin',\n attributes: {\n uploadUrl: {\n type: String,\n default: ''\n },\n },\n initialState: {\n initialValue: ''\n },\n created() {\n this.listAttributes['output'] = '';\n this.listAttributes['resetButtonHidden'] = true;\n this.listAttributes['selectFile'] = this.selectFile.bind(this);\n this.listAttributes['resetFile'] = this.resetFile.bind(this);\n },\n attached() {\n document.addEventListener('reset', (e) => {\n if (e.target && (e.target as HTMLElement).contains(this.element)) {\n this.value = this.initialValue;\n this.listAttributes['resetButtonHidden'] = true;\n this.planRender();\n }\n })\n },\n selectFile() {\n if (this.uploadUrl === null) return;\n\n if (this.initialValue === '') {\n this.initialValue = this.value;\n }\n\n const filePicker = this.element.querySelector('input[type=\"file\"]');\n if (filePicker.files!.length < 1) return;\n\n this.listAttributes['output'] = '⏳';\n this.planRender();\n\n const file = filePicker.files![0];\n const formData = new FormData();\n formData.append('file', file);\n store.fetchAuthn(this.uploadUrl, {\n method: 'POST',\n body: formData,\n })\n .then(response => {\n const location = response.headers.get('location');\n if (location == null) {\n this.listAttributes['output'] = 'header location not found!';\n } else {\n this.value = location;\n this.listAttributes['output'] = '';\n this.listAttributes['resetButtonHidden'] = false;\n this.planRender();\n }\n })\n .catch(error => {\n this.listAttributes['fileValue'] = '';\n this.listAttributes['output'] = 'upload error';\n this.planRender();\n console.error(error);\n });\n },\n resetFile(event) {\n event.preventDefault();\n this.value = '';\n const filePicker = this.element.querySelector('input[type=\"file\"]');\n if (filePicker) filePicker.value = '';\n this.listAttributes['fileValue'] = '';\n this.listAttributes['output'] = '';\n this.listAttributes['resetButtonHidden'] = true;\n // this.input.dispatchEvent(new Event('change'));\n this.planRender();\n }\n}\n\nexport {\n FormFileMixin\n}"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import tinymce from '../../_snowpack/pkg/tinymce.js';
|
|
2
|
+
import showdown from '../../_snowpack/pkg/showdown.js';
|
|
3
|
+
const ValueEditorMixin = {
|
|
4
|
+
name: 'valueeditor-mixin',
|
|
5
|
+
|
|
6
|
+
getValue() {
|
|
7
|
+
const editor = document.getElementById(this.listAttributes['id']);
|
|
8
|
+
if (editor == null) return;
|
|
9
|
+
const converter = new showdown.Converter();
|
|
10
|
+
let markdown = converter.makeMarkdown(tinymce.get(editor.id).getContent());
|
|
11
|
+
const comment = '<!-- -->\n\n';
|
|
12
|
+
return markdown.includes(comment) ? markdown.split(comment).join("") : markdown;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
};
|
|
16
|
+
export { ValueEditorMixin };
|
|
17
|
+
//# sourceMappingURL=valueEditorMixin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["valueEditorMixin.ts"],"names":["tinymce","showdown","ValueEditorMixin","name","getValue","editor","document","getElementById","listAttributes","converter","Converter","markdown","makeMarkdown","get","id","getContent","comment","includes","split","join"],"mappings":"AAAA,OAAOA,OAAP,MAAoB,SAApB;AACA,OAAOC,QAAP,MAAqB,UAArB;AACA,MAAMC,gBAAgB,GAAG;AACvBC,EAAAA,IAAI,EAAE,mBADiB;;AAGvBC,EAAAA,QAAQ,GAAG;AACT,UAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAT,CAAwB,KAAKC,cAAL,CAAoB,IAApB,CAAxB,CAAf;AACA,QAAIH,MAAM,IAAI,IAAd,EAAoB;AACpB,UAAMI,SAAS,GAAG,IAAIR,QAAQ,CAACS,SAAb,EAAlB;AACA,QAAIC,QAAQ,GAAGF,SAAS,CAACG,YAAV,CAAuBZ,OAAO,CAACa,GAAR,CAAYR,MAAM,CAACS,EAAnB,EAAuBC,UAAvB,EAAvB,CAAf;AACA,UAAMC,OAAO,GAAG,cAAhB;AACA,WAAOL,QAAQ,CAACM,QAAT,CAAkBD,OAAlB,IAA6BL,QAAQ,CAACO,KAAT,CAAeF,OAAf,EAAwBG,IAAxB,CAA6B,EAA7B,CAA7B,GAAgER,QAAvE;AACD;;AAVsB,CAAzB;AAaA,SACET,gBADF","sourcesContent":["import tinymce from 'tinymce';\nimport showdown from 'showdown';\nconst ValueEditorMixin = {\n name: 'valueeditor-mixin',\n\n getValue() {\n const editor = document.getElementById(this.listAttributes['id']);\n if (editor == null) return;\n const converter = new showdown.Converter();\n let markdown = converter.makeMarkdown(tinymce.get(editor.id).getContent());\n const comment = '<!-- -->\\n\\n';\n return markdown.includes(comment) ? markdown.split(comment).join(\"\") : markdown\n },\n}\n\nexport {\n ValueEditorMixin\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["markdownMixin.ts"],"names":["unsafeHTML","markdownit","MarkdownMixin","name","created","listValueTransformations","push","transformValue","bind","value","newValue","md","html","render","nextProcessor","shift"],"mappings":"AAAA,SAASA,UAAT,QAA2B,iCAA3B;AAEA,OAAOC,UAAP,MAAuB,aAAvB;AAEA,MAAMC,aAAa,GAAG;AACpBC,EAAAA,IAAI,EAAE,gBADc;;AAEpBC,EAAAA,OAAO,GAAG;AACR,SAAKC,wBAAL,CAA8BC,IAA9B,CAAmC,KAAKC,cAAL,CAAoBC,IAApB,CAAyB,IAAzB,CAAnC;AACD,GAJmB;;AAKpBD,EAAAA,cAAc,CAACE,KAAD,EAAgBJ,wBAAhB,EAAsD;AAClE,QAAIK,QAAa,GAAG,EAApB;;AACA,QAAID,KAAJ,EAAW;AACT,YAAME,EAAE,GAAGV,UAAU,
|
|
1
|
+
{"version":3,"sources":["markdownMixin.ts"],"names":["unsafeHTML","markdownit","MarkdownMixin","name","created","listValueTransformations","push","transformValue","bind","value","newValue","md","breaks","html","render","nextProcessor","shift"],"mappings":"AAAA,SAASA,UAAT,QAA2B,iCAA3B;AAEA,OAAOC,UAAP,MAAuB,aAAvB;AAEA,MAAMC,aAAa,GAAG;AACpBC,EAAAA,IAAI,EAAE,gBADc;;AAEpBC,EAAAA,OAAO,GAAG;AACR,SAAKC,wBAAL,CAA8BC,IAA9B,CAAmC,KAAKC,cAAL,CAAoBC,IAApB,CAAyB,IAAzB,CAAnC;AACD,GAJmB;;AAKpBD,EAAAA,cAAc,CAACE,KAAD,EAAgBJ,wBAAhB,EAAsD;AAClE,QAAIK,QAAa,GAAG,EAApB;;AACA,QAAID,KAAJ,EAAW;AACT,YAAME,EAAE,GAAGV,UAAU,CAAC;AACpBW,QAAAA,MAAM,EAAE,IADY;AAEpBC,QAAAA,IAAI,EAAE;AAFc,OAAD,CAArB;AAKA,YAAMA,IAAI,GAAGF,EAAE,CAACG,MAAH,CAAUL,KAAV,CAAb;AACAC,MAAAA,QAAQ,GAAGV,UAAU,CAACa,IAAD,CAArB;AACD;;AAED,UAAME,aAAa,GAAGV,wBAAwB,CAACW,KAAzB,EAAtB;AACA,QAAGD,aAAH,EAAkBA,aAAa,CAACL,QAAD,EAAWL,wBAAX,CAAb;AACnB;;AAnBmB,CAAtB;AAsBA,SACEH,aADF","sourcesContent":["import { unsafeHTML } from 'lit-html/directives/unsafe-html';\n\nimport markdownit from 'markdown-it';\n\nconst MarkdownMixin = {\n name: 'markdown-mixin',\n created() {\n this.listValueTransformations.push(this.transformValue.bind(this));\n },\n transformValue(value: string, listValueTransformations: Function[]) {\n let newValue: any = '';\n if (value) {\n const md = markdownit({\n breaks: true,\n html: false\n });\n\n const html = md.render(value);\n newValue = unsafeHTML(html);\n }\n\n const nextProcessor = listValueTransformations.shift();\n if(nextProcessor) nextProcessor(newValue, listValueTransformations);\n }\n}\n\nexport {\n MarkdownMixin\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startinblox/core",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.26",
|
|
4
4
|
"description": "This is a series of web component respecting both the web components standards and the Linked Data Platform convention.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"babel-plugin-remove-import-js-extension": "0.0.3",
|
|
84
84
|
"body-parser": "^1.19.0",
|
|
85
85
|
"cypress": "^6.6.0",
|
|
86
|
+
"cypress-iframe": "^1.0.1",
|
|
86
87
|
"cypress-plugin-tab": "^1.0.5",
|
|
87
88
|
"delta-markdown-for-quill": "0.0.9",
|
|
88
89
|
"dialog-polyfill": "^0.5.6",
|
|
@@ -91,8 +92,8 @@
|
|
|
91
92
|
"find-free-port": "^2.0.0",
|
|
92
93
|
"fuse.js": "^6.4.6",
|
|
93
94
|
"jsonld-context-parser": "^1.3.4",
|
|
94
|
-
"leaflet": "
|
|
95
|
-
"leaflet.markercluster": "
|
|
95
|
+
"leaflet": "1.7.1",
|
|
96
|
+
"leaflet.markercluster": "1.4.1",
|
|
96
97
|
"lit-html": "^1.3.0",
|
|
97
98
|
"markdown-it": "^12.0.4",
|
|
98
99
|
"pubsub-js": "^1.9.2",
|
|
@@ -105,5 +106,10 @@
|
|
|
105
106
|
"tui-calendar": "^1.13.0",
|
|
106
107
|
"typescript": "^4.1.3",
|
|
107
108
|
"wait-on": "^5.2.1"
|
|
109
|
+
},
|
|
110
|
+
"dependencies": {
|
|
111
|
+
"cors": "^2.8.5",
|
|
112
|
+
"showdown": "^2.1.0",
|
|
113
|
+
"tinymce": "^6.0.2"
|
|
108
114
|
}
|
|
109
115
|
}
|