@twreporter/core 1.14.0 → 1.15.0-rc.1
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/CHANGELOG.md +22 -0
- package/lib/constants/category-set-old.js +159 -0
- package/lib/constants/category-set.js +15 -11
- package/lib/constants/feature-flag.js +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.15.0-rc.1](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/core@1.15.0-rc.0...@twreporter/core@1.15.0-rc.1) (2023-12-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* add new added category set ids ([addbd75](https://github.com/twreporter/twreporter-npm-packages/commit/addbd75add3f09282d4fe00551314835c8507367))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [1.15.0-rc.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/core@1.14.0...@twreporter/core@1.15.0-rc.0) (2023-12-05)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* add foundation category set ([29259ef](https://github.com/twreporter/twreporter-npm-packages/commit/29259efe78e37aa148631a31e7f1bd5a3b2ecfe3))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [1.14.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/core@1.14.0-rc.2...@twreporter/core@1.14.0) (2023-11-20)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @twreporter/core
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.SUBCATEGORY_PATH = exports.SUBCATEGORY_LABEL = exports.SUBCATEGORY_ID = exports.GET_SUBCATEGORY_PATH_FROM_ID = exports.GET_CATEGORY_PATH_FROM_ID = exports.CATEGORY_SET = exports.CATEGORY_PATH = exports.CATEGORY_ORDER = exports.CATEGORY_LABEL = exports.CATEGORY_ID = void 0;
|
|
7
|
+
|
|
8
|
+
var _CATEGORY_LABEL, _CATEGORY_ID, _SUBCATEGORY_LABEL, _SUBCATEGORY_ID, _CATEGORY_SET;
|
|
9
|
+
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
|
|
12
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
|
|
16
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
|
+
|
|
18
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
19
|
+
|
|
20
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
+
|
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
|
|
24
|
+
var categoryPath = {
|
|
25
|
+
world: 'world',
|
|
26
|
+
humanrights: 'humanrights',
|
|
27
|
+
politicsAndSociety: 'politics-and-society',
|
|
28
|
+
health: 'health',
|
|
29
|
+
environment: 'environment',
|
|
30
|
+
econ: 'econ',
|
|
31
|
+
culture: 'culture',
|
|
32
|
+
education: 'education',
|
|
33
|
+
podcast: 'podcast',
|
|
34
|
+
opinion: 'opinion',
|
|
35
|
+
photography: 'photography'
|
|
36
|
+
};
|
|
37
|
+
var CATEGORY_PATH = categoryPath;
|
|
38
|
+
exports.CATEGORY_PATH = CATEGORY_PATH;
|
|
39
|
+
var CATEGORY_ORDER = [categoryPath.world, categoryPath.humanrights, categoryPath.politicsAndSociety, categoryPath.health, categoryPath.environment, categoryPath.econ, categoryPath.culture, categoryPath.education]; // todo: update id when db ready
|
|
40
|
+
|
|
41
|
+
exports.CATEGORY_ORDER = CATEGORY_ORDER;
|
|
42
|
+
var CATEGORY_LABEL = (_CATEGORY_LABEL = {}, _defineProperty(_CATEGORY_LABEL, categoryPath.world, '國際兩岸'), _defineProperty(_CATEGORY_LABEL, categoryPath.humanrights, '人權司法'), _defineProperty(_CATEGORY_LABEL, categoryPath.politicsAndSociety, '政治社會'), _defineProperty(_CATEGORY_LABEL, categoryPath.health, '醫療健康'), _defineProperty(_CATEGORY_LABEL, categoryPath.environment, '環境永續'), _defineProperty(_CATEGORY_LABEL, categoryPath.econ, '經濟產業'), _defineProperty(_CATEGORY_LABEL, categoryPath.culture, '文化生活'), _defineProperty(_CATEGORY_LABEL, categoryPath.education, '教育校園'), _defineProperty(_CATEGORY_LABEL, categoryPath.podcast, 'Podcast'), _defineProperty(_CATEGORY_LABEL, categoryPath.opinion, '評論'), _defineProperty(_CATEGORY_LABEL, categoryPath.photography, '影像'), _CATEGORY_LABEL);
|
|
43
|
+
exports.CATEGORY_LABEL = CATEGORY_LABEL;
|
|
44
|
+
var CATEGORY_ID = (_CATEGORY_ID = {}, _defineProperty(_CATEGORY_ID, categoryPath.world, '63206383207bf7c5f871622c'), _defineProperty(_CATEGORY_ID, categoryPath.humanrights, '63206383207bf7c5f8716234'), _defineProperty(_CATEGORY_ID, categoryPath.politicsAndSociety, '63206383207bf7c5f871623d'), _defineProperty(_CATEGORY_ID, categoryPath.health, '63206383207bf7c5f8716245'), _defineProperty(_CATEGORY_ID, categoryPath.environment, '63206383207bf7c5f871624d'), _defineProperty(_CATEGORY_ID, categoryPath.econ, '63206383207bf7c5f8716254'), _defineProperty(_CATEGORY_ID, categoryPath.culture, '63206383207bf7c5f8716259'), _defineProperty(_CATEGORY_ID, categoryPath.education, '63206383207bf7c5f8716260'), _defineProperty(_CATEGORY_ID, categoryPath.podcast, '63206383207bf7c5f8716266'), _defineProperty(_CATEGORY_ID, categoryPath.opinion, '63206383207bf7c5f8716269'), _defineProperty(_CATEGORY_ID, categoryPath.photography, '574d028748fa171000c45d48'), _CATEGORY_ID); // flip CATEGORY_ID to a {id: path} object
|
|
45
|
+
|
|
46
|
+
exports.CATEGORY_ID = CATEGORY_ID;
|
|
47
|
+
var categoryIDToPath = {};
|
|
48
|
+
Object.entries(CATEGORY_ID).forEach(function (_ref) {
|
|
49
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
50
|
+
key = _ref2[0],
|
|
51
|
+
value = _ref2[1];
|
|
52
|
+
|
|
53
|
+
categoryIDToPath[value] = key;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
var GET_CATEGORY_PATH_FROM_ID = function GET_CATEGORY_PATH_FROM_ID(id) {
|
|
57
|
+
return categoryIDToPath[id];
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.GET_CATEGORY_PATH_FROM_ID = GET_CATEGORY_PATH_FROM_ID;
|
|
61
|
+
var subcategoryPath = {
|
|
62
|
+
all: 'all',
|
|
63
|
+
hk: 'hk',
|
|
64
|
+
china: 'china',
|
|
65
|
+
us: 'us',
|
|
66
|
+
jpAndKr: 'jp-and-kr',
|
|
67
|
+
indoPacific: 'indo-pacific',
|
|
68
|
+
europe: 'europe',
|
|
69
|
+
others: 'others',
|
|
70
|
+
gender: 'gender',
|
|
71
|
+
labor: 'labor',
|
|
72
|
+
immigrant: 'immigrant',
|
|
73
|
+
housingJustice: 'housing-justice',
|
|
74
|
+
transformationalJustice: 'transformational-justice',
|
|
75
|
+
socialAdministration: 'social-administration',
|
|
76
|
+
justice: 'justice',
|
|
77
|
+
digital: 'digital',
|
|
78
|
+
election: 'election',
|
|
79
|
+
politicalPartyAndLocalFaction: 'political-party-and-local-faction',
|
|
80
|
+
policy: 'policy',
|
|
81
|
+
transportation: 'transportation',
|
|
82
|
+
foodSafety: 'food-safety',
|
|
83
|
+
informationWarfare: 'information-warfare',
|
|
84
|
+
socialwatch: 'socialwatch',
|
|
85
|
+
pandemic: 'pandemic',
|
|
86
|
+
healthPolicy: 'health-policy',
|
|
87
|
+
biotech: 'biotech',
|
|
88
|
+
patientAutonomy: 'patient-autonomy',
|
|
89
|
+
psychology: 'psychology',
|
|
90
|
+
longTermCare: 'long-term-care',
|
|
91
|
+
publicHealth: 'public-health',
|
|
92
|
+
cicularEconomy: 'circular-economy',
|
|
93
|
+
ocean: 'ocean',
|
|
94
|
+
mountainAndForest: 'mountain-and-forest',
|
|
95
|
+
animal: 'animal',
|
|
96
|
+
climateChange: 'climatechange',
|
|
97
|
+
pollution: 'pollution',
|
|
98
|
+
naturalDisaster: 'natural-disaster',
|
|
99
|
+
economy: 'economy',
|
|
100
|
+
energyEcon: 'energy-econ',
|
|
101
|
+
agriculture: 'agriculture',
|
|
102
|
+
technology: 'technology',
|
|
103
|
+
peAndSports: 'pe-and-sports',
|
|
104
|
+
movie: 'movie',
|
|
105
|
+
publishing: 'publishing',
|
|
106
|
+
music: 'music',
|
|
107
|
+
dramaAndTheatre: 'drama-and-theatre',
|
|
108
|
+
art: 'art',
|
|
109
|
+
scientificResearch: 'scientific-research',
|
|
110
|
+
higherEducation: 'higher-education',
|
|
111
|
+
teens: 'teens',
|
|
112
|
+
parenting: 'parenting',
|
|
113
|
+
lowBirthRate: 'low-birth-rate',
|
|
114
|
+
theRealStory: 'the-real-story',
|
|
115
|
+
onTheGround: 'on-the-ground',
|
|
116
|
+
bookReview: 'book-review',
|
|
117
|
+
letter: 'letter'
|
|
118
|
+
};
|
|
119
|
+
var SUBCATEGORY_PATH = subcategoryPath;
|
|
120
|
+
exports.SUBCATEGORY_PATH = SUBCATEGORY_PATH;
|
|
121
|
+
var SUBCATEGORY_LABEL = (_SUBCATEGORY_LABEL = {}, _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.all, '全部'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.hk, '香港'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.china, '中國'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.us, '美國'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.jpAndKr, '日韓'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.indoPacific, '東南亞與印太'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.europe, '歐洲'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.others, '其他'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.gender, '性別'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.labor, '勞動'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.immigrant, '移工與移民'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.housingJustice, '居住正義'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.transformationalJustice, '轉型正義'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.socialAdministration, '社政安置'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.justice, '獄政司法'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.digital, '數位人權'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.election, '選舉'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.politicalPartyAndLocalFaction, '政黨與地方政治'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.policy, '政策'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.transportation, '交通'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.foodSafety, '食安'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.informationWarfare, '資訊戰'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.socialwatch, '社會觀察'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.pandemic, '疫情'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.healthPolicy, '醫療政策'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.biotech, '生物科技'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.patientAutonomy, '病人自主權利'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.psychology, '心理'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.longTermCare, '長照'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.publicHealth, '公共衛生'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.cicularEconomy, '循環經濟'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.ocean, '海洋'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.mountainAndForest, '山林'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.animal, '動物'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.climateChange, '能源與氣候變遷'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.pollution, '環境污染'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.naturalDisaster, '自然災害'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.economy, '經濟'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.energyEcon, '能源'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.agriculture, '農林漁牧'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.technology, '科技'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.peAndSports, '體育'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.movie, '電影'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.publishing, '出版'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.music, '音樂'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.dramaAndTheatre, '戲劇'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.art, '藝術'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.scientificResearch, '科學研究'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.higherEducation, '高等教育'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.teens, '青少年'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.parenting, '育兒'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.lowBirthRate, '少子化'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.theRealStory, 'The Real Story'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.onTheGround, 'On the Ground 路邊攤計畫'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.bookReview, '書摘與書評'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.letter, '讀者投書'), _SUBCATEGORY_LABEL);
|
|
122
|
+
exports.SUBCATEGORY_LABEL = SUBCATEGORY_LABEL;
|
|
123
|
+
var SUBCATEGORY_ID = (_SUBCATEGORY_ID = {}, _defineProperty(_SUBCATEGORY_ID, subcategoryPath.all, ''), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.hk, '63206383207bf7c5f871622d'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.china, '63206383207bf7c5f871622e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.us, '63206383207bf7c5f871622f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.jpAndKr, '63206383207bf7c5f8716230'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.indoPacific, '63206383207bf7c5f8716231'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.europe, '63206383207bf7c5f8716232'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.others, '63206383207bf7c5f8716233'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.gender, '63206383207bf7c5f8716235'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.labor, '63206383207bf7c5f8716236'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.immigrant, '63206383207bf7c5f8716237'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.housingJustice, '63206383207bf7c5f8716238'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.transformationalJustice, '63206383207bf7c5f8716239'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.socialAdministration, '63206383207bf7c5f871623a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.justice, '63206383207bf7c5f871623b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.digital, '63206383207bf7c5f871623c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.election, '63206383207bf7c5f871623e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.politicalPartyAndLocalFaction, '63206383207bf7c5f871623f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.policy, '63206383207bf7c5f8716240'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.transportation, '63206383207bf7c5f8716241'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.foodSafety, '63206383207bf7c5f8716242'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.informationWarfare, '63206383207bf7c5f8716243'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.socialwatch, '63206383207bf7c5f8716244'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.pandemic, '63206383207bf7c5f8716246'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.healthPolicy, '63206383207bf7c5f8716247'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.biotech, '63206383207bf7c5f8716248'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.patientAutonomy, '63206383207bf7c5f8716249'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.psychology, '63206383207bf7c5f871624a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.longTermCare, '63206383207bf7c5f871624b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.publicHealth, '63206383207bf7c5f871624c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.cicularEconomy, '63206383207bf7c5f871624e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.ocean, '63206383207bf7c5f871624f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.mountainAndForest, '63206383207bf7c5f8716250'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.animal, '63206383207bf7c5f8716251'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.climateChange, '633407174a9cab5ac7a90738'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.pollution, '63206383207bf7c5f8716252'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.naturalDisaster, '63206383207bf7c5f8716253'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.economy, '63206383207bf7c5f8716255'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.energyEcon, '63206383207bf7c5f8716256'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.agriculture, '63206383207bf7c5f8716257'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.technology, '63206383207bf7c5f8716258'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.peAndSports, '63206383207bf7c5f871625a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.movie, '63206383207bf7c5f871625b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.publishing, '63206383207bf7c5f871625c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.music, '63206383207bf7c5f871625d'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.dramaAndTheatre, '63206383207bf7c5f871625e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.art, '63206383207bf7c5f871625f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.scientificResearch, '63206383207bf7c5f8716261'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.higherEducation, '63206383207bf7c5f8716262'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.teens, '63206383207bf7c5f8716263'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.parenting, '63206383207bf7c5f8716264'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.lowBirthRate, '63206383207bf7c5f8716265'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.theRealStory, '63206383207bf7c5f8716267'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.onTheGround, '63206383207bf7c5f8716268'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.bookReview, '63206383207bf7c5f871626a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.letter, '63206383207bf7c5f871626b'), _SUBCATEGORY_ID); // flip SUBCATEGORY_ID to a {id: path} object
|
|
124
|
+
|
|
125
|
+
exports.SUBCATEGORY_ID = SUBCATEGORY_ID;
|
|
126
|
+
var subcategoryIDToPath = {};
|
|
127
|
+
Object.entries(SUBCATEGORY_ID).filter(function (_ref3) {
|
|
128
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
129
|
+
key = _ref4[0],
|
|
130
|
+
value = _ref4[1];
|
|
131
|
+
|
|
132
|
+
return key !== subcategoryPath.all;
|
|
133
|
+
}).forEach(function (_ref5) {
|
|
134
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
135
|
+
key = _ref6[0],
|
|
136
|
+
value = _ref6[1];
|
|
137
|
+
|
|
138
|
+
subcategoryIDToPath[value] = key;
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
var GET_SUBCATEGORY_PATH_FROM_ID = function GET_SUBCATEGORY_PATH_FROM_ID(id) {
|
|
142
|
+
return subcategoryIDToPath[id];
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
exports.GET_SUBCATEGORY_PATH_FROM_ID = GET_SUBCATEGORY_PATH_FROM_ID;
|
|
146
|
+
var CATEGORY_SET = (_CATEGORY_SET = {}, _defineProperty(_CATEGORY_SET, categoryPath.world, [subcategoryPath.all, subcategoryPath.hk, subcategoryPath.china, subcategoryPath.us, subcategoryPath.jpAndKr, subcategoryPath.indoPacific, subcategoryPath.europe, subcategoryPath.others]), _defineProperty(_CATEGORY_SET, categoryPath.humanrights, [subcategoryPath.all, subcategoryPath.gender, subcategoryPath.labor, subcategoryPath.immigrant, subcategoryPath.housingJustice, subcategoryPath.transformationalJustice, subcategoryPath.socialAdministration, subcategoryPath.justice, subcategoryPath.digital]), _defineProperty(_CATEGORY_SET, categoryPath.politicsAndSociety, [subcategoryPath.all, subcategoryPath.election, subcategoryPath.politicalPartyAndLocalFaction, subcategoryPath.policy, subcategoryPath.transportation, subcategoryPath.foodSafety, subcategoryPath.informationWarfare, subcategoryPath.socialwatch]), _defineProperty(_CATEGORY_SET, categoryPath.health, [subcategoryPath.all, subcategoryPath.pandemic, subcategoryPath.healthPolicy, subcategoryPath.biotech, subcategoryPath.patientAutonomy, subcategoryPath.psychology, subcategoryPath.longTermCare, subcategoryPath.publicHealth]), _defineProperty(_CATEGORY_SET, categoryPath.environment, [subcategoryPath.all, subcategoryPath.ocean, subcategoryPath.mountainAndForest, subcategoryPath.animal, subcategoryPath.climateChange, subcategoryPath.cicularEconomy, subcategoryPath.pollution, subcategoryPath.naturalDisaster]), _defineProperty(_CATEGORY_SET, categoryPath.econ, [subcategoryPath.all, subcategoryPath.economy, subcategoryPath.energyEcon, subcategoryPath.agriculture, subcategoryPath.technology]), _defineProperty(_CATEGORY_SET, categoryPath.culture, [subcategoryPath.all, subcategoryPath.peAndSports, subcategoryPath.movie, subcategoryPath.publishing, subcategoryPath.music, subcategoryPath.dramaAndTheatre, subcategoryPath.art]), _defineProperty(_CATEGORY_SET, categoryPath.education, [subcategoryPath.all, subcategoryPath.scientificResearch, subcategoryPath.higherEducation, subcategoryPath.teens, subcategoryPath.parenting, subcategoryPath.lowBirthRate]), _defineProperty(_CATEGORY_SET, categoryPath.podcast, [subcategoryPath.all, subcategoryPath.theRealStory, subcategoryPath.onTheGround]), _defineProperty(_CATEGORY_SET, categoryPath.opinion, [subcategoryPath.all, subcategoryPath.bookReview, subcategoryPath.letter]), _CATEGORY_SET);
|
|
147
|
+
exports.CATEGORY_SET = CATEGORY_SET;
|
|
148
|
+
var _default = {
|
|
149
|
+
CATEGORY_PATH: CATEGORY_PATH,
|
|
150
|
+
CATEGORY_ORDER: CATEGORY_ORDER,
|
|
151
|
+
CATEGORY_LABEL: CATEGORY_LABEL,
|
|
152
|
+
CATEGORY_ID: CATEGORY_ID,
|
|
153
|
+
GET_CATEGORY_PATH_FROM_ID: GET_CATEGORY_PATH_FROM_ID,
|
|
154
|
+
GET_SUBCATEGORY_PATH_FROM_ID: GET_SUBCATEGORY_PATH_FROM_ID,
|
|
155
|
+
SUBCATEGORY_LABEL: SUBCATEGORY_LABEL,
|
|
156
|
+
SUBCATEGORY_ID: SUBCATEGORY_ID,
|
|
157
|
+
CATEGORY_SET: CATEGORY_SET
|
|
158
|
+
};
|
|
159
|
+
exports["default"] = _default;
|
|
@@ -32,16 +32,17 @@ var categoryPath = {
|
|
|
32
32
|
education: 'education',
|
|
33
33
|
podcast: 'podcast',
|
|
34
34
|
opinion: 'opinion',
|
|
35
|
-
photography: 'photography'
|
|
35
|
+
photography: 'photography',
|
|
36
|
+
foundation: 'foundation'
|
|
36
37
|
};
|
|
37
|
-
var CATEGORY_PATH = categoryPath;
|
|
38
|
+
var CATEGORY_PATH = Object.freeze(categoryPath);
|
|
38
39
|
exports.CATEGORY_PATH = CATEGORY_PATH;
|
|
39
|
-
var CATEGORY_ORDER = [categoryPath.world, categoryPath.humanrights, categoryPath.politicsAndSociety, categoryPath.health, categoryPath.environment, categoryPath.econ, categoryPath.culture, categoryPath.education];
|
|
40
|
-
|
|
40
|
+
var CATEGORY_ORDER = [categoryPath.world, categoryPath.humanrights, categoryPath.politicsAndSociety, categoryPath.health, categoryPath.environment, categoryPath.econ, categoryPath.culture, categoryPath.education];
|
|
41
41
|
exports.CATEGORY_ORDER = CATEGORY_ORDER;
|
|
42
|
-
var CATEGORY_LABEL = (_CATEGORY_LABEL = {}, _defineProperty(_CATEGORY_LABEL, categoryPath.world, '國際兩岸'), _defineProperty(_CATEGORY_LABEL, categoryPath.humanrights, '人權司法'), _defineProperty(_CATEGORY_LABEL, categoryPath.politicsAndSociety, '政治社會'), _defineProperty(_CATEGORY_LABEL, categoryPath.health, '醫療健康'), _defineProperty(_CATEGORY_LABEL, categoryPath.environment, '環境永續'), _defineProperty(_CATEGORY_LABEL, categoryPath.econ, '經濟產業'), _defineProperty(_CATEGORY_LABEL, categoryPath.culture, '文化生活'), _defineProperty(_CATEGORY_LABEL, categoryPath.education, '教育校園'), _defineProperty(_CATEGORY_LABEL, categoryPath.podcast, 'Podcast'), _defineProperty(_CATEGORY_LABEL, categoryPath.opinion, '評論'), _defineProperty(_CATEGORY_LABEL, categoryPath.photography, '影像'), _CATEGORY_LABEL);
|
|
42
|
+
var CATEGORY_LABEL = (_CATEGORY_LABEL = {}, _defineProperty(_CATEGORY_LABEL, categoryPath.world, '國際兩岸'), _defineProperty(_CATEGORY_LABEL, categoryPath.humanrights, '人權司法'), _defineProperty(_CATEGORY_LABEL, categoryPath.politicsAndSociety, '政治社會'), _defineProperty(_CATEGORY_LABEL, categoryPath.health, '醫療健康'), _defineProperty(_CATEGORY_LABEL, categoryPath.environment, '環境永續'), _defineProperty(_CATEGORY_LABEL, categoryPath.econ, '經濟產業'), _defineProperty(_CATEGORY_LABEL, categoryPath.culture, '文化生活'), _defineProperty(_CATEGORY_LABEL, categoryPath.education, '教育校園'), _defineProperty(_CATEGORY_LABEL, categoryPath.podcast, 'Podcast'), _defineProperty(_CATEGORY_LABEL, categoryPath.opinion, '評論'), _defineProperty(_CATEGORY_LABEL, categoryPath.photography, '影像'), _defineProperty(_CATEGORY_LABEL, categoryPath.foundation, '基金會消息'), _CATEGORY_LABEL); // todo: update id when db ready
|
|
43
|
+
|
|
43
44
|
exports.CATEGORY_LABEL = CATEGORY_LABEL;
|
|
44
|
-
var CATEGORY_ID = (_CATEGORY_ID = {}, _defineProperty(_CATEGORY_ID, categoryPath.world, '63206383207bf7c5f871622c'), _defineProperty(_CATEGORY_ID, categoryPath.humanrights, '63206383207bf7c5f8716234'), _defineProperty(_CATEGORY_ID, categoryPath.politicsAndSociety, '63206383207bf7c5f871623d'), _defineProperty(_CATEGORY_ID, categoryPath.health, '63206383207bf7c5f8716245'), _defineProperty(_CATEGORY_ID, categoryPath.environment, '63206383207bf7c5f871624d'), _defineProperty(_CATEGORY_ID, categoryPath.econ, '63206383207bf7c5f8716254'), _defineProperty(_CATEGORY_ID, categoryPath.culture, '63206383207bf7c5f8716259'), _defineProperty(_CATEGORY_ID, categoryPath.education, '63206383207bf7c5f8716260'), _defineProperty(_CATEGORY_ID, categoryPath.podcast, '63206383207bf7c5f8716266'), _defineProperty(_CATEGORY_ID, categoryPath.opinion, '63206383207bf7c5f8716269'), _defineProperty(_CATEGORY_ID, categoryPath.photography, '574d028748fa171000c45d48'), _CATEGORY_ID); // flip CATEGORY_ID to a {id: path} object
|
|
45
|
+
var CATEGORY_ID = (_CATEGORY_ID = {}, _defineProperty(_CATEGORY_ID, categoryPath.world, '63206383207bf7c5f871622c'), _defineProperty(_CATEGORY_ID, categoryPath.humanrights, '63206383207bf7c5f8716234'), _defineProperty(_CATEGORY_ID, categoryPath.politicsAndSociety, '63206383207bf7c5f871623d'), _defineProperty(_CATEGORY_ID, categoryPath.health, '63206383207bf7c5f8716245'), _defineProperty(_CATEGORY_ID, categoryPath.environment, '63206383207bf7c5f871624d'), _defineProperty(_CATEGORY_ID, categoryPath.econ, '63206383207bf7c5f8716254'), _defineProperty(_CATEGORY_ID, categoryPath.culture, '63206383207bf7c5f8716259'), _defineProperty(_CATEGORY_ID, categoryPath.education, '63206383207bf7c5f8716260'), _defineProperty(_CATEGORY_ID, categoryPath.podcast, '63206383207bf7c5f8716266'), _defineProperty(_CATEGORY_ID, categoryPath.opinion, '63206383207bf7c5f8716269'), _defineProperty(_CATEGORY_ID, categoryPath.photography, '574d028748fa171000c45d48'), _defineProperty(_CATEGORY_ID, categoryPath.foundation, '656ecd09822294615dce5ad3'), _CATEGORY_ID); // flip CATEGORY_ID to a {id: path} object
|
|
45
46
|
|
|
46
47
|
exports.CATEGORY_ID = CATEGORY_ID;
|
|
47
48
|
var categoryIDToPath = {};
|
|
@@ -114,13 +115,16 @@ var subcategoryPath = {
|
|
|
114
115
|
theRealStory: 'the-real-story',
|
|
115
116
|
onTheGround: 'on-the-ground',
|
|
116
117
|
bookReview: 'book-review',
|
|
117
|
-
letter: 'letter'
|
|
118
|
+
letter: 'letter',
|
|
119
|
+
milestone: 'milestone',
|
|
120
|
+
award: 'award',
|
|
121
|
+
cooperation: 'cooperation'
|
|
118
122
|
};
|
|
119
|
-
var SUBCATEGORY_PATH = subcategoryPath;
|
|
123
|
+
var SUBCATEGORY_PATH = Object.freeze(subcategoryPath);
|
|
120
124
|
exports.SUBCATEGORY_PATH = SUBCATEGORY_PATH;
|
|
121
|
-
var SUBCATEGORY_LABEL = (_SUBCATEGORY_LABEL = {}, _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.all, '全部'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.hk, '香港'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.china, '中國'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.us, '美國'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.jpAndKr, '日韓'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.indoPacific, '東南亞與印太'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.europe, '歐洲'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.others, '其他'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.gender, '性別'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.labor, '勞動'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.immigrant, '移工與移民'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.housingJustice, '居住正義'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.transformationalJustice, '轉型正義'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.socialAdministration, '社政安置'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.justice, '獄政司法'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.digital, '數位人權'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.election, '選舉'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.politicalPartyAndLocalFaction, '政黨與地方政治'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.policy, '政策'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.transportation, '交通'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.foodSafety, '食安'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.informationWarfare, '資訊戰'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.socialwatch, '社會觀察'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.pandemic, '疫情'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.healthPolicy, '醫療政策'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.biotech, '生物科技'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.patientAutonomy, '病人自主權利'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.psychology, '心理'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.longTermCare, '長照'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.publicHealth, '公共衛生'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.cicularEconomy, '循環經濟'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.ocean, '海洋'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.mountainAndForest, '山林'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.animal, '動物'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.climateChange, '能源與氣候變遷'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.pollution, '環境污染'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.naturalDisaster, '自然災害'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.economy, '經濟'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.energyEcon, '能源'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.agriculture, '農林漁牧'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.technology, '科技'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.peAndSports, '體育'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.movie, '電影'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.publishing, '出版'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.music, '音樂'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.dramaAndTheatre, '戲劇'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.art, '藝術'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.scientificResearch, '科學研究'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.higherEducation, '高等教育'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.teens, '青少年'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.parenting, '育兒'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.lowBirthRate, '少子化'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.theRealStory, 'The Real Story'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.onTheGround, 'On the Ground 路邊攤計畫'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.bookReview, '書摘與書評'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.letter, '讀者投書'), _SUBCATEGORY_LABEL);
|
|
125
|
+
var SUBCATEGORY_LABEL = (_SUBCATEGORY_LABEL = {}, _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.all, '全部'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.hk, '香港'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.china, '中國'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.us, '美國'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.jpAndKr, '日韓'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.indoPacific, '東南亞與印太'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.europe, '歐洲'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.others, '其他'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.gender, '性別'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.labor, '勞動'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.immigrant, '移工與移民'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.housingJustice, '居住正義'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.transformationalJustice, '轉型正義'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.socialAdministration, '社政安置'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.justice, '獄政司法'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.digital, '數位人權'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.election, '選舉'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.politicalPartyAndLocalFaction, '政黨與地方政治'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.policy, '政策'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.transportation, '交通'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.foodSafety, '食安'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.informationWarfare, '資訊戰'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.socialwatch, '社會觀察'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.pandemic, '疫情'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.healthPolicy, '醫療政策'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.biotech, '生物科技'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.patientAutonomy, '病人自主權利'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.psychology, '心理'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.longTermCare, '長照'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.publicHealth, '公共衛生'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.cicularEconomy, '循環經濟'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.ocean, '海洋'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.mountainAndForest, '山林'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.animal, '動物'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.climateChange, '能源與氣候變遷'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.pollution, '環境污染'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.naturalDisaster, '自然災害'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.economy, '經濟'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.energyEcon, '能源'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.agriculture, '農林漁牧'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.technology, '科技'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.peAndSports, '體育'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.movie, '電影'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.publishing, '出版'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.music, '音樂'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.dramaAndTheatre, '戲劇'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.art, '藝術'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.scientificResearch, '科學研究'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.higherEducation, '高等教育'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.teens, '青少年'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.parenting, '育兒'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.lowBirthRate, '少子化'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.theRealStory, 'The Real Story'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.onTheGround, 'On the Ground 路邊攤計畫'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.bookReview, '書摘與書評'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.letter, '讀者投書'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.milestone, '營運紀事'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.award, '得獎肯定'), _defineProperty(_SUBCATEGORY_LABEL, subcategoryPath.cooperation, '公益合作'), _SUBCATEGORY_LABEL);
|
|
122
126
|
exports.SUBCATEGORY_LABEL = SUBCATEGORY_LABEL;
|
|
123
|
-
var SUBCATEGORY_ID = (_SUBCATEGORY_ID = {}, _defineProperty(_SUBCATEGORY_ID, subcategoryPath.all, ''), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.hk, '63206383207bf7c5f871622d'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.china, '63206383207bf7c5f871622e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.us, '63206383207bf7c5f871622f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.jpAndKr, '63206383207bf7c5f8716230'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.indoPacific, '63206383207bf7c5f8716231'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.europe, '63206383207bf7c5f8716232'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.others, '63206383207bf7c5f8716233'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.gender, '63206383207bf7c5f8716235'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.labor, '63206383207bf7c5f8716236'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.immigrant, '63206383207bf7c5f8716237'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.housingJustice, '63206383207bf7c5f8716238'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.transformationalJustice, '63206383207bf7c5f8716239'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.socialAdministration, '63206383207bf7c5f871623a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.justice, '63206383207bf7c5f871623b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.digital, '63206383207bf7c5f871623c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.election, '63206383207bf7c5f871623e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.politicalPartyAndLocalFaction, '63206383207bf7c5f871623f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.policy, '63206383207bf7c5f8716240'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.transportation, '63206383207bf7c5f8716241'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.foodSafety, '63206383207bf7c5f8716242'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.informationWarfare, '63206383207bf7c5f8716243'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.socialwatch, '63206383207bf7c5f8716244'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.pandemic, '63206383207bf7c5f8716246'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.healthPolicy, '63206383207bf7c5f8716247'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.biotech, '63206383207bf7c5f8716248'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.patientAutonomy, '63206383207bf7c5f8716249'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.psychology, '63206383207bf7c5f871624a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.longTermCare, '63206383207bf7c5f871624b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.publicHealth, '63206383207bf7c5f871624c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.cicularEconomy, '63206383207bf7c5f871624e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.ocean, '63206383207bf7c5f871624f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.mountainAndForest, '63206383207bf7c5f8716250'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.animal, '63206383207bf7c5f8716251'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.climateChange, '633407174a9cab5ac7a90738'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.pollution, '63206383207bf7c5f8716252'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.naturalDisaster, '63206383207bf7c5f8716253'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.economy, '63206383207bf7c5f8716255'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.energyEcon, '63206383207bf7c5f8716256'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.agriculture, '63206383207bf7c5f8716257'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.technology, '63206383207bf7c5f8716258'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.peAndSports, '63206383207bf7c5f871625a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.movie, '63206383207bf7c5f871625b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.publishing, '63206383207bf7c5f871625c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.music, '63206383207bf7c5f871625d'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.dramaAndTheatre, '63206383207bf7c5f871625e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.art, '63206383207bf7c5f871625f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.scientificResearch, '63206383207bf7c5f8716261'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.higherEducation, '63206383207bf7c5f8716262'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.teens, '63206383207bf7c5f8716263'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.parenting, '63206383207bf7c5f8716264'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.lowBirthRate, '63206383207bf7c5f8716265'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.theRealStory, '63206383207bf7c5f8716267'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.onTheGround, '63206383207bf7c5f8716268'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.bookReview, '63206383207bf7c5f871626a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.letter, '63206383207bf7c5f871626b'), _SUBCATEGORY_ID); // flip SUBCATEGORY_ID to a {id: path} object
|
|
127
|
+
var SUBCATEGORY_ID = (_SUBCATEGORY_ID = {}, _defineProperty(_SUBCATEGORY_ID, subcategoryPath.all, ''), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.hk, '63206383207bf7c5f871622d'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.china, '63206383207bf7c5f871622e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.us, '63206383207bf7c5f871622f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.jpAndKr, '63206383207bf7c5f8716230'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.indoPacific, '63206383207bf7c5f8716231'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.europe, '63206383207bf7c5f8716232'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.others, '63206383207bf7c5f8716233'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.gender, '63206383207bf7c5f8716235'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.labor, '63206383207bf7c5f8716236'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.immigrant, '63206383207bf7c5f8716237'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.housingJustice, '63206383207bf7c5f8716238'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.transformationalJustice, '63206383207bf7c5f8716239'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.socialAdministration, '63206383207bf7c5f871623a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.justice, '63206383207bf7c5f871623b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.digital, '63206383207bf7c5f871623c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.election, '63206383207bf7c5f871623e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.politicalPartyAndLocalFaction, '63206383207bf7c5f871623f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.policy, '63206383207bf7c5f8716240'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.transportation, '63206383207bf7c5f8716241'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.foodSafety, '63206383207bf7c5f8716242'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.informationWarfare, '63206383207bf7c5f8716243'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.socialwatch, '63206383207bf7c5f8716244'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.pandemic, '63206383207bf7c5f8716246'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.healthPolicy, '63206383207bf7c5f8716247'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.biotech, '63206383207bf7c5f8716248'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.patientAutonomy, '63206383207bf7c5f8716249'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.psychology, '63206383207bf7c5f871624a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.longTermCare, '63206383207bf7c5f871624b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.publicHealth, '63206383207bf7c5f871624c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.cicularEconomy, '63206383207bf7c5f871624e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.ocean, '63206383207bf7c5f871624f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.mountainAndForest, '63206383207bf7c5f8716250'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.animal, '63206383207bf7c5f8716251'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.climateChange, '633407174a9cab5ac7a90738'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.pollution, '63206383207bf7c5f8716252'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.naturalDisaster, '63206383207bf7c5f8716253'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.economy, '63206383207bf7c5f8716255'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.energyEcon, '63206383207bf7c5f8716256'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.agriculture, '63206383207bf7c5f8716257'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.technology, '63206383207bf7c5f8716258'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.peAndSports, '63206383207bf7c5f871625a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.movie, '63206383207bf7c5f871625b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.publishing, '63206383207bf7c5f871625c'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.music, '63206383207bf7c5f871625d'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.dramaAndTheatre, '63206383207bf7c5f871625e'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.art, '63206383207bf7c5f871625f'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.scientificResearch, '63206383207bf7c5f8716261'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.higherEducation, '63206383207bf7c5f8716262'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.teens, '63206383207bf7c5f8716263'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.parenting, '63206383207bf7c5f8716264'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.lowBirthRate, '63206383207bf7c5f8716265'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.theRealStory, '63206383207bf7c5f8716267'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.onTheGround, '63206383207bf7c5f8716268'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.bookReview, '63206383207bf7c5f871626a'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.letter, '63206383207bf7c5f871626b'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.milestone, '656ecd09822294615dce5ad4'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.award, '656ecd09822294615dce5ad5'), _defineProperty(_SUBCATEGORY_ID, subcategoryPath.cooperation, '656ecd09822294615dce5ad6'), _SUBCATEGORY_ID); // flip SUBCATEGORY_ID to a {id: path} object
|
|
124
128
|
|
|
125
129
|
exports.SUBCATEGORY_ID = SUBCATEGORY_ID;
|
|
126
130
|
var subcategoryIDToPath = {};
|
|
@@ -143,7 +147,7 @@ var GET_SUBCATEGORY_PATH_FROM_ID = function GET_SUBCATEGORY_PATH_FROM_ID(id) {
|
|
|
143
147
|
};
|
|
144
148
|
|
|
145
149
|
exports.GET_SUBCATEGORY_PATH_FROM_ID = GET_SUBCATEGORY_PATH_FROM_ID;
|
|
146
|
-
var CATEGORY_SET = (_CATEGORY_SET = {}, _defineProperty(_CATEGORY_SET, categoryPath.world, [subcategoryPath.all, subcategoryPath.hk, subcategoryPath.china, subcategoryPath.us, subcategoryPath.jpAndKr, subcategoryPath.indoPacific, subcategoryPath.europe, subcategoryPath.others]), _defineProperty(_CATEGORY_SET, categoryPath.humanrights, [subcategoryPath.all, subcategoryPath.gender, subcategoryPath.labor, subcategoryPath.immigrant, subcategoryPath.housingJustice, subcategoryPath.transformationalJustice, subcategoryPath.socialAdministration, subcategoryPath.justice, subcategoryPath.digital]), _defineProperty(_CATEGORY_SET, categoryPath.politicsAndSociety, [subcategoryPath.all, subcategoryPath.election, subcategoryPath.politicalPartyAndLocalFaction, subcategoryPath.policy, subcategoryPath.transportation, subcategoryPath.foodSafety, subcategoryPath.informationWarfare, subcategoryPath.socialwatch]), _defineProperty(_CATEGORY_SET, categoryPath.health, [subcategoryPath.all, subcategoryPath.pandemic, subcategoryPath.healthPolicy, subcategoryPath.biotech, subcategoryPath.patientAutonomy, subcategoryPath.psychology, subcategoryPath.longTermCare, subcategoryPath.publicHealth]), _defineProperty(_CATEGORY_SET, categoryPath.environment, [subcategoryPath.all, subcategoryPath.ocean, subcategoryPath.mountainAndForest, subcategoryPath.animal, subcategoryPath.climateChange, subcategoryPath.cicularEconomy, subcategoryPath.pollution, subcategoryPath.naturalDisaster]), _defineProperty(_CATEGORY_SET, categoryPath.econ, [subcategoryPath.all, subcategoryPath.economy, subcategoryPath.energyEcon, subcategoryPath.agriculture, subcategoryPath.technology]), _defineProperty(_CATEGORY_SET, categoryPath.culture, [subcategoryPath.all, subcategoryPath.peAndSports, subcategoryPath.movie, subcategoryPath.publishing, subcategoryPath.music, subcategoryPath.dramaAndTheatre, subcategoryPath.art]), _defineProperty(_CATEGORY_SET, categoryPath.education, [subcategoryPath.all, subcategoryPath.scientificResearch, subcategoryPath.higherEducation, subcategoryPath.teens, subcategoryPath.parenting, subcategoryPath.lowBirthRate]), _defineProperty(_CATEGORY_SET, categoryPath.podcast, [subcategoryPath.all, subcategoryPath.theRealStory, subcategoryPath.onTheGround]), _defineProperty(_CATEGORY_SET, categoryPath.opinion, [subcategoryPath.all, subcategoryPath.bookReview, subcategoryPath.letter]), _CATEGORY_SET);
|
|
150
|
+
var CATEGORY_SET = (_CATEGORY_SET = {}, _defineProperty(_CATEGORY_SET, categoryPath.world, [subcategoryPath.all, subcategoryPath.hk, subcategoryPath.china, subcategoryPath.us, subcategoryPath.jpAndKr, subcategoryPath.indoPacific, subcategoryPath.europe, subcategoryPath.others]), _defineProperty(_CATEGORY_SET, categoryPath.humanrights, [subcategoryPath.all, subcategoryPath.gender, subcategoryPath.labor, subcategoryPath.immigrant, subcategoryPath.housingJustice, subcategoryPath.transformationalJustice, subcategoryPath.socialAdministration, subcategoryPath.justice, subcategoryPath.digital]), _defineProperty(_CATEGORY_SET, categoryPath.politicsAndSociety, [subcategoryPath.all, subcategoryPath.election, subcategoryPath.politicalPartyAndLocalFaction, subcategoryPath.policy, subcategoryPath.transportation, subcategoryPath.foodSafety, subcategoryPath.informationWarfare, subcategoryPath.socialwatch]), _defineProperty(_CATEGORY_SET, categoryPath.health, [subcategoryPath.all, subcategoryPath.pandemic, subcategoryPath.healthPolicy, subcategoryPath.biotech, subcategoryPath.patientAutonomy, subcategoryPath.psychology, subcategoryPath.longTermCare, subcategoryPath.publicHealth]), _defineProperty(_CATEGORY_SET, categoryPath.environment, [subcategoryPath.all, subcategoryPath.ocean, subcategoryPath.mountainAndForest, subcategoryPath.animal, subcategoryPath.climateChange, subcategoryPath.cicularEconomy, subcategoryPath.pollution, subcategoryPath.naturalDisaster]), _defineProperty(_CATEGORY_SET, categoryPath.econ, [subcategoryPath.all, subcategoryPath.economy, subcategoryPath.energyEcon, subcategoryPath.agriculture, subcategoryPath.technology]), _defineProperty(_CATEGORY_SET, categoryPath.culture, [subcategoryPath.all, subcategoryPath.peAndSports, subcategoryPath.movie, subcategoryPath.publishing, subcategoryPath.music, subcategoryPath.dramaAndTheatre, subcategoryPath.art]), _defineProperty(_CATEGORY_SET, categoryPath.education, [subcategoryPath.all, subcategoryPath.scientificResearch, subcategoryPath.higherEducation, subcategoryPath.teens, subcategoryPath.parenting, subcategoryPath.lowBirthRate]), _defineProperty(_CATEGORY_SET, categoryPath.podcast, [subcategoryPath.all, subcategoryPath.theRealStory, subcategoryPath.onTheGround]), _defineProperty(_CATEGORY_SET, categoryPath.opinion, [subcategoryPath.all, subcategoryPath.bookReview, subcategoryPath.letter]), _defineProperty(_CATEGORY_SET, categoryPath.foundation, [subcategoryPath.all, subcategoryPath.milestone, subcategoryPath.award, subcategoryPath.cooperation]), _CATEGORY_SET);
|
|
147
151
|
exports.CATEGORY_SET = CATEGORY_SET;
|
|
148
152
|
var _default = {
|
|
149
153
|
CATEGORY_PATH: CATEGORY_PATH,
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var
|
|
8
|
-
exports.
|
|
6
|
+
exports.FOUNDATION_CATEGORY_SET = void 0;
|
|
7
|
+
var FOUNDATION_CATEGORY_SET = true;
|
|
8
|
+
exports.FOUNDATION_CATEGORY_SET = FOUNDATION_CATEGORY_SET;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0-rc.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"repository": "https://github.com/twreporter/twreporter-npm-packages.git",
|
|
6
6
|
"author": "twreporter <developer@twreporter.org>",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"lib"
|
|
21
21
|
],
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "4cb4fe4b153f04a931d4fbff13444383c775d9e9"
|
|
23
23
|
}
|