tabexseriescomponents 0.0.35 → 0.0.37
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.cjs.js +293 -0
- package/dist/index.esm.js +287 -1
- package/dist/index.umd.js +290 -4
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
4
|
var React = require('react');
|
|
5
|
+
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
6
|
+
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
7
|
+
var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitialized');
|
|
8
|
+
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
9
|
+
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
10
|
+
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
5
11
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
12
|
+
var Cookies = require('universal-cookie');
|
|
6
13
|
var ai = require('react-icons/ai');
|
|
7
14
|
var reactCssfxLoading = require('react-cssfx-loading');
|
|
8
15
|
var glamor = require('glamor');
|
|
@@ -38,7 +45,14 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
38
45
|
|
|
39
46
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
40
47
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
48
|
+
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
49
|
+
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
50
|
+
var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
|
|
51
|
+
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
52
|
+
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
53
|
+
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
41
54
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
55
|
+
var Cookies__default = /*#__PURE__*/_interopDefaultLegacy(Cookies);
|
|
42
56
|
var jwtDecode__default = /*#__PURE__*/_interopDefaultLegacy(jwtDecode);
|
|
43
57
|
var FacebookLogin__default = /*#__PURE__*/_interopDefaultLegacy(FacebookLogin);
|
|
44
58
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
@@ -78,6 +92,283 @@ var AwesomeButton = function AwesomeButton(props) {
|
|
|
78
92
|
}, "123sdasdasdadsd", children.toUpperCase());
|
|
79
93
|
};
|
|
80
94
|
|
|
95
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
96
|
+
|
|
97
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
98
|
+
var LanguageContext$1 = /*#__PURE__*/React__default["default"].createContext();
|
|
99
|
+
var LanguageProvider = /*#__PURE__*/function (_Component) {
|
|
100
|
+
_inherits__default["default"](LanguageProvider, _Component);
|
|
101
|
+
|
|
102
|
+
var _super = _createSuper(LanguageProvider);
|
|
103
|
+
|
|
104
|
+
function LanguageProvider(props) {
|
|
105
|
+
var _en, _ar;
|
|
106
|
+
|
|
107
|
+
var _this;
|
|
108
|
+
|
|
109
|
+
_classCallCheck__default["default"](this, LanguageProvider);
|
|
110
|
+
|
|
111
|
+
_this = _super.call(this, props);
|
|
112
|
+
|
|
113
|
+
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "setlang", function (key) {
|
|
114
|
+
var cookies = new Cookies__default["default"]();
|
|
115
|
+
cookies.set('sitelang', key, {
|
|
116
|
+
path: '/'
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
_this.setState({
|
|
120
|
+
langdetect: key
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
window.location.reload();
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
_this.state = {
|
|
127
|
+
lang: {
|
|
128
|
+
en: (_en = {
|
|
129
|
+
workinghours: 'Working Hours',
|
|
130
|
+
english: 'English',
|
|
131
|
+
arabic: 'Arabic',
|
|
132
|
+
hello: 'Hello',
|
|
133
|
+
// Static Pages
|
|
134
|
+
orderhistory: 'Previous orders',
|
|
135
|
+
policies: 'Policies',
|
|
136
|
+
wishlist: 'Wishlist',
|
|
137
|
+
mywishlist: 'My wishlist',
|
|
138
|
+
accountinformation: 'Account information',
|
|
139
|
+
account: 'Account',
|
|
140
|
+
viewcart: 'View cart',
|
|
141
|
+
cart: 'Cart',
|
|
142
|
+
myshoppingcart: 'My shopping cart',
|
|
143
|
+
previousorders: 'Previous orders',
|
|
144
|
+
checkout: 'Checkout',
|
|
145
|
+
mycart: 'My cart',
|
|
146
|
+
login: 'Login',
|
|
147
|
+
signup: 'Signup',
|
|
148
|
+
// General
|
|
149
|
+
inprogress: 'In progress',
|
|
150
|
+
status: 'Status',
|
|
151
|
+
excludingdelivery: 'Excluding delivery',
|
|
152
|
+
stayconnected: 'Stay connected',
|
|
153
|
+
availability: 'Availability',
|
|
154
|
+
available: 'Available',
|
|
155
|
+
limitedquantity: 'Limited quantity',
|
|
156
|
+
securepayment: 'Secure payment',
|
|
157
|
+
trustedshipping: 'Trusted shipping',
|
|
158
|
+
callus: 'CALL US',
|
|
159
|
+
returnpolicy: 'Return policy',
|
|
160
|
+
shippingpolicy: 'Shipping policy',
|
|
161
|
+
deliverto: 'Deliver to',
|
|
162
|
+
support247: 'Support 24/7',
|
|
163
|
+
select: 'Select',
|
|
164
|
+
usefullinks: 'Useful links',
|
|
165
|
+
helpcenter: 'Help center',
|
|
166
|
+
loggedinas: 'Logged in as',
|
|
167
|
+
// Buttons
|
|
168
|
+
logout: 'Logout',
|
|
169
|
+
addtocart: 'Add to cart',
|
|
170
|
+
addtofavorites: 'Add to favorites',
|
|
171
|
+
removefromfav: 'Remove from favorites',
|
|
172
|
+
description: 'Description',
|
|
173
|
+
showmore: 'Show more',
|
|
174
|
+
remove: 'Remove',
|
|
175
|
+
shopbycategory: 'shop by category',
|
|
176
|
+
confirmorder: 'Confirm Order',
|
|
177
|
+
continuetopayment: 'Continue To Payment',
|
|
178
|
+
doyouhavepromocode: 'Do you have a promo code?',
|
|
179
|
+
loginwithfacebook: 'Sign in with facebook',
|
|
180
|
+
orsigninwith: 'Or Sign in with',
|
|
181
|
+
orsignupwith: 'Or Sign up with',
|
|
182
|
+
// Products
|
|
183
|
+
price: 'Price',
|
|
184
|
+
relatedproducts: 'Related products',
|
|
185
|
+
qty: 'QTY',
|
|
186
|
+
emptyshoppingcart: 'Your shopping cart is empty',
|
|
187
|
+
shopnow: 'Shop now',
|
|
188
|
+
total: 'Total',
|
|
189
|
+
otherinformation: 'Other information',
|
|
190
|
+
productname: 'Product name',
|
|
191
|
+
quantity: 'Quantity',
|
|
192
|
+
// Orders
|
|
193
|
+
orderid: 'Order ID',
|
|
194
|
+
numberofproducts: 'Number of products',
|
|
195
|
+
checkyourorder: 'Check your order',
|
|
196
|
+
// Placeholders
|
|
197
|
+
searchproducts: 'Search for products...',
|
|
198
|
+
choosecity: 'Choose city',
|
|
199
|
+
choosestategov: 'Choose state/governorate',
|
|
200
|
+
choosecountry: 'Choose country',
|
|
201
|
+
giftcarddicountcode: 'Gift Card Or Discount Code...',
|
|
202
|
+
nosearchresults: 'No search results',
|
|
203
|
+
sale: 'Sale',
|
|
204
|
+
//
|
|
205
|
+
nofavoriteproducts: 'Your wishlist is empty',
|
|
206
|
+
// Notifications
|
|
207
|
+
loggedoutsuccess: 'Logged out successfully',
|
|
208
|
+
addedtocartsuccess: 'Cart is updated successfully',
|
|
209
|
+
promocodeapplied: 'Promo code is applied.',
|
|
210
|
+
promocoderemoved: 'Promo code is removed',
|
|
211
|
+
countryandstateupdatedsuccess: 'Country and state are updated successfully',
|
|
212
|
+
orderaddedsuccess: 'Order is added successfully',
|
|
213
|
+
addedtowishlist: 'Product is added to your wishlist',
|
|
214
|
+
productrmovedfromwishlist: 'Product is removed from your wishlist',
|
|
215
|
+
fillthemissingfields: 'Please complete the missing fields',
|
|
216
|
+
passwordsdontmatch: "Passwords don't match",
|
|
217
|
+
loggedinsuccess: 'Logged in successfully',
|
|
218
|
+
// Checkout
|
|
219
|
+
subtotal: 'Sub total',
|
|
220
|
+
discount: 'Discount',
|
|
221
|
+
outofzone: 'Out of zone'
|
|
222
|
+
}, _defineProperty__default["default"](_en, "total", 'Total'), _defineProperty__default["default"](_en, "cod", 'Cash on Delivery'), _defineProperty__default["default"](_en, "cardondelivery", 'Credit Card On Delivery'), _defineProperty__default["default"](_en, "onlinepayment", 'Online Payment'), _defineProperty__default["default"](_en, "paymentcardinformation", 'Payment Card Information'), _defineProperty__default["default"](_en, "shippingfees", 'Shipping fees'), _defineProperty__default["default"](_en, "shippingaddress", 'Shipping address'), _defineProperty__default["default"](_en, "cardnumber", 'Card number'), _defineProperty__default["default"](_en, "year", 'Year'), _defineProperty__default["default"](_en, "month", 'Month'), _defineProperty__default["default"](_en, "cvv", 'CVV'), _defineProperty__default["default"](_en, "nameoncard", 'Name On Card'), _defineProperty__default["default"](_en, "country", 'Country'), _defineProperty__default["default"](_en, "addressdetails", 'ِAddress details'), _defineProperty__default["default"](_en, "stategov", 'State/Governorate'), _defineProperty__default["default"](_en, "city", 'City'), _defineProperty__default["default"](_en, "paymentmethod", 'Payment method'), _defineProperty__default["default"](_en, "productimage", 'Product image'), _defineProperty__default["default"](_en, "orderdetails", 'Order details'), _defineProperty__default["default"](_en, "orderinvoice", 'Order invoice'), _defineProperty__default["default"](_en, "promocodediscount", 'Promo code discount'), _defineProperty__default["default"](_en, "address", 'Address'), _defineProperty__default["default"](_en, "signup", 'Signup'), _defineProperty__default["default"](_en, "update", 'Update'), _defineProperty__default["default"](_en, "phonenumber", 'Mobile number'), _defineProperty__default["default"](_en, "completerequiredfields", 'Please complete all required fields'), _defineProperty__default["default"](_en, "name", 'Name'), _defineProperty__default["default"](_en, "email", 'Email'), _defineProperty__default["default"](_en, "password", 'Password'), _defineProperty__default["default"](_en, "confirmpassword", 'Confirm password'), _defineProperty__default["default"](_en, "showmore", 'Show more'), _defineProperty__default["default"](_en, "showless", 'Show less'), _defineProperty__default["default"](_en, "contactdetails", 'Contact Information'), _defineProperty__default["default"](_en, "asaguest", 'As a guest'), _defineProperty__default["default"](_en, "choosecountryfirst", 'Please choose country first'), _defineProperty__default["default"](_en, "security", 'Security'), _defineProperty__default["default"](_en, "personalinformation", 'Personal Information'), _defineProperty__default["default"](_en, "contactus", 'Contact us'), _defineProperty__default["default"](_en, "slogan", 'Your website & mobile application in one place'), _en),
|
|
223
|
+
ar: (_ar = {
|
|
224
|
+
workinghours: 'مواعيد العمل',
|
|
225
|
+
english: 'لغه إنجليزيه',
|
|
226
|
+
arabic: 'لغه عربيه',
|
|
227
|
+
hello: 'مرحبا',
|
|
228
|
+
// Static Pages
|
|
229
|
+
orderhistory: 'الطلبات السابقة',
|
|
230
|
+
policies: 'السياسات',
|
|
231
|
+
wishlist: 'المفضلات',
|
|
232
|
+
mywishlist: 'مفضلاتى',
|
|
233
|
+
accountinformation: 'الملف الشخصي',
|
|
234
|
+
account: 'الملف الشخصي',
|
|
235
|
+
viewcart: 'حقيبة التسوق',
|
|
236
|
+
cart: 'حقيبة التسوق',
|
|
237
|
+
myshoppingcart: 'حقيبة التسوق',
|
|
238
|
+
previousorders: 'الطلبات السابقة',
|
|
239
|
+
checkout: 'الدفع',
|
|
240
|
+
mycart: 'عربة التسوق',
|
|
241
|
+
login: 'تسجيل الدخول',
|
|
242
|
+
signup: 'إنشاء الحساب',
|
|
243
|
+
// General
|
|
244
|
+
inprogress: 'جارى',
|
|
245
|
+
status: 'الحالة',
|
|
246
|
+
excludingdelivery: 'غير شامل سعر الشحن',
|
|
247
|
+
stayconnected: 'ابق على اتصال بنا',
|
|
248
|
+
availability: 'توافر المنتج',
|
|
249
|
+
available: 'متوافر',
|
|
250
|
+
limitedquantity: 'كمية محدودة',
|
|
251
|
+
securepayment: 'دفع امن',
|
|
252
|
+
trustedshipping: 'شحن امن',
|
|
253
|
+
callus: 'إتصل بنا',
|
|
254
|
+
returnpolicy: 'سياسة الإستبدال و الإسترجاع',
|
|
255
|
+
shippingpolicy: 'سياسة الشحن',
|
|
256
|
+
deliverto: 'التوصيل إلى',
|
|
257
|
+
support247: 'متواجدون 24/7',
|
|
258
|
+
select: 'إختر',
|
|
259
|
+
usefullinks: 'روابط هامة',
|
|
260
|
+
helpcenter: 'مركز الخدمات',
|
|
261
|
+
loggedinas: 'البيانات المسجلة',
|
|
262
|
+
// Buttons
|
|
263
|
+
logout: 'تسجيل الخروج',
|
|
264
|
+
addtocart: 'اضف لسلة التسوق',
|
|
265
|
+
addtofavorites: 'اضف إلى المفضلات',
|
|
266
|
+
removefromfav: 'حذف من المفضلات',
|
|
267
|
+
description: 'التفاصيل',
|
|
268
|
+
showmore: 'تفاصيل اخري',
|
|
269
|
+
remove: 'حذف',
|
|
270
|
+
shopbycategory: 'تسوق بالمجموعات',
|
|
271
|
+
confirmorder: 'تأكيد الطلب',
|
|
272
|
+
continuetopayment: 'الدفع',
|
|
273
|
+
doyouhavepromocode: 'هل لديك كود خصم',
|
|
274
|
+
loginwithfacebook: 'تسجيل الدخول عن طريق فيسبوك',
|
|
275
|
+
orsigninwith: 'او تسجيل الدخول عن طريق',
|
|
276
|
+
orsignupwith: 'او انشاء حساب عن طريق',
|
|
277
|
+
// Products
|
|
278
|
+
price: 'السعر',
|
|
279
|
+
relatedproducts: 'منتجات ذات صلة',
|
|
280
|
+
qty: 'الكمية',
|
|
281
|
+
emptyshoppingcart: 'حقيبة التسوق فارغة',
|
|
282
|
+
shopnow: 'تسوق الان',
|
|
283
|
+
total: 'الإجمالى',
|
|
284
|
+
otherinformation: 'معلومات اخرى',
|
|
285
|
+
productname: 'إسم المنتج',
|
|
286
|
+
quantity: 'الكمية',
|
|
287
|
+
// Orders
|
|
288
|
+
orderid: 'رقم الطلب',
|
|
289
|
+
numberofproducts: 'عدد المنتجات',
|
|
290
|
+
checkyourorder: 'الذهاب إلى طلبك',
|
|
291
|
+
// Placeholders
|
|
292
|
+
searchproducts: 'ابحث...',
|
|
293
|
+
choosecity: 'إختر المدينة',
|
|
294
|
+
choosestategov: 'إختر المحافظة/الولاية',
|
|
295
|
+
choosecountry: 'إختر البلد',
|
|
296
|
+
giftcarddicountcode: 'كود خصم',
|
|
297
|
+
nosearchresults: 'لا توجد نتائج',
|
|
298
|
+
sale: 'خصم',
|
|
299
|
+
//
|
|
300
|
+
nofavoriteproducts: 'لا توجد منتجات مفضلة',
|
|
301
|
+
// Notifications
|
|
302
|
+
loggedoutsuccess: 'تم تسجيل الخروج',
|
|
303
|
+
addedtocartsuccess: 'تم إضافة المنتج لعربة التسوق',
|
|
304
|
+
promocodeapplied: 'تم تطبيق كود الخصم',
|
|
305
|
+
promocoderemoved: 'تم حذف كود الخصم',
|
|
306
|
+
countryandstateupdatedsuccess: 'تم تحديث البلد و المدينة',
|
|
307
|
+
orderaddedsuccess: 'تم إضافة الطلب',
|
|
308
|
+
addedtowishlist: 'تم إضافة المنتج فى المفضلات',
|
|
309
|
+
productrmovedfromwishlist: 'تم حذف المنتج من المفضلات',
|
|
310
|
+
fillthemissingfields: 'من فضلك اكمل باقى البيانات',
|
|
311
|
+
passwordsdontmatch: 'كلمات السر لا تتطابق',
|
|
312
|
+
loggedinsuccess: 'تم تسجيل الدخول',
|
|
313
|
+
// Checkout
|
|
314
|
+
subtotal: 'إجمالي المبلغ',
|
|
315
|
+
discount: 'الخصم',
|
|
316
|
+
outofzone: 'خارج نطاق الشحن'
|
|
317
|
+
}, _defineProperty__default["default"](_ar, "total", 'المبلغ الكلي'), _defineProperty__default["default"](_ar, "cod", 'الدفع عند الإستلام'), _defineProperty__default["default"](_ar, "cardondelivery", 'الدفع بالطاقة الائتمانية عند الإستلام'), _defineProperty__default["default"](_ar, "onlinepayment", 'الدفع الإلكترونى'), _defineProperty__default["default"](_ar, "paymentcardinformation", 'بيانات البطاقة'), _defineProperty__default["default"](_ar, "shippingfees", 'مصاريف الشحن'), _defineProperty__default["default"](_ar, "shippingaddress", 'عنوان الشحن'), _defineProperty__default["default"](_ar, "cardnumber", 'رقم البطاقة'), _defineProperty__default["default"](_ar, "year", 'السنة'), _defineProperty__default["default"](_ar, "month", 'الشهر'), _defineProperty__default["default"](_ar, "cvv", 'رقم البطاقة'), _defineProperty__default["default"](_ar, "nameoncard", 'الإسم على البطاقة'), _defineProperty__default["default"](_ar, "country", 'البلد'), _defineProperty__default["default"](_ar, "addressdetails", 'العنوان'), _defineProperty__default["default"](_ar, "stategov", 'المحافظة/الولاية'), _defineProperty__default["default"](_ar, "city", 'المدينة'), _defineProperty__default["default"](_ar, "paymentmethod", 'طريقة الدفع'), _defineProperty__default["default"](_ar, "productimage", 'صورة المنتج'), _defineProperty__default["default"](_ar, "orderdetails", 'تفاصيل الطلب'), _defineProperty__default["default"](_ar, "orderinvoice", 'فاتورة الطلب'), _defineProperty__default["default"](_ar, "promocodediscount", 'كود الخصم'), _defineProperty__default["default"](_ar, "address", 'العنوان'), _defineProperty__default["default"](_ar, "signup", 'إنشاء الحساب'), _defineProperty__default["default"](_ar, "update", 'تحديث'), _defineProperty__default["default"](_ar, "phonenumber", 'الهاتف'), _defineProperty__default["default"](_ar, "completerequiredfields", 'من فضلك اكمل البيانات الإجبارية'), _defineProperty__default["default"](_ar, "name", 'الإسم'), _defineProperty__default["default"](_ar, "email", 'البريد الإلكترونى'), _defineProperty__default["default"](_ar, "password", 'كلمة السر'), _defineProperty__default["default"](_ar, "confirmpassword", 'تأكيد كلمة السر'), _defineProperty__default["default"](_ar, "showless", 'اعرض اقل'), _defineProperty__default["default"](_ar, "showmore", 'اعرض المزيد'), _defineProperty__default["default"](_ar, "contactdetails", 'معلومات التواصل'), _defineProperty__default["default"](_ar, "asaguest", 'كزائر'), _defineProperty__default["default"](_ar, "choosecountryfirst", 'من فضلك اختر البلد اولاً'), _defineProperty__default["default"](_ar, "security", 'الخصوصية و الأمان'), _defineProperty__default["default"](_ar, "personalinformation", 'البيانات الشخصية'), _defineProperty__default["default"](_ar, "contactus", 'تواصل معنا'), _defineProperty__default["default"](_ar, "slogan", 'موقعك و تطبيقك فى مكان واحد'), _ar)
|
|
318
|
+
},
|
|
319
|
+
langdetect: 'en',
|
|
320
|
+
setlang: _this.setlang
|
|
321
|
+
};
|
|
322
|
+
return _this;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
_createClass__default["default"](LanguageProvider, [{
|
|
326
|
+
key: "componentDidMount",
|
|
327
|
+
value: function componentDidMount() {
|
|
328
|
+
var cookies = new Cookies__default["default"]();
|
|
329
|
+
var lastlangselected = cookies.get('sitelang');
|
|
330
|
+
|
|
331
|
+
if (lastlangselected == 'en') {
|
|
332
|
+
this.setState({
|
|
333
|
+
langdetect: 'en'
|
|
334
|
+
});
|
|
335
|
+
} else if (lastlangselected == 'ar') {
|
|
336
|
+
this.setState({
|
|
337
|
+
langdetect: 'ar'
|
|
338
|
+
});
|
|
339
|
+
} else {
|
|
340
|
+
this.setState({
|
|
341
|
+
langdetect: 'en'
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}, {
|
|
346
|
+
key: "render",
|
|
347
|
+
value: function render() {
|
|
348
|
+
var setlang = this.state.setlang;
|
|
349
|
+
var lang = '';
|
|
350
|
+
|
|
351
|
+
if (this.state.langdetect == 'en') {
|
|
352
|
+
lang = this.state.lang.en; // window.document.body.setAttribute('dir', 'ltr');
|
|
353
|
+
} else if (this.state.langdetect == 'ar') {
|
|
354
|
+
lang = this.state.lang.ar; // window.document.body.setAttribute('dir', 'rtl');
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
var langdetect = this.state.langdetect;
|
|
358
|
+
return /*#__PURE__*/React__default["default"].createElement(LanguageContext$1.Provider, {
|
|
359
|
+
value: {
|
|
360
|
+
lang: lang,
|
|
361
|
+
setlang: setlang,
|
|
362
|
+
langdetect: langdetect
|
|
363
|
+
}
|
|
364
|
+
}, this.props.children);
|
|
365
|
+
}
|
|
366
|
+
}]);
|
|
367
|
+
|
|
368
|
+
return LanguageProvider;
|
|
369
|
+
}(React.Component);
|
|
370
|
+
LanguageContext$1.Consumer;
|
|
371
|
+
|
|
81
372
|
function styleInject(css, ref) {
|
|
82
373
|
if ( ref === void 0 ) ref = {};
|
|
83
374
|
var insertAt = ref.insertAt;
|
|
@@ -23919,6 +24210,8 @@ var StylishProductCard = function StylishProductCard(props) {
|
|
|
23919
24210
|
|
|
23920
24211
|
var returnLibrary = function returnLibrary() {
|
|
23921
24212
|
return {
|
|
24213
|
+
LanguageContext: LanguageContext$1,
|
|
24214
|
+
LanguageProvider: LanguageProvider,
|
|
23922
24215
|
AwesomeButton: AwesomeButton,
|
|
23923
24216
|
// Checkout: Checkout,
|
|
23924
24217
|
// Signup: Signup,
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
-
import React, { useState, useEffect, useContext } from 'react';
|
|
2
|
+
import React, { useState, useEffect, Component, useContext } from 'react';
|
|
3
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
4
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
5
|
+
import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
|
|
6
|
+
import _inherits from '@babel/runtime/helpers/inherits';
|
|
7
|
+
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
8
|
+
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
3
9
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
10
|
+
import Cookies from 'universal-cookie';
|
|
4
11
|
import { AiOutlineUser, AiOutlineMinus, AiOutlineLogin, AiOutlineUserAdd, AiFillStar, AiOutlineHeart, AiOutlineStar, AiOutlineInstagram, AiFillInstagram, AiFillPhone, AiOutlineMail, AiOutlineClockCircle, AiOutlinePhone } from 'react-icons/ai';
|
|
5
12
|
import { CircularProgress } from 'react-cssfx-loading';
|
|
6
13
|
import { css } from 'glamor';
|
|
@@ -64,6 +71,283 @@ var AwesomeButton = function AwesomeButton(props) {
|
|
|
64
71
|
}, "123sdasdasdadsd", children.toUpperCase());
|
|
65
72
|
};
|
|
66
73
|
|
|
74
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
75
|
+
|
|
76
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
77
|
+
var LanguageContext$1 = /*#__PURE__*/React.createContext();
|
|
78
|
+
var LanguageProvider = /*#__PURE__*/function (_Component) {
|
|
79
|
+
_inherits(LanguageProvider, _Component);
|
|
80
|
+
|
|
81
|
+
var _super = _createSuper(LanguageProvider);
|
|
82
|
+
|
|
83
|
+
function LanguageProvider(props) {
|
|
84
|
+
var _en, _ar;
|
|
85
|
+
|
|
86
|
+
var _this;
|
|
87
|
+
|
|
88
|
+
_classCallCheck(this, LanguageProvider);
|
|
89
|
+
|
|
90
|
+
_this = _super.call(this, props);
|
|
91
|
+
|
|
92
|
+
_defineProperty(_assertThisInitialized(_this), "setlang", function (key) {
|
|
93
|
+
var cookies = new Cookies();
|
|
94
|
+
cookies.set('sitelang', key, {
|
|
95
|
+
path: '/'
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
_this.setState({
|
|
99
|
+
langdetect: key
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
window.location.reload();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
_this.state = {
|
|
106
|
+
lang: {
|
|
107
|
+
en: (_en = {
|
|
108
|
+
workinghours: 'Working Hours',
|
|
109
|
+
english: 'English',
|
|
110
|
+
arabic: 'Arabic',
|
|
111
|
+
hello: 'Hello',
|
|
112
|
+
// Static Pages
|
|
113
|
+
orderhistory: 'Previous orders',
|
|
114
|
+
policies: 'Policies',
|
|
115
|
+
wishlist: 'Wishlist',
|
|
116
|
+
mywishlist: 'My wishlist',
|
|
117
|
+
accountinformation: 'Account information',
|
|
118
|
+
account: 'Account',
|
|
119
|
+
viewcart: 'View cart',
|
|
120
|
+
cart: 'Cart',
|
|
121
|
+
myshoppingcart: 'My shopping cart',
|
|
122
|
+
previousorders: 'Previous orders',
|
|
123
|
+
checkout: 'Checkout',
|
|
124
|
+
mycart: 'My cart',
|
|
125
|
+
login: 'Login',
|
|
126
|
+
signup: 'Signup',
|
|
127
|
+
// General
|
|
128
|
+
inprogress: 'In progress',
|
|
129
|
+
status: 'Status',
|
|
130
|
+
excludingdelivery: 'Excluding delivery',
|
|
131
|
+
stayconnected: 'Stay connected',
|
|
132
|
+
availability: 'Availability',
|
|
133
|
+
available: 'Available',
|
|
134
|
+
limitedquantity: 'Limited quantity',
|
|
135
|
+
securepayment: 'Secure payment',
|
|
136
|
+
trustedshipping: 'Trusted shipping',
|
|
137
|
+
callus: 'CALL US',
|
|
138
|
+
returnpolicy: 'Return policy',
|
|
139
|
+
shippingpolicy: 'Shipping policy',
|
|
140
|
+
deliverto: 'Deliver to',
|
|
141
|
+
support247: 'Support 24/7',
|
|
142
|
+
select: 'Select',
|
|
143
|
+
usefullinks: 'Useful links',
|
|
144
|
+
helpcenter: 'Help center',
|
|
145
|
+
loggedinas: 'Logged in as',
|
|
146
|
+
// Buttons
|
|
147
|
+
logout: 'Logout',
|
|
148
|
+
addtocart: 'Add to cart',
|
|
149
|
+
addtofavorites: 'Add to favorites',
|
|
150
|
+
removefromfav: 'Remove from favorites',
|
|
151
|
+
description: 'Description',
|
|
152
|
+
showmore: 'Show more',
|
|
153
|
+
remove: 'Remove',
|
|
154
|
+
shopbycategory: 'shop by category',
|
|
155
|
+
confirmorder: 'Confirm Order',
|
|
156
|
+
continuetopayment: 'Continue To Payment',
|
|
157
|
+
doyouhavepromocode: 'Do you have a promo code?',
|
|
158
|
+
loginwithfacebook: 'Sign in with facebook',
|
|
159
|
+
orsigninwith: 'Or Sign in with',
|
|
160
|
+
orsignupwith: 'Or Sign up with',
|
|
161
|
+
// Products
|
|
162
|
+
price: 'Price',
|
|
163
|
+
relatedproducts: 'Related products',
|
|
164
|
+
qty: 'QTY',
|
|
165
|
+
emptyshoppingcart: 'Your shopping cart is empty',
|
|
166
|
+
shopnow: 'Shop now',
|
|
167
|
+
total: 'Total',
|
|
168
|
+
otherinformation: 'Other information',
|
|
169
|
+
productname: 'Product name',
|
|
170
|
+
quantity: 'Quantity',
|
|
171
|
+
// Orders
|
|
172
|
+
orderid: 'Order ID',
|
|
173
|
+
numberofproducts: 'Number of products',
|
|
174
|
+
checkyourorder: 'Check your order',
|
|
175
|
+
// Placeholders
|
|
176
|
+
searchproducts: 'Search for products...',
|
|
177
|
+
choosecity: 'Choose city',
|
|
178
|
+
choosestategov: 'Choose state/governorate',
|
|
179
|
+
choosecountry: 'Choose country',
|
|
180
|
+
giftcarddicountcode: 'Gift Card Or Discount Code...',
|
|
181
|
+
nosearchresults: 'No search results',
|
|
182
|
+
sale: 'Sale',
|
|
183
|
+
//
|
|
184
|
+
nofavoriteproducts: 'Your wishlist is empty',
|
|
185
|
+
// Notifications
|
|
186
|
+
loggedoutsuccess: 'Logged out successfully',
|
|
187
|
+
addedtocartsuccess: 'Cart is updated successfully',
|
|
188
|
+
promocodeapplied: 'Promo code is applied.',
|
|
189
|
+
promocoderemoved: 'Promo code is removed',
|
|
190
|
+
countryandstateupdatedsuccess: 'Country and state are updated successfully',
|
|
191
|
+
orderaddedsuccess: 'Order is added successfully',
|
|
192
|
+
addedtowishlist: 'Product is added to your wishlist',
|
|
193
|
+
productrmovedfromwishlist: 'Product is removed from your wishlist',
|
|
194
|
+
fillthemissingfields: 'Please complete the missing fields',
|
|
195
|
+
passwordsdontmatch: "Passwords don't match",
|
|
196
|
+
loggedinsuccess: 'Logged in successfully',
|
|
197
|
+
// Checkout
|
|
198
|
+
subtotal: 'Sub total',
|
|
199
|
+
discount: 'Discount',
|
|
200
|
+
outofzone: 'Out of zone'
|
|
201
|
+
}, _defineProperty(_en, "total", 'Total'), _defineProperty(_en, "cod", 'Cash on Delivery'), _defineProperty(_en, "cardondelivery", 'Credit Card On Delivery'), _defineProperty(_en, "onlinepayment", 'Online Payment'), _defineProperty(_en, "paymentcardinformation", 'Payment Card Information'), _defineProperty(_en, "shippingfees", 'Shipping fees'), _defineProperty(_en, "shippingaddress", 'Shipping address'), _defineProperty(_en, "cardnumber", 'Card number'), _defineProperty(_en, "year", 'Year'), _defineProperty(_en, "month", 'Month'), _defineProperty(_en, "cvv", 'CVV'), _defineProperty(_en, "nameoncard", 'Name On Card'), _defineProperty(_en, "country", 'Country'), _defineProperty(_en, "addressdetails", 'ِAddress details'), _defineProperty(_en, "stategov", 'State/Governorate'), _defineProperty(_en, "city", 'City'), _defineProperty(_en, "paymentmethod", 'Payment method'), _defineProperty(_en, "productimage", 'Product image'), _defineProperty(_en, "orderdetails", 'Order details'), _defineProperty(_en, "orderinvoice", 'Order invoice'), _defineProperty(_en, "promocodediscount", 'Promo code discount'), _defineProperty(_en, "address", 'Address'), _defineProperty(_en, "signup", 'Signup'), _defineProperty(_en, "update", 'Update'), _defineProperty(_en, "phonenumber", 'Mobile number'), _defineProperty(_en, "completerequiredfields", 'Please complete all required fields'), _defineProperty(_en, "name", 'Name'), _defineProperty(_en, "email", 'Email'), _defineProperty(_en, "password", 'Password'), _defineProperty(_en, "confirmpassword", 'Confirm password'), _defineProperty(_en, "showmore", 'Show more'), _defineProperty(_en, "showless", 'Show less'), _defineProperty(_en, "contactdetails", 'Contact Information'), _defineProperty(_en, "asaguest", 'As a guest'), _defineProperty(_en, "choosecountryfirst", 'Please choose country first'), _defineProperty(_en, "security", 'Security'), _defineProperty(_en, "personalinformation", 'Personal Information'), _defineProperty(_en, "contactus", 'Contact us'), _defineProperty(_en, "slogan", 'Your website & mobile application in one place'), _en),
|
|
202
|
+
ar: (_ar = {
|
|
203
|
+
workinghours: 'مواعيد العمل',
|
|
204
|
+
english: 'لغه إنجليزيه',
|
|
205
|
+
arabic: 'لغه عربيه',
|
|
206
|
+
hello: 'مرحبا',
|
|
207
|
+
// Static Pages
|
|
208
|
+
orderhistory: 'الطلبات السابقة',
|
|
209
|
+
policies: 'السياسات',
|
|
210
|
+
wishlist: 'المفضلات',
|
|
211
|
+
mywishlist: 'مفضلاتى',
|
|
212
|
+
accountinformation: 'الملف الشخصي',
|
|
213
|
+
account: 'الملف الشخصي',
|
|
214
|
+
viewcart: 'حقيبة التسوق',
|
|
215
|
+
cart: 'حقيبة التسوق',
|
|
216
|
+
myshoppingcart: 'حقيبة التسوق',
|
|
217
|
+
previousorders: 'الطلبات السابقة',
|
|
218
|
+
checkout: 'الدفع',
|
|
219
|
+
mycart: 'عربة التسوق',
|
|
220
|
+
login: 'تسجيل الدخول',
|
|
221
|
+
signup: 'إنشاء الحساب',
|
|
222
|
+
// General
|
|
223
|
+
inprogress: 'جارى',
|
|
224
|
+
status: 'الحالة',
|
|
225
|
+
excludingdelivery: 'غير شامل سعر الشحن',
|
|
226
|
+
stayconnected: 'ابق على اتصال بنا',
|
|
227
|
+
availability: 'توافر المنتج',
|
|
228
|
+
available: 'متوافر',
|
|
229
|
+
limitedquantity: 'كمية محدودة',
|
|
230
|
+
securepayment: 'دفع امن',
|
|
231
|
+
trustedshipping: 'شحن امن',
|
|
232
|
+
callus: 'إتصل بنا',
|
|
233
|
+
returnpolicy: 'سياسة الإستبدال و الإسترجاع',
|
|
234
|
+
shippingpolicy: 'سياسة الشحن',
|
|
235
|
+
deliverto: 'التوصيل إلى',
|
|
236
|
+
support247: 'متواجدون 24/7',
|
|
237
|
+
select: 'إختر',
|
|
238
|
+
usefullinks: 'روابط هامة',
|
|
239
|
+
helpcenter: 'مركز الخدمات',
|
|
240
|
+
loggedinas: 'البيانات المسجلة',
|
|
241
|
+
// Buttons
|
|
242
|
+
logout: 'تسجيل الخروج',
|
|
243
|
+
addtocart: 'اضف لسلة التسوق',
|
|
244
|
+
addtofavorites: 'اضف إلى المفضلات',
|
|
245
|
+
removefromfav: 'حذف من المفضلات',
|
|
246
|
+
description: 'التفاصيل',
|
|
247
|
+
showmore: 'تفاصيل اخري',
|
|
248
|
+
remove: 'حذف',
|
|
249
|
+
shopbycategory: 'تسوق بالمجموعات',
|
|
250
|
+
confirmorder: 'تأكيد الطلب',
|
|
251
|
+
continuetopayment: 'الدفع',
|
|
252
|
+
doyouhavepromocode: 'هل لديك كود خصم',
|
|
253
|
+
loginwithfacebook: 'تسجيل الدخول عن طريق فيسبوك',
|
|
254
|
+
orsigninwith: 'او تسجيل الدخول عن طريق',
|
|
255
|
+
orsignupwith: 'او انشاء حساب عن طريق',
|
|
256
|
+
// Products
|
|
257
|
+
price: 'السعر',
|
|
258
|
+
relatedproducts: 'منتجات ذات صلة',
|
|
259
|
+
qty: 'الكمية',
|
|
260
|
+
emptyshoppingcart: 'حقيبة التسوق فارغة',
|
|
261
|
+
shopnow: 'تسوق الان',
|
|
262
|
+
total: 'الإجمالى',
|
|
263
|
+
otherinformation: 'معلومات اخرى',
|
|
264
|
+
productname: 'إسم المنتج',
|
|
265
|
+
quantity: 'الكمية',
|
|
266
|
+
// Orders
|
|
267
|
+
orderid: 'رقم الطلب',
|
|
268
|
+
numberofproducts: 'عدد المنتجات',
|
|
269
|
+
checkyourorder: 'الذهاب إلى طلبك',
|
|
270
|
+
// Placeholders
|
|
271
|
+
searchproducts: 'ابحث...',
|
|
272
|
+
choosecity: 'إختر المدينة',
|
|
273
|
+
choosestategov: 'إختر المحافظة/الولاية',
|
|
274
|
+
choosecountry: 'إختر البلد',
|
|
275
|
+
giftcarddicountcode: 'كود خصم',
|
|
276
|
+
nosearchresults: 'لا توجد نتائج',
|
|
277
|
+
sale: 'خصم',
|
|
278
|
+
//
|
|
279
|
+
nofavoriteproducts: 'لا توجد منتجات مفضلة',
|
|
280
|
+
// Notifications
|
|
281
|
+
loggedoutsuccess: 'تم تسجيل الخروج',
|
|
282
|
+
addedtocartsuccess: 'تم إضافة المنتج لعربة التسوق',
|
|
283
|
+
promocodeapplied: 'تم تطبيق كود الخصم',
|
|
284
|
+
promocoderemoved: 'تم حذف كود الخصم',
|
|
285
|
+
countryandstateupdatedsuccess: 'تم تحديث البلد و المدينة',
|
|
286
|
+
orderaddedsuccess: 'تم إضافة الطلب',
|
|
287
|
+
addedtowishlist: 'تم إضافة المنتج فى المفضلات',
|
|
288
|
+
productrmovedfromwishlist: 'تم حذف المنتج من المفضلات',
|
|
289
|
+
fillthemissingfields: 'من فضلك اكمل باقى البيانات',
|
|
290
|
+
passwordsdontmatch: 'كلمات السر لا تتطابق',
|
|
291
|
+
loggedinsuccess: 'تم تسجيل الدخول',
|
|
292
|
+
// Checkout
|
|
293
|
+
subtotal: 'إجمالي المبلغ',
|
|
294
|
+
discount: 'الخصم',
|
|
295
|
+
outofzone: 'خارج نطاق الشحن'
|
|
296
|
+
}, _defineProperty(_ar, "total", 'المبلغ الكلي'), _defineProperty(_ar, "cod", 'الدفع عند الإستلام'), _defineProperty(_ar, "cardondelivery", 'الدفع بالطاقة الائتمانية عند الإستلام'), _defineProperty(_ar, "onlinepayment", 'الدفع الإلكترونى'), _defineProperty(_ar, "paymentcardinformation", 'بيانات البطاقة'), _defineProperty(_ar, "shippingfees", 'مصاريف الشحن'), _defineProperty(_ar, "shippingaddress", 'عنوان الشحن'), _defineProperty(_ar, "cardnumber", 'رقم البطاقة'), _defineProperty(_ar, "year", 'السنة'), _defineProperty(_ar, "month", 'الشهر'), _defineProperty(_ar, "cvv", 'رقم البطاقة'), _defineProperty(_ar, "nameoncard", 'الإسم على البطاقة'), _defineProperty(_ar, "country", 'البلد'), _defineProperty(_ar, "addressdetails", 'العنوان'), _defineProperty(_ar, "stategov", 'المحافظة/الولاية'), _defineProperty(_ar, "city", 'المدينة'), _defineProperty(_ar, "paymentmethod", 'طريقة الدفع'), _defineProperty(_ar, "productimage", 'صورة المنتج'), _defineProperty(_ar, "orderdetails", 'تفاصيل الطلب'), _defineProperty(_ar, "orderinvoice", 'فاتورة الطلب'), _defineProperty(_ar, "promocodediscount", 'كود الخصم'), _defineProperty(_ar, "address", 'العنوان'), _defineProperty(_ar, "signup", 'إنشاء الحساب'), _defineProperty(_ar, "update", 'تحديث'), _defineProperty(_ar, "phonenumber", 'الهاتف'), _defineProperty(_ar, "completerequiredfields", 'من فضلك اكمل البيانات الإجبارية'), _defineProperty(_ar, "name", 'الإسم'), _defineProperty(_ar, "email", 'البريد الإلكترونى'), _defineProperty(_ar, "password", 'كلمة السر'), _defineProperty(_ar, "confirmpassword", 'تأكيد كلمة السر'), _defineProperty(_ar, "showless", 'اعرض اقل'), _defineProperty(_ar, "showmore", 'اعرض المزيد'), _defineProperty(_ar, "contactdetails", 'معلومات التواصل'), _defineProperty(_ar, "asaguest", 'كزائر'), _defineProperty(_ar, "choosecountryfirst", 'من فضلك اختر البلد اولاً'), _defineProperty(_ar, "security", 'الخصوصية و الأمان'), _defineProperty(_ar, "personalinformation", 'البيانات الشخصية'), _defineProperty(_ar, "contactus", 'تواصل معنا'), _defineProperty(_ar, "slogan", 'موقعك و تطبيقك فى مكان واحد'), _ar)
|
|
297
|
+
},
|
|
298
|
+
langdetect: 'en',
|
|
299
|
+
setlang: _this.setlang
|
|
300
|
+
};
|
|
301
|
+
return _this;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
_createClass(LanguageProvider, [{
|
|
305
|
+
key: "componentDidMount",
|
|
306
|
+
value: function componentDidMount() {
|
|
307
|
+
var cookies = new Cookies();
|
|
308
|
+
var lastlangselected = cookies.get('sitelang');
|
|
309
|
+
|
|
310
|
+
if (lastlangselected == 'en') {
|
|
311
|
+
this.setState({
|
|
312
|
+
langdetect: 'en'
|
|
313
|
+
});
|
|
314
|
+
} else if (lastlangselected == 'ar') {
|
|
315
|
+
this.setState({
|
|
316
|
+
langdetect: 'ar'
|
|
317
|
+
});
|
|
318
|
+
} else {
|
|
319
|
+
this.setState({
|
|
320
|
+
langdetect: 'en'
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}, {
|
|
325
|
+
key: "render",
|
|
326
|
+
value: function render() {
|
|
327
|
+
var setlang = this.state.setlang;
|
|
328
|
+
var lang = '';
|
|
329
|
+
|
|
330
|
+
if (this.state.langdetect == 'en') {
|
|
331
|
+
lang = this.state.lang.en; // window.document.body.setAttribute('dir', 'ltr');
|
|
332
|
+
} else if (this.state.langdetect == 'ar') {
|
|
333
|
+
lang = this.state.lang.ar; // window.document.body.setAttribute('dir', 'rtl');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
var langdetect = this.state.langdetect;
|
|
337
|
+
return /*#__PURE__*/React.createElement(LanguageContext$1.Provider, {
|
|
338
|
+
value: {
|
|
339
|
+
lang: lang,
|
|
340
|
+
setlang: setlang,
|
|
341
|
+
langdetect: langdetect
|
|
342
|
+
}
|
|
343
|
+
}, this.props.children);
|
|
344
|
+
}
|
|
345
|
+
}]);
|
|
346
|
+
|
|
347
|
+
return LanguageProvider;
|
|
348
|
+
}(Component);
|
|
349
|
+
LanguageContext$1.Consumer;
|
|
350
|
+
|
|
67
351
|
function styleInject(css, ref) {
|
|
68
352
|
if ( ref === void 0 ) ref = {};
|
|
69
353
|
var insertAt = ref.insertAt;
|
|
@@ -23905,6 +24189,8 @@ var StylishProductCard = function StylishProductCard(props) {
|
|
|
23905
24189
|
|
|
23906
24190
|
var returnLibrary = function returnLibrary() {
|
|
23907
24191
|
return {
|
|
24192
|
+
LanguageContext: LanguageContext$1,
|
|
24193
|
+
LanguageProvider: LanguageProvider,
|
|
23908
24194
|
AwesomeButton: AwesomeButton,
|
|
23909
24195
|
// Checkout: Checkout,
|
|
23910
24196
|
// Signup: Signup,
|
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@babel/runtime/helpers/slicedToArray'), require('react'), require('@babel/runtime/helpers/defineProperty'), require('react-icons/ai'), require('react-cssfx-loading'), require('glamor'), require('@react-oauth/google'), require('jwt-decode'), require('react-facebook-login/dist/facebook-login-render-props'), require('react-icons/fa'), require('@babel/runtime/helpers/toConsumableArray'), require('react-bootstrap'), require('react-icons/io5'), require('imagekitio-react'), require('react-icons/hi'), require('react-icons/go'), require('react-icons/bs'), require('react-icons/fi'), require('react-icons/md'), require('react-icons/io'), require('react-icons/cg'), require('react-accessible-accordion'), require('react-bootstrap/Dropdown'), require('react-intersection-observer'), require('axios'), require('react-horizontal-scrolling-menu'), require('react-background-slideshow'), require('react-slideshow-image'), require('@babel/runtime/helpers/extends'), require('react-router-dom'), require('react-icons/bi'), require('react-icons/ri'), require('react-notifications')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['@babel/runtime/helpers/slicedToArray', 'react', '@babel/runtime/helpers/defineProperty', 'react-icons/ai', 'react-cssfx-loading', 'glamor', '@react-oauth/google', 'jwt-decode', 'react-facebook-login/dist/facebook-login-render-props', 'react-icons/fa', '@babel/runtime/helpers/toConsumableArray', 'react-bootstrap', 'react-icons/io5', 'imagekitio-react', 'react-icons/hi', 'react-icons/go', 'react-icons/bs', 'react-icons/fi', 'react-icons/md', 'react-icons/io', 'react-icons/cg', 'react-accessible-accordion', 'react-bootstrap/Dropdown', 'react-intersection-observer', 'axios', 'react-horizontal-scrolling-menu', 'react-background-slideshow', 'react-slideshow-image', '@babel/runtime/helpers/extends', 'react-router-dom', 'react-icons/bi', 'react-icons/ri', 'react-notifications'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tabexseriescomponents = factory(global._slicedToArray, global.React, global._defineProperty, global.ai, global.reactCssfxLoading, global.glamor, global.google, global.jwtDecode, global.FacebookLogin, global.fa, global._toConsumableArray, global.reactBootstrap, global.io5, global.imagekitioReact, global.hi, global.go, global.bs, global.fi, global.md, global.io, global.cg, global.reactAccessibleAccordion, global.Dropdown, global.reactIntersectionObserver, null, global.reactHorizontalScrollingMenu, global.BackgroundSlideshow, global.reactSlideshowImage, global._extends, global.reactRouterDom, global.bi, global.ri));
|
|
5
|
-
})(this, (function (_slicedToArray, React, _defineProperty, ai, reactCssfxLoading, glamor, google, jwtDecode, FacebookLogin, fa, _toConsumableArray, reactBootstrap, io5, imagekitioReact, hi, go, bs, fi, md, io, cg, reactAccessibleAccordion, Dropdown, reactIntersectionObserver, axios, reactHorizontalScrollingMenu, BackgroundSlideshow, reactSlideshowImage, _extends, reactRouterDom, bi, ri) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@babel/runtime/helpers/slicedToArray'), require('react'), require('@babel/runtime/helpers/classCallCheck'), require('@babel/runtime/helpers/createClass'), require('@babel/runtime/helpers/assertThisInitialized'), require('@babel/runtime/helpers/inherits'), require('@babel/runtime/helpers/possibleConstructorReturn'), require('@babel/runtime/helpers/getPrototypeOf'), require('@babel/runtime/helpers/defineProperty'), require('universal-cookie'), require('react-icons/ai'), require('react-cssfx-loading'), require('glamor'), require('@react-oauth/google'), require('jwt-decode'), require('react-facebook-login/dist/facebook-login-render-props'), require('react-icons/fa'), require('@babel/runtime/helpers/toConsumableArray'), require('react-bootstrap'), require('react-icons/io5'), require('imagekitio-react'), require('react-icons/hi'), require('react-icons/go'), require('react-icons/bs'), require('react-icons/fi'), require('react-icons/md'), require('react-icons/io'), require('react-icons/cg'), require('react-accessible-accordion'), require('react-bootstrap/Dropdown'), require('react-intersection-observer'), require('axios'), require('react-horizontal-scrolling-menu'), require('react-background-slideshow'), require('react-slideshow-image'), require('@babel/runtime/helpers/extends'), require('react-router-dom'), require('react-icons/bi'), require('react-icons/ri'), require('react-notifications')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['@babel/runtime/helpers/slicedToArray', 'react', '@babel/runtime/helpers/classCallCheck', '@babel/runtime/helpers/createClass', '@babel/runtime/helpers/assertThisInitialized', '@babel/runtime/helpers/inherits', '@babel/runtime/helpers/possibleConstructorReturn', '@babel/runtime/helpers/getPrototypeOf', '@babel/runtime/helpers/defineProperty', 'universal-cookie', 'react-icons/ai', 'react-cssfx-loading', 'glamor', '@react-oauth/google', 'jwt-decode', 'react-facebook-login/dist/facebook-login-render-props', 'react-icons/fa', '@babel/runtime/helpers/toConsumableArray', 'react-bootstrap', 'react-icons/io5', 'imagekitio-react', 'react-icons/hi', 'react-icons/go', 'react-icons/bs', 'react-icons/fi', 'react-icons/md', 'react-icons/io', 'react-icons/cg', 'react-accessible-accordion', 'react-bootstrap/Dropdown', 'react-intersection-observer', 'axios', 'react-horizontal-scrolling-menu', 'react-background-slideshow', 'react-slideshow-image', '@babel/runtime/helpers/extends', 'react-router-dom', 'react-icons/bi', 'react-icons/ri', 'react-notifications'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tabexseriescomponents = factory(global._slicedToArray, global.React, global._classCallCheck, global._createClass, global._assertThisInitialized, global._inherits, global._possibleConstructorReturn, global._getPrototypeOf, global._defineProperty, global.Cookies, global.ai, global.reactCssfxLoading, global.glamor, global.google, global.jwtDecode, global.FacebookLogin, global.fa, global._toConsumableArray, global.reactBootstrap, global.io5, global.imagekitioReact, global.hi, global.go, global.bs, global.fi, global.md, global.io, global.cg, global.reactAccessibleAccordion, global.Dropdown, global.reactIntersectionObserver, null, global.reactHorizontalScrollingMenu, global.BackgroundSlideshow, global.reactSlideshowImage, global._extends, global.reactRouterDom, global.bi, global.ri));
|
|
5
|
+
})(this, (function (_slicedToArray, React, _classCallCheck, _createClass, _assertThisInitialized, _inherits, _possibleConstructorReturn, _getPrototypeOf, _defineProperty, Cookies, ai, reactCssfxLoading, glamor, google, jwtDecode, FacebookLogin, fa, _toConsumableArray, reactBootstrap, io5, imagekitioReact, hi, go, bs, fi, md, io, cg, reactAccessibleAccordion, Dropdown, reactIntersectionObserver, axios, reactHorizontalScrollingMenu, BackgroundSlideshow, reactSlideshowImage, _extends, reactRouterDom, bi, ri) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
12
|
+
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
13
|
+
var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
|
|
14
|
+
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
15
|
+
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
16
|
+
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
11
17
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
18
|
+
var Cookies__default = /*#__PURE__*/_interopDefaultLegacy(Cookies);
|
|
12
19
|
var jwtDecode__default = /*#__PURE__*/_interopDefaultLegacy(jwtDecode);
|
|
13
20
|
var FacebookLogin__default = /*#__PURE__*/_interopDefaultLegacy(FacebookLogin);
|
|
14
21
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
@@ -48,6 +55,283 @@
|
|
|
48
55
|
}, "123sdasdasdadsd", children.toUpperCase());
|
|
49
56
|
};
|
|
50
57
|
|
|
58
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
59
|
+
|
|
60
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
61
|
+
var LanguageContext$1 = /*#__PURE__*/React__default["default"].createContext();
|
|
62
|
+
var LanguageProvider = /*#__PURE__*/function (_Component) {
|
|
63
|
+
_inherits__default["default"](LanguageProvider, _Component);
|
|
64
|
+
|
|
65
|
+
var _super = _createSuper(LanguageProvider);
|
|
66
|
+
|
|
67
|
+
function LanguageProvider(props) {
|
|
68
|
+
var _en, _ar;
|
|
69
|
+
|
|
70
|
+
var _this;
|
|
71
|
+
|
|
72
|
+
_classCallCheck__default["default"](this, LanguageProvider);
|
|
73
|
+
|
|
74
|
+
_this = _super.call(this, props);
|
|
75
|
+
|
|
76
|
+
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "setlang", function (key) {
|
|
77
|
+
var cookies = new Cookies__default["default"]();
|
|
78
|
+
cookies.set('sitelang', key, {
|
|
79
|
+
path: '/'
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
_this.setState({
|
|
83
|
+
langdetect: key
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
window.location.reload();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
_this.state = {
|
|
90
|
+
lang: {
|
|
91
|
+
en: (_en = {
|
|
92
|
+
workinghours: 'Working Hours',
|
|
93
|
+
english: 'English',
|
|
94
|
+
arabic: 'Arabic',
|
|
95
|
+
hello: 'Hello',
|
|
96
|
+
// Static Pages
|
|
97
|
+
orderhistory: 'Previous orders',
|
|
98
|
+
policies: 'Policies',
|
|
99
|
+
wishlist: 'Wishlist',
|
|
100
|
+
mywishlist: 'My wishlist',
|
|
101
|
+
accountinformation: 'Account information',
|
|
102
|
+
account: 'Account',
|
|
103
|
+
viewcart: 'View cart',
|
|
104
|
+
cart: 'Cart',
|
|
105
|
+
myshoppingcart: 'My shopping cart',
|
|
106
|
+
previousorders: 'Previous orders',
|
|
107
|
+
checkout: 'Checkout',
|
|
108
|
+
mycart: 'My cart',
|
|
109
|
+
login: 'Login',
|
|
110
|
+
signup: 'Signup',
|
|
111
|
+
// General
|
|
112
|
+
inprogress: 'In progress',
|
|
113
|
+
status: 'Status',
|
|
114
|
+
excludingdelivery: 'Excluding delivery',
|
|
115
|
+
stayconnected: 'Stay connected',
|
|
116
|
+
availability: 'Availability',
|
|
117
|
+
available: 'Available',
|
|
118
|
+
limitedquantity: 'Limited quantity',
|
|
119
|
+
securepayment: 'Secure payment',
|
|
120
|
+
trustedshipping: 'Trusted shipping',
|
|
121
|
+
callus: 'CALL US',
|
|
122
|
+
returnpolicy: 'Return policy',
|
|
123
|
+
shippingpolicy: 'Shipping policy',
|
|
124
|
+
deliverto: 'Deliver to',
|
|
125
|
+
support247: 'Support 24/7',
|
|
126
|
+
select: 'Select',
|
|
127
|
+
usefullinks: 'Useful links',
|
|
128
|
+
helpcenter: 'Help center',
|
|
129
|
+
loggedinas: 'Logged in as',
|
|
130
|
+
// Buttons
|
|
131
|
+
logout: 'Logout',
|
|
132
|
+
addtocart: 'Add to cart',
|
|
133
|
+
addtofavorites: 'Add to favorites',
|
|
134
|
+
removefromfav: 'Remove from favorites',
|
|
135
|
+
description: 'Description',
|
|
136
|
+
showmore: 'Show more',
|
|
137
|
+
remove: 'Remove',
|
|
138
|
+
shopbycategory: 'shop by category',
|
|
139
|
+
confirmorder: 'Confirm Order',
|
|
140
|
+
continuetopayment: 'Continue To Payment',
|
|
141
|
+
doyouhavepromocode: 'Do you have a promo code?',
|
|
142
|
+
loginwithfacebook: 'Sign in with facebook',
|
|
143
|
+
orsigninwith: 'Or Sign in with',
|
|
144
|
+
orsignupwith: 'Or Sign up with',
|
|
145
|
+
// Products
|
|
146
|
+
price: 'Price',
|
|
147
|
+
relatedproducts: 'Related products',
|
|
148
|
+
qty: 'QTY',
|
|
149
|
+
emptyshoppingcart: 'Your shopping cart is empty',
|
|
150
|
+
shopnow: 'Shop now',
|
|
151
|
+
total: 'Total',
|
|
152
|
+
otherinformation: 'Other information',
|
|
153
|
+
productname: 'Product name',
|
|
154
|
+
quantity: 'Quantity',
|
|
155
|
+
// Orders
|
|
156
|
+
orderid: 'Order ID',
|
|
157
|
+
numberofproducts: 'Number of products',
|
|
158
|
+
checkyourorder: 'Check your order',
|
|
159
|
+
// Placeholders
|
|
160
|
+
searchproducts: 'Search for products...',
|
|
161
|
+
choosecity: 'Choose city',
|
|
162
|
+
choosestategov: 'Choose state/governorate',
|
|
163
|
+
choosecountry: 'Choose country',
|
|
164
|
+
giftcarddicountcode: 'Gift Card Or Discount Code...',
|
|
165
|
+
nosearchresults: 'No search results',
|
|
166
|
+
sale: 'Sale',
|
|
167
|
+
//
|
|
168
|
+
nofavoriteproducts: 'Your wishlist is empty',
|
|
169
|
+
// Notifications
|
|
170
|
+
loggedoutsuccess: 'Logged out successfully',
|
|
171
|
+
addedtocartsuccess: 'Cart is updated successfully',
|
|
172
|
+
promocodeapplied: 'Promo code is applied.',
|
|
173
|
+
promocoderemoved: 'Promo code is removed',
|
|
174
|
+
countryandstateupdatedsuccess: 'Country and state are updated successfully',
|
|
175
|
+
orderaddedsuccess: 'Order is added successfully',
|
|
176
|
+
addedtowishlist: 'Product is added to your wishlist',
|
|
177
|
+
productrmovedfromwishlist: 'Product is removed from your wishlist',
|
|
178
|
+
fillthemissingfields: 'Please complete the missing fields',
|
|
179
|
+
passwordsdontmatch: "Passwords don't match",
|
|
180
|
+
loggedinsuccess: 'Logged in successfully',
|
|
181
|
+
// Checkout
|
|
182
|
+
subtotal: 'Sub total',
|
|
183
|
+
discount: 'Discount',
|
|
184
|
+
outofzone: 'Out of zone'
|
|
185
|
+
}, _defineProperty__default["default"](_en, "total", 'Total'), _defineProperty__default["default"](_en, "cod", 'Cash on Delivery'), _defineProperty__default["default"](_en, "cardondelivery", 'Credit Card On Delivery'), _defineProperty__default["default"](_en, "onlinepayment", 'Online Payment'), _defineProperty__default["default"](_en, "paymentcardinformation", 'Payment Card Information'), _defineProperty__default["default"](_en, "shippingfees", 'Shipping fees'), _defineProperty__default["default"](_en, "shippingaddress", 'Shipping address'), _defineProperty__default["default"](_en, "cardnumber", 'Card number'), _defineProperty__default["default"](_en, "year", 'Year'), _defineProperty__default["default"](_en, "month", 'Month'), _defineProperty__default["default"](_en, "cvv", 'CVV'), _defineProperty__default["default"](_en, "nameoncard", 'Name On Card'), _defineProperty__default["default"](_en, "country", 'Country'), _defineProperty__default["default"](_en, "addressdetails", 'ِAddress details'), _defineProperty__default["default"](_en, "stategov", 'State/Governorate'), _defineProperty__default["default"](_en, "city", 'City'), _defineProperty__default["default"](_en, "paymentmethod", 'Payment method'), _defineProperty__default["default"](_en, "productimage", 'Product image'), _defineProperty__default["default"](_en, "orderdetails", 'Order details'), _defineProperty__default["default"](_en, "orderinvoice", 'Order invoice'), _defineProperty__default["default"](_en, "promocodediscount", 'Promo code discount'), _defineProperty__default["default"](_en, "address", 'Address'), _defineProperty__default["default"](_en, "signup", 'Signup'), _defineProperty__default["default"](_en, "update", 'Update'), _defineProperty__default["default"](_en, "phonenumber", 'Mobile number'), _defineProperty__default["default"](_en, "completerequiredfields", 'Please complete all required fields'), _defineProperty__default["default"](_en, "name", 'Name'), _defineProperty__default["default"](_en, "email", 'Email'), _defineProperty__default["default"](_en, "password", 'Password'), _defineProperty__default["default"](_en, "confirmpassword", 'Confirm password'), _defineProperty__default["default"](_en, "showmore", 'Show more'), _defineProperty__default["default"](_en, "showless", 'Show less'), _defineProperty__default["default"](_en, "contactdetails", 'Contact Information'), _defineProperty__default["default"](_en, "asaguest", 'As a guest'), _defineProperty__default["default"](_en, "choosecountryfirst", 'Please choose country first'), _defineProperty__default["default"](_en, "security", 'Security'), _defineProperty__default["default"](_en, "personalinformation", 'Personal Information'), _defineProperty__default["default"](_en, "contactus", 'Contact us'), _defineProperty__default["default"](_en, "slogan", 'Your website & mobile application in one place'), _en),
|
|
186
|
+
ar: (_ar = {
|
|
187
|
+
workinghours: 'مواعيد العمل',
|
|
188
|
+
english: 'لغه إنجليزيه',
|
|
189
|
+
arabic: 'لغه عربيه',
|
|
190
|
+
hello: 'مرحبا',
|
|
191
|
+
// Static Pages
|
|
192
|
+
orderhistory: 'الطلبات السابقة',
|
|
193
|
+
policies: 'السياسات',
|
|
194
|
+
wishlist: 'المفضلات',
|
|
195
|
+
mywishlist: 'مفضلاتى',
|
|
196
|
+
accountinformation: 'الملف الشخصي',
|
|
197
|
+
account: 'الملف الشخصي',
|
|
198
|
+
viewcart: 'حقيبة التسوق',
|
|
199
|
+
cart: 'حقيبة التسوق',
|
|
200
|
+
myshoppingcart: 'حقيبة التسوق',
|
|
201
|
+
previousorders: 'الطلبات السابقة',
|
|
202
|
+
checkout: 'الدفع',
|
|
203
|
+
mycart: 'عربة التسوق',
|
|
204
|
+
login: 'تسجيل الدخول',
|
|
205
|
+
signup: 'إنشاء الحساب',
|
|
206
|
+
// General
|
|
207
|
+
inprogress: 'جارى',
|
|
208
|
+
status: 'الحالة',
|
|
209
|
+
excludingdelivery: 'غير شامل سعر الشحن',
|
|
210
|
+
stayconnected: 'ابق على اتصال بنا',
|
|
211
|
+
availability: 'توافر المنتج',
|
|
212
|
+
available: 'متوافر',
|
|
213
|
+
limitedquantity: 'كمية محدودة',
|
|
214
|
+
securepayment: 'دفع امن',
|
|
215
|
+
trustedshipping: 'شحن امن',
|
|
216
|
+
callus: 'إتصل بنا',
|
|
217
|
+
returnpolicy: 'سياسة الإستبدال و الإسترجاع',
|
|
218
|
+
shippingpolicy: 'سياسة الشحن',
|
|
219
|
+
deliverto: 'التوصيل إلى',
|
|
220
|
+
support247: 'متواجدون 24/7',
|
|
221
|
+
select: 'إختر',
|
|
222
|
+
usefullinks: 'روابط هامة',
|
|
223
|
+
helpcenter: 'مركز الخدمات',
|
|
224
|
+
loggedinas: 'البيانات المسجلة',
|
|
225
|
+
// Buttons
|
|
226
|
+
logout: 'تسجيل الخروج',
|
|
227
|
+
addtocart: 'اضف لسلة التسوق',
|
|
228
|
+
addtofavorites: 'اضف إلى المفضلات',
|
|
229
|
+
removefromfav: 'حذف من المفضلات',
|
|
230
|
+
description: 'التفاصيل',
|
|
231
|
+
showmore: 'تفاصيل اخري',
|
|
232
|
+
remove: 'حذف',
|
|
233
|
+
shopbycategory: 'تسوق بالمجموعات',
|
|
234
|
+
confirmorder: 'تأكيد الطلب',
|
|
235
|
+
continuetopayment: 'الدفع',
|
|
236
|
+
doyouhavepromocode: 'هل لديك كود خصم',
|
|
237
|
+
loginwithfacebook: 'تسجيل الدخول عن طريق فيسبوك',
|
|
238
|
+
orsigninwith: 'او تسجيل الدخول عن طريق',
|
|
239
|
+
orsignupwith: 'او انشاء حساب عن طريق',
|
|
240
|
+
// Products
|
|
241
|
+
price: 'السعر',
|
|
242
|
+
relatedproducts: 'منتجات ذات صلة',
|
|
243
|
+
qty: 'الكمية',
|
|
244
|
+
emptyshoppingcart: 'حقيبة التسوق فارغة',
|
|
245
|
+
shopnow: 'تسوق الان',
|
|
246
|
+
total: 'الإجمالى',
|
|
247
|
+
otherinformation: 'معلومات اخرى',
|
|
248
|
+
productname: 'إسم المنتج',
|
|
249
|
+
quantity: 'الكمية',
|
|
250
|
+
// Orders
|
|
251
|
+
orderid: 'رقم الطلب',
|
|
252
|
+
numberofproducts: 'عدد المنتجات',
|
|
253
|
+
checkyourorder: 'الذهاب إلى طلبك',
|
|
254
|
+
// Placeholders
|
|
255
|
+
searchproducts: 'ابحث...',
|
|
256
|
+
choosecity: 'إختر المدينة',
|
|
257
|
+
choosestategov: 'إختر المحافظة/الولاية',
|
|
258
|
+
choosecountry: 'إختر البلد',
|
|
259
|
+
giftcarddicountcode: 'كود خصم',
|
|
260
|
+
nosearchresults: 'لا توجد نتائج',
|
|
261
|
+
sale: 'خصم',
|
|
262
|
+
//
|
|
263
|
+
nofavoriteproducts: 'لا توجد منتجات مفضلة',
|
|
264
|
+
// Notifications
|
|
265
|
+
loggedoutsuccess: 'تم تسجيل الخروج',
|
|
266
|
+
addedtocartsuccess: 'تم إضافة المنتج لعربة التسوق',
|
|
267
|
+
promocodeapplied: 'تم تطبيق كود الخصم',
|
|
268
|
+
promocoderemoved: 'تم حذف كود الخصم',
|
|
269
|
+
countryandstateupdatedsuccess: 'تم تحديث البلد و المدينة',
|
|
270
|
+
orderaddedsuccess: 'تم إضافة الطلب',
|
|
271
|
+
addedtowishlist: 'تم إضافة المنتج فى المفضلات',
|
|
272
|
+
productrmovedfromwishlist: 'تم حذف المنتج من المفضلات',
|
|
273
|
+
fillthemissingfields: 'من فضلك اكمل باقى البيانات',
|
|
274
|
+
passwordsdontmatch: 'كلمات السر لا تتطابق',
|
|
275
|
+
loggedinsuccess: 'تم تسجيل الدخول',
|
|
276
|
+
// Checkout
|
|
277
|
+
subtotal: 'إجمالي المبلغ',
|
|
278
|
+
discount: 'الخصم',
|
|
279
|
+
outofzone: 'خارج نطاق الشحن'
|
|
280
|
+
}, _defineProperty__default["default"](_ar, "total", 'المبلغ الكلي'), _defineProperty__default["default"](_ar, "cod", 'الدفع عند الإستلام'), _defineProperty__default["default"](_ar, "cardondelivery", 'الدفع بالطاقة الائتمانية عند الإستلام'), _defineProperty__default["default"](_ar, "onlinepayment", 'الدفع الإلكترونى'), _defineProperty__default["default"](_ar, "paymentcardinformation", 'بيانات البطاقة'), _defineProperty__default["default"](_ar, "shippingfees", 'مصاريف الشحن'), _defineProperty__default["default"](_ar, "shippingaddress", 'عنوان الشحن'), _defineProperty__default["default"](_ar, "cardnumber", 'رقم البطاقة'), _defineProperty__default["default"](_ar, "year", 'السنة'), _defineProperty__default["default"](_ar, "month", 'الشهر'), _defineProperty__default["default"](_ar, "cvv", 'رقم البطاقة'), _defineProperty__default["default"](_ar, "nameoncard", 'الإسم على البطاقة'), _defineProperty__default["default"](_ar, "country", 'البلد'), _defineProperty__default["default"](_ar, "addressdetails", 'العنوان'), _defineProperty__default["default"](_ar, "stategov", 'المحافظة/الولاية'), _defineProperty__default["default"](_ar, "city", 'المدينة'), _defineProperty__default["default"](_ar, "paymentmethod", 'طريقة الدفع'), _defineProperty__default["default"](_ar, "productimage", 'صورة المنتج'), _defineProperty__default["default"](_ar, "orderdetails", 'تفاصيل الطلب'), _defineProperty__default["default"](_ar, "orderinvoice", 'فاتورة الطلب'), _defineProperty__default["default"](_ar, "promocodediscount", 'كود الخصم'), _defineProperty__default["default"](_ar, "address", 'العنوان'), _defineProperty__default["default"](_ar, "signup", 'إنشاء الحساب'), _defineProperty__default["default"](_ar, "update", 'تحديث'), _defineProperty__default["default"](_ar, "phonenumber", 'الهاتف'), _defineProperty__default["default"](_ar, "completerequiredfields", 'من فضلك اكمل البيانات الإجبارية'), _defineProperty__default["default"](_ar, "name", 'الإسم'), _defineProperty__default["default"](_ar, "email", 'البريد الإلكترونى'), _defineProperty__default["default"](_ar, "password", 'كلمة السر'), _defineProperty__default["default"](_ar, "confirmpassword", 'تأكيد كلمة السر'), _defineProperty__default["default"](_ar, "showless", 'اعرض اقل'), _defineProperty__default["default"](_ar, "showmore", 'اعرض المزيد'), _defineProperty__default["default"](_ar, "contactdetails", 'معلومات التواصل'), _defineProperty__default["default"](_ar, "asaguest", 'كزائر'), _defineProperty__default["default"](_ar, "choosecountryfirst", 'من فضلك اختر البلد اولاً'), _defineProperty__default["default"](_ar, "security", 'الخصوصية و الأمان'), _defineProperty__default["default"](_ar, "personalinformation", 'البيانات الشخصية'), _defineProperty__default["default"](_ar, "contactus", 'تواصل معنا'), _defineProperty__default["default"](_ar, "slogan", 'موقعك و تطبيقك فى مكان واحد'), _ar)
|
|
281
|
+
},
|
|
282
|
+
langdetect: 'en',
|
|
283
|
+
setlang: _this.setlang
|
|
284
|
+
};
|
|
285
|
+
return _this;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
_createClass__default["default"](LanguageProvider, [{
|
|
289
|
+
key: "componentDidMount",
|
|
290
|
+
value: function componentDidMount() {
|
|
291
|
+
var cookies = new Cookies__default["default"]();
|
|
292
|
+
var lastlangselected = cookies.get('sitelang');
|
|
293
|
+
|
|
294
|
+
if (lastlangselected == 'en') {
|
|
295
|
+
this.setState({
|
|
296
|
+
langdetect: 'en'
|
|
297
|
+
});
|
|
298
|
+
} else if (lastlangselected == 'ar') {
|
|
299
|
+
this.setState({
|
|
300
|
+
langdetect: 'ar'
|
|
301
|
+
});
|
|
302
|
+
} else {
|
|
303
|
+
this.setState({
|
|
304
|
+
langdetect: 'en'
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}, {
|
|
309
|
+
key: "render",
|
|
310
|
+
value: function render() {
|
|
311
|
+
var setlang = this.state.setlang;
|
|
312
|
+
var lang = '';
|
|
313
|
+
|
|
314
|
+
if (this.state.langdetect == 'en') {
|
|
315
|
+
lang = this.state.lang.en; // window.document.body.setAttribute('dir', 'ltr');
|
|
316
|
+
} else if (this.state.langdetect == 'ar') {
|
|
317
|
+
lang = this.state.lang.ar; // window.document.body.setAttribute('dir', 'rtl');
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
var langdetect = this.state.langdetect;
|
|
321
|
+
return /*#__PURE__*/React__default["default"].createElement(LanguageContext$1.Provider, {
|
|
322
|
+
value: {
|
|
323
|
+
lang: lang,
|
|
324
|
+
setlang: setlang,
|
|
325
|
+
langdetect: langdetect
|
|
326
|
+
}
|
|
327
|
+
}, this.props.children);
|
|
328
|
+
}
|
|
329
|
+
}]);
|
|
330
|
+
|
|
331
|
+
return LanguageProvider;
|
|
332
|
+
}(React.Component);
|
|
333
|
+
LanguageContext$1.Consumer;
|
|
334
|
+
|
|
51
335
|
function styleInject(css, ref) {
|
|
52
336
|
if ( ref === void 0 ) ref = {};
|
|
53
337
|
var insertAt = ref.insertAt;
|
|
@@ -23889,6 +24173,8 @@
|
|
|
23889
24173
|
|
|
23890
24174
|
var returnLibrary = function returnLibrary() {
|
|
23891
24175
|
return {
|
|
24176
|
+
LanguageContext: LanguageContext$1,
|
|
24177
|
+
LanguageProvider: LanguageProvider,
|
|
23892
24178
|
AwesomeButton: AwesomeButton,
|
|
23893
24179
|
// Checkout: Checkout,
|
|
23894
24180
|
// Signup: Signup,
|