@licklist/design 0.70.0-dev.3 → 0.70.0-dev.5
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/assets/iframe/available.svg +4 -4
- package/dist/assets/iframe/available.svg.js +16 -18
- package/dist/availability-indicator/AvailabilityIndicator.d.ts +3 -1
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -1
- package/dist/availability-indicator/AvailabilityIndicator.js +112 -18
- package/dist/calendar/Calendar.d.ts +2 -0
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +3 -2
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.d.ts.map +1 -1
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.js +14 -0
- package/dist/date-time-button/DateTimeButton.d.ts +3 -1
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +2 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts +3 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +5 -3
- package/dist/snippet/snippet-template/preview/Preview.js +1 -0
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
- package/dist/styles/date-time-button/DateTimeButton.scss +1 -1
- package/package.json +3 -3
- package/src/assets/iframe/available.svg +4 -4
- package/src/availability-indicator/AvailabilityIndicator.tsx +91 -16
- package/src/calendar/Calendar.tsx +2 -0
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +3 -0
- package/src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx +16 -1
- package/src/date-time-button/DateTimeButton.tsx +4 -0
- package/src/iframe/activity-card/ActivityCard.tsx +15 -2
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
- package/src/styles/date-time-button/DateTimeButton.scss +1 -1
- package/yarn.lock +225 -191
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
4
|
-
<rect x="
|
|
1
|
+
<svg viewBox="auto" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="14%" y="0" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
3
|
+
<rect x="14%" y="33%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
4
|
+
<rect x="14%" y="66%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
5
5
|
</svg>
|
|
@@ -4,33 +4,31 @@ var _rect, _rect2, _rect3;
|
|
|
4
4
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
5
|
const SvgAvailable = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fill: "none"
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "auto"
|
|
10
9
|
}, props), _rect || (_rect = /*#__PURE__*/React.createElement("rect", {
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
13
|
-
x:
|
|
14
|
-
y: 1.037,
|
|
10
|
+
width: "63%",
|
|
11
|
+
height: "29%",
|
|
12
|
+
x: "14%",
|
|
15
13
|
fill: "#4CF973",
|
|
16
14
|
stroke: "#fff",
|
|
17
|
-
rx:
|
|
15
|
+
rx: "15%"
|
|
18
16
|
})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement("rect", {
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
21
|
-
x:
|
|
22
|
-
y:
|
|
17
|
+
width: "63%",
|
|
18
|
+
height: "29%",
|
|
19
|
+
x: "14%",
|
|
20
|
+
y: "33%",
|
|
23
21
|
fill: "#4CF973",
|
|
24
22
|
stroke: "#fff",
|
|
25
|
-
rx:
|
|
23
|
+
rx: "15%"
|
|
26
24
|
})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement("rect", {
|
|
27
|
-
width:
|
|
28
|
-
height:
|
|
29
|
-
x:
|
|
30
|
-
y:
|
|
25
|
+
width: "63%",
|
|
26
|
+
height: "29%",
|
|
27
|
+
x: "14%",
|
|
28
|
+
y: "66%",
|
|
31
29
|
fill: "#4CF973",
|
|
32
30
|
stroke: "#fff",
|
|
33
|
-
rx:
|
|
31
|
+
rx: "15%"
|
|
34
32
|
})));
|
|
35
33
|
|
|
36
34
|
export { SvgAvailable as ReactComponent };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
2
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
2
3
|
type AvailabilityIndicatorProps = {
|
|
3
4
|
resources: ZoneResourcesAvailability;
|
|
4
5
|
isUnavailable?: boolean;
|
|
5
6
|
isSoldOut?: boolean;
|
|
7
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
6
8
|
};
|
|
7
|
-
export declare const AvailabilityIndicator: ({ resources, isUnavailable, isSoldOut, }: AvailabilityIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const AvailabilityIndicator: ({ resources, isUnavailable, isSoldOut: _isSoldOut, availabilityFormat, }: AvailabilityIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=AvailabilityIndicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvailabilityIndicator.d.ts","sourceRoot":"","sources":["../../src/availability-indicator/AvailabilityIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;
|
|
1
|
+
{"version":3,"file":"AvailabilityIndicator.d.ts","sourceRoot":"","sources":["../../src/availability-indicator/AvailabilityIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAEL,kBAAkB,EACnB,MAAM,2DAA2D,CAAA;AAuFlE,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,yBAAyB,CAAA;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,qBAAqB,6EAK/B,0BAA0B,4CAwB5B,CAAA"}
|
|
@@ -1,40 +1,117 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { AVAILABILITY_FORMAT_NUMBER } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
4
|
+
import { useWindowDimensions } from '@licklist/plugins';
|
|
3
5
|
import { ReactComponent as SvgAvailable } from '../assets/iframe/available.svg.js';
|
|
4
6
|
import { ReactComponent as SvgLimited } from '../assets/iframe/limited.svg.js';
|
|
5
7
|
import { ReactComponent as SvgSoldOut } from '../assets/iframe/soldOut.svg.js';
|
|
8
|
+
import { TAB_WIDTH } from '../iframe/page/components/PageBody/constants.js';
|
|
6
9
|
|
|
10
|
+
function _define_property(obj, key, value) {
|
|
11
|
+
if (key in obj) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
value: value,
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
obj[key] = value;
|
|
20
|
+
}
|
|
21
|
+
return obj;
|
|
22
|
+
}
|
|
23
|
+
function _object_spread(target) {
|
|
24
|
+
for(var i = 1; i < arguments.length; i++){
|
|
25
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
26
|
+
var ownKeys = Object.keys(source);
|
|
27
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
28
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
29
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
ownKeys.forEach(function(key) {
|
|
33
|
+
_define_property(target, key, source[key]);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
}
|
|
38
|
+
function ownKeys(object, enumerableOnly) {
|
|
39
|
+
var keys = Object.keys(object);
|
|
40
|
+
if (Object.getOwnPropertySymbols) {
|
|
41
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
42
|
+
if (enumerableOnly) {
|
|
43
|
+
symbols = symbols.filter(function(sym) {
|
|
44
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
keys.push.apply(keys, symbols);
|
|
48
|
+
}
|
|
49
|
+
return keys;
|
|
50
|
+
}
|
|
51
|
+
function _object_spread_props(target, source) {
|
|
52
|
+
source = source != null ? source : {};
|
|
53
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
54
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
55
|
+
} else {
|
|
56
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
57
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return target;
|
|
61
|
+
}
|
|
7
62
|
var LOTS_OF_SPACE_LIMIT = 0.2;
|
|
8
63
|
var LIMITED_LIMIT = 0.8;
|
|
9
|
-
var
|
|
10
|
-
var bookedResources = param.bookedResources, totalResources = param.totalResources;
|
|
11
|
-
|
|
64
|
+
var getLabelsWithArgument = function(param) {
|
|
65
|
+
var bookedResources = param.bookedResources, totalResources = param.totalResources, availabilityFormat = param.availabilityFormat, label = param.label;
|
|
66
|
+
var availableResources = totalResources - bookedResources;
|
|
67
|
+
if (availabilityFormat !== AVAILABILITY_FORMAT_NUMBER) {
|
|
12
68
|
return {
|
|
13
|
-
label:
|
|
14
|
-
Icon: SvgSoldOut
|
|
69
|
+
label: label
|
|
15
70
|
};
|
|
16
71
|
}
|
|
72
|
+
return availableResources === 1 ? {
|
|
73
|
+
label: 'availableSingleResource'
|
|
74
|
+
} : {
|
|
75
|
+
label: 'availableMultipleResources',
|
|
76
|
+
argument: availableResources
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
var getIconsAndLabelsWithArgument = function(param) {
|
|
80
|
+
var bookedResources = param.bookedResources, totalResources = param.totalResources, availabilityFormat = param.availabilityFormat;
|
|
17
81
|
// lots of space if less than 80% booked
|
|
18
82
|
if (bookedResources / totalResources <= LOTS_OF_SPACE_LIMIT) {
|
|
19
|
-
return {
|
|
20
|
-
|
|
83
|
+
return _object_spread_props(_object_spread({}, getLabelsWithArgument({
|
|
84
|
+
bookedResources: bookedResources,
|
|
85
|
+
totalResources: totalResources,
|
|
86
|
+
availabilityFormat: availabilityFormat,
|
|
87
|
+
label: 'lotsOfSpace'
|
|
88
|
+
})), {
|
|
21
89
|
Icon: SvgAvailable
|
|
22
|
-
};
|
|
90
|
+
});
|
|
23
91
|
}
|
|
24
92
|
if (bookedResources / totalResources >= LIMITED_LIMIT) {
|
|
25
|
-
return {
|
|
26
|
-
|
|
93
|
+
return _object_spread_props(_object_spread({}, getLabelsWithArgument({
|
|
94
|
+
bookedResources: bookedResources,
|
|
95
|
+
totalResources: totalResources,
|
|
96
|
+
availabilityFormat: availabilityFormat,
|
|
97
|
+
label: 'limited'
|
|
98
|
+
})), {
|
|
27
99
|
Icon: SvgLimited
|
|
28
|
-
};
|
|
100
|
+
});
|
|
29
101
|
}
|
|
30
|
-
return {
|
|
31
|
-
|
|
102
|
+
return _object_spread_props(_object_spread({}, getLabelsWithArgument({
|
|
103
|
+
bookedResources: bookedResources,
|
|
104
|
+
totalResources: totalResources,
|
|
105
|
+
availabilityFormat: availabilityFormat,
|
|
106
|
+
label: 'available'
|
|
107
|
+
})), {
|
|
32
108
|
Icon: SvgAvailable
|
|
33
|
-
};
|
|
109
|
+
});
|
|
34
110
|
};
|
|
35
111
|
var AvailabilityIndicator = function(param) {
|
|
36
|
-
var resources = param.resources, isUnavailable = param.isUnavailable, isSoldOut = param.
|
|
112
|
+
var resources = param.resources, isUnavailable = param.isUnavailable, _isSoldOut = param.isSoldOut, availabilityFormat = param.availabilityFormat;
|
|
37
113
|
var t = useTranslation('Design').t;
|
|
114
|
+
var isSoldOut = _isSoldOut || resources.bookedResources === resources.totalResources;
|
|
38
115
|
if (isUnavailable) {
|
|
39
116
|
return /*#__PURE__*/ jsx(Indicator, {
|
|
40
117
|
Icon: SvgSoldOut,
|
|
@@ -47,19 +124,36 @@ var AvailabilityIndicator = function(param) {
|
|
|
47
124
|
label: t('soldOut')
|
|
48
125
|
});
|
|
49
126
|
}
|
|
50
|
-
var
|
|
127
|
+
var _getIconsAndLabelsWithArgument = getIconsAndLabelsWithArgument(_object_spread_props(_object_spread({}, resources), {
|
|
128
|
+
availabilityFormat: availabilityFormat
|
|
129
|
+
})), Icon = _getIconsAndLabelsWithArgument.Icon, label = _getIconsAndLabelsWithArgument.label, argument = _getIconsAndLabelsWithArgument.argument;
|
|
51
130
|
return /*#__PURE__*/ jsx(Indicator, {
|
|
52
131
|
Icon: Icon,
|
|
53
|
-
label: t(label
|
|
132
|
+
label: t(label, argument ? {
|
|
133
|
+
argument: argument
|
|
134
|
+
} : undefined)
|
|
54
135
|
});
|
|
55
136
|
};
|
|
56
137
|
var Indicator = function(param) {
|
|
57
138
|
var Icon = param.Icon, label = param.label;
|
|
139
|
+
var width = useWindowDimensions().width;
|
|
140
|
+
var iconSizes = width > TAB_WIDTH ? {
|
|
141
|
+
height: 15,
|
|
142
|
+
width: 11
|
|
143
|
+
} : {
|
|
144
|
+
height: 11,
|
|
145
|
+
width: 7
|
|
146
|
+
};
|
|
58
147
|
return /*#__PURE__*/ jsxs("div", {
|
|
59
148
|
className: "availability-indicator",
|
|
60
149
|
children: [
|
|
61
|
-
/*#__PURE__*/ jsx(Icon, {
|
|
150
|
+
/*#__PURE__*/ jsx(Icon, {
|
|
151
|
+
height: iconSizes.height,
|
|
152
|
+
width: iconSizes.width,
|
|
153
|
+
viewBox: "auto"
|
|
154
|
+
}),
|
|
62
155
|
/*#__PURE__*/ jsx("div", {
|
|
156
|
+
className: "indicator-label",
|
|
63
157
|
children: label
|
|
64
158
|
})
|
|
65
159
|
]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, ReactElement, SetStateAction } from 'react';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
3
4
|
import { DateTimeButtonProps } from 'src/date-time-button';
|
|
4
5
|
export declare const defaultStartDay: DateTime<true>;
|
|
5
6
|
export type CalendarProps = {
|
|
@@ -11,6 +12,7 @@ export type CalendarProps = {
|
|
|
11
12
|
fromPrice?: string | ReactElement | null;
|
|
12
13
|
isLoading?: boolean;
|
|
13
14
|
initialDate?: DateTime;
|
|
15
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
14
16
|
getDateTimeButtonProps: (date: DateTime) => Pick<DateTimeButtonProps, 'resources' | 'showResources' | 'isDisabled'>;
|
|
15
17
|
};
|
|
16
18
|
export declare const Calendar: (props: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK1D,eAAO,MAAM,eAAe,gBAK1B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,QAAQ,CAAA;IACrB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAA;IAClD,aAAa,EAAE,QAAQ,EAAE,CAAA;IACzB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC7B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,sBAAsB,EAAE,CACtB,IAAI,EAAE,QAAQ,KACX,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC,CAAA;CAC7E,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAW5C,CAAA"}
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK1D,eAAO,MAAM,eAAe,gBAK1B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,QAAQ,CAAA;IACrB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAA;IAClD,aAAa,EAAE,QAAQ,EAAE,CAAA;IACzB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC7B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAC9C,sBAAsB,EAAE,CACtB,IAAI,EAAE,QAAQ,KACX,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC,CAAA;CAC7E,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAW5C,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CalendarProps } from '../../Calendar';
|
|
2
|
-
export type CalendarDatesProps = Pick<CalendarProps, 'calendarDates' | 'selectedDate' | 'setSelectedDate' | 'fromPrice' | 'getDateTimeButtonProps'>;
|
|
3
|
-
export declare const CalendarDates: ({ calendarDates, selectedDate, setSelectedDate, fromPrice, getDateTimeButtonProps, }: CalendarDatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export type CalendarDatesProps = Pick<CalendarProps, 'calendarDates' | 'selectedDate' | 'setSelectedDate' | 'fromPrice' | 'getDateTimeButtonProps' | 'availabilityFormat'>;
|
|
3
|
+
export declare const CalendarDates: ({ calendarDates, selectedDate, setSelectedDate, fromPrice, availabilityFormat, getDateTimeButtonProps, }: CalendarDatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=CalendarDates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,
|
|
1
|
+
{"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,GACxB,oBAAoB,CACvB,CAAA;AAED,eAAO,MAAM,aAAa,6GAOvB,kBAAkB,4CA6CpB,CAAA"}
|
|
@@ -57,7 +57,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
57
57
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
58
58
|
}
|
|
59
59
|
var CalendarDates = function(param) {
|
|
60
|
-
var calendarDates = param.calendarDates, selectedDate = param.selectedDate, setSelectedDate = param.setSelectedDate, fromPrice = param.fromPrice, getDateTimeButtonProps = param.getDateTimeButtonProps;
|
|
60
|
+
var calendarDates = param.calendarDates, selectedDate = param.selectedDate, setSelectedDate = param.setSelectedDate, fromPrice = param.fromPrice, availabilityFormat = param.availabilityFormat, getDateTimeButtonProps = param.getDateTimeButtonProps;
|
|
61
61
|
var fillCalendarDates = useMemo(function() {
|
|
62
62
|
var _calendarDates_;
|
|
63
63
|
var _calendarDates__weekday;
|
|
@@ -90,7 +90,8 @@ var CalendarDates = function(param) {
|
|
|
90
90
|
return setSelectedDate(date);
|
|
91
91
|
},
|
|
92
92
|
price: fromPrice,
|
|
93
|
-
variant: Variant.month
|
|
93
|
+
variant: Variant.month,
|
|
94
|
+
availabilityFormat: availabilityFormat
|
|
94
95
|
}, props), +date);
|
|
95
96
|
})
|
|
96
97
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;
|
|
1
|
+
{"version":3,"file":"CustomFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAI3E,OAAO,EAGL,YAAY,EACb,MAAM,2BAA2B,CAAA;AAKlC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAW9E,KAAK,mBAAmB,GAAG,iBAAiB,GAAG;IAC7C,YAAY,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAA;IAClD,IAAI,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;IACpC,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAA;IAC1D,gBAAgB,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAA;IAC1D,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,cAAc,2HASxB,mBAAmB,4CAgNrB,CAAA"}
|
|
@@ -7,6 +7,7 @@ import { isEqual } from 'lodash';
|
|
|
7
7
|
import { CUSTOM_FIELD_TYPE_INPUT, CUSTOM_FIELD_TYPE_DROPDOWN } from '@licklist/core/dist/DataMapper/Order/CustomFieldDataMapper';
|
|
8
8
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
9
9
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
10
|
+
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
10
11
|
import { CreateSortableListItem } from '../../../../sortable-list/CreateSortableListItem.js';
|
|
11
12
|
import { SORTABLE_ID_KEY } from '../../../../sortable-list/SortableList.js';
|
|
12
13
|
import { SortableTreeItem } from '../../../../sortable-tree/SortableTreeItem.js';
|
|
@@ -270,6 +271,7 @@ var CustomFieldSet = function(param) {
|
|
|
270
271
|
serverErrors,
|
|
271
272
|
setError
|
|
272
273
|
]);
|
|
274
|
+
var notification = useNotification();
|
|
273
275
|
var _useFieldArray = useFieldArray({
|
|
274
276
|
control: control,
|
|
275
277
|
name: CUSTOM_FIELDS
|
|
@@ -293,6 +295,12 @@ var CustomFieldSet = function(param) {
|
|
|
293
295
|
if (!response) return [
|
|
294
296
|
2
|
|
295
297
|
];
|
|
298
|
+
notification.success({
|
|
299
|
+
title: t('App:success'),
|
|
300
|
+
message: t('Notification:createSuccessfully', {
|
|
301
|
+
argument: t('customField')
|
|
302
|
+
})
|
|
303
|
+
});
|
|
296
304
|
setFieldSets(function(prevFieldSets) {
|
|
297
305
|
var nextFieldSets = _to_consumable_array(prevFieldSets);
|
|
298
306
|
var nextFieldSetFormProps = _object_spread({}, formValues, response);
|
|
@@ -325,6 +333,12 @@ var CustomFieldSet = function(param) {
|
|
|
325
333
|
];
|
|
326
334
|
case 1:
|
|
327
335
|
_state.sent();
|
|
336
|
+
notification.success({
|
|
337
|
+
title: t('App:success'),
|
|
338
|
+
message: t('Notification:theRemovedSuccessfully', {
|
|
339
|
+
argument: t('customField')
|
|
340
|
+
})
|
|
341
|
+
});
|
|
328
342
|
_state.label = 2;
|
|
329
343
|
case 2:
|
|
330
344
|
setFieldSets(sortedItems.filter(function(sortedItem) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
3
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
4
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
4
5
|
export declare enum Variant {
|
|
5
6
|
week = "week",
|
|
6
7
|
month = "month",
|
|
@@ -16,6 +17,7 @@ export type DateTimeButtonProps = {
|
|
|
16
17
|
resources?: ZoneResourcesAvailability | null;
|
|
17
18
|
showResources?: boolean;
|
|
18
19
|
variant: Variant;
|
|
20
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
19
21
|
};
|
|
20
|
-
export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, variant, }: DateTimeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, variant, availabilityFormat, }: DateTimeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
//# sourceMappingURL=DateTimeButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;
|
|
1
|
+
{"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAI9F,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IAC7C,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,cAAc,kJAWxB,mBAAmB,4CA4CrB,CAAA"}
|
|
@@ -11,7 +11,7 @@ var Variant;
|
|
|
11
11
|
Variant["time"] = "time";
|
|
12
12
|
})(Variant || (Variant = {}));
|
|
13
13
|
var DateTimeButton = function(param) {
|
|
14
|
-
var date = param.date, _isDisabled = param.isDisabled, isSelected = param.isSelected, _isSoldOut = param.isSoldOut, onSelect = param.onSelect, price = param.price, resources = param.resources, showResources = param.showResources, _param_variant = param.variant, variant = _param_variant === void 0 ? "week" : _param_variant;
|
|
14
|
+
var date = param.date, _isDisabled = param.isDisabled, isSelected = param.isSelected, _isSoldOut = param.isSoldOut, onSelect = param.onSelect, price = param.price, resources = param.resources, showResources = param.showResources, _param_variant = param.variant, variant = _param_variant === void 0 ? "week" : _param_variant, availabilityFormat = param.availabilityFormat;
|
|
15
15
|
var isSoldOut = _isSoldOut || resources && resources.bookedResources >= resources.totalResources;
|
|
16
16
|
var isTimeVariant = variant === "time";
|
|
17
17
|
var isPast = variant === "time" ? isPastTime(date) : isPastDate(date);
|
|
@@ -36,6 +36,7 @@ var DateTimeButton = function(param) {
|
|
|
36
36
|
children: price
|
|
37
37
|
}),
|
|
38
38
|
showResources && resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
39
|
+
availabilityFormat: availabilityFormat,
|
|
39
40
|
resources: resources,
|
|
40
41
|
isUnavailable: _isDisabled || isPast,
|
|
41
42
|
isSoldOut: isSoldOut
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
3
3
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
4
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
4
5
|
export declare const LAYOUT_GRID = "grid";
|
|
5
6
|
export declare const LAYOUT_LIST = "list";
|
|
6
7
|
export type ActivityCardProps = {
|
|
@@ -14,6 +15,7 @@ export type ActivityCardProps = {
|
|
|
14
15
|
availableTimes?: string | null;
|
|
15
16
|
image?: Image | null;
|
|
16
17
|
resources?: ZoneResourcesAvailability;
|
|
18
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
17
19
|
};
|
|
18
|
-
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, availabilityFormat, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
//# sourceMappingURL=ActivityCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;
|
|
1
|
+
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAG9F,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,WAAW,CAAA;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,YAAY,iIAYtB,iBAAiB,4CA6DnB,CAAA"}
|
|
@@ -5,7 +5,7 @@ import { AvailabilityIndicator } from '../../availability-indicator/Availability
|
|
|
5
5
|
var LAYOUT_GRID = 'grid';
|
|
6
6
|
var LAYOUT_LIST = 'list';
|
|
7
7
|
var ActivityCard = function(param) {
|
|
8
|
-
var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout, resources = param.resources;
|
|
8
|
+
var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout, availabilityFormat = param.availabilityFormat, resources = param.resources;
|
|
9
9
|
if (layout === LAYOUT_GRID) {
|
|
10
10
|
return /*#__PURE__*/ jsxs("button", {
|
|
11
11
|
type: "button",
|
|
@@ -35,7 +35,8 @@ var ActivityCard = function(param) {
|
|
|
35
35
|
children: description
|
|
36
36
|
}),
|
|
37
37
|
resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
38
|
-
resources: resources
|
|
38
|
+
resources: resources,
|
|
39
|
+
availabilityFormat: availabilityFormat
|
|
39
40
|
})
|
|
40
41
|
]
|
|
41
42
|
})
|
|
@@ -74,7 +75,8 @@ var ActivityCard = function(param) {
|
|
|
74
75
|
children: description
|
|
75
76
|
}),
|
|
76
77
|
resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
77
|
-
resources: resources
|
|
78
|
+
resources: resources,
|
|
79
|
+
availabilityFormat: availabilityFormat
|
|
78
80
|
})
|
|
79
81
|
]
|
|
80
82
|
}),
|
|
@@ -56,6 +56,7 @@ import 'react-bootstrap/ModalTitle';
|
|
|
56
56
|
import 'react-bootstrap/ModalBody';
|
|
57
57
|
import 'react-bootstrap/Modal';
|
|
58
58
|
import '../../../iframe/payment/payment-status-page/PaymentStatusPage.js';
|
|
59
|
+
import '@licklist/plugins';
|
|
59
60
|
import '@licklist/plugins/dist/services/Form/HookFormService';
|
|
60
61
|
import 'luxon';
|
|
61
62
|
import '../../../static/manual-date-picker/constants/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.70.0-dev.
|
|
3
|
+
"version": "0.70.0-dev.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.31.
|
|
45
|
+
"@licklist/core": "0.31.1-dev.2",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
47
|
"@licklist/plugins": "0.34.0-dev.4",
|
|
48
48
|
"lodash": "4.17.21",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@dnd-kit/utilities": "2.0.0",
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
|
-
"@licklist/core": "0.31.
|
|
64
|
+
"@licklist/core": "0.31.1-dev.2",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
66
|
"@licklist/plugins": "0.34.0-dev.4",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
4
|
-
<rect x="
|
|
1
|
+
<svg viewBox="auto" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="14%" y="0" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
3
|
+
<rect x="14%" y="33%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
4
|
+
<rect x="14%" y="66%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
5
5
|
</svg>
|