pds-dev-kit-web 1.4.8 → 1.4.11

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function ToneTest(): JSX.Element;
3
+ export default ToneTest;
@@ -0,0 +1,397 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ var react_1 = __importStar(require("react"));
23
+ var react_router_dom_1 = require("react-router-dom");
24
+ var styled_components_1 = require("styled-components");
25
+ var desktop_1 = require("../../../desktop");
26
+ var components_1 = require("../../../desktop/components");
27
+ var hybrid_1 = require("../../../hybrid");
28
+ var theme_1 = require("../theme");
29
+ var mocks = [
30
+ {
31
+ conversionLinkSrc: 'https://www.naver.com/',
32
+ iconSrc: '',
33
+ menuItemType: 'WEB_LINK',
34
+ name: 'Default VOD',
35
+ iconName: 'ic_language',
36
+ pAppCode: 'C00001',
37
+ parsedNodes: [
38
+ {
39
+ conversionLinkSrc: '',
40
+ iconSrc: '',
41
+ menuItemType: 'NAV_P_APP',
42
+ name: 'Timeline is Timeline but Timeline',
43
+ pAppCode: 'A00001',
44
+ parsedNodes: [],
45
+ type: 'GENERAL_NODE',
46
+ visibilityLevel: 'SUBSCRIBER'
47
+ },
48
+ {
49
+ conversionLinkSrc: '',
50
+ iconSrc: '',
51
+ menuItemType: 'NAV_P_APP',
52
+ name: 'Notice',
53
+ pAppCode: 'A00002',
54
+ parsedNodes: [],
55
+ type: 'GENERAL_NODE',
56
+ visibilityLevel: 'SUBSCRIBER'
57
+ }
58
+ ],
59
+ type: 'GENERAL_NODE',
60
+ visibilityLevel: 'SUBSCRIBER'
61
+ },
62
+ {
63
+ conversionLinkSrc: '',
64
+ iconSrc: '',
65
+ iconName: 'ic_chat',
66
+ menuItemType: 'NAV_P_APP',
67
+ name: 'Free Board',
68
+ pAppCode: 'A00003',
69
+ parsedNodes: [
70
+ {
71
+ conversionLinkSrc: '',
72
+ iconSrc: '',
73
+ menuItemType: 'NAV_P_APP',
74
+ name: 'Event Live',
75
+ pAppCode: 'C00005',
76
+ parsedNodes: [],
77
+ type: 'GENERAL_NODE',
78
+ visibilityLevel: 'SUBSCRIBER'
79
+ },
80
+ {
81
+ conversionLinkSrc: '',
82
+ iconSrc: '',
83
+ menuItemType: 'NAV_P_APP',
84
+ name: 'Polleeee',
85
+ pAppCode: 'A00007',
86
+ parsedNodes: [],
87
+ type: 'GENERAL_NODE',
88
+ visibilityLevel: 'SUBSCRIBER'
89
+ }
90
+ ],
91
+ type: 'GENERAL_NODE',
92
+ visibilityLevel: 'SUBSCRIBER'
93
+ },
94
+ {
95
+ conversionLinkSrc: '',
96
+ iconSrc: '',
97
+ iconName: 'ic_camera',
98
+ menuItemType: 'NAV_P_APP',
99
+ name: 'Class VOD',
100
+ pAppCode: 'C00007',
101
+ parsedNodes: [
102
+ {
103
+ conversionLinkSrc: '',
104
+ iconSrc: '',
105
+ menuItemType: 'NAV_P_APP',
106
+ name: '이것은30자팹네임입니다.팹팹팹팹팹팹팹팹팹팹팹팹팹팹팹팹팹',
107
+ pAppCode: 'C00006',
108
+ parsedNodes: [],
109
+ type: 'GENERAL_NODE',
110
+ visibilityLevel: 'SUBSCRIBER'
111
+ },
112
+ {
113
+ conversionLinkSrc: '',
114
+ iconSrc: '',
115
+ menuItemType: 'NAV_P_APP',
116
+ name: 'Inquiry Board',
117
+ pAppCode: 'A00005',
118
+ parsedNodes: [],
119
+ type: 'GENERAL_NODE',
120
+ visibilityLevel: 'SUBSCRIBER'
121
+ }
122
+ ],
123
+ type: 'GENERAL_NODE',
124
+ visibilityLevel: 'SUBSCRIBER'
125
+ },
126
+ {
127
+ conversionLinkSrc: '',
128
+ iconSrc: '',
129
+ menuItemType: 'NAV_P_APP',
130
+ name: 'Welcome Page',
131
+ pAppCode: 'B00006',
132
+ parsedNodes: [],
133
+ type: 'GENERAL_NODE',
134
+ visibilityLevel: 'SUBSCRIBER'
135
+ },
136
+ {
137
+ conversionLinkSrc: '',
138
+ iconSrc: '',
139
+ menuItemType: 'NAV_P_APP',
140
+ name: 'Photobook',
141
+ pAppCode: 'B00005',
142
+ parsedNodes: [
143
+ {
144
+ conversionLinkSrc: '',
145
+ iconSrc: '',
146
+ menuItemType: 'NAV_P_APP',
147
+ name: 'Book a consultation',
148
+ pAppCode: 'E00001',
149
+ parsedNodes: [],
150
+ type: 'GENERAL_NODE',
151
+ visibilityLevel: 'SUBSCRIBER'
152
+ }
153
+ ],
154
+ type: 'GENERAL_NODE',
155
+ visibilityLevel: 'SUBSCRIBER'
156
+ },
157
+ {
158
+ conversionLinkSrc: '',
159
+ iconSrc: '',
160
+ menuItemType: 'NAV_P_APP',
161
+ name: 'OTT Type VOD',
162
+ pAppCode: 'C00002',
163
+ parsedNodes: [],
164
+ type: 'GENERAL_NODE',
165
+ visibilityLevel: 'SUBSCRIBER'
166
+ },
167
+ {
168
+ conversionLinkSrc: '',
169
+ iconSrc: '',
170
+ menuItemType: 'NAV_P_APP',
171
+ name: 'Outlink pApp',
172
+ pAppCode: 'B00002',
173
+ parsedNodes: [
174
+ {
175
+ conversionLinkSrc: '',
176
+ iconSrc: '',
177
+ menuItemType: 'NAV_P_APP',
178
+ name: 'OTT Type VR VOD',
179
+ pAppCode: 'C00013',
180
+ parsedNodes: [],
181
+ type: 'GENERAL_NODE',
182
+ visibilityLevel: 'SUBSCRIBER'
183
+ }
184
+ ],
185
+ type: 'GENERAL_NODE',
186
+ visibilityLevel: 'SUBSCRIBER'
187
+ },
188
+ {
189
+ conversionLinkSrc: '',
190
+ iconSrc: '',
191
+ menuItemType: 'NAV_P_APP',
192
+ name: 'Outlink pApp',
193
+ pAppCode: 'B00002',
194
+ parsedNodes: [
195
+ {
196
+ conversionLinkSrc: '',
197
+ iconSrc: '',
198
+ menuItemType: 'NAV_P_APP',
199
+ name: 'OTT Type VR VOD',
200
+ pAppCode: 'C00013',
201
+ parsedNodes: [],
202
+ type: 'GENERAL_NODE',
203
+ visibilityLevel: 'SUBSCRIBER'
204
+ }
205
+ ],
206
+ type: 'GENERAL_NODE',
207
+ visibilityLevel: 'SUBSCRIBER'
208
+ },
209
+ {
210
+ conversionLinkSrc: '',
211
+ iconSrc: '',
212
+ menuItemType: 'NAV_P_APP',
213
+ name: 'Outlink pApp',
214
+ pAppCode: 'B00002',
215
+ parsedNodes: [
216
+ {
217
+ conversionLinkSrc: '',
218
+ iconSrc: '',
219
+ menuItemType: 'NAV_P_APP',
220
+ name: 'OTT Type VR VOD',
221
+ pAppCode: 'C00013',
222
+ parsedNodes: [],
223
+ type: 'GENERAL_NODE',
224
+ visibilityLevel: 'SUBSCRIBER'
225
+ }
226
+ ],
227
+ type: 'GENERAL_NODE',
228
+ visibilityLevel: 'SUBSCRIBER'
229
+ },
230
+ {
231
+ conversionLinkSrc: '',
232
+ iconSrc: '',
233
+ menuItemType: 'NAV_P_APP',
234
+ name: 'Outlink pApp',
235
+ pAppCode: 'B00002',
236
+ parsedNodes: [
237
+ {
238
+ conversionLinkSrc: '',
239
+ iconSrc: '',
240
+ menuItemType: 'NAV_P_APP',
241
+ name: 'OTT Type VR VOD',
242
+ pAppCode: 'C00013',
243
+ parsedNodes: [],
244
+ type: 'GENERAL_NODE',
245
+ visibilityLevel: 'SUBSCRIBER'
246
+ }
247
+ ],
248
+ type: 'GENERAL_NODE',
249
+ visibilityLevel: 'SUBSCRIBER'
250
+ },
251
+ {
252
+ conversionLinkSrc: '',
253
+ iconSrc: '',
254
+ menuItemType: 'NAV_P_APP',
255
+ name: 'Outlink pApp',
256
+ pAppCode: 'B00002',
257
+ parsedNodes: [
258
+ {
259
+ conversionLinkSrc: '',
260
+ iconSrc: '',
261
+ menuItemType: 'NAV_P_APP',
262
+ name: 'OTT Type VR VOD',
263
+ pAppCode: 'C00013',
264
+ parsedNodes: [],
265
+ type: 'GENERAL_NODE',
266
+ visibilityLevel: 'SUBSCRIBER'
267
+ }
268
+ ],
269
+ type: 'GENERAL_NODE',
270
+ visibilityLevel: 'SUBSCRIBER'
271
+ },
272
+ {
273
+ conversionLinkSrc: '',
274
+ iconSrc: '',
275
+ menuItemType: 'NAV_P_APP',
276
+ name: 'Outlink pApp',
277
+ pAppCode: 'B00002',
278
+ parsedNodes: [
279
+ {
280
+ conversionLinkSrc: '',
281
+ iconSrc: '',
282
+ menuItemType: 'NAV_P_APP',
283
+ name: 'OTT Type VR VOD',
284
+ pAppCode: 'C00013',
285
+ parsedNodes: [],
286
+ type: 'GENERAL_NODE',
287
+ visibilityLevel: 'SUBSCRIBER'
288
+ }
289
+ ],
290
+ type: 'GENERAL_NODE',
291
+ visibilityLevel: 'SUBSCRIBER'
292
+ },
293
+ {
294
+ conversionLinkSrc: '',
295
+ iconSrc: '',
296
+ menuItemType: 'NAV_P_APP',
297
+ name: 'Outlink pApp',
298
+ pAppCode: 'B00002',
299
+ parsedNodes: [
300
+ {
301
+ conversionLinkSrc: '',
302
+ iconSrc: '',
303
+ menuItemType: 'NAV_P_APP',
304
+ name: 'OTT Type VR VOD',
305
+ pAppCode: 'C00013',
306
+ parsedNodes: [],
307
+ type: 'GENERAL_NODE',
308
+ visibilityLevel: 'SUBSCRIBER'
309
+ }
310
+ ],
311
+ type: 'GENERAL_NODE',
312
+ visibilityLevel: 'SUBSCRIBER'
313
+ },
314
+ {
315
+ conversionLinkSrc: '',
316
+ iconSrc: '',
317
+ menuItemType: 'NAV_P_APP',
318
+ name: 'Outlink pApp',
319
+ pAppCode: 'B00002',
320
+ parsedNodes: [
321
+ {
322
+ conversionLinkSrc: '',
323
+ iconSrc: '',
324
+ menuItemType: 'NAV_P_APP',
325
+ name: 'OTT Type VR VOD',
326
+ pAppCode: 'C00013',
327
+ parsedNodes: [],
328
+ type: 'GENERAL_NODE',
329
+ visibilityLevel: 'SUBSCRIBER'
330
+ }
331
+ ],
332
+ type: 'GENERAL_NODE',
333
+ visibilityLevel: 'SUBSCRIBER'
334
+ },
335
+ {
336
+ conversionLinkSrc: '',
337
+ iconSrc: '',
338
+ menuItemType: 'NAV_P_APP',
339
+ name: 'Outlink pApp',
340
+ pAppCode: 'B00002',
341
+ parsedNodes: [
342
+ {
343
+ conversionLinkSrc: '',
344
+ iconSrc: '',
345
+ menuItemType: 'NAV_P_APP',
346
+ name: 'OTT Type VR VOD',
347
+ pAppCode: 'C00013',
348
+ parsedNodes: [],
349
+ type: 'GENERAL_NODE',
350
+ visibilityLevel: 'SUBSCRIBER'
351
+ }
352
+ ],
353
+ type: 'GENERAL_NODE',
354
+ visibilityLevel: 'SUBSCRIBER'
355
+ }
356
+ ];
357
+ function ToneTest() {
358
+ var _a = (0, react_1.useState)('LIGHT'), customTone = _a[0], setTone = _a[1];
359
+ var changeTone = function () {
360
+ if (customTone === 'LIGHT') {
361
+ setTone('DARK');
362
+ }
363
+ else {
364
+ setTone('LIGHT');
365
+ }
366
+ };
367
+ return (react_1.default.createElement("div", null,
368
+ react_1.default.createElement(react_router_dom_1.BrowserRouter, null,
369
+ react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
370
+ react_1.default.createElement(components_1.MainButton, { iconName: "ic_arrow_round_left", text: "Toggle Tone", onClick: changeTone, styleTheme: "secondary" }),
371
+ react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
372
+ react_1.default.createElement(components_1.TextLabel, { text: "\uC774\uACF3\uC740 toggled\uB41C tone\uC744 \uB530\uB974\uB294 \uBD80\uBD84\uC785\uB2C8\uB2E4." }),
373
+ react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
374
+ react_1.default.createElement(styled_components_1.ThemeProvider, { theme: (0, theme_1.themeByGivenTone)(customTone) },
375
+ react_1.default.createElement(desktop_1.D_DynamicDesktopNavBar, { isPreview: true, brandLogo: {
376
+ src: 'http://i.imgur.com/zVKjblJ.png',
377
+ text: 'PEPSI',
378
+ href: '/'
379
+ }, userProfile: {
380
+ src: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSL5qfISvgI8p95f3w5lZN9XNwYh1mRiIqEaQ&usqp=CAU',
381
+ href: '/'
382
+ }, primaryMenus: mocks, secondaryMenus: mocks, template: "W1_0005", basePath: "/channels/invitation" })),
383
+ react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_e" }),
384
+ react_1.default.createElement(hybrid_1.Divider, null),
385
+ react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
386
+ react_1.default.createElement(components_1.TextLabel, { text: "\uC774\uACF3\uC740 \uAE30\uBCF8 tone\uC744 \uB530\uB974\uB294 \uBD80\uBD84\uC785\uB2C8\uB2E4." }),
387
+ react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
388
+ react_1.default.createElement(desktop_1.D_DynamicDesktopNavBar, { isPreview: true, brandLogo: {
389
+ src: 'http://i.imgur.com/zVKjblJ.png',
390
+ text: 'PEPSI',
391
+ href: '/'
392
+ }, userProfile: {
393
+ src: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSL5qfISvgI8p95f3w5lZN9XNwYh1mRiIqEaQ&usqp=CAU',
394
+ href: '/'
395
+ }, primaryMenus: mocks, secondaryMenus: mocks, template: "W1_0005", basePath: "/channels/invitation" }))));
396
+ }
397
+ exports.default = ToneTest;
@@ -0,0 +1 @@
1
+ export { default as ToneTest } from './ToneTest';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ToneTest = void 0;
7
+ var ToneTest_1 = require("./ToneTest");
8
+ Object.defineProperty(exports, "ToneTest", { enumerable: true, get: function () { return __importDefault(ToneTest_1).default; } });
@@ -82,4 +82,6 @@ export declare const spacing: {
82
82
  spacingN: string;
83
83
  };
