@gobizweb/core 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +56 -0
- package/assets/icons/arrow_left.svg +1 -0
- package/assets/icons/right_pointing.svg +1 -0
- package/assets/icons/thumb-up.svg +1 -0
- package/assets/images/server_error_dino.svg +1 -0
- package/assets/images/spot_hero_empty_list.svg +1 -0
- package/lib/bootstrap.js +39 -0
- package/lib/components/AccordionSelect/AccordionSelect.component.js +131 -0
- package/lib/components/AccordionSelect/AccordionSelect.styled.js +18 -0
- package/lib/components/AccordionSelect/index.js +13 -0
- package/lib/components/AlertBox/AlertBox.component.js +54 -0
- package/lib/components/AlertBox/AlertBox.styled.js +32 -0
- package/lib/components/AlertBox/index.js +13 -0
- package/lib/components/AlertDialog/AlertDialog.js +66 -0
- package/lib/components/AlertDialog/AlertDialog.styled.js +13 -0
- package/lib/components/AlertDialog/index.js +13 -0
- package/lib/components/Asphalt/Input.component.js +59 -0
- package/lib/components/Asphalt/index.js +13 -0
- package/lib/components/AsphaltPolyfill/AsphaltPolyfill.component.js +26 -0
- package/lib/components/AsphaltPolyfill/AsphaltPolyfill.loader.js +8 -0
- package/lib/components/AsphaltPolyfill/index.js +13 -0
- package/lib/components/Box/index.js +51 -0
- package/lib/components/Breakpoint/Breakpoint.component.js +63 -0
- package/lib/components/Breakpoint/index.js +13 -0
- package/lib/components/Button/Button.js +109 -0
- package/lib/components/Button/index.js +13 -0
- package/lib/components/Card/Card.js +75 -0
- package/lib/components/Card/Card.styled.js +60 -0
- package/lib/components/Card/index.js +13 -0
- package/lib/components/CardList/CardList.component.js +55 -0
- package/lib/components/CardList/index.js +13 -0
- package/lib/components/Checkbox/Checkbox.js +60 -0
- package/lib/components/Checkbox/index.js +13 -0
- package/lib/components/Container/Container.js +74 -0
- package/lib/components/Container/index.js +13 -0
- package/lib/components/DatePicker/Datepicker.component.js +57 -0
- package/lib/components/DatePicker/index.js +13 -0
- package/lib/components/Dropdown/Dropdown.component.js +63 -0
- package/lib/components/Dropdown/index.js +13 -0
- package/lib/components/EmptyState/EmptyState.component.js +47 -0
- package/lib/components/EmptyState/index.js +13 -0
- package/lib/components/ErrorModal/ErrorModal.component.js +41 -0
- package/lib/components/ErrorModal/ErrorModal.store.js +43 -0
- package/lib/components/ErrorModal/index.js +14 -0
- package/lib/components/ErrorScreen/ErrorScreen.js +19 -0
- package/lib/components/ErrorScreen/index.js +13 -0
- package/lib/components/FilterModal/FilterModal.js +41 -0
- package/lib/components/FilterModal/FilterModal.state.js +139 -0
- package/lib/components/FilterModal/index.js +13 -0
- package/lib/components/GlobalFilter/GlobalFilter.component.js +32 -0
- package/lib/components/GlobalFilter/GlobalFilter.component.state.js +116 -0
- package/lib/components/GlobalFilter/GlobalFilter.constant.js +17 -0
- package/lib/components/GlobalFilter/GlobalFilter.date.component.js +34 -0
- package/lib/components/GlobalFilter/GlobalFilter.interface.js +2 -0
- package/lib/components/GlobalFilter/GlobalFilter.provider.js +169 -0
- package/lib/components/GlobalFilter/GlobalFilter.styled.js +16 -0
- package/lib/components/GlobalFilter/index.js +16 -0
- package/lib/components/Guard/Guard.component.js +18 -0
- package/lib/components/Guard/index.js +13 -0
- package/lib/components/IframeLoader/IframeLoader.js +47 -0
- package/lib/components/IframeLoader/index.js +13 -0
- package/lib/components/Input/Input.component.js +167 -0
- package/lib/components/Input/index.js +13 -0
- package/lib/components/LanguageSwitcher/LanguageSwitcher.component.js +78 -0
- package/lib/components/LanguageSwitcher/LanguageSwitcher.state.js +20 -0
- package/lib/components/LanguageSwitcher/LanguageSwitcher.styled.js +40 -0
- package/lib/components/LanguageSwitcher/index.js +13 -0
- package/lib/components/List/List.js +46 -0
- package/lib/components/List/index.js +13 -0
- package/lib/components/ListSelector/ListSelector.component.js +22 -0
- package/lib/components/ListSelector/ListSelector.state.js +11 -0
- package/lib/components/ListSelector/ListSelector.styled.js +15 -0
- package/lib/components/ListSelector/index.js +13 -0
- package/lib/components/Loading/Loading.js +52 -0
- package/lib/components/Loading/Loading.styled.js +45 -0
- package/lib/components/Loading/index.js +13 -0
- package/lib/components/LoadingModule/LoadingModule.component.js +49 -0
- package/lib/components/LoadingModule/index.js +13 -0
- package/lib/components/MobileAppBar/MobileAppBar.js +90 -0
- package/lib/components/MobileAppBar/MobileAppBar.styled.js +36 -0
- package/lib/components/MobileAppBar/WithMobileAppBar.js +43 -0
- package/lib/components/MobileAppBar/index.js +14 -0
- package/lib/components/Modal/Modal.js +149 -0
- package/lib/components/Modal/ModalManager.context.js +6 -0
- package/lib/components/Modal/ModalManager.js +118 -0
- package/lib/components/Modal/index.js +15 -0
- package/lib/components/Navigation/Navigation.component.js +25 -0
- package/lib/components/Navigation/Navigation.provider.js +69 -0
- package/lib/components/Navigation/Navigation.styled.js +33 -0
- package/lib/components/Navigation/index.js +14 -0
- package/lib/components/PageTitle/PageTitle.component.js +47 -0
- package/lib/components/PageTitle/index.js +13 -0
- package/lib/components/Pagination/Pagination.component.js +49 -0
- package/lib/components/Pagination/index.js +13 -0
- package/lib/components/Radio/Radio.component.js +69 -0
- package/lib/components/Radio/Radio.styled.js +44 -0
- package/lib/components/Radio/RadioGroup.component.js +24 -0
- package/lib/components/Radio/RadioGroup.context.js +6 -0
- package/lib/components/Radio/index.js +15 -0
- package/lib/components/Separator/Separator.component.js +59 -0
- package/lib/components/Separator/index.js +13 -0
- package/lib/components/Skeleton/SkeletonApp.component.js +90 -0
- package/lib/components/Skeleton/SkeletonTable.component.js +36 -0
- package/lib/components/Skeleton/SkeletonText.component.js +62 -0
- package/lib/components/Skeleton/SkeletonWrapper.component.js +46 -0
- package/lib/components/Skeleton/index.js +16 -0
- package/lib/components/Stepper/Stepper.component.js +126 -0
- package/lib/components/Stepper/WithStepper.js +65 -0
- package/lib/components/Stepper/index.js +16 -0
- package/lib/components/Table/Table.component.js +71 -0
- package/lib/components/Table/Table.styled.js +51 -0
- package/lib/components/Table/index.js +13 -0
- package/lib/components/TableContainer/TableContainer.js +32 -0
- package/lib/components/TableContainer/index.js +13 -0
- package/lib/components/Text/Text.component.js +90 -0
- package/lib/components/Text/index.js +13 -0
- package/lib/components/Toast/Toast.component.js +65 -0
- package/lib/components/Toast/Toast.interface.js +2 -0
- package/lib/components/Toast/Toast.manager.js +61 -0
- package/lib/components/Toast/Toast.provider.js +85 -0
- package/lib/components/Toast/Toast.styled.js +18 -0
- package/lib/components/Toast/index.js +15 -0
- package/lib/components/Tours/index.js +100 -0
- package/lib/components/index.js +51 -0
- package/lib/constants/AndroidVersions.js +6 -0
- package/lib/constants/AppNames.js +10 -0
- package/lib/constants/AsphaltTheme.js +43 -0
- package/lib/constants/GobizApp.js +11 -0
- package/lib/constants/MediaQueries.js +30 -0
- package/lib/constants/PostalCodes.js +8382 -0
- package/lib/constants/PubsubEvents.js +12 -0
- package/lib/constants/TnCFiles.js +77 -0
- package/lib/constants/ValidationRegex.js +6 -0
- package/lib/constants/cookies.js +38 -0
- package/lib/constants/datetime.js +103 -0
- package/lib/constants/index.js +24 -0
- package/lib/constants/roles.js +17 -0
- package/lib/contexts/AppTheme.js +221 -0
- package/lib/decorators/utility-classes.js +78 -0
- package/lib/decorators/withStyles.js +73 -0
- package/lib/helpers/BrowserEnvironment.js +22 -0
- package/lib/helpers/ESQuery.js +98 -0
- package/lib/helpers/chart.js +251 -0
- package/lib/helpers/cleanObject.js +15 -0
- package/lib/helpers/conversion.js +4 -0
- package/lib/helpers/cookies.js +54 -0
- package/lib/helpers/copywrite.js +15 -0
- package/lib/helpers/currency.js +73 -0
- package/lib/helpers/dateFormat.js +47 -0
- package/lib/helpers/datePresets.js +77 -0
- package/lib/helpers/debounce.js +31 -0
- package/lib/helpers/deepMerge.js +81 -0
- package/lib/helpers/downloadURL.js +11 -0
- package/lib/helpers/enumReverseMap.js +12 -0
- package/lib/helpers/env.js +18 -0
- package/lib/helpers/fileDownloader.js +33 -0
- package/lib/helpers/formatNumber.js +10 -0
- package/lib/helpers/formatPercentage.js +13 -0
- package/lib/helpers/gobizApp.js +27 -0
- package/lib/helpers/identityValidator.js +6 -0
- package/lib/helpers/index.js +50 -0
- package/lib/helpers/json.js +17 -0
- package/lib/helpers/logger.js +93 -0
- package/lib/helpers/maskAccount.js +26 -0
- package/lib/helpers/numbers.js +6 -0
- package/lib/helpers/path.js +27 -0
- package/lib/helpers/paymentTypeHuman.js +62 -0
- package/lib/helpers/refreshConfig.js +12 -0
- package/lib/helpers/refreshToken.js +108 -0
- package/lib/helpers/safeParse.js +31 -0
- package/lib/helpers/scrollToTop.js +9 -0
- package/lib/helpers/shortID.js +17 -0
- package/lib/helpers/textParser.js +10 -0
- package/lib/helpers/time.js +54 -0
- package/lib/helpers/tour.js +38 -0
- package/lib/helpers/transform.js +24 -0
- package/lib/helpers/url.js +30 -0
- package/lib/helpers/wildcardToRegEx.js +15 -0
- package/lib/hooks/index.js +26 -0
- package/lib/hooks/useBreakpoint.js +35 -0
- package/lib/hooks/useCurrency.js +27 -0
- package/lib/hooks/useDatesFromTimeRange.js +40 -0
- package/lib/hooks/useEventListener.js +24 -0
- package/lib/hooks/useFormValidator.js +38 -0
- package/lib/hooks/useHttpOptions.js +104 -0
- package/lib/hooks/useLogger.js +57 -0
- package/lib/hooks/useNavigation.js +16 -0
- package/lib/hooks/usePhone.js +14 -0
- package/lib/hooks/useQueryInit.js +21 -0
- package/lib/hooks/useQueryParams.js +95 -0
- package/lib/hooks/useShowGlobalFilter.js +101 -0
- package/lib/hooks/useWebview.js +48 -0
- package/lib/hooks/useWindow.js +19 -0
- package/lib/models/AuthUser.model.js +159 -0
- package/lib/models/Outlet.model.js +274 -0
- package/lib/models/User.model.js +106 -0
- package/lib/models/index.js +15 -0
- package/lib/providers/Alert.provider.js +65 -0
- package/lib/providers/AppTheme.provider.js +75 -0
- package/lib/providers/Auth.provider.js +239 -0
- package/lib/providers/Clevertap.provider.js +117 -0
- package/lib/providers/GoogleAnalytics.provider.js +113 -0
- package/lib/providers/Host.provider.js +71 -0
- package/lib/providers/Language.provider.js +127 -0
- package/lib/providers/Logger.provider.js +32 -0
- package/lib/providers/MicroApp.provider.js +63 -0
- package/lib/providers/Outlets.provider.js +180 -0
- package/lib/providers/Token.provider.js +101 -0
- package/lib/providers/Translation.provider.js +56 -0
- package/lib/providers/index.js +24 -0
- package/package.json +47 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AUTH_MF = exports.AUTH_PF = exports.NAVIGATION_MF = exports.NAVIGATION_PF = exports.GLOBALFILTER_MF_FILTER = exports.GLOBALFILTER_PF_FILTER = exports.GLOBALFILTER_MF_CONFIG = exports.GLOBALFILTER_PF_CONFIG = exports.PUB_SUB_EVENT_NAME = void 0;
|
4
|
+
exports.PUB_SUB_EVENT_NAME = "$__pubsub";
|
5
|
+
exports.GLOBALFILTER_PF_CONFIG = exports.PUB_SUB_EVENT_NAME + "__globalfilter__platform__config";
|
6
|
+
exports.GLOBALFILTER_MF_CONFIG = exports.PUB_SUB_EVENT_NAME + "__globalfilter__microfrontend__config";
|
7
|
+
exports.GLOBALFILTER_PF_FILTER = exports.PUB_SUB_EVENT_NAME + "__globalfilter__platform__filter";
|
8
|
+
exports.GLOBALFILTER_MF_FILTER = exports.PUB_SUB_EVENT_NAME + "__globalfilter__microfrontend__filter";
|
9
|
+
exports.NAVIGATION_PF = exports.PUB_SUB_EVENT_NAME + "__navigation__platform";
|
10
|
+
exports.NAVIGATION_MF = exports.PUB_SUB_EVENT_NAME + "__navigation__microfrontend";
|
11
|
+
exports.AUTH_PF = exports.PUB_SUB_EVENT_NAME + "__auth__platform";
|
12
|
+
exports.AUTH_MF = exports.PUB_SUB_EVENT_NAME + "__auth__microfrontend";
|
@@ -0,0 +1,77 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TNC_FILES = exports.TNC_VERSION = void 0;
|
4
|
+
// FIXME: Can't use shortened version `src/helpers`, because there is a cyclic dependency between the constants and
|
5
|
+
// helpers folder.
|
6
|
+
var env_1 = require("../helpers/env");
|
7
|
+
exports.TNC_VERSION = {
|
8
|
+
GOBIZ: {
|
9
|
+
VERSION: "v05.2021",
|
10
|
+
REVISION: 1,
|
11
|
+
},
|
12
|
+
GOFOOD: {
|
13
|
+
VERSION: "v01.2020",
|
14
|
+
REVISION: 1,
|
15
|
+
},
|
16
|
+
GOPAY: {
|
17
|
+
VERSION: "v01.2020",
|
18
|
+
REVISION: 1,
|
19
|
+
},
|
20
|
+
SPOTS_AGGREGATOR: {
|
21
|
+
VERSION: "v05.2021",
|
22
|
+
REVISION: 2,
|
23
|
+
},
|
24
|
+
SPOTS_POS: {
|
25
|
+
VERSION: "v01.2020",
|
26
|
+
REVISION: 1,
|
27
|
+
},
|
28
|
+
CLAIM_ADMIN: {
|
29
|
+
VERSION: "v04.2021",
|
30
|
+
REVISION: 1,
|
31
|
+
},
|
32
|
+
MANUAL_PAYOUT: {
|
33
|
+
VERSION: "v04.2021",
|
34
|
+
REVISION: 1,
|
35
|
+
},
|
36
|
+
GOFOOD_SOP: {
|
37
|
+
VERSION: "v10.2021",
|
38
|
+
REVISION: 1,
|
39
|
+
},
|
40
|
+
GOPAY_SOP: {
|
41
|
+
VERSION: "v10.2021",
|
42
|
+
REVISION: 1,
|
43
|
+
},
|
44
|
+
POS: {
|
45
|
+
VERSION: "v05.2021",
|
46
|
+
REVISION: 1,
|
47
|
+
},
|
48
|
+
MIDTRANS_AGGREGATOR: {
|
49
|
+
VERSION: "v11.2021",
|
50
|
+
REVISION: 1,
|
51
|
+
},
|
52
|
+
MIDTRANS: {
|
53
|
+
VERSION: "v10.2020",
|
54
|
+
REVISION: 1,
|
55
|
+
},
|
56
|
+
PANCASILA: {
|
57
|
+
VERSION: "v01.2021",
|
58
|
+
REVISION: 1,
|
59
|
+
},
|
60
|
+
};
|
61
|
+
var staticHost = env_1.env("REACT_APP_STATIC_HOST");
|
62
|
+
exports.TNC_FILES = {
|
63
|
+
GOBIZ: staticHost + "/terms-and-condition/gobiz-" + exports.TNC_VERSION.GOBIZ.VERSION,
|
64
|
+
GOFOOD: staticHost + "/terms-and-condition/gofood-" + exports.TNC_VERSION.GOFOOD.VERSION,
|
65
|
+
GOJEK_PRIVACY_POLICY: "https://www.gojek.com/privacy-policy",
|
66
|
+
GOPAY: staticHost + "/terms-and-condition/gopay-" + exports.TNC_VERSION.GOPAY.VERSION,
|
67
|
+
SPOTS_AGGREGATOR: staticHost + "/terms-and-condition/spots-aggregator-" + exports.TNC_VERSION.SPOTS_AGGREGATOR.VERSION,
|
68
|
+
SPOTS_POS: staticHost + "/terms-and-condition/spots-pos-" + exports.TNC_VERSION.SPOTS_POS.VERSION,
|
69
|
+
CLAIM_ADMIN_WITH_VERSION: staticHost + "/terms-and-condition/ownership-" + exports.TNC_VERSION.CLAIM_ADMIN.VERSION,
|
70
|
+
CLAIM_ADMIN: staticHost + "/terms-and-condition/ownership",
|
71
|
+
POS: staticHost + "/terms-and-condition/pos-" + exports.TNC_VERSION.POS.VERSION,
|
72
|
+
GOFOOD_SOP: staticHost + "/terms-and-condition/gofood-sop-" + exports.TNC_VERSION.GOFOOD_SOP.VERSION,
|
73
|
+
GOPAY_SOP: staticHost + "/terms-and-condition/gopay-sop-" + exports.TNC_VERSION.GOPAY_SOP.VERSION,
|
74
|
+
MIDTRANS_AGGREGATOR: staticHost + "/terms-and-condition/midtrans-aggregator-" + exports.TNC_VERSION.MIDTRANS_AGGREGATOR.VERSION,
|
75
|
+
MIDTRANS: staticHost + "/terms-and-condition/midtrans-" + exports.TNC_VERSION.MIDTRANS.VERSION,
|
76
|
+
PANCASILA: staticHost + "/terms-and-condition/gobiz-merchant-investment-tnc-" + exports.TNC_VERSION.PANCASILA.VERSION,
|
77
|
+
};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CookieNames = void 0;
|
4
|
+
/**
|
5
|
+
* Cookies with a $_ prefix indicates that they need to be scoped by user ID
|
6
|
+
*/
|
7
|
+
var CookieNames;
|
8
|
+
(function (CookieNames) {
|
9
|
+
CookieNames["AccessToken"] = "access_token";
|
10
|
+
CookieNames["RefreshToken"] = "refresh_token";
|
11
|
+
CookieNames["VersionCode"] = "version_code";
|
12
|
+
CookieNames["AppID"] = "app_id";
|
13
|
+
CookieNames["APILevel"] = "api_level";
|
14
|
+
CookieNames["Language"] = "language";
|
15
|
+
CookieNames["AppId"] = "app_id";
|
16
|
+
CookieNames["ApiLevel"] = "api_level";
|
17
|
+
CookieNames["Tour"] = "$_gobiz_tour";
|
18
|
+
CookieNames["SelectedCountry"] = "selected_country";
|
19
|
+
// email/phone stores the last successful authentication method, so next time
|
20
|
+
// user visits login, it will automatically show phone/email based on history
|
21
|
+
CookieNames["AuthMethod"] = "auth_method";
|
22
|
+
// The URL the user was trying to visit before being redirected to the login
|
23
|
+
// page. After successful login, the user will be redirected to that page.
|
24
|
+
CookieNames["DestinationBeforeLoggedOut"] = "destination_before_logout";
|
25
|
+
CookieNames["ManualPayoutSOP"] = "$_manual_payout";
|
26
|
+
CookieNames["PassportToken"] = "passport_token";
|
27
|
+
CookieNames["PassportBusinessInfoUrl"] = "$_passport_business_info_url";
|
28
|
+
CookieNames["PassportStep"] = "$_passport_step";
|
29
|
+
CookieNames["SkipCor"] = "skip_cor";
|
30
|
+
CookieNames["CorApproved"] = "$_cor_approved";
|
31
|
+
// to be removed once platformization is finished
|
32
|
+
CookieNames["GlobalFilterMerchantId"] = "merchant_id";
|
33
|
+
CookieNames["GlobalFilterStartDate"] = "start_time";
|
34
|
+
CookieNames["GlobalFilterEndDate"] = "end_time";
|
35
|
+
CookieNames["GlobalFilterDateRange"] = "date_range";
|
36
|
+
// GoBiz TnC
|
37
|
+
CookieNames["GoBizTermsAndCondition"] = "$_gobiz";
|
38
|
+
})(CookieNames = exports.CookieNames || (exports.CookieNames = {}));
|
@@ -0,0 +1,103 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DATE_RANGES = void 0;
|
4
|
+
exports.DATE_RANGES = {
|
5
|
+
en: {
|
6
|
+
date: [
|
7
|
+
{
|
8
|
+
key: "Today",
|
9
|
+
id: "today",
|
10
|
+
selected: true,
|
11
|
+
},
|
12
|
+
{
|
13
|
+
key: "Yesterday",
|
14
|
+
id: "yesterday",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
key: "This Week",
|
18
|
+
id: "this_week",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
key: "Last Week",
|
22
|
+
id: "last_week",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
key: "This Month",
|
26
|
+
id: "this_month",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
key: "Last Month",
|
30
|
+
id: "last_month",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
key: "Date Range",
|
34
|
+
id: "custom",
|
35
|
+
},
|
36
|
+
],
|
37
|
+
},
|
38
|
+
id: {
|
39
|
+
date: [
|
40
|
+
{
|
41
|
+
key: "Hari Ini",
|
42
|
+
id: "today",
|
43
|
+
selected: true,
|
44
|
+
},
|
45
|
+
{
|
46
|
+
key: "Kemarin",
|
47
|
+
id: "yesterday",
|
48
|
+
},
|
49
|
+
{
|
50
|
+
key: "Minggu Ini",
|
51
|
+
id: "this_week",
|
52
|
+
},
|
53
|
+
{
|
54
|
+
key: "Minggu Lalu",
|
55
|
+
id: "last_week",
|
56
|
+
},
|
57
|
+
{
|
58
|
+
key: "Bulan Ini",
|
59
|
+
id: "this_month",
|
60
|
+
},
|
61
|
+
{
|
62
|
+
key: "Bulan Lalu",
|
63
|
+
id: "last_month",
|
64
|
+
},
|
65
|
+
{
|
66
|
+
key: "Pilih Periode",
|
67
|
+
id: "custom",
|
68
|
+
},
|
69
|
+
],
|
70
|
+
},
|
71
|
+
vi: {
|
72
|
+
date: [
|
73
|
+
{
|
74
|
+
key: "Hôm nay",
|
75
|
+
id: "today",
|
76
|
+
},
|
77
|
+
{
|
78
|
+
key: "Hôm qua",
|
79
|
+
id: "yesterday",
|
80
|
+
},
|
81
|
+
{
|
82
|
+
key: "Tuần này",
|
83
|
+
id: "this_week",
|
84
|
+
},
|
85
|
+
{
|
86
|
+
key: "Tuần trước",
|
87
|
+
id: "last_week",
|
88
|
+
},
|
89
|
+
{
|
90
|
+
key: "Tháng này",
|
91
|
+
id: "this_month",
|
92
|
+
},
|
93
|
+
{
|
94
|
+
key: "Tháng trước",
|
95
|
+
id: "last_month",
|
96
|
+
},
|
97
|
+
{
|
98
|
+
key: "Tuỳ chỉnh",
|
99
|
+
id: "custom",
|
100
|
+
},
|
101
|
+
],
|
102
|
+
},
|
103
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
11
|
+
};
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
+
__exportStar(require("./cookies"), exports);
|
14
|
+
__exportStar(require("./roles"), exports);
|
15
|
+
__exportStar(require("./datetime"), exports);
|
16
|
+
__exportStar(require("./AsphaltTheme"), exports);
|
17
|
+
__exportStar(require("./AppNames"), exports);
|
18
|
+
__exportStar(require("./MediaQueries"), exports);
|
19
|
+
__exportStar(require("./AndroidVersions"), exports);
|
20
|
+
__exportStar(require("./GobizApp"), exports);
|
21
|
+
__exportStar(require("./PostalCodes"), exports);
|
22
|
+
__exportStar(require("./TnCFiles"), exports);
|
23
|
+
__exportStar(require("./ValidationRegex"), exports);
|
24
|
+
__exportStar(require("./PubsubEvents"), exports);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ROLES_MAPPER = exports.ROLES = void 0;
|
4
|
+
exports.ROLES = {
|
5
|
+
OWNER: "verified_admin",
|
6
|
+
ADMIN: "admin",
|
7
|
+
MANAGER: "manager",
|
8
|
+
CASHIER: "cashier",
|
9
|
+
TEMP: "temp",
|
10
|
+
};
|
11
|
+
exports.ROLES_MAPPER = [
|
12
|
+
"VERIFIED_ADMIN",
|
13
|
+
"ADMIN",
|
14
|
+
"MANAGER",
|
15
|
+
"TEMP",
|
16
|
+
"CASHIER",
|
17
|
+
];
|
@@ -0,0 +1,221 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.MIDTRANS_APP_THEME = exports.APP_THEME = void 0;
|
4
|
+
var deepMerge_1 = require("../helpers/deepMerge");
|
5
|
+
exports.APP_THEME = {
|
6
|
+
viewHeight: "100vh",
|
7
|
+
alertBox: {
|
8
|
+
boxShadow: "inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.025), 0 0 4px rgba(0, 0, 0, 0.2);",
|
9
|
+
colors: {
|
10
|
+
accent: "rgba(147, 50, 142, 0.3)",
|
11
|
+
danger: "#dc3309",
|
12
|
+
disabled: "rgb(220,220,220)",
|
13
|
+
info: "hsl(209, 100%, 42%)",
|
14
|
+
light: "#fafafa",
|
15
|
+
primary: "#832a8f",
|
16
|
+
primaryLight: "#93328e",
|
17
|
+
primaryReadable: "rgb(147, 50, 142, .2)",
|
18
|
+
shadow: "rgba(0, 0, 0, 0.5)",
|
19
|
+
success: "hsla(159, 97%, 27%, 1)",
|
20
|
+
warning: "#ff9a1f",
|
21
|
+
filePicker: "rgb(249, 249, 249)",
|
22
|
+
white: "#ffffff",
|
23
|
+
tableStrip: "rgb(249, 249, 249)",
|
24
|
+
},
|
25
|
+
opacity: "0.15",
|
26
|
+
zIndex: "unset",
|
27
|
+
alignItems: "center",
|
28
|
+
},
|
29
|
+
colors: {
|
30
|
+
background: {
|
31
|
+
accent: "rgba(147, 50, 142, 0.3)",
|
32
|
+
danger: "#dc3309",
|
33
|
+
disabled: "rgb(220,220,220)",
|
34
|
+
info: "hsl(209, 100%, 42%)",
|
35
|
+
light: "#fafafa",
|
36
|
+
primary: "#832a8f",
|
37
|
+
primaryLight: "#93328e",
|
38
|
+
primaryReadable: "rgb(147, 50, 142, .2)",
|
39
|
+
shadow: "rgba(0, 0, 0, 0.5)",
|
40
|
+
success: "hsla(159, 97%, 27%, 1)",
|
41
|
+
warning: "#ff9a1f",
|
42
|
+
filePicker: "rgb(249, 249, 249)",
|
43
|
+
white: "#ffffff",
|
44
|
+
tableStrip: "rgb(249, 249, 249)",
|
45
|
+
black: "#000",
|
46
|
+
},
|
47
|
+
message: {
|
48
|
+
primary: "#93328e",
|
49
|
+
danger: "#dc3309",
|
50
|
+
},
|
51
|
+
text: {
|
52
|
+
primary: "#832a8f",
|
53
|
+
danger: "#dc3309",
|
54
|
+
warning: "#ff9a1f",
|
55
|
+
disabled: "rgb(157,157,157)",
|
56
|
+
placeholder: "rgb(130,146,176)",
|
57
|
+
accent: "rgb(31,36,42)",
|
58
|
+
readable: "rgb(27,40,66)",
|
59
|
+
soft: "rgb(36,54,88)",
|
60
|
+
link: "#832a8f",
|
61
|
+
light: "#6c757d",
|
62
|
+
white: "#fff",
|
63
|
+
black: "#000",
|
64
|
+
},
|
65
|
+
borders: {
|
66
|
+
brand: "#832a8f",
|
67
|
+
light: "#e0e0e0",
|
68
|
+
active: "rgb(155,167,191)",
|
69
|
+
appBar: "rgb(232,232,232)",
|
70
|
+
cardBorder: "rgb(207, 211, 220)",
|
71
|
+
filePicker: "rgb(249, 249, 249)",
|
72
|
+
stepper: "rgb(231, 231, 231)",
|
73
|
+
},
|
74
|
+
gradients: {
|
75
|
+
backdrop: "linear-gradient(-180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.7) 100%);",
|
76
|
+
},
|
77
|
+
boxShadow: {
|
78
|
+
dropdown: "0px 0px 10px 0px hsla(222, 42%, 6%, 0.1)",
|
79
|
+
},
|
80
|
+
},
|
81
|
+
text: {
|
82
|
+
fontFamily: {
|
83
|
+
normal: "'Maison Neue', sans-serif",
|
84
|
+
extended: "'Maison Neue Extended', sans-serif",
|
85
|
+
},
|
86
|
+
fontWeight: {
|
87
|
+
demi: "600",
|
88
|
+
normal: "500",
|
89
|
+
book: "300",
|
90
|
+
bold: "bold",
|
91
|
+
extended: "700",
|
92
|
+
},
|
93
|
+
lineHeight: {
|
94
|
+
normal: "22px",
|
95
|
+
large: "25px",
|
96
|
+
xsmall: "14px",
|
97
|
+
},
|
98
|
+
size: {
|
99
|
+
xsmall: "10px",
|
100
|
+
small: "12px",
|
101
|
+
medium: "14px",
|
102
|
+
normal: "16px",
|
103
|
+
large: "18px",
|
104
|
+
mlarge: "21px",
|
105
|
+
xlarge: "24px",
|
106
|
+
xxlarge: "26px",
|
107
|
+
},
|
108
|
+
},
|
109
|
+
layout: {
|
110
|
+
zIndex: {
|
111
|
+
modal: 10000051,
|
112
|
+
dropdown: 10000050,
|
113
|
+
toast: 10000100,
|
114
|
+
filePickerTooltip: 2,
|
115
|
+
mobileHeader: 1,
|
116
|
+
},
|
117
|
+
margin: {
|
118
|
+
xs: 4,
|
119
|
+
s: 8,
|
120
|
+
m: 12,
|
121
|
+
l: 16,
|
122
|
+
xl: 24,
|
123
|
+
xxl: 32,
|
124
|
+
},
|
125
|
+
width: {
|
126
|
+
modal: 704,
|
127
|
+
languageSwitcherPopover: 184,
|
128
|
+
},
|
129
|
+
height: {
|
130
|
+
mobileHeader: 59,
|
131
|
+
},
|
132
|
+
},
|
133
|
+
dimension: {
|
134
|
+
borderRadius: [2, 4, 8, 12],
|
135
|
+
spacing: {
|
136
|
+
xs: 4,
|
137
|
+
s: 8,
|
138
|
+
m: 12,
|
139
|
+
l: 16,
|
140
|
+
xl: 24,
|
141
|
+
xxl: 32,
|
142
|
+
xxxl: 48,
|
143
|
+
},
|
144
|
+
width: {
|
145
|
+
modal: 704,
|
146
|
+
modalSlim: 440,
|
147
|
+
smallContainer: 464,
|
148
|
+
button: 144,
|
149
|
+
buttonLong: 180,
|
150
|
+
languageSwitcherPopover: 184,
|
151
|
+
stepper: 288,
|
152
|
+
},
|
153
|
+
},
|
154
|
+
animations: {
|
155
|
+
spin: "spin 1.5s linear infinite",
|
156
|
+
},
|
157
|
+
components: {
|
158
|
+
input: {
|
159
|
+
labelFontSize: "small",
|
160
|
+
},
|
161
|
+
combobox: {
|
162
|
+
optionHeight: 40,
|
163
|
+
},
|
164
|
+
},
|
165
|
+
};
|
166
|
+
exports.MIDTRANS_APP_THEME = deepMerge_1.deepMerge(exports.APP_THEME, {
|
167
|
+
alertBox: {
|
168
|
+
boxShadow: "unset",
|
169
|
+
/*
|
170
|
+
This colors is counterparts from background color to make it visible with same keyword
|
171
|
+
*/
|
172
|
+
colors: {
|
173
|
+
accent: "#fff",
|
174
|
+
danger: "#fff",
|
175
|
+
disabled: "#000",
|
176
|
+
info: "#fff",
|
177
|
+
light: "#000",
|
178
|
+
primary: "#fff",
|
179
|
+
success: "#fff",
|
180
|
+
warning: "#fff",
|
181
|
+
white: "#000",
|
182
|
+
},
|
183
|
+
opacity: "unset",
|
184
|
+
zIndex: "-1",
|
185
|
+
alignItems: "flex-start",
|
186
|
+
},
|
187
|
+
colors: {
|
188
|
+
background: {
|
189
|
+
accent: "#002855",
|
190
|
+
danger: "#dc3309",
|
191
|
+
disabled: "rgb(242,242,242)",
|
192
|
+
info: "hsl(209, 100%, 42%)",
|
193
|
+
primary: "#0256a6",
|
194
|
+
primaryLight: "#9DDCF9",
|
195
|
+
filePicker: "#F3F7FB",
|
196
|
+
},
|
197
|
+
message: {
|
198
|
+
primary: "rgb(230, 240, 250)",
|
199
|
+
danger: "rgb(251, 235, 230)",
|
200
|
+
},
|
201
|
+
text: {
|
202
|
+
primary: "#0256a6",
|
203
|
+
},
|
204
|
+
borders: {
|
205
|
+
brand: "#0256A7",
|
206
|
+
light: "#e0e0e0",
|
207
|
+
active: "rgb(155,167,191)",
|
208
|
+
appBar: "rgb(230,233,239)",
|
209
|
+
cardBorder: "rgb(207, 211, 220)",
|
210
|
+
filePicker: "#F3F7FB",
|
211
|
+
},
|
212
|
+
gradients: {
|
213
|
+
backdrop: "linear-gradient(-180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.7) 100%);",
|
214
|
+
},
|
215
|
+
},
|
216
|
+
components: {
|
217
|
+
input: {
|
218
|
+
labelFontSize: "normal",
|
219
|
+
},
|
220
|
+
},
|
221
|
+
});
|
@@ -0,0 +1,78 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UTILITY_CLASSES = void 0;
|
4
|
+
/**
|
5
|
+
* Add classes here and update styles/utility-classes.scss
|
6
|
+
*/
|
7
|
+
exports.UTILITY_CLASSES = [
|
8
|
+
"align-items-center",
|
9
|
+
"align-items-baseline",
|
10
|
+
"align-items-flex-start",
|
11
|
+
"align-self-center",
|
12
|
+
"border-top-light",
|
13
|
+
"border-box",
|
14
|
+
"flex",
|
15
|
+
"flex-auto",
|
16
|
+
"flex-grow",
|
17
|
+
"flex-basis-0",
|
18
|
+
"flex-shrink",
|
19
|
+
"flex-wrap",
|
20
|
+
"flex-direction-column",
|
21
|
+
"flex-direction-row",
|
22
|
+
"align-start",
|
23
|
+
"align-center",
|
24
|
+
"justify-center",
|
25
|
+
"justify-between",
|
26
|
+
"justify-evenly",
|
27
|
+
"justify-end",
|
28
|
+
"margin-0",
|
29
|
+
"margin-bottom-xxl",
|
30
|
+
"margin-bottom-xl",
|
31
|
+
"margin-bottom-l",
|
32
|
+
"margin-bottom-m",
|
33
|
+
"margin-bottom-xs",
|
34
|
+
"margin-bottom-s",
|
35
|
+
"margin-left-s",
|
36
|
+
"margin-left-m",
|
37
|
+
"margin-left-l",
|
38
|
+
"margin-left-xl",
|
39
|
+
"margin-right-s",
|
40
|
+
"margin-right-m",
|
41
|
+
"margin-right-xs",
|
42
|
+
"margin-right-xl",
|
43
|
+
"margin-right-l",
|
44
|
+
"margin-top-l",
|
45
|
+
"margin-top-m",
|
46
|
+
"margin-top-s",
|
47
|
+
"margin-top-xl",
|
48
|
+
"margin-top-xxl",
|
49
|
+
"padding-0",
|
50
|
+
"padding-s",
|
51
|
+
"padding-m",
|
52
|
+
"padding-l",
|
53
|
+
"padding-xl",
|
54
|
+
"padding-bottom-s",
|
55
|
+
"padding-bottom-m",
|
56
|
+
"padding-bottom-l",
|
57
|
+
"padding-bottom-xl",
|
58
|
+
"padding-top-l",
|
59
|
+
"padding-top-xl",
|
60
|
+
"padding-right-s",
|
61
|
+
"padding-right-m",
|
62
|
+
"padding-right-l",
|
63
|
+
"padding-right-xl",
|
64
|
+
"padding-left-s",
|
65
|
+
"padding-left-m",
|
66
|
+
"padding-left-l",
|
67
|
+
"padding-left-xl",
|
68
|
+
"padding-bottom-s",
|
69
|
+
"padding-vertical-s",
|
70
|
+
"padding-vertical-m",
|
71
|
+
"padding-vertical-l",
|
72
|
+
"padding-horizontal-s",
|
73
|
+
"padding-horizontal-m",
|
74
|
+
"padding-horizontal-l",
|
75
|
+
"overflow-y-scroll",
|
76
|
+
"width-100",
|
77
|
+
"text-center",
|
78
|
+
];
|
@@ -0,0 +1,73 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
3
|
+
__assign = Object.assign || function(t) {
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
+
s = arguments[i];
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
+
t[p] = s[p];
|
8
|
+
}
|
9
|
+
return t;
|
10
|
+
};
|
11
|
+
return __assign.apply(this, arguments);
|
12
|
+
};
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
14
|
+
if (k2 === undefined) k2 = k;
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
16
|
+
}) : (function(o, m, k, k2) {
|
17
|
+
if (k2 === undefined) k2 = k;
|
18
|
+
o[k2] = m[k];
|
19
|
+
}));
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
22
|
+
}) : function(o, v) {
|
23
|
+
o["default"] = v;
|
24
|
+
});
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
26
|
+
if (mod && mod.__esModule) return mod;
|
27
|
+
var result = {};
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
29
|
+
__setModuleDefault(result, mod);
|
30
|
+
return result;
|
31
|
+
};
|
32
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
33
|
+
var t = {};
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
35
|
+
t[p] = s[p];
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
39
|
+
t[p[i]] = s[p[i]];
|
40
|
+
}
|
41
|
+
return t;
|
42
|
+
};
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
45
|
+
};
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
47
|
+
exports.withStyles = void 0;
|
48
|
+
var React = __importStar(require("react"));
|
49
|
+
var classnames_1 = __importDefault(require("classnames"));
|
50
|
+
var transform_1 = require("../helpers/transform");
|
51
|
+
var utility_classes_1 = require("./utility-classes");
|
52
|
+
var utilityClassesInCamelCase = utility_classes_1.UTILITY_CLASSES.map(transform_1.kebabCaseToCamelCase);
|
53
|
+
var sanitizeStyleProps = function (props) {
|
54
|
+
var classNames = [];
|
55
|
+
utilityClassesInCamelCase.forEach(function (styleAttr, index) {
|
56
|
+
if (props[styleAttr]) {
|
57
|
+
classNames.push("asp-utility--" + utility_classes_1.UTILITY_CLASSES[index]);
|
58
|
+
delete props[styleAttr];
|
59
|
+
}
|
60
|
+
});
|
61
|
+
return [classNames, props];
|
62
|
+
};
|
63
|
+
exports.withStyles = function (Component) {
|
64
|
+
var displayName = Component.displayName || Component.name || "Component";
|
65
|
+
var ComposedComponent = function (_a) {
|
66
|
+
var className = _a.className, others = __rest(_a, ["className"]);
|
67
|
+
var _b = sanitizeStyleProps(others), styleClasses = _b[0], propWithoutStyles = _b[1];
|
68
|
+
var _classNames = classnames_1.default(styleClasses, className);
|
69
|
+
return React.createElement(Component, __assign({}, propWithoutStyles, { className: _classNames }));
|
70
|
+
};
|
71
|
+
ComposedComponent.displayName = "withStyles(" + displayName + ")";
|
72
|
+
return ComposedComponent;
|
73
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isOffline = exports.isJellybeanOrKitkat = exports.browserEnvironment = exports.isMicroApp = exports.isIFrame = exports.isWebView = void 0;
|
4
|
+
exports.isWebView = function () { return navigator.userAgent.toLowerCase().includes("wv"); };
|
5
|
+
exports.isIFrame = function () { return window.self !== window.top; };
|
6
|
+
exports.isMicroApp = function (appName) {
|
7
|
+
return !!document.getElementById("mf-container--" + appName);
|
8
|
+
};
|
9
|
+
exports.browserEnvironment = function () {
|
10
|
+
if (exports.isIFrame()) {
|
11
|
+
return "iframe";
|
12
|
+
}
|
13
|
+
if (exports.isWebView()) {
|
14
|
+
return "webview";
|
15
|
+
}
|
16
|
+
return "browser";
|
17
|
+
};
|
18
|
+
exports.isJellybeanOrKitkat = function () {
|
19
|
+
return navigator.userAgent.toLowerCase().includes("android 4.1.1") ||
|
20
|
+
navigator.userAgent.toLowerCase().includes("android 4.4");
|
21
|
+
};
|
22
|
+
exports.isOffline = function () { return !window.navigator.onLine; };
|