@descope/web-components-ui 1.124.0 → 1.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +48 -10
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +48 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -1
- package/dist/umd/descope-outbound-app-button.js +1 -1
- package/dist/umd/descope-outbound-app-button.js.map +1 -1
- package/package.json +3 -3
- package/src/components/descope-date-field/DateFieldClass.js +8 -5
- package/src/components/descope-date-field/helpers.js +16 -2
package/dist/cjs/index.cjs.js
CHANGED
@@ -15994,12 +15994,26 @@ const formatEpoch = (epoch, format) => {
|
|
15994
15994
|
};
|
15995
15995
|
|
15996
15996
|
// polyfill for safari Date API (which doesn't accept "YYYY-MM-DD" string as value)
|
15997
|
-
const newDate = (date) => {
|
15997
|
+
const newDate = (date, isUtcTime) => {
|
15998
15998
|
if (typeof date === 'number') {
|
15999
15999
|
return new Date(date);
|
16000
16000
|
}
|
16001
16001
|
if (typeof date === 'string') {
|
16002
|
-
|
16002
|
+
const d = new Date(date.replace(/-/g, '/'));
|
16003
|
+
if (isUtcTime) {
|
16004
|
+
return new Date(
|
16005
|
+
Date.UTC(
|
16006
|
+
d.getFullYear(),
|
16007
|
+
d.getMonth(),
|
16008
|
+
d.getDate(),
|
16009
|
+
d.getHours(),
|
16010
|
+
d.getMinutes(),
|
16011
|
+
d.getSeconds(),
|
16012
|
+
d.getMilliseconds()
|
16013
|
+
)
|
16014
|
+
);
|
16015
|
+
}
|
16016
|
+
return new Date(d);
|
16003
16017
|
}
|
16004
16018
|
return new Date();
|
16005
16019
|
};
|
@@ -17111,10 +17125,10 @@ class RawDateFieldClass extends BaseInputClass$2 {
|
|
17111
17125
|
};
|
17112
17126
|
|
17113
17127
|
updateEpoch(epochOrDate) {
|
17114
|
-
if (!epochOrDate) {
|
17128
|
+
if (Number.isNaN(epochOrDate) || !epochOrDate.toString()?.length) {
|
17115
17129
|
this.epoch = '';
|
17116
17130
|
} else {
|
17117
|
-
this.epoch = dateToEpoch(newDate(epochOrDate), this.isUtcTime);
|
17131
|
+
this.epoch = dateToEpoch(newDate(epochOrDate, this.isUtcTime), this.isUtcTime);
|
17118
17132
|
}
|
17119
17133
|
}
|
17120
17134
|
|
@@ -17243,7 +17257,7 @@ class RawDateFieldClass extends BaseInputClass$2 {
|
|
17243
17257
|
}
|
17244
17258
|
|
17245
17259
|
set value(val) {
|
17246
|
-
if (val) {
|
17260
|
+
if (!Number.isNaN(val)) {
|
17247
17261
|
this.updateEpoch(val);
|
17248
17262
|
this.updateDateCounters(newDate(val));
|
17249
17263
|
} else {
|
@@ -17739,7 +17753,10 @@ class RawDateFieldClass extends BaseInputClass$2 {
|
|
17739
17753
|
|
17740
17754
|
// we need to wait for the text-field to init
|
17741
17755
|
setTimeout(() => {
|
17742
|
-
|
17756
|
+
if (Number.isNaN(parseInt(val, 10))) {
|
17757
|
+
return;
|
17758
|
+
}
|
17759
|
+
this.value = Number(val);
|
17743
17760
|
});
|
17744
17761
|
}
|
17745
17762
|
|
@@ -17812,7 +17829,7 @@ class RawDateFieldClass extends BaseInputClass$2 {
|
|
17812
17829
|
year: '',
|
17813
17830
|
};
|
17814
17831
|
|
17815
|
-
if (
|
17832
|
+
if (Number.isNaN(this.epoch)) {
|
17816
17833
|
return ret;
|
17817
17834
|
}
|
17818
17835
|
|
@@ -22144,7 +22161,7 @@ class RawOutboundAppButton extends createBaseClass$1({
|
|
22144
22161
|
baseSelector: ':host > descope-button',
|
22145
22162
|
}) {
|
22146
22163
|
static get observedAttributes() {
|
22147
|
-
return ['label', 'icon-src'];
|
22164
|
+
return ['label', 'icon-src', 'icon-fill-current-color'];
|
22148
22165
|
}
|
22149
22166
|
|
22150
22167
|
constructor() {
|
@@ -22174,7 +22191,15 @@ class RawOutboundAppButton extends createBaseClass$1({
|
|
22174
22191
|
init() {
|
22175
22192
|
super.init?.();
|
22176
22193
|
|
22177
|
-
forwardAttrs(this, this.button, {
|
22194
|
+
forwardAttrs(this, this.button, {
|
22195
|
+
excludeAttrs: [
|
22196
|
+
'style',
|
22197
|
+
'class',
|
22198
|
+
'label',
|
22199
|
+
'icon-src',
|
22200
|
+
'icon-fill-current-color',
|
22201
|
+
]
|
22202
|
+
});
|
22178
22203
|
}
|
22179
22204
|
|
22180
22205
|
updateLabel(val = '') {
|
@@ -22203,7 +22228,14 @@ class RawOutboundAppButton extends createBaseClass$1({
|
|
22203
22228
|
const OutboundAppButtonClass = compose(
|
22204
22229
|
createStyleMixin$1({
|
22205
22230
|
mappings: {
|
22206
|
-
hostWidth: {
|
22231
|
+
hostWidth: {
|
22232
|
+
selector: () => ':host',
|
22233
|
+
property: 'width'
|
22234
|
+
},
|
22235
|
+
iconFillCurrentColor: {
|
22236
|
+
selector: () => 'descope-icon',
|
22237
|
+
property: ButtonClass.cssVarList.iconColor
|
22238
|
+
}
|
22207
22239
|
},
|
22208
22240
|
}),
|
22209
22241
|
draggableMixin$1,
|
@@ -22213,6 +22245,12 @@ const OutboundAppButtonClass = compose(
|
|
22213
22245
|
const compVars = OutboundAppButtonClass.cssVarList;
|
22214
22246
|
|
22215
22247
|
const outboundAppButton = {
|
22248
|
+
[compVars.iconFill]: 'inherit',
|
22249
|
+
|
22250
|
+
_iconFillCurrentColor: {
|
22251
|
+
[compVars.iconFillCurrentColor]: 'currentColor',
|
22252
|
+
},
|
22253
|
+
|
22216
22254
|
_fullWidth: {
|
22217
22255
|
[compVars.hostWidth]: '100%',
|
22218
22256
|
},
|