84
84
  declare const theme: DefaultTheme;
85
+ declare type ToneType = 'DARK' | 'LIGHT';
86
+ export declare const themeByGivenTone: (tone: ToneType) => any;
85
87
  export default theme;
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.spacing = exports.boxShadow = exports.mobileLineHeight = exports.mobileFontSize = exports.desktopLineHeight = exports.desktopFontSize = exports.fontWeight = void 0;
14
+ exports.themeByGivenTone = exports.spacing = exports.boxShadow = exports.mobileLineHeight = exports.mobileFontSize = exports.desktopLineHeight = exports.desktopFontSize = exports.fontWeight = void 0;
15
15
  var ui_colors_1 = require("./ui-colors");
16
16
  exports.fontWeight = {
17
17
  normal: '500',
@@ -96,4 +96,6 @@ exports.spacing = {
96
96
  spacingN: '320px'
97
97
  };
98
98
  var theme = __assign({ fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing }, (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {}));
99
+ var themeByGivenTone = function (tone) { return (__assign(__assign({}, (0, ui_colors_1.customTheme)(tone)), { fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing })); };
100
+ exports.themeByGivenTone = themeByGivenTone;
99
101
  exports.default = theme;
@@ -151,7 +151,7 @@ function TextFieldBase(_a) {
151
151
  textAreaRef.current.style.height = textAreaRef.current.scrollHeight + "px";
152
152
  }, []);
