@public-ui/hydrate 2.2.6-4c6dc8594d43ee54834dd9b3395659849b7512d5.0 → 2.2.6-rc.1
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/index.js +11 -35
- package/dist/index.mjs +11 -35
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -4360,7 +4360,6 @@ const validateTableDataFoot = (component, value, setStateHooks) => {
|
|
|
4360
4360
|
});
|
|
4361
4361
|
};
|
|
4362
4362
|
|
|
4363
|
-
const HEADER_CELL_WIDTH_VALIDATOR = /^\d+(\.\d+)?([a-z]+)?$/;
|
|
4364
4363
|
const validateTableHeaderCells = (component, value) => {
|
|
4365
4364
|
emptyStringByArrayHandler(value, () => {
|
|
4366
4365
|
objectObjectHandler(value, () => {
|
|
@@ -4374,25 +4373,7 @@ const validateTableHeaderCells = (component, value) => {
|
|
|
4374
4373
|
(value.horizontal === undefined ||
|
|
4375
4374
|
(Array.isArray(value.horizontal) && value.horizontal.find((headerRow) => !Array.isArray(headerRow)) === undefined)) &&
|
|
4376
4375
|
(value.vertical === undefined || (Array.isArray(value.vertical) && value.vertical.find((headerCol) => !Array.isArray(headerCol)) === undefined)) &&
|
|
4377
|
-
true, new Set(['TableHeaderCellsPropType']), value
|
|
4378
|
-
hooks: {
|
|
4379
|
-
afterPatch: (value, state) => {
|
|
4380
|
-
var _a;
|
|
4381
|
-
const headerCells = value;
|
|
4382
|
-
const widths = [];
|
|
4383
|
-
(_a = headerCells.horizontal) === null || _a === void 0 ? void 0 : _a.forEach((headerRow) => {
|
|
4384
|
-
headerRow.forEach((headerCell) => {
|
|
4385
|
-
if (headerCell.width && HEADER_CELL_WIDTH_VALIDATOR.test(headerCell.width)) {
|
|
4386
|
-
widths.push(headerCell.width);
|
|
4387
|
-
}
|
|
4388
|
-
});
|
|
4389
|
-
});
|
|
4390
|
-
if (widths.length > 0) {
|
|
4391
|
-
state._minWidth = `calc(${widths.join(' + ')})`;
|
|
4392
|
-
}
|
|
4393
|
-
},
|
|
4394
|
-
},
|
|
4395
|
-
});
|
|
4376
|
+
true, new Set(['TableHeaderCellsPropType']), value);
|
|
4396
4377
|
});
|
|
4397
4378
|
});
|
|
4398
4379
|
};
|
|
@@ -4623,12 +4604,12 @@ class KolAccordion {
|
|
|
4623
4604
|
};
|
|
4624
4605
|
this._disabled = false;
|
|
4625
4606
|
this._label = undefined;
|
|
4626
|
-
this._level =
|
|
4607
|
+
this._level = 0;
|
|
4627
4608
|
this._on = undefined;
|
|
4628
4609
|
this._open = false;
|
|
4629
4610
|
this.state = {
|
|
4630
4611
|
_label: '',
|
|
4631
|
-
_level:
|
|
4612
|
+
_level: 0,
|
|
4632
4613
|
_on: {},
|
|
4633
4614
|
};
|
|
4634
4615
|
}
|
|
@@ -6843,12 +6824,12 @@ class KolDetails {
|
|
|
6843
6824
|
};
|
|
6844
6825
|
this._disabled = false;
|
|
6845
6826
|
this._label = undefined;
|
|
6846
|
-
this._level =
|
|
6827
|
+
this._level = 0;
|
|
6847
6828
|
this._on = undefined;
|
|
6848
6829
|
this._open = false;
|
|
6849
6830
|
this.state = {
|
|
6850
6831
|
_label: '',
|
|
6851
|
-
_level:
|
|
6832
|
+
_level: 0,
|
|
6852
6833
|
_on: {},
|
|
6853
6834
|
};
|
|
6854
6835
|
}
|
|
@@ -6860,8 +6841,7 @@ class KolDetails {
|
|
|
6860
6841
|
await ((_a = this.buttonWcRef) === null || _a === void 0 ? void 0 : _a.kolFocus());
|
|
6861
6842
|
}
|
|
6862
6843
|
render() {
|
|
6863
|
-
const { _open, _label, _disabled } = this.state;
|
|
6864
|
-
const _level = 1;
|
|
6844
|
+
const { _open, _label, _disabled, _level } = this.state;
|
|
6865
6845
|
const rootClass = 'details';
|
|
6866
6846
|
const props = {
|
|
6867
6847
|
id: this.nonce,
|
|
@@ -6883,7 +6863,7 @@ class KolDetails {
|
|
|
6883
6863
|
animationClass: `${rootClass}__wrapper-animation`,
|
|
6884
6864
|
},
|
|
6885
6865
|
};
|
|
6886
|
-
return (hAsync(Host, { key: '
|
|
6866
|
+
return (hAsync(Host, { key: '3dcde0fcf7a4c3fbb7d3eaee477d0dff4e84579f', class: "kol-details" }, hAsync(KolCollapsibleFc$1, Object.assign({ key: 'c585c28871f2ea480a1df7dd95e1738c4edbd15a' }, props), hAsync("slot", { key: '87426b1a77d99deaa12c8b8fa72bd7c9dd4e91f8' }))));
|
|
6887
6867
|
}
|
|
6888
6868
|
validateDisabled(value) {
|
|
6889
6869
|
validateDisabled(this, value);
|
|
@@ -7089,26 +7069,22 @@ class KolForm {
|
|
|
7089
7069
|
targetElement.focus();
|
|
7090
7070
|
}
|
|
7091
7071
|
};
|
|
7072
|
+
this.setBlockElement = (el) => (this.errorListBlock = el);
|
|
7073
|
+
this.setFirstLinkElement = (el) => (this.errorListFirstLink = el);
|
|
7092
7074
|
this._on = undefined;
|
|
7093
7075
|
this._requiredText = true;
|
|
7094
7076
|
this._errorList = undefined;
|
|
7095
7077
|
this.state = {};
|
|
7096
7078
|
}
|
|
7097
7079
|
renderErrorList(errorList) {
|
|
7098
|
-
return (hAsync(KolAlertFc$1, { ref: (
|
|
7099
|
-
this.errorListBlock = el;
|
|
7100
|
-
}, type: "error", variant: "card", label: translate('kol-error-list-message') }, hAsync("nav", { "aria-label": translate('kol-error-list') }, hAsync("ul", null, errorList === null || errorList === void 0 ? void 0 : errorList.map((error, index) => (hAsync("li", { key: index }, hAsync(KolLinkWcTag, { _href: "", _label: error.message, _on: { onClick: typeof error.selector === 'string' ? () => this.handleLinkClick(String(error.selector)) : error.selector }, ref: (el) => {
|
|
7101
|
-
if (index === 0) {
|
|
7102
|
-
this.errorListFirstLink = el;
|
|
7103
|
-
}
|
|
7104
|
-
} }))))))));
|
|
7080
|
+
return (hAsync(KolAlertFc$1, { ref: this.setBlockElement, type: "error", variant: "card", label: translate('kol-error-list-message') }, hAsync("nav", { "aria-label": translate('kol-error-list') }, hAsync("ul", null, errorList === null || errorList === void 0 ? void 0 : errorList.map((error, index) => (hAsync("li", { key: index }, hAsync(KolLinkWcTag, { _href: "", _label: error.message, _on: { onClick: typeof error.selector === 'string' ? () => this.handleLinkClick(String(error.selector)) : error.selector }, ref: index === 0 ? this.setFirstLinkElement : undefined }))))))));
|
|
7105
7081
|
}
|
|
7106
7082
|
renderFormElement() {
|
|
7107
7083
|
return (hAsync("form", { method: "post", onSubmit: this.onSubmit, onReset: this.onReset, autoComplete: "off", noValidate: true }, this.state._requiredText === true ? (hAsync("p", null, hAsync("div", { class: "mandatory-fields-hint" }, translate('kol-form-description')))) : typeof this.state._requiredText === 'string' && this.state._requiredText.length > 0 ? (hAsync("p", null, hAsync("div", { class: "mandatory-fields-hint" }, this.state._requiredText))) : null, hAsync("slot", null)));
|
|
7108
7084
|
}
|
|
7109
7085
|
render() {
|
|
7110
7086
|
const hasErrorList = Array.isArray(this._errorList) && this._errorList.length > 0;
|
|
7111
|
-
return (hAsync(Host, { key: '
|
|
7087
|
+
return (hAsync(Host, { key: '24bab6abd04c6441e4299189ae81e408167b1db7', class: "kol-form" }, hasErrorList && this.renderErrorList(this._errorList), this.renderFormElement()));
|
|
7112
7088
|
}
|
|
7113
7089
|
scrollToErrorList() {
|
|
7114
7090
|
var _a;
|
package/dist/index.mjs
CHANGED
|
@@ -4356,7 +4356,6 @@ const validateTableDataFoot = (component, value, setStateHooks) => {
|
|
|
4356
4356
|
});
|
|
4357
4357
|
};
|
|
4358
4358
|
|
|
4359
|
-
const HEADER_CELL_WIDTH_VALIDATOR = /^\d+(\.\d+)?([a-z]+)?$/;
|
|
4360
4359
|
const validateTableHeaderCells = (component, value) => {
|
|
4361
4360
|
emptyStringByArrayHandler(value, () => {
|
|
4362
4361
|
objectObjectHandler(value, () => {
|
|
@@ -4370,25 +4369,7 @@ const validateTableHeaderCells = (component, value) => {
|
|
|
4370
4369
|
(value.horizontal === undefined ||
|
|
4371
4370
|
(Array.isArray(value.horizontal) && value.horizontal.find((headerRow) => !Array.isArray(headerRow)) === undefined)) &&
|
|
4372
4371
|
(value.vertical === undefined || (Array.isArray(value.vertical) && value.vertical.find((headerCol) => !Array.isArray(headerCol)) === undefined)) &&
|
|
4373
|
-
true, new Set(['TableHeaderCellsPropType']), value
|
|
4374
|
-
hooks: {
|
|
4375
|
-
afterPatch: (value, state) => {
|
|
4376
|
-
var _a;
|
|
4377
|
-
const headerCells = value;
|
|
4378
|
-
const widths = [];
|
|
4379
|
-
(_a = headerCells.horizontal) === null || _a === void 0 ? void 0 : _a.forEach((headerRow) => {
|
|
4380
|
-
headerRow.forEach((headerCell) => {
|
|
4381
|
-
if (headerCell.width && HEADER_CELL_WIDTH_VALIDATOR.test(headerCell.width)) {
|
|
4382
|
-
widths.push(headerCell.width);
|
|
4383
|
-
}
|
|
4384
|
-
});
|
|
4385
|
-
});
|
|
4386
|
-
if (widths.length > 0) {
|
|
4387
|
-
state._minWidth = `calc(${widths.join(' + ')})`;
|
|
4388
|
-
}
|
|
4389
|
-
},
|
|
4390
|
-
},
|
|
4391
|
-
});
|
|
4372
|
+
true, new Set(['TableHeaderCellsPropType']), value);
|
|
4392
4373
|
});
|
|
4393
4374
|
});
|
|
4394
4375
|
};
|
|
@@ -4619,12 +4600,12 @@ class KolAccordion {
|
|
|
4619
4600
|
};
|
|
4620
4601
|
this._disabled = false;
|
|
4621
4602
|
this._label = undefined;
|
|
4622
|
-
this._level =
|
|
4603
|
+
this._level = 0;
|
|
4623
4604
|
this._on = undefined;
|
|
4624
4605
|
this._open = false;
|
|
4625
4606
|
this.state = {
|
|
4626
4607
|
_label: '',
|
|
4627
|
-
_level:
|
|
4608
|
+
_level: 0,
|
|
4628
4609
|
_on: {},
|
|
4629
4610
|
};
|
|
4630
4611
|
}
|
|
@@ -6839,12 +6820,12 @@ class KolDetails {
|
|
|
6839
6820
|
};
|
|
6840
6821
|
this._disabled = false;
|
|
6841
6822
|
this._label = undefined;
|
|
6842
|
-
this._level =
|
|
6823
|
+
this._level = 0;
|
|
6843
6824
|
this._on = undefined;
|
|
6844
6825
|
this._open = false;
|
|
6845
6826
|
this.state = {
|
|
6846
6827
|
_label: '',
|
|
6847
|
-
_level:
|
|
6828
|
+
_level: 0,
|
|
6848
6829
|
_on: {},
|
|
6849
6830
|
};
|
|
6850
6831
|
}
|
|
@@ -6856,8 +6837,7 @@ class KolDetails {
|
|
|
6856
6837
|
await ((_a = this.buttonWcRef) === null || _a === void 0 ? void 0 : _a.kolFocus());
|
|
6857
6838
|
}
|
|
6858
6839
|
render() {
|
|
6859
|
-
const { _open, _label, _disabled } = this.state;
|
|
6860
|
-
const _level = 1;
|
|
6840
|
+
const { _open, _label, _disabled, _level } = this.state;
|
|
6861
6841
|
const rootClass = 'details';
|
|
6862
6842
|
const props = {
|
|
6863
6843
|
id: this.nonce,
|
|
@@ -6879,7 +6859,7 @@ class KolDetails {
|
|
|
6879
6859
|
animationClass: `${rootClass}__wrapper-animation`,
|
|
6880
6860
|
},
|
|
6881
6861
|
};
|
|
6882
|
-
return (hAsync(Host, { key: '
|
|
6862
|
+
return (hAsync(Host, { key: '3dcde0fcf7a4c3fbb7d3eaee477d0dff4e84579f', class: "kol-details" }, hAsync(KolCollapsibleFc$1, Object.assign({ key: 'c585c28871f2ea480a1df7dd95e1738c4edbd15a' }, props), hAsync("slot", { key: '87426b1a77d99deaa12c8b8fa72bd7c9dd4e91f8' }))));
|
|
6883
6863
|
}
|
|
6884
6864
|
validateDisabled(value) {
|
|
6885
6865
|
validateDisabled(this, value);
|
|
@@ -7085,26 +7065,22 @@ class KolForm {
|
|
|
7085
7065
|
targetElement.focus();
|
|
7086
7066
|
}
|
|
7087
7067
|
};
|
|
7068
|
+
this.setBlockElement = (el) => (this.errorListBlock = el);
|
|
7069
|
+
this.setFirstLinkElement = (el) => (this.errorListFirstLink = el);
|
|
7088
7070
|
this._on = undefined;
|
|
7089
7071
|
this._requiredText = true;
|
|
7090
7072
|
this._errorList = undefined;
|
|
7091
7073
|
this.state = {};
|
|
7092
7074
|
}
|
|
7093
7075
|
renderErrorList(errorList) {
|
|
7094
|
-
return (hAsync(KolAlertFc$1, { ref: (
|
|
7095
|
-
this.errorListBlock = el;
|
|
7096
|
-
}, type: "error", variant: "card", label: translate('kol-error-list-message') }, hAsync("nav", { "aria-label": translate('kol-error-list') }, hAsync("ul", null, errorList === null || errorList === void 0 ? void 0 : errorList.map((error, index) => (hAsync("li", { key: index }, hAsync(KolLinkWcTag, { _href: "", _label: error.message, _on: { onClick: typeof error.selector === 'string' ? () => this.handleLinkClick(String(error.selector)) : error.selector }, ref: (el) => {
|
|
7097
|
-
if (index === 0) {
|
|
7098
|
-
this.errorListFirstLink = el;
|
|
7099
|
-
}
|
|
7100
|
-
} }))))))));
|
|
7076
|
+
return (hAsync(KolAlertFc$1, { ref: this.setBlockElement, type: "error", variant: "card", label: translate('kol-error-list-message') }, hAsync("nav", { "aria-label": translate('kol-error-list') }, hAsync("ul", null, errorList === null || errorList === void 0 ? void 0 : errorList.map((error, index) => (hAsync("li", { key: index }, hAsync(KolLinkWcTag, { _href: "", _label: error.message, _on: { onClick: typeof error.selector === 'string' ? () => this.handleLinkClick(String(error.selector)) : error.selector }, ref: index === 0 ? this.setFirstLinkElement : undefined }))))))));
|
|
7101
7077
|
}
|
|
7102
7078
|
renderFormElement() {
|
|
7103
7079
|
return (hAsync("form", { method: "post", onSubmit: this.onSubmit, onReset: this.onReset, autoComplete: "off", noValidate: true }, this.state._requiredText === true ? (hAsync("p", null, hAsync("div", { class: "mandatory-fields-hint" }, translate('kol-form-description')))) : typeof this.state._requiredText === 'string' && this.state._requiredText.length > 0 ? (hAsync("p", null, hAsync("div", { class: "mandatory-fields-hint" }, this.state._requiredText))) : null, hAsync("slot", null)));
|
|
7104
7080
|
}
|
|
7105
7081
|
render() {
|
|
7106
7082
|
const hasErrorList = Array.isArray(this._errorList) && this._errorList.length > 0;
|
|
7107
|
-
return (hAsync(Host, { key: '
|
|
7083
|
+
return (hAsync(Host, { key: '24bab6abd04c6441e4299189ae81e408167b1db7', class: "kol-form" }, hasErrorList && this.renderErrorList(this._errorList), this.renderFormElement()));
|
|
7108
7084
|
}
|
|
7109
7085
|
scrollToErrorList() {
|
|
7110
7086
|
var _a;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/hydrate",
|
|
3
|
-
"version": "2.2.6-
|
|
3
|
+
"version": "2.2.6-rc.1",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"rimraf": "6.0.1",
|
|
49
|
-
"@public-ui/components": "2.2.6-
|
|
49
|
+
"@public-ui/components": "2.2.6-rc.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@public-ui/components": "2.2.6-
|
|
52
|
+
"@public-ui/components": "2.2.6-rc.1"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"type": "commonjs",
|