directual-web-components-v2 3.11.332 → 3.11.333
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.css +13 -13
- package/dist/index.js +45 -13
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +45 -13
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -9369,7 +9369,7 @@ div._x81-m._xmAnF h2 {
|
|
|
9369
9369
|
background: var(--table-raw-hover, rgba(5, 142, 252, 0.05));
|
|
9370
9370
|
}
|
|
9371
9371
|
._1ReXH ._1r7Ng {
|
|
9372
|
-
color: var(--hint-error, #ff525b);
|
|
9372
|
+
color: var(--custom-danger-color, var(--hint-error, #ff525b));
|
|
9373
9373
|
}
|
|
9374
9374
|
._3lcLW {
|
|
9375
9375
|
display: flex;
|
|
@@ -9403,7 +9403,7 @@ div._x81-m._xmAnF h2 {
|
|
|
9403
9403
|
min-width: 22px;
|
|
9404
9404
|
height: 22px;
|
|
9405
9405
|
padding: 0 6px;
|
|
9406
|
-
background: var(--layout-accent, #058efc);
|
|
9406
|
+
background: var(--custom-primary-color, var(--layout-accent, #058efc));
|
|
9407
9407
|
color: white;
|
|
9408
9408
|
border-radius: 11px;
|
|
9409
9409
|
font-weight: 600;
|
|
@@ -9415,7 +9415,7 @@ div._x81-m._xmAnF h2 {
|
|
|
9415
9415
|
opacity: 0.5;
|
|
9416
9416
|
}
|
|
9417
9417
|
._3HMTt {
|
|
9418
|
-
background: var(--hint-error, #ff525b);
|
|
9418
|
+
background: var(--custom-danger-color, var(--hint-error, #ff525b));
|
|
9419
9419
|
}
|
|
9420
9420
|
._1crO6 {
|
|
9421
9421
|
font-size: 12px;
|
|
@@ -9455,7 +9455,7 @@ div._x81-m._xmAnF h2 {
|
|
|
9455
9455
|
user-select: none;
|
|
9456
9456
|
}
|
|
9457
9457
|
._87MAN:hover {
|
|
9458
|
-
border-color: var(--layout-accent, #058efc);
|
|
9458
|
+
border-color: var(--custom-primary-color, var(--layout-accent, #058efc));
|
|
9459
9459
|
box-shadow: 0 2px 8px rgba(5, 142, 252, 0.15);
|
|
9460
9460
|
transform: translateY(-1px);
|
|
9461
9461
|
}
|
|
@@ -9463,18 +9463,18 @@ div._x81-m._xmAnF h2 {
|
|
|
9463
9463
|
cursor: grabbing;
|
|
9464
9464
|
}
|
|
9465
9465
|
._2iAUQ {
|
|
9466
|
-
border-color: var(--hint-error, #ff525b);
|
|
9466
|
+
border-color: var(--custom-danger-color, var(--hint-error, #ff525b));
|
|
9467
9467
|
}
|
|
9468
9468
|
._2iAUQ:hover {
|
|
9469
|
-
border-color: var(--hint-error, #ff525b);
|
|
9469
|
+
border-color: var(--custom-danger-color, var(--hint-error, #ff525b));
|
|
9470
9470
|
box-shadow: 0 2px 8px rgba(255, 82, 91, 0.2);
|
|
9471
9471
|
}
|
|
9472
9472
|
._2iAUQ ._1DWib {
|
|
9473
9473
|
background: rgba(255, 82, 91, 0.1);
|
|
9474
|
-
color: var(--hint-error, #ff525b);
|
|
9474
|
+
color: var(--custom-danger-color, var(--hint-error, #ff525b));
|
|
9475
9475
|
}
|
|
9476
9476
|
._2iAUQ ._35zym {
|
|
9477
|
-
color: var(--hint-error, #ff525b);
|
|
9477
|
+
color: var(--custom-danger-color, var(--hint-error, #ff525b));
|
|
9478
9478
|
}
|
|
9479
9479
|
._2MxuX {
|
|
9480
9480
|
opacity: 0.6;
|
|
@@ -9492,17 +9492,17 @@ div._x81-m._xmAnF h2 {
|
|
|
9492
9492
|
line-height: 1;
|
|
9493
9493
|
}
|
|
9494
9494
|
._2rctI {
|
|
9495
|
-
color: var(--layout-accent, #058efc) !important;
|
|
9495
|
+
color: var(--custom-primary-color, var(--layout-accent, #058efc)) !important;
|
|
9496
9496
|
}
|
|
9497
9497
|
._2K_cd {
|
|
9498
|
-
color: var(--hint-error, #ff525b) !important;
|
|
9498
|
+
color: var(--custom-danger-color, var(--hint-error, #ff525b)) !important;
|
|
9499
9499
|
}
|
|
9500
9500
|
._38bqC {
|
|
9501
9501
|
color: var(--form-placeholder-disabled, #999) !important;
|
|
9502
9502
|
opacity: 0.5;
|
|
9503
9503
|
}
|
|
9504
9504
|
._1U-yM {
|
|
9505
|
-
border-color: var(--layout-accent, #058efc);
|
|
9505
|
+
border-color: var(--custom-primary-color, var(--layout-accent, #058efc));
|
|
9506
9506
|
box-shadow: 0 8px 24px rgba(5, 142, 252, 0.25);
|
|
9507
9507
|
transform: rotate(2deg) scale(1.02);
|
|
9508
9508
|
opacity: 0.9;
|
|
@@ -9513,7 +9513,7 @@ div._x81-m._xmAnF h2 {
|
|
|
9513
9513
|
height: 36px;
|
|
9514
9514
|
border-radius: 50%;
|
|
9515
9515
|
background: var(--table-raw-hover, rgba(5, 142, 252, 0.05));
|
|
9516
|
-
color: var(--layout-accent, #058efc);
|
|
9516
|
+
color: var(--custom-primary-color, var(--layout-accent, #058efc));
|
|
9517
9517
|
display: flex;
|
|
9518
9518
|
align-items: center;
|
|
9519
9519
|
justify-content: center;
|
|
@@ -9553,7 +9553,7 @@ div._x81-m._xmAnF h2 {
|
|
|
9553
9553
|
}
|
|
9554
9554
|
._35zym {
|
|
9555
9555
|
flex-shrink: 0;
|
|
9556
|
-
color: var(--layout-accent, #058efc);
|
|
9556
|
+
color: var(--custom-primary-color, var(--layout-accent, #058efc));
|
|
9557
9557
|
font-size: 20px;
|
|
9558
9558
|
line-height: 1;
|
|
9559
9559
|
opacity: 0.4;
|
package/dist/index.js
CHANGED
|
@@ -27869,14 +27869,18 @@ var styles$Q = {"calendar_wrapper":"_1Kd9p","tableLoadingOverlay":"_171jy","tabl
|
|
|
27869
27869
|
|
|
27870
27870
|
var styles$R = {"cardWeekGrid":"_3p51p","dayColumn":"_24AHL","dayColumnToday":"_2l38a","dayColumnHoliday":"_D_Zbr","dayHeader":"_2U9B_","dayHeaderToday":"_1QfDv","dayHeaderHoliday":"_1ReXH","dayOfWeek":"_1r7Ng","dayName":"_3lcLW","dayDate":"_1z3Am","dayStats":"_kipu5","counterBadge":"_73OWS","counterBadgeEmpty":"_1sGEE","counterBadgeOverflow":"_3HMTt","counterSlots":"_1crO6","dayOccupancy":"_3XUof","eventsList":"_2mTXM","eventsListDragOver":"_1AX7i","eventCard":"_87MAN","eventCardOverflow":"_2iAUQ","avatar":"_1DWib","eventArrow":"_35zym","eventCardInactive":"_2MxuX","statusDot":"_bMgwj","statusDotActive":"_2rctI","statusDotOverflow":"_2K_cd","statusDotInactive":"_38bqC","eventCardDragging":"_1U-yM","avatarImg":"_39viT","eventInfo":"_3soOX","eventTitle":"_2qD-g","eventRole":"_7KTAx"};
|
|
27871
27871
|
|
|
27872
|
-
const _excluded$9 = ["date", "events", "onSelectEvent", "onSelectSlot", "localizer", "culture", "dailySlots", "getSlotsForDay", "showNewEventButton", "showWeekends", "cardWeekDragEnabled", "cardWeekOnEventDrop", "onEventDrop", "isEventActive"];
|
|
27872
|
+
const _excluded$9 = ["date", "events", "onSelectEvent", "onSelectSlot", "localizer", "culture", "dailySlots", "getSlotsForDay", "showNewEventButton", "showWeekends", "cardWeekDragEnabled", "cardWeekOnEventDrop", "onEventDrop", "showAvatar", "showDotInCardWeek", "primaryColor", "dangerColor", "isEventActive"];
|
|
27873
27873
|
const EventCard = _ref => {
|
|
27874
27874
|
let {
|
|
27875
27875
|
event,
|
|
27876
27876
|
onSelect,
|
|
27877
27877
|
provided,
|
|
27878
27878
|
isDragging,
|
|
27879
|
-
status = 'active'
|
|
27879
|
+
status = 'active',
|
|
27880
|
+
primaryColor = '',
|
|
27881
|
+
dangerColor = '',
|
|
27882
|
+
showAvatar = true,
|
|
27883
|
+
showDotInCardWeek = true
|
|
27880
27884
|
} = _ref;
|
|
27881
27885
|
const firstLetter = (event.title || 'U')[0].toUpperCase();
|
|
27882
27886
|
const cardClassName = [styles$R.eventCard, isDragging ? styles$R.eventCardDragging : '', status === 'overflow' ? styles$R.eventCardOverflow : '', status === 'inactive' ? styles$R.eventCardInactive : ''].filter(Boolean).join(' ');
|
|
@@ -27886,10 +27890,14 @@ const EventCard = _ref => {
|
|
|
27886
27890
|
}, provided.draggableProps, provided.dragHandleProps, {
|
|
27887
27891
|
className: cardClassName,
|
|
27888
27892
|
onClick: e => onSelect && onSelect(event, e),
|
|
27889
|
-
title: event.title
|
|
27890
|
-
|
|
27893
|
+
title: event.title,
|
|
27894
|
+
style: {
|
|
27895
|
+
'--custom-primary-color': primaryColor || 'var(--layout-accent, #058efc)',
|
|
27896
|
+
'--custom-danger-color': dangerColor || 'var(--hint-error, #ff525b)'
|
|
27897
|
+
}
|
|
27898
|
+
}), showDotInCardWeek && /*#__PURE__*/React__default.createElement("div", {
|
|
27891
27899
|
className: dotClassName
|
|
27892
|
-
}, "\u25CF"), /*#__PURE__*/React__default.createElement("div", {
|
|
27900
|
+
}, "\u25CF"), showAvatar && /*#__PURE__*/React__default.createElement("div", {
|
|
27893
27901
|
className: styles$R.avatar
|
|
27894
27902
|
}, event.avatarUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
27895
27903
|
src: event.avatarUrl,
|
|
@@ -27919,6 +27927,10 @@ const CardWeekView = _ref2 => {
|
|
|
27919
27927
|
cardWeekDragEnabled = true,
|
|
27920
27928
|
cardWeekOnEventDrop,
|
|
27921
27929
|
onEventDrop,
|
|
27930
|
+
showAvatar = true,
|
|
27931
|
+
showDotInCardWeek = true,
|
|
27932
|
+
primaryColor = '',
|
|
27933
|
+
dangerColor = '',
|
|
27922
27934
|
isEventActive = null
|
|
27923
27935
|
} = _ref2,
|
|
27924
27936
|
rest = _objectWithoutPropertiesLoose(_ref2, _excluded$9);
|
|
@@ -28037,14 +28049,16 @@ const CardWeekView = _ref2 => {
|
|
|
28037
28049
|
}, day.format('dd')), /*#__PURE__*/React__default.createElement("span", {
|
|
28038
28050
|
className: styles$R.dayDate
|
|
28039
28051
|
}, day.format('DD.MM'))), /*#__PURE__*/React__default.createElement("div", {
|
|
28040
|
-
className: styles$R.dayStats
|
|
28052
|
+
className: styles$R.dayStats,
|
|
28053
|
+
style: {
|
|
28054
|
+
'--custom-primary-color': primaryColor || 'var(--layout-accent, #058efc)',
|
|
28055
|
+
'--custom-danger-color': dangerColor || 'var(--hint-error, #ff525b)'
|
|
28056
|
+
}
|
|
28041
28057
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
28042
28058
|
className: badgeClass
|
|
28043
28059
|
}, activeCount), /*#__PURE__*/React__default.createElement("span", {
|
|
28044
28060
|
className: styles$R.counterSlots
|
|
28045
|
-
}, "/ ", slotsForDay)), /*#__PURE__*/React__default.createElement(
|
|
28046
|
-
className: styles$R.dayOccupancy
|
|
28047
|
-
}, activeCount, "/", slotsForDay, " \u0437\u0430\u043D\u044F\u0442\u043E")), dragEnabled ? /*#__PURE__*/React__default.createElement(reactBeautifulDnd.Droppable, {
|
|
28061
|
+
}, "/ ", slotsForDay))), dragEnabled ? /*#__PURE__*/React__default.createElement(reactBeautifulDnd.Droppable, {
|
|
28048
28062
|
droppableId: key
|
|
28049
28063
|
}, (provided, snapshot) => /*#__PURE__*/React__default.createElement("div", _extends({
|
|
28050
28064
|
ref: provided.innerRef
|
|
@@ -28064,7 +28078,11 @@ const CardWeekView = _ref2 => {
|
|
|
28064
28078
|
status: status,
|
|
28065
28079
|
onSelect: onSelectEvent,
|
|
28066
28080
|
provided: provided,
|
|
28067
|
-
|
|
28081
|
+
showAvatar: showAvatar,
|
|
28082
|
+
showDotInCardWeek: showDotInCardWeek,
|
|
28083
|
+
isDragging: snapshot.isDragging,
|
|
28084
|
+
primaryColor: primaryColor,
|
|
28085
|
+
dangerColor: dangerColor
|
|
28068
28086
|
}));
|
|
28069
28087
|
}), provided.placeholder)) : /*#__PURE__*/React__default.createElement("div", {
|
|
28070
28088
|
className: styles$R.eventsList
|
|
@@ -28078,12 +28096,16 @@ const CardWeekView = _ref2 => {
|
|
|
28078
28096
|
event: event,
|
|
28079
28097
|
status: status,
|
|
28080
28098
|
onSelect: onSelectEvent,
|
|
28099
|
+
showAvatar: showAvatar,
|
|
28100
|
+
showDotInCardWeek: showDotInCardWeek,
|
|
28081
28101
|
provided: {
|
|
28082
28102
|
innerRef: () => {},
|
|
28083
28103
|
draggableProps: {},
|
|
28084
28104
|
dragHandleProps: {}
|
|
28085
28105
|
},
|
|
28086
|
-
isDragging: false
|
|
28106
|
+
isDragging: false,
|
|
28107
|
+
primaryColor: primaryColor,
|
|
28108
|
+
dangerColor: dangerColor
|
|
28087
28109
|
});
|
|
28088
28110
|
})));
|
|
28089
28111
|
};
|
|
@@ -28140,7 +28162,7 @@ function BigCalendar(props) {
|
|
|
28140
28162
|
callEndpoint,
|
|
28141
28163
|
handleModalRoute
|
|
28142
28164
|
} = props;
|
|
28143
|
-
console.log("props: \n\n ".concat(JSON.stringify(data)));
|
|
28165
|
+
console.log("props: \n\n ".concat(JSON.stringify(_$1__default.get(data, "params", ""))));
|
|
28144
28166
|
const [loading, setLoading] = React.useState(false);
|
|
28145
28167
|
const lang = locale ? locale.length == 3 ? locale : 'ENG' : 'ENG';
|
|
28146
28168
|
const culture = cultures[lang];
|
|
@@ -28156,8 +28178,10 @@ function BigCalendar(props) {
|
|
|
28156
28178
|
const [hasChanges, setHasChanges] = React.useState(false);
|
|
28157
28179
|
const [slotRules, setSlotRules] = React.useState(null);
|
|
28158
28180
|
const [dql, setDQL] = React.useState('');
|
|
28181
|
+
const [sort, setSort] = React.useState({});
|
|
28159
28182
|
function performFiltering(newDql, newSort) {
|
|
28160
28183
|
setDQL(prev => prev === (newDql || '') ? prev : newDql || '');
|
|
28184
|
+
setSort(prev => _$1__default.isEqual(prev, newSort) ? prev : newSort);
|
|
28161
28185
|
}
|
|
28162
28186
|
const dqlService = React.useMemo(() => _$1__default.debounce(performFiltering, 600), []);
|
|
28163
28187
|
const [visibleRange, setVisibleRange] = React.useState({
|
|
@@ -28181,6 +28205,8 @@ function BigCalendar(props) {
|
|
|
28181
28205
|
const showResize = _$1__default.get(data, "params.general.onResize", true);
|
|
28182
28206
|
const showNewEventButton = _$1__default.get(data, "params.general.showNewEventButton", true);
|
|
28183
28207
|
const mappingFields = _$1__default.get(data, "params.mapping", {});
|
|
28208
|
+
const showAvatar = _$1__default.get(data, "params.general.showAvatar", true);
|
|
28209
|
+
const showDotInCardWeek = _$1__default.get(data, "params.general.showDotInCardWeek", true);
|
|
28184
28210
|
const hideViewSelector = _$1__default.get(data, "params.view.hideViewSelector", false);
|
|
28185
28211
|
const availableViews = _$1__default.get(data, "params.view.availableViews", ["month", "week", "day", "card_week"]);
|
|
28186
28212
|
const dailySlots = _$1__default.get(data, "params.view.dailySlots", 15);
|
|
@@ -28198,6 +28224,8 @@ function BigCalendar(props) {
|
|
|
28198
28224
|
const mapping_slots = _$1__default.get(data, "params.conditions.cardWeek.mapping.slots", "");
|
|
28199
28225
|
const mapping_isHoliday = _$1__default.get(data, "params.conditions.cardWeek.mapping.isHoliday", "");
|
|
28200
28226
|
const mapping_note = _$1__default.get(data, "params.conditions.cardWeek.mapping.note", "");
|
|
28227
|
+
const primaryColor = _$1__default.get(data, "params.conditions.cardWeek.primaryColor", '');
|
|
28228
|
+
const dangerColor = _$1__default.get(data, "params.conditions.cardWeek.dangerColor", '');
|
|
28201
28229
|
const actionsSettings = _$1__default.get(data, "params.actions", []);
|
|
28202
28230
|
React.useEffect(() => getEventsFromAPI(), [visibleRange, currentView, dql]);
|
|
28203
28231
|
const formats = {
|
|
@@ -28301,7 +28329,7 @@ function BigCalendar(props) {
|
|
|
28301
28329
|
title: event[mappingFields.titleField],
|
|
28302
28330
|
description: event[mappingFields.descriptionField],
|
|
28303
28331
|
author: event[mappingFields.userField],
|
|
28304
|
-
avatarUrl: _$1__default.get(event, mappingFields.userField.replace('{{', '').replace('}}', '')
|
|
28332
|
+
avatarUrl: showAvatar && _$1__default.get(event, mappingFields.userField + ".userpic", '{{}}').replace('{{', '').replace('}}', '')
|
|
28305
28333
|
});
|
|
28306
28334
|
});
|
|
28307
28335
|
const validEvents = _$1__default.filter(events, isValidEvent);
|
|
@@ -28666,6 +28694,10 @@ function BigCalendar(props) {
|
|
|
28666
28694
|
showWeekends: showWeekends,
|
|
28667
28695
|
cardWeekDragEnabled: showDragAndDrop,
|
|
28668
28696
|
cardWeekOnEventDrop: setEventChange,
|
|
28697
|
+
showAvatar: showAvatar,
|
|
28698
|
+
showDotInCardWeek: showDotInCardWeek,
|
|
28699
|
+
primaryColor: primaryColor,
|
|
28700
|
+
dangerColor: dangerColor,
|
|
28669
28701
|
isEventActive: conditionOne ? event => evaluateCondition(conditionOne, event) : null
|
|
28670
28702
|
}));
|
|
28671
28703
|
Wrapper.title = CardWeekView.title;
|