153
153
  function deleteValue() {
154
- setValue(name, '');
154
+ setValue(name, '', { shouldDirty: true });
155
155
  }
156
156
  // NOTE: input의 type이 number일때, e나 E의 경우 숫자로 취급되어 입력이 가능하지만, publ의 기획상 막아야하기 때문에 생성한 함수
157
157
  var preventEKeyword = function (e) {
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.BasePathContext = void 0;
30
30
  var react_1 = __importStar(require("react"));
31
- var react_router_dom_1 = require("react-router-dom");
32
31
  var styled_components_1 = __importDefault(require("styled-components"));
33
32
  var BoxLayout_1 = require("../../../common/components/BoxLayout");
34
33
  var blocks_1 = require("./blocks");
@@ -42,13 +41,12 @@ function DynamicDesktopNavBar(_a) {
42
41
  var slicedPrimaryMenus = (0, react_1.useMemo)(function () { return primaryMenus === null || primaryMenus === void 0 ? void 0 : primaryMenus.slice(0, primaryMenuOptions.maxLength); }, [primaryMenus, primaryMenuOptions]);
43
42
  var slicedSecondaryMenus = (0, react_1.useMemo)(function () { var _a; return (_a = secondaryMenus === null || secondaryMenus === void 0 ? void 0 : secondaryMenus.slice(0, secondaryMenuOptions.maxLength)) !== null && _a !== void 0 ? _a : []; }, [secondaryMenus, secondaryMenuOptions]);
44
43
  return (react_1.default.createElement(exports.BasePathContext.Provider, { value: { basePath: basePath } },
45
- react_1.default.createElement(react_router_dom_1.BrowserRouter, { basename: basePath },
46
- react_1.default.createElement(S_DynamicDesktopNavBar, { isPreview: isPreview },
47
- react_1.default.createElement(S_Grid, { className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: gridStyle },
48
- react_1.default.createElement(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text }),
49
- react_1.default.createElement(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }),
50
- showSecondaryMenu && (react_1.default.createElement(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })),
51
- react_1.default.createElement(blocks_1.UserProfile, { src: userProfile.src, to: userProfile.href, style: userProfileOptions.style }))))));
44
+ react_1.default.createElement(S_DynamicDesktopNavBar, { isPreview: isPreview },
45
+ react_1.default.createElement(S_Grid, { className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: gridStyle },
46
+ react_1.default.createElement(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text }),
47
+ react_1.default.createElement(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }),
48
+ showSecondaryMenu && (react_1.default.createElement(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })),
49
+ react_1.default.createElement(blocks_1.UserProfile, { src: userProfile.src, to: userProfile.href, style: userProfileOptions.style })))));
52
50
  }
