@startinblox/core 0.17.21-beta.9 → 0.17.22
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/package.json +2 -2
- package/dist/_snowpack/env.js +0 -3
- package/dist/_snowpack/pkg/autolinker.js +0 -4281
- package/dist/_snowpack/pkg/autolinker.js.map +0 -1
- package/dist/_snowpack/pkg/autolinker.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js +0 -377
- package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js.map +0 -1
- package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js +0 -22
- package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map +0 -1
- package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/decode-a4c334cf.js +0 -216
- package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map +0 -1
- package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/lit-html-babd44cd.js +0 -1119
- package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map +0 -1
- package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js +0 -25677
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map +0 -1
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/dialog-polyfill.js +0 -859
- package/dist/_snowpack/pkg/dialog-polyfill.js.map +0 -1
- package/dist/_snowpack/pkg/dialog-polyfill.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/fusejs.js +0 -1783
- package/dist/_snowpack/pkg/fusejs.js.map +0 -1
- package/dist/_snowpack/pkg/fusejs.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/import-map.json +0 -23
- package/dist/_snowpack/pkg/jsonld-context-parser.js +0 -804
- package/dist/_snowpack/pkg/jsonld-context-parser.js.map +0 -1
- package/dist/_snowpack/pkg/jsonld-context-parser.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/leaflet/dist/leaflet.css +0 -640
- package/dist/_snowpack/pkg/leaflet/dist/leaflet.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css +0 -60
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css +0 -14
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js +0 -40
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js +0 -46
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/until.js +0 -88
- package/dist/_snowpack/pkg/lit-html/directives/until.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/until.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/lit-html.js +0 -92
- package/dist/_snowpack/pkg/lit-html.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/markdown-it.js +0 -11860
- package/dist/_snowpack/pkg/markdown-it.js.map +0 -1
- package/dist/_snowpack/pkg/markdown-it.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/quill/dist/quill.snow.css +0 -945
- package/dist/_snowpack/pkg/quill/dist/quill.snow.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js +0 -1029
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map +0 -1
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/quill.js +0 -13382
- package/dist/_snowpack/pkg/quill.js.map +0 -1
- package/dist/_snowpack/pkg/quill.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/slim-select.js +0 -4
- package/dist/_snowpack/pkg/slim-select.js.map +0 -1
- package/dist/_snowpack/pkg/slim-select.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css +0 -1164
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/tui-calendar.js +0 -42285
- package/dist/_snowpack/pkg/tui-calendar.js.map +0 -1
- package/dist/_snowpack/pkg/tui-calendar.js.map.proxy.js +0 -1
- package/dist/components/solid-ac-checker.js +0 -51
- package/dist/components/solid-ac-checker.js.map +0 -1
- package/dist/components/solid-calendar.js +0 -87
- package/dist/components/solid-calendar.js.map +0 -1
- package/dist/components/solid-delete.js +0 -111
- package/dist/components/solid-delete.js.map +0 -1
- package/dist/components/solid-display.js +0 -194
- package/dist/components/solid-display.js.map +0 -1
- package/dist/components/solid-form-search.js +0 -226
- package/dist/components/solid-form-search.js.map +0 -1
- package/dist/components/solid-form.js +0 -354
- package/dist/components/solid-form.js.map +0 -1
- package/dist/components/solid-lang.js +0 -46
- package/dist/components/solid-lang.js.map +0 -1
- package/dist/components/solid-map.js +0 -242
- package/dist/components/solid-map.js.map +0 -1
- package/dist/components/solid-table.js +0 -263
- package/dist/components/solid-table.js.map +0 -1
- package/dist/components/solid-widget.js +0 -94
- package/dist/components/solid-widget.js.map +0 -1
- package/dist/import.css +0 -4
- package/dist/index.js +0 -43
- package/dist/index.js.map +0 -1
- package/dist/libs/Component.js +0 -19
- package/dist/libs/Component.js.map +0 -1
- package/dist/libs/ComponentFactory.js +0 -196
- package/dist/libs/ComponentFactory.js.map +0 -1
- package/dist/libs/Compositor.js +0 -103
- package/dist/libs/Compositor.js.map +0 -1
- package/dist/libs/Sib.js +0 -58
- package/dist/libs/Sib.js.map +0 -1
- package/dist/libs/filter.js +0 -214
- package/dist/libs/filter.js.map +0 -1
- package/dist/libs/helpers.js +0 -219
- package/dist/libs/helpers.js.map +0 -1
- package/dist/libs/interfaces.js +0 -6
- package/dist/libs/interfaces.js.map +0 -1
- package/dist/libs/lit-helpers.js +0 -169
- package/dist/libs/lit-helpers.js.map +0 -1
- package/dist/libs/polyfills.js +0 -40
- package/dist/libs/polyfills.js.map +0 -1
- package/dist/libs/store/store.js +0 -863
- package/dist/libs/store/store.js.map +0 -1
- package/dist/locales/en.json +0 -10
- package/dist/locales/en.json.proxy.js +0 -2
- package/dist/locales/fr.json +0 -10
- package/dist/locales/fr.json.proxy.js +0 -2
- package/dist/mixins/attributeBinderMixin.js +0 -124
- package/dist/mixins/attributeBinderMixin.js.map +0 -1
- package/dist/mixins/contextMixin.js +0 -28
- package/dist/mixins/contextMixin.js.map +0 -1
- package/dist/mixins/counterMixin.js +0 -75
- package/dist/mixins/counterMixin.js.map +0 -1
- package/dist/mixins/federationMixin.js +0 -63
- package/dist/mixins/federationMixin.js.map +0 -1
- package/dist/mixins/filterMixin.js +0 -136
- package/dist/mixins/filterMixin.js.map +0 -1
- package/dist/mixins/grouperMixin.js +0 -80
- package/dist/mixins/grouperMixin.js.map +0 -1
- package/dist/mixins/highlighterMixin.js +0 -42
- package/dist/mixins/highlighterMixin.js.map +0 -1
- package/dist/mixins/interfaces.js +0 -8
- package/dist/mixins/interfaces.js.map +0 -1
- package/dist/mixins/listMixin.js +0 -136
- package/dist/mixins/listMixin.js.map +0 -1
- package/dist/mixins/nextMixin.js +0 -26
- package/dist/mixins/nextMixin.js.map +0 -1
- package/dist/mixins/paginateMixin.js +0 -110
- package/dist/mixins/paginateMixin.js.map +0 -1
- package/dist/mixins/requiredMixin.js +0 -34
- package/dist/mixins/requiredMixin.js.map +0 -1
- package/dist/mixins/sorterMixin.js +0 -149
- package/dist/mixins/sorterMixin.js.map +0 -1
- package/dist/mixins/storeMixin.js +0 -102
- package/dist/mixins/storeMixin.js.map +0 -1
- package/dist/mixins/translationMixin.js +0 -68
- package/dist/mixins/translationMixin.js.map +0 -1
- package/dist/mixins/validationMixin.js +0 -113
- package/dist/mixins/validationMixin.js.map +0 -1
- package/dist/mixins/widgetMixin.js +0 -447
- package/dist/mixins/widgetMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/actionMixin.js +0 -14
- package/dist/new-widgets/attributeMixins/actionMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/blankMixin.js +0 -10
- package/dist/new-widgets/attributeMixins/blankMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/booleanMixin.js +0 -10
- package/dist/new-widgets/attributeMixins/booleanMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/index.js +0 -20
- package/dist/new-widgets/attributeMixins/index.js.map +0 -1
- package/dist/new-widgets/attributeMixins/mailtoMixin.js +0 -10
- package/dist/new-widgets/attributeMixins/mailtoMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/multipleMixin.js +0 -28
- package/dist/new-widgets/attributeMixins/multipleMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/numberMixin.js +0 -10
- package/dist/new-widgets/attributeMixins/numberMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/placeholderMixin.js +0 -19
- package/dist/new-widgets/attributeMixins/placeholderMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/telMixin.js +0 -10
- package/dist/new-widgets/attributeMixins/telMixin.js.map +0 -1
- package/dist/new-widgets/baseWidgetMixin.js +0 -122
- package/dist/new-widgets/baseWidgetMixin.js.map +0 -1
- package/dist/new-widgets/callbackMixins/autocompletionMixin.js +0 -104
- package/dist/new-widgets/callbackMixins/autocompletionMixin.js.map +0 -1
- package/dist/new-widgets/callbackMixins/index.js +0 -8
- package/dist/new-widgets/callbackMixins/index.js.map +0 -1
- package/dist/new-widgets/callbackMixins/richtextMixin.js +0 -42
- package/dist/new-widgets/callbackMixins/richtextMixin.js.map +0 -1
- package/dist/new-widgets/callbackMixins/slimselect.css +0 -2
- package/dist/new-widgets/callbackMixins/slimselect.css.proxy.js +0 -10
- package/dist/new-widgets/new-widget-factory.js +0 -96
- package/dist/new-widgets/new-widget-factory.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/addableMixin.js +0 -41
- package/dist/new-widgets/templateAdditionMixins/addableMixin.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/index.js +0 -14
- package/dist/new-widgets/templateAdditionMixins/index.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js +0 -29
- package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/labelMixin.js +0 -31
- package/dist/new-widgets/templateAdditionMixins/labelMixin.js.map +0 -1
- package/dist/new-widgets/templates/defaultTemplatesDirectory.js +0 -36
- package/dist/new-widgets/templates/defaultTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/displayTemplatesDirectory.js +0 -90
- package/dist/new-widgets/templates/displayTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/formTemplatesDirectory.js +0 -397
- package/dist/new-widgets/templates/formTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/groupTemplatesDirectory.js +0 -21
- package/dist/new-widgets/templates/groupTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/index.js +0 -7
- package/dist/new-widgets/templates/index.js.map +0 -1
- package/dist/new-widgets/templates/setTemplatesDirectory.js +0 -49
- package/dist/new-widgets/templates/setTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/altMixin.js +0 -13
- package/dist/new-widgets/templatesDependencies/altMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/editableMixin.js +0 -77
- package/dist/new-widgets/templatesDependencies/editableMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js +0 -38
- package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js +0 -14
- package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js +0 -51
- package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formDropdownMixin.js +0 -66
- package/dist/new-widgets/templatesDependencies/formDropdownMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formFileMixin.js +0 -81
- package/dist/new-widgets/templatesDependencies/formFileMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formLengthMixin.js +0 -19
- package/dist/new-widgets/templatesDependencies/formLengthMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js +0 -19
- package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formMixin.js +0 -66
- package/dist/new-widgets/templatesDependencies/formMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formNumberMixin.js +0 -14
- package/dist/new-widgets/templatesDependencies/formNumberMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formRadioMixin.js +0 -16
- package/dist/new-widgets/templatesDependencies/formRadioMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formStepMixin.js +0 -13
- package/dist/new-widgets/templatesDependencies/formStepMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/linkTextMixin.js +0 -14
- package/dist/new-widgets/templatesDependencies/linkTextMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/multipleFormMixin.js +0 -125
- package/dist/new-widgets/templatesDependencies/multipleFormMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js +0 -74
- package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/patternMixin.js +0 -19
- package/dist/new-widgets/templatesDependencies/patternMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/rangeMixin.js +0 -110
- package/dist/new-widgets/templatesDependencies/rangeMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/setMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/setMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js +0 -18
- package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/dateMixin.js +0 -35
- package/dist/new-widgets/valueTransformationMixins/dateMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js +0 -16
- package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/index.js +0 -16
- package/dist/new-widgets/valueTransformationMixins/index.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js +0 -25
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/multilineMixin.js +0 -17
- package/dist/new-widgets/valueTransformationMixins/multilineMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/oembedMixin.js +0 -27
- package/dist/new-widgets/valueTransformationMixins/oembedMixin.js.map +0 -1
- package/dist/solid-template-element.js +0 -164
- package/dist/solid-template-element.js.map +0 -1
- package/dist/style/default-theme.css +0 -24
- package/dist/style/default-theme.css.proxy.js +0 -10
- package/dist/widgets/baseWidget.js +0 -332
- package/dist/widgets/baseWidget.js.map +0 -1
- package/dist/widgets/widget-factory.js +0 -24
- package/dist/widgets/widget-factory.js.map +0 -1
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function _templateObject() {
|
|
2
|
-
const data = _taggedTemplateLiteral(["\n <span>", "</span>\n <div data-content></div>\n "]);
|
|
3
|
-
|
|
4
|
-
_templateObject = function () {
|
|
5
|
-
return data;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return data;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
|
|
13
|
-
import { html } from '../../_snowpack/pkg/lit-html.js';
|
|
14
|
-
import { SetMixin } from '../templatesDependencies/setMixin.js';
|
|
15
|
-
export const groupTemplates = {
|
|
16
|
-
default: {
|
|
17
|
-
template: value => html(_templateObject(), value),
|
|
18
|
-
dependencies: [SetMixin]
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=groupTemplatesDirectory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["groupTemplatesDirectory.ts"],"names":["html","SetMixin","groupTemplates","default","template","value","dependencies"],"mappings":";;;;;;;;;;;;AAAA,SAASA,IAAT,QAAqB,UAArB;AACA,SAASC,QAAT,QAAyB,mCAAzB;AAEA,OAAO,MAAMC,cAAc,GAAG;AAC5BC,EAAAA,OAAO,EAAE;AACPC,IAAAA,QAAQ,EAAGC,KAAD,IAAmBL,IAAnB,oBACAK,KADA,CADH;AAKPC,IAAAA,YAAY,EAAE,CAACL,QAAD;AALP;AADmB,CAAvB","sourcesContent":["import { html } from 'lit-html';\nimport { SetMixin } from '../templatesDependencies/setMixin';\n\nexport const groupTemplates = {\n default: {\n template: (value: string) => html`\n <span>${value}</span>\n <div data-content></div>\n `,\n dependencies: [SetMixin]\n },\n}"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { defaultTemplates } from './defaultTemplatesDirectory.js';
|
|
2
|
-
import { displayTemplates } from './displayTemplatesDirectory.js';
|
|
3
|
-
import { formTemplates } from './formTemplatesDirectory.js';
|
|
4
|
-
import { setTemplates } from './setTemplatesDirectory.js';
|
|
5
|
-
import { groupTemplates } from './groupTemplatesDirectory.js';
|
|
6
|
-
export { defaultTemplates, displayTemplates, formTemplates, setTemplates, groupTemplates };
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":["defaultTemplates","displayTemplates","formTemplates","setTemplates","groupTemplates"],"mappings":"AAAA,SAASA,gBAAT,QAAiC,6BAAjC;AACA,SAASC,gBAAT,QAAiC,6BAAjC;AACA,SAASC,aAAT,QAA8B,0BAA9B;AACA,SAASC,YAAT,QAA6B,yBAA7B;AACA,SAASC,cAAT,QAA+B,8BAA/B;AAEA,SACEJ,gBADF,EAEEC,gBAFF,EAGEC,aAHF,EAIEC,YAJF,EAKEC,cALF","sourcesContent":["import { defaultTemplates } from './defaultTemplatesDirectory';\nimport { displayTemplates } from './displayTemplatesDirectory';\nimport { formTemplates } from './formTemplatesDirectory';\nimport { setTemplates } from './setTemplatesDirectory';\nimport { groupTemplates } from './groupTemplatesDirectory.js';\n\nexport {\n defaultTemplates,\n displayTemplates,\n formTemplates,\n setTemplates,\n groupTemplates\n}\n"]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
function _templateObject3() {
|
|
2
|
-
const data = _taggedTemplateLiteral(["<ul data-content></ul>"]);
|
|
3
|
-
|
|
4
|
-
_templateObject3 = function () {
|
|
5
|
-
return data;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return data;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function _templateObject2() {
|
|
12
|
-
const data = _taggedTemplateLiteral(["<div data-content></div>"]);
|
|
13
|
-
|
|
14
|
-
_templateObject2 = function () {
|
|
15
|
-
return data;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return data;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function _templateObject() {
|
|
22
|
-
const data = _taggedTemplateLiteral([""]);
|
|
23
|
-
|
|
24
|
-
_templateObject = function () {
|
|
25
|
-
return data;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
return data;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
32
|
-
|
|
33
|
-
import { html } from '../../_snowpack/pkg/lit-html.js';
|
|
34
|
-
import { SetMixin } from '../templatesDependencies/setMixin.js';
|
|
35
|
-
export const setTemplates = {
|
|
36
|
-
default: {
|
|
37
|
-
template: () => html(_templateObject()),
|
|
38
|
-
dependencies: [SetMixin]
|
|
39
|
-
},
|
|
40
|
-
div: {
|
|
41
|
-
template: () => html(_templateObject2()),
|
|
42
|
-
dependencies: [SetMixin]
|
|
43
|
-
},
|
|
44
|
-
ul: {
|
|
45
|
-
template: () => html(_templateObject3()),
|
|
46
|
-
dependencies: [SetMixin]
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=setTemplatesDirectory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["setTemplatesDirectory.ts"],"names":["html","SetMixin","setTemplates","default","template","dependencies","div","ul"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,IAAT,QAAqB,UAArB;AACA,SAASC,QAAT,QAAyB,mCAAzB;AAEA,OAAO,MAAMC,YAAY,GAAG;AAC1BC,EAAAA,OAAO,EAAE;AACPC,IAAAA,QAAQ,EAAE,MAAMJ,IAAN,mBADH;AAEPK,IAAAA,YAAY,EAAE,CAAEJ,QAAF;AAFP,GADiB;AAK1BK,EAAAA,GAAG,EAAE;AACHF,IAAAA,QAAQ,EAAE,MAAMJ,IAAN,oBADP;AAEHK,IAAAA,YAAY,EAAE,CAAEJ,QAAF;AAFX,GALqB;AAS1BM,EAAAA,EAAE,EAAE;AACFH,IAAAA,QAAQ,EAAE,MAAMJ,IAAN,oBADR;AAEFK,IAAAA,YAAY,EAAE,CAAEJ,QAAF;AAFZ;AATsB,CAArB","sourcesContent":["import { html } from 'lit-html';\nimport { SetMixin } from '../templatesDependencies/setMixin';\n\nexport const setTemplates = {\n default: {\n template: () => html``,\n dependencies: [ SetMixin ]\n },\n div: {\n template: () => html`<div data-content></div>`,\n dependencies: [ SetMixin ]\n },\n ul: {\n template: () => html`<ul data-content></ul>`,\n dependencies: [ SetMixin ]\n }\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["altMixin.ts"],"names":["AltMixin","name","attributes","alt","type","String","callback","newValue","addToAttributes"],"mappings":"AAAA,MAAMA,QAAQ,GAAG;AACfC,EAAAA,IAAI,EAAE,WADS;AAEfC,EAAAA,UAAU,EAAG;AACXC,IAAAA,GAAG,EAAG;AACJC,MAAAA,IAAI,EAAEC,MADF;AAEJC,MAAAA,QAAQ,EAAE,UAAUC,QAAV,EAA4B;AACpC,aAAKC,eAAL,CAAqBD,QAArB,EAA+B,KAA/B;AACD;AAJG;AADK;AAFE,CAAjB;AAYA,SACEP,QADF","sourcesContent":["const AltMixin = {\n name: 'alt-mixin',\n attributes : {\n alt : {\n type: String,\n callback: function (newValue: string) {\n this.addToAttributes(newValue, 'alt')\n }\n },\n },\n}\n\nexport {\n AltMixin\n}"]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
function _templateObject() {
|
|
2
|
-
const data = _taggedTemplateLiteral(["\n ", "\n <button @click=", ">Modifier</button>\n "]);
|
|
3
|
-
|
|
4
|
-
_templateObject = function () {
|
|
5
|
-
return data;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return data;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
|
|
13
|
-
import { StoreMixin } from '../../mixins/storeMixin.js';
|
|
14
|
-
import { store } from '../../libs/store/store.js';
|
|
15
|
-
import { html } from '../../_snowpack/pkg/lit-html.js';
|
|
16
|
-
const EditableMixin = {
|
|
17
|
-
name: 'editable-mixin',
|
|
18
|
-
use: [StoreMixin],
|
|
19
|
-
// used to get context
|
|
20
|
-
attributes: {
|
|
21
|
-
editable: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: null,
|
|
24
|
-
callback: function (newValue) {
|
|
25
|
-
if (newValue !== null) this.listAttributes['editable'] = true;
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
valueId: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: ''
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
created() {
|
|
35
|
-
this.listTemplateAdditions.push(this.addEditButton.bind(this));
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
addEditButton(template, listTemplateAdditions) {
|
|
39
|
-
let newTemplate = null;
|
|
40
|
-
|
|
41
|
-
if (this.editable !== null) {
|
|
42
|
-
newTemplate = html(_templateObject(), template, this.activateEditableField.bind(this));
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const nextProcessor = listTemplateAdditions.shift();
|
|
46
|
-
if (nextProcessor) nextProcessor(newTemplate || template, listTemplateAdditions);
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
activateEditableField(e) {
|
|
50
|
-
const editableField = this.element.querySelector('[data-editable]');
|
|
51
|
-
const editButton = e.target; // Set attributes
|
|
52
|
-
|
|
53
|
-
editableField.toggleAttribute('contenteditable', true);
|
|
54
|
-
editableField.focus();
|
|
55
|
-
editButton.toggleAttribute('disabled', true); // Save on focusout
|
|
56
|
-
|
|
57
|
-
editableField.addEventListener('focusout', () => this.save(editableField, editButton));
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
save(editableField, editButton) {
|
|
61
|
-
editableField.toggleAttribute('contenteditable', false);
|
|
62
|
-
editButton.removeAttribute('disabled');
|
|
63
|
-
|
|
64
|
-
if (!this.name || !this.valueId) {
|
|
65
|
-
console.warn('Some attributes are missing to perform the update');
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const resource = {};
|
|
70
|
-
resource[this.name] = editableField.innerText;
|
|
71
|
-
resource['@context'] = this.context;
|
|
72
|
-
store.patch(resource, this.valueId);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
};
|
|
76
|
-
export { EditableMixin };
|
|
77
|
-
//# sourceMappingURL=editableMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["editableMixin.ts"],"names":["StoreMixin","store","html","EditableMixin","name","use","attributes","editable","type","Boolean","default","callback","newValue","listAttributes","valueId","String","created","listTemplateAdditions","push","addEditButton","bind","template","newTemplate","activateEditableField","nextProcessor","shift","e","editableField","element","querySelector","editButton","target","toggleAttribute","focus","addEventListener","save","removeAttribute","console","warn","resource","innerText","context","patch"],"mappings":";;;;;;;;;;;;AAAA,SAASA,UAAT,QAA2B,yBAA3B;AACA,SAASC,KAAT,QAAsB,wBAAtB;AAEA,SAASC,IAAT,QAAqB,UAArB;AAEA,MAAMC,aAAa,GAAG;AACpBC,EAAAA,IAAI,EAAE,gBADc;AAEpBC,EAAAA,GAAG,EAAE,CAAEL,UAAF,CAFe;AAEC;AACrBM,EAAAA,UAAU,EAAE;AACVC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAEC,OADE;AAERC,MAAAA,OAAO,EAAE,IAFD;AAGRC,MAAAA,QAAQ,EAAE,UAAUC,QAAV,EAA6B;AACrC,YAAIA,QAAQ,KAAK,IAAjB,EAAuB,KAAKC,cAAL,CAAoB,UAApB,IAAkC,IAAlC;AACxB;AALO,KADA;AAQVC,IAAAA,OAAO,EAAE;AACPN,MAAAA,IAAI,EAAEO,MADC;AAEPL,M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I,CAAC,KAAKhC,IAAN,IAAc,CAAC,KAAKU,OAAxB,EAAiC;AAC/BuB,MAAAA,OAAO,CAACC,IAAR,CAAa,mDAAb;AACA;AACD;;AACD,UAAMC,QAAQ,GAAG,EAAjB;AACAA,IAAAA,QAAQ,CAAC,KAAKnC,IAAN,CAAR,GAAsBuB,aAAa,CAACa,SAApC;AACAD,IAAAA,QAAQ,CAAC,UAAD,CAAR,GAAuB,KAAKE,OAA5B;AAEAxC,IAAAA,KAAK,CAACyC,KAAN,CAAYH,QAAZ,EAAsB,KAAKzB,OAA3B;AACD;;AAvDmB,CAAtB;AA0DA,SACEX,aADF","sourcesContent":["import { StoreMixin } from '../../mixins/storeMixin';\nimport { store } from '../../libs/store/store';\n\nimport { html } from 'lit-html';\n\nconst EditableMixin = {\n name: 'editable-mixin',\n use: [ StoreMixin ], // used to get context\n attributes: {\n editable: {\n type: Boolean,\n default: null,\n callback: function (newValue: boolean) {\n if (newValue !== null) this.listAttributes['editable'] = true;\n }\n },\n valueId: {\n type: String,\n default: ''\n }\n },\n created() {\n this.listTemplateAdditions.push(this.addEditButton.bind(this));\n },\n addEditButton(template, listTemplateAdditions: Function[]) {\n let newTemplate: any = null;\n if (this.editable !== null) {\n newTemplate = html`\n ${template}\n <button @click=${this.activateEditableField.bind(this)}>Modifier</button>\n `;\n }\n const nextProcessor = listTemplateAdditions.shift();\n if(nextProcessor) nextProcessor(newTemplate || template, listTemplateAdditions);\n },\n activateEditableField(e: Event): void {\n const editableField = this.element.querySelector('[data-editable]');\n const editButton = e.target as HTMLElement;\n\n // Set attributes\n editableField.toggleAttribute('contenteditable', true);\n editableField.focus();\n editButton.toggleAttribute('disabled', true);\n\n // Save on focusout\n editableField.addEventListener('focusout', () => this.save(editableField, editButton));\n },\n save(editableField: HTMLElement, editButton: HTMLElement) {\n editableField.toggleAttribute('contenteditable', false);\n editButton.removeAttribute('disabled');\n\n if (!this.name || !this.valueId) {\n console.warn('Some attributes are missing to perform the update');\n return;\n }\n const resource = {};\n resource[this.name] = editableField.innerText;\n resource['@context'] = this.context;\n\n store.patch(resource, this.valueId);\n },\n}\n\nexport {\n EditableMixin\n}"]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const FilterRangeFormMixin = {
|
|
2
|
-
name: 'filter-range-form-mixin',
|
|
3
|
-
attributes: {
|
|
4
|
-
startValue: {
|
|
5
|
-
type: String,
|
|
6
|
-
default: '',
|
|
7
|
-
callback: function (value) {
|
|
8
|
-
this.addToAttributes(this.getDefaultValue(value), "startValue");
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
endValue: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: '',
|
|
14
|
-
callback: function (value) {
|
|
15
|
-
this.addToAttributes(this.getDefaultValue(value), "endValue");
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
getDefaultValue(value) {
|
|
21
|
-
if (value == "today") return new Date().toISOString().split("T")[0];
|
|
22
|
-
return value;
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
getValue() {
|
|
26
|
-
if (!this.dataHolder) return [];
|
|
27
|
-
if (this.dataHolder.length !== 2) this.showDataHolderError(2, this.dataHolder.length);
|
|
28
|
-
return [// we expect 2 values, one min and one max
|
|
29
|
-
this.getValueFromElement(this.dataHolder[0]), this.getValueFromElement(this.dataHolder[1])];
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
get type() {
|
|
33
|
-
return 'range';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
export { FilterRangeFormMixin };
|
|
38
|
-
//# sourceMappingURL=filterRangeFormMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["filterRangeFormMixin.ts"],"names":["FilterRangeFormMixin","name","attributes","startValue","type","String","default","callback","value","addToAttributes","getDefaultValue","endValue","Date","toISOString","split","getValue","dataHolder","length","showDataHolderError","getValueFromElement"],"mappings":"AAAA,MAAMA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: 'filter-range-form-mixin',\n attributes: {\n startValue: {\n type: String,\n default:'',\n callback: function (value: string) {\n this.addToAttributes(this.getDefaultValue(value), \"startValue\")\n }\n },\n endValue: {\n type: String,\n default:'',\n callback: function (value: string) {\n this.addToAttributes(this.getDefaultValue(value), \"endValue\")\n }\n }\n },\n getDefaultValue(value) {\n if (value == \"today\") return new Date().toISOString().split(\"T\")[0];\n return value;\n },\n getValue() {\n if (!this.dataHolder) return [];\n if (this.dataHolder.length !== 2) this.showDataHolderError(2, this.dataHolder.length);\n return [ // we expect 2 values, one min and one max\n this.getValueFromElement(this.dataHolder[0]),\n this.getValueFromElement(this.dataHolder[1])\n ]\n },\n get type() {\n return 'range';\n },\n}\n\nexport {\n FilterRangeFormMixin\n}"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const FormCheckboxMixin = {
|
|
2
|
-
name: 'form-checkbox-mixin',
|
|
3
|
-
|
|
4
|
-
getValueFromElement(element) {
|
|
5
|
-
return element.checked;
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
get type() {
|
|
9
|
-
return 'boolean';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export { FormCheckboxMixin };
|
|
14
|
-
//# sourceMappingURL=formCheckboxMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["formCheckboxMixin.ts"],"names":["FormCheckboxMixin","name","getValueFromElement","element","checked","type"],"mappings":"AAAA,MAAMA,iBAAiB,GAAG;AACxBC,EAAAA,IAAI,EAAE,qBADkB;;AAExBC,EAAAA,mBAAmB,CAACC,OAAD,EAAe;AAChC,WAAOA,OAAO,CAACC,OAAf;AACD,GAJuB;;AAKxB,MAAIC,IAAJ,GAAW;AACT,WAAO,SAAP;AACD;;AAPuB,CAA1B;AAUA,SACEL,iBADF","sourcesContent":["const FormCheckboxMixin = {\n name: 'form-checkbox-mixin',\n getValueFromElement(element: any) {\n return element.checked;\n },\n get type() {\n return 'boolean';\n },\n}\n\nexport {\n FormCheckboxMixin\n}"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const FormCheckboxesMixin = {
|
|
2
|
-
name: 'form-checkboxes-mixin',
|
|
3
|
-
attributes: {
|
|
4
|
-
values: {
|
|
5
|
-
type: String,
|
|
6
|
-
default: '',
|
|
7
|
-
callback: function (value) {
|
|
8
|
-
if (!value) return;
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
this.listAttributes['values'] = JSON.parse(value);
|
|
12
|
-
} catch (e) {
|
|
13
|
-
console.error(e);
|
|
14
|
-
this.listAttributes['values'] = [];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
this.render();
|
|
18
|
-
this.element.dispatchEvent(new Event('change'));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
created() {
|
|
24
|
-
this.listAttributes['values'] = [];
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
getValue() {
|
|
28
|
-
const options = Array.from(this.element.querySelectorAll('input'));
|
|
29
|
-
return options.filter(el => el.checked).map(el => {
|
|
30
|
-
if (!el.value) return null;
|
|
31
|
-
let value = el.value;
|
|
32
|
-
|
|
33
|
-
try {
|
|
34
|
-
value = JSON.parse(el.value);
|
|
35
|
-
} catch (e) {}
|
|
36
|
-
|
|
37
|
-
return value;
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
get type() {
|
|
42
|
-
return this.enum === '' ? 'resource' : 'string';
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
get multiple() {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
export { FormCheckboxesMixin };
|
|
51
|
-
//# sourceMappingURL=formCheckboxesMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["formCheckboxesMixin.ts"],"names":["FormCheckboxesMixin","name","attributes","values","type","String","default","callback","value","listAttributes","JSON","parse","e","console","error","render","element","dispatchEvent","Event","created","getValue","options","Array","from","querySelectorAll","filter","el","checked","map","enum","multiple"],"mappings":"AAAA,MAAMA,mBAAmB,GAAG;AAC1BC,EAAAA,IAAI,EAAE,uBADoB;AAE1BC,EAAAA,UAAU,EAAE;AACVC,IAAAA,MAAM,EAAE;AACNC,MAAAA,IAAI,EAAEC,MADA;AAENC,MAAAA,OAAO,EAAE,EAFH;AAGNC,MAAAA,QAAQ,EAAE,UAAUC,KAAV,EAAyB;AACjC,YAAI,CAACA,KAAL,EAAY;;AACZ,YAAI;AACF,eAAKC,cAAL,CAAoB,QAApB,IAAgCC,IAAI,CAACC,KAAL,CAAWH,KAAX,CAAhC;AACD,SAFD,CAEE,OAAOI,CAAP,EAAU;AACVC,UAAAA,OAAO,CAACC,KAAR,CAAcF,CAAd;AACA,eAAKH,cAAL,CAAoB,QAApB,IAAgC,EAAhC;AACD;;AACD,aAAKM,MAAL;AACA,aAAKC,OAAL,CAAaC,aAAb,CAA2B,IAAIC,KAAJ,CAAU,QAAV,CAA3B;AACD;AAbK;AADE,GAFc;;AAmB1BC,EAAAA,OAAO,GAAG;AACR,SAAKV,cAAL,CAAoB,QAApB,IAAgC,EAAhC;AACD,GArByB;;AAsB1BW,EAAAA,QAAQ,GAAG;AACT,UAAMC,OAAO,GAAGC,KAAK,CAACC,IAAN,CAAW,KAAKP,OAAL,CAAaQ,gBAAb,CAA8B,OAA9B,CAAX,CAAhB;AACA,WAAOH,OAAO,CACXI,MADI,CACGC,EAAE,IAAIA,EAAE,CAACC,OADZ,EAEJC,GAFI,CAEAF,EAAE,IAAI;AACT,UAAI,CAACA,EAAE,CAAClB,KAAR,EAAe,OAAO,IAAP;AACf,UAAIA,KAAK,GAAGkB,EAAE,CAAClB,KAAf;;AACA,UAAI;AAAEA,QAAAA,KAAK,GAAGE,IAAI,CAACC,KAAL,CAAWe,EAAE,CAAClB,KAAd,CAAR;AAA8B,OAApC,CAAqC,OAAOI,CAAP,EAAU,CAAG;;AAClD,aAAOJ,KAAP;AACD,KAPI,CAAP;AAQD,GAhCyB;;AAiC1B,MAAIJ,IAAJ,GAAW;AACT,WAAQ,KAAKyB,IAAL,KAAc,EAAd,GAAkB,UAAlB,GAA+B,QAAvC;AACD,GAnCyB;;AAoC1B,MAAIC,QAAJ,GAAe;AACb,WAAO,IAAP;AACD;;AAtCyB,CAA5B;AAyCA,SACE9B,mBADF","sourcesContent":["const FormCheckboxesMixin = {\n name: 'form-checkboxes-mixin',\n attributes: {\n values: {\n type: String,\n default: '',\n callback: function (value: string) {\n if (!value) return;\n try {\n this.listAttributes['values'] = JSON.parse(value);\n } catch (e) {\n console.error(e);\n this.listAttributes['values'] = [];\n }\n this.render();\n this.element.dispatchEvent(new Event('change'));\n }\n },\n },\n created() {\n this.listAttributes['values'] = [];\n },\n getValue() {\n const options = Array.from(this.element.querySelectorAll('input')) as HTMLInputElement[];\n return options\n .filter(el => el.checked)\n .map(el => {\n if (!el.value) return null;\n let value = el.value;\n try { value = JSON.parse(el.value) } catch (e) { }\n return value;\n })\n },\n get type() {\n return this.enum === ''? 'resource' : 'string';\n },\n get multiple() {\n return true;\n }\n}\n\nexport {\n FormCheckboxesMixin\n}"]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
const FormDropdownMixin = {
|
|
2
|
-
name: 'form-dropdown-mixin',
|
|
3
|
-
attributes: {
|
|
4
|
-
values: {
|
|
5
|
-
// used to set more than 1 value, for multiple select
|
|
6
|
-
type: String,
|
|
7
|
-
default: '',
|
|
8
|
-
callback: function (value) {
|
|
9
|
-
if (value) {
|
|
10
|
-
try {
|
|
11
|
-
this.listAttributes['values'] = JSON.parse(value);
|
|
12
|
-
} catch (e) {
|
|
13
|
-
console.error(e);
|
|
14
|
-
this.listAttributes['values'] = [];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
this.render(); // use render to make sure the dispatch always happen after
|
|
18
|
-
|
|
19
|
-
this.dispatchChange();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
dataId: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: '',
|
|
26
|
-
callback: function (newValue) {
|
|
27
|
-
this.addToAttributes(newValue, 'id');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
created() {
|
|
33
|
-
this.listAttributes['values'] = [];
|
|
34
|
-
if (this.multiple) this.listAttributes['multiple'] = true;
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
dispatchChange() {
|
|
38
|
-
if (!this.element.querySelector('select')) return;
|
|
39
|
-
this.element.querySelector('select').dispatchEvent(new Event('change'));
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
getValue() {
|
|
43
|
-
if (!this.dataHolder) return ''; // no value
|
|
44
|
-
|
|
45
|
-
if (!this.multiple) {
|
|
46
|
-
// simple select
|
|
47
|
-
if (this.dataHolder.length > 1) this.showDataHolderError(1, this.dataHolder.length);
|
|
48
|
-
return this.getValueFromElement(this.dataHolder[0]);
|
|
49
|
-
} // multiple select
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const options = Array.from(this.element.querySelectorAll('option'));
|
|
53
|
-
return options.filter(el => el.selected).map(el => el.value ? JSON.parse(el.value) : null);
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
get type() {
|
|
57
|
-
return this.enum === '' ? 'resource' : 'string';
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
get multiple() {
|
|
61
|
-
return this.element.hasAttribute('multiple');
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
export { FormDropdownMixin };
|
|
66
|
-
//# sourceMappingURL=formDropdownMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["formDropdownMixin.ts"],"names":["FormDropdownMixin","name","attributes","values","type","String","default","callback","value","listAttributes","JSON","parse","e","console","error","render","dispatchChange","dataId","newValue","addToAttributes","created","multiple","element","querySelector","dispatchEvent","Event","getValue","dataHolder","length","showDataHolderError","getValueFromElement","options","Array","from","querySelectorAll","filter","el","selected","map","enum","hasAttribute"],"mappings":"AAAA,MAAMA,iBAAiB,GAAG;AACxBC,EAAAA,IAAI,EAAE,qBADkB;AAExBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,MAAM,EAAE;AAAE;AACRC,MAAAA,IAAI,EAAEC,MADA;AAENC,MAAAA,OAAO,EAAE,EAFH;AAGNC,MAAAA,QAAQ,EAAE,UAASC,KAAT,EAAgB;AACxB,YAAIA,KAAJ,EAAW;AACT,cAAI;AACF,iBAAKC,cAAL,CAAoB,QAApB,IAAgCC,IAAI,CAACC,KAAL,CAAWH,KAAX,CAAhC;AACD,WAFD,CAEE,OAAOI,CAAP,EAAU;AACVC,YAAAA,OAAO,CAACC,KAAR,CAAcF,CAAd;AACA,iBAAKH,cAAL,CAAoB,QAApB,IAAgC,EAAhC;AACD;;AACD,eAAKM,MAAL,GAPS,CAOM;;AACf,eAAKC,cAAL;AACD;AACF;AAdK,KADE;AAiBVC,IAAAA,MAAM,EAAE;AACNb,MAAAA,IAAI,EAAEC,MADA;AAENC,MAAAA,OAAO,EAAE,EAFH;AAGNC,MAAAA,QAAQ,EAAE,UAAUW,QAAV,EAA4B;AACpC,aAAKC,eAAL,CAAqBD,QAArB,EAA+B,IAA/B;AACD;AALK;AAjBE,GAFY;;AA2BxBE,EAAAA,OAAO,GAAG;AACR,SAAKX,cAAL,CAAoB,QAApB,IAAgC,EAAhC;AACA,QAAI,KAAKY,QAAT,EAAmB,KAAKZ,cAAL,CAAoB,UAApB,IAAkC,IAAlC;AACpB,GA9BuB;;AA+BxBO,EAAAA,cAAc,GAAG;AACf,QAAI,CAAC,KAAKM,OAAL,CAAaC,aAAb,CAA2B,QAA3B,CAAL,EAA2C;AAC3C,SAAKD,OAAL,CAAaC,aAAb,CAA2B,QAA3B,EAAqCC,aAArC,CAAmD,IAAIC,KAAJ,CAAU,QAAV,CAAnD;AACD,GAlCuB;;AAmCxBC,EAAAA,QAAQ,GAAG;AACT,QAAI,CAAC,KAAKC,UAAV,EAAsB,OAAO,EAAP,CADb,CACwB;;AACjC,QAAI,CAAC,KAAKN,QAAV,EAAoB;AAAE;AACpB,UAAI,KAAKM,UAAL,CAAgBC,MAAhB,GAAyB,CAA7B,EAAgC,KAAKC,mBAAL,CAAyB,CAAzB,EAA4B,KAAKF,UAAL,CAAgBC,MAA5C;AAChC,aAAO,KAAKE,mBAAL,CAAyB,KAAKH,UAAL,CAAgB,CAAhB,CAAzB,CAAP;AACD,KALQ,CAOT;;;AACA,UAAMI,OAAO,GAAGC,KAAK,CAACC,IAAN,CAAW,KAAKX,OAAL,CAAaY,gBAAb,CAA8B,QAA9B,CAAX,CAAhB;AACA,WAAOH,OAAO,CAACI,MAAR,CAAeC,EAAE,IAAIA,EAAE,CAACC,QAAxB,EAAkCC,GAAlC,CAAsCF,EAAE,IAAIA,EAAE,CAAC5B,KAAH,GAAWE,IAAI,CAACC,KAAL,CAAWyB,EAAE,CAAC5B,KAAd,CAAX,GAAkC,IAA9E,CAAP;AACD,GA7CuB;;AA8CxB,MAAIJ,IAAJ,GAAW;AACT,WAAQ,KAAKmC,IAAL,KAAc,EAAd,GAAkB,UAAlB,GAA+B,QAAvC;AACD,GAhDuB;;AAiDxB,MAAIlB,QAAJ,GAAe;AACb,WAAO,KAAKC,OAAL,CAAakB,YAAb,CAA0B,UAA1B,CAAP;AACD;;AAnDuB,CAA1B;AAsDA,SACExC,iBADF","sourcesContent":["const FormDropdownMixin = {\n name: 'form-dropdown-mixin',\n attributes: {\n values: { // used to set more than 1 value, for multiple select\n type: String,\n default: '',\n callback: function(value) {\n if (value) {\n try {\n this.listAttributes['values'] = JSON.parse(value);\n } catch (e) {\n console.error(e);\n this.listAttributes['values'] = [];\n }\n this.render(); // use render to make sure the dispatch always happen after\n this.dispatchChange();\n }\n }\n },\n dataId: {\n type: String,\n default: '',\n callback: function (newValue: string) {\n this.addToAttributes(newValue, 'id');\n }\n },\n },\n created() {\n this.listAttributes['values'] = [];\n if (this.multiple) this.listAttributes['multiple'] = true;\n },\n dispatchChange() {\n if (!this.element.querySelector('select')) return;\n this.element.querySelector('select').dispatchEvent(new Event('change'));\n },\n getValue() {\n if (!this.dataHolder) return ''; // no value\n if (!this.multiple) { // simple select\n if (this.dataHolder.length > 1) this.showDataHolderError(1, this.dataHolder.length);\n return this.getValueFromElement(this.dataHolder[0]);\n }\n\n // multiple select\n const options = Array.from(this.element.querySelectorAll('option')) as HTMLOptionElement[];\n return options.filter(el => el.selected).map(el => el.value ? JSON.parse(el.value) : null)\n },\n get type() {\n return this.enum === ''? 'resource' : 'string';\n },\n get multiple() {\n return this.element.hasAttribute('multiple');\n }\n}\n\nexport {\n FormDropdownMixin\n}"]}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { store } from "../../libs/store/store.js";
|
|
2
|
-
const FormFileMixin = {
|
|
3
|
-
name: 'form-file-mixin',
|
|
4
|
-
attributes: {
|
|
5
|
-
uploadUrl: {
|
|
6
|
-
type: String,
|
|
7
|
-
default: ''
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
initialState: {
|
|
11
|
-
initialValue: null
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
created() {
|
|
15
|
-
this.listAttributes['output'] = '';
|
|
16
|
-
this.listAttributes['resetButtonHidden'] = true;
|
|
17
|
-
this.listAttributes['selectFile'] = this.selectFile.bind(this);
|
|
18
|
-
this.listAttributes['resetFile'] = this.resetFile.bind(this);
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
attached() {
|
|
22
|
-
document.addEventListener('reset', e => {
|
|
23
|
-
if (e.target && e.target.contains(this.element)) {
|
|
24
|
-
this.value = this.initialValue;
|
|
25
|
-
this.listAttributes['resetButtonHidden'] = true;
|
|
26
|
-
this.planRender();
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
selectFile() {
|
|
32
|
-
if (this.uploadUrl === null) return;
|
|
33
|
-
|
|
34
|
-
if (this.initialValue === null) {
|
|
35
|
-
this.initialValue = this.value;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const filePicker = this.element.querySelector('input[type="file"]');
|
|
39
|
-
if (filePicker.files.length < 1) return;
|
|
40
|
-
this.listAttributes['output'] = '⏳';
|
|
41
|
-
this.planRender();
|
|
42
|
-
const file = filePicker.files[0];
|
|
43
|
-
const formData = new FormData();
|
|
44
|
-
formData.append('file', file);
|
|
45
|
-
store.fetchAuthn(this.uploadUrl, {
|
|
46
|
-
method: 'POST',
|
|
47
|
-
body: formData
|
|
48
|
-
}).then(response => {
|
|
49
|
-
const location = response.headers.get('location');
|
|
50
|
-
|
|
51
|
-
if (location == null) {
|
|
52
|
-
this.listAttributes['output'] = 'header location not found!';
|
|
53
|
-
} else {
|
|
54
|
-
this.value = location;
|
|
55
|
-
this.listAttributes['output'] = '';
|
|
56
|
-
this.listAttributes['resetButtonHidden'] = false;
|
|
57
|
-
this.planRender();
|
|
58
|
-
}
|
|
59
|
-
}).catch(error => {
|
|
60
|
-
this.listAttributes['fileValue'] = '';
|
|
61
|
-
this.listAttributes['output'] = 'upload error';
|
|
62
|
-
this.planRender();
|
|
63
|
-
console.error(error);
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
resetFile(event) {
|
|
68
|
-
event.preventDefault();
|
|
69
|
-
this.value = '';
|
|
70
|
-
const filePicker = this.element.querySelector('input[type="file"]');
|
|
71
|
-
if (filePicker) filePicker.value = '';
|
|
72
|
-
this.listAttributes['fileValue'] = '';
|
|
73
|
-
this.listAttributes['output'] = '';
|
|
74
|
-
this.listAttributes['resetButtonHidden'] = true; // this.input.dispatchEvent(new Event('change'));
|
|
75
|
-
|
|
76
|
-
this.planRender();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
};
|
|
80
|
-
export { FormFileMixin };
|
|
81
|
-
//# sourceMappingURL=formFileMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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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GA/DmB;;AAgEpB3B,EAAAA,SAAS,CAAC6B,KAAD,EAAQ;AACfA,IAAAA,KAAK,CAACC,cAAN;AACA,SAAKtB,KAAL,GAAa,EAAb;AACA,UAAME,UAAU,GAAG,KAAKH,OAAL,CAAaI,aAAb,CAA2B,oBAA3B,CAAnB;AACA,QAAID,UAAJ,EAAgBA,UAAU,CAACF,KAAX,GAAmB,EAAnB;AAChB,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: null\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 === null) {\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}"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const FormLengthMixin = {
|
|
2
|
-
name: 'form-length-mixin',
|
|
3
|
-
attributes: {
|
|
4
|
-
maxlength: {
|
|
5
|
-
type: Number,
|
|
6
|
-
callback: function (newValue) {
|
|
7
|
-
this.addToAttributes(newValue, 'maxlength');
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
minlength: {
|
|
11
|
-
type: Number,
|
|
12
|
-
callback: function (newValue) {
|
|
13
|
-
this.addToAttributes(newValue, 'minlength');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export { FormLengthMixin };
|
|
19
|
-
//# sourceMappingURL=formLengthMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["formLengthMixin.ts"],"names":["FormLengthMixin","name","attributes","maxlength","type","Number","callback","newValue","addToAttributes","minlength"],"mappings":"AAAA,MAAMA,eAAe,GAAG;AACtBC,EAAAA,IAAI,EAAE,mBADgB;AAEtBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,SAAS,EAAE;AACTC,MAAAA,IAAI,EAAEC,MADG;AAETC,MAAAA,QAAQ,EAAE,UAAUC,QAAV,EAA4B;AACpC,aAAKC,eAAL,CAAqBD,QAArB,EAA+B,WAA/B;AACD;AAJQ,KADD;AAOVE,IAAAA,SAAS,EAAE;AACTL,MAAAA,IAAI,EAAEC,MADG;AAETC,MAAAA,QAAQ,EAAE,UAAUC,QAAV,EAA4B;AACpC,aAAKC,eAAL,CAAqBD,QAArB,EAA+B,WAA/B;AACD;AAJQ;AAPD;AAFU,CAAxB;AAkBA,SACEP,eADF","sourcesContent":["const FormLengthMixin = {\n name: 'form-length-mixin',\n attributes: {\n maxlength: {\n type: Number,\n callback: function (newValue: string) {\n this.addToAttributes(newValue, 'maxlength');\n }\n },\n minlength: {\n type: Number,\n callback: function (newValue: string) {\n this.addToAttributes(newValue, 'minlength');\n }\n },\n },\n}\n\nexport {\n FormLengthMixin\n}"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const FormMinMaxMixin = {
|
|
2
|
-
name: 'form-min-max-mixin',
|
|
3
|
-
attributes: {
|
|
4
|
-
min: {
|
|
5
|
-
type: Number,
|
|
6
|
-
callback: function (newValue) {
|
|
7
|
-
this.addToAttributes(newValue, 'min');
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
max: {
|
|
11
|
-
type: Number,
|
|
12
|
-
callback: function (newValue) {
|
|
13
|
-
this.addToAttributes(newValue, 'max');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export { FormMinMaxMixin };
|
|
19
|
-
//# sourceMappingURL=formMinMaxMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["formMinMaxMixin.ts"],"names":["FormMinMaxMixin","name","attributes","min","type","Number","callback","newValue","addToAttributes","max"],"mappings":"AAAA,MAAMA,eAAe,GAAG;AACtBC,EAAAA,IAAI,EAAE,oBADgB;AAEtBC,EAAAA,UAAU,EAAG;AACXC,IAAAA,GAAG,EAAG;AACJC,MAAAA,IAAI,EAAEC,MADF;AAEJC,MAAAA,QAAQ,EAAE,UAAUC,QAAV,EAA4B;AACpC,aAAKC,eAAL,CAAqBD,QAArB,EAA+B,KAA/B;AACD;AAJG,KADK;AAOXE,IAAAA,GAAG,EAAG;AACJL,MAAAA,IAAI,EAAEC,MADF;AAEJC,MAAAA,QAAQ,EAAE,UAAUC,QAAV,EAA4B;AACpC,aAAKC,eAAL,CAAqBD,QAArB,EAA+B,KAA/B;AACD;AAJG;AAPK;AAFS,CAAxB;AAkBA,SACEP,eADF","sourcesContent":["const FormMinMaxMixin = {\n name: 'form-min-max-mixin',\n attributes : {\n min : {\n type: Number,\n callback: function (newValue: number) {\n this.addToAttributes(newValue, 'min');\n }\n },\n max : {\n type: Number,\n callback: function (newValue: number) {\n this.addToAttributes(newValue, 'max');\n }\n },\n }\n}\n\nexport {\n FormMinMaxMixin\n}"]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
const FormMixin = {
|
|
2
|
-
name: 'form-mixin',
|
|
3
|
-
attributes: {
|
|
4
|
-
required: {
|
|
5
|
-
type: Boolean,
|
|
6
|
-
default: false,
|
|
7
|
-
callback: function () {
|
|
8
|
-
this.listAttributes['required'] = true;
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
autocomplete: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: '',
|
|
14
|
-
callback: function (value) {
|
|
15
|
-
this.addToAttributes(value, "autocomplete");
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
attached() {
|
|
21
|
-
this.listAttributes['onChange'] = this.onChange.bind(this);
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
onChange(e) {
|
|
25
|
-
e.preventDefault();
|
|
26
|
-
e.stopPropagation();
|
|
27
|
-
this.element.dispatchEvent(new Event('change', {
|
|
28
|
-
bubbles: true
|
|
29
|
-
}));
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
getValue() {
|
|
33
|
-
if (!this.dataHolder || this.dataHolder.length === 0) return this.value;
|
|
34
|
-
if (this.dataHolder.length > 1) this.showDataHolderError(1, this.dataHolder.length);
|
|
35
|
-
return this.getValueFromElement(this.dataHolder[0]);
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
get type() {
|
|
39
|
-
return 'string';
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
get multiple() {
|
|
43
|
-
return false;
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
get dataHolder() {
|
|
47
|
-
const dataHolders = Array.from(this.element.querySelectorAll('[data-holder]'));
|
|
48
|
-
const widgetDataHolders = dataHolders.filter(element => {
|
|
49
|
-
const dataHolderAncestor = element.parentElement ? element.parentElement.closest('[data-holder]') : null; // get the dataHolder of the widget only if no dataHolder ancestor in the current widget
|
|
50
|
-
|
|
51
|
-
return dataHolderAncestor === this.element || !dataHolderAncestor || !this.element.contains(dataHolderAncestor);
|
|
52
|
-
});
|
|
53
|
-
return widgetDataHolders.length ? widgetDataHolders : null;
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
getValueFromElement(element) {
|
|
57
|
-
return element.component ? element.component.getValue() : element.value;
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
showDataHolderError(expected, found) {
|
|
61
|
-
console.warn("Expected ".concat(expected, " data-holder element in ").concat(this.element.tagName, ". Found ").concat(found));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
export { FormMixin };
|
|
66
|
-
//# sourceMappingURL=formMixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["formMixin.ts"],"names":["FormMixin","name","attributes","required","type","Boolean","default","callback","listAttributes","autocomplete","String","value","addToAttributes","attached","onChange","bind","e","preventDefault","stopPropagation","element","dispatchEvent","Event","bubbles","getValue","dataHolder","length","showDataHolderError","getValueFromElement","multiple","dataHolders","Array","from","querySelectorAll","widgetDataHolders","filter","dataHolderAncestor","parentElement","closest","contains","component","expected","found","console","warn","tagName"],"mappings":"AAAA,MAAMA,SAAS,GAAG;AAChBC,EAAAA,IAAI,EAAE,YADU;AAEhBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAEC,OADE;AAERC,MAAA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IAAN,CAAY,KAAKZ,OAAN,CAA0Ba,gBAA1B,CAA2C,eAA3C,CAAX,CAApB;AACA,UAAMC,iBAAiB,GAAGJ,WAAW,CAACK,MAAZ,CAAmBf,OAAO,IAAI;AACtD,YAAMgB,kBAAkB,GAAGhB,OAAO,CAACiB,aAAR,GAAwBjB,OAAO,CAACiB,aAAR,CAAsBC,OAAtB,CAA8B,eAA9B,CAAxB,GAAyE,IAApG,CADsD,CAEtD;;AACA,aAAOF,kBAAkB,KAAK,KAAKhB,OAA5B,IAAuC,CAACgB,kBAAxC,IAA8D,CAAC,KAAKhB,OAAL,CAAamB,QAAb,CAAsBH,kBAAtB,CAAtE;AACD,KAJyB,CAA1B;AAMA,WAAOF,iBAAiB,CAACR,MAAlB,GAA2BQ,iBAA3B,GAA+C,IAAtD;AACD,GA9Ce;;AA+ChBN,EAAAA,mBAAmB,CAACR,OAAD,EAAe;AAChC,WAAOA,OAAO,CAACoB,SAAR,GAAoBpB,OAAO,CAACoB,SAAR,CAAkBhB,QAAlB,EAApB,GAAmDJ,OAAO,CAACR,KAAlE;AACD,GAjDe;;AAkDhBe,EAAAA,mBAAmB,CAACc,QAAD,EAAmBC,KAAnB,EAAkC;AACnDC,IAAAA,OAAO,CAACC,IAAR,oBAAyBH,QAAzB,qCAA4D,KAAKrB,OAAL,CAAayB,OAAzE,qBAA2FH,KAA3F;AACD;;AApDe,CAAlB;AAuDA,SACEzC,SADF","sourcesContent":["const FormMixin = {\n name: 'form-mixin',\n attributes: {\n required: {\n type: Boolean,\n default: false,\n callback: function () {\n this.listAttributes['required'] = true;\n }\n },\n autocomplete: {\n type: String,\n default: '',\n callback:function (value: string) {\n this.addToAttributes(value, \"autocomplete\");\n }\n },\n },\n attached() {\n this.listAttributes['onChange'] = this.onChange.bind(this);\n },\n onChange(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n this.element.dispatchEvent(new Event('change', { bubbles: true }));\n },\n getValue() {\n if (!this.dataHolder || this.dataHolder.length === 0) return this.value;\n if (this.dataHolder.length > 1) this.showDataHolderError(1, this.dataHolder.length);\n return this.getValueFromElement(this.dataHolder[0]);\n },\n get type() {\n return 'string';\n },\n get multiple() {\n return false;\n },\n get dataHolder(): Element[] | null {\n const dataHolders = Array.from((this.element as Element).querySelectorAll('[data-holder]'));\n const widgetDataHolders = dataHolders.filter(element => {\n const dataHolderAncestor = element.parentElement ? element.parentElement.closest('[data-holder]') : null;\n // get the dataHolder of the widget only if no dataHolder ancestor in the current widget\n return dataHolderAncestor === this.element || !dataHolderAncestor || !this.element.contains(dataHolderAncestor)\n });\n\n return widgetDataHolders.length ? widgetDataHolders : null;\n },\n getValueFromElement(element: any) {\n return element.component ? element.component.getValue() : element.value;\n },\n showDataHolderError(expected: number, found: number) {\n console.warn(`Expected ${expected} data-holder element in ${this.element.tagName}. Found ${found}`);\n }\n}\n\nexport {\n FormMixin\n}"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const FormNumberMixin = {
|
|
2
|
-
name: 'form-number-mixin',
|
|
3
|
-
|
|
4
|
-
getValueFromElement(element) {
|
|
5
|
-
return element.value ? Number(element.value) : '';
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
get type() {
|
|
9
|
-
return 'number';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export { FormNumberMixin };
|
|
14
|
-
//# sourceMappingURL=formNumberMixin.js.map
|