@admin-layout/client 1.0.3-alpha.105 → 1.0.3-alpha.111
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/lib/config/config.d.ts +5 -0
- package/lib/config/index.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +161 -0
- package/lib/index.js.map +1 -1
- package/lib/interfaces/default-settings.d.ts +4 -72
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/pure-settings.d.ts +72 -0
- package/lib/redux/index.d.ts +1 -0
- package/lib/redux/settings.d.ts +29 -0
- package/package.json +5 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './config';
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -87,6 +87,66 @@ module.exports =
|
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
+
/***/ "./src/config/config.ts":
|
|
91
|
+
/*!******************************!*\
|
|
92
|
+
!*** ./src/config/config.ts ***!
|
|
93
|
+
\******************************/
|
|
94
|
+
/*! no static exports found */
|
|
95
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
96
|
+
|
|
97
|
+
"use strict";
|
|
98
|
+
|
|
99
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
100
|
+
exports.config = void 0;
|
|
101
|
+
const envalid = __webpack_require__(/*! envalid */ "envalid");
|
|
102
|
+
const { json } = envalid;
|
|
103
|
+
const env = process.APP_ENV || process.env;
|
|
104
|
+
exports.config = envalid.cleanEnv(env, {
|
|
105
|
+
LAYOUT_SETTINGS: json({
|
|
106
|
+
default: JSON.stringify({
|
|
107
|
+
logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
|
|
108
|
+
navTheme: 'light',
|
|
109
|
+
primaryColor: '#3FA541C',
|
|
110
|
+
layout: 'side',
|
|
111
|
+
contentWidth: 'Fluid',
|
|
112
|
+
fixedHeader: false,
|
|
113
|
+
fixSiderbar: true,
|
|
114
|
+
colorWeak: false,
|
|
115
|
+
title: 'CDMBase LLC',
|
|
116
|
+
iconfontUrl: '',
|
|
117
|
+
language: 'en-US',
|
|
118
|
+
}),
|
|
119
|
+
}),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
/***/ }),
|
|
124
|
+
|
|
125
|
+
/***/ "./src/config/index.ts":
|
|
126
|
+
/*!*****************************!*\
|
|
127
|
+
!*** ./src/config/index.ts ***!
|
|
128
|
+
\*****************************/
|
|
129
|
+
/*! no static exports found */
|
|
130
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
131
|
+
|
|
132
|
+
"use strict";
|
|
133
|
+
|
|
134
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
135
|
+
if (k2 === undefined) k2 = k;
|
|
136
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
137
|
+
}) : (function(o, m, k, k2) {
|
|
138
|
+
if (k2 === undefined) k2 = k;
|
|
139
|
+
o[k2] = m[k];
|
|
140
|
+
}));
|
|
141
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
142
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
143
|
+
};
|
|
144
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
145
|
+
__exportStar(__webpack_require__(/*! ./config */ "./src/config/config.ts"), exports);
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/***/ }),
|
|
149
|
+
|
|
90
150
|
/***/ "./src/constants/constants.ts":
|
|
91
151
|
/*!************************************!*\
|
|
92
152
|
!*** ./src/constants/constants.ts ***!
|
|
@@ -151,6 +211,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
151
211
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
152
212
|
__exportStar(__webpack_require__(/*! ./interfaces */ "./src/interfaces/index.ts"), exports);
|
|
153
213
|
__exportStar(__webpack_require__(/*! ./constants */ "./src/constants/index.ts"), exports);
|
|
214
|
+
__exportStar(__webpack_require__(/*! ./redux */ "./src/redux/index.ts"), exports);
|
|
154
215
|
|
|
155
216
|
|
|
156
217
|
/***/ }),
|
|
@@ -499,6 +560,95 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
499
560
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
500
561
|
__exportStar(__webpack_require__(/*! ./generated */ "./src/interfaces/generated/index.ts"), exports);
|
|
501
562
|
__exportStar(__webpack_require__(/*! ./default-settings */ "./src/interfaces/default-settings.ts"), exports);
|
|
563
|
+
__exportStar(__webpack_require__(/*! ./pure-settings */ "./src/interfaces/pure-settings.ts"), exports);
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
/***/ }),
|
|
567
|
+
|
|
568
|
+
/***/ "./src/interfaces/pure-settings.ts":
|
|
569
|
+
/*!*****************************************!*\
|
|
570
|
+
!*** ./src/interfaces/pure-settings.ts ***!
|
|
571
|
+
\*****************************************/
|
|
572
|
+
/*! no static exports found */
|
|
573
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
574
|
+
|
|
575
|
+
"use strict";
|
|
576
|
+
|
|
577
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
/***/ }),
|
|
581
|
+
|
|
582
|
+
/***/ "./src/redux/index.ts":
|
|
583
|
+
/*!****************************!*\
|
|
584
|
+
!*** ./src/redux/index.ts ***!
|
|
585
|
+
\****************************/
|
|
586
|
+
/*! no static exports found */
|
|
587
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
588
|
+
|
|
589
|
+
"use strict";
|
|
590
|
+
|
|
591
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
592
|
+
if (k2 === undefined) k2 = k;
|
|
593
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
594
|
+
}) : (function(o, m, k, k2) {
|
|
595
|
+
if (k2 === undefined) k2 = k;
|
|
596
|
+
o[k2] = m[k];
|
|
597
|
+
}));
|
|
598
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
599
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
600
|
+
};
|
|
601
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
602
|
+
// export * from './actions';
|
|
603
|
+
__exportStar(__webpack_require__(/*! ./settings */ "./src/redux/settings.ts"), exports);
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
/***/ }),
|
|
607
|
+
|
|
608
|
+
/***/ "./src/redux/settings.ts":
|
|
609
|
+
/*!*******************************!*\
|
|
610
|
+
!*** ./src/redux/settings.ts ***!
|
|
611
|
+
\*******************************/
|
|
612
|
+
/*! no static exports found */
|
|
613
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
614
|
+
|
|
615
|
+
"use strict";
|
|
616
|
+
|
|
617
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
618
|
+
exports.settingsReducer = void 0;
|
|
619
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
620
|
+
/* eslint-disable no-case-declarations */
|
|
621
|
+
const constants_1 = __webpack_require__(/*! ../constants */ "./src/constants/index.ts");
|
|
622
|
+
const config_1 = __webpack_require__(/*! ../config */ "./src/config/index.ts");
|
|
623
|
+
// Note: We customize reducer part as AntPro uses inbuild way.
|
|
624
|
+
const updateColorWeak = (colorWeak) => {
|
|
625
|
+
// @sri to avoid breaking during SSR, split into to checks
|
|
626
|
+
if (typeof window !== 'undefined') {
|
|
627
|
+
const root = document.getElementById('root');
|
|
628
|
+
if (root) {
|
|
629
|
+
root.className = colorWeak ? 'colorWeak' : '';
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
const settingsReducer = (state = config_1.config.LAYOUT_SETTINGS, { type, payload = {} }) => {
|
|
634
|
+
switch (type) {
|
|
635
|
+
case constants_1.CHANGE_SETTINGS_ACTION:
|
|
636
|
+
const { colorWeak, contentWidth } = payload;
|
|
637
|
+
// @sri to avoid breaking during SSR, split into to checks
|
|
638
|
+
if (state.contentWidth !== contentWidth) {
|
|
639
|
+
if (typeof window !== 'undefined') {
|
|
640
|
+
window.dispatchEvent(new Event('resize'));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
updateColorWeak(!!colorWeak);
|
|
644
|
+
return Object.assign(Object.assign({}, state), payload);
|
|
645
|
+
case constants_1.CHANGE_LANGUAGE:
|
|
646
|
+
return Object.assign(Object.assign({}, state), { language: payload });
|
|
647
|
+
default:
|
|
648
|
+
return state;
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
exports.settingsReducer = settingsReducer;
|
|
502
652
|
|
|
503
653
|
|
|
504
654
|
/***/ }),
|
|
@@ -512,6 +662,17 @@ __exportStar(__webpack_require__(/*! ./default-settings */ "./src/interfaces/def
|
|
|
512
662
|
|
|
513
663
|
module.exports = require("@apollo/client");
|
|
514
664
|
|
|
665
|
+
/***/ }),
|
|
666
|
+
|
|
667
|
+
/***/ "envalid":
|
|
668
|
+
/*!**************************!*\
|
|
669
|
+
!*** external "envalid" ***!
|
|
670
|
+
\**************************/
|
|
671
|
+
/*! no static exports found */
|
|
672
|
+
/***/ (function(module, exports) {
|
|
673
|
+
|
|
674
|
+
module.exports = require("envalid");
|
|
675
|
+
|
|
515
676
|
/***/ })
|
|
516
677
|
|
|
517
678
|
/******/ });
|