53
51
  var S_Grid = (0, styled_components_1.default)(BoxLayout_1.Grid)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n justify-items: center;\n gap: 24px;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: center;\n justify-items: center;\n gap: 24px;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
54
52
  var theme = _a.theme;
@@ -35,15 +35,15 @@ function PAppMenuItemNav(_a) {
35
35
  var activeMatch = (0, react_router_dom_1.useRouteMatch)(basePath + "/:activeKey");
36
36
  var isActive = (0, react_1.useMemo)(function () {
37
37
  return (activeMatch === null || activeMatch === void 0 ? void 0 : activeMatch.params.activeKey) === menu.pAppCode;
38
- }, [match, activeMatch]);
38
+ }, [menu, match, activeMatch]);
39
39
  if (showMenuAsIcon) {
40
- if (menu.iconSrc) {
41
- return react_1.default.createElement(ImageIconNav_1.default, { to: "/" + menu.pAppCode, iconSrc: menu.iconSrc, openNewTab: false });
42
- }
43
40
  if (menu.iconName) {
44
- return react_1.default.createElement(IconNav_1.default, { to: "/" + menu.pAppCode, iconName: menu.iconName });
41
+ return react_1.default.createElement(IconNav_1.default, { to: basePath + "/" + menu.pAppCode, iconName: menu.iconName });
42
+ }
43
+ if (menu.iconSrc) {
44
+ return (react_1.default.createElement(ImageIconNav_1.default, { to: basePath + "/" + menu.pAppCode, iconSrc: menu.iconSrc, openNewTab: false }));
45
45
  }
46
46
  }
