@punch-in/strapi-admin 1.2.16 → 1.2.18

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.
Files changed (35) hide show
  1. package/admin/src/components/GlobalStyle/index.js +27 -0
  2. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/Title.js +1 -0
  3. package/admin/src/components/LeftMenu/LeftMenuLinkSection/LeftMenuListLink.js +8 -1
  4. package/admin/src/components/LeftMenu/LinksContainer/index.js +2 -0
  5. package/admin/src/containers/HomePage/PunchInToday.js +1 -40
  6. package/admin/src/containers/HomePage/RollCall.js +355 -0
  7. package/admin/src/containers/HomePage/VisitorApprovals.js +295 -0
  8. package/admin/src/containers/HomePage/components.js +122 -1
  9. package/admin/src/containers/HomePage/index.js +4 -0
  10. package/admin/src/containers/HomePage/punchUtils.js +42 -0
  11. package/admin/src/translations/en.json +18 -1
  12. package/package.json +1 -1
  13. package/strapi-admin/node_modules/is-wsl/index.d.ts +0 -15
  14. package/strapi-admin/node_modules/is-wsl/index.js +0 -31
  15. package/strapi-admin/node_modules/is-wsl/license +0 -9
  16. package/strapi-admin/node_modules/is-wsl/package.json +0 -77
  17. package/strapi-admin/node_modules/is-wsl/readme.md +0 -36
  18. package/strapi-admin/node_modules/qs/.editorconfig +0 -39
  19. package/strapi-admin/node_modules/qs/.eslintignore +0 -2
  20. package/strapi-admin/node_modules/qs/.eslintrc +0 -35
  21. package/strapi-admin/node_modules/qs/.github/FUNDING.yml +0 -12
  22. package/strapi-admin/node_modules/qs/.nycrc +0 -13
  23. package/strapi-admin/node_modules/qs/CHANGELOG.md +0 -372
  24. package/strapi-admin/node_modules/qs/LICENSE.md +0 -29
  25. package/strapi-admin/node_modules/qs/README.md +0 -611
  26. package/strapi-admin/node_modules/qs/dist/qs.js +0 -1903
  27. package/strapi-admin/node_modules/qs/lib/formats.js +0 -23
  28. package/strapi-admin/node_modules/qs/lib/index.js +0 -11
  29. package/strapi-admin/node_modules/qs/lib/parse.js +0 -263
  30. package/strapi-admin/node_modules/qs/lib/stringify.js +0 -290
  31. package/strapi-admin/node_modules/qs/lib/utils.js +0 -251
  32. package/strapi-admin/node_modules/qs/package.json +0 -100
  33. package/strapi-admin/node_modules/qs/test/parse.js +0 -781
  34. package/strapi-admin/node_modules/qs/test/stringify.js +0 -848
  35. package/strapi-admin/node_modules/qs/test/utils.js +0 -136
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- var replace = String.prototype.replace;
4
- var percentTwenties = /%20/g;
5
-
6
- var Format = {
7
- RFC1738: 'RFC1738',
8
- RFC3986: 'RFC3986'
9
- };
10
-
11
- module.exports = {
12
- 'default': Format.RFC3986,
13
- formatters: {
14
- RFC1738: function (value) {
15
- return replace.call(value, percentTwenties, '+');
16
- },
17
- RFC3986: function (value) {
18
- return String(value);
19
- }
20
- },
21
- RFC1738: Format.RFC1738,
22
- RFC3986: Format.RFC3986
23
- };
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var stringify = require('./stringify');
4
- var parse = require('./parse');
5
- var formats = require('./formats');
6
-
7
- module.exports = {
8
- formats: formats,
9
- parse: parse,
10
- stringify: stringify
11
- };
@@ -1,263 +0,0 @@
1
- 'use strict';
2
-
3
- var utils = require('./utils');
4
-
5
- var has = Object.prototype.hasOwnProperty;
6
- var isArray = Array.isArray;
7
-
8
- var defaults = {
9
- allowDots: false,
10
- allowPrototypes: false,
11
- allowSparse: false,
12
- arrayLimit: 20,
13
- charset: 'utf-8',
14
- charsetSentinel: false,
15
- comma: false,
16
- decoder: utils.decode,
17
- delimiter: '&',
18
- depth: 5,
19
- ignoreQueryPrefix: false,
20
- interpretNumericEntities: false,
21
- parameterLimit: 1000,
22
- parseArrays: true,
23
- plainObjects: false,
24
- strictNullHandling: false
25
- };
26
-
27
- var interpretNumericEntities = function (str) {
28
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
29
- return String.fromCharCode(parseInt(numberStr, 10));
30
- });
31
- };
32
-
33
- var parseArrayValue = function (val, options) {
34
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
35
- return val.split(',');
36
- }
37
-
38
- return val;
39
- };
40
-
41
- // This is what browsers will submit when the ✓ character occurs in an
42
- // application/x-www-form-urlencoded body and the encoding of the page containing
43
- // the form is iso-8859-1, or when the submitted form has an accept-charset
44
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
45
- // the ✓ character, such as us-ascii.
46
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
47
-
48
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
49
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
50
-
51
- var parseValues = function parseQueryStringValues(str, options) {
52
- var obj = {};
53
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
54
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
55
- var parts = cleanStr.split(options.delimiter, limit);
56
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
57
- var i;
58
-
59
- var charset = options.charset;
60
- if (options.charsetSentinel) {
61
- for (i = 0; i < parts.length; ++i) {
62
- if (parts[i].indexOf('utf8=') === 0) {
63
- if (parts[i] === charsetSentinel) {
64
- charset = 'utf-8';
65
- } else if (parts[i] === isoSentinel) {
66
- charset = 'iso-8859-1';
67
- }
68
- skipIndex = i;
69
- i = parts.length; // The eslint settings do not allow break;
70
- }
71
- }
72
- }
73
-
74
- for (i = 0; i < parts.length; ++i) {
75
- if (i === skipIndex) {
76
- continue;
77
- }
78
- var part = parts[i];
79
-
80
- var bracketEqualsPos = part.indexOf(']=');
81
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
82
-
83
- var key, val;
84
- if (pos === -1) {
85
- key = options.decoder(part, defaults.decoder, charset, 'key');
86
- val = options.strictNullHandling ? null : '';
87
- } else {
88
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
89
- val = utils.maybeMap(
90
- parseArrayValue(part.slice(pos + 1), options),
91
- function (encodedVal) {
92
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
93
- }
94
- );
95
- }
96
-
97
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
98
- val = interpretNumericEntities(val);
99
- }
100
-
101
- if (part.indexOf('[]=') > -1) {
102
- val = isArray(val) ? [val] : val;
103
- }
104
-
105
- if (has.call(obj, key)) {
106
- obj[key] = utils.combine(obj[key], val);
107
- } else {
108
- obj[key] = val;
109
- }
110
- }
111
-
112
- return obj;
113
- };
114
-
115
- var parseObject = function (chain, val, options, valuesParsed) {
116
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
117
-
118
- for (var i = chain.length - 1; i >= 0; --i) {
119
- var obj;
120
- var root = chain[i];
121
-
122
- if (root === '[]' && options.parseArrays) {
123
- obj = [].concat(leaf);
124
- } else {
125
- obj = options.plainObjects ? Object.create(null) : {};
126
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
127
- var index = parseInt(cleanRoot, 10);
128
- if (!options.parseArrays && cleanRoot === '') {
129
- obj = { 0: leaf };
130
- } else if (
131
- !isNaN(index)
132
- && root !== cleanRoot
133
- && String(index) === cleanRoot
134
- && index >= 0
135
- && (options.parseArrays && index <= options.arrayLimit)
136
- ) {
137
- obj = [];
138
- obj[index] = leaf;
139
- } else {
140
- obj[cleanRoot] = leaf;
141
- }
142
- }
143
-
144
- leaf = obj;
145
- }
146
-
147
- return leaf;
148
- };
149
-
150
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
151
- if (!givenKey) {
152
- return;
153
- }
154
-
155
- // Transform dot notation to bracket notation
156
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
157
-
158
- // The regex chunks
159
-
160
- var brackets = /(\[[^[\]]*])/;
161
- var child = /(\[[^[\]]*])/g;
162
-
163
- // Get the parent
164
-
165
- var segment = options.depth > 0 && brackets.exec(key);
166
- var parent = segment ? key.slice(0, segment.index) : key;
167
-
168
- // Stash the parent if it exists
169
-
170
- var keys = [];
171
- if (parent) {
172
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
173
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
174
- if (!options.allowPrototypes) {
175
- return;
176
- }
177
- }
178
-
179
- keys.push(parent);
180
- }
181
-
182
- // Loop through children appending to the array until we hit depth
183
-
184
- var i = 0;
185
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
186
- i += 1;
187
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
188
- if (!options.allowPrototypes) {
189
- return;
190
- }
191
- }
192
- keys.push(segment[1]);
193
- }
194
-
195
- // If there's a remainder, just add whatever is left
196
-
197
- if (segment) {
198
- keys.push('[' + key.slice(segment.index) + ']');
199
- }
200
-
201
- return parseObject(keys, val, options, valuesParsed);
202
- };
203
-
204
- var normalizeParseOptions = function normalizeParseOptions(opts) {
205
- if (!opts) {
206
- return defaults;
207
- }
208
-
209
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
210
- throw new TypeError('Decoder has to be a function.');
211
- }
212
-
213
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
214
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
215
- }
216
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
217
-
218
- return {
219
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
220
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
221
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
222
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
223
- charset: charset,
224
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
225
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
226
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
227
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
228
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
229
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
230
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
231
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
232
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
233
- parseArrays: opts.parseArrays !== false,
234
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
235
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
236
- };
237
- };
238
-
239
- module.exports = function (str, opts) {
240
- var options = normalizeParseOptions(opts);
241
-
242
- if (str === '' || str === null || typeof str === 'undefined') {
243
- return options.plainObjects ? Object.create(null) : {};
244
- }
245
-
246
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
247
- var obj = options.plainObjects ? Object.create(null) : {};
248
-
249
- // Iterate over the keys and setup the new object
250
-
251
- var keys = Object.keys(tempObj);
252
- for (var i = 0; i < keys.length; ++i) {
253
- var key = keys[i];
254
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
255
- obj = utils.merge(obj, newObj, options);
256
- }
257
-
258
- if (options.allowSparse === true) {
259
- return obj;
260
- }
261
-
262
- return utils.compact(obj);
263
- };
@@ -1,290 +0,0 @@
1
- 'use strict';
2
-
3
- var getSideChannel = require('side-channel');
4
- var utils = require('./utils');
5
- var formats = require('./formats');
6
- var has = Object.prototype.hasOwnProperty;
7
-
8
- var arrayPrefixGenerators = {
9
- brackets: function brackets(prefix) {
10
- return prefix + '[]';
11
- },
12
- comma: 'comma',
13
- indices: function indices(prefix, key) {
14
- return prefix + '[' + key + ']';
15
- },
16
- repeat: function repeat(prefix) {
17
- return prefix;
18
- }
19
- };
20
-
21
- var isArray = Array.isArray;
22
- var push = Array.prototype.push;
23
- var pushToArray = function (arr, valueOrArray) {
24
- push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
25
- };
26
-
27
- var toISO = Date.prototype.toISOString;
28
-
29
- var defaultFormat = formats['default'];
30
- var defaults = {
31
- addQueryPrefix: false,
32
- allowDots: false,
33
- charset: 'utf-8',
34
- charsetSentinel: false,
35
- delimiter: '&',
36
- encode: true,
37
- encoder: utils.encode,
38
- encodeValuesOnly: false,
39
- format: defaultFormat,
40
- formatter: formats.formatters[defaultFormat],
41
- // deprecated
42
- indices: false,
43
- serializeDate: function serializeDate(date) {
44
- return toISO.call(date);
45
- },
46
- skipNulls: false,
47
- strictNullHandling: false
48
- };
49
-
50
- var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
51
- return typeof v === 'string'
52
- || typeof v === 'number'
53
- || typeof v === 'boolean'
54
- || typeof v === 'symbol'
55
- || typeof v === 'bigint';
56
- };
57
-
58
- var stringify = function stringify(
59
- object,
60
- prefix,
61
- generateArrayPrefix,
62
- strictNullHandling,
63
- skipNulls,
64
- encoder,
65
- filter,
66
- sort,
67
- allowDots,
68
- serializeDate,
69
- format,
70
- formatter,
71
- encodeValuesOnly,
72
- charset,
73
- sideChannel
74
- ) {
75
- var obj = object;
76
-
77
- if (sideChannel.has(object)) {
78
- throw new RangeError('Cyclic object value');
79
- }
80
-
81
- if (typeof filter === 'function') {
82
- obj = filter(prefix, obj);
83
- } else if (obj instanceof Date) {
84
- obj = serializeDate(obj);
85
- } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
86
- obj = utils.maybeMap(obj, function (value) {
87
- if (value instanceof Date) {
88
- return serializeDate(value);
89
- }
90
- return value;
91
- });
92
- }
93
-
94
- if (obj === null) {
95
- if (strictNullHandling) {
96
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
97
- }
98
-
99
- obj = '';
100
- }
101
-
102
- if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
103
- if (encoder) {
104
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
105
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
106
- }
107
- return [formatter(prefix) + '=' + formatter(String(obj))];
108
- }
109
-
110
- var values = [];
111
-
112
- if (typeof obj === 'undefined') {
113
- return values;
114
- }
115
-
116
- var objKeys;
117
- if (generateArrayPrefix === 'comma' && isArray(obj)) {
118
- // we need to join elements in
119
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
120
- } else if (isArray(filter)) {
121
- objKeys = filter;
122
- } else {
123
- var keys = Object.keys(obj);
124
- objKeys = sort ? keys.sort(sort) : keys;
125
- }
126
-
127
- for (var i = 0; i < objKeys.length; ++i) {
128
- var key = objKeys[i];
129
- var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
130
-
131
- if (skipNulls && value === null) {
132
- continue;
133
- }
134
-
135
- var keyPrefix = isArray(obj)
136
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
137
- : prefix + (allowDots ? '.' + key : '[' + key + ']');
138
-
139
- sideChannel.set(object, true);
140
- var valueSideChannel = getSideChannel();
141
- pushToArray(values, stringify(
142
- value,
143
- keyPrefix,
144
- generateArrayPrefix,
145
- strictNullHandling,
146
- skipNulls,
147
- encoder,
148
- filter,
149
- sort,
150
- allowDots,
151
- serializeDate,
152
- format,
153
- formatter,
154
- encodeValuesOnly,
155
- charset,
156
- valueSideChannel
157
- ));
158
- }
159
-
160
- return values;
161
- };
162
-
163
- var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
164
- if (!opts) {
165
- return defaults;
166
- }
167
-
168
- if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
169
- throw new TypeError('Encoder has to be a function.');
170
- }
171
-
172
- var charset = opts.charset || defaults.charset;
173
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
174
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
175
- }
176
-
177
- var format = formats['default'];
178
- if (typeof opts.format !== 'undefined') {
179
- if (!has.call(formats.formatters, opts.format)) {
180
- throw new TypeError('Unknown format option provided.');
181
- }
182
- format = opts.format;
183
- }
184
- var formatter = formats.formatters[format];
185
-
186
- var filter = defaults.filter;
187
- if (typeof opts.filter === 'function' || isArray(opts.filter)) {
188
- filter = opts.filter;
189
- }
190
-
191
- return {
192
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
193
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
194
- charset: charset,
195
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
196
- delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
197
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
198
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
199
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
200
- filter: filter,
201
- format: format,
202
- formatter: formatter,
203
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
204
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
205
- sort: typeof opts.sort === 'function' ? opts.sort : null,
206
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
207
- };
208
- };
209
-
210
- module.exports = function (object, opts) {
211
- var obj = object;
212
- var options = normalizeStringifyOptions(opts);
213
-
214
- var objKeys;
215
- var filter;
216
-
217
- if (typeof options.filter === 'function') {
218
- filter = options.filter;
219
- obj = filter('', obj);
220
- } else if (isArray(options.filter)) {
221
- filter = options.filter;
222
- objKeys = filter;
223
- }
224
-
225
- var keys = [];
226
-
227
- if (typeof obj !== 'object' || obj === null) {
228
- return '';
229
- }
230
-
231
- var arrayFormat;
232
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
233
- arrayFormat = opts.arrayFormat;
234
- } else if (opts && 'indices' in opts) {
235
- arrayFormat = opts.indices ? 'indices' : 'repeat';
236
- } else {
237
- arrayFormat = 'indices';
238
- }
239
-
240
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
241
-
242
- if (!objKeys) {
243
- objKeys = Object.keys(obj);
244
- }
245
-
246
- if (options.sort) {
247
- objKeys.sort(options.sort);
248
- }
249
-
250
- var sideChannel = getSideChannel();
251
- for (var i = 0; i < objKeys.length; ++i) {
252
- var key = objKeys[i];
253
-
254
- if (options.skipNulls && obj[key] === null) {
255
- continue;
256
- }
257
- pushToArray(keys, stringify(
258
- obj[key],
259
- key,
260
- generateArrayPrefix,
261
- options.strictNullHandling,
262
- options.skipNulls,
263
- options.encode ? options.encoder : null,
264
- options.filter,
265
- options.sort,
266
- options.allowDots,
267
- options.serializeDate,
268
- options.format,
269
- options.formatter,
270
- options.encodeValuesOnly,
271
- options.charset,
272
- sideChannel
273
- ));
274
- }
275
-
276
- var joined = keys.join(options.delimiter);
277
- var prefix = options.addQueryPrefix === true ? '?' : '';
278
-
279
- if (options.charsetSentinel) {
280
- if (options.charset === 'iso-8859-1') {
281
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
282
- prefix += 'utf8=%26%2310003%3B&';
283
- } else {
284
- // encodeURIComponent('✓')
285
- prefix += 'utf8=%E2%9C%93&';
286
- }
287
- }
288
-
289
- return joined.length > 0 ? prefix + joined : '';
290
- };