@sme.up/ketchup 11.0.0-SNAPSHOT-20241031094059 → 11.0.0-SNAPSHOT-20241031153116
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/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +1 -1
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-input-panel.cjs.entry.js +78 -44
- package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js.map +1 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +103 -44
- package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +3 -3
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +1 -1
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-input-panel.js +79 -44
- package/dist/components/kup-input-panel.js.map +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js.map +1 -1
- package/dist/esm/kup-input-panel.entry.js +78 -44
- package/dist/esm/kup-input-panel.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js.map +1 -1
- package/dist/ketchup/p-3e5a1fca.entry.js +2 -0
- package/dist/ketchup/p-3e5a1fca.entry.js.map +1 -0
- package/dist/ketchup/{p-cbf20461.entry.js → p-e036c5cd.entry.js} +2 -2
- package/dist/ketchup/{p-cbf20461.entry.js.map → p-e036c5cd.entry.js.map} +1 -1
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +1 -0
- package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +6 -1
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +1 -1
- package/dist/types/components.d.ts +14 -4
- package/package.json +1 -1
- package/dist/ketchup/p-63683279.entry.js +0 -2
- package/dist/ketchup/p-63683279.entry.js.map +0 -1
|
@@ -145,6 +145,7 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
|
|
|
145
145
|
this.optionsHandler = null;
|
|
146
146
|
this.customButtonClickHandler = null;
|
|
147
147
|
this.checkValidObjCallback = null;
|
|
148
|
+
this.checkValidValueCallback = null;
|
|
148
149
|
this.inputPanelCells = [];
|
|
149
150
|
this.tabSelected = null;
|
|
150
151
|
}
|
|
@@ -230,7 +231,7 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
|
|
|
230
231
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
231
232
|
]
|
|
232
233
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
233
|
-
return (h(Host, { key: '
|
|
234
|
+
return (h(Host, { key: '25adc3d7d9a7cf6e33403fd574e07d607142a80e' }, h("style", { key: '2757cf9cf64d9934091fd2bfc2960110abd2795a' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '5a89038f088aed371238fee56d3ad20c8bb9eaee', id: componentWrapperId }, inputPanelContent)));
|
|
234
235
|
}
|
|
235
236
|
disconnectedCallback() {
|
|
236
237
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -249,6 +250,7 @@ const KupInputPanel$1 = /*@__PURE__*/ proxyCustomElement(class KupInputPanel ext
|
|
|
249
250
|
"optionsHandler": [16],
|
|
250
251
|
"customButtonClickHandler": [16],
|
|
251
252
|
"checkValidObjCallback": [16],
|
|
253
|
+
"checkValidValueCallback": [16],
|
|
252
254
|
"inputPanelCells": [32],
|
|
253
255
|
"tabSelected": [32],
|
|
254
256
|
"getProps": [64],
|
|
@@ -632,8 +634,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
632
634
|
}
|
|
633
635
|
return null;
|
|
634
636
|
}, _KupInputPanel_CHIAdapter = function _KupInputPanel_CHIAdapter(_options, _fieldLabel, currentValue, cell, id) {
|
|
635
|
-
var _a;
|
|
636
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
637
|
+
var _a, _b;
|
|
638
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
639
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
640
|
+
cell.mandatory) {
|
|
637
641
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_checkOnBlurEvent).call(this, cell, id);
|
|
638
642
|
}
|
|
639
643
|
return CHIAdapter(currentValue);
|
|
@@ -674,7 +678,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
674
678
|
}
|
|
675
679
|
return Object.assign({ label: cell.value, fun: cell.fun }, cell.data);
|
|
676
680
|
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(rawOptions, fieldLabel, currentValue, cell, id) {
|
|
677
|
-
var _a;
|
|
681
|
+
var _a, _b;
|
|
678
682
|
const configCMandACP = CMBandACPAdapter(currentValue, fieldLabel, []);
|
|
679
683
|
if (cell.fun) {
|
|
680
684
|
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
@@ -697,14 +701,18 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
697
701
|
configCMandACP.data['kup-list'].data =
|
|
698
702
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, rawOptions, currentValue);
|
|
699
703
|
}
|
|
700
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
704
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
705
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
706
|
+
cell.mandatory) {
|
|
701
707
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_checkOnBlurEvent).call(this, cell, id);
|
|
702
708
|
}
|
|
703
709
|
return configCMandACP;
|
|
704
710
|
}, _KupInputPanel_CHKAdapter = function _KupInputPanel_CHKAdapter(_options, fieldLabel, currentValue, cell, id) {
|
|
705
|
-
var _a;
|
|
711
|
+
var _a, _b;
|
|
706
712
|
let data = CHKAdapter(currentValue, fieldLabel);
|
|
707
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
713
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
714
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
715
|
+
cell.mandatory) {
|
|
708
716
|
return Object.assign(Object.assign({}, data), { onBlur: () => {
|
|
709
717
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_checkOnBlurProp).call(this, cell, id);
|
|
710
718
|
} });
|
|
@@ -723,8 +731,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
723
731
|
initialValue: currentValue,
|
|
724
732
|
};
|
|
725
733
|
}, _KupInputPanel_ITXAdapter = function _KupInputPanel_ITXAdapter(_options, fieldLabel, _currentValue, cell, id) {
|
|
726
|
-
var _a;
|
|
727
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
734
|
+
var _a, _b;
|
|
735
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
736
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
737
|
+
cell.mandatory) {
|
|
728
738
|
return {
|
|
729
739
|
label: fieldLabel,
|
|
730
740
|
onBlur: () => {
|
|
@@ -734,9 +744,11 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
734
744
|
}
|
|
735
745
|
return { label: fieldLabel };
|
|
736
746
|
}, _KupInputPanel_RADAdapter = function _KupInputPanel_RADAdapter(options, _fieldLabel, currentValue, cell, id) {
|
|
737
|
-
var _a;
|
|
747
|
+
var _a, _b;
|
|
738
748
|
let data = RADAdapter(currentValue, options);
|
|
739
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
749
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
750
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
751
|
+
cell.mandatory) {
|
|
740
752
|
return Object.assign(Object.assign({}, data), { onBlur: () => {
|
|
741
753
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_checkOnBlurProp).call(this, cell, id);
|
|
742
754
|
} });
|
|
@@ -745,8 +757,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
745
757
|
}, _KupInputPanel_SWTAdapter = function _KupInputPanel_SWTAdapter(_options, fieldLabel, currentValue) {
|
|
746
758
|
return SWTAdapter(currentValue, fieldLabel);
|
|
747
759
|
}, _KupInputPanel_DateAdapter = function _KupInputPanel_DateAdapter(_options, fieldLabel, currentValue, cell, id) {
|
|
748
|
-
var _a;
|
|
749
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
760
|
+
var _a, _b;
|
|
761
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
762
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
763
|
+
cell.mandatory) {
|
|
750
764
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_checkOnBlurEvent).call(this, cell, id);
|
|
751
765
|
}
|
|
752
766
|
return {
|
|
@@ -758,8 +772,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
758
772
|
initialValue: currentValue,
|
|
759
773
|
};
|
|
760
774
|
}, _KupInputPanel_ObjectAdapter = function _KupInputPanel_ObjectAdapter(_options, fieldLabel, currentValue, cell, id) {
|
|
761
|
-
var _a;
|
|
762
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
775
|
+
var _a, _b;
|
|
776
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
777
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
778
|
+
cell.mandatory) {
|
|
763
779
|
return {
|
|
764
780
|
initialValue: currentValue || '',
|
|
765
781
|
label: fieldLabel || ' ',
|
|
@@ -775,8 +791,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
775
791
|
value: currentValue || '',
|
|
776
792
|
};
|
|
777
793
|
}, _KupInputPanel_TimeAdapter = function _KupInputPanel_TimeAdapter(_options, fieldLabel, _currentValue, cell, id) {
|
|
778
|
-
var _a;
|
|
779
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
794
|
+
var _a, _b;
|
|
795
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
796
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
797
|
+
cell.mandatory) {
|
|
780
798
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_checkOnBlurEvent).call(this, cell, id);
|
|
781
799
|
}
|
|
782
800
|
return {
|
|
@@ -787,8 +805,10 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
787
805
|
},
|
|
788
806
|
};
|
|
789
807
|
}, _KupInputPanel_NumberAdapter = function _KupInputPanel_NumberAdapter(_options, fieldLabel, _currentValue, cell, id) {
|
|
790
|
-
var _a;
|
|
791
|
-
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
808
|
+
var _a, _b;
|
|
809
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) ||
|
|
810
|
+
((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) ||
|
|
811
|
+
cell.mandatory) {
|
|
792
812
|
return {
|
|
793
813
|
label: fieldLabel,
|
|
794
814
|
onBlur: () => {
|
|
@@ -904,8 +924,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
904
924
|
(_a = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, options, currentValue)) !== null && _a !== void 0 ? _a : [];
|
|
905
925
|
detail.comp.refresh();
|
|
906
926
|
});
|
|
907
|
-
}, _KupInputPanel_checkOnBlurProp = function _KupInputPanel_checkOnBlurProp(cell, id) {
|
|
908
|
-
var _a;
|
|
927
|
+
}, _KupInputPanel_checkOnBlurProp = async function _KupInputPanel_checkOnBlurProp(cell, id) {
|
|
928
|
+
var _a, _b;
|
|
909
929
|
const currCell = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getCell).call(this, id);
|
|
910
930
|
// Required cell check
|
|
911
931
|
if (cell.mandatory) {
|
|
@@ -914,22 +934,29 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
914
934
|
null
|
|
915
935
|
: // else set the error message
|
|
916
936
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.REQUIRED_VALUE));
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
937
|
+
if (!currCell.value) {
|
|
938
|
+
return;
|
|
939
|
+
}
|
|
920
940
|
}
|
|
921
941
|
// Valid object check
|
|
922
|
-
if ((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) {
|
|
923
|
-
this.checkValidObjCallback({
|
|
942
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) && currCell.value) {
|
|
943
|
+
const { valid } = await this.checkValidObjCallback({
|
|
924
944
|
obj: cell.obj,
|
|
925
945
|
currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
926
946
|
fun: cell.fun,
|
|
927
|
-
})
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
947
|
+
});
|
|
948
|
+
if (valid) {
|
|
949
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_setCellError).call(this, id, null);
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_setCellError).call(this, id, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.INVALID_VALUE));
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
if ((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) {
|
|
957
|
+
this.checkValidValueCallback({
|
|
958
|
+
before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
|
|
959
|
+
after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
933
960
|
});
|
|
934
961
|
}
|
|
935
962
|
}, _KupInputPanel_checkOnBlurEvent = function _KupInputPanel_checkOnBlurEvent(cell, id) {
|
|
@@ -937,8 +964,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
937
964
|
if (!evName) {
|
|
938
965
|
return;
|
|
939
966
|
}
|
|
940
|
-
const handler = (e) => {
|
|
941
|
-
var _a;
|
|
967
|
+
const handler = async (e) => {
|
|
968
|
+
var _a, _b;
|
|
942
969
|
if (e.detail.id !== id) {
|
|
943
970
|
return;
|
|
944
971
|
}
|
|
@@ -950,21 +977,29 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
950
977
|
: // else set the error message
|
|
951
978
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.REQUIRED_VALUE);
|
|
952
979
|
e.detail.comp.refresh();
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
980
|
+
if (!e.detail.value) {
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
956
983
|
}
|
|
957
984
|
// Valid object check
|
|
958
|
-
if ((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) {
|
|
959
|
-
this.checkValidObjCallback({
|
|
985
|
+
if (((_a = cell.inputSettings) === null || _a === void 0 ? void 0 : _a.checkObject) && e.detail.value) {
|
|
986
|
+
const { valid } = await this.checkValidObjCallback({
|
|
960
987
|
obj: cell.obj,
|
|
961
988
|
currentState: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
962
989
|
fun: cell.fun,
|
|
963
|
-
})
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
990
|
+
});
|
|
991
|
+
e.detail.comp.error = valid
|
|
992
|
+
? null
|
|
993
|
+
: __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.INVALID_VALUE);
|
|
994
|
+
e.detail.comp.refresh();
|
|
995
|
+
if (!valid) {
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
if ((_b = cell.inputSettings) === null || _b === void 0 ? void 0 : _b.checkValueOnExit) {
|
|
1000
|
+
this.checkValidValueCallback({
|
|
1001
|
+
before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
|
|
1002
|
+
after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
968
1003
|
});
|
|
969
1004
|
}
|
|
970
1005
|
};
|