47
- return isContextMenu ? (react_1.default.createElement(Navigations_1.ContextTextLabelNav, { isActive: isActive, preventLineChange: true, openNewTab: false, to: "/" + menu.pAppCode, text: menu.name })) : (react_1.default.createElement(Navigations_1.TextLabelNav, { isActive: isActive, preventLineChange: true, openNewTab: false, to: "/" + menu.pAppCode, text: menu.name }));
47
+ return isContextMenu ? (react_1.default.createElement(Navigations_1.ContextTextLabelNav, { isActive: isActive, preventLineChange: true, openNewTab: false, to: basePath + "/" + menu.pAppCode, text: menu.name })) : (react_1.default.createElement(Navigations_1.TextLabelNav, { isActive: isActive, preventLineChange: true, openNewTab: false, to: basePath + "/" + menu.pAppCode, text: menu.name }));
48
48
  }
49
49
  exports.default = PAppMenuItemNav;
@@ -1,11 +1,12 @@
1
1
  import { PDSIconType } from '../../../common';
2
+ export type { DynamicDesktopTemplateType, TemplateNamesType, TemplatesDataType } from './templates/types';
2
3
  export declare type ParsedNode = {
3
4
  menuItemType: 'NAV_P_APP' | 'WEB_LINK';
4
5
  type: 'GENERAL_NODE';
5
6
  name: string;
6
7
  iconSrc?: string;
7
8
  iconName?: PDSIconType;
8
- visibilityLevel: boolean;
9
+ visibilityLevel: string;
9
10
  pAppCode?: string;
10
11
  conversionLinkSrc?: string;
11
12
  parsedNodes: Array<ParsedNode>;
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var styled_components_1 = __importStar(require("styled-components"));
31
- var common_1 = require("../../../common");
32
31
  var hybrid_1 = require("../../../hybrid");
33
32
  function IconButton(_a) {
34
33
  var _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.shapeType, shapeType = _c === void 0 ? 'rectangle' : _c, _d = _a.baseSize, baseSize = _d === void 0 ? 'small' : _d, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, iconName = _a.iconName, iconColorKey = _a.iconColorKey, _g = _a.shadow, shadow = _g === void 0 ? 'hidden' : _g, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.type, type = _j === void 0 ? 'button' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, tabIndex = _a.tabIndex, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
@@ -76,9 +75,7 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
76
75
  });
