@naturalcycles/js-lib 14.256.0 → 14.257.0
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/cfg/frontend/tsconfig.json +67 -0
- package/dist/browser/adminService.d.ts +69 -0
- package/dist/browser/adminService.js +98 -0
- package/dist/browser/analytics.util.d.ts +12 -0
- package/dist/browser/analytics.util.js +59 -0
- package/dist/browser/i18n/fetchTranslationLoader.d.ts +13 -0
- package/dist/browser/i18n/fetchTranslationLoader.js +17 -0
- package/dist/browser/i18n/translation.service.d.ts +53 -0
- package/dist/browser/i18n/translation.service.js +61 -0
- package/dist/browser/imageFitter.d.ts +60 -0
- package/dist/browser/imageFitter.js +69 -0
- package/dist/browser/script.util.d.ts +14 -0
- package/dist/browser/script.util.js +50 -0
- package/dist/browser/topbar.d.ts +23 -0
- package/dist/browser/topbar.js +137 -0
- package/dist/decorators/memo.util.d.ts +2 -1
- package/dist/decorators/memo.util.js +8 -6
- package/dist/decorators/swarmSafe.decorator.d.ts +9 -0
- package/dist/decorators/swarmSafe.decorator.js +42 -0
- package/dist/error/assert.d.ts +2 -1
- package/dist/error/assert.js +15 -13
- package/dist/error/error.util.js +9 -6
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/zod/zod.util.d.ts +1 -1
- package/dist-esm/browser/adminService.js +94 -0
- package/dist-esm/browser/analytics.util.js +54 -0
- package/dist-esm/browser/i18n/fetchTranslationLoader.js +13 -0
- package/dist-esm/browser/i18n/translation.service.js +56 -0
- package/dist-esm/browser/imageFitter.js +65 -0
- package/dist-esm/browser/script.util.js +46 -0
- package/dist-esm/browser/topbar.js +134 -0
- package/dist-esm/decorators/memo.util.js +3 -1
- package/dist-esm/decorators/swarmSafe.decorator.js +38 -0
- package/dist-esm/error/assert.js +3 -1
- package/dist-esm/error/error.util.js +4 -1
- package/dist-esm/index.js +7 -0
- package/package.json +2 -1
- package/src/browser/adminService.ts +157 -0
- package/src/browser/analytics.util.ts +68 -0
- package/src/browser/i18n/fetchTranslationLoader.ts +16 -0
- package/src/browser/i18n/translation.service.ts +102 -0
- package/src/browser/imageFitter.ts +128 -0
- package/src/browser/script.util.ts +52 -0
- package/src/browser/topbar.ts +147 -0
- package/src/datetime/localDate.ts +16 -0
- package/src/datetime/localTime.ts +39 -0
- package/src/decorators/debounce.ts +1 -0
- package/src/decorators/memo.util.ts +4 -1
- package/src/decorators/swarmSafe.decorator.ts +47 -0
- package/src/error/assert.ts +5 -11
- package/src/error/error.util.ts +4 -1
- package/src/index.ts +7 -0
- package/src/json-schema/jsonSchemaBuilder.ts +20 -0
- package/src/semver.ts +2 -0
- package/src/zod/zod.util.ts +1 -1
|
@@ -131,38 +131,47 @@ export class JsonSchemaAnyBuilder<T = unknown, SCHEMA_TYPE extends JsonSchema<T>
|
|
|
131
131
|
Object.assign(this.schema, { $schema })
|
|
132
132
|
return this
|
|
133
133
|
}
|
|
134
|
+
|
|
134
135
|
$schemaDraft7(): this {
|
|
135
136
|
this.$schema('http://json-schema.org/draft-07/schema#')
|
|
136
137
|
return this
|
|
137
138
|
}
|
|
139
|
+
|
|
138
140
|
$id($id: string): this {
|
|
139
141
|
Object.assign(this.schema, { $id })
|
|
140
142
|
return this
|
|
141
143
|
}
|
|
144
|
+
|
|
142
145
|
title(title: string): this {
|
|
143
146
|
Object.assign(this.schema, { title })
|
|
144
147
|
return this
|
|
145
148
|
}
|
|
149
|
+
|
|
146
150
|
description(description: string): this {
|
|
147
151
|
Object.assign(this.schema, { description })
|
|
148
152
|
return this
|
|
149
153
|
}
|
|
154
|
+
|
|
150
155
|
deprecated(deprecated = true): this {
|
|
151
156
|
Object.assign(this.schema, { deprecated })
|
|
152
157
|
return this
|
|
153
158
|
}
|
|
159
|
+
|
|
154
160
|
type(type: string): this {
|
|
155
161
|
Object.assign(this.schema, { type })
|
|
156
162
|
return this
|
|
157
163
|
}
|
|
164
|
+
|
|
158
165
|
default(v: any): this {
|
|
159
166
|
Object.assign(this.schema, { default: v })
|
|
160
167
|
return this
|
|
161
168
|
}
|
|
169
|
+
|
|
162
170
|
oneOf(schemas: JsonSchema[]): this {
|
|
163
171
|
Object.assign(this.schema, { oneOf: schemas })
|
|
164
172
|
return this
|
|
165
173
|
}
|
|
174
|
+
|
|
166
175
|
allOf(schemas: JsonSchema[]): this {
|
|
167
176
|
Object.assign(this.schema, { allOf: schemas })
|
|
168
177
|
return this
|
|
@@ -211,18 +220,22 @@ export class JsonSchemaNumberBuilder extends JsonSchemaAnyBuilder<number, JsonSc
|
|
|
211
220
|
Object.assign(this.schema, { multipleOf })
|
|
212
221
|
return this
|
|
213
222
|
}
|
|
223
|
+
|
|
214
224
|
min(minimum: number): this {
|
|
215
225
|
Object.assign(this.schema, { minimum })
|
|
216
226
|
return this
|
|
217
227
|
}
|
|
228
|
+
|
|
218
229
|
exclusiveMin(exclusiveMinimum: number): this {
|
|
219
230
|
Object.assign(this.schema, { exclusiveMinimum })
|
|
220
231
|
return this
|
|
221
232
|
}
|
|
233
|
+
|
|
222
234
|
max(maximum: number): this {
|
|
223
235
|
Object.assign(this.schema, { maximum })
|
|
224
236
|
return this
|
|
225
237
|
}
|
|
238
|
+
|
|
226
239
|
exclusiveMax(exclusiveMaximum: number): this {
|
|
227
240
|
Object.assign(this.schema, { exclusiveMaximum })
|
|
228
241
|
return this
|
|
@@ -264,14 +277,17 @@ export class JsonSchemaStringBuilder extends JsonSchemaAnyBuilder<string, JsonSc
|
|
|
264
277
|
Object.assign(this.schema, { pattern })
|
|
265
278
|
return this
|
|
266
279
|
}
|
|
280
|
+
|
|
267
281
|
min(minLength: number): this {
|
|
268
282
|
Object.assign(this.schema, { minLength })
|
|
269
283
|
return this
|
|
270
284
|
}
|
|
285
|
+
|
|
271
286
|
max(maxLength: number): this {
|
|
272
287
|
Object.assign(this.schema, { maxLength })
|
|
273
288
|
return this
|
|
274
289
|
}
|
|
290
|
+
|
|
275
291
|
length(minLength: number, maxLength: number): this {
|
|
276
292
|
Object.assign(this.schema, { minLength, maxLength })
|
|
277
293
|
return this
|
|
@@ -358,10 +374,12 @@ export class JsonSchemaObjectBuilder<T extends AnyObject> extends JsonSchemaAnyB
|
|
|
358
374
|
Object.assign(this.schema, { minProperties })
|
|
359
375
|
return this
|
|
360
376
|
}
|
|
377
|
+
|
|
361
378
|
maxProps(maxProperties: number): this {
|
|
362
379
|
Object.assign(this.schema, { maxProperties })
|
|
363
380
|
return this
|
|
364
381
|
}
|
|
382
|
+
|
|
365
383
|
additionalProps(additionalProperties: boolean): this {
|
|
366
384
|
Object.assign(this.schema, { additionalProperties })
|
|
367
385
|
return this
|
|
@@ -400,10 +418,12 @@ export class JsonSchemaArrayBuilder<ITEM> extends JsonSchemaAnyBuilder<
|
|
|
400
418
|
Object.assign(this.schema, { minItems })
|
|
401
419
|
return this
|
|
402
420
|
}
|
|
421
|
+
|
|
403
422
|
max(maxItems: number): this {
|
|
404
423
|
Object.assign(this.schema, { maxItems })
|
|
405
424
|
return this
|
|
406
425
|
}
|
|
426
|
+
|
|
407
427
|
unique(uniqueItems: number): this {
|
|
408
428
|
Object.assign(this.schema, { uniqueItems })
|
|
409
429
|
return this
|
package/src/semver.ts
CHANGED
package/src/zod/zod.util.ts
CHANGED