77
76
  var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:hover:enabled {\n ", "\n }\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"])), function (_a) {
78
77
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
79
- return baseColorKey
80
- ? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[baseColorKey]
81
- : theme.ui_cpnt_button_fill_base_primary;
78
+ return baseColorKey ? theme[baseColorKey] : theme.ui_cpnt_button_fill_base_primary;
82
79
  }, function (_a) {
83
80
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
84
81
  return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
@@ -105,9 +102,7 @@ var line = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 =
105
102
  return theme.ui_cpnt_button_line_base_default;
106
103
  }, function (_a) {
107
104
  var theme = _a.theme, borderColorKey = _a.borderColorKey;
108
- return borderColorKey
109
- ? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[borderColorKey]
110
- : theme.ui_cpnt_button_line_border_enabled;
105
+ return borderColorKey ? theme[borderColorKey] : theme.ui_cpnt_button_line_border_enabled;
111
106
  }, function (_a) {
112
107
  var colorTheme = _a.colorTheme;
113
108
  switch (colorTheme) {
@@ -25,7 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  var react_1 = __importStar(require("react"));
27
27
  var styled_components_1 = __importStar(require("styled-components"));
28
- var common_1 = require("../../../common");
29
28
  var hybrid_1 = require("../../../hybrid");
30
29
  function TextLabel(_a) {
31
30
  var text = _a.text, tooltipText = _a.tooltipText, _b = _a.tooltipPosition, tooltipPosition = _b === void 0 ? 'right_bottom' : _b, _c = _a.textAlign, textAlign = _c === void 0 ? 'left' : _c, _d = _a.styleTheme, styleTheme = _d === void 0 ? 'body2Bold' : _d, colorOverride = _a.colorOverride, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'sysTextPrimary' : _e, _f = _a.singleLineMode, singleLineMode = _f === void 0 ? 'none' : _f, _g = _a.ellipsisMode, ellipsisMode = _g === void 0 ? 'none' : _g, lineLimit = _a.lineLimit, _h = _a.userSelectMode, userSelectMode = _h === void 0 ? 'none' : _h, customFontSize = _a.customFontSize, customFontWeight = _a.customFontWeight, _j = _a.textDecorationType, textDecorationType = _j === void 0 ? 'none' : _j, _k = _a.requirementMode, requirementMode = _k === void 0 ? 'none' : _k, _l = _a.bulletPointMode, bulletPointMode = _l === void 0 ? 'none' : _l, _m = _a.wordBreak, wordBreak = _m === void 0 ? 'keep_all' : _m;
@@ -261,9 +260,8 @@ var customFontStyle = (0, styled_components_1.css)(templateObject_28 || (templat
261
260
  return customFontWeight === 'bold' ? theme.fontWeight.bold : theme.fontWeight.normal;
262
261
  });
263
262
  var colorOverrideStyle = (0, styled_components_1.css)(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
264
- var colorOverride = _a.colorOverride;
265
- return colorOverride &&
266
- (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[colorOverride];
263
+ var colorOverride = _a.colorOverride, theme = _a.theme;
264
+ return colorOverride && theme[colorOverride];
267
265
  });
268
266
  var ellipsisStyle = (0, styled_components_1.css)(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (_a) {
269
267
  var lineLimit = _a.lineLimit;
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var styled_components_1 = __importStar(require("styled-components"));
31
- var common_1 = require("../../../common");
32
31
  var hybrid_1 = require("../../../hybrid");
33
32
  var types_1 = require("./types");
34
33
  function UploadIconButton(_a) {
@@ -62,9 +61,7 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
62
61
  });
63
62
  var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:hover:not([disabled]) {\n ", "\n }\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:hover:not([disabled]) {\n ", "\n }\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"])), function (_a) {
64
63
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
65
- return baseColorKey
66
- ? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[baseColorKey]
67
- : theme.ui_cpnt_button_fill_base_primary;
64
+ return baseColorKey ? theme[baseColorKey] : theme.ui_cpnt_button_fill_base_primary;
68
65
  }, function (_a) {
69
66
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
70
67
  return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
@@ -99,9 +96,7 @@ var line = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 =
99
96
  return theme.ui_cpnt_button_line_base_default;
100
97
  }, function (_a) {
101
98
  var theme = _a.theme, borderColorKey = _a.borderColorKey;
102
- return borderColorKey
103
- ? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[borderColorKey]
104
- : theme.ui_cpnt_button_line_border_enabled;
99
+ return borderColorKey ? theme[borderColorKey] : theme.ui_cpnt_button_line_border_enabled;
105
100
  }, function (_a) {
106
101
  var colorTheme = _a.colorTheme;
107
102
  switch (colorTheme) {
@@ -4,14 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
- var common_1 = require("../../../common");
7
+ var styled_components_1 = require("styled-components");
8
8
  var fill_1 = __importDefault(require("../../../common/assets/icons/fill"));
9
9
  var line_1 = __importDefault(require("../../../common/assets/icons/line"));
10
10
  var Icon = function (_a) {
11
11
  var _b = _a.iconName, iconName = _b === void 0 ? 'ic_unavailable' : _b, _c = _a.size, size = _c === void 0 ? 24 : _c, _d = _a.colorKey, colorKey = _d === void 0 ? 'ui_cpnt_icon_sys_grey_01' : _d, _e = _a.fillType, fillType = _e === void 0 ? 'line' : _e;
12
+ var theme = (0, styled_components_1.useTheme)();
12
13
  var SelectedIcon = fillType === 'line'
13
14
  ? line_1.default[iconName] || fill_1.default[iconName]
14
15
  : fill_1.default[iconName] || line_1.default[iconName];
15
- return (react_1.default.createElement(SelectedIcon, { color: (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[colorKey], size: size, style: { minWidth: size, minHeight: size } }));
16
+ return (react_1.default.createElement(SelectedIcon, { color: theme[colorKey], size: size, style: { minWidth: size, minHeight: size } }));
16
17
  };
17
18
  exports.default = Icon;
@@ -151,7 +151,7 @@ function TextFieldBase(_a) {
151
151
  textAreaRef.current.style.height = textAreaRef.current.scrollHeight + "px";
152
152
  }, []);
153
153
  function deleteValue() {
154
- setValue(name, '');
154
+ setValue(name, '', { shouldDirty: true });
155
155
  }
156
156
  // NOTE: input의 type이 number일때, e나 E의 경우 숫자로 취급되어 입력이 가능하지만, publ의 기획상 막아야하기 때문에 생성한 함수
157
157
  var preventEKeyword = function (e) {
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var styled_components_1 = __importStar(require("styled-components"));
31
- var ui_colors_1 = require("../../../common/styles/ui-colors");
32
31
  var hybrid_1 = require("../../../hybrid");
33
32
  function IconButton(_a) {
34
33
  var _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.shapeType, shapeType = _c === void 0 ? 'rectangle' : _c, _d = _a.baseSize, baseSize = _d === void 0 ? 'small' : _d, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, iconName = _a.iconName, iconColorKey = _a.iconColorKey, _g = _a.shadow, shadow = _g === void 0 ? 'hidden' : _g, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.type, type = _j === void 0 ? 'button' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, tabIndex = _a.tabIndex, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
@@ -76,9 +75,7 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
76
75
  });
77
76
  var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:active:enabled {\n ", "\n }\n\n ", ";\n"])), function (_a) {
78
77
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
79
- return baseColorKey
80
- ? (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[baseColorKey]
81
- : theme.ui_cpnt_button_fill_base_primary;
78
+ return baseColorKey ? theme[baseColorKey] : theme.ui_cpnt_button_fill_base_primary;
82
79
  }, function (_a) {
83
80
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
84
81
  return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
@@ -100,9 +97,7 @@ var line = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 =
100
97
  return theme.ui_cpnt_button_line_base_default;
101
98
  }, function (_a) {
102
99
  var theme = _a.theme, borderColorKey = _a.borderColorKey;
103
- return borderColorKey
104
- ? (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[borderColorKey]
105
- : theme.ui_cpnt_button_line_border_enabled;
100
+ return borderColorKey ? theme[borderColorKey] : theme.ui_cpnt_button_line_border_enabled;
106
101
  }, function (_a) {
107
102
  var colorTheme = _a.colorTheme;
108
103
  switch (colorTheme) {
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var styled_components_1 = __importStar(require("styled-components"));
31
- var common_1 = require("../../../common");
32
31
  var hybrid_1 = require("../../../hybrid");
33
32
  function TextLabel(_a) {
34
33
  var text = _a.text, _b = _a.textAlign, textAlign = _b === void 0 ? 'left' : _b, _c = _a.styleTheme, styleTheme = _c === void 0 ? 'body2Bold' : _c, colorOverride = _a.colorOverride, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'sysTextPrimary' : _d, _e = _a.singleLineMode, singleLineMode = _e === void 0 ? 'none' : _e, _f = _a.ellipsisMode, ellipsisMode = _f === void 0 ? 'none' : _f, lineLimit = _a.lineLimit, _g = _a.userSelectMode, userSelectMode = _g === void 0 ? 'none' : _g, customFontSize = _a.customFontSize, customFontWeight = _a.customFontWeight, _h = _a.textDecorationType, textDecorationType = _h === void 0 ? 'none' : _h, _j = _a.requirementMode, requirementMode = _j === void 0 ? 'none' : _j, _k = _a.bulletPointMode, bulletPointMode = _k === void 0 ? 'none' : _k, _l = _a.wordBreak, wordBreak = _l === void 0 ? 'keep_all' : _l;
@@ -256,9 +255,8 @@ var customFontStyle = (0, styled_components_1.css)(templateObject_28 || (templat
256
255
  return customFontWeight === 'bold' ? theme.fontWeight.bold : theme.fontWeight.normal;
257
256
  });
258
257
  var colorOverrideStyle = (0, styled_components_1.css)(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
259
- var colorOverride = _a.colorOverride;
260
- return colorOverride &&
261
- (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[colorOverride];
258
+ var colorOverride = _a.colorOverride, theme = _a.theme;
259
+ return colorOverride && theme[colorOverride];
262
260
  });
263
261
  var ellipsisStyle = (0, styled_components_1.css)(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n -webkit-box-orient: vertical;\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (_a) {
264
262
  var lineLimit = _a.lineLimit;
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var styled_components_1 = __importStar(require("styled-components"));
31
- var common_1 = require("../../../common");
32
31
  var hybrid_1 = require("../../../hybrid");
33
32
  var types_1 = require("./types");
34
33
  function UploadIconButton(_a) {
@@ -62,9 +61,7 @@ var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObj
62
61
  });
63
62
  var fill = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"], ["\n background-color: ", ";\n\n &:active:not([disabled]) {\n background-image: ", ";\n }\n\n ", ";\n"])), function (_a) {
64
63
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
65
- return baseColorKey
66
- ? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[baseColorKey]
67
- : theme.ui_cpnt_button_fill_base_primary;
64
+ return baseColorKey ? theme[baseColorKey] : theme.ui_cpnt_button_fill_base_primary;
68
65
  }, function (_a) {
69
66
  var theme = _a.theme, baseColorKey = _a.baseColorKey;
70
67
  return baseColorKey === 'ui_cpnt_button_fill_base_transparent'
@@ -94,9 +91,7 @@ var line = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 =
94
91
  return theme.ui_cpnt_button_line_base_default;
95
92
  }, function (_a) {
96
93
  var theme = _a.theme, borderColorKey = _a.borderColorKey;
97
- return borderColorKey
98
- ? (0, common_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {})[borderColorKey]
99
- : theme.ui_cpnt_button_line_border_enabled;
94
+ return borderColorKey ? theme[borderColorKey] : theme.ui_cpnt_button_line_border_enabled;
100
95
  }, function (_a) {
101
96
  var colorTheme = _a.colorTheme;
102
97
  switch (colorTheme) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "1.4.8",
3
+ "version": "1.4.11",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v1.4.8]
2
+ ## [v1.4.11]
3
3
 
4
- ### Layout
5
- * WTS_2 생성
4
+ ### Component
5
+ * DynamicDesktopNavBar
6
+ * 내부에 있던 browserRouter 제거(컴포넌트 사용시에 각자 넣어서 사